apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:53:54 +0000 (14:53 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:53:54 +0000 (14:53 +0900)
245 files changed:
CMakeLists.txt [new file with mode: 0755]
LICENSE [new file with mode: 0755]
call-engine/core/include/vc-core-callagent.h [new file with mode: 0755]
call-engine/core/include/vc-core-callmanager.h [new file with mode: 0755]
call-engine/core/include/vc-core-ccbs.h [new file with mode: 0755]
call-engine/core/include/vc-core-engine-group.h [new file with mode: 0755]
call-engine/core/include/vc-core-engine-status.h [new file with mode: 0755]
call-engine/core/include/vc-core-engine-types.h [new file with mode: 0755]
call-engine/core/include/vc-core-engine.h [new file with mode: 0755]
call-engine/core/include/vc-core-error.h [new file with mode: 0755]
call-engine/core/include/vc-core-svcall.h [new file with mode: 0755]
call-engine/core/include/vc-core-tapi-evnt.h [new file with mode: 0755]
call-engine/core/include/vc-core-tapi-rqst.h [new file with mode: 0755]
call-engine/core/include/vc-core-util.h [new file with mode: 0755]
call-engine/core/vc-core-callagent.c [new file with mode: 0755]
call-engine/core/vc-core-callmanager.c [new file with mode: 0755]
call-engine/core/vc-core-ccbs.c [new file with mode: 0755]
call-engine/core/vc-core-engine-group.c [new file with mode: 0755]
call-engine/core/vc-core-engine-status.c [new file with mode: 0755]
call-engine/core/vc-core-engine.c [new file with mode: 0755]
call-engine/core/vc-core-svcall.c [new file with mode: 0755]
call-engine/core/vc-core-tapi-evnt.c [new file with mode: 0755]
call-engine/core/vc-core-tapi-rqst.c [new file with mode: 0755]
call-engine/core/vc-core-util.c [new file with mode: 0755]
call-engine/etc/rc.d/init.d/voice-calld [new file with mode: 0755]
call-engine/etc/rc.d/rc3.d/S60voice-calld [new file with mode: 0755]
call-engine/include/voice-call-bt.h [new file with mode: 0755]
call-engine/include/voice-call-core.h [new file with mode: 0755]
call-engine/include/voice-call-dbus.h [new file with mode: 0755]
call-engine/include/voice-call-device.h [new file with mode: 0755]
call-engine/include/voice-call-engine-msg.h [new file with mode: 0755]
call-engine/include/voice-call-engine.h [new file with mode: 0755]
call-engine/include/voice-call-service.h [new file with mode: 0755]
call-engine/include/voice-call-sound.h [new file with mode: 0755]
call-engine/sounds/01_Minimal_tone.mp3 [new file with mode: 0755]
call-engine/sounds/03_Call_connect.wav [new file with mode: 0755]
call-engine/sounds/04_Call_disconnect.wav [new file with mode: 0755]
call-engine/sounds/Call_BusyTone.wav [new file with mode: 0755]
call-engine/sounds/Call_ErrorTone.wav [new file with mode: 0755]
call-engine/sounds/Call_NwCongestionTone.wav [new file with mode: 0755]
call-engine/sounds/Call_RecordStart.wav [new file with mode: 0755]
call-engine/sounds/Call_WaitingTone.wav [new file with mode: 0755]
call-engine/voice-call-bt.c [new file with mode: 0755]
call-engine/voice-call-core.c [new file with mode: 0755]
call-engine/voice-call-dbus.c [new file with mode: 0755]
call-engine/voice-call-device.c [new file with mode: 0755]
call-engine/voice-call-engine.c [new file with mode: 0755]
call-engine/voice-call-service.c [new file with mode: 0755]
call-engine/voice-call-sound.c [new file with mode: 0755]
debian/README [new file with mode: 0755]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0755]
debian/control [new file with mode: 0755]
debian/copyright [new file with mode: 0755]
debian/dirs [new file with mode: 0755]
debian/docs [new file with mode: 0755]
debian/org.tizen.call.install.in [new file with mode: 0755]
debian/org.tizen.call.postinst [new file with mode: 0755]
debian/rules [new file with mode: 0755]
packaging/org.tizen.call.spec [new file with mode: 0644]
ui/CMakeLists.txt [new file with mode: 0755]
ui/call_edc/vcui-view-dialing.edc [new file with mode: 0755]
ui/call_edc/vcui-view-end-conf-call.edc [new file with mode: 0755]
ui/call_edc/vcui-view-end-single-call.edc [new file with mode: 0755]
ui/call_edc/vcui-view-incoming-lock.edc [new file with mode: 0755]
ui/call_edc/vcui-view-incoming.edc [new file with mode: 0755]
ui/call_edc/vcui-view-keypad.edc [new file with mode: 0755]
ui/call_edc/vcui-view-multi-call-conf.edc [new file with mode: 0755]
ui/call_edc/vcui-view-multi-call-list.edc [new file with mode: 0755]
ui/call_edc/vcui-view-multi-call-split.edc [new file with mode: 0755]
ui/call_edc/vcui-view-naviframe.edc [new file with mode: 0755]
ui/call_edc/vcui-view-single-call.edc [new file with mode: 0755]
ui/call_edc/vcui-view-ug-effect.edc [new file with mode: 0755]
ui/call_edc/vcui-view-volume-popup.edc [new file with mode: 0755]
ui/call_edc/voice-call-ui.edc [new file with mode: 0755]
ui/default.conf [new file with mode: 0755]
ui/images/PUT_IMAGES_HERE [new file with mode: 0755]
ui/images/hd/icon/vc_add_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_add_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_btn_more.png [new file with mode: 0644]
ui/images/hd/icon/vc_calling_name_BG_image.png [new file with mode: 0644]
ui/images/hd/icon/vc_conference_private.png [new file with mode: 0644]
ui/images/hd/icon/vc_contact_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_contact_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_icon_conf_call_end.png [new file with mode: 0644]
ui/images/hd/icon/vc_icon_conf_list_hold.png [new file with mode: 0755]
ui/images/hd/icon/vc_icon_conf_list_unhold.png [new file with mode: 0755]
ui/images/hd/icon/vc_icon_hold.png [new file with mode: 0755]
ui/images/hd/icon/vc_icon_hold_dim.png [new file with mode: 0755]
ui/images/hd/icon/vc_icon_pause.png [new file with mode: 0644]
ui/images/hd/icon/vc_icon_play.png [new file with mode: 0644]
ui/images/hd/icon/vc_icon_unhold.png [new file with mode: 0755]
ui/images/hd/icon/vc_icon_unhold_dim.png [new file with mode: 0755]
ui/images/hd/icon/vc_join_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_join_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_keypad_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_keypad_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_mute_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_mute_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_normal_caller_ID.png [new file with mode: 0755]
ui/images/hd/icon/vc_normal_caller_ID_group.png [new file with mode: 0755]
ui/images/hd/icon/vc_qp_caller_ID.png [new file with mode: 0644]
ui/images/hd/icon/vc_qp_caller_ID_group.png [new file with mode: 0644]
ui/images/hd/icon/vc_rcs_share_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_rcs_share_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_record_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_record_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_record_stop_icon_crop.png [new file with mode: 0644]
ui/images/hd/icon/vc_reject_with_msg_header_icon_others.png [new file with mode: 0644]
ui/images/hd/icon/vc_speaker_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_speaker_icon_dim.png [new file with mode: 0644]
ui/images/hd/icon/vc_volume_icon.png [new file with mode: 0644]
ui/images/hd/icon/vc_volume_mute_icon.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_icon-1.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_icon.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_normal-1.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_normal.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_press-1.png [new file with mode: 0644]
ui/images/hd/keypad/vc_keypad_btn_press.png [new file with mode: 0644]
ui/images/hd/vc_lock_accept_icon.png [new file with mode: 0644]
ui/images/hd/vc_lock_bottom_bg.png [new file with mode: 0644]
ui/images/hd/vc_lock_left_bg.png [new file with mode: 0644]
ui/images/hd/vc_lock_reject_icon.png [new file with mode: 0644]
ui/images/hd/vc_lock_right_bg.png [new file with mode: 0644]
ui/images/wvga/icon/vc_add_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_add_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_btn_more.png [new file with mode: 0644]
ui/images/wvga/icon/vc_conference_private-1.png [new file with mode: 0644]
ui/images/wvga/icon/vc_conference_private.png [new file with mode: 0644]
ui/images/wvga/icon/vc_contact_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_contact_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_conf_call_end-1.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_conf_call_end.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_hold.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_mute_press.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_pause.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_play.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_sound_press.png [new file with mode: 0644]
ui/images/wvga/icon/vc_icon_unhold.png [new file with mode: 0644]
ui/images/wvga/icon/vc_join_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_join_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_keypad_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_keypad_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_mute_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_mute_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_normal_caller_ID.png [new file with mode: 0644]
ui/images/wvga/icon/vc_normal_caller_ID_group.png [new file with mode: 0644]
ui/images/wvga/icon/vc_qp_caller_ID.png [new file with mode: 0644]
ui/images/wvga/icon/vc_qp_caller_ID_group.png [new file with mode: 0644]
ui/images/wvga/icon/vc_rcs_share_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_rcs_share_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_record_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_record_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_record_stop_icon_crop.png [new file with mode: 0644]
ui/images/wvga/icon/vc_reject_with_msg_header_icon_others.png [new file with mode: 0644]
ui/images/wvga/icon/vc_speaker_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_speaker_icon_dim.png [new file with mode: 0644]
ui/images/wvga/icon/vc_volume_icon.png [new file with mode: 0644]
ui/images/wvga/icon/vc_volume_mute_icon.png [new file with mode: 0644]
ui/images/wvga/keypad/vc_keypad_btn_icon.png [new file with mode: 0644]
ui/images/wvga/keypad/vc_keypad_btn_normal.png [new file with mode: 0644]
ui/images/wvga/keypad/vc_keypad_btn_press.png [new file with mode: 0644]
ui/images/wvga/vc_lock_accept_icon.png [new file with mode: 0644]
ui/images/wvga/vc_lock_bottom_bg.png [new file with mode: 0644]
ui/images/wvga/vc_lock_left_bg.png [new file with mode: 0644]
ui/images/wvga/vc_lock_reject_icon.png [new file with mode: 0644]
ui/images/wvga/vc_lock_right_bg.png [new file with mode: 0644]
ui/org.tizen.call.desktop.in [new file with mode: 0755]
ui/po/CMakeLists.txt [new file with mode: 0755]
ui/po/de_DE.po [new file with mode: 0755]
ui/po/el_GR.po [new file with mode: 0755]
ui/po/en.po [new file with mode: 0755]
ui/po/es_ES.po [new file with mode: 0755]
ui/po/fr_FR.po [new file with mode: 0755]
ui/po/it_IT.po [new file with mode: 0755]
ui/po/ja_JP.po [new file with mode: 0755]
ui/po/ko_KR.po [new file with mode: 0755]
ui/po/nl_NL.po [new file with mode: 0755]
ui/po/pt_PT.po [new file with mode: 0755]
ui/po/ru_RU.po [new file with mode: 0755]
ui/po/tr_TR.po [new file with mode: 0755]
ui/po/zh_CN.po [new file with mode: 0755]
ui/po/zh_HK.po [new file with mode: 0755]
ui/po/zh_TW.po [new file with mode: 0755]
ui/themes/call_theme.edc [new file with mode: 0755]
ui/themes/vc_btn_green.png [new file with mode: 0644]
ui/themes/vc_button_grey.png [new file with mode: 0644]
ui/themes/vc_button_hide_keypad_normal.png [new file with mode: 0644]
ui/themes/vc_button_press.png [new file with mode: 0644]
ui/themes/vc_button_red_normal.png [new file with mode: 0644]
ui/themes/vc_button_rej_w_msg_normal.png [new file with mode: 0644]
ui/themes/vc_button_rej_w_msg_press.png [new file with mode: 0644]
ui/themes/vc_conf_call_list_bg.png [new file with mode: 0644]
ui/themes/vc_conference_call_btn_normal.png [new file with mode: 0644]
ui/themes/vc_conference_call_btn_press.png [new file with mode: 0644]
ui/themes/vc_conference_call_btn_red.png [new file with mode: 0644]
ui/themes/vc_control_btn_new_prev.png [new file with mode: 0644]
ui/themes/vc_control_btn_prev.png [new file with mode: 0644]
ui/themes/vc_reject_with_msg_back_icon.png [new file with mode: 0755]
ui/themes/vc_reject_with_msg_control_top_arrow.png [new file with mode: 0755]
ui/themes/vc_reject_with_msg_control_top_bg.png [new file with mode: 0755]
ui/themes/vc_reject_with_msg_option_header_bt_press.png [new file with mode: 0755]
ui/themes/vc_second_mt_btn_normal.png [new file with mode: 0644]
ui/themes/vc_six_btn_layout_normal.png [new file with mode: 0644]
ui/themes/vc_six_btn_layout_press.png [new file with mode: 0644]
ui/vcui-app-data.h [new file with mode: 0755]
ui/vcui-app-window.c [new file with mode: 0755]
ui/vcui-app-window.h [new file with mode: 0755]
ui/vcui-application.c [new file with mode: 0755]
ui/vcui-application.h [new file with mode: 0755]
ui/vcui-doc-launch.c [new file with mode: 0755]
ui/vcui-doc-launch.h [new file with mode: 0755]
ui/vcui-document.c [new file with mode: 0755]
ui/vcui-document.h [new file with mode: 0755]
ui/vcui-engine-interface.c [new file with mode: 0755]
ui/vcui-engine-interface.h [new file with mode: 0755]
ui/vcui-view-callend.c [new file with mode: 0755]
ui/vcui-view-callend.h [new file with mode: 0755]
ui/vcui-view-choice.c [new file with mode: 0755]
ui/vcui-view-choice.h [new file with mode: 0755]
ui/vcui-view-common.c [new file with mode: 0755]
ui/vcui-view-common.h [new file with mode: 0755]
ui/vcui-view-dialing.c [new file with mode: 0755]
ui/vcui-view-dialing.h [new file with mode: 0755]
ui/vcui-view-elements.c [new file with mode: 0755]
ui/vcui-view-elements.h [new file with mode: 0755]
ui/vcui-view-incoming-lock.c [new file with mode: 0755]
ui/vcui-view-incoming-lock.h [new file with mode: 0755]
ui/vcui-view-incoming.c [new file with mode: 0755]
ui/vcui-view-incoming.h [new file with mode: 0755]
ui/vcui-view-keypad.c [new file with mode: 0755]
ui/vcui-view-keypad.h [new file with mode: 0755]
ui/vcui-view-layout-hd.h [new file with mode: 0755]
ui/vcui-view-layout-wvga.h [new file with mode: 0755]
ui/vcui-view-layout.h [new file with mode: 0755]
ui/vcui-view-multi-call-conf.c [new file with mode: 0755]
ui/vcui-view-multi-call-conf.h [new file with mode: 0755]
ui/vcui-view-multi-call-list.c [new file with mode: 0755]
ui/vcui-view-multi-call-list.h [new file with mode: 0755]
ui/vcui-view-multi-call-split.c [new file with mode: 0755]
ui/vcui-view-multi-call-split.h [new file with mode: 0755]
ui/vcui-view-popup.c [new file with mode: 0755]
ui/vcui-view-popup.h [new file with mode: 0755]
ui/vcui-view-single-call.c [new file with mode: 0755]
ui/vcui-view-single-call.h [new file with mode: 0755]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..d8f4976
--- /dev/null
@@ -0,0 +1,25 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(voice-call-ui C)
+
+# Architecture
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+    ADD_DEFINITIONS("-D_CALL_ARCH_ARM_")
+ENDIF()
+
+#INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+#ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+#ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{PREFIX}\"")
+#ADD_DEFINITIONS("-DDATAFS=\"$ENV{DATADIR}\"")
+#ADD_DEFINITIONS(${SHARED_FLAGS})
+
+
+ADD_DEFINITIONS("-DCALL_DEBUG_ON_DLOG")
+#ADD_DEFINITIONS("-DCALL_DEBUG_ON_SCREEN")
+
+SET(COMMON_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+
+ADD_SUBDIRECTORY(ui)
+
diff --git a/LICENSE b/LICENSE
new file mode 100755 (executable)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.org/license
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies with the standards set forth in the Compatibility Definition Document and passes the Compatibility Test Suite as defined from time to time by the Tizen Technical Steering Group and certified by the Tizen Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work solely as incorporated into a Tizen Certified Platform, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work solely as incorporated into a Tizen Certified Platform to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof pursuant to the copyright license above, in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+  2. You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+  3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+  4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Flora License, Version 1.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.tizenopensource.org/license
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/call-engine/core/include/vc-core-callagent.h b/call-engine/core/include/vc-core-callagent.h
new file mode 100755 (executable)
index 0000000..78fc48b
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_CALL_AGENT_H_
+#define __VC_CORE_CALL_AGENT_H_
+
+#include <stdbool.h>
+#include "vc-core-callmanager.h"
+#ifdef _CPHS_DEFINED_
+#include "status-interface.h"
+#endif
+
+/**< Maximum Telephony Event */
+#define CALL_VC_TAPI_CALL_EVENT_MAX_NUM                33
+#define CALL_VC_SIMATK_EVENT_MAX_NUM           3       /**< Maximum SIM ATK Event */
+#define CALL_VC_TAPI_READY_EVENT_NUM           1       /**< Tapi Service Ready Event */
+#define CALL_VC_TAPI_SUBSCRIPTION_MAX          (CALL_VC_TAPI_CALL_EVENT_MAX_NUM+CALL_VC_TAPI_READY_EVENT_NUM+CALL_VC_SIMATK_EVENT_MAX_NUM)
+
+/**
+ * This enumeration provides CA STATEs
+ */
+typedef enum {
+       CALL_VC_CA_STATE_NORMAL,                                                        /**< Normal state */
+       CALL_VC_CA_STATE_SPLIT_CALLBOX,                                         /**< Call split state */
+       CALL_VC_CA_STATE_WAIT_SPLIT,                                            /**< Waiting for call split state */
+       CALL_VC_CA_STATE_DROP_CALLBOX,                                          /**< Call drop state */
+       CALL_VC_CA_STATE_WAIT_DROP,                                                     /**< Waiting for drop state */
+#ifdef SWAP_SUPPORT
+       CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE,            /**< Wait for swapping activce/hold call state */
+       CALL_VC_CA_STATE_WAIT_SWAP_HOLD,                                        /**< Wait for swapping held call state */
+       CALL_VC_CA_STATE_WAIT_SWAP_ACTIVE,                                      /**< Wait for swapping active call state */
+#endif
+       CALL_VC_CA_STATE_WAIT_SWAP,                                                     /**< Wait for swap state */
+       CALL_VC_CA_STATE_WAIT_HOLD,                                                     /**< Wait for hold state */
+       CALL_VC_CA_STATE_WAIT_UNHOLD,                                           /**< Wait for unhold state */
+       CALL_VC_CA_STATE_WAIT_JOIN,                                                     /**< Wait for join state */
+       CALL_VC_CA_STATE_WAIT_TRANSFER_CNF,                                     /**< Wait for transfer confirmation state */
+       CALL_VC_CA_STATE_WAIT_TRANSFER_CALLEND,                         /**< Wait for transfer callend state */
+       CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL,           /**< Wait for release all active call state */
+       CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL,                     /**< Wait for release all held call state */
+       CALL_VC_CA_STATE_SENDMSG_CALLBOX,                                       /**< Message send callbox active state */
+       CALL_VC_CA_STATE_VIEW_CONTACT_DETAIL_CALLBOX,           /**< Contact detail view state */
+       CALL_VC_CA_STATE_SAVE_TO_CONTACT_CALLBOX,                       /**< Save to contact state */
+       CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL,        /**< Wait for release all active calls */
+       CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS,                        /**< Wait for release all calls */
+       CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP,       /**< Wait for release all calls to setup */
+       CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SWITCH_TO_VIDEO_CALL,/**< Wait for release all calls to setup videocall */
+       CALL_VC_CA_STATE_MAX_NUM                                                        /**< Max value for the state */
+} call_vc_ca_state_t;
+
+/**
+ * This structure defines voicecall agent data
+ */
+typedef struct _voicecall_engine_t {
+       call_vc_ca_state_t callagent_state;                     /**< Call Agent State */
+       voicecall_inout_state_t io_state;               /**< Voicecall Engine IO State */
+       call_vc_manager_t call_manager;                 /**< Handle for the Call Manager */
+       TelSimCardType_t card_type;                             /**< SIM Card Type */
+
+       gboolean bdtmf_ring;                                    /**< dtmf ring? */
+
+       gboolean bonly_sos_call;                                        /**< only SOS calls possible , if TRUE */
+       gboolean bis_no_sim;                                            /**< SIM not available , if TRUE */
+       gboolean bdownload_call;                                        /**< Automated call test after binary download , if TRUE */
+
+       /*No structure in TAPI  14Mar08 */
+       /*tapi_call_ccbs_info_t ccbs_info[CALL_VC_CCBS_NUMBER_MAX]; < call control for busy subscriber info */
+       int ccbs_index;                                                                                           /**< Index for  ccbs_info*/
+
+       /*AOC*/
+       float aoc_ppm;                                                                                          /**< Price per unit value of currency meter */
+
+       /*CPHS Info*/
+#ifdef _CPHS_DEFINED_
+       status_class_cphs_type cphs_status;                              /**< stores the cphs status information*/
+       gboolean bcphs_read_success;                                                            /**< Flag for CPHS read status*/
+#endif
+
+       /*Subscription Information */
+       unsigned int subscription_id[CALL_VC_TAPI_SUBSCRIPTION_MAX];
+       int curr_tapi_path;
+
+       /*Client Information */
+       voicecall_cb client_callback;                                   /**<Callback fucntion to send event to client*/
+       void *puser_data;                                               /**<Stores the User data set during engine initialization*/
+
+} call_vc_callagent_state_t;
+
+/**
+ * This function intializes the call agent
+ *
+ * @return             Pointer to call agent state.
+ */
+call_vc_callagent_state_t *_vc_core_ca_init_agent();
+
+/**
+ * This function changes the in out state of the call agent
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pAgent          Pointer to the call agent structure
+ * @param[in]          new_state               The new i/o state that should be set
+ * @see                        _vc_core_ca_change_agent_state
+ */
+gboolean _vc_core_ca_change_inout_state(call_vc_callagent_state_t *pAgent, voicecall_inout_state_t new_state);
+
+/**
+ * This function changes the in call agent state
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pAgent          Pointer to the call agent structure
+ * @param[in]          new_state               The new call agent state that should be set
+ * @see                        _vc_core_ca_change_inout_state
+ */
+gboolean _vc_core_ca_change_agent_state(call_vc_callagent_state_t *pAgent, call_vc_ca_state_t new_state);
+
+/**
+ * This function finalizes the call agent
+ *
+ * @return             Returns void
+ * @param[in]          pcall_agent Pointer to the call agent structure
+ */
+void _vc_core_ca_finish_agent(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function checks if all the call members have terminated or not
+ *
+ * @return             Returns TRUE if no call members exist, FALSE otherwise
+ * @param[in]  pagent          Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_check_end(call_vc_callagent_state_t *pagent);
+
+/**
+ * This function ends all the calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent  Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_all_calls(call_vc_callagent_state_t *pagent);
+
+/**
+ * This function ends all the active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent  Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_active_calls(call_vc_callagent_state_t *pagent);
+
+/**
+ * This function ends all the held calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent        Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_held_calls(call_vc_callagent_state_t *pagent);
+
+/**
+ * This function sends the response to the SAT engine
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]  pagent                          Pointer to the call agent structure
+ * @param[in]  sat_rqst_resp_type      sat rquest/response type used by the client
+ * @param[in]  sat_response_type       response to be sent to sat
+ */
+gboolean _vc_core_ca_send_sat_response(call_vc_callagent_state_t *pagent, voicecall_engine_sat_rqst_resp_type sat_rqst_Resp_type, call_vc_sat_reponse_type_t sat_response_type);
+
+/**
+ * This function intializes the callagent data
+ *
+ * @return             void
+ * @param[in]          pagent                                  Pointer to the call agent structure
+ */
+void _vc_core_ca_init_data(call_vc_callagent_state_t *pagent);
+
+/**
+ * This function sends response event to the registered client
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]  pcall_agent     Pointer to the call agent structure
+ * @param[in]  event           response event type
+ * @param[in]  param1          param 1 to be passed to the client
+ * @param[in]  param2          param 2 to be passed to the client
+ * @param[in]  param3          param 3 to be passed to the client
+ */
+gboolean _vc_core_ca_send_event_to_client(call_vc_callagent_state_t *pcall_agent, int event, int param1, int param2, void *param3);
+
+/**
+ * This function checks whether outgoing call is possible
+ *
+ * @return             This function returns TRUE if outgoing call is possible or else FALSE
+ * @param[in]  pcall_agent                     Pointer to the call agent structure
+ * @param[in]  bemergency_number       TRUE - if outgoing call being made is emergency call or else FALSE
+ */
+gboolean _vc_core_ca_is_mocall_possible(call_vc_callagent_state_t *pcall_agent, gboolean bemergency_number);
+
+/**
+ * This function checks whether private call is possible or not
+ *
+ * @return             This function returns TRUE if private call is possible or else FALSE
+ * @param[in]  pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_private_call_possible(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function checks whether call transfer is possible
+ *
+ * @return             This function returns TRUE if transfer is possible or else FALSE
+ * @param[in]  pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_transfer_call_possible(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function checks whether conference call is possible
+ *
+ * @return             This function returns TRUE if transfer is possible or else FALSE
+ * @param[in]  pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_conf_call_possible(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function clears the data of a connected call givenits call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pcall_agent     Handle to voicecall engine
+ * @param[in]  call_handle     Call handle of the connected call to be cleared
+ */
+gboolean _vc_core_ca_clear_connected_call(call_vc_callagent_state_t *pcall_agent, int call_handle);
+
+#endif                         /* __VC_CORE_CALL_AGENT_H_ */
diff --git a/call-engine/core/include/vc-core-callmanager.h b/call-engine/core/include/vc-core-callmanager.h
new file mode 100755 (executable)
index 0000000..fc01c5c
--- /dev/null
@@ -0,0 +1,624 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_CALL_MANAGER_H_
+#define __VC_CORE_CALL_MANAGER_H_
+
+#include "vc-core-util.h"
+#include "vc-core-engine-types.h"
+
+#ifdef CALLDETAILS_DUMP
+#define CALL_VC_DUMP_CALLDETAILS(call_manager) _vc_core_cm_test_dump(call_manager)
+#else
+#define CALL_VC_DUMP_CALLDETAILS(call_manager)
+#endif
+
+/*
+* This enumeration defines the Call Group
+*/
+typedef enum __call_vc_group_t {
+       CALL_VC_CALL_GROUP_0,
+       CALL_VC_CALL_GROUP_1,
+       CALL_VC_CALL_GROUP_MAX
+} call_vc_group_t;
+
+/**
+* This enumeration has types of sat call control
+*/
+typedef enum {
+       CALL_VC_SAT_CC_NONE,                                    /**< No SAT call control */
+       CALL_VC_SAT_CC_ALLOWED,                         /**< SAT call control Allowed */
+       CALL_VC_SAT_CC_NOT_ALLOWED,                     /**< SAT call control Not Allowed */
+       CALL_VC_SAT_CC_ALLOWED_WITH_MODIFIED    /**< SAT call control allowed with modification */
+} call_vc_callcontrol_type_t;
+
+/**
+ * This structure is used to handle the call group information
+ */
+typedef struct {
+       int num;                                                                                        /**< The number of members in the group */
+       int callobject_index[VC_MAX_CALL_GROUP_MEMBER];         /**< Index to the call object for each member */
+       call_vc_groupstate_t state;                                                     /**< State of the group */
+} call_vc_groupinfo_t;
+
+/**
+ * This structure is used to handle SAT setup information
+ */
+typedef struct {
+       TelSatSetupCallIndCallData_t satengine_setupcall_data;  /**< Sat call setup proactive command*/
+       TelSatCallCtrlIndData_t satengine_callctrl_data;        /**< Sat call control confirm data*/
+       TelSatSendDtmfIndDtmfData_t satengine_dtmf_data;        /**< Sat send dtmf data*/
+       int satengine_event_type;                                                               /**< Event type of Sat engine */
+       gboolean redial;                                                                                                /**< Redial yes? or No? */
+       TelCallCause_t tapi_cause;                                                              /**< Tapi Success / Error Cause */
+       call_vc_handle call_handle;                                                             /**< Tapi call handle */
+       gboolean bduration;                                                                                             /**< Duration */
+       unsigned long remaining_duration;                                                       /**< Remaining duration */
+       /*guchar        sat_rgb_data[64*64];*/
+       guchar *psat_rgb_data;
+} call_vc_satsetup_info_t;
+
+/**
+ * This structure is used to handle call setup information
+ */
+typedef struct {
+       int mocall_index;                                                                                               /**< Index for originated call */
+       gboolean no_service_state;                                                                                              /**< No service? */
+       call_vc_callcontrol_type_t call_control_type;                                                   /**< SAT call control type */
+       char modified_number[VC_PHONE_NUMBER_LENGTH_MAX];                                     /**< Phone number */
+       voicecall_call_orig_type_t call_type;                                                                           /**< Type of the voice call */
+
+       call_vc_satsetup_info_t satcall_setup_info;                                                     /**<applies when call_type is VC_CALL_ORIG_TYPE_SAT */
+} call_vc_setupcall_info_t;
+
+/**
+ *  This structure holds the status of call members
+ */
+typedef struct {
+       call_vc_call_objectinfo_t callobject_info[VC_MAX_CALL_MEMBER];           /**< CallObject having details of Single Call */
+       call_vc_groupinfo_t callgroup_info[CALL_VC_CALL_GROUP_MAX];                      /**< Maintains the Call Group Details */
+       call_vc_setupcall_info_t setupcall_info;                                                                 /**< MO Call Details */
+       int mtcall_index;                                                                                                /**< Index for the MT Call Object */
+} call_vc_manager_t;
+
+/**
+ * This function initializes the call manager
+ *
+ * @return             void
+ * @param[out] pMng            Pointer to the call manager structure
+ */
+void _vc_core_call_manager_init(call_vc_manager_t *pMng);
+
+/**
+ * This function adds the given call object info to a free slot.
+ *
+ * @return             This function returns the call object index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure that need to be added
+ * @see                        _vc_core_cm_set_call_object, _vc_core_cm_remove_call_object
+ */
+int _vc_core_cm_add_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function sets the given call object info to the given slot
+ *
+ * @return             This function returns the call object index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure that need to be modified
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_get_call_object
+ */
+int _vc_core_cm_set_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function removes the specified call object info of a given call handle
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Handle of the call object to be removed
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_remove_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle);
+
+/**
+ * This function retrieves the given call object info
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle of the object info to be retrieved
+ * @param[out] pcall_object    Pointer to the call object info structure that should be retrieved
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_get_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function retrieves the given call object info for the given index
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          index           index of the object info to be retrieved
+ * @param[out] pcall_object    Pointer to the call object info structure that should be retrieved
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_get_call_object_byindex(call_vc_manager_t *pMng, int index, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function retrieves the call state of a given call handle
+ *
+ * @return             This function returns the call state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle for which the state has to be retrieved
+ */
+voicecall_call_state_t _vc_core_cm_get_call_state(call_vc_manager_t *pMng, call_vc_handle call_handle);
+
+/**
+ * This function returns the number of calls in a given call state
+ *
+ * @return             This function returns the number of calls in the given state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          state           The call state the number of which has to be retrieved
+ */
+int _vc_core_cm_get_call_state_num(call_vc_manager_t *pMng, voicecall_call_state_t state);
+
+/**
+ * This function clears the information of a given call state
+ *
+ * @return             void
+ * @param[in]  pcall_object    Pointer to the call object which has to be cleared
+ */
+void _vc_core_cm_clear_call_object(call_vc_call_objectinfo_t *pcall_object);
+
+/**
+* This function clears the information of the callobject available in the given index
+*
+* @return              TRUE, if the object cleared, otherwise FALSE
+* @param[in]   pMng            Pointer to the call manager structure
+* @param[in]   index           Index of the call object to be cleared
+*/
+gboolean _vc_core_cm_clear_call_object_byindex(call_vc_manager_t *pMng, int index);
+
+/**
+ * This function clears the call object information of the ended and finished calls
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+gboolean _vc_core_cm_clear_endcall_member(call_vc_manager_t *pMng);
+
+/**
+ * This function adds a call member to a group
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callobject_index        The object index of the call object to be added
+ * @see                        __vc_core_cm_remove_call_member_fromgroup
+ */
+gboolean _vc_core_cm_add_call_member_togroup(call_vc_manager_t *pMng, int callobject_index);
+
+/**
+ * This function retreives the group state for the given group index
+ *
+ * @return             This function returns the group state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          group index
+ */
+call_vc_groupstate_t _vc_core_cm_get_group_state(call_vc_manager_t *pMng, int nGroup);
+
+/**
+ * This function sets the state of a given group
+ *
+ * @return             void
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          The call group for which the state needs to be changed
+ * @param[in]          state           The state to be set
+ * @see                        _vc_core_cm_swap_group_state, _vc_core_cm_get_call_pos_ingroup
+ */
+void _vc_core_cm_set_group_state(call_vc_manager_t *pMng, int nGroup, call_vc_groupstate_t state);
+
+/**
+ * This function retrieves the index of the group given the call handle
+ *
+ * @return             Returns group index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     The for which the group index has to be retrieved
+ * @see                        _vc_core_cm_set_group_state, _vc_core_cm_get_call_pos_ingroup
+ */
+int _vc_core_cm_get_group_index(call_vc_manager_t *pMng, call_vc_handle call_handle);
+
+/**
+ * This function retrieves the index/position of the call info in the object info table for a given call handle
+ *
+ * @return             Returns index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group ID
+ * @param[in]          call_handle     The call handle for which the call index has to be retrieved
+ * @see                        _vc_core_cm_get_group_index
+ */
+int _vc_core_cm_get_call_pos_ingroup(call_vc_manager_t *pMng, int nGroup, call_vc_handle call_handle);
+
+/**
+ * This function swaps the state of the groups
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_set_group_state
+ */
+gboolean _vc_core_cm_swap_group_state(call_vc_manager_t *pMng);
+
+/**
+ * This function joins the groups
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_split_group
+ */
+gboolean _vc_core_cm_join_group(call_vc_manager_t *pMng);
+
+/**
+ * This function splits the group given a call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle
+ * @see                        _vc_core_cm_join_group
+ */
+gboolean _vc_core_cm_split_group(call_vc_manager_t *pMng, call_vc_handle call_handle);
+
+/**
+ * This function retrieves the total number of members in all the groups
+ *
+ * @return             Returns the total number of members
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_total_members_ingroup(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the total number of groups
+ *
+ * @return             Returns the total number of groups
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_group_count(call_vc_manager_t *pMng);
+
+/**
+ * This function clears the outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_set_outgoing_call
+ */
+gboolean _vc_core_cm_clear_outgoing_call(call_vc_manager_t *pMng);
+
+/**
+ * This function sets the out going call index
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callIndex               Call index that needs to be set
+ * @see                        _vc_core_cm_clear_outgoing_call
+ */
+gboolean _vc_core_cm_set_outgoing_call(call_vc_manager_t *pMng, int callIndex);
+
+/**
+ * This function retrieves the outgoing call handle
+ *
+ * @return             Returns out going call handle on success and TAPI_INVALID_CALLHANDLE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+call_vc_handle _vc_core_cm_get_outgoing_call_handle(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_set_outgoing_call_info
+ */
+gboolean _vc_core_cm_get_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function sets the given outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_get_outgoing_call_info
+ */
+gboolean _vc_core_cm_set_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function sets the incoming call index
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callIndex               Call index of the incoming call
+ */
+gboolean _vc_core_cm_set_incoming_call(call_vc_manager_t *pMng, int callIndex);
+
+/**
+ * This function retrieves the call handle of the incoming call
+ *
+ * @return             Returns the call handle if success, TAPI_INVALID_CALLHANDLE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_incoming_call_info
+ */
+call_vc_handle _vc_core_cm_get_incoming_call_handle(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the call information of the incoming call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_get_incoming_call_info, call_vc_cm_set_incomingcall_info
+ */
+gboolean _vc_core_cm_get_incoming_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function checks if incoming call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_connected_call
+ */
+gboolean _vc_core_cm_isexists_incoming_call(call_vc_manager_t *pMng);
+
+/**
+ * This function checks if active/ held exists
+ *
+ * @return             Returns TRUE if success else FALSE
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] active_calls    TRUE if active call exists, FALSE if held call exists
+ * @param[out] held_calls      TRUE if held call exists, FALSE if held call exists
+ * @see                        call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_connected_call
+ */
+gboolean _vc_core_cm_isexists_call_ingroup(call_vc_manager_t *pMng, int *active_calls, int *held_calls);
+
+/**
+ * This function changes the call state of the call object corresponds to the given call handle
+ *
+ * @return             Returns TRUE if success else FALSE
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] call_handle     Call Handle of the Callobject to be modified
+ * @param[out] callState               New call state to be set
+ */
+gboolean _vc_core_cm_change_call_object_state(call_vc_manager_t *pMng, call_vc_handle call_handle, voicecall_call_state_t callState);
+
+/**
+ * This function returns the status of currently being ended call
+ *
+ * @return             Returns TRUE if any calls are being ended, FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+gboolean _vc_core_cm_get_ending_call_info(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the number of members in a group
+ *
+ * @return             Returns number of members in the group
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ */
+int _vc_core_cm_get_member_count_ingroup(call_vc_manager_t *pMng, int nGroup);
+
+/**
+ * This function retrieves the number of connected members in a group
+ *
+ * @return             Returns number of connected members in the group
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ */
+int _vc_core_cm_get_connected_member_count_ingroup(call_vc_manager_t *pMng, int nGroup);
+
+/**
+ * This function retrieves the call object info of a given group and object position
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ * @param[out] pcall_object    Pointer to the call object info structure
+ */
+gboolean _vc_core_cm_get_call_info_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+ * This function retrieves the call state of a given group and object position
+ *
+ * @return             Returns call state of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ */
+voicecall_call_state_t _vc_core_cm_get_call_state_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos);
+
+/**
+ * This function retrieves the call handle of a given group and object position
+ *
+ * @return             Returns call handle of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ */
+call_vc_handle _vc_core_cm_get_call_handle_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos);
+
+/**
+ * This function retrieves the call handle of a given call ID
+ *
+ * @return             Returns call handle of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callID          Call ID for a given call object
+ */
+call_vc_handle _vc_core_cm_get_call_handle_ingroup_bycallId(call_vc_manager_t *pMng, int callID);
+
+/**
+ * This function checks if connected call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        call_vc_cm_outgoing_call_exist, _vc_core_cm_isexists_incoming_call
+ */
+gboolean _vc_core_cm_isexists_connected_call(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the group state for a given call ID of an
+ *
+ * @return             This function returns the group state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callID          The call ID of the object
+ */
+call_vc_groupstate_t _vc_core_cm_get_group_state_callid(call_vc_manager_t *pMng, int callID);
+
+/**
+ * This function retrieves the call handle of the first active call
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @see                        _vc_core_cm_get_next_active_call_handle
+ */
+int _vc_core_cm_get_first_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall);
+
+/**
+ * This function retrieves the call handle of the first held call
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @see                        _vc_core_cm_get_next_held_call_handle
+ */
+int _vc_core_cm_get_first_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall);
+
+/**
+ * This function retrieves the next active call handle
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @param[in]          nPos                    Current position of the call object index
+ * @see                        _vc_core_cm_get_first_active_call_handle
+ */
+int _vc_core_cm_get_next_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos);
+
+/**
+ * This function retrieves the next held call handle
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @param[in]          nPos                    Current position of the call object index
+ * @see                        _vc_core_cm_get_first_held_call_handle
+ */
+int _vc_core_cm_get_next_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos);
+
+/**
+ * This function checks if active call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexists_held_call
+ */
+gboolean _vc_core_cm_isexists_active_call(call_vc_manager_t *pMng);
+
+/**
+ * This function checks if held call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexists_active_call
+ */
+gboolean _vc_core_cm_isexists_held_call(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the number of active calls
+ *
+ * @return             Returns number of active calls
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_call_count
+ */
+int _vc_core_cm_get_active_call_count(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the number of held calls
+ *
+ * @return             Returns number of held calls
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_call_count
+ */
+int _vc_core_cm_get_held_call_count(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the group index of active calls
+ *
+ * @return             Returns the group index
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_group_index
+ */
+int _vc_core_cm_get_active_group_index(call_vc_manager_t *pMng);
+
+/**
+ * This function retrieves the group index of held calls
+ *
+ * @return             Returns the group index
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_active_group_index
+ */
+int _vc_core_cm_get_held_group_index(call_vc_manager_t *pMng);
+
+/**
+ * This function changes the state of the given onject info
+ *
+ * @return             void
+ * @param[in]          info                    Pointer to the call object into structure for which the state has to be changed
+ * @param[in]          callState               State that needs to be set
+ */
+void inline _vc_core_cm_change_call_state(call_vc_call_objectinfo_t *info, voicecall_call_state_t callState);
+
+/**
+ * This function dumps the complete information in the call manager
+ *
+ * @return             void
+ * @param[in]          info            Pointer to the call manager structure
+ */
+void _vc_core_cm_test_dump(call_vc_manager_t *info);
+
+/*========================================================================================*/
+/**
+ * This function retrieves the number of call members in various states of a call
+ *
+ * @return             Number of call members available
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_call_member_count(call_vc_manager_t *pMng);
+
+#ifdef UNUSED_APIS
+unsigned long call_vc_cm_search_oldcall(call_vc_manager_t *pMng, gboolean activegroup);
+unsigned long call_vc_cm_search_next_oldcall(call_vc_manager_t *pMng, gboolean activegroup, call_vc_handle call_handle);
+unsigned long call_vc_cm_gp_get_calltm_connected(call_vc_manager_t *pMng, int nGroup, int nPos);
+gboolean call_vc_cm_search_activecall(call_vc_manager_t *pMng, call_vc_handle call_handle);
+gboolean call_vc_cm_search_activecall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle);
+gboolean call_vc_cm_search_holdcall(call_vc_manager_t *pMng, call_vc_handle call_handle);
+gboolean call_vc_cm_search_holdcall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle);
+#endif
+
+/**
+* This function retrieves an available call ID
+*
+* @return              Call ID on success, -1 on failure
+* @param[in]           pMng            Pointer to the call manager structure
+*/
+int _vc_core_cm_get_new_callId(call_vc_manager_t *pMng);
+#endif                         /* __VC_CORE_CALL_MANAGER_H_ */
diff --git a/call-engine/core/include/vc-core-ccbs.h b/call-engine/core/include/vc-core-ccbs.h
new file mode 100755 (executable)
index 0000000..338158a
--- /dev/null
@@ -0,0 +1,58 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef __VC_CORE_CCBS_H_\r
+#define __VC_CORE_CCBS_H_\r
+\r
+#include "vc-core-util.h"\r
+#include "vc-core-callagent.h"\r
+\r
+#ifdef _CCBS_DEFINED_\r
+/**\r
+ * This function initializes the CCBS info\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ */\r
+gboolean call_vc_init_ccbs_info(call_vc_callagent_state_t *pcall_agent);\r
+#endif\r
+\r
+/**\r
+ * This function checks if CCBS info is possible or not\r
+ *\r
+ * @return             Returns TRUE if possible and FALSE if not possible\r
+ */\r
+gboolean call_vc_ccbs_info_possible(call_vc_callagent_state_t *pcall_agent);\r
+\r
+/**\r
+ * This function adds one CCBS information\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ * @param[in]          pCcbsInfo       Pointer to the CCBS info structure\r
+ * @see                        call_vc_delete_oneccbs_info\r
+ */\r
+/*gboolean call_vc_add_oneccbs_info(call_vc_callagent_state_t *pcall_agent,tapi_call_ccbs_info_t *pCcbsInfo );*/\r
+\r
+/**\r
+ * This function deletes one CCBS information\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ * @param[in]          ccbsIndex       Index of the CCBS info to be deleted\r
+ * @see                        call_vc_add_oneccbs_info\r
+ */\r
+gboolean call_vc_delete_oneccbs_info(call_vc_callagent_state_t *pcall_agent, int ccbsIndex);\r
+\r
+#endif                         /* __VC_CORE_CCBS_H_ */\r
diff --git a/call-engine/core/include/vc-core-engine-group.h b/call-engine/core/include/vc-core-engine-group.h
new file mode 100755 (executable)
index 0000000..9794c8e
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_ENGINE_GROUP_H_
+#define __VC_CORE_ENGINE_GROUP_H_
+
+#include "vc-core-engine-types.h"
+#include "vc-core-error.h"
+
+/**
+* This function retrieves the number of connected call members in the given group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index             Group index of the group
+* @param[out]  pmember_num     Pointer to the retrieved number of connected members
+* @remarks             pvoicecall_agent and pmember_num cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_connected_member_count(voicecall_engine_t *pvoicecall_agent, int group_index, int *pmember_num);
+
+/**
+* This function retrives the number of groups in which atleast one call member is available
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pnum_enabled_group      Pointer to the number of enabled groups
+* @remarks             pvoicecall_agent and pnum_enabled_group cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_enabled_group_count(voicecall_engine_t *pvoicecall_agent, int *pnum_enabled_group);
+
+/**
+* This function retrieves the group indices of active and held calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pact_grp_index  Set to the group index of active calls
+* @param[out]  pheld_grp_index Set to the group index of held calls
+* @remarks             pvoicecall_agent, pact_grp_index and pheld_grp_index cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_group_indices(voicecall_engine_t *pvoicecall_agent, int *pact_grp_index, int *pheld_grp_index);
+
+/**
+* This function retrieves the call handle of the call member given its groupe index and position in the group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index     Group index of the group
+* @param[in]   pos             Position of the call in the group
+* @param[out]  pcall_handle    Pointer to the call handle to be retrieved
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_call_handle_byposition(voicecall_engine_t *pvoicecall_agent, int group_index, int pos, int *pcall_handle);
+
+/**
+* This function checks if connected call exists in a given group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index             Group index of the group
+* @param[out]  bcall_exists            Contains TRUE if call exists in the given group, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_exists cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_isexists_connected_call_ingroup(voicecall_engine_t *pvoicecall_agent, int group_index, gboolean * bcall_exists);
+
+#endif                         /*__VC_CORE_ENGINE_GROUP_H_*/
diff --git a/call-engine/core/include/vc-core-engine-status.h b/call-engine/core/include/vc-core-engine-status.h
new file mode 100755 (executable)
index 0000000..faf6405
--- /dev/null
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_ENGINE_STATUS_H_
+#define __VC_CORE_ENGINE_STATUS_H_
+
+#include "vc-core-engine-types.h"
+#include "vc-core-error.h"
+
+/**
+* This function checks whether the given incoming call is a restricted call or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of the call to be checked
+* @param[out]  pbrestricted            Pointer to the restricted name mode
+* @remarks             pvoicecall_agent and prestricted cannot be NULL.
+*                              This API shall only be used with the incoming call handle before it is connected
+*/
+voicecall_error_t _vc_core_engine_status_isrestricted_call(voicecall_engine_t *pvoicecall_agent, int call_handle, gboolean *pbrestricted);
+
+/**
+* This function retrieves the call object belongs to the given call handle
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle     Call handle of the call for which the call object is retrieved
+* @param[out]  pcall_object    Pointer to the retrived call object info
+* @remarks             pvoicecall_agent and pcall_object cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_status_get_call_object(voicecall_engine_t *pvoicecall_agent, int call_handle, call_vc_call_objectinfo_t *pcall_object);
+
+/**
+* This function retrieves the inout state of the engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pio_state                       Contains the Engine InOut state on return
+* @remarks             pvoicecall_agent and pio_state cannot be NULL.
+* @see                 _vc_core_engine_change_engine_iostate
+*/
+voicecall_error_t _vc_core_engine_status_get_engine_iostate(voicecall_engine_t *pvoicecall_agent, int *pio_state);
+
+/**
+* This function checks whether connected call exists or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type                       call type
+* @param[out]  bcall_exists            TRUE - if call exists of given given type, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_exists cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_status_isexists_call_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, gboolean *bcall_exists);
+
+/**
+* This function retrieves the total number of call members available with the engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[out]  ptotal_call_member      Contains the total call member availalbe in engine on return
+* @remarks             pvoicecall_agent and ptotal_call_member cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_member_count(voicecall_engine_t *pvoicecall_agent, int *ptotal_call_member);
+
+/**
+* This function retrieves the total number of call members with the given connected call type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[in]   connected_call_type     connected call type
+* @param[out]  pmember_num             Contains the number of call members available with the given connected call type on return
+* @remarks             pvoicecall_agent and pmember_num cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_member_info(voicecall_engine_t *pvoicecall_agent, voicecall_connected_call_type_t connected_call_type, int *pmember_num);
+
+/**
+* This function retrieves the call handle according to the given call type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type               call type
+* @param[out]  pcall_handle    Contains the call handle on success
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+*                              In case of multiple connected calls available, it will retreive the first connected call
+*/
+voicecall_error_t _vc_core_engine_status_get_call_handle_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, int *pcall_handle);
+
+/**
+* This function checks if active calls and/or held call exists or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pactive_calls           Set to TRUE if active calls exist
+* @param[out]  pheld_calls             Set to TRUE if held calls exist
+* @remarks             pvoicecall_agent,pactive_calls and pheld_calls cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isexists_any_call(voicecall_engine_t *pvoicecall_agent, gboolean *pactive_calls, gboolean *pheld_calls);
+
+/**
+* This function retreives the cphs csp status
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]   csp_service             csp name
+* @param[out]  pbcsp_status            Contains TRUE if given csp service is enabled,FALSE  otherwise
+* @remarks             pvoicecall_agent and pbcsp_status cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_cphs_csp_status(voicecall_engine_t *pvoicecall_agent, voicecall_cphs_csp_service csp_service, gboolean *pbcsp_status);
+
+/**
+* This function checks if the call is emergency call for the given outgoing call index
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to Voicecall Engine
+* @param[in]   mo_call_index           Index of the outgoing call
+* @param[out]  pbemergency_call        Contains TRUE if the call is emergency call,FALSE  otherwise
+* @remarks             pvoicecall_agent and pbemergency_call cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_check_emergency_byindex(voicecall_engine_t *pvoicecall_agent, int mo_call_index, gboolean *pbemergency_call);
+
+/**
+* This function checks and returns the FDN status
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pcall_agent     Handle to Voicecall Engine
+* @param[out]  bfdn_enabled    TRUE - if FDN is enabled, FALSE  otherwise
+* @remarks             pvoicecall_agent and bfdn_anabled cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isenabled_fdn(voicecall_engine_t *pcall_agent, gboolean *bfdn_enabled);
+
+/**
+* This function checks the possiblity of transfering calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to Voicecall Engine
+* @param[out]  pbtransfer_calls        Contains TRUE if call transfer is possible, FALSE otherwise
+* @remarks             pvoicecall_agent and pbtransfer_calls cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_transfer_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbtransfer_calls);
+
+/**
+* This function checks the possiblity of making conference calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]  pbconf_call             Contains TRUE if conference call is possible , FALSE otherwise
+* @remarks             pvoicecall_agent and pbconf_call cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_conf_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbconf_call);
+
+/**
+* This function retreives the call state of the given call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of particular call
+* @param[out]  pcall_state             Contains the call state of the given call handle
+* @remarks             pvoicecall_agent and pcall_state cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_state_byhandle(voicecall_engine_t *pvoicecall_agent, int call_handle, voicecall_call_state_t *pcall_state);
+
+/**
+* This function checks if any call is ending and retrieves its call number if it is ending
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  bcall_ending            TRUE if any call is being ended, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_ending cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_any_call_ending(voicecall_engine_t *pvoicecall_agent, gboolean *bcall_ending);
+
+/**
+* This function checks whther engine is busy in processing any events or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  bbusy   TRUE - if engine is not busy in processing any events, FALSE - otherwise
+* @remarks             pvoicecall_agent and bbusy cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_engine_busy(voicecall_engine_t *pvoicecall_agent, gboolean *bbusy);
+
+/**
+* This function sets the given flag to engine for processing during call end
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   end_flag                        End Flag to be set
+* @remarks             pvoicecall_agent and bsscode cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_set_end_flag(voicecall_engine_t *pvoicecall_agent, voicecall_end_flag_t end_flag);
+
+/**
+* This function checks whether the given string is MMI string or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   pinput_number   Input string to be verified
+* @param[out]  bsscode                 TRUE - if the given string is a valid ss code, FALSE otherwise
+* @remarks             pvoicecall_agent and bsscode cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isvalid_ss_code(voicecall_engine_t *pvoicecall_agent, const char *pinput_number, gboolean *bsscode);
+
+/**
+* This function checks the if it is in zuhause area or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  psat_icon_data  Pointer carrying the zuhause status
+* @remarks             pvoicecall_agent and psat_icon_data cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_zuhause_area(voicecall_engine_t *pvoicecall_agent, gboolean *bzuhause);
+
+voicecall_error_t _vc_core_engine_status_dump_call_details(voicecall_engine_t *pvoicecall_agent);
+
+void _vc_core_engine_status_set_download_call(voicecall_engine_t *pvoicecall_agent, gboolean b_download_call);
+gboolean _vc_core_engine_status_get_download_call(voicecall_engine_t *pvoicecall_agent);
+
+#endif                         /* __VC_CORE_ENGINE_STATUS_H_ */
diff --git a/call-engine/core/include/vc-core-engine-types.h b/call-engine/core/include/vc-core-engine-types.h
new file mode 100755 (executable)
index 0000000..33aff01
--- /dev/null
@@ -0,0 +1,587 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_ENGINE_TYPES_H_
+#define __VC_CORE_ENGINE_TYPES_H_
+
+#include <stdbool.h>
+#include <glib.h>
+
+/**< This is the prototype of the client callback function  */
+typedef gboolean(*voicecall_cb) (int event, int param1, int param2, void *param3, void *puser_data);
+
+/**
+ * This opaque structure is the interface for the client application to communicate to the engine
+ */
+typedef struct _voicecall_engine_t voicecall_engine_t;
+
+/**< General Macro Definitions  */
+#define TAG_CALL                                               "CALL"
+#define        TAG_CALL_LAUNCH                                 "VCKPI"
+#define VC_DISPLAY_NAME_LENGTH_MAX             (255+1)                 /**< Voiecall Display Name Max Length  */
+#define VC_IMAGE_PATH_LENGTH_MAX               (255+1)                 /**< Max File length for image */
+#define VC_RINGTONE_PATH_LENGTH_MAX            (255+1)                 /**< Max File length for Ringtone */
+#define        VC_DATA_LENGTH_MAX                              (255+1)                 /**< Max data length for misc */
+#define VC_PHONE_NUMBER_LENGTH_MAX             (82+1)                  /**< Maximum length of a phone number  */
+#define VC_PHONE_NAME_LENGTH_MAX               (80+1)  /**< Maximum length of a calling name  */
+#define VC_PHONE_SUBADDRESS_LENGTH_MAX (40+1)  /**< Maximum length of a SUB address  */
+#define VC_MAX_CALL_GROUP_MEMBER               5                       /**< Maximum number of members in a group */
+#define        VC_MAX_CALL_MEMBER                              8                       /**< This is the maximum number of members possible */
+#define VC_INVALID_CALL_ID                             0                       /**< This is the invalid entry for call ID */
+#define VC_MAX_CALL_ID                                 7                       /**< Maximum Allowed Call IDS (1 -7) (5 Conf Calls, 1 Other Connected Call and 1 Outgoing/Incoming Call)*/
+
+#define VC_AOC_CURRENCY_CODE_LEN_MAX   3                       /**< Max Length of the AOC Currency Code */
+
+#define        VC_INVALID_CALL_INDEX                   -1
+#define VC_INVALID_CALL_COST                   -1
+#define        VC_INVALID_PPM                                  -1
+
+#define VC_TAPI_INVALID_CALLHANDLE             -1
+#define VC_RQSTID_DEFAULT                              -1              /**< To collect request ID of Async TAPI request*/
+
+#define VC_ED_HANDLE                                   0
+#define        VC_SAT_ICON_SIZE                                (64*64)
+
+#define VC_EMERGENCY_NUM_MAX                   8
+
+#define VC_RECORD_FULL_FILE_PATH_LENGTH (4095+1)
+#ifndef VC_NO_ERROR
+#define VC_NO_ERROR 0
+#endif
+
+#ifndef VC_ERROR
+#define VC_ERROR -1
+#endif
+
+#ifndef VC_INVALID_VOLUME
+#define VC_INVALID_VOLUME -1
+#endif
+/**< General Macro Definitions  */
+
+#ifndef EXPORT_API
+#define EXPORT_API __attribute__((visibility("default")))
+#endif
+
+/**
+ * This enumeration defines the call states
+ */
+typedef enum {
+       VC_CALL_ACCEPT_1,
+       VC_CALL_ACCEPT_2
+} voicecall_accept_choice_t;
+
+/**
+ * This enumeration defines the call states
+ */
+typedef enum {
+       VC_CALL_STATE_NONE,                                     /**< No call state */
+       VC_CALL_STATE_INCOME,                           /**< Incoming state  */
+       VC_CALL_STATE_REJECTED,                         /**< Rejected state */
+       VC_CALL_STATE_PREPARE_OUTGOING, /**< Prepare for outgoing */
+       VC_CALL_STATE_OUTGOING,                         /**< Outgoing state */
+       VC_CALL_STATE_OUTGOING_ORIG,            /**< Outgoing originatged state */
+       VC_CALL_STATE_OUTGOING_ALERT,           /**< Outgoing alert state */
+       VC_CALL_STATE_CANCELLED,                        /**< Cancelled state */
+       VC_CALL_STATE_CONNECTED,                        /**< Connected state */
+       VC_CALL_STATE_RELEASE_WAIT,             /**< Release wait state */
+       VC_CALL_STATE_ENDED,                            /**< Call ended state */
+       VC_CALL_STATE_REDIAL,                           /**< Redial state */
+       VC_CALL_STATE_ENDED_FINISH,             /**< Call ended finish state */
+       VC_CALL_STATE_MAX_NUM                           /**< Max value */
+} voicecall_call_state_t;
+
+/**
+ * This enumeration defines the call setup parties
+ */
+typedef enum {
+       VC_CALL_SETUP_BY_NORMAL,                /**< Normal Call setup */
+       VC_CALL_SETUP_BY_SAT,                   /**< Call setup by SAT */
+       VC_CALL_SETUP_BY_MAILBOX                /**< Call setup by Mail box */
+} voicecall_call_type_bysetup_t;
+
+/**
+ * This enumeration defines the call end cause types
+ */
+typedef enum {
+       VC_ENDCAUSE_CALL_ENDED,                                         /**< Call ended */
+
+       VC_ENDCAUSE_CALL_DISCONNECTED,                          /**< Call disconnected */
+       VC_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED,           /**< Service not allowed */
+       VC_ENDCAUSE_CALL_BARRED,                                                /**< Call barred */
+       VC_ENDCAUSE_NO_SERVICE,                                         /**< No Service */
+       VC_ENDCAUSE_NW_BUSY,                                                    /**< Network busy */
+
+       VC_ENDCAUSE_NW_FAILED,                                          /**< Network failed */
+       VC_ENDCAUSE_NO_ANSWER,                                          /**< No anwer from other party */
+       VC_ENDCAUSE_NO_CREDIT,                                          /**< No credit available */
+       VC_ENDCAUSE_REJECTED,                                                   /**< Call rejected */
+       VC_ENDCAUSE_USER_BUSY,                                          /**< user busy */
+
+       VC_ENDCAUSE_WRONG_GROUP,                                        /**< Wrong group */
+       VC_ENDCAUSE_CALL_NOT_ALLOWED,                           /**< Call not allowed */
+       VC_ENDCAUSE_TAPI_ERROR,                                         /**< Tapi error */
+       VC_ENDCAUSE_CALL_FAILED,                                                /**< Call Failed */
+       VC_ENDCAUSE_NO_USER_RESPONDING,                         /**< User not responding */
+
+       VC_ENDCAUSE_USER_ALERTING_NO_ANSWER,            /**< User Alerting No Answer */
+       VC_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE,           /**< Circuit Channel Unavailable,Network is out of Order,Switching equipment congestion,Temporary Failure */
+       VC_ENDCAUSE_USER_UNAVAILABLE,                           /**< Called Party Rejects the Call */
+       VC_ENDCAUSE_INVALID_NUMBER_FORMAT,                      /**< Entered number is invalid or incomplete */
+       VC_ENDCAUSE_NUMBER_CHANGED,                             /**< Entered number has been changed */
+
+       VC_ENDCAUSE_UNASSIGNED_NUMBER,                          /**< Unassigned/Unallocated number*/
+       VC_ENDCAUSE_USER_DOESNOT_RESPOND,                       /**< Called Party does not respond*/
+       VC_ENDCAUSE_IMEI_REJECTED,                      /**< Called Party does not respond*/
+       /*VC_ENDCAUSE_SWITCHING_EQUIPMENT_CONGESTION,     /**<  Switching Equipment Congestion       : 20090627 match as NW_BUSY*/
+} voice_call_end_cause_type_t;
+
+/**
+* This enumeration defines the call types used to end the calls in end call API
+*/
+typedef enum {
+       VC_END_OUTGOING_CALL,                   /**< To end only mobile originated outgoing call*/
+       VC_END_INCOMING_CALL,                           /**< To end only mobile terminated incoming call*/
+       VC_END_ACTIVE_OR_HELD_CALLS,            /**< To end first active call if available or to end end held call*/
+       VC_END_ALL_ACTIVE_CALLS,                        /**< To end all available active calls*/
+       VC_END_ALL_HELD_CALLS,                  /**< To end all available held calls*/
+       VC_END_ALL_CALLS                                        /**< To end all available calls(active,held,incoming/outgoing*/
+} _vc_core_engine_end_call_type_t;
+
+/**
+* This enumeration defines flags to be used with _vc_core_engine_status_set_end_flag
+*/
+typedef enum {
+       VC_RETREIVE_CALL_ON_MOCALL_END  /**< To be used before ending the mo call to retrieve the held call on mo call end if held call is available*/
+} voicecall_end_flag_t;
+
+/**
+ * This enum defines the different call types by source of origination of call
+ */
+typedef enum {
+       VC_CALL_ORIG_TYPE_NORMAL,                                               /**< Normal Call */
+       VC_CALL_ORIG_TYPE_EMERGENCY,                                            /**< Emergency Call*/
+       VC_CALL_ORIG_TYPE_VOICEMAIL,                                            /**< Voiece Mail Call*/
+       VC_CALL_ORIG_TYPE_SAT,                                                  /**< SAT Requested Call*/
+       VC_CALL_ORIG_TYPE_NOSIM,                                                        /**< Emergency Call with out SIM*/
+       VC_CALL_ORIG_TYPE_PINLOCK                                               /**< Emergency Call with Pin Lock*/
+} voicecall_call_orig_type_t;
+
+/**
+ * This enum defines the different call types to be used with the assiociated APIs
+ */
+typedef enum {
+       VC_INCOMING_CALL,                       /**< Mobile Terminated Call*/
+       VC_OUTGOING_CALL,                       /**< Mobile Originated Call*/
+       VC_CONNECTED_CALL                       /**< Connected Call (Both Parties Connected)*/
+} voicecall_call_type_t;
+
+/**
+* This enum defines the type of calls being termed once the calls are connected
+*/
+typedef enum {
+       VC_ACTIVE_CALL,         /**< Connected calls in active state*/
+       VC_HELD_CALL                    /**< Connected calls in held state*/
+} voicecall_connected_call_type_t;
+
+/**
+ * This enum defines alternate line service types
+ */
+typedef enum {
+       VC_CALL_CPHS_ALS_NONE,                                          /**< No ALS */
+       VC_CALL_CPHS_ALS_LINE1,                                         /**< Line 1*/
+       VC_CALL_CPHS_ALS_LINE2                                          /**< Line 2 */
+} voice_call_cphs_alsline_t;
+
+/**
+ * This enum defines the call group states
+ */
+typedef enum {
+       CALL_VC_GROUP_STATE_NONE,                                       /**< Group State Not Exist */
+       CALL_VC_GROUP_STATE_ACTIVE,                                     /**< Active group state */
+       CALL_VC_GROUP_STATE_HOLD                                        /**< Hold group state */
+} call_vc_groupstate_t;
+
+/**
+ * This enum defines the mobile originated call states
+ */
+typedef enum {
+       VC_MOCALL_STATE_NONE,                                           /**< MO State Not Exist */
+       VC_MOCALL_STATE_END,                                                    /**< MO State End */
+       VC_MOCALL_STATE_CANCEL,                                         /**< MO State Cancel */
+       VC_MOCALL_STATE_DESTROY                                         /**< MO State Destroy */
+} voice_call_mocall_state_t;
+
+#ifdef _CALL_LONG_DTMF
+/**
+ * This enum defines dtmf buffer states
+ */
+typedef enum {
+       CALL_VC_DTMF_BUF_NONE,                                  /**< Buffer state Not Exist */
+       CALL_VC_DTMF_BUF_START,                                 /**< Buffer start */
+       CALL_VC_DTMF_BUF_RECEIVED_START_ACK,    /**< Reveived start acknowledgement */
+       CALL_VC_DTMF_BUF_WAIT_STOP_ACK                  /**< Wait stop acknowledgement */
+} call_vc_dtmf_bufferstate_t;
+#endif
+
+/**
+* This enum defines vc engine sat mo call ctrl response type
+*/
+typedef enum __voicecall_engine_sat_mo_call_ctrl_res {
+       CALL_ALLOWED_NO_MOD,                                            /**< Call Allowed without any modification in the caller details */
+       CALL_NOT_ALLOWED,                                                       /**< Call Not Allowed - (User should be notified) */
+       CALL_ALLOWED_WITH_MOD,                                  /**< Call Allowed with modification in the caller details- (UI should be updated) */
+       CALL_CHANGED_TO_SS                                              /**< Call number modified to SS String */
+} voicecall_engine_sat_mo_call_ctrl_res;
+
+/**
+ * This enum defines sat request response types
+ */
+typedef enum __voicecall_engine_sat_rqst_resp_type {
+       SAT_RQST_SETUP_CALL,                                            /**< Sat setup call request */
+       SAT_RQST_SEND_DTMF,                                             /**< Sat send dtmf request */
+       SAT_RESP_SETUP_CALL                                             /**< Sat setup call response */
+} voicecall_engine_sat_rqst_resp_type;
+
+/**
+ * This enum defines voicecall engine callback event types
+ */
+typedef enum _voicecall_engine_event_t {
+       /* Tapi Call Related Event Types */
+       VC_CALL_INCOM,                                                          /**< Incoming call */
+       VC_CALL_OUTGOING,                                                       /**< Outgoing call. This event will be sent, when outgoing deferred and made after some time */
+       VC_CALL_OUTGOING_ORIG,                                  /**< Outgoing call originated */
+       VC_CALL_OUTGOING_ALERT,                                 /**< Outgoing alert call */
+       VC_CALL_CONNECTED,                                              /**< Call connected */
+       VC_CALL_NORMAL_END,                                             /**< Normal end */
+       VC_CALL_INCOM_END,                                              /**< Incoming call end */
+       VC_CALL_INCOM_DROPPED,                                  /**< Incoming call ended before it is being precessed by the engine */
+       VC_CALL_REJECTED_END,                                           /**< Rejected call end */
+       VC_CALL_OUTGOING_END,                                   /**< Outgoing call end */
+       VC_CALL_OUTGOING_ABORTED,                               /**< Outgoing call ended before making the call to the NW */
+       VC_CALL_DTMF_ACK,                                                       /**< DTMF Acknowledgement */
+       VC_CALL_AUTO_REDIAL_CHECK,                              /**< Auto Redial Check */
+       VC_CALL_ANSWER_CNF,                                             /**< Answer confirm */
+
+       /*Tapi Call Dependent SS related events */
+       VC_CALL_SS_HELD,                                                        /**< SS Held */
+       VC_CALL_SS_RETREIVED,                                           /**< SS Retriebved */
+       VC_CALL_SS_SWAP,                                                        /**< SS call swap */
+       VC_CALL_SS_SETUP_CONF,                                  /**< SS setup conference */
+       VC_CALL_SS_SPLIT_CONF,                                  /**< SS Split conference */
+       VC_CALL_SS_TRANSFERRED,                                 /**< SS call transferred */
+       VC_CALL_SS_CONNECT_LINE_IND,                            /**< SS connectect line indication */
+
+       /*Tapi Call SS Indication Related Events */
+       VC_CALL_IND_FORWARD,                                            /**< Call forward */
+       VC_CALL_IND_ACTIVATE,                                           /**< Activate call */
+       VC_CALL_IND_HOLD,                                                       /**< Hold call */
+       VC_CALL_IND_TRANSFER,                                           /**< Call transfer */
+       VC_CALL_IND_SETUPCONFERENCE,                            /**< Setup conference */
+       VC_CALL_IND_BARRING,                                            /**< Call barring */
+       VC_CALL_IND_WAITING,                                            /**< Call waiting */
+       VC_CALL_IND_CUGINFO,                                            /**< Closed User Group information */
+       VC_CALL_IND_SSNOTIFY,                                           /**< SS nofify */
+       VC_CALL_IND_CALLINGNAMEINFO,                            /**< Caller name information */
+       VC_CALL_IND_REDIRECT_CNF,                                       /**< Redirect confirmation */
+       VC_CALL_IND_ACTIVATECCBS_CNF,                   /**< Activate CCBS confirmation */
+       VC_CALL_IND_ACTIVATECCBS_USERINFO,              /**< Activate CCBS user information */
+       VC_CALL_IND_AOC,                                                        /**< AOC indication */
+
+       /*Tapi Response Error Related Events */
+       VC_ERROR_OCCURED,                                                       /**< Error */
+
+       /* Voicecall Engine triggered Event Type */
+       VC_ACTION_INCOM_FORCE,  /**< If any outgoing data needs to be destroyed or cleaned up in the client during an incoming call, this event will be sent */
+       VC_ACTION_SAT_REQUEST,  /**< SAT Request. This event will be sent to client , when SAT Engine requests any service from voicecall. Voicecall Engine holds the SAT engine related information, clients can get the information from the engine when it is required */
+       VC_ACTION_SAT_RESPONSE, /**< SAT Response */
+       VC_ACTION_CALL_END_HELD_RETREIVED,      /**< If a held call is being retreived on end of an active call, this event will be emitted */
+       VC_ACTION_NO_ACTIVE_TASK,                       /**< This event will be published when engine becomes idle after executing/aborting a request from other apps - eg) if SAT request is not processed*/
+
+       VC_CALL_GET_VOLUME_RESP,                        /**< Response data from tapi for get tapi sound volume*/
+       VC_ENGINE_EVENT_MAX
+} voicecall_engine_event_t;
+
+/**
+ * This enum defines call forwarding indication types
+ */
+typedef enum _voicecall_forward_ind_type_t {
+       VC_FRWD_IND_INCOM_IS_FRWD,                                      /**< Is incoming call a forwarded call? */
+       VC_FRWD_IND_INCOM_FRWD,                                         /**< Incoming call Forwarded */
+       VC_FRWD_IND_OUTGOING_FRWD                                       /**< Outgoing call Forwarded */
+} voicecall_forward_ind_type_t;
+
+/**
+ * This enum defines call barring indication types
+ */
+typedef enum _voicecall_barr_ind_type_t {
+       VC_BARR_IND_NONE,                                                               /**< No call barring indication */
+       VC_BARR_IND_ALL,                                                                /**< Barring all outgoing and incoming calls */
+       VC_BARR_IND_BAOC,                                                               /**< Bar All Outgoing Calls indication */
+       VC_BARR_IND_BOIC,                                                               /**< Bar Outgoing International Calls indication */
+       VC_BARR_IND_BOIC_EXHC,                                          /**< Bar Outgoing International Calls EXcept Home Calls indication */
+       VC_BARR_IND_BAIC,                                                               /**< Bar All Incoming Calls indication */
+       VC_BARR_IND_BICROAM                                                     /**< Bar Incoming Calls when ROAMing indication */
+} voicecall_barr_ind_type_t;
+
+/**
+ * This enum defines supplementary services notificatoin indication types
+ */
+typedef enum _voicecall_ssnotify_ind_type_t {
+       VC_SSNOTIFY_IND_CFU,                                                    /**<  SS CFU indication */
+       VC_SSNOTIFY_IND_CFB,                                                    /**<  SS CFB indication */
+       VC_SSNOTIFY_IND_CFNRY,                                          /**<  SS CFNRY indication */
+       VC_SSNOTIFY_IND_CFNRC,                                          /**<  SS CFNRC indication */
+       VC_SSNOTIFY_IND_CLIR,                                                   /**<  SS CLIR indication */
+       VC_SSNOTIFY_IND_ALL_COND_FORWARDING,            /**<  SS all condtional call forwarding indication */
+       VC_SSNOTIFY_IND_BARRING_OF_OUTGOING             /**<  SS Outging call baring indication */
+} voicecall_ssnotify_ind_type_t;
+
+/**
+ * This enum defines engine/ Input Output sate of call agent
+ */
+typedef enum {
+       VC_INOUT_STATE_NONE,                                                                    /**<  I/O state none */
+       VC_INOUT_STATE_OUTGOING_START,                                          /**< Outgoing enum value start */
+       VC_INOUT_STATE_OUTGOING_WAIT_HOLD,                                      /**< Outgoing wait for hold */
+       VC_INOUT_STATE_OUTGOING_WAIT_ORIG,                                      /**< Outgoing wait for Origination event */
+       VC_INOUT_STATE_OUTGOING_WAIT_ALERT,                                     /**< Outgoing wait alert */
+       VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED,                         /**< Outgoing wait connected */
+       VC_INOUT_STATE_OUTGOING_WAIT_RELEASE,                           /**< Outgoing wait release */
+       VC_INOUT_STATE_OUTGOING_ABORTED,                                                /**< Outgoing call aborted */
+       VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE,                       /**< Outgoing show redial cause */
+       VC_INOUT_STATE_OUTGOING_WAIT_REDIAL,                                    /**< Outgoing wait redial */
+       VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX,                     /**< Outgoing showing retry call box : not used*/
+       VC_INOUT_STATE_OUTGOING_END,                                                    /**< Outgoing enum value end */
+
+       VC_INOUT_STATE_INCOME_SELFEVET_WAIT,    /**< Incoming waiting for self event : not used*/
+       VC_INOUT_STATE_INCOME_START,                                                    /**< Incoming enumvalue start */
+       VC_INOUT_STATE_INCOME_BOX,                                                              /**< Incoming box */
+       VC_INOUT_STATE_INCOME_WAIT_REDIRECTCNF, /**< Incoming wait for redirect confirmation : not used*/
+       VC_INOUT_STATE_INCOME_WAIT_REDIRECT_END,        /**< Incoming wait for redirect end : not used*/
+       VC_INOUT_STATE_INCOME_WAIT_CONNECTED,                           /**< Incoming wait connected */
+       VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED,                      /**< Incoming wait for hold and then connected event */
+       VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED, /**< Incoming wait for release and then connected event */
+       VC_INOUT_STATE_INCOME_WAIT_HOLD,        /**< Incoming wait hold : not used*/
+       VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVECALL,          /**< Incoming wait release active call */
+       VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL,            /**< Incoming wait release hold call */
+#ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
+       VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL_FOR_ALL_RELEASE,    /**< Incoming wait release hold call in case of release all and accept */
+#endif
+       VC_INOUT_STATE_INCOME_WAIT_RELEASE,                                     /**< Incoming wait release call */
+       VC_INOUT_STATE_INCOME_END,                                                      /**< Incoming enum value end */
+       VC_INOUT_STATE_MAX_NUM                                                          /**< Max value */
+} voicecall_inout_state_t;
+
+/**
+ * This enum defines call answer types
+ */
+typedef enum _voicecall_answer_type_t {
+       VC_ANSWER_NORMAL,                                               /**< Accepts the call in normal scenario(Only CONNECTED will be sent to the client) */
+       VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT,               /**< Puts the active call on hold and accepts the call (Only CONNECTED will be sent to client) */
+       VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT,    /**< Releases the active call and accept the call (END and CONNECTED will be sent to Client) */
+       VC_ANSWER_RELEASE_HOLD_AND_ACCEPT,      /**< Releases the active call and accept the call (END and  CONNECTED will be sent to client) */
+#ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
+       VC_ANSWER_RELEASE_ALL_AND_ACCEPT                /**< Releases the all calls and accept the call (END and  CONNECTED will be sent to client) */
+#endif
+} voicecall_answer_type_t;
+
+/**
+ * This enum defines the cphs csp status names
+ */
+typedef enum _voicecall_cphs_csp_service {
+       /**< CPHS Teleservice*/
+       VC_CPHS_CSP_ALS,                /**<Alternate Line Service*/
+
+       /**< Call completion service*/
+       VC_CPHS_CSP_HOLD,               /**<Call Hold*/
+       VC_CPHS_CSP_CW,         /**<Call Waiting*/
+       VC_CPHS_CSP_CBS,                /**<Completion of Call to Busy Subscribe*/
+       VC_CPHS_CSP_UUS,                /**<User User Signalling*/
+
+       /**< Call Offering Service*/
+       VC_CPHS_CSP_CFU,                /**<Call Forwarding Unconditional*/
+       VC_CPHS_CSP_CFB,                /**<Call Forwarding On User Busy*/
+       VC_CPHS_CSP_CFNRY,      /**<Call Forwarding on No Reply*/
+       VC_CPHS_CSP_CFNRC,      /**<Call Forwarding On User Not Reachable*/
+       VC_CPHS_CSP_CT,         /**<Call Transfer*/
+
+       /**< Other Supplementary Service*/
+       VC_CPHS_CSP_MPTY,               /**<Multi-Party Service*/
+       VC_CPHS_CSP_CUG,                /**<Closed User Group*/
+       VC_CPHS_CSP_AOC,                /**<Advice Of Charge*/
+       VC_CPHS_CSP_PREFCUG,    /**<Preferential CUG*/
+       VC_CPHS_CSP_CUGOA       /**<CUG Outgoing Access*/
+} voicecall_cphs_csp_service;
+
+/**
+ * This enum defines audio path values to be used when setting the voicecall audio path
+ */
+typedef enum __voicecall_audio_path_t {
+       VC_AUDIO_PATH_HANDSET,                  /**<Handset normal receiver*/
+       VC_AUDIO_PATH_HEADSET,                  /**<Headset Attached*/
+       VC_AUDIO_PATH_HANDSFREE,                /**<Handsfree Attached*/
+       VC_AUDIO_PATH_BLUETOOTH,                /**<Bluetooth headset Attached*/
+       VC_AUDIO_PATH_STEREO_BLUETOOTH, /**<Bluetooth Stero headset Attached*/
+       VC_AUDIO_PATH_SPK_PHONE,                /**<Handset Speaker Phone receiver*/
+       VC_AUDIO_PATH_HEADSET_3_5PI             /**<Headset */
+} voicecall_audio_path_t;
+
+/**
+ * This enum defines volume level to be used when setting the voicecall volume
+ */
+typedef enum __voicecall_audio_volume_t {
+       VC_AUDIO_VOLUME_LEVEL_0,
+       VC_AUDIO_VOLUME_LEVEL_1,
+       VC_AUDIO_VOLUME_LEVEL_2,
+       VC_AUDIO_VOLUME_LEVEL_3,
+       VC_AUDIO_VOLUME_LEVEL_4,
+       VC_AUDIO_VOLUME_LEVEL_5,
+       VC_AUDIO_VOLUME_LEVEL_6,
+       VC_AUDIO_VOLUME_LEVEL_7,
+       VC_AUDIO_VOLUME_LEVEL_8,
+       VC_AUDIO_VOLUME_LEVEL_9
+} voicecall_audio_volume_t;
+
+/**
+* Closed User Group Details
+*/
+typedef struct __voicecall_cug_info_t {
+       gboolean bcug_used;                             /**<TRUE -if CUG information used ,FALSE otherwise */
+       int cug_index;                                  /**< CUG Index Value */
+       gboolean bpref_cug;                             /**<TRUE-if preferential CUG capablity available, FALSE otherwise */
+       gboolean boa_cug;                               /**<TRUE -if Outgoing Access capablity available, FALSE otherwise */
+} voicecall_cug_info_t;
+
+/**
+ * This struct provides a structure for call setup info data.
+ */
+typedef struct _voicecall_setup_info_t {
+       voicecall_call_type_bysetup_t call_setup_by;                                                    /**<defines source of the call setup*/
+       voicecall_call_orig_type_t call_type;                                                                                   /**<  Call type */
+       char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                     /**<  Telephone number */
+       char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                    /**<  Telephone number */
+       int mo_call_index;                                                                                                                      /**< Outgoing call index */
+       voicecall_cug_info_t cug_info;                                                                                          /**< CUG Details */
+       int identity_mode;                                                                                                              /**< Identity mode, 0 - default, 1-show, 2-hide */
+       int ecc_category;                                                                                                               /**< ecc category*/
+} voicecall_setup_info_t;
+
+/**
+ * This enumeration defines name mode to be verified dueing an incoming call
+ */
+typedef enum {
+       CALL_VC_NAME_MODE_UNAVAILABLE = 0x00,   /**<  Caller Name Unavailable*/
+       CALL_VC_NAME_MODE_REJECT = 0x01,                /**<  Caller Name Rejected by the caller*/
+       CALL_VC_NAME_MODE_INTERACTION = 0x02,   /**<  Caller Name Unavailable*/
+       CALL_VC_NAME_MODE_PAYPHONE = 0x03,              /**<  Caller using Payphone*/
+       CALL_VC_NAME_MODE_MAX
+} call_vc_name_mode_t;
+
+/**
+ * This enumeration defines calling name mode to be verified dueing an incoming call
+ */
+typedef enum {
+       CALL_VC_CALLING_NAME_MODE_AVAILABLE,    /**<  Calling Name Unavailable*/
+       CALL_VC_CALLING_NAME_MODE_RESTRICTED,           /**<  Calling Name restricted by the caller*/
+       CALL_VC_CALLING_NAME_MODE_UNAVAILABLE,  /**<  Calling Name Unavailable*/
+       CALL_VC_CALLING_NAME_MODE_AVAILABLE_RESTRICTED,         /**<  Calling name is available but restricted*/
+       CALL_VC_CALLING_NAME_MODE_MAX
+} call_vc_calling_name_mode_t;
+
+/**
+ * This structure defines the members of call object
+ */
+typedef struct _call_vc_call_objectinfo_t {
+       /*Fields from TAPI */
+       int call_handle;                                                                                                                                /**< Call Handle */
+       float aoc_ccm;                                                                                                                                  /**< AOC Current Call Meter */
+       char aoc_currency[VC_AOC_CURRENCY_CODE_LEN_MAX + 1];                                            /**< AOC Currency Code */
+#ifdef _CPHS_DEFINED_
+       voice_call_cphs_alsline_t als_type;                                                                                     /**< Alternate Line Service Type */
+#endif
+
+       /*Engine Fields */
+       int call_id;                                                                                                                                    /**< Call ID */
+
+       /* Call Object Status Flags */
+       gboolean bemergency_number;                                                                                                     /**< emergency call? */
+       gboolean bused_sim;                                                                                                                             /**< used sim? */
+       gboolean mo;                                                                                                                            /**< Mobile originated call? */
+       gboolean bccbs_call;                                                                                                                    /**< CCBS call? */
+       gboolean brestricted_namemode;                                                                                          /**< Name mode Restricted? */
+       call_vc_name_mode_t name_mode;                                                                                  /**< Name mode when BDC number doesn't exist */
+       call_vc_calling_name_mode_t bcalling_namemode;                                                  /**< Name mode of calling name information */
+
+       /*Caller Details */
+/*PDIAL_SEND_DTMF*/
+       char source_tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                             /**< Source Telephone number */
+/*PDIAL_SEND_DTMF*/
+       char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];                                            /**< Telephone number */
+       char calling_name[VC_PHONE_NAME_LENGTH_MAX];                                            /**< Calling part name */
+       char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];                                           /**< DTMF number */
+       char connected_telnumber[VC_PHONE_NUMBER_LENGTH_MAX];                                   /**< Changed number to be connected by call forwarding */
+       char connected_name[VC_PHONE_NUMBER_LENGTH_MAX];                                        /**< Changed name to be connected by call forwarding  */
+
+       /*Call State Flags */
+       voice_call_end_cause_type_t end_cause_type;                                                     /**< End cause type */
+       voicecall_call_state_t state;                                                                                                   /**< Call State */
+       voicecall_call_orig_type_t call_type;                                                                                           /**< Call Type */
+
+       /*CUG Flags */
+       voicecall_cug_info_t cug_info;                                                                                          /**< Closed User Group Details */
+
+       /*Idendity Mode */
+       int identity_mode;                                                                                                              /**< Show My Number Mode, 0-Default,1-Show, 2- Hide */
+       gboolean bincoming_call_is_fwded;
+
+       int ecc_category;                                                                                               /**< emergency category(see the TelSimEccEmergencyServiceInfo_t or TelCallEmergencyCategory_t)*/
+} call_vc_call_objectinfo_t;
+
+/**
+ * Structure for SAT call info
+ */
+typedef struct {
+       char disp_text[VC_PHONE_NUMBER_LENGTH_MAX];                                                             /**< Display text */
+       char call_number[VC_PHONE_NUMBER_LENGTH_MAX];                                                           /**< Call NUmber */
+       unsigned int duration;                                                                                                          /**< Duration of call */
+       int sat_mo_call_ctrl_res;
+       gboolean bicon_present;
+       gboolean bsat_hidden;
+} voicecall_sat_callinfo_t;
+
+/**
+ * Structure to hold the SAT Icon Details
+ */
+typedef struct {
+       int width;                                      /**< Width of the SAT icon being held by the engine */
+       int height;                                     /**< Height of the SAT icon being held by the engine */
+       guchar *psat_icon_data;         /**< SAT icon Raw Data */
+} voicecall_sat_call_icon_data_t;
+
+/**
+ * This enumeration defines SAT reponse types
+ */
+typedef enum {
+       CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND,                                           /**< Unable to process command */
+       CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND,                                      /**< Network unable to process command */
+       CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND_WITHOUT_CAUSE,  /**< Network unable to process command without cause */
+       CALL_VC_ME_CONTROL_PERMANENT_PROBLEM,                                                   /**< Control permanent problem */
+       CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN,                                                      /**< Clear down before connection */
+       CALL_VC_ME_RET_SUCCESS                                                                                  /**< Return success */
+} call_vc_sat_reponse_type_t;
+
+#endif                         /*__VC_CORE_ENGINE_TYPES_H_*/
diff --git a/call-engine/core/include/vc-core-engine.h b/call-engine/core/include/vc-core-engine.h
new file mode 100755 (executable)
index 0000000..b3f1469
--- /dev/null
@@ -0,0 +1,380 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_ENGINE_H_
+#define __VC_CORE_ENGINE_H_
+
+#include "vc-core-engine-types.h"
+#include "vc-core-error.h"
+#include "vc-core-engine-group.h"
+#include "vc-core-engine-status.h"
+#include <stdbool.h>
+
+/*Voicecall Engine Exposed API's */
+
+void _vc_core_engine_handle_sat_events_cb(void *sat_setup_call_data, void *userdata);
+
+void _vc_core_engine_handle_incoming_tapi_events(void *mt_data, void *userdata);
+
+/**
+ * This function initializes the voicecall engine
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[out] pcall_agent_out Pointer to the address of call agent
+* @param[in]           pcallback_func  Call back function
+ * @param[in]          puser_data              Data set by user
+* @remarks             pcall_agent_out and pcallback_func cannot be NULL.
+ */
+voicecall_error_t _vc_core_engine_init(voicecall_engine_t **pcall_agent_out, voicecall_cb pcallback_func, void *puser_data);
+
+/**
+* This function prepares the call setup info structure for making call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[in]   psetup_call_info        Pointer to the call setup info structure.
+* @remarks             pvoicecall_agent and psetup_call_info cannot be NULL
+*                              Only on successfull completion of this API, _vc_core_engine_make_call can be made
+* @see                 See following API's also
+*                              -_vc_core_engine_make_call
+*                              -voicecall_clear_prepared_call
+ */
+voicecall_error_t _vc_core_engine_prepare_call(voicecall_engine_t *pvoicecall_agent, voicecall_setup_info_t *psetup_call_info);
+
+/**
+* This function establishes an outgoing call with the details prepared using _vc_core_engine_prepare_call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent    Handle to voicecall engine
+* @param[in]   mo_call_index           Index of the prepare mo call
+* @param[out]  pcall_handle            Handle of the MO Call Made
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+* @see                 _vc_core_engine_end_call
+ */
+voicecall_error_t _vc_core_engine_make_call(voicecall_engine_t *pvoicecall_agent, int mo_call_index, int *pcall_handle);
+
+/**
+* This function answers a call according to the given answer type
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   answer_type             The answer type to be used
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+* @see                 _vc_core_engine_reject_call
+ */
+voicecall_error_t _vc_core_engine_answer_call(voicecall_engine_t *pvoicecall_agent, voicecall_answer_type_t answer_type);
+
+/**
+* This function rejects the incoming call if any
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   budub                   User Determined User Busy - TRUE, Else - FALSE
+* @exception           In case of exceptions return value contains appropriate error code.
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_answer_call
+*/
+voicecall_error_t _vc_core_engine_reject_call(voicecall_engine_t *pvoicecall_agent, gboolean budub);
+
+/**
+* This function ends the call according to the given end call type
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   end_call_type           End Call Type
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call_byhandle
+*                              - _vc_core_engine_end_call_bycallId
+*                              .
+ */
+voicecall_error_t _vc_core_engine_end_call(voicecall_engine_t *pvoicecall_agent, _vc_core_engine_end_call_type_t end_call_type);
+
+/**
+* This function ends only the connected call corresponding to the given call handle
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of the call to be ended
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call
+*                              - _vc_core_engine_end_call_bycallId
+ */
+voicecall_error_t _vc_core_engine_end_call_byhandle(voicecall_engine_t *pvoicecall_agent, int call_handle);
+
+/**
+* This function ends a call corresponding to the given call ID
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_id                 call id of the call to be ended
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call
+*                              - _vc_core_engine_end_call_byhandle
+ */
+voicecall_error_t _vc_core_engine_end_call_bycallId(voicecall_engine_t *pvoicecall_agent, int call_id);
+
+/**
+* This function puts the active call if any on hold
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 voicecall_retreive_call
+ */
+voicecall_error_t _vc_core_engine_hold_call(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function retrieves/activates the held call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_hold_call
+ */
+voicecall_error_t _vc_core_engine_retrieve_call(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function swaps the active and held calls if any available
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_hold_call
+*                              - _vc_core_engine_retrieve_call
+*                              .
+ */
+voicecall_error_t _vc_core_engine_swap_calls(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function does the explicit call transfer
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+ */
+voicecall_error_t _vc_core_engine_transfer_calls(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function sets up a conference beween the currently available active and held calls
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_private_call
+*                              - _vc_core_engine_private_call_by_callid
+*                              .
+ */
+voicecall_error_t _vc_core_engine_setup_conference(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function makes a private call to the given call member from the currently available active conference call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             call handle of the call to be made private
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_setup_conference
+*                              - _vc_core_engine_private_call_by_callid
+*                              .
+ */
+voicecall_error_t _vc_core_engine_private_call(voicecall_engine_t *pvoicecall_agent, int call_handle);
+
+/**
+* This function makes a private call to the call member corressponding to the given call id.
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_id                 Call ID of the call to be made private
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_setup_conference
+*                              - _vc_core_engine_private_call
+*                              .
+ */
+voicecall_error_t _vc_core_engine_private_call_by_callid(voicecall_engine_t *pvoicecall_agent, int call_id);
+
+/**
+* This function sends the given dtmf digits
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   pdtmf_string            dtmf digits to be sent
+* @remarks             pvoicecall_agent and pdtmf_string cannot be NULL
+ */
+voicecall_error_t _vc_core_engine_send_dtmf(voicecall_engine_t *pvoicecall_agent, char *pdtmf_string);
+
+/**
+* This function clears the data of the given call type.
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type       call type
+* @param[in]   call_handle     Call handle of the connected call to be cleared
+* @remarks             This will clear the call data only when the call data are currently not being used
+*                              i,e) the data will be cleared only if the corresponding call is ended or the call data is not used at all.
+*                              call_handle argument is required only in case of connected call, Engine ignores call_handle for other
+*                              call types.
+ */
+voicecall_error_t _vc_core_engine_finalize_call(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, int call_handle);
+
+/**
+* This function changes the inout state of the engine to the given state
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   io_state                        Inout state to be set
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_status_get_engine_iostate
+ */
+voicecall_error_t _vc_core_engine_change_engine_iostate(voicecall_engine_t *pvoicecall_agent, int io_state);
+
+/**
+ * This function extracts the call number from the given number
+ *
+ * @return             ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          source_tel_number               source number
+ * @param[out] phone_number            target number
+ * @param[in]          buf_size                                target number buffer size
+ */
+voicecall_error_t _vc_core_engine_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size);
+
+/**
+* This function finalizes the voiecall engine and removes all allocated resources
+ *
+* @return              nothing
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @remarks             pvoicecall_agent cannot be NULL
+ */
+void _vc_core_engine_engine_finish(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function changes the voice audio path
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path              audio path to be changed
+* @remarks             pvoicecall_agent cannot be NULL
+ */
+voicecall_error_t _vc_core_engine_change_audio_path(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path);
+
+/**
+* This function sets the voice call audio volume for the given audio path type
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path_type         audio path for the volume to be set
+* @param[in]           vol_level                       volume level
+* @remarks             pvoicecall_agent cannot be NULL
+ */
+voicecall_error_t _vc_core_engine_set_audio_volume(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path_type, voicecall_audio_volume_t vol_level);
+
+/**
+* This function sets the modem mute status
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           bmute_audio                             TRUE - mure audio, FALSE - unmute audio
+* @remarks             pvoicecall_agent cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_set_audio_mute(voicecall_engine_t *pvoicecall_agent, gboolean bmute_audio);
+
+/**
+* This function retreives the voice call audio volume for the given audio path type
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path_type         audio path for the volume to be retreived
+* @remarks             pvoicecall_agent cannot be NULL
+ */
+voicecall_error_t _vc_core_engine_get_audio_volume(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path_type);
+
+#ifdef _SAT_MENU_
+/**
+ * This function requests SAT Engine to setup SIM services Menu
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @remarks             Voicecall Engine only requests the SAT engine to display the menu.
+ */
+voicecall_error_t voicecall_request_sat_menu(voicecall_engine_t *pvoicecall_agent);
+
+/**
+* This function retreives the SIM Menu Title from the SAT Engine
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+* @param[out]  title                                   contains the sat menu title on sucess
+ */
+voicecall_error_t voicecall_request_sat_menu_title(voicecall_engine_t *pvoicecall_agent, char *title);
+#endif
+
+/**
+* This function prepares the engine for the redial call. It preserves the previsouly made call object to be used for the next make call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+ * @param[in]          call_handle             call handle
+* @remarks             If this API is used, _vc_core_engine_prepare_call is not reqired for making the call again. The last prepared call details will
+*                              be used for the redialling. Application has to just use _vc_core_engine_make_call API to redial the call
+ */
+voicecall_error_t _vc_core_engine_prepare_redial(voicecall_engine_t *pvoicecall_agent, int call_handle);
+
+#ifdef _OLD_SAT_
+/**
+ * This function checks whether SAT redial duration is valid
+ *
+ * @return             ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+ * @param[out] bredial_duration        Contains TRUE if SAT redial duration is enabled, FALSE otherwise
+ * @remarks            pvoicecall_agent and bredial_duration cannot be NULL
+ */
+voicecall_error_t voicecall_get_sat_redial_duration_status(voicecall_engine_t *pvoicecall_agent, gboolean * bredial_duration);
+
+/**
+ * This function sets the current duration and retireives the modified remaining SAT redial duration
+ *
+ * @return             ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+ * @param[in]          pvoicecall_agent                Handle to Voicecall Engine
+ * @param[out] remaining_duration              remaining sat duration
+ * @remarks            pvoicecall_agent and remaining_duration cannot be NULL
+ */
+voicecall_error_t voicecall_get_set_sat_remaining_duration(voicecall_engine_t *pvoicecall_agent, long *remaining_duration);
+#endif
+
+voicecall_error_t _vc_core_engine_get_sat_dtmf_hidden_mode(voicecall_engine_t *pvoicecall_agent, gboolean * bhidden_mode);
+
+/**
+* This function sends response to sat based on the given sat response type
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   sat_rqst_resp_type      sat rqst/response type sent by client
+* @param[in]   sat_response_type       sat response type to be sent to SAT
+ */
+voicecall_error_t _vc_core_engine_send_sat_response(voicecall_engine_t *pvoicecall_agent, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type);
+
+voicecall_error_t _vc_core_engine_set_to_default_values(voicecall_engine_t *pvoicecall_agent);
+#endif                         /* __VC_CORE_ENGINE_H_ */
diff --git a/call-engine/core/include/vc-core-error.h b/call-engine/core/include/vc-core-error.h
new file mode 100755 (executable)
index 0000000..95d4345
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_ERROR_H_
+#define __VC_CORE_ERROR_H_
+
+/**
+ * Voicecall Engine Error Codes
+ */
+
+typedef enum __voicecall_api_error_t {
+       ERROR_VOICECALL_NONE,   /*0 */
+       ERROR_VOICECALL_INVALID_CALL_TYPE,
+       ERROR_VOICECALL_INVALID_TELEPHONE_NUMBER,
+       ERROR_VOICECALL_MEMALLOC_FAILURE,
+       ERROR_VOICECALL_DBUS_FAILURE,
+       ERROR_VOICECALL_INVALID_MO_REF_HANDLE,
+       ERROR_VOICECALL_INVALID_CALL_HANDLE,
+       ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE,
+       ERROR_VOICECALL_CALL_NOT_ALLOWED,
+       ERROR_VOICECALL_NOT_SUPPORTED,
+       ERROR_VOICECALL_INVALID_ACTION_TYPE,    /*10 */
+       ERROR_VOICECALL_TAPI_ERROR,
+       ERROR_VOICECALL_FDN_ONLY,
+       ERROR_VOICECALL_EMERGENCY_CALLS_ONLY,
+       ERROR_VOICECALL_OUTGOING_ABORTED,
+       ERROR_VOICECALL_ENGINE_STATE_NOT_NONE,
+       ERROR_VOICECALL_EMPTY_SPEED_DIAL,
+       ERROR_VOICECALL_CONTACT_READ_FAILED,
+       ERROR_VOICECALL_MO_CALL_NOT_AVAILABLE,
+       ERROR_VOICECALL_NO_NW_SERVICE,
+       ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED, /*20 */
+       ERROR_VOICECALL_NO_INCOMING_CALL_EXIST,
+       ERROR_VOICECALL_ENGINE_STATE_NONE,
+       ERROR_VOICECALL_BOTH_ACTIVE_HELD_CALLS_EXIST,
+       ERROR_VOICECALL_OFFLINE_MODE,
+       ERROR_VOICECALL_CALL_IMPOSSIBLE_NOSIM_NOEMERGNUM,
+       ERROR_VOICECALL_PHONE_NOT_INITIALIZED,
+       ERROR_VOICECALL_HOLD_REJECTED,
+       ERROR_VOICECALL_ACTIVATE_REJECTED,
+       ERROR_VOICECALL_SWAP_REJECTED,
+       ERROR_VOICECALL_HOLD_FAILED,    /*30 */
+       ERROR_VOICECALL_RETREIVE_FAILED,
+       ERROR_VOICECALL_SETUP_CONF_FAILED,
+       ERROR_VOICECALL_SPLIT_CONF_FAILED,
+       ERROR_VOICECALL_SWAP_FAILED,
+       ERROR_VOICECALL_TRANSFER_FAILED,
+       ERROR_VOICECALL_INCOMPLETE,
+       ERROR_VOICECALL_UNAVAILABLE,
+       ERROR_VOICECALL_HOLD_NOT_SUPPORTED,
+       ERROR_VOICECALL_RETREIVE_NOT_SUPPORTED,
+       ERROR_VOICECALL_SETUP_CONF_NOT_SUPPORTED,       /*40 */
+       ERROR_VOICECALL_SPLIT_CONF_NOT_SUPPORTED,
+       ERROR_VOICECALL_SWAP_NOT_SUPPORTED,
+       ERROR_VOICECALL_TRANSFER_NOT_SUPPORTED,
+       ERROR_VOICECALL_DTMF_FAILED,
+       ERROR_VOICECALL_ANSWER_FAILED,
+       ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS,
+       ERROR_VOICECALL_INSUFFICIENT_BUFFER,
+       ERROR_VOICECALL_INVALID_ARGUMENTS,
+       ERROR_VOICECALL_NOTI_FAILED,
+       ERROR_VOICECALL_OPERATION_NOT_ALLOWED,  /*50 */
+       ERROR_VOICECALL_REQUEST_FAILED,
+       ERROR__vc_core_engine_private_call_NOT_POSSIBLE,
+       ERROR_VOICECALL_TRANSFER_CALL_NOT_POSSIBLE,
+       ERROR_VOICECALL_CONF_NOT_POSSIBLE,
+       ERROR_VOICECALL_INVALID_CALLID,
+       ERROR_VOICECALL_CALL_IS_IN_PROGRESS,
+       ERROR__vc_core_engine_private_call_FAILED,
+       ERROR_VOICECALL_INVALID_DTMF_CHAR,      /*58 */
+       ERROR_VOICECALL_MAX
+} voicecall_error_t;
+
+#endif                         /*__VC_CORE_ERROR_H_*/
diff --git a/call-engine/core/include/vc-core-svcall.h b/call-engine/core/include/vc-core-svcall.h
new file mode 100755 (executable)
index 0000000..7f8ab6b
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_SVCALL_H_
+#define __VC_CORE_SVCALL_H_
+#include "vc-core-callagent.h"
+
+#ifdef  _CPHS_DEFINED_
+
+/**
+ * This function retrieves cphs information from the Telephony and stores with the engine
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent     Handle to Voicecall Call Agent
+ */
+gboolean _vc_core_svcall_init_cphs_info(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function retrieves status of the given csp service type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent     Handle to Voicecall Call Agent
+ * @param[in]          csp_service     csp service whose status to be retreived
+ */
+gboolean _vc_core_svcall_cphs_csp_get_status(call_vc_callagent_state_t *pcall_agent, voicecall_cphs_csp_service csp_service);
+
+/**
+ * This function retrieves cuurent active line in ALS
+ *
+ * @return             Returns #voice_call_cphs_alsline_t
+ * @param[in]          pcall_agent     Handle to Voicecall Call Agent
+ */
+voice_call_cphs_alsline_t _vc_core_svcall_get_cphs_als_active_line(call_vc_callagent_state_t *pcall_agent);
+#endif
+
+#endif                         /*__VC_CORE_SVCALL_H_*/
diff --git a/call-engine/core/include/vc-core-tapi-evnt.h b/call-engine/core/include/vc-core-tapi-evnt.h
new file mode 100755 (executable)
index 0000000..bf41865
--- /dev/null
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_TAPI_EVENT_H_
+#define __VC_CORE_TAPI_EVENT_H_
+
+#include "vc-core-util.h"
+#include "vc-core-callagent.h"
+#include "vc-core-engine.h"
+
+/**
+ * This function handles the tapi connected line indication handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          call_handle                     Tapi Call Handle associtated with connected line indication
+ */
+gboolean _vc_core_tapi_event_connected_line_ind_handle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallConnectedNumberInfo_t *connected_number_info);
+
+/**
+ * This function handles different type of tapi indications given in tapi_event_type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          tapi_event_type         Tapi Event Type
+ * @param[in]          param2                          sub param associated with tapi_event_type
+ */
+gboolean _vc_core_tapi_event_handle_notification(call_vc_callagent_state_t *pcall_agent, int tapi_event_type, int param2);
+
+/**
+ * This function handles the AOC Event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Pointet to SAT engine return call structure
+ * @param[in]          ptapi_aoc_info          AOC info associated with the AOC Event
+ */
+gboolean _vc_core_tapi_event_handle_aoc(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallAocInfo_t *pTapiAocInfo);
+
+/**
+ * This function retreives the voicecall engine specific end cause type for the given tapi end cause type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          type                            tapi event type
+ * @param[in]          cause                   tapi call end cause
+ * @param[out] end_cause_type  voicecall engine end cause
+ */
+void _vc_core_tapi_event_get_end_cause_type(int type, TelTapiEndCause_t cause, voice_call_end_cause_type_t *end_cause_type);
+
+/**
+* This function Copies Telephony incoming call data to voice call incoming call data
+*
+* @return              void
+* @param[in]           pcall_agent             Handle to voicecall agent
+* @param[in]           callInfo                        Telephony Incoming Call Data
+* @param[out]  pcallobject_info        Voicecall Engine Incoming Call Dta
+*/
+void _vc_core_tapi_event_copy_incoming_call_data(call_vc_callagent_state_t *pcall_agent, TelCallIncomingCallInfo_t *callInfo, call_vc_call_objectinfo_t *pcallobject_info);
+
+/**
+ * This function handles the incoming event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Incoming call handle
+ * @param[in]          callInfo                        Incoming call info associated with the incoming call
+ */
+gboolean _vc_core_tapi_event_handle_incoming_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallIncomingCallInfo_t *callInfo);
+
+/**
+ * This function handles tapi origination event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Call Handle associated with the alert event
+ */
+gboolean _vc_core_tapi_event_handle_originated_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+
+/**
+ * This function handles tapi alert event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Call Handle associated with the alert event
+ */
+gboolean _vc_core_tapi_event_handle_alert_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+
+/**
+ * This function handles the call end event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          type                            Tapi Event Type
+ * @param[in]          handle                  Call Handle of the call being ended
+ * @param[in]          cause                   Tapi End Cause
+ */
+gboolean _vc_core_tapi_event_handle_call_end_event(call_vc_callagent_state_t *pcall_agent, int type, call_vc_handle handle, TelTapiEndCause_t cause);
+
+/**
+ * This function handles the tapi call connect event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being connected
+ */
+gboolean _vc_core_tapi_event_handle_call_connect_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+
+/**
+ * This function handles call hold event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being held
+ * @param[in]          status                  tapi cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_held_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
+
+/**
+ * This function handles tapi call activate/retreive event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being held
+ * @param[in]          status                  tapi cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_retrieve_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
+
+/**
+ * This function handles call join/conference event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being held
+ * @param[in]          status                  tapi cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_join_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
+
+/**
+ * This function handles call split/private call event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being held
+ * @param[in]          status                  tapi cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_split_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status);
+
+/**
+ * This function handles the call transfer event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          status                  tapi cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_transfer_event(call_vc_callagent_state_t *pcall_agent, TelCallCause_t status);
+
+#endif                         /* __VC_CORE_TAPI_EVENT_H_ */
diff --git a/call-engine/core/include/vc-core-tapi-rqst.h b/call-engine/core/include/vc-core-tapi-rqst.h
new file mode 100755 (executable)
index 0000000..f582665
--- /dev/null
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_TAPI_RQST_H_
+#define __VC_CORE_TAPI_RQST_H_
+
+#include "vc-core-util.h"
+#include "vc-core-callagent.h"
+
+ /**
+ * This function prepares for a call setup
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_prepare_setup_call(call_vc_callagent_state_t *pcall_agent);
+
+  /**
+ * This function sets up an outgoing call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_setup_call(call_vc_callagent_state_t *pcall_agent);
+
+/*
+ * Function to answer/release calls,
+ */
+ /**
+ * This function answers the call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          answer_type     call answer type #voicecall_answer_type_t
+ * @param[out] error_code      Error code
+ */
+gboolean _vc_core_tapi_rqst_answer_call(call_vc_callagent_state_t *pcall_agent, voicecall_answer_type_t answer_type, int *error_code);
+
+/**
+ * This function checks and prepares to accept a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_response_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function rejects a mobile terminated call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          budub           TRUE - User Determined User Busy, FALSE - otherwise
+ * @param[out] error_code      Error code
+ */
+gboolean _vc_core_tapi_rqst_reject_mt_call(call_vc_callagent_state_t *pcall_agent, gboolean budub, int *error_code);
+
+/**
+ * This function ends a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_end_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_active_calls(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases held calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_held_calls(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases the incoming call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_incoming_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases outgoing call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_outgoing_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases all calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_all_calls(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function releases the call associate with the given call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          call_handle     handle of the call to be ended
+ */
+gboolean _vc_core_tapi_rqst_end_call_by_callhandle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+
+/**
+ * This function holds a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_hold_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function retrieves a call from hold
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_retrieve_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function swaps held and active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_swap_calls(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function joins two calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_join_calls(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function splits the members of a call given its call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ * @param[in]          call_handle     Call handle for a call the members of which has to be split
+ */
+gboolean _vc_core_tapi_rqst_private_call(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+
+/**
+ * This function transfers call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_transfer_call(call_vc_callagent_state_t *pcall_agent);
+
+/**
+ * This function sends the given string as dtmf
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ * @param[in]          dtmf_string     dtmf string
+ */
+gboolean _vc_core_tapi_rqst_start_dtmf(call_vc_callagent_state_t *pcall_agent, char *dtmf_string);
+
+#endif                         /* __VC_CORE_TAPI_RQST_H_ */
diff --git a/call-engine/core/include/vc-core-util.h b/call-engine/core/include/vc-core-util.h
new file mode 100755 (executable)
index 0000000..c18bf1c
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VC_CORE_UTIL_H_
+#define __VC_CORE_UTIL_H_
+
+#include <stdlib.h>
+#include <glib.h>
+#include <glib-object.h>
+#include <stdbool.h>
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include "vc-core-error.h"
+#include "vc-core-engine-types.h"
+
+#include "TelDefines.h"
+#include "TelNetwork.h"
+#include "TelSim.h"
+#include "TapiCommon.h"
+#include "TapiEvent.h"
+#include "ITapiCall.h"
+#include "ITapiSim.h"
+#include "ITapiNetwork.h"
+#include "ITapiSound.h"
+#include "ITapiSs.h"
+#include "ITapiSat.h"
+
+#include "vconf.h"
+#include "vconf-keys.h"
+#include "contacts-svc.h"
+#ifdef CALL_DEBUG_ON_DLOG
+#include <dlog.h>
+#endif
+
+#define CALL_NETWORK_MCC_UK    0xEA    /*234*/
+#define CALL_NETWORK_MCC_IE    0x110   /*272*/
+#define CALL_NETWORK_MCC_UKRAINE       0xFF    /*255*/
+#define CALL_NETWORK_MCC_SAMSUNG_SUWON_3G      450001  /*450001*/
+#define CALL_NETWORK_MCC_ITALY 222
+
+#define IS_DIGIT(value)                ((value) >= '0' && (value) <= '9')
+
+#ifdef CALL_DEBUG_ON_DLOG
+#define ENG_ERR                        LOG_ERROR
+#define ENG_WARN               LOG_WARN
+#define ENG_DEBUG              LOG_DEBUG
+#else
+#define ENG_ERR
+#define ENG_WARN
+#define ENG_DEBUG
+#endif
+
+#ifdef CALL_DEBUG_ON_DLOG
+#define CALL_ENG_DEBUG(level, frmt, args...)       \
+       do {LOG(level, TAG_CALL, "[VC_ENGINE] [%s:%d] "frmt"\n",  __func__, __LINE__, ##args); } while (0)
+#define CALL_ENG_KPI(frmt, args...)       \
+       do {LOG(LOG_DEBUG, TAG_CALL_LAUNCH, "[VC_KPI] [%s:%d] "frmt"\n",  __func__, __LINE__, ##args); } while (0)
+#else
+#define CALL_ENG_DEBUG(level, fmt, args...)
+#endif
+
+#define VOICECALL_RETURN_IF_FAIL(check_condition)      \
+                       if (!(check_condition)) return;
+
+#define VOICECALL_RETURN_FALSE_IF_FAIL(check_condition)        \
+                       if (!(check_condition)) return FALSE;
+
+#define VOICECALL_RETURN_VALUE_IF_FAIL(check_condition, value) \
+                       if (!(check_condition)) return value;
+
+#define VOICECALL_RETURN_NULL_IF_FAIL(check_condition) \
+                       if (!(check_condition)) return NULL;
+
+#define VOICECALL_RETURN_ZERO_IF_FAIL(check_condition) \
+                       if (!(check_condition)) return 0;
+
+#define VOICECALL_RETURN_INVALID_IF_FAIL(check_condition)      \
+                       if (!(check_condition)) return -1;
+
+#define VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(value, min_value, max_value, ret_val)   \
+                       if ((value < min_value) || (value > max_value)) return ret_val;
+
+#ifndef min
+#define min(a, b)    (((a) < (b)) ? (a) : (b))
+#endif                         /*#ifndef min*/
+
+typedef unsigned int call_vc_handle;
+
+#ifdef TIMER_ENABLED
+#define        GET_CURR_TIME() _vc_core_util_get_curr_time()
+#define        PRINT_DIFF_TIME(start, end, message)    _vc_core_util_print_diff_time(start, end, message)
+#define        PRINT_CURRENT_TIME(message) _vc_core_util_print_curr_time(message)
+
+#else
+#define        GET_CURR_TIME() 0
+#define                PRINT_DIFF_TIME(start, end, message)
+#define        PRINT_CURRENT_TIME(message)
+#endif
+
+/**
+ * This enumeration defines SS's SI vaild types
+ */
+typedef enum {
+       SS_SI_FORMAT_INVALID = -1,                              /**< SI format is invalid */
+       SS_SI_FORMAT_VALID                                              /**< SI format is valid */
+} call_vc_ss_si_format;
+
+/**
+ * This enumeration defines the publish types
+ */
+typedef enum {
+       CALL_VC_SAT_RESPONSE                                            /**< SAT response publish type */
+} call_vc_publish_type_t;
+
+/**
+ * This enum defines the type of power mode.
+ */
+typedef enum {
+       CALL_VC_POWER_NONE = 0,
+       CALL_VC_POWER_GRANT_DIMMING,
+       CALL_VC_POWER_GRANT_LCDOFF,
+       CALL_VC_POWER_GRANT_SLEEP,
+       CALL_VC_POWER_PROHIBIT_DIMMING,
+       CALL_VC_POWER_PROHIBIT_LCDOFF,
+       CALL_VC_POWER_PROHIBIT_SLEEP,
+       CALL_VC_POWER_NORMAL_STATUS
+} call_vc_power_mode_t;
+
+/**
+ * This function publishes the event of a given publish type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          src             Telehone number from which call number needd to be parsed
+ * @param[out]         dst             Pointer to the buffer to store the parsed number
+ */
+gboolean _vc_core_util_remove_invalid_chars(const char *src, char *dst);
+
+/**
+ * This function publishes the event of a given publish type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pszTelNumber            Telehone number from which call number nned to be extracted
+ * @param[out] pBuffer                 Pointer to the buffer to store the extracted number
+ * @param[in]          nBufSize                        Size of input buffer
+ */
+gboolean _vc_core_util_extract_call_number(const char *pszTelNumber, char *pBuffer, const int nBufSize);
+gboolean _vc_core_util_extract_call_number_without_cli(const char *pszTelNumber, char *pBuffer, const int nBufSize);
+
+#ifdef TIMER_CHECK     /*unused*/
+void call_vc_print_elapsed_time(char *string, gulong * tim_out);
+void call_vc_print_diff_time(time_t time1, time_t time2);
+#endif
+
+/**
+ * This function checks whether the given number is emergency number by verifying with sim emergency numbers
+ *
+ * @return             TRUE if the number is emergency number, FALSE otherwise
+ * @param[in]          card_type       simcard type
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_emergency_number(TelSimCardType_t card_type, char *pNumber, gboolean b_is_no_sim, int *ecc_category);
+
+/**
+ * This function checks whether the given number is SS string or not
+ *
+ * @return             TRUE if the number is SS string, FALSE otherwise
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_ss_string(const char *pNumber);
+
+/**
+ * This function checks whether the given number is SS string or not
+ *
+ * @return             TRUE if the number is in call SS string, FALSE otherwise
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_incall_ss_string(const char *number);
+
+/*PDIAL_SEND_DTMF*/
+/**
+* This function extracts the dtmf number from the given telephone number
+*
+* @param[in]     tel_number            source telephone number
+* @param[out] dtmf_number              extracted dtmf number
+* @param[out] dtmf_buf_len             size of dtmf number buffer
+*/
+gboolean _vc_core_util_extract_dtmf_number(const char *tel_number, char *dtmf_number, const int dtmf_buf_len);
+/*PDIAL_SEND_DTMF*/
+
+/**
+ * This function checks whether the given number ia a valid dtmf number or not
+ *
+ * @return             TRUE if the number can be used for sending dtmf , FALSE otherwise
+ * @param[in]          pnumber         number to be verified
+ */
+gboolean _vc_core_util_isvalid_dtmf_number(char *pnumber);
+
+/**
+* This function checks whether the entire dtmf string is valid or not
+*
+* @return              TRUE if the number can be used for sending dtmf , FALSE otherwise
+* @param[in]           pnumber         number to be verified
+*/
+gboolean _vc_core_util_isvalid_full_dtmf_number(char *pnumber);
+
+/**
+* This function checks the validity of the given string for SS string
+*
+* @return              Returns SS_SI_FORMAT_INVALID - if the string is invalid ss string, SS_SI_FORMAT_VALID - if valid
+* @param[in]   pinput_string   string to be verified
+*/
+call_vc_ss_si_format _vc_core_util_check_si_format(const char *pinput_string);
+
+/**
+* This function checks the validity of the given telephone number
+*
+* @return              TRUE if the given number is valid telephone number, FALSE otherwise
+* @param[in]           ptel_number     telephone number to be verified
+*/
+gboolean _vc_core_util_isvalid_telephone_number(char *ptel_number);
+
+/**
+* This function checks the if it is GCF mode or not
+*
+* @return              TRUE if it is GCF mode, FALSE otherwise
+*/
+gboolean _vc_core_util_check_gcf_status(void);
+
+/**
+* This function checks the if it is in zuhause area or not
+*
+* @return              TRUE if it is in zuhause area, FALSE otherwise
+*/
+gboolean _vc_core_util_check_zuhause_status(void);
+
+/**
+* This function retreive mcc information from the telephony
+*
+* @internal
+* @return              TRUE on success, FALSE - otherwise
+* @param[out]          mcc     mcc information to be retreived
+*/
+gboolean _vc_core_util_get_mcc(unsigned long *mcc);
+
+gboolean _vc_core_util_set_call_status(int call_status);
+gboolean _vc_core_util_check_video_call_status(void);
+gboolean _vc_core_util_get_SAP_status();
+void _vc_core_util_get_cug_info(voicecall_setup_info_t *psetupcall_info);
+void _vc_core_util_get_identity_mode(voicecall_setup_info_t *psetupcall_info);
+gboolean _vc_core_util_is_offline_mode(void);
+gboolean _vc_core_util_is_pwlock(void);
+gboolean _vc_core_util_get_nw_status(int *network_status);
+gboolean _vc_core_util_strcpy(char *pbuffer, int buf_count, const char *pstring);
+
+/**
+ * This function make the date and time string
+ *
+ * @return             Returns newly copied string on success or NULL on failure
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]  time    time
+ */
+char *_vc_core_util_get_date_time(time_t time);
+
+/**
+ * This function check phone lock status
+ *
+ * @return             Returns whether phone is locked or not.
+ * @param[in]  void
+ */
+gboolean _vc_core_util_phonelock_status(void);
+
+gboolean _vc_core_util_set_sleep_status(call_vc_power_mode_t type);
+gboolean _vc_core_util_get_call_alert_type(int *alert_type);
+
+#ifdef TIMER_ENABLED   /*unused*/
+clock_t _vc_core_util_get_curr_time();
+void _vc_core_util_print_diff_time(clock_t start, clock_t end, char *message);
+void _vc_core_util_print_curr_time(char *message);
+#endif
+
+void _vc_core_util_download_test_call(char *result);
+
+gboolean _vc_core_util_set_call_volume(int vol_level);
+int _vc_core_util_get_call_volume(void);
+#endif                         /* __VC_CORE_UTIL_H_ */
diff --git a/call-engine/core/vc-core-callagent.c b/call-engine/core/vc-core-callagent.c
new file mode 100755 (executable)
index 0000000..8c68abb
--- /dev/null
@@ -0,0 +1,591 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "vc-core-callagent.h"
+#include "vc-core-engine.h"
+#include "vc-core-ccbs.h"
+#include "vc-core-tapi-rqst.h"
+#include "vc-core-tapi-evnt.h"
+#include "vc-core-svcall.h"
+#include <assert.h>
+
+/* For Debug Information, Inout state name string constant */
+char *gszcall_vc_inout_state[VC_INOUT_STATE_MAX_NUM] = {
+       "NONE",
+       "OUTGOING_START",
+       "OUTGOING_WAIT_HOLD",
+       "OUTGOING_WAIT_ORIG",
+       "OUTGOING_WAIT_ALERT",
+       "OUTGOING_WAIT_CONNECTED",
+       "OUTGOING_WAIT_RELEASE",
+       "OUTGOING_ABORTED",
+       "OUTGOING_SHOW_REDIALCAUSE",
+       "OUTGOING_WAIT_REDIAL",
+       "OUTGOING_SHOW_RETRY_CALLBOX",
+       "OUTGOING_END",
+       "INCOME_SELFEVENT_WAIT",
+       "INCOME_START",
+       "INCOME_BOX",
+       "INCOME_WAIT_REDIRECTCNF",
+       "INCOME_WAIT_REDIRECT_END",
+       "INCOME_WAIT_CONNECTED",
+       "INCOME_WAIT_HOLD_CONNECTED",
+       "INCOME_WAIT_RELEASE_ACTIVE_CONNECTED",
+       "INCOME_WAIT_HOLD",
+       "INCOME_WAIT_RELEASE_ACTIVECALL",
+       "INCOME_WAIT_RELEASE_HOLDCALL",
+       "INCOME_WAIT_RELEASE",
+       "INCOME_END"
+};
+
+/* For Debug Information, Call Agent State name string constant */
+char *gszcall_vc_ca_state[CALL_VC_CA_STATE_MAX_NUM] = {
+       "CA_STATE_NORMAL",
+       "CA_STATE_SPLIT_CALLBOX",
+       "CA_STATE_WAIT_SPLIT",
+       "CA_STATE_DROP_CALLBOX",
+       "CA_STATE_WAIT_DROP",
+#ifdef SWAP_SUPPORT
+       "CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE",
+       "CA_STATE_WAIT_SWAP_HOLD",
+       "CA_STATE_WAIT_SWAP_ACTIVATE",
+#endif                         /*                */
+       "CA_STATE_WAIT_SWAP",
+       "CA_STATE_WAIT_HOLD",
+       "CA_STATE_WAIT_UNHOLD",
+       "CA_STATE_WAIT_JOIN",
+       "CA_STATE_WAIT_TRANSFER_CNF",
+       "CA_STATE_WAIT_TRANSFER_CALLEND",
+       "CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL",
+       "CA_STATE_WAIT_RELEASE_ALL_HOLDCALL",
+       "CA_STATE_SENDMSG_CALLBOX",
+       "CA_STATE_VIEW_CONTACT_DETAIL_CALLBOX",
+       "CA_STATE_SAVE_TO_CONTACT_CALLBOX",
+       "CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL",
+       "CA_STATE_WAIT_RELEASE_ALL_CALLS",
+       "CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP",
+       "CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SWITCH_TO_VIDEO_CALL"
+};
+
+/**
+ * This function intializes the call agent
+ *
+ * @return             Pointer to call agent state.
+ */
+call_vc_callagent_state_t *_vc_core_ca_init_agent()
+{
+       call_vc_callagent_state_t *pcall_agent = NULL;
+       pcall_agent = (call_vc_callagent_state_t *)calloc(1, sizeof(call_vc_callagent_state_t));
+       if (NULL == pcall_agent) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Voicecall Engine Initialization Failed: MEM ALLOC Failure");
+               return NULL;
+       }
+
+       /*Initialize Call Manager */
+       _vc_core_call_manager_init(&pcall_agent->call_manager);
+
+       /* Initialize Call Agent Flags */
+       _vc_core_ca_init_data(pcall_agent);
+
+#ifdef _CCBS_DEFINED_
+       /* Init CCBS Info */
+       _vc_core_init_ccbs_info(pcall_agent);
+#endif
+
+       /* Init CPHS Info */
+#ifdef _CPHS_DEFINED_
+       _vc_core_svcall_init_cphs_info(pcall_agent);
+#endif
+       return pcall_agent;
+}
+
+/**
+ * This function intializes the callagent data
+ *
+ * @return             void
+ * @param[in]          pagent                                  Pointer to the call agent structure
+ */
+void _vc_core_ca_init_data(call_vc_callagent_state_t *pagent)
+{
+       VOICECALL_RETURN_IF_FAIL(pagent != NULL);
+       pagent->bonly_sos_call = FALSE;
+       pagent->callagent_state = CALL_VC_CA_STATE_NORMAL;
+       pagent->io_state = VC_INOUT_STATE_NONE;
+       pagent->bis_no_sim = FALSE;
+       pagent->aoc_ppm = VC_INVALID_PPM;
+}
+
+/**
+ * This function finalizes the call agent
+ *
+ * @return             Returns void
+ * @param[in]          pcall_agent Pointer to the call agent structure
+ */
+void _vc_core_ca_finish_agent(call_vc_callagent_state_t *pcall_agent)
+{
+       if (NULL != pcall_agent) {
+               free(pcall_agent);
+               pcall_agent = NULL;
+       }
+}
+
+/**
+ * This function changes the in out state of the call agent
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pagent          Pointer to the call agent structure
+ * @param[in]          new_state               The new i/o state that should be set
+ * @see                        _vc_core_ca_change_agent_state
+ */
+gboolean _vc_core_ca_change_inout_state(call_vc_callagent_state_t *pagent, voicecall_inout_state_t new_state)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+
+       CALL_ENG_DEBUG(ENG_ERR, "%s(%d) --> %s(%d)", gszcall_vc_inout_state[pagent->io_state], pagent->io_state, gszcall_vc_inout_state[new_state], new_state);
+       pagent->io_state = new_state;
+       return TRUE;
+}
+
+/**
+ * This function changes the in call agent state
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pAgent          Pointer to the call agent structure
+ * @param[in]          new_state               The new call agent state that should be set
+ * @see                        _vc_core_ca_change_inout_state
+ */
+gboolean _vc_core_ca_change_agent_state(call_vc_callagent_state_t *pAgent, call_vc_ca_state_t new_state)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL((new_state >= CALL_VC_CA_STATE_NORMAL && new_state < CALL_VC_CA_STATE_MAX_NUM));
+       CALL_ENG_DEBUG(ENG_DEBUG, "%s(%d) --> %s(%d)", gszcall_vc_ca_state[pAgent->callagent_state], pAgent->callagent_state, gszcall_vc_ca_state[new_state], new_state);
+       pAgent->callagent_state = new_state;
+       return TRUE;
+}
+
+/**
+ * This function checks if all the call members have terminated or not
+ *
+ * @return             Returns TRUE if no call members exist, FALSE otherwise
+ * @param[in]          pAgent          Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_check_end(call_vc_callagent_state_t *pAgent)
+{
+       gboolean result = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pAgent != NULL);
+       if ((_vc_core_cm_get_call_member_count(&pAgent->call_manager) == 0) && (pAgent->io_state == VC_INOUT_STATE_NONE)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "TRUE");
+               result = TRUE;
+       }
+
+       else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "FALSE");
+               result = FALSE;
+       }
+       return result;
+}
+
+
+/**
+ * This function sends the response to the SAT engine
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]  pagent                          Pointer to the call agent structure
+ * @param[in]  sat_rqst_resp_type      sat rquest/response type used by the client
+ * @param[in]  sat_response_type       response to be sent to sat
+ */
+gboolean _vc_core_ca_send_sat_response(call_vc_callagent_state_t *pagent, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type)
+{
+       call_vc_satsetup_info_t *pcall_vc_satcall_info = (call_vc_satsetup_info_t *) &(pagent->call_manager.setupcall_info.satcall_setup_info);
+       TelSatAppsRetInfo_t call_vc_sat_response = {0,};
+       TapiResult_t error_code;
+       CALL_ENG_DEBUG(ENG_DEBUG, "sat_rqst_resp_type: %d, sat_response_type: %d", sat_rqst_resp_type, sat_response_type);
+       switch (sat_rqst_resp_type) {
+       case SAT_RQST_SETUP_CALL:
+               {
+                       TelSatCallRetInfo_t sat_engine_ret_call = {0,};
+                       switch (sat_response_type) {
+                       case CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+                               sat_engine_ret_call.bIsTapiCauseExist = FALSE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_UNKNOWN;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_CALL;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE;
+                               break;
+                       case CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND;
+                               sat_engine_ret_call.bIsTapiCauseExist = TRUE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_BUSY;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_NO_SERVICE;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE;
+                               break;
+                       case CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND_WITHOUT_CAUSE:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND;
+                               sat_engine_ret_call.bIsTapiCauseExist = FALSE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_UNKNOWN;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE;
+                               break;
+                       case CALL_VC_ME_CONTROL_PERMANENT_PROBLEM:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM;
+                               sat_engine_ret_call.bIsTapiCauseExist = FALSE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_UNKNOWN;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_ACTION_NOT_ALLOWED;
+                               break;
+                       case CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN;
+                               sat_engine_ret_call.bIsTapiCauseExist = FALSE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_UNKNOWN;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_CALL;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE;
+                               break;
+                       case CALL_VC_ME_RET_SUCCESS:
+                               sat_engine_ret_call.resp = TAPI_SAT_R_SUCCESS;
+                               sat_engine_ret_call.bIsTapiCauseExist = TRUE;
+                               sat_engine_ret_call.tapiCause = TAPI_CAUSE_SUCCESS;
+                               sat_engine_ret_call.meProblem = TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE;
+                               sat_engine_ret_call.bIsOtherInfoExist = FALSE;
+                               sat_engine_ret_call.permanentCallCtrlProblem = TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE;
+                               break;
+                       default:
+                               return FALSE;
+                               break;
+                       }
+                       call_vc_sat_response.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
+                       call_vc_sat_response.commandId = pcall_vc_satcall_info->satengine_setupcall_data.commandId;
+                       memset(&(call_vc_sat_response.appsRet.setupCall), 0, sizeof(call_vc_sat_response.appsRet.setupCall));
+                       memcpy(&(call_vc_sat_response.appsRet.setupCall), &sat_engine_ret_call, sizeof(call_vc_sat_response.appsRet.setupCall));
+               }
+               break;
+       case SAT_RQST_SEND_DTMF:
+               {
+                       TelSatDtmfRetInfo_t sat_engine_ret_dtmf;
+                       switch (sat_response_type) {
+                       case CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND:
+                               sat_engine_ret_dtmf.resp = TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND;
+                               break;
+                       case CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND:
+                               sat_engine_ret_dtmf.resp = TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND;
+                               break;
+                       case CALL_VC_ME_CONTROL_PERMANENT_PROBLEM:
+                               sat_engine_ret_dtmf.resp = TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM;
+                               break;
+                       case CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN:
+                               sat_engine_ret_dtmf.resp = TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN;
+                               break;
+                       case CALL_VC_ME_RET_SUCCESS:
+                               sat_engine_ret_dtmf.resp = TAPI_SAT_R_SUCCESS;
+                               break;
+                       default:
+                               return FALSE;
+                               break;
+                       }
+                       call_vc_sat_response.commandType = TAPI_SAT_CMD_TYPE_SEND_DTMF;
+                       call_vc_sat_response.commandId = pcall_vc_satcall_info->satengine_dtmf_data.commandId;
+                       memset(&(call_vc_sat_response.appsRet.sendDtmf), 0, sizeof(call_vc_sat_response.appsRet.sendDtmf));
+                       memcpy(&(call_vc_sat_response.appsRet.sendDtmf), &sat_engine_ret_dtmf, sizeof(call_vc_sat_response.appsRet.sendDtmf));
+
+                       /*Reset SAT DATA after sending response */
+                       pcall_vc_satcall_info->satengine_dtmf_data.bIsHiddenMode = FALSE;
+                       CALL_ENG_DEBUG(ENG_ERR, "SAT Hidden mode has been reset");
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid SAT Rquest Response Type");
+               break;
+       }
+       error_code = tel_send_sat_app_exec_result(&call_vc_sat_response);
+       if (error_code != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Error tel_send_sat_app_exec_result():%#X", error_code);
+               return FALSE;
+       }
+
+       else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_send_sat_app_exec_result: Success");
+       }
+       return TRUE;
+}
+
+/**
+ * This function checks whether outgoing call is possible
+ *
+ * @return             This function returns TRUE if outgoing call is possible or else FALSE
+ * @param[in]          pagent                  Pointer to the call agent structure
+ * @param[in]          bemergency_number       TRUE - if outgoing call being made is emergency call or else FALSE
+ */
+gboolean _vc_core_ca_is_mocall_possible(call_vc_callagent_state_t *pagent, gboolean bemergency_number)
+{
+       gboolean bactive_call = FALSE;
+       gboolean bheld_call = FALSE;
+       int member_num = 0;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+       bactive_call = _vc_core_cm_isexists_active_call(&pagent->call_manager);
+       bheld_call = _vc_core_cm_isexists_held_call(&pagent->call_manager);
+       if (pagent->io_state != VC_INOUT_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "io_state=%d with FALSE ..", pagent->io_state);
+               return FALSE;
+       }
+
+       /* If it is emergency number, the call can be made by disconnecting all calls */
+       if (bemergency_number) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Emergency number with TRUE..");
+               return TRUE;
+       }
+
+       /* Mo is impossile when both active and hold call exist */
+       if (bactive_call && bheld_call) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "ended with FALSE ..");
+               return FALSE;
+       }
+
+       else {
+               member_num = _vc_core_cm_get_call_member_count(&pagent->call_manager);
+
+#ifdef _CPHS_DEFINED_
+               if (bactive_call && _vc_core_svcall_cphs_csp_get_status(VC_CPHS_CSP_HOLD) == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_svcall_cphs_csp_get_status : Hold is not possible");
+                       return FALSE;
+               }
+#endif                         /* */
+               /* Mo is impossile when member is more than max */
+               if (member_num >= (VC_MAX_CALL_GROUP_MEMBER + 1)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_ca_is_mocall_possible: ended with FALSE ..");
+                       return FALSE;
+               }
+
+               else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_ca_is_mocall_possible: ended with TRUE ..");
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * This function ends all the active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent  Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_active_calls(call_vc_callagent_state_t *pagent)
+{
+       gboolean result = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+       if (TRUE == _vc_core_cm_isexists_active_call(&pagent->call_manager)) {
+               result = _vc_core_tapi_rqst_release_active_calls(pagent);
+               if (TRUE == result) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL);
+               }
+       }
+       return result;
+}
+
+/**
+ * This function ends all the calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent  Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_all_calls(call_vc_callagent_state_t *pagent)
+{
+       gboolean result = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+       result = _vc_core_tapi_rqst_release_all_calls(pagent);
+       if (TRUE == result) {
+               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS);
+       }
+       return result;
+}
+
+/**
+ * This function ends all the held calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pagent        Handle to voicecall engine
+ */
+gboolean _vc_core_ca_end_held_calls(call_vc_callagent_state_t *pagent)
+{
+       gboolean result = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+       if (TRUE == _vc_core_cm_isexists_held_call(&pagent->call_manager)) {
+               result = _vc_core_tapi_rqst_release_held_calls(pagent);
+               if (TRUE == result) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL);
+               }
+       }
+       return result;
+}
+
+/**
+ * This function checks whether private call is possible or not
+ *
+ * @return             This function returns TRUE if private is possible or else FALSE
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_private_call_possible(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean active_calls = FALSE, held_calls = FALSE;
+       int active_call_member = 0;
+       _vc_core_cm_isexists_call_ingroup(&pcall_agent->call_manager, &active_calls, &held_calls);
+       active_call_member = _vc_core_cm_get_active_call_count(&pcall_agent->call_manager);
+       if (TRUE == active_calls && FALSE == held_calls) {
+               if (active_call_member > 1) {
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * This function checks whether call transfer is possible
+ *
+ * @return             This function returns TRUE if transfer is possible or else FALSE
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_transfer_call_possible(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean active_calls = FALSE;
+       gboolean held_calls = FALSE;
+       int total_call_member = 0;
+
+#ifdef _CPHS_DEFINED_
+       if (FALSE == _vc_core_svcall_cphs_csp_get_status(pcall_agent, VC_CPHS_CSP_CT)) {
+               return FALSE;
+       }
+#endif                         /* */
+       _vc_core_cm_isexists_call_ingroup(&pcall_agent->call_manager, &active_calls, &held_calls);
+       total_call_member = _vc_core_cm_get_call_member_count(&pcall_agent->call_manager);
+
+       /* The Explicit Call Transfer (ECT) function should be invoked in association with two existing calls which 1) one is answered and in the held state and 2) the other is answered and active or alerting. */
+       if (3 == total_call_member) {
+               if ((TRUE == active_calls) && (TRUE == held_calls) && (VC_INVALID_CALL_INDEX != pcall_agent->call_manager.mtcall_index)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Transfer possible..1 active, 1 held, 1 waiting..");
+                       return TRUE;
+               }
+       }
+
+       else if (2 == total_call_member) {
+               if ((TRUE == active_calls) && (TRUE == held_calls) && (VC_INVALID_CALL_INDEX == pcall_agent->call_manager.mtcall_index)) {
+                       return TRUE;
+               }
+
+               else if ((FALSE == active_calls) && (TRUE == held_calls) && (VC_INVALID_CALL_INDEX != pcall_agent->call_manager.mtcall_index)) {
+                       return TRUE;
+               }
+
+               else if ((FALSE == active_calls) && (TRUE == held_calls) && (-1 != pcall_agent->call_manager.setupcall_info.mocall_index)       /*Outgoing call exists */
+                        && (VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED == pcall_agent->io_state)) {
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * This function checks whether conference call is possible
+ *
+ * @return             This function returns TRUE if transfer is possible or else FALSE
+ * @param[in]  pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_ca_is_conf_call_possible(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean active_calls = FALSE;
+       gboolean held_calls = FALSE;
+       int total_call_member = 0;
+
+#ifdef _CPHS_DEFINED_
+       if (FALSE == _vc_core_svcall_cphs_csp_get_status(pcall_agent, VC_CPHS_CSP_MPTY)) {
+               return FALSE;
+       }
+#endif                         /* */
+       _vc_core_cm_isexists_call_ingroup(&pcall_agent->call_manager, &active_calls, &held_calls);
+       total_call_member = _vc_core_cm_get_call_member_count(&pcall_agent->call_manager);
+
+       /* Joining call is impossile when active or hold call doesn't exist */
+       if ((FALSE == active_calls) || (FALSE == held_calls)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Join Impossible...");
+               return FALSE;
+       }
+
+       else {
+
+               /*Joining call is impossile when member is more than max
+                * if ( total_call_member >= (CALL_VC_CALL_GROUP_MEMBER_MAX + 1)) : Max Number in Group + Another Call*/
+               if (total_call_member > VC_MAX_CALL_GROUP_MEMBER) {     /*Logic Changed from above line for same condition */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Ended with FALSE...");
+                       return FALSE;
+               }
+
+               else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Ended with TRUE...");
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * This function clears the data of a connected call givenits call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]  pcall_agent     Handle to voicecall engine
+ * @param[in]  call_handle     Call handle of the connected call to be cleared
+ */
+gboolean _vc_core_ca_clear_connected_call(call_vc_callagent_state_t *pcall_agent, int call_handle)
+{
+       call_vc_call_objectinfo_t call_object;
+       gboolean remove = FALSE;
+       int group_index = -1;
+       int grp_mem_num = 0;
+       int i = 0;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle >= 0);
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &call_object);
+       group_index = _vc_core_cm_get_group_index(&pcall_agent->call_manager, (call_vc_handle) call_handle);
+       if (group_index == -1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "ERROR: Not exist");
+               return FALSE;
+       }
+       grp_mem_num = _vc_core_cm_get_member_count_ingroup(&pcall_agent->call_manager, group_index);
+       for (i = 0; i < grp_mem_num; i++) {
+               if ((_vc_core_cm_get_call_state_ingroup_byposition(&pcall_agent->call_manager, group_index, i) != VC_CALL_STATE_ENDED) && (_vc_core_cm_get_call_state_ingroup_byposition(&pcall_agent->call_manager, group_index, i) != VC_CALL_STATE_ENDED_FINISH)) {
+                       remove = TRUE;
+               }
+       }
+       if (remove) {
+               _vc_core_cm_remove_call_object(&pcall_agent->call_manager, call_handle);
+       }
+
+       else {
+               gboolean clear_end_call = TRUE;
+               _vc_core_cm_change_call_state(&call_object, VC_CALL_STATE_ENDED_FINISH);
+               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &call_object);
+               for (i = 0; i < grp_mem_num; i++) {
+                       if (_vc_core_cm_get_call_state_ingroup_byposition(&pcall_agent->call_manager, group_index, i) != VC_CALL_STATE_ENDED_FINISH)
+                               clear_end_call = FALSE;
+               }
+               if (clear_end_call) {
+                       _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+               }
+       }
+       return TRUE;
+}
diff --git a/call-engine/core/vc-core-callmanager.c b/call-engine/core/vc-core-callmanager.c
new file mode 100755 (executable)
index 0000000..806899e
--- /dev/null
@@ -0,0 +1,1913 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <glib.h>
+#include "vc-core-util.h"
+#include "vc-core-callmanager.h"
+#include "vc-core-callagent.h"
+
+char *gaszCallStateName[VC_CALL_STATE_MAX_NUM] = {
+       "CALL_NONE",
+       "CALL_INCOME",
+       "CALL_REJECTED",
+       "CALL_PREPARE_OUTGOING",
+       "CALL_OUTGOING",
+       "CALL_OUTGOING_ORIG",
+       "CALL_OUTGOING_ALERT",
+       "CALL_CANCELLED",
+       "CALL_CONNECTED",
+       "CALL_RELEASE_WAIT",
+       "CALL_ENDED",
+       "CALL_REDIAL",
+       "CALL_ENDED_FINISH",
+};
+
+/*Local Function Declarations*/
+/**
+* This function handles sat engine notification
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           callStatusInfo  Handle to call manager
+* @param[in]           call_handle     telephony call handle
+* @param[out]  pGroup          group to which the call_handle belongs
+* @param[in]           pPos                    positoin in the pGroup in which the call details of call handle is maintained
+*/
+static gboolean __call_vc_cm_gp_get_groupcall_pos(call_vc_manager_t *callStatusInfo, call_vc_handle call_handle, int *pGroup, int *pPos);
+
+/**
+ * This function removes a call member to a group
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     The call handle to be removed
+ * @see                        _vc_core_cm_add_call_member_togroup
+ */
+static gboolean __vc_core_cm_remove_call_member_fromgroup(call_vc_manager_t *pMng, call_vc_handle call_handle);
+
+/*Function Definitions*/
+/**
+ * This function initializes the call manager
+ *
+ * @return             void
+ * @param[out] pMng            Pointer to the call manager structure
+ */
+void _vc_core_call_manager_init(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_IF_FAIL(pMng != NULL);
+       int index = 0;
+
+       memset(pMng, 0, sizeof(call_vc_manager_t));
+
+       /* init call handle */
+       for (index = 0; index < VC_MAX_CALL_MEMBER; index++) {
+               /*CALL_ENG_DEBUG(ENG_DEBUG, "%d",index);*/
+               pMng->callobject_info[index].call_handle = VC_TAPI_INVALID_CALLHANDLE;
+               pMng->callobject_info[index].aoc_ccm = VC_INVALID_CALL_COST;
+               pMng->callobject_info[index].call_id = VC_INVALID_CALL_ID;
+               pMng->callobject_info[index].call_type = VC_CALL_ORIG_TYPE_NORMAL;
+       }
+
+       pMng->setupcall_info.mocall_index = VC_INVALID_CALL_INDEX;
+       pMng->setupcall_info.call_control_type = CALL_VC_SAT_CC_NONE;
+       pMng->mtcall_index = VC_INVALID_CALL_INDEX;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "[pMng->callobject_info initialized]");
+
+}
+
+/**
+ * This function clears the information of a given call state
+ *
+ * @return             void
+ * @param[in]  pcall_object    Pointer to the call object which has to be cleared
+ */
+void _vc_core_cm_clear_call_object(call_vc_call_objectinfo_t *pcall_object)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_object != NULL);
+       memset(pcall_object, 0, sizeof(call_vc_call_objectinfo_t));
+
+       pcall_object->state = VC_CALL_STATE_NONE;
+       pcall_object->call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       pcall_object->aoc_ccm = VC_INVALID_CALL_COST;
+       pcall_object->call_id = VC_INVALID_CALL_ID;
+       pcall_object->call_type = VC_CALL_ORIG_TYPE_NORMAL;
+
+#ifdef _CPHS_DEFINED_
+       pcall_object->alsLine = VC_CALL_CPHS_ALS_NONE;
+#endif
+
+       pcall_object->bccbs_call = FALSE;
+
+}
+
+/**
+* This function clears the information of the callobject available in the given index
+ *
+* @return              TRUE, if the object cleared, otherwise FALSE
+* @param[in]   pMng            Pointer to the call manager structure
+* @param[in]   index           Index of the call object to be cleared
+ */
+gboolean _vc_core_cm_clear_call_object_byindex(call_vc_manager_t *pMng, int index)
+{
+       call_vc_call_objectinfo_t call_object;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(index >= 0 && index <= 7);
+
+       if (TRUE == _vc_core_cm_get_call_object_byindex(pMng, index, &call_object)) {
+               _vc_core_cm_clear_call_object(&call_object);
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function adds the given call object info to a free slot.
+ *
+ * @return             This function returns the call object index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure that need to be added
+ * @see                        _vc_core_cm_set_call_object, _vc_core_cm_remove_call_object
+ */
+int _vc_core_cm_add_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       int index = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pcall_object != NULL);
+
+       for (index = 0; index < VC_MAX_CALL_MEMBER; index++) {
+               if (pMng->callobject_info[index].state == VC_CALL_STATE_NONE) {
+                       memcpy(&pMng->callobject_info[index], pcall_object, sizeof(call_vc_call_objectinfo_t));
+                       return index;
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Insufficient buffer i = %d..", index);
+
+       return VC_TAPI_INVALID_CALLHANDLE;
+}
+
+/**
+ * This function removes the specified call object info of a given call handle
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Handle of the call object to be removed
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_remove_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+       int groupIndex = -1;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "[Call Handle = %d]", call_handle);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].call_handle == call_handle) {
+                       if (pMng->setupcall_info.mocall_index == i) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Removing MO Call Info >> i=%d", i);
+                               pMng->setupcall_info.mocall_index = VC_INVALID_CALL_INDEX;
+                               pMng->setupcall_info.no_service_state = FALSE;
+                       } else if (pMng->mtcall_index == i) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Removing MT Call Info >> i=%d", i);
+                               pMng->mtcall_index = VC_INVALID_CALL_INDEX;
+                       } else {
+                               groupIndex = _vc_core_cm_get_group_index(pMng, call_handle);
+                               __vc_core_cm_remove_call_member_fromgroup(pMng, call_handle);
+                       }
+                       _vc_core_cm_clear_call_object(&(pMng->callobject_info[i]));
+                       break;
+               }
+
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function retrieves the given call object info
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle of the object info to be retrieved
+ * @param[out] pcall_object    Pointer to the call object info structure that should be retrieved
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_get_call_object(call_vc_manager_t *pMng, call_vc_handle call_handle, call_vc_call_objectinfo_t *pcall_object)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_object != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].call_handle == call_handle) {
+                       memcpy(pcall_object, &pMng->callobject_info[i], sizeof(call_vc_call_objectinfo_t));
+                       return TRUE;
+               }
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function retrieves the given call object info
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          index           index of the object info to be retrieved
+ * @param[out] pcall_object    Pointer to the call object info structure that should be retrieved
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_set_call_object
+ */
+gboolean _vc_core_cm_get_call_object_byindex(call_vc_manager_t *pMng, int index, call_vc_call_objectinfo_t *pcall_object)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(index >= 0 && index <= 7);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_object != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (i == index) {
+                       memcpy(pcall_object, &pMng->callobject_info[i], sizeof(call_vc_call_objectinfo_t));
+                       return TRUE;
+               }
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function retrieves the call state of a given call handle
+ *
+ * @return             This function returns the call state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle for which the state has to be retrieved
+ */
+voicecall_call_state_t _vc_core_cm_get_call_state(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, VC_CALL_STATE_NONE);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE, VC_CALL_STATE_NONE);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].call_handle == call_handle) {
+                       return pMng->callobject_info[i].state;
+               }
+       }
+
+       return VC_CALL_STATE_NONE;
+}
+
+ /**
+ * This function retrieves the number of call members in various states of a call
+ *
+ * @return             Number of call members available
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_call_member_count(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int nCount = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].state != VC_CALL_STATE_NONE)
+                       nCount++;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "%d", nCount);
+
+       return nCount;
+}
+
+/**
+ * This function sets the given call object info to the given slot
+ *
+ * @return             This function returns the call object index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure that need to be modified
+ * @see                        _vc_core_cm_add_call_object, _vc_core_cm_remove_call_object, _vc_core_cm_get_call_object
+ */
+int _vc_core_cm_set_call_object(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pcall_object != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].call_handle == pcall_object->call_handle) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "[Call Handle = %d]", pcall_object->call_handle);
+                       memcpy(&pMng->callobject_info[i], pcall_object, sizeof(call_vc_call_objectinfo_t));
+                       return i;
+               }
+       }
+
+       return VC_TAPI_INVALID_CALLHANDLE;
+}
+
+/**
+ * This function returns the number of calls in a given call state
+ *
+ * @return             This function returns the number of calls in the given state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          state           The call state the number of which has to be retrieved
+ */
+int _vc_core_cm_get_call_state_num(call_vc_manager_t *pMng, voicecall_call_state_t state)
+{
+       int i = 0;
+       int count = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].state == state) {
+                       count++;
+               }
+       }
+       return count;
+}
+
+static gboolean __call_vc_cm_gp_get_groupcall_pos(call_vc_manager_t *callStatusInfo, call_vc_handle call_handle, int *pGroup, int *pPos)
+{
+       int group = 0;
+       int pos = 0;
+       gboolean bFound = FALSE;
+       call_vc_groupinfo_t *pcall_group_info = NULL;
+       call_vc_call_objectinfo_t *pcall_object_info = NULL;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(callStatusInfo != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pGroup != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pPos != NULL);
+
+       /*Optimization: Avoiding Long dereferencing inside loops */
+       pcall_group_info = callStatusInfo->callgroup_info;
+       pcall_object_info = callStatusInfo->callobject_info;
+       for (group = 0; group < CALL_VC_CALL_GROUP_MAX; group++) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "callStatusInfo->callgroup_info[%d].num:%d", group, callStatusInfo->callgroup_info[group].num);
+               for (pos = 0; pos < pcall_group_info[group].num; pos++) {
+                       int v = pcall_group_info[group].callobject_index[pos];
+                       if (pcall_object_info[v].call_handle == call_handle) {
+                               bFound = TRUE;
+                               break;
+                       }
+               }
+               if (bFound)
+                       break;
+       }
+
+       if (bFound == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "fail to get");
+               return FALSE;
+       }
+
+       *pGroup = group;
+       *pPos = pos;
+
+       return TRUE;
+
+}
+
+/**
+ * This function adds a call member to a group
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callobject_index        The object index of the call object to be added
+ * @see                        __vc_core_cm_remove_call_member_fromgroup
+ */
+gboolean _vc_core_cm_add_call_member_togroup(call_vc_manager_t *pMng, int callobject_index)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng->callgroup_info[CALL_VC_CALL_GROUP_1].state == CALL_VC_GROUP_STATE_NONE);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "member index=%d", callobject_index);
+
+       /* Every Member should be added to a new group when added for the first time. First check whether Group 0 has any members.
+          If Group 0 has any previous members then move all members in the Group 0 to  Group 1 and Group 0 must be in held state
+          as the current call is going to be active in the new group. Then add this new call to the Group 0 and Group 0 becomes active group */
+       if (pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state != CALL_VC_GROUP_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Copying Group 0 data to Group 1");
+               VOICECALL_RETURN_FALSE_IF_FAIL(pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state == CALL_VC_GROUP_STATE_HOLD);
+               memcpy(&(pMng->callgroup_info[CALL_VC_CALL_GROUP_1]), &(pMng->callgroup_info[CALL_VC_CALL_GROUP_0]), sizeof(call_vc_groupinfo_t));
+       }
+
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].num = 1;
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].callobject_index[0] = callobject_index;
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state = CALL_VC_GROUP_STATE_ACTIVE;
+
+       /*If the currently added call is Incoming or Outgoing call then make the Incoming/Outgoing status
+          invalid since the call has been connected and added to call group */
+       if (callobject_index == pMng->setupcall_info.mocall_index) {
+               pMng->setupcall_info.mocall_index = VC_INVALID_CALL_INDEX;
+               pMng->setupcall_info.no_service_state = FALSE;
+       } else if (callobject_index == pMng->mtcall_index) {
+               pMng->mtcall_index = VC_INVALID_CALL_INDEX;
+       } else {
+               return FALSE;
+       }
+
+       return TRUE;
+
+}
+
+/**
+ * This function removes a call member to a group
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     The call handle to be removed
+ * @see                        _vc_core_cm_add_call_member_togroup
+ */
+gboolean __vc_core_cm_remove_call_member_fromgroup(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int group = 0;
+       int pos = 0;
+       int i = 0;
+       call_vc_groupinfo_t *pcall_group_info = NULL;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+       /*Findout the Index Group number and the index posistion in the group for the given call handle */
+       if (__call_vc_cm_gp_get_groupcall_pos(pMng, call_handle, &group, &pos) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "fail to remove");
+               return FALSE;
+       }
+
+       /*Optimization: Avoiding Long dereferencing inside loops */
+       pcall_group_info = pMng->callgroup_info;
+       for (i = pos + 1; i < pMng->callgroup_info[group].num; i++) {
+               pcall_group_info[group].callobject_index[i - 1] = pcall_group_info[group].callobject_index[i];
+       }
+
+       pcall_group_info[group].num--;
+
+       /*If the number of members in the group become 0, then make the group status to none */
+       if (pcall_group_info[group].num == 0) {
+               pcall_group_info[group].state = CALL_VC_GROUP_STATE_NONE;
+
+               /*If Group 0 becomes none and Group 1 has any  members , then move the Group 1 members to Group 0
+                  Always the Group 0 is prefered group by default, this logic is to simplify all other search mehods. */
+               if ((group == 0) && (pcall_group_info[CALL_VC_CALL_GROUP_1].num > 0)) {
+                       memcpy(&(pcall_group_info[0]), &(pcall_group_info[1]), sizeof(call_vc_groupinfo_t));
+                       memset(&(pcall_group_info[1]), 0, sizeof(call_vc_groupinfo_t));
+               }
+       }
+
+       return TRUE;
+
+}
+
+/**
+ * This function clears the call object information of the ended and finished calls
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+gboolean _vc_core_cm_clear_endcall_member(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       call_vc_call_objectinfo_t *pcall_object_info = NULL;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "...");
+
+       /*Optimization: Avoiding Long dereferencing inside loops */
+       pcall_object_info = pMng->callobject_info;
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if ((pcall_object_info[i].state == VC_CALL_STATE_ENDED) || (pcall_object_info[i].state == VC_CALL_STATE_ENDED_FINISH)) {
+                       __vc_core_cm_remove_call_member_fromgroup(pMng, pcall_object_info[i].call_handle);
+
+                       _vc_core_cm_clear_call_object(&pcall_object_info[i]);
+               }
+       }
+       return TRUE;
+}
+
+/**
+ * This function sets the state of a given group
+ *
+ * @return             void
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          The call group for which the state needs to be changed
+ * @param[in]          state           The state to be set
+ * @see                        _vc_core_cm_swap_group_state, _vc_core_cm_get_call_pos_ingroup
+ */
+void _vc_core_cm_set_group_state(call_vc_manager_t *pMng, int nGroup, call_vc_groupstate_t state)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "group=%d, state=%d", nGroup, state);
+
+       VOICECALL_RETURN_IF_FAIL(pMng != NULL);
+       /*Only Group 0 and Group 1 are possible */
+       VOICECALL_RETURN_IF_FAIL((nGroup >= CALL_VC_CALL_GROUP_0 && nGroup < CALL_VC_CALL_GROUP_MAX));
+       
+       pMng->callgroup_info[nGroup].state = state;
+}
+
+/**
+ * This function retrieves the index of the group given the call handle
+ *
+ * @return             Returns group index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     The for which the group index has to be retrieved
+ * @see                        _vc_core_cm_set_group_state, _vc_core_cm_get_call_pos_ingroup
+ */
+int _vc_core_cm_get_group_index(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int group = 0;
+       int index = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       if (__call_vc_cm_gp_get_groupcall_pos(pMng, call_handle, &group, &index) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "fail");
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       return group;
+}
+
+/**
+ * This function retrieves the index/position of the call info in the object info table for a given call handle
+ *
+ * @return             Returns index on success and -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group ID
+ * @param[in]          call_handle     The call handle for which the call index has to be retrieved
+ * @see                        _vc_core_cm_get_group_index
+ */
+int _vc_core_cm_get_call_pos_ingroup(call_vc_manager_t *pMng, int nGroup, call_vc_handle call_handle)
+{
+       int i = 0;
+       int idx = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL((nGroup >= CALL_VC_CALL_GROUP_0 && nGroup < CALL_VC_CALL_GROUP_MAX));
+       VOICECALL_RETURN_INVALID_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       for (i = 0; i < pMng->callgroup_info[nGroup].num; i++) {
+               idx = pMng->callgroup_info[nGroup].callobject_index[i];
+               if (pMng->callobject_info[idx].call_handle == call_handle)
+                       return i;
+       }
+       return VC_TAPI_INVALID_CALLHANDLE;
+}
+
+/**
+ * This function swaps the state of the groups
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_set_group_state
+ */
+gboolean _vc_core_cm_swap_group_state(call_vc_manager_t *pMng)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       pMng->callgroup_info[i].state = CALL_VC_GROUP_STATE_ACTIVE;
+               else if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       pMng->callgroup_info[i].state = CALL_VC_GROUP_STATE_HOLD;
+       }
+       return TRUE;
+}
+
+/**
+ * This function joins the groups
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_split_group
+ */
+gboolean _vc_core_cm_join_group(call_vc_manager_t *pMng)
+{
+       int callIndex[VC_MAX_CALL_MEMBER];
+       int i = 0;
+       int j = 0;
+       int nCount = 0;
+       int totalMember = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       totalMember = _vc_core_cm_get_total_members_ingroup(pMng);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Total Members: %d", totalMember);
+
+       for (i = CALL_VC_CALL_GROUP_MAX - 1; i >= 0; i--) {
+               for (j = 0; j < pMng->callgroup_info[i].num; j++) {
+                       callIndex[nCount] = pMng->callgroup_info[i].callobject_index[j];
+                       nCount++;
+               }
+       }
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(nCount <= VC_MAX_CALL_GROUP_MEMBER);
+
+       for (i = 0; i < nCount; i++) {
+               pMng->callgroup_info[CALL_VC_CALL_GROUP_0].callobject_index[i] = callIndex[i];
+       }
+
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].num = nCount;
+       if (nCount == 0)
+               pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state = CALL_VC_GROUP_STATE_NONE;
+       else
+               pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state = CALL_VC_GROUP_STATE_ACTIVE;
+
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_1].num = 0;
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_1].state = CALL_VC_GROUP_STATE_NONE;
+
+       return TRUE;
+
+}
+
+/**
+ * This function splits the group given a call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          call_handle     Call handle
+ * @see                        _vc_core_cm_join_group
+ */
+gboolean _vc_core_cm_split_group(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int group = 0;
+       int pos = 0;
+       int i = 0;
+       int count = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       if (__call_vc_cm_gp_get_groupcall_pos(pMng, call_handle, &group, &pos) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "fail");
+               return FALSE;
+       }
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(group == 0);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng->callgroup_info[CALL_VC_CALL_GROUP_1].state == CALL_VC_GROUP_STATE_NONE);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "group=%d, pos=%d, Call Handle = %d, title=%s", group, pos, call_handle, pMng->callobject_info[pMng->callgroup_info[group].callobject_index[pos]].tel_number);
+
+       for (i = 0; i < pMng->callgroup_info[0].num; i++) {
+               if (i != pos) {
+                       pMng->callgroup_info[CALL_VC_CALL_GROUP_1].callobject_index[count] = pMng->callgroup_info[CALL_VC_CALL_GROUP_0].callobject_index[i];
+                       count++;
+               }
+       }
+
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_1].num = count;
+
+       if (count == 0)
+               pMng->callgroup_info[CALL_VC_CALL_GROUP_1].state = CALL_VC_GROUP_STATE_NONE;
+       else
+               pMng->callgroup_info[CALL_VC_CALL_GROUP_1].state = CALL_VC_GROUP_STATE_HOLD;
+
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].num = 1;
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].state = CALL_VC_GROUP_STATE_ACTIVE;
+       pMng->callgroup_info[CALL_VC_CALL_GROUP_0].callobject_index[0] = pMng->callgroup_info[CALL_VC_CALL_GROUP_0].callobject_index[pos];
+
+       return TRUE;
+
+}
+
+/**
+ * This function retreives the group state for the given group index
+ *
+ * @return             This function returns the group state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          group index
+ */
+call_vc_groupstate_t _vc_core_cm_get_group_state(call_vc_manager_t *pMng, int nGroup)
+{
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, CALL_VC_GROUP_STATE_NONE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, CALL_VC_GROUP_STATE_NONE);
+
+       return pMng->callgroup_info[nGroup].state;
+}
+
+/**
+ * This function retrieves the number of members in a group
+ *
+ * @return             Returns number of members in the group
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ */
+int _vc_core_cm_get_member_count_ingroup(call_vc_manager_t *pMng, int nGroup)
+{
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, CALL_VC_GROUP_STATE_NONE);
+
+       return pMng->callgroup_info[nGroup].num;
+}
+
+/**
+ * This function retrieves the total number of members in all the groups
+ *
+ * @return             Returns the total number of members
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_total_members_ingroup(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Members in Group 0: %d, Members in Group 1: %d", pMng->callgroup_info[CALL_VC_CALL_GROUP_0].num, pMng->callgroup_info[CALL_VC_CALL_GROUP_1].num);
+       return (pMng->callgroup_info[CALL_VC_CALL_GROUP_0].num + pMng->callgroup_info[CALL_VC_CALL_GROUP_1].num);
+}
+
+/**
+ * This function retrieves the number of connected members in a group
+ *
+ * @return             Returns number of connected members in the group
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ */
+int _vc_core_cm_get_connected_member_count_ingroup(call_vc_manager_t *pMng, int nGroup)
+{
+       int i = 0;
+       int callIndex = 0;
+       int count = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, CALL_VC_GROUP_STATE_NONE);
+
+       for (i = 0; i < pMng->callgroup_info[nGroup].num; i++) {
+               callIndex = pMng->callgroup_info[nGroup].callobject_index[i];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       count++;
+               }
+       }
+       return count;
+
+}
+
+/**
+ * This function retrieves the total number of groups
+ *
+ * @return             Returns the total number of groups
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_group_count(call_vc_manager_t *pMng)
+{
+       int num = 0;
+       int i = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "pMng->callgroup_info[%d].num = %d", i, pMng->callgroup_info[i].num);
+
+               if (pMng->callgroup_info[i].num != 0)
+                       num++;
+       }
+       return num;
+}
+
+/**
+ * This function retrieves the call state of a given group and object position
+ *
+ * @return             Returns call state of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ */
+voicecall_call_state_t _vc_core_cm_get_call_state_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos)
+{
+       int memIndex = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, VC_CALL_STATE_NONE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, VC_CALL_STATE_NONE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nPos, 0, 4, VC_CALL_STATE_NONE);
+
+       if (pMng->callgroup_info[nGroup].state == CALL_VC_GROUP_STATE_NONE) {
+               return VC_CALL_STATE_NONE;
+       }
+
+       if (nPos >= pMng->callgroup_info[nGroup].num) {
+               return VC_CALL_STATE_NONE;
+       }
+
+       memIndex = pMng->callgroup_info[nGroup].callobject_index[nPos];
+
+       return pMng->callobject_info[memIndex].state;
+}
+
+/**
+ * This function retrieves the call object info of a given group and object position
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ * @param[out] pcall_object    Pointer to the call object info structure
+ */
+gboolean _vc_core_cm_get_call_info_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos, call_vc_call_objectinfo_t *pcall_object)
+{
+       int memIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, FALSE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nPos, 0, 4, FALSE);
+
+       if (pMng->callgroup_info[nGroup].state == CALL_VC_GROUP_STATE_NONE)
+               return FALSE;
+       if (nPos >= pMng->callgroup_info[nGroup].num)
+               return FALSE;
+
+       memIndex = pMng->callgroup_info[nGroup].callobject_index[nPos];
+
+       memcpy(pcall_object, &pMng->callobject_info[memIndex], sizeof(call_vc_call_objectinfo_t));
+
+       return TRUE;
+}
+
+/**
+ * This function checks if connected call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexits_outgoing_call, _vc_core_cm_isexists_incoming_call
+ */
+gboolean _vc_core_cm_isexists_connected_call(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int group = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (group = 0; group < CALL_VC_CALL_GROUP_MAX; group++) {
+               for (i = 0; i < pMng->callgroup_info[group].num; i++) {
+                       callIndex = pMng->callgroup_info[group].callobject_index[i];
+                       if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                               return TRUE;
+                       }
+               }
+       }
+       return FALSE;
+
+}
+
+/**
+ * This function retrieves the group state for a given call ID of an
+ *
+ * @return             This function returns the group state
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callID          The call ID of the object
+ */
+call_vc_groupstate_t _vc_core_cm_get_group_state_callid(call_vc_manager_t *pMng, int callID)
+{
+       int i = 0;
+       int nGroup = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, CALL_VC_GROUP_STATE_NONE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(callID, 1, 7, FALSE);
+
+       for (nGroup = 0; nGroup < CALL_VC_CALL_GROUP_MAX; nGroup++) {
+               if (pMng->callgroup_info[nGroup].state == CALL_VC_GROUP_STATE_NONE)
+                       continue;
+
+               for (i = 0; i < pMng->callgroup_info[nGroup].num; i++) {
+                       callIndex = pMng->callgroup_info[nGroup].callobject_index[i];
+                       if (pMng->callobject_info[callIndex].call_id == callID) {
+                               return pMng->callgroup_info[nGroup].state;
+                       }
+               }
+       }
+
+       return CALL_VC_GROUP_STATE_NONE;
+
+}
+
+/**
+ * This function clears the outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_set_outgoing_call
+ */
+gboolean _vc_core_cm_clear_outgoing_call(call_vc_manager_t *pMng)
+{
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index != VC_INVALID_CALL_INDEX) {
+               _vc_core_cm_clear_call_object(&(pMng->callobject_info[pMng->setupcall_info.mocall_index]));
+               pMng->setupcall_info.mocall_index = VC_INVALID_CALL_INDEX;
+               pMng->setupcall_info.no_service_state = FALSE;
+               pMng->setupcall_info.call_control_type = CALL_VC_SAT_CC_NONE;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "remove outgoing call info");
+               return TRUE;
+       }
+       return FALSE;
+}
+
+/**
+ * This function sets the out going call index
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callIndex               Call index that needs to be set
+ * @see                        _vc_core_cm_clear_outgoing_call
+ */
+gboolean _vc_core_cm_set_outgoing_call(call_vc_manager_t *pMng, int callIndex)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index != VC_INVALID_CALL_INDEX) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "previous mo call not cleard!");
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "index=%d", callIndex);
+
+       pMng->setupcall_info.mocall_index = callIndex;
+
+       return TRUE;
+}
+
+/**
+ * This function retrieves the outgoing call handle
+ *
+ * @return             Returns out going call handle on success and TAPI_INVALID_CALLHANDLE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+call_vc_handle _vc_core_cm_get_outgoing_call_handle(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index == VC_INVALID_CALL_INDEX) {
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       return pMng->callobject_info[pMng->setupcall_info.mocall_index].call_handle;
+}
+
+/**
+ * This function retrieves the outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_set_outgoing_call_info
+ */
+gboolean _vc_core_cm_get_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index == VC_INVALID_CALL_INDEX)
+               return FALSE;
+       memcpy(pcall_object, &pMng->callobject_info[pMng->setupcall_info.mocall_index], sizeof(call_vc_call_objectinfo_t));
+
+       return TRUE;
+}
+
+/**
+ * This function sets the given outgoing call information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_get_outgoing_call_info
+ */
+gboolean _vc_core_cm_set_outgoing_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index == VC_INVALID_CALL_INDEX)
+               return FALSE;
+       memcpy(&pMng->callobject_info[pMng->setupcall_info.mocall_index], pcall_object, sizeof(call_vc_call_objectinfo_t));
+
+       return TRUE;
+}
+
+/**
+ * This function checks if outgoing call exists
+ *
+ * @return             Returns TRUE if outgoing call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexists_incoming_call, _vc_core_cm_isexists_connected_call
+ */
+gboolean _vc_core_cm_isexits_outgoing_call(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->setupcall_info.mocall_index == VC_INVALID_CALL_INDEX)
+               return FALSE;
+       else
+               return TRUE;
+}
+
+/**
+ * This function sets the incoming call index
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callIndex               Call index of the incoming call
+ */
+gboolean _vc_core_cm_set_incoming_call(call_vc_manager_t *pMng, int callIndex)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (pMng->mtcall_index != VC_INVALID_CALL_INDEX) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "previous mo call not cleard!");
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "index=%d", callIndex);
+       pMng->mtcall_index = callIndex;
+
+       return TRUE;
+}
+
+/**
+* This function retrieves the call handle of the incoming call
+*
+* @return              Returns the call handle if success, TAPI_INVALID_CALLHANDLE on failure
+* @param[in]           pMng            Pointer to the call manager structure
+* @see                 _vc_core_cm_get_incoming_call_info
+*/
+call_vc_handle _vc_core_cm_get_incoming_call_handle(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+
+       if (pMng->mtcall_index == VC_INVALID_CALL_INDEX) {
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       return pMng->callobject_info[pMng->mtcall_index].call_handle;
+}
+
+/**
+ * This function retrieves the call information of the incoming call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_get_incoming_call_info, __vc_core_cm_set_incoming_call_info
+ */
+gboolean _vc_core_cm_get_incoming_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_object != NULL);
+
+       call_handle = _vc_core_cm_get_incoming_call_handle(pMng);
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle) {
+               return FALSE;
+       }
+       return _vc_core_cm_get_call_object(pMng, call_handle, pcall_object);
+}
+
+/**
+ * This function sets the call information of the incoming call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pcall_object    Pointer to the call object info structure
+ * @see                        _vc_core_cm_get_incoming_call_info
+ */
+gboolean __vc_core_cm_set_incoming_call_info(call_vc_manager_t *pMng, call_vc_call_objectinfo_t *pcall_object)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_object != NULL);
+
+       if (VC_INVALID_CALL_INDEX == pMng->mtcall_index) {
+               return FALSE;
+       }
+       memcpy(&pMng->callobject_info[pMng->mtcall_index], pcall_object, sizeof(call_vc_call_objectinfo_t));
+
+       return TRUE;
+}
+
+/**
+ * This function checks if incoming call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexits_outgoing_call, _vc_core_cm_isexists_connected_call
+ */
+gboolean _vc_core_cm_isexists_incoming_call(call_vc_manager_t *pMng)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       CALL_ENG_DEBUG(ENG_DEBUG, "[pMng=0x%x]", pMng);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "[pMng->mtcall_index=%d]", pMng->mtcall_index);
+
+       if (pMng->mtcall_index == VC_INVALID_CALL_INDEX)
+               return FALSE;
+       else
+               return TRUE;
+}
+
+/**
+ * This function retrieves the call handle of a given group and object position
+ *
+ * @return             Returns call handle of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          nGroup          Group index
+ * @param[in]          nPos                    Call object index
+ */
+call_vc_handle _vc_core_cm_get_call_handle_ingroup_byposition(call_vc_manager_t *pMng, int nGroup, int nPos)
+{
+       int callIndex = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nGroup, 0, 1, VC_TAPI_INVALID_CALLHANDLE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nPos, 0, 4, VC_TAPI_INVALID_CALLHANDLE);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng->callgroup_info[nGroup].state != CALL_VC_GROUP_STATE_NONE);
+       VOICECALL_RETURN_INVALID_IF_FAIL(nPos <= pMng->callgroup_info[nGroup].num);
+
+       callIndex = pMng->callgroup_info[nGroup].callobject_index[nPos];
+
+       return pMng->callobject_info[callIndex].call_handle;
+}
+
+/**
+ * This function retrieves the call handle of a given call ID
+ *
+ * @return             Returns call handle of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          callID          Call ID for a given call object
+ */
+call_vc_handle _vc_core_cm_get_call_handle_ingroup_bycallId(call_vc_manager_t *pMng, int callID)
+{
+       int i = 0;
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(callID, 1, 7, VC_TAPI_INVALID_CALLHANDLE);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (pMng->callobject_info[i].call_id == callID) {
+                       return pMng->callobject_info[i].call_handle;
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "return VC_TAPI_INVALID_CALLHANDLE");
+
+       return call_handle;
+
+}
+
+/**
+ * This function retrieves the call handle of a given telephone number
+ *
+ * @return             Returns call handle of the object
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          tel_number      Telephone number of a call object
+ */
+call_vc_handle __vc_core_cm_get_call_handle_ingroup_bynumber(call_vc_manager_t *pMng, char *tel_number)
+{
+       int group = 0;
+       int i = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(tel_number != NULL);
+
+       if (strlen(tel_number) == 0) {
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       for (group = 0; group < CALL_VC_CALL_GROUP_MAX; group++) {
+               for (i = 0; i < pMng->callgroup_info[group].num; i++) {
+                       callIndex = pMng->callgroup_info[group].callobject_index[i];
+                       if (strcmp(pMng->callobject_info[callIndex].tel_number, tel_number) == 0) {
+                               return pMng->callobject_info[callIndex].call_handle;
+                       }
+               }
+       }
+
+       return VC_TAPI_INVALID_CALLHANDLE;
+
+}
+
+/**
+ * This function retrieves the call handle of the first active call
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @see                        _vc_core_cm_get_next_active_call_handle
+ */
+int _vc_core_cm_get_first_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall)
+{
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pCall != NULL);
+
+       if (_vc_core_cm_get_total_members_ingroup(pMng) == 0 && _vc_core_cm_isexits_outgoing_call(pMng)) {
+               *pCall = _vc_core_cm_get_outgoing_call_handle(pMng);
+               return VC_TAPI_INVALID_CALLHANDLE;
+
+       }
+
+       return _vc_core_cm_get_next_active_call_handle(pMng, pCall, 0);
+}
+
+/**
+ * This function retrieves the call handle of the first held call
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @see                        _vc_core_cm_get_next_held_call_handle
+ */
+int _vc_core_cm_get_first_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall)
+{
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pCall != NULL);
+
+       return _vc_core_cm_get_next_held_call_handle(pMng, pCall, 0);
+}
+
+/**
+ * This function retrieves the next active call handle
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @param[in]          nPos                    Current position of the call object index
+ * @see                        _vc_core_cm_get_first_active_call_handle
+ */
+int _vc_core_cm_get_next_active_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pCall != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               *pCall = VC_TAPI_INVALID_CALLHANDLE;
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       for (k = nPos; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       *pCall = pMng->callobject_info[callIndex].call_handle;
+                       return k + 1;
+               }
+       }
+
+       *pCall = VC_TAPI_INVALID_CALLHANDLE;
+
+       return VC_TAPI_INVALID_CALLHANDLE;
+
+}
+
+/**
+ * This function retrieves the next held call handle
+ *
+ * @return             Returns the call handle on sucess, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[in]          pCall           Pointer to the call handle where the retrieved call handle need to be stored
+ * @param[in]          nPos                    Current position of the call object index
+ * @see                        _vc_core_cm_get_first_held_call_handle
+ */
+int _vc_core_cm_get_next_held_call_handle(call_vc_manager_t *pMng, call_vc_handle *pCall, int nPos)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_INVALID_IF_FAIL(pCall != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               *pCall = VC_TAPI_INVALID_CALLHANDLE;
+               return VC_TAPI_INVALID_CALLHANDLE;
+       }
+
+       for (k = nPos; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       *pCall = pMng->callobject_info[callIndex].call_handle;
+                       return k + 1;
+               }
+       }
+
+       *pCall = VC_TAPI_INVALID_CALLHANDLE;
+
+       return VC_TAPI_INVALID_CALLHANDLE;
+
+}
+
+/**
+ * This function checks if active call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexists_held_call
+ */
+gboolean _vc_core_cm_isexists_active_call(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "returns TRUE");
+                       return TRUE;
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "returns FALSE");
+
+       return FALSE;
+
+}
+
+/**
+ * This function checks if held call exists
+ *
+ * @return             Returns TRUE if call exist FALSE otherwise
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_isexists_active_call
+ */
+gboolean _vc_core_cm_isexists_held_call(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "returns TRUE");
+
+                       return TRUE;
+               }
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "returns FALSE");
+       return FALSE;
+}
+
+/**
+ * This function retrieves the number of active calls
+ *
+ * @return             Returns number of active calls
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_call_count
+ */
+int _vc_core_cm_get_active_call_count(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+       int count = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return 0;
+       }
+
+       count = 0;
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       count++;
+               }
+       }
+       return count;
+}
+
+/**
+ * This function retrieves the number of held calls
+ *
+ * @return             Returns number of held calls
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_call_count
+ */
+int _vc_core_cm_get_held_call_count(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+       int count = 0;
+
+       VOICECALL_RETURN_ZERO_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return 0;
+       }
+
+       count = 0;
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       count++;
+               }
+       }
+       return count;
+}
+
+/**
+ * This function retrieves the group index of active calls
+ *
+ * @return             Returns the group index
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_held_group_index
+ */
+int _vc_core_cm_get_active_group_index(call_vc_manager_t *pMng)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (_vc_core_cm_get_group_state(pMng, i) == CALL_VC_GROUP_STATE_ACTIVE)
+                       return i;
+       }
+       return VC_TAPI_INVALID_CALLHANDLE;
+}
+
+/**
+ * This function retrieves the group index of held calls
+ *
+ * @return             Returns the group index
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @see                        _vc_core_cm_get_active_group_index
+ */
+int _vc_core_cm_get_held_group_index(call_vc_manager_t *pMng)
+{
+       int i = 0;
+
+       VOICECALL_RETURN_INVALID_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (_vc_core_cm_get_group_state(pMng, i) == CALL_VC_GROUP_STATE_HOLD)
+                       return i;
+       }
+       return VC_TAPI_INVALID_CALLHANDLE;
+
+}
+
+ /**
+ * This function changes the state of the given onject info
+ *
+ * @return             void
+ * @param[in]          info                    Pointer to the call object into structure for which the state has to be changed
+ * @param[in]          callState               State that needs to be set
+ */
+void inline _vc_core_cm_change_call_state(call_vc_call_objectinfo_t *info, voicecall_call_state_t callState)
+{
+       VOICECALL_RETURN_IF_FAIL(info != NULL);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d..%s(%d)-->%s(%d))", info->call_handle, gaszCallStateName[info->state], info->state, gaszCallStateName[callState], callState);
+       info->state = callState;
+}
+
+/**
+ * This function dumps the complete information in the call manager
+ *
+ * @return             void
+ * @param[in]          info            Pointer to the call manager structure
+ */
+void _vc_core_cm_test_dump(call_vc_manager_t *info)
+{
+       int i = 0;
+       int j = 0;
+       int count = 0;
+       char szBuffer[320];
+
+       VOICECALL_RETURN_IF_FAIL(info != NULL);
+       CALL_ENG_DEBUG(ENG_ERR, "************START*****************CALL_DETAILS_DUMP************START*****************");
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               char szTemp[10];
+               memset(szTemp, 0, sizeof(szTemp));
+               if (info->callgroup_info[i].state == CALL_VC_GROUP_STATE_NONE) {
+                       snprintf(szTemp, 5, "%s", "NONE");
+               } else if (info->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE) {
+                       snprintf(szTemp, 7, "%s", "ACTIVE");
+               } else if (info->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD) {
+                       snprintf(szTemp, 5, "%s", "HOLD");
+               }
+
+               snprintf(szBuffer, (27 + sizeof(i) + sizeof(int) + sizeof(szTemp)), "__________ group=%d(num=%d) %s", i, info->callgroup_info[i].num, szTemp);
+               CALL_ENG_DEBUG(ENG_ERR, "%s", szBuffer);
+               for (j = 0; j < info->callgroup_info[i].num; j++) {
+                       snprintf(szBuffer, (50 + sizeof(j) + sizeof(int) + sizeof(int) + VC_PHONE_NUMBER_LENGTH_MAX),
+                                "             __pos=%d, bufindex=%d, Call Handle = %d, [%s], state:[%d]",
+                                j, info->callgroup_info[i].callobject_index[j],
+                                info->callobject_info[info->callgroup_info[i].callobject_index[j]].call_handle,
+                                info->callobject_info[info->callgroup_info[i].callobject_index[j]].tel_number, info->callobject_info[info->callgroup_info[i].callobject_index[j]].state);
+                       CALL_ENG_DEBUG(ENG_ERR, "%s", szBuffer);
+               }
+       }
+       if (info->setupcall_info.mocall_index == VC_INVALID_CALL_INDEX) {
+               CALL_ENG_DEBUG(ENG_ERR, "_______ MO call not exist");
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "_______ MO callIndex=%d, Call Handle = %d, %s",
+                              info->setupcall_info.mocall_index, info->callobject_info[info->setupcall_info.mocall_index].call_handle, info->callobject_info[info->setupcall_info.mocall_index].tel_number);
+       }
+       if (info->mtcall_index == VC_INVALID_CALL_INDEX) {
+               CALL_ENG_DEBUG(ENG_ERR, "_______ MT call not exist");
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "_______ MT callIndex=%d, Call Handle = %d, [%s], state:[%d]",
+                              info->mtcall_index, info->callobject_info[info->mtcall_index].call_handle, info->callobject_info[info->mtcall_index].tel_number, info->callobject_info[info->mtcall_index].state);
+       }
+       count = 0;
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if (info->callobject_info[i].call_handle != VC_TAPI_INVALID_CALLHANDLE) {
+                       count++;
+               }
+       }
+       CALL_ENG_DEBUG(ENG_ERR, "____Call Handle Num=%d", count);
+       CALL_ENG_DEBUG(ENG_ERR, "**************END*****************CALL_DETAILS_DUMP**************END*****************");
+}
+
+#ifdef UNUSED_APIS
+unsigned long call_vc_cm_search_oldcall(call_vc_manager_t *pMng, gboolean activegroup)
+{
+       int index = 0;
+       int totalmember = 0;
+       int k = 0;
+       int min = 0;
+       unsigned long mintmconnected = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, 0);
+       if (activegroup == TRUE) {
+               index = _vc_core_cm_get_active_group_index(pMng);
+       } else if (activegroup == FALSE) {
+               index = _vc_core_cm_get_held_group_index(pMng);
+       }
+
+       totalmember = pMng->callgroup_info[index].num;
+
+       if (totalmember > 1) {
+               for (k = 1; k < totalmember; k++) {
+                       if (pMng->callobject_info[pMng->callgroup_info[index].callobject_index[k]].connected_time < pMng->callobject_info[pMng->callgroup_info[index].callobject_index[min]].connected_time) {
+                               min = k;
+                       }
+               }
+               mintmconnected = pMng->callobject_info[pMng->callgroup_info[index].callobject_index[min]].connected_time;
+       } else if (totalmember == 1)
+               mintmconnected = pMng->callobject_info[pMng->callgroup_info[index].callobject_index[0]].connected_time;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "index = %d", index);
+       CALL_ENG_DEBUG(ENG_DEBUG, "totalmember = %d", totalmember);
+       CALL_ENG_DEBUG(ENG_DEBUG, "min = %d", min);
+       CALL_ENG_DEBUG(ENG_DEBUG, "min tmconnected = %d", mintmconnected);
+
+       return mintmconnected;
+
+}
+
+unsigned long call_vc_cm_search_next_oldcall(call_vc_manager_t *pMng, gboolean activegroup, call_vc_handle call_handle)
+{
+       int index = 0;
+       int totalmember = 0;
+       int i = 0;
+       int k = 0;
+       int min = 0;
+       int j = 0;
+       int searchinfonum = 0;
+       unsigned long mintmconnected = 0xFFFF;
+       unsigned long searchInfo[VC_MAX_CALL_GROUP_MEMBER];
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, 0);
+       CALL_ENG_DEBUG(ENG_DEBUG, "ended call_handle = %d", call_handle);
+
+       if (activegroup == TRUE) {
+               index = _vc_core_cm_get_active_group_index(pMng);
+       } else if (activegroup == FALSE) {
+               index = _vc_core_cm_get_held_group_index(pMng);
+       }
+
+       totalmember = pMng->callgroup_info[index].num;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "totalmember = %d", totalmember);
+
+       for (i = 0; i < totalmember; i++) {
+               if (pMng->callobject_info[pMng->callgroup_info[index].callobject_index[i]].call_handle != call_handle) {
+                       searchInfo[j] = pMng->callobject_info[pMng->callgroup_info[index].callobject_index[i]].connected_time;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "searchInfo[%d] = %d", j, searchInfo[j]);
+                       j = j + 1;
+               }
+       }
+
+       searchinfonum = j;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "searchinfonum = %d", searchinfonum);
+
+       if (searchinfonum > 1) {
+               for (k = 1; k < searchinfonum; k++) {
+                       if (searchInfo[k] < searchInfo[min]) {
+                               min = k;
+                       }
+               }
+               mintmconnected = searchInfo[min];
+       } else if (searchinfonum == 1)
+               mintmconnected = searchInfo[0];
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "index = %d", index);
+       CALL_ENG_DEBUG(ENG_DEBUG, "min = %d", min);
+       CALL_ENG_DEBUG(ENG_DEBUG, "min tmconnected = %d", mintmconnected);
+
+       return mintmconnected;
+
+}
+
+unsigned long call_vc_cm_gp_get_calltm_connected(call_vc_manager_t *pMng, int nGroup, int nPos)
+{
+       int callIndex = 0;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, 0);
+       VOICECALL_RETURN_VALUE_IF_FAIL((nGroup >= CALL_VC_CALL_GROUP_0 && nGroup < CALL_VC_CALL_GROUP_MAX), 0);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(nPos, 0, 4, 0);
+
+       callIndex = pMng->callgroup_info[nGroup].callobject_index[nPos];
+       return pMng->callobject_info[callIndex].connected_time;
+}
+
+gboolean call_vc_cm_search_activecall(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       if (call_handle == pMng->callobject_info[callIndex].call_handle)
+                               return TRUE;
+               }
+       }
+       return FALSE;
+
+}
+
+gboolean call_vc_cm_search_activecall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+       gboolean bctinfo_found = FALSE;
+       gboolean bctinfo_atleast_one_found = FALSE;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_ACTIVE)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       bctinfo_found = pMng->callobject_info[callIndex].bctinfo_found;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "pMng->callobject_info[%d].bctinfo_found (%d).", callIndex, pMng->callobject_info[callIndex].bctinfo_found);
+               }
+
+               bctinfo_atleast_one_found = bctinfo_found || bctinfo_atleast_one_found;
+
+       }
+
+       return bctinfo_atleast_one_found;
+
+}
+
+gboolean call_vc_cm_search_holdcall(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+       int k = 0;
+       int callIndex = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       if (call_handle == pMng->callobject_info[callIndex].call_handle)
+                               return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+gboolean call_vc_cm_search_holdcall_ctinfo(call_vc_manager_t *pMng, call_vc_handle call_handle)
+{
+       int i = 0;
+       int k = 0 callIndex;
+       gboolean bctinfo_found = FALSE;
+       gboolean bCtInfoAtLeastOnde = FALSE;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < CALL_VC_CALL_GROUP_MAX; i++) {
+               if (pMng->callgroup_info[i].state == CALL_VC_GROUP_STATE_HOLD)
+                       break;
+       }
+       if (i == CALL_VC_CALL_GROUP_MAX) {
+               return FALSE;
+       }
+       for (k = 0; k < pMng->callgroup_info[i].num; k++) {
+               callIndex = pMng->callgroup_info[i].callobject_index[k];
+               if ((pMng->callobject_info[callIndex].call_handle != VC_TAPI_INVALID_CALLHANDLE) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[callIndex].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       bctinfo_found = pMng->callobject_info[callIndex].bctinfo_found;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "pMng->callobject_info[%d].bctinfo_found (%d).", callIndex, pMng->callobject_info[callIndex].bctinfo_found);
+               }
+
+               bCtInfoAtLeastOnde = bctinfo_found || bCtInfoAtLeastOnde;
+       }
+       return bCtInfoAtLeastOnde;
+}
+#endif
+
+/**
+ * This function retrieves an available call ID
+ *
+ * @return             Call ID on success, -1 on failure
+ * @param[in]          pMng            Pointer to the call manager structure
+ */
+int _vc_core_cm_get_new_callId(call_vc_manager_t *pMng)
+{
+       gboolean bCheck[VC_MAX_CALL_ID];
+       int i = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pMng != NULL, VC_TAPI_INVALID_CALLHANDLE);
+       
+       memset(bCheck, 0, sizeof(bCheck));
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if ((pMng->callobject_info[i].state != VC_CALL_STATE_ENDED) && (pMng->callobject_info[i].state != VC_CALL_STATE_ENDED_FINISH)) {
+                       VOICECALL_RETURN_INVALID_IF_FAIL(((pMng->callobject_info[i].call_id >= 0) && (pMng->callobject_info[i].call_id <= VC_MAX_CALL_ID)));
+                       if (pMng->callobject_info[i].call_id != 0) {
+                               bCheck[pMng->callobject_info[i].call_id - 1] = TRUE;
+                       }
+               }
+       }
+
+       for (i = 0; i < VC_MAX_CALL_ID; i++) {
+               if (bCheck[i] == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "CallID=%d", i + 1);
+                       return i + 1;
+               }
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "fail to get id!");
+       return VC_TAPI_INVALID_CALLHANDLE;
+}
+
+/**
+ * This function checks if active/ held exists
+ *
+ * @return             Returns TRUE if success else FALSE
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] active_calls    TRUE if active call exists, FALSE if held call exists
+ * @param[out] held_calls      TRUE if held call exists, FALSE if held call exists
+ * @see                        _vc_core_cm_isexits_outgoing_call, _vc_core_cm_isexists_connected_call
+ */
+gboolean _vc_core_cm_isexists_call_ingroup(call_vc_manager_t *pMng, int *active_calls, int *held_calls)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(active_calls != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(held_calls != NULL);
+
+       *active_calls = _vc_core_cm_isexists_active_call(pMng);
+       *held_calls = _vc_core_cm_isexists_held_call(pMng);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "act_calls :%d", *active_calls);
+       CALL_ENG_DEBUG(ENG_DEBUG, "hld_calls :%d", *held_calls);
+
+       return TRUE;
+}
+
+/**
+ * This function changes the call state of the call object corresponds to the given call handle
+ *
+ * @return             Returns TRUE if success else FALSE
+ * @param[in]          pMng            Pointer to the call manager structure
+ * @param[out] call_handle     Call Handle of the Callobject to be modified
+ * @param[out] callState               New call state to be set
+ */
+gboolean _vc_core_cm_change_call_object_state(call_vc_manager_t *pMng, call_vc_handle call_handle, voicecall_call_state_t callState)
+{
+       call_vc_call_objectinfo_t callobject_info;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle)
+               return FALSE;
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+
+       if (!_vc_core_cm_get_call_object(pMng, call_handle, &callobject_info))
+               return FALSE;
+
+       _vc_core_cm_change_call_state(&callobject_info, callState);
+
+       _vc_core_cm_set_call_object(pMng, &callobject_info);
+
+       return TRUE;
+
+}
+
+gboolean _vc_core_cm_get_ending_call_info(call_vc_manager_t *pMng)
+{
+       int i = 0;
+       gboolean bcall_ending = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pMng != NULL);
+
+       for (i = 0; i < VC_MAX_CALL_MEMBER; i++) {
+               if ((pMng->callobject_info[i].state == VC_CALL_STATE_ENDED) || (pMng->callobject_info[i].state == VC_CALL_STATE_ENDED_FINISH)) {
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Tel(%s) is ending!!", pMng->callobject_info[i].tel_number);
+                       bcall_ending = TRUE;
+                       break;
+               }
+       }
+       return bcall_ending;
+}
diff --git a/call-engine/core/vc-core-ccbs.c b/call-engine/core/vc-core-ccbs.c
new file mode 100755 (executable)
index 0000000..41aff66
--- /dev/null
@@ -0,0 +1,111 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifdef _CCBS_DEFINED_\r
+\r
+#include <string.h>\r
+#include <assert.h>\r
+\r
+#include "vc-core-ccbs.h"\r
+#include "vc-core-util.h"\r
+#include "vc-core-callagent.h"\r
+\r
+/**\r
+ * This function initializes the CCBS info\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ * @param[in]          pcall_agent     Handle to the voicecall agent\r
+ */\r
+gboolean call_vc_init_ccbs_info(call_vc_callagent_state_t *pcall_agent)\r
+{\r
+       pcall_agent->ccbs_index = 0;\r
+       memset(&pcall_agent->ccbs_info, 0, sizeof(tapi_call_ccbs_info_t)*CALL_VC_CCBS_NUMBER_MAX);\r
+       return TRUE;\r
+}\r
+\r
+/**\r
+ * This function checks if CCBS info is possible or not\r
+ *\r
+ * @return             Returns TRUE if possible and FALSE if not possible\r
+ * @param[in]          pcall_agent     Handle to the voicecall agent\r
+ */\r
+gboolean call_vc_ccbs_info_possible(call_vc_callagent_state_t *pcall_agent)\r
+{\r
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");\r
+\r
+       if (pcall_agent->ccbs_index < 0 || pcall_agent->ccbs_index >= CALL_VC_CCBS_NUMBER_MAX) {\r
+               return FALSE;\r
+       }\r
+       return TRUE;\r
+}\r
+\r
+/**\r
+ * This function adds one CCBS information\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ * @param[in]          pcall_agent     Handle to the voicecall agent\r
+ * @param[in]          pCcbsInfo       Pointer to the CCBS info structure\r
+ * @see                        call_vc_delete_oneccbs_info\r
+ */\r
+gboolean call_vc_add_oneccbs_info(call_vc_callagent_state_t *pcall_agent, tapi_call_ccbs_info_t *pCcbsInfo)\r
+{\r
+       VOICECALL_RETURN_FALSE_IF_FAIL(pCcbsInfo != NULL);\r
+\r
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");\r
+\r
+       if (!(pcall_agent->ccbs_index >= 0 && pcall_agent->ccbs_index < CALL_VC_CCBS_NUMBER_MAX)) {\r
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Free Index to add ccbs_index  = %d", pcall_agent->ccbs_index);\r
+               return FALSE;\r
+       }\r
+       memcpy(&pcall_agent->ccbs_info[pcall_agent->ccbs_index++], pCcbsInfo, sizeof(tapi_call_ccbs_info_t));\r
+\r
+       return TRUE;\r
+}\r
+\r
+/**\r
+ * This function deletes one CCBS information\r
+ *\r
+ * @return             Returns TRUE on success and FALSE on failure\r
+ * @param[in]          pcall_agent     Handle to the voicecall agent\r
+ * @param[in]          ccbsIndex       Index of the CCBS info to be deleted\r
+ * @see                        call_vc_add_oneccbs_info\r
+ */\r
+gboolean call_vc_delete_oneccbs_info(call_vc_callagent_state_t *pcall_agent, int ccbsIndex)\r
+{\r
+       int i = 0;\r
+       int j = 0;\r
+\r
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");\r
+\r
+       for (i = 0; i < pcall_agent->ccbs_index; i++) {\r
+               if (ccbsIndex == pcall_agent->ccbs_info[i].ccbs_info.index) {\r
+                       for (j = i; j < pcall_agent->ccbs_index - 1; j++) {\r
+                               memcpy(&pcall_agent->ccbs_info[j], &pcall_agent->ccbs_info[j + 1], sizeof(tapi_call_ccbs_info_t));\r
+                       }\r
+\r
+                       /*Remove the Last Index data*/\r
+                       memset(&pcall_agent->ccbs_info[j], 0, sizeof(tapi_call_ccbs_info_t));\r
+                       pcall_agent->ccbs_index--;\r
+                       break;\r
+               }\r
+       }\r
+       if (i == pcall_agent->ccbs_index)\r
+               return FALSE;\r
+\r
+       return TRUE;\r
+}\r
+#endif\r
diff --git a/call-engine/core/vc-core-engine-group.c b/call-engine/core/vc-core-engine-group.c
new file mode 100755 (executable)
index 0000000..23f8bc5
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vc-core-engine-group.h"
+#include "vc-core-callagent.h"
+#include "vc-core-engine.h"
+#include "vc-core-ccbs.h"
+#include "vc-core-tapi-rqst.h"
+#include "vc-core-tapi-evnt.h"
+#include "vc-core-svcall.h"
+
+/**
+* This function retrieves the number of connected call members in the given group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index             Group index of the group
+* @param[out]  pmember_num     Pointer to the retrieved number of connected members
+* @remarks             pvoicecall_agent and pmember_num cannot be NULL.
+*                              group_index  shall only take 0 or 1  as input values
+*/
+voicecall_error_t _vc_core_engine_group_get_connected_member_count(voicecall_engine_t *pvoicecall_agent, int group_index, int *pmember_num)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pmember_num != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *pmember_num = _vc_core_cm_get_connected_member_count_ingroup(&pagent->call_manager, group_index);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retrives the number of groups in which atleast one call member is available
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pnum_enabled_group      Pointer to the number of enabled groups
+* @remarks             pvoicecall_agent and pnum_enabled_group cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_enabled_group_count(voicecall_engine_t *pvoicecall_agent, int *pnum_enabled_group)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pnum_enabled_group != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *pnum_enabled_group = _vc_core_cm_get_group_count(&pagent->call_manager);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retrieves the group indices of active and held calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pact_grp_index  Set to the group index of active calls
+* @param[out]  pheld_grp_index Set to the group index of held calls
+* @remarks             pvoicecall_agent, pact_grp_index and pheld_grp_index cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_group_indices(voicecall_engine_t *pvoicecall_agent, int *pact_grp_index, int *pheld_grp_index)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pact_grp_index != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pheld_grp_index != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *pact_grp_index = _vc_core_cm_get_active_group_index(&pagent->call_manager);
+       *pheld_grp_index = _vc_core_cm_get_held_group_index(&pagent->call_manager);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retrieves the call handle of the call member given its groupe index and position in the group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index     Group index of the group
+* @param[in]   pos             Position of the call in the group
+* @param[out]  pcall_handle    Pointer to the call handle to be retrieved
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_group_get_call_handle_byposition(voicecall_engine_t *pvoicecall_agent, int group_index, int pos, int *pcall_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       int callhandle = -1;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_handle != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(group_index, 0, 1, ERROR_VOICECALL_INVALID_ARGUMENTS)
+           VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(pos, 0, 4, ERROR_VOICECALL_INVALID_ARGUMENTS)
+
+           callhandle = _vc_core_cm_get_call_handle_ingroup_byposition(&pagent->call_manager, group_index, pos);;
+
+       if (callhandle != -1) {
+               *pcall_handle = callhandle;
+               return ERROR_VOICECALL_NONE;
+       }
+
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function checks if connected call exists in a given group
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   group_index     Group index of the group
+* @param[out]  bcall_exists TRUE - if call exists, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_exists cannot be NULL.
+*                              group_index  shall only take 0 or 1  as input values
+*/
+voicecall_error_t _vc_core_engine_group_isexists_connected_call_ingroup(voicecall_engine_t *pvoicecall_agent, int group_index, gboolean *bcall_exists)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bcall_exists != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(group_index, 0, 1, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (CALL_VC_GROUP_STATE_NONE == _vc_core_cm_get_group_state(&pagent->call_manager, group_index)) {
+               *bcall_exists = FALSE;
+       }
+
+       if (0 == _vc_core_cm_get_connected_member_count_ingroup(&pagent->call_manager, group_index)) {
+               *bcall_exists = FALSE;
+       } else {
+               *bcall_exists = TRUE;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
diff --git a/call-engine/core/vc-core-engine-status.c b/call-engine/core/vc-core-engine-status.c
new file mode 100755 (executable)
index 0000000..d5f4fe1
--- /dev/null
@@ -0,0 +1,755 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/* Call Module File Includes */
+#include "vc-core-engine.h"
+#include "vc-core-callagent.h"
+#include "vc-core-callmanager.h"
+#include "vc-core-util.h"
+#include "vc-core-tapi-evnt.h"
+#include "vc-core-tapi-rqst.h"
+#include "vc-core-svcall.h"
+#include "vc-core-engine-status.h"
+
+/**
+* This function checks whether the given incoming call is a restricted call or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of the call to be checked
+* @param[out]  pbrestricted            Pointer to the restricted name mode
+* @remarks             pvoicecall_agent and prestricted cannot be NULL.
+*                              This API shall only be used with the incoming call handle before it is connected
+*/
+voicecall_error_t _vc_core_engine_status_isrestricted_call(voicecall_engine_t *pvoicecall_agent, int call_handle, gboolean *pbrestricted)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_call_objectinfo_t call_object;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pbrestricted != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       _vc_core_cm_clear_call_object(&call_object);
+       if (TRUE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &call_object)) {
+               *pbrestricted = call_object.brestricted_namemode;
+               return ERROR_VOICECALL_NONE;
+       }
+
+       *pbrestricted = FALSE;
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function checks whether the given incoming call is a restricted call or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of the call to be checked
+* @param[out]  pbrestricted            Pointer to the restricted name mode
+* @remarks             pvoicecall_agent and prestricted cannot be NULL.
+*                              This API shall only be used with the incoming call handle before it is connected
+*/
+voicecall_error_t _vc_core_engine_status_get_calling_namemode(voicecall_engine_t *pvoicecall_agent, int call_handle, gboolean * bcalling_namemode)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_call_objectinfo_t call_object;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bcalling_namemode != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       _vc_core_cm_clear_call_object(&call_object);
+       if (TRUE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &call_object)) {
+               if (call_object.bcalling_namemode == CALL_VC_CALLING_NAME_MODE_AVAILABLE) {
+                       *bcalling_namemode = TRUE;
+               } else {
+                       *bcalling_namemode = FALSE;
+               }
+               return ERROR_VOICECALL_NONE;
+       }
+
+       *bcalling_namemode = FALSE;
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function retrieves the call object belongs to the given call handle
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle     Call handle of the call for which the call object is retrieved
+* @param[out]  pcall_object    Pointer to the retrived call object info
+* @remarks             pvoicecall_agent and pcall_object cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_status_get_call_object(voicecall_engine_t *pvoicecall_agent, int call_handle, call_vc_call_objectinfo_t *pcall_object)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_object != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Clear the call object */
+       _vc_core_cm_clear_call_object(pcall_object);
+
+       if (TRUE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, pcall_object)) {
+               return ERROR_VOICECALL_NONE;
+       }
+
+       pcall_object = NULL;
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function retrieves the inout state of the engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pio_state                       Contains the Engine InOut state on return
+* @remarks             pvoicecall_agent and pio_state cannot be NULL.
+* @see                 _vc_core_engine_change_engine_iostate
+*/
+voicecall_error_t _vc_core_engine_status_get_engine_iostate(voicecall_engine_t *pvoicecall_agent, int *pio_state)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pio_state != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *pio_state = pagent->io_state;
+       CALL_ENG_DEBUG(ENG_DEBUG, "io_state = [%d]", pagent->io_state);
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks whether connected call exists or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type                       call type
+* @param[out]  bcall_exists            TRUE - if call exists of given given type, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_exists cannot be NULL.
+*/
+voicecall_error_t _vc_core_engine_status_isexists_call_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, gboolean *bcall_exists)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bcall_exists != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*CALL_ENG_DEBUG(ENG_DEBUG,"call_type = %d", call_type);*/
+       *bcall_exists = FALSE;
+       switch (call_type) {
+       case VC_INCOMING_CALL:
+               {
+                       if (VC_INVALID_CALL_INDEX != pagent->call_manager.mtcall_index) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "incoming call exits...");
+
+                               *bcall_exists = TRUE;
+                               return ERROR_VOICECALL_NONE;
+                       }
+               }
+               break;
+       case VC_OUTGOING_CALL:
+               {
+                       if (VC_INVALID_CALL_INDEX != pagent->call_manager.setupcall_info.mocall_index) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "outgoing call exits...");
+
+                               *bcall_exists = TRUE;
+                               return ERROR_VOICECALL_NONE;
+                       }
+               }
+               break;
+       case VC_CONNECTED_CALL:
+               {
+                       *bcall_exists = _vc_core_cm_isexists_connected_call(&pagent->call_manager);
+                       if (*bcall_exists == TRUE) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "connected call exits...");
+                       }
+                       return ERROR_VOICECALL_NONE;
+               }
+               break;
+       default:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Invalid call type..");
+                       return ERROR_VOICECALL_INVALID_CALL_TYPE;
+               }
+       }
+
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function retrieves the total number of call members currently available with the engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[out]  ptotal_call_member      Contains the total call member availalbe in engine on return
+* @remarks             pvoicecall_agent and ptotal_call_member cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_member_count(voicecall_engine_t *pvoicecall_agent, int *ptotal_call_member)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(ptotal_call_member != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *ptotal_call_member = _vc_core_cm_get_call_member_count(&pagent->call_manager);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retrieves the total number of call members with the given connected call type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[in]   connected_call_type     connected call type
+* @param[out]  pmember_num             Contains the number of call members available with the given connected call type on return
+* @remarks             pvoicecall_agent and pmember_num cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_member_info(voicecall_engine_t *pvoicecall_agent, voicecall_connected_call_type_t connected_call_type, int *pmember_num)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pmember_num != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       switch (connected_call_type) {
+       case VC_ACTIVE_CALL:
+               {
+                       *pmember_num = _vc_core_cm_get_active_call_count(&pagent->call_manager);
+               }
+               break;
+       case VC_HELD_CALL:
+               {
+                       *pmember_num = _vc_core_cm_get_held_call_count(&pagent->call_manager);
+               }
+               break;
+       default:
+               *pmember_num = 0;
+               return ERROR_VOICECALL_INVALID_CALL_TYPE;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retrieves the call handle according to the given call type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type               call type
+* @param[out]  pcall_handle            Contains the call handle on success
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+*                              In case of multiple connected calls available, it will retreive the first connected call
+*/
+voicecall_error_t _vc_core_engine_status_get_call_handle_bytype(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, int *pcall_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_manager_t *pcall_manager = NULL;
+       call_vc_handle call_handle = -1;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_handle != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       pcall_manager = (call_vc_manager_t *) &pagent->call_manager;
+
+       switch (call_type) {
+       case VC_INCOMING_CALL:
+               {
+                       call_handle = _vc_core_cm_get_incoming_call_handle(pcall_manager);
+               }
+               break;
+       case VC_OUTGOING_CALL:
+               {
+                       call_handle = _vc_core_cm_get_outgoing_call_handle(pcall_manager);
+               }
+               break;
+       case VC_CONNECTED_CALL:
+               {
+                       _vc_core_cm_get_first_active_call_handle(pcall_manager, &call_handle);
+                       if (-1 == call_handle) {
+                               _vc_core_cm_get_first_held_call_handle(pcall_manager, &call_handle);
+                       }
+               }
+               break;
+       default:
+               return ERROR_VOICECALL_INVALID_CALL_TYPE;
+       }
+
+       if (-1 == call_handle) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       *pcall_handle = call_handle;
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks if active calls and/or held call exists or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  pactive_calls           Set to TRUE if active calls exist
+* @param[out]  pheld_calls             Set to TRUE if held calls exist
+* @remarks             pvoicecall_agent,pactive_calls and pheld_calls cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isexists_any_call(voicecall_engine_t *pvoicecall_agent, gboolean *pactive_calls, gboolean *pheld_calls)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_manager_t *pcall_manager = NULL;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pactive_calls != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pheld_calls != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       pcall_manager = &pagent->call_manager;
+
+       *pactive_calls = _vc_core_cm_isexists_active_call(pcall_manager);
+       *pheld_calls = _vc_core_cm_isexists_held_call(pcall_manager);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retreives the cphs csp status
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           csp_service             csp name
+* @param[out]  pbcsp_status            Contains TRUE if given csp service is enabled,FALSE  otherwise
+* @remarks             pvoicecall_agent and pbcsp_status cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_cphs_csp_status(voicecall_engine_t *pvoicecall_agent, voicecall_cphs_csp_service csp_service, gboolean *pbcsp_status)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pbcsp_status != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+#ifdef _CPHS_DEFINED_
+       *pbcsp_status = _vc_core_svcall_cphs_csp_get_status(pcall_agent, csp_service);
+#else
+       *pbcsp_status = (VC_CPHS_CSP_ALS == csp_service) ? FALSE : TRUE;
+#endif
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks if the call is emergency call for the given outgoing call index
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[in]           mo_call_index           Index of the outgoing call
+* @param[out]  pbemergency_call        Contains TRUE if the call is emergency call,FALSE  otherwise
+* @remarks             pvoicecall_agent and pbemergency_call cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_check_emergency_byindex(voicecall_engine_t *pvoicecall_agent, int mo_call_index, gboolean *pbemergency_call)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_manager_t *pcall_manager = NULL;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pbemergency_call != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(mo_call_index, 0, 7, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Assign Default Value */
+       *pbemergency_call = FALSE;
+
+       pcall_manager = (call_vc_manager_t *) &pagent->call_manager;
+
+       CALL_VC_DUMP_CALLDETAILS(pcall_manager);
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_index = %d, bemergency_number = %d", mo_call_index, pcall_manager->callobject_info[mo_call_index].bemergency_number);
+
+       *pbemergency_call = pcall_manager->callobject_info[mo_call_index].bemergency_number;
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks and returns the FDN status
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pcall_agent     Handle to Voicecall Engine - Currently not used, reserved for future use
+* @param[out]  bfdn_enabled    TRUE - if FDN is enabled, FALSE  otherwise
+* @remarks             pvoicecall_agent and bfdn_anabled cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isenabled_fdn(voicecall_engine_t *pcall_agent, gboolean *bfdn_enabled)
+{
+       gboolean bfdn = FALSE;
+       VOICECALL_RETURN_VALUE_IF_FAIL(bfdn_enabled != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_KPI("tel_get_sim_fdn_status start");
+       if (TAPI_API_SUCCESS == tel_get_sim_fdn_status(&bfdn)) {
+               *bfdn_enabled = bfdn;
+               return ERROR_VOICECALL_NONE;
+       }
+       CALL_ENG_KPI("tel_get_sim_fdn_status done");
+
+       *bfdn_enabled = FALSE;
+       return ERROR_VOICECALL_TAPI_ERROR;
+}
+
+/**
+* This function checks the possiblity of transfering calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]  pbtransfer_calls        Contains TRUE if call transfer is possible, FALSE otherwise
+* @remarks             pvoicecall_agent and pbtransfer_calls cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_transfer_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbtransfer_calls)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pbtransfer_calls != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *pbtransfer_calls = _vc_core_ca_is_transfer_call_possible(pcall_agent);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks the possiblity of making conference calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]  pbconf_call             Contains TRUE if conference call is possible , FALSE otherwise
+* @remarks             pvoicecall_agent and pbconf_call cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_conf_call_possible(voicecall_engine_t *pvoicecall_agent, gboolean *pbconf_call)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       gboolean active_calls = FALSE;
+       gboolean held_calls = FALSE;
+       int total_call_member = 0;
+       gboolean bconf = FALSE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pbconf_call != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+#ifdef _CPHS_DEFINED_
+       if (_vc_core_svcall_cphs_csp_get_status(pcall_agent, VC_CPHS_CSP_MPTY)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_svcall_cphs_csp_get_status returned TRUE");
+               *pbconf_call = TRUE;
+       } else {
+               *pbconf_call = FALSE;
+               return ERROR_VOICECALL_NONE;
+       }
+#endif
+
+       _vc_core_cm_isexists_call_ingroup(&pcall_agent->call_manager, &active_calls, &held_calls);
+       total_call_member = _vc_core_cm_get_call_member_count(&pcall_agent->call_manager);
+
+       /* Joining call is impossile when !active or !hold call exist */
+       if (!active_calls || !held_calls) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Join Impossible...");
+               bconf = FALSE;
+       } else {
+               /* Joining call is impossile when member is more than max
+               Max Number in Group + Another Call*/
+               if (total_call_member >= (VC_MAX_CALL_GROUP_MEMBER + 1)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Ended with FALSE...");
+                       bconf = FALSE;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Ended with TRUE...");
+                       bconf = TRUE;
+               }
+       }
+
+       *pbconf_call = bconf;
+       return ERROR_VOICECALL_NONE;
+
+}
+
+/**
+* This function retreives the call state of the given call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of particular call
+* @param[out]  pcall_state             Contains the call state of the given call handle
+* @remarks             pvoicecall_agent and pcall_state cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_get_call_state_byhandle(voicecall_engine_t *pvoicecall_agent, int call_handle, voicecall_call_state_t *pcall_state)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_call_objectinfo_t call_object = { 0 };
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_state != NULL, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+
+       _vc_core_cm_clear_call_object(&call_object);
+       if (TRUE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &call_object)) {
+               *pcall_state = call_object.state;
+               return ERROR_VOICECALL_NONE;
+       }
+
+       *pcall_state = VC_CALL_STATE_NONE;
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+#if    0       /*unused*/
+/**
+* This function retrieves call handle of the any one of the calls of given type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[in]   connected_call_type     Connected call type
+* @param[out]  pcall_handle                    Contains the Call handle on return
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+*/
+voicecall_error_t voicecall_get_any_call_handle(voicecall_engine_t *pvoicecall_agent, voicecall_connected_call_type_t connected_call_type, int *pcall_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_handle callhandle = -1;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_handle != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       switch (connected_call_type) {
+       case VC_ACTIVE_CALL:
+               {
+                       _vc_core_cm_get_first_active_call_handle(&pagent->call_manager, &callhandle);
+               }
+               break;
+       case VC_HELD_CALL:
+               {
+                       _vc_core_cm_get_first_held_call_handle(&pagent->call_manager, &callhandle);
+               }
+               break;
+       default:
+               return ERROR_VOICECALL_INVALID_CALL_TYPE;
+       }
+
+       if (-1 != callhandle) {
+               *pcall_handle = (int)callhandle;
+               return ERROR_VOICECALL_NONE;
+       }
+
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+#endif
+
+/**
+* This function checks if any call is ending and retrieves its call number if it is ending
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  bcall_ending            TRUE if any call is being ended, FALSE otherwise
+* @remarks             pvoicecall_agent and bcall_ending cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_any_call_ending(voicecall_engine_t *pvoicecall_agent, gboolean *bcall_ending)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bcall_ending != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *bcall_ending = FALSE;
+       *bcall_ending = _vc_core_cm_get_ending_call_info(&pagent->call_manager);
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks whther engine is busy in processing any events or waiting for any events to process
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[out]  bbusy   TRUE - if engine is busy in processing any events or waiting for any events, FALSE - otherwise
+* @remarks             pvoicecall_agent and bbusy cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_engine_busy(voicecall_engine_t *pvoicecall_agent, gboolean *bbusy)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bbusy != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Current Call Agent State:%d", pagent->callagent_state);
+       if (CALL_VC_CA_STATE_NORMAL == pagent->callagent_state) {
+               *bbusy = FALSE;
+       } else {
+               *bbusy = TRUE;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function sets the given flag to engine for processing during call end.
+* This function has to be used after calling the end call API
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   end_flag                        End Flag to be set
+* @remarks             pvoicecall_agent and bsscode cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_set_end_flag(voicecall_engine_t *pvoicecall_agent, voicecall_end_flag_t end_flag)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       switch (end_flag) {
+       case VC_RETREIVE_CALL_ON_MOCALL_END:
+               {
+                       pagent->callagent_state = CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL;
+               }
+               break;
+       default:
+               return ERROR_VOICECALL_INVALID_ARGUMENTS;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks whether the given string is MMI string or not
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   pinput_number   Input string to be verified
+* @param[out]  bsscode                 TRUE - if the given string is a valid ss code, FALSE otherwise
+* @remarks             pvoicecall_agent and bsscode cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_isvalid_ss_code(voicecall_engine_t *pvoicecall_agent, const char *pinput_number, gboolean *bsscode)
+{
+       int strLen = 0;
+       call_vc_ss_si_format si_format = SS_SI_FORMAT_INVALID;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pvoicecall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pinput_number != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bsscode != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       si_format = SS_SI_FORMAT_VALID;
+       strLen = strlen(pinput_number);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "strLen = %d", strLen);
+
+       if (strLen > 2) {
+               /* Deactivate :  "#...#" */
+               /* Erase :               "##...#" */
+               if (((pinput_number[0] == '#') && (pinput_number[strLen - 1] == '#')) || ((pinput_number[0] == '+') && (pinput_number[1] == '#') && (pinput_number[strLen - 1] == '#'))) {
+                       si_format = _vc_core_util_check_si_format(pinput_number);
+                       *bsscode = TRUE;
+                       return ERROR_VOICECALL_NONE;
+               }
+
+               /* Activate :           "*...#" */
+               /* Interrogate :        "*#...#" */
+               /* Register :           "**...#" */
+               if ((('*' == pinput_number[0]) && ('#' == pinput_number[strLen - 1])) || (('+' == pinput_number[0]) && ('*' == pinput_number[1]) && ('#' == pinput_number[strLen - 1]))) {
+                       si_format = _vc_core_util_check_si_format(pinput_number);
+                       *bsscode = TRUE;
+                       return ERROR_VOICECALL_NONE;
+               }
+       } else if (2 == strLen) {
+/*This will be covered, once the operator requirements are clear*/
+#ifdef MCC_USA_SS_CODE
+               unsigned long mcc = 0;
+               tapi_network_info_t networkInfo;
+
+               memset(&networkInfo, 0x00, sizeof(tapi_network_info_t));
+
+               tapi_get_network_info(&networkInfo);
+
+               networkInfo.sysid.sysid = (networkInfo.sysid.sysid >> 16);
+               mcc = (networkInfo.sysid.sysid & 0x0000ffff);
+               CALL_ENG_DEBUG(ENG_DEBUG, "mcc (%d)!!", mcc);
+
+               /*CALL_NETWORK_MCC_USA */
+               if (mcc == 0x136) {
+                       if (strncmp(pinput_number, "08", 2) == 0 || strncmp(pinput_number, "00", 2) == 0)
+                               *bsscode = FALSE;
+               }
+#endif
+               /*08 is not a ss string.*/
+               if (strncmp(pinput_number, "08", 2) == 0) {
+                       *bsscode = FALSE;
+               } else {
+                       /*All two digit number should be handled as ss string during call.*/
+                       CALL_ENG_DEBUG(ENG_DEBUG, "two digit number... returns TRUE");
+                       *bsscode = TRUE;
+               }
+
+               return ERROR_VOICECALL_NONE;
+       } else if (1 == strLen) {
+               if (('#' == pinput_number[0]) || ('+' == pinput_number[0]) || ('*' == pinput_number[0]) || ('7' == pinput_number[0])) {
+                       *bsscode = TRUE;
+                       return ERROR_VOICECALL_NONE;
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "invalid sscode... returns FALSE");
+       *bsscode = FALSE;
+
+       return ERROR_VOICECALL_NONE;
+}
+
+voicecall_error_t _vc_core_engine_status_dump_call_details(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+       _vc_core_cm_test_dump(&pagent->call_manager);
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks the possiblity of making private calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]  bzuhause                Contains TRUE if zuhause area, FALSE otherwise
+* @remarks             pvoicecall_agent and pbprivate_call cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_status_is_zuhause_area(voicecall_engine_t *pvoicecall_agent, gboolean *bzuhause)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bzuhause != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       *bzuhause = _vc_core_util_check_zuhause_status();
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function checks the possiblity of making private calls
+*
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]          b_download_call         Contains TRUE if zuhause area, FALSE otherwise
+* @remarks                     pvoicecall_agent and pbprivate_call cannot be NULL
+*/
+void _vc_core_engine_status_set_download_call(voicecall_engine_t *pvoicecall_agent, gboolean b_download_call)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       if (pagent == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "pagent is NULL! [PROBLEM] !!!");
+               return;
+       }
+
+       pagent->bdownload_call = b_download_call;
+
+}
+
+gboolean _vc_core_engine_status_get_download_call(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       return pcall_agent->bdownload_call;
+}
diff --git a/call-engine/core/vc-core-engine.c b/call-engine/core/vc-core-engine.c
new file mode 100755 (executable)
index 0000000..cafbfd5
--- /dev/null
@@ -0,0 +1,3221 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <assert.h>
+#include <string.h>
+#include <errno.h>
+
+/* Call Module File Includes */
+#include "vc-core-engine.h"
+#include "vc-core-callagent.h"
+#include "vc-core-callmanager.h"
+#include "vc-core-util.h"
+#include "vc-core-tapi-evnt.h"
+#include "vc-core-tapi-rqst.h"
+#include "vc-core-svcall.h"
+#include "vc-core-engine-status.h"
+
+/*Global Variable Declerations */
+
+/*Incoming Call Details used for Self Event*/
+static call_vc_handle gincoming_call_handle = VC_TAPI_INVALID_CALLHANDLE;
+static TelCallIncomingCallInfo_t gincoming_call_info;
+
+/*Initialization Global Variables*/
+static gboolean gphone_init_finished = FALSE;
+static call_vc_handle gphone_rejected_call = VC_TAPI_INVALID_CALLHANDLE;
+
+static call_vc_callagent_state_t *gpcall_agent_for_callback = NULL;
+/* SAT call detail used for self event */
+static int gsat_event_type = 0;
+static int gtype = 0;
+static void *gpresult = NULL;
+static TelSatSetupCallIndCallData_t gSatSetupCallInfo;
+static TelSatSendDtmfIndDtmfData_t gSatSendDtmfInfo;
+
+/*Local Function Declarations*/
+/**
+ * This function handles the end event for outgoing call
+ *
+ * @internal
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Handle to the call agent
+ * @param[in]          call_handle             call handle of the outgoing call
+ * @param[in]          type                            type of the tapi event
+ * @param[in]          tapi_cause              tapi cause
+ */
+static gboolean __call_vc_outgoingcall_endhandle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, int type, TelTapiEndCause_t tapi_cause);
+/**
+ * This function handles the end event for incoming call
+ *
+ * @internal
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Handle to the call agent
+ * @param[in]          call_handle             call handle of the outgoing call
+ */
+static gboolean __call_vc_incomingcall_endhandle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle);
+/**
+ * This function checks whether the call agent is in any of the wait state
+ *
+ * @internal
+ * @return             Returns TRUE on if call agent is in wait state or FALSE
+ * @param[in]          pcall_agent             Handle to the call agent
+ */
+static gboolean __call_vc_is_callagent_waitstate(call_vc_callagent_state_t *pcall_agent);
+/**
+ * This function creates call details for outgoign call with the given setup info
+ *
+ * @internal
+ * @return             Returns TRUE on if call agent is in wait state or FALSE
+ * @param[in]          pagent                  Handle to the call agent
+ * @param[in]          psetup_call_info        Setup info
+ * @param[out] pcall_object            Call object containing call details
+ * @param[out] error_code              Error Code
+ */
+static gboolean __call_vc_create_outgoing_callinfo(call_vc_callagent_state_t *pagent, voicecall_setup_info_t *psetup_call_info, call_vc_call_objectinfo_t *pcall_object, int *error_code);
+
+/**
+ * This function handles all telephony events
+ *
+ * @internal
+ * @return             Returns TRUE on if call agent is in wait state or FALSE
+ * @param[in]          event                   tapi event data
+ * @param[in]          userdata                        user callback data
+ */
+
+static void __call_vc_handle_tapi_events(TelTapiEvent_t *event, void *userdata);
+
+/**
+* This function handles sat engine notification
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           event                   tapi event data
+* @param[in]           userdata                        user callback data
+*/
+static void __call_vc_handle_sat_engine_events_cb(TelTapiEvent_t *event, void *userdata);
+
+/**
+* This function subscribes for all notifications required for voicecall engine
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_agent             handle to voicecall agent structure
+*/
+static gboolean __call_vc_subscribe_call_events(call_vc_callagent_state_t *pcall_agent);
+
+/**
+* This function handles telephony initialized notifications
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           event                   tapi event data
+* @param[in]           userdata                        user callback data
+*/
+static void __call_vc_tapi_initialized_cb(TelTapiEvent_t *event, void *userdata);
+
+/**
+* This function subscribes for telephony call notifications
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_agent             handle to voicecall agent structure
+*/
+static gboolean __call_vc_subscribe_tapi_event(call_vc_callagent_state_t *pcall_agent);
+
+/**
+* This function request the engine to setup a sat call
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pagent          handle to voicecall agent structure
+* @param[in]           mo_call_index           call index of the mo call prepared for sat call
+* @param[in]           ret_code                Error code
+* @exception           ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED
+*/
+static gboolean __call_vc_request_sat_call(call_vc_callagent_state_t *pagent, int mo_call_index, int *ret_code);
+
+/**
+* This function hadles the events from the sat engine
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_agent             handle to voicecall agent structure
+* @param[in]           sat_event               event type (sat request / sat response)
+* @param[in]           sat_event_type  sat event sub type
+* @param[in]           type                            event type received from sat
+* @param[in]           result                  data received from sat
+*/
+static gboolean __call_vc_handle_sat_engine_events(call_vc_callagent_state_t *pcall_agent, int sat_event, int sat_event_type, int type, void *result);
+
+/**
+* This function request the engine to setup a normal voice call
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pagent          handle to voicecall agent structure
+* @param[in]           mo_call_index           call index of the mo call prepared for sat call
+* @param[in]           ret_code                Error code
+* @exception           ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED
+*/
+static gboolean __call_vc_request_call(call_vc_callagent_state_t *pagent, int mo_call_index, int *ret_code);
+
+/**
+* This function serves as the callback function for the incoming call idle add function
+*
+* @return              Returns TRUE - if the callback has to be called again, FALSE otherwise
+* @param[in]           puser_data      data set by the user
+*/
+static gboolean __call_vc_incoming_idle_cb(gpointer puser_data);
+static gboolean __call_vc_incoming_call_end_idle_cb(gpointer puser_data);
+static gboolean __call_vc_reject_call_idle_cb(gpointer puser_data);
+static gboolean __call_vc_reject_call_full_idle_cb(gpointer puser_data);
+
+/**
+* This function serves as the callback function for the SAT idle add function
+*
+* @return              Returns TRUE - if the callback has to be called again, FALSE otherwise
+* @param[in]           puser_data      data set by the user
+*/
+static gboolean __call_vc_sat_idle_cb(gpointer puser_data);
+
+/**
+ * This function checks the voicecall engine's idle status and send VC_ACTION_NO_ACTIVE_TASK to client if engine is idle
+ *
+ * @return             void
+ * @param[in]          pcall_agent     Pointer to the call agent structure
+ */
+static void __vc_core_check_engine_active_task(call_vc_callagent_state_t *pcall_agent);
+
+/**
+* This function initializes the voicecall engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[out]  pcall_agent_out Pointer to the address of call agent
+* @param[in]   pcallback_func  Call back function
+* @param[in]   puser_data              Data set by user
+* @remarks             pcall_agent_out and pcallback_func cannot be NULL.
+*                              Output Parameter pcall_agent_out should be initialized to NULL
+*/
+voicecall_error_t _vc_core_engine_init(voicecall_engine_t **pcall_agent_out, voicecall_cb pcallback_func, void *puser_data)
+{
+       call_vc_callagent_state_t *pcall_agent = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Voicecall Engine");
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent_out != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(*pcall_agent_out == NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Initialize Call Agent*/
+       pcall_agent = _vc_core_ca_init_agent();
+       if (NULL == pcall_agent) {
+               return ERROR_VOICECALL_MEMALLOC_FAILURE;
+       }
+
+       if (FALSE == __call_vc_subscribe_call_events(pcall_agent)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Event Subscrition Failed");
+               _vc_core_ca_finish_agent(pcall_agent);
+               return ERROR_VOICECALL_NOTI_FAILED;
+       }
+       /*Store the Callback Pointer*/
+       pcall_agent->client_callback = pcallback_func;
+       pcall_agent->puser_data = puser_data;
+
+       /*Calls to Tapi Should not be made in the application initialization, because this code will be executed if application is launched during
+       an incoming call also. so DBus Lock up can happen.*/
+       gphone_init_finished = TRUE;
+
+       /*Init Success, Assign Output Parameters*/
+       *pcall_agent_out = (voicecall_engine_t *)pcall_agent;
+
+       return ERROR_VOICECALL_NONE;
+}
+
+void _vc_core_engine_handle_sat_events_cb(void *sat_setup_call_data, void *userdata)
+{
+       char *data = sat_setup_call_data;
+
+       call_vc_callagent_state_t *pcall_agent = gpcall_agent_for_callback;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "sat event callback.");
+
+       memset(&gSatSetupCallInfo, 0, sizeof(TelSatSetupCallIndCallData_t));
+       memcpy(&gSatSetupCallInfo, data, sizeof(TelSatSetupCallIndCallData_t));
+
+       gsat_event_type = SAT_RQST_SETUP_CALL;
+       gtype = TAPI_EVENT_SAT_SETUP_CALL_IND;
+       gpresult = &gSatSetupCallInfo;
+       g_idle_add(__call_vc_sat_idle_cb, pcall_agent);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call back Ends and returning..");
+}
+
+static void __call_vc_handle_sat_engine_events_cb(TelTapiEvent_t *event, void *userdata)
+{
+       call_vc_callagent_state_t *pcall_agent = gpcall_agent_for_callback;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "sat event callback.");
+
+       int event_type = event->EventType;
+       /*int status = event->Status;*/
+       char *data = event->pData;
+
+       switch (event_type) {
+       case TAPI_EVENT_SAT_SETUP_CALL_IND:
+               {
+                       /*it will be processed in _vc_core_engine_handle_sat_events_cb().*/
+                       return;
+               }
+               break;
+
+       case TAPI_EVENT_SAT_SEND_DTMF_IND:
+               {
+                       memset(&gSatSendDtmfInfo, 0, sizeof(TelSatSendDtmfIndDtmfData_t));
+                       memcpy(&gSatSendDtmfInfo, data, sizeof(TelSatSendDtmfIndDtmfData_t));
+
+                       gsat_event_type = SAT_RQST_SEND_DTMF;
+                       gtype = event_type;
+                       gpresult = &gSatSendDtmfInfo;
+
+                       g_idle_add(__call_vc_sat_idle_cb, pcall_agent);
+               }
+               break;
+
+       case TAPI_EVENT_SAT_CALL_CONTROL_IND:
+               {
+                       __call_vc_handle_sat_engine_events(pcall_agent, VC_ACTION_SAT_RESPONSE, SAT_RESP_SETUP_CALL, event_type, data);
+               }
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Default: event_type = %d", event_type);
+               break;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call back Ends and returning..");
+
+       /*Send Process Termintate Event to the Client */
+       if ((event_type == TAPI_EVENT_SAT_SETUP_CALL_IND) || (event_type == TAPI_EVENT_SAT_SEND_DTMF_IND)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Do not check an active task here");
+       } else {
+               __vc_core_check_engine_active_task(pcall_agent);
+       }
+
+}
+
+/*Subscribe Noti Events*/
+static gboolean __call_vc_subscribe_call_events(call_vc_callagent_state_t *pcall_agent)
+{
+       clock_t start = 0;
+       clock_t end = 0;
+
+       start = GET_CURR_TIME();
+
+       CALL_ENG_KPI("__call_vc_subscribe_tapi_event start");
+       /* Subscribe Tapi Events */
+       if (FALSE == __call_vc_subscribe_tapi_event(pcall_agent)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Noti subscribe to Tapi Events failed");
+               return FALSE;
+
+       }
+       CALL_ENG_KPI("__call_vc_subscribe_tapi_event done");
+
+       end = GET_CURR_TIME();
+       PRINT_DIFF_TIME(start, end, "Duration For tapi_call_subscription");
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Noti Subscription Sucess");
+       return TRUE;
+}
+
+/**
+ * This function sends response event to the registered client
+ *
+ * @return             This function returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent     Pointer to the call agent structure
+ * @param[in]          event           response event type
+ * @param[in]          param1          param 1 to be passed to the client
+ * @param[in]          param2          param 2 to be passed to the client
+ * @param[in]          param3          param 3 to be passed to the client
+ */
+gboolean _vc_core_ca_send_event_to_client(call_vc_callagent_state_t *pcall_agent, int event, int param1, int param2, void *param3)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "Sending Event to Client");
+       if (pcall_agent->client_callback != NULL) {
+               return pcall_agent->client_callback(event, param1, param2, param3, pcall_agent->puser_data);
+       }
+       return FALSE;
+}
+
+static void __call_vc_tapi_initialized_cb(TelTapiEvent_t *event, void *userdata)
+{
+       call_vc_callagent_state_t *pagent = gpcall_agent_for_callback;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       TelSimCardStatus_t sim_status = 0;
+       TelSimCardType_t card_type = 0;
+       int sim_changed = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "gphone_init_finished %d", gphone_init_finished);
+
+       if (gphone_init_finished != TRUE) {
+               gphone_init_finished = TRUE;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Query Card Status ..");
+
+               /*memset(&sim_status, 0, sizeof(sim_status));*/
+               tapi_err = tel_get_sim_init_info(&sim_status, &sim_changed);
+
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_sim_get_card_type failed.. tapi_err = %d", tapi_err);
+                       pagent->bis_no_sim = TRUE;
+               } else {
+                       tel_get_sim_type(&card_type);
+                       pagent->card_type = card_type;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "card_status = %d, card_type = %d", sim_status, pagent->card_type);
+                       switch (sim_status) {
+                       case TAPI_SIM_STATUS_CARD_NOT_PRESENT:  /* = 0x01, /**<  Card not present */
+                       case TAPI_SIM_STATUS_CARD_REMOVED:      /* =0x0b, /**<  Card removed **/
+                               pagent->bis_no_sim = TRUE;
+                               break;
+                       case TAPI_SIM_STATUS_CARD_ERROR:        /* = 0x00, /**< Bad card / On the fly SIM gone bad **/
+                       case TAPI_SIM_STATUS_SIM_INITIALIZING:  /* = 0x02, /**<  Sim is Initializing state **/
+                       case TAPI_SIM_STATUS_SIM_INIT_COMPLETED:        /* = 0x03, /**<  Sim Initialization ok **/
+                       case TAPI_SIM_STATUS_SIM_PIN_REQUIRED:  /* = 0x04, /**<  PIN  required state **/
+                       case TAPI_SIM_STATUS_SIM_PUK_REQUIRED:  /* = 0x05, /**<  PUK required state **/
+                       case TAPI_SIM_STATUS_CARD_BLOCKED:      /* = 0x06,              /**<  PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
+                       case TAPI_SIM_STATUS_SIM_NCK_REQUIRED:  /* = 0x07,              /**<  Network Control Key required state **/
+                       case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED: /* = 0x08,              /**<  Network Subset Control Key required state **/
+                       case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED: /* = 0x09,              /**<  Service Provider Control Key required state **/
+                       case TAPI_SIM_STATUS_SIM_CCK_REQUIRED:  /* = 0x0a,              /**<  Corporate Control Key required state **/
+                       case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED:
+                               pagent->bis_no_sim = FALSE;
+                               break;
+                       default:
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Unknown Card_status = %d", sim_status);
+                               pagent->bis_no_sim = TRUE;
+                               break;
+                       }
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "gphone_init_finished is TRUE.");
+       }
+
+       /*As a Backup, whenever this event is arrived, just update this variable*/
+       gphone_init_finished = TRUE;
+}
+
+static gboolean __call_vc_subscribe_tapi_event(call_vc_callagent_state_t *pcall_agent)
+{
+       int index = 0;
+
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       int num_event = 0;
+
+       if (tel_init() == TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_init() success.");
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_init() failed.");
+               return FALSE;
+       }
+
+       int call_event_list[] = {
+               TAPI_EVENT_CALL_SETUP_CNF,
+               TAPI_EVENT_CALL_ALERT_IND,
+               TAPI_EVENT_CALL_CONNECTED_IND,
+               TAPI_EVENT_CALL_INCOM_IND,
+               TAPI_EVENT_CALL_ANSWER_CNF,
+               TAPI_EVENT_CALL_RETRIEVE_CNF,
+               TAPI_EVENT_CALL_RETRIEVE_IND,
+               TAPI_EVENT_CALL_HOLD_IND,
+               TAPI_EVENT_CALL_HOLD_CNF,
+               TAPI_EVENT_CALL_TRANSFER_CNF,
+               TAPI_EVENT_CALL_TRANSFER_IND,
+               TAPI_EVENT_CALL_SETUPCONFERENCE_CNF,
+               TAPI_EVENT_CALL_SETUPCONFERENCE_IND,
+               TAPI_EVENT_CALL_SPLITCONFERENCE_CNF,
+               TAPI_EVENT_CALL_SEND_DTMF_CNF,
+               TAPI_EVENT_CALL_WAITING_IND,
+               TAPI_EVENT_CALL_FORWARD_IND,
+               TAPI_EVENT_CALL_RELEASE_CNF,
+               TAPI_EVENT_CALL_RELEASE_ALL_CNF,
+               TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF,
+               TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF,
+               TAPI_EVENT_CALL_END_IND,
+               TAPI_EVENT_CALL_BARRING_IND,
+               TAPI_EVENT_CALL_CUGINFO_IND,
+               TAPI_EVENT_CALL_AOCINFO_IND,
+               TAPI_EVENT_CALL_CALLINGNAMEINFO_IND,
+               TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND,
+               TAPI_EVENT_CALL_CLISUPRESSIONREJ_IND,
+               TAPI_EVENT_CALL_DEFLECTED_IND,
+               TAPI_EVENT_CALL_UNCOND_FORWARDING_IND,
+               TAPI_EVENT_CALL_COND_FORWARDING_IND,
+
+               TAPI_EVENT_SS_AOC_RSP,
+
+               TAPI_EVENT_SOUND_VOLUMECTRL_RSP,        /*CALL_VC_TAPI_CALL_EVENT_MAX_NUM : 33*/
+       };
+       num_event = sizeof(call_event_list) / sizeof(int);
+       for (index = 0; index < num_event; index++) {
+               api_err = tel_register_event(call_event_list[index], &pcall_agent->subscription_id[index], (TelAppCallback) & __call_vc_handle_tapi_events, NULL);
+               if (api_err != TAPI_API_SUCCESS) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tel_register_event() failed.. event id:[%d], api_err:[%d]", call_event_list[index], api_err);
+                       return FALSE;
+               }
+       }
+
+       int ready_event_list[] = {
+               TAPI_EVENT_POWER_SERVICE_READY_IND,     /*CALL_VC_TAPI_READY_EVENT_NUM 1*/
+       };
+       num_event = sizeof(ready_event_list) / sizeof(int);
+       for (index = 0; index < num_event; index++) {
+               api_err = tel_register_event(ready_event_list[index], &pcall_agent->subscription_id[index + CALL_VC_TAPI_CALL_EVENT_MAX_NUM], (TelAppCallback) & __call_vc_tapi_initialized_cb, NULL);
+               if (api_err != TAPI_API_SUCCESS) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tel_register_event() failed.. event id:[%d], api_err:[%d]", ready_event_list[index], api_err);
+                       return FALSE;
+               }
+       }
+
+       int sat_event_list[] = {
+               TAPI_EVENT_SAT_SETUP_CALL_IND,
+               TAPI_EVENT_SAT_CALL_CONTROL_IND,
+               TAPI_EVENT_SAT_SEND_DTMF_IND,   /*CALL_VC_SIMATK_EVENT_MAX_NUM : 3*/
+       };
+       num_event = sizeof(sat_event_list) / sizeof(int);
+       for (index = 0; index < num_event; index++) {
+               api_err = tel_register_event(sat_event_list[index], &pcall_agent->subscription_id[index + CALL_VC_TAPI_CALL_EVENT_MAX_NUM + CALL_VC_TAPI_READY_EVENT_NUM], (TelAppCallback) & __call_vc_handle_sat_engine_events_cb, NULL);
+               if (api_err != TAPI_API_SUCCESS) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tel_register_event() failed.. event id:[%d], api_err:[%d]", sat_event_list[index], api_err);
+                       return FALSE;
+               }
+       }
+
+       if (tel_register_app_name("org.tizen.voicecall") != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_register_app_name() failed");
+       }
+
+       gpcall_agent_for_callback = pcall_agent;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Subscribe to TAPI Success");
+
+       return TRUE;
+
+}
+
+static gboolean __call_vc_create_outgoing_callinfo(call_vc_callagent_state_t *pagent, voicecall_setup_info_t *psetup_call_info, call_vc_call_objectinfo_t *pcall_object, int *error_code)
+{
+       char call_number[VC_PHONE_NUMBER_LENGTH_MAX] = { 0, };
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_type=%d", psetup_call_info->call_type);
+
+       _vc_core_cm_clear_call_object(pcall_object);
+
+       /*Initialize following Call Agents state to defaults.*/
+       pagent->bonly_sos_call = FALSE;
+
+       /*Update CallObjects state to Prepare Outgoing*/
+       pcall_object->state = VC_CALL_STATE_PREPARE_OUTGOING;
+
+       /*Update Call|Objects Call Type*/
+       pcall_object->call_type = psetup_call_info->call_type;
+
+       /*Update Call Objects Identity*/
+       pcall_object->identity_mode = psetup_call_info->identity_mode;
+
+       /*Differentiate the call by its source of origination*/
+       switch (pcall_object->call_type) {
+       case VC_CALL_ORIG_TYPE_EMERGENCY:
+               {
+                       pagent->bonly_sos_call = TRUE;
+                       pcall_object->bemergency_number = TRUE;
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->source_tel_number, sizeof(pcall_object->source_tel_number), psetup_call_info->source_tel_number);
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->tel_number, sizeof(pcall_object->tel_number), psetup_call_info->tel_number);
+                       return TRUE;
+               }
+               break;
+       case VC_CALL_ORIG_TYPE_PINLOCK:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "PIN LOCK!!!!");
+                       pagent->bonly_sos_call = TRUE;
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->source_tel_number, sizeof(pcall_object->source_tel_number), psetup_call_info->source_tel_number);
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->tel_number, sizeof(pcall_object->tel_number), psetup_call_info->tel_number);
+               }
+               break;
+       case VC_CALL_ORIG_TYPE_NOSIM:   /*no sim (pagent->bis_no_sim == TRUE)*/
+               {
+                       pagent->bonly_sos_call = TRUE;
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->source_tel_number, sizeof(pcall_object->source_tel_number), psetup_call_info->source_tel_number);
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->tel_number, sizeof(pcall_object->tel_number), psetup_call_info->tel_number);
+               }
+               break;
+       case VC_CALL_ORIG_TYPE_NORMAL:
+       case VC_CALL_ORIG_TYPE_SAT:
+               {
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->source_tel_number, sizeof(pcall_object->source_tel_number), psetup_call_info->source_tel_number);
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->tel_number, sizeof(pcall_object->tel_number), psetup_call_info->tel_number);
+               }
+               break;
+       case VC_CALL_ORIG_TYPE_VOICEMAIL:
+               {
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->source_tel_number, sizeof(pcall_object->source_tel_number), psetup_call_info->source_tel_number);
+/*PDIAL_SEND_DTMF*/
+                       _vc_core_util_strcpy(pcall_object->tel_number, sizeof(pcall_object->tel_number), psetup_call_info->tel_number);
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalide Call Type: %d", pcall_object->call_type);
+               *error_code = ERROR_VOICECALL_INVALID_CALL_TYPE;
+               return FALSE;
+       }
+
+       /*Copy CUG Details */
+       memcpy(&pcall_object->cug_info, &psetup_call_info->cug_info, sizeof(voicecall_cug_info_t));
+
+       /*Check for Emergency Number */
+       _vc_core_util_extract_call_number(pcall_object->tel_number, call_number, sizeof(call_number));
+       pcall_object->bemergency_number = _vc_core_util_check_emergency_number(pagent->card_type, call_number, pagent->bis_no_sim, &pcall_object->ecc_category);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "no_sim=%d, emergency_number=%d", pagent->bis_no_sim, pcall_object->bemergency_number);
+
+       if (VC_CALL_ORIG_TYPE_PINLOCK == pcall_object->call_type && pcall_object->bemergency_number == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "PIN/PUK Lock and number is no emergency number, call cannot be made");
+               *error_code = ERROR_VOICECALL_EMERGENCY_CALLS_ONLY;
+               return FALSE;
+       }
+
+       if (pagent->bis_no_sim == TRUE && pcall_object->bemergency_number == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sim Not available and number is no emergency number, call cannot be made");
+               *error_code = ERROR_VOICECALL_CALL_IMPOSSIBLE_NOSIM_NOEMERGNUM;
+               return FALSE;
+       }
+
+       if (TRUE == pcall_object->bemergency_number) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Number is Emergency Number, Change call type to emergency");
+               psetup_call_info->call_type = pcall_object->call_type = VC_CALL_ORIG_TYPE_EMERGENCY;
+               psetup_call_info->ecc_category = pcall_object->ecc_category;
+       }
+
+       return TRUE;
+}
+
+static gboolean __call_vc_request_sat_call(call_vc_callagent_state_t *pagent, int mo_call_index, int *ret_code)
+{
+       call_vc_call_objectinfo_t callInfo;
+       TelSatCmdQualiSetupCall_t sat_request_type = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "mo_call_index = %d", mo_call_index);
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent->call_manager.setupcall_info.mocall_index == mo_call_index);
+
+       if (FALSE == _vc_core_cm_get_outgoing_call_info(&pagent->call_manager, &callInfo)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call info does not exist!");
+               *ret_code = ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+               return FALSE;
+       }
+
+       sat_request_type = pagent->call_manager.setupcall_info.satcall_setup_info.satengine_setupcall_data.calltype;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " SAT_CALL sat_request_type=%d", sat_request_type);
+
+       switch (sat_request_type) {
+       case TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL:
+               {
+                       pagent->call_manager.setupcall_info.satcall_setup_info.redial = TRUE;
+               }
+       case TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY:      /*Fall Through*/
+               {
+                       /* one is the call set up by SAT, so more than 1 means another call exists */
+                       if (_vc_core_cm_get_call_member_count(&pagent->call_manager) > 1) {
+                               /* voice call agent is busy */
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Call Exists, SAT call connot be continued");
+                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                               *ret_code = ERROR_VOICECALL_CALL_NOT_ALLOWED;
+                               return FALSE;
+                       }
+
+                       _vc_core_cm_set_outgoing_call_info(&pagent->call_manager, &callInfo);
+
+                       if (_vc_core_tapi_rqst_prepare_setup_call(pagent) == FALSE) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL fail to setup call");
+                               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                               *ret_code = ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED;
+                               return FALSE;
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Prepare Setup Call Success");
+                       }
+               }
+               break;
+       case TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL:
+               {
+                       pagent->call_manager.setupcall_info.satcall_setup_info.redial = TRUE;
+               }
+       case TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD:   /*Fall Through*/
+               {
+                       if (_vc_core_cm_isexists_active_call(&pagent->call_manager) && _vc_core_cm_isexists_held_call(&pagent->call_manager)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Both Activee & Hld call exists, SAT Call cannot be continued");
+                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                               *ret_code = ERROR_VOICECALL_CALL_NOT_ALLOWED;
+                               return FALSE;
+                       }
+                       if (_vc_core_cm_isexists_connected_call(&pagent->call_manager)) {
+                               if (FALSE == _vc_core_tapi_rqst_prepare_setup_call(pagent)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL hold fail");
+                                       _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                       _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                                       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                                       *ret_code = ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED;
+                                       return FALSE;
+                               }
+                       } else {
+                               /*If no other calls to hold, setup the call directly */
+                               if (FALSE == _vc_core_tapi_rqst_setup_call(pagent)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL fail to setup call");
+                                       _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                                       _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                                       *ret_code = ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED;
+                                       return FALSE;
+                               }
+                       }
+               }
+               break;
+       case TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL:
+               {
+                       pagent->call_manager.setupcall_info.satcall_setup_info.redial = TRUE;
+               }
+       case TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS:       /*Fall Through*/
+               {
+                       if (_vc_core_cm_isexists_active_call(&pagent->call_manager) || _vc_core_cm_isexists_held_call(&pagent->call_manager)) {
+                               /*Disconnect all calls and setup call */
+                               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP);
+                               _vc_core_tapi_rqst_release_all_calls(pagent);
+                       } else {
+                               if (FALSE == _vc_core_tapi_rqst_prepare_setup_call(pagent)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL fail to setup call");
+                                       _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                                       _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                                       *ret_code = ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED;
+                                       return FALSE;
+                               }
+                       }
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for this SAT Request Type");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+static gboolean __call_vc_request_call(call_vc_callagent_state_t *pagent, int mo_call_index, int *ret_code)
+{
+       call_vc_call_objectinfo_t callInfo;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent->call_manager.setupcall_info.mocall_index == mo_call_index);
+
+       _vc_core_cm_clear_call_object(&callInfo);
+       if (_vc_core_cm_get_outgoing_call_info(&pagent->call_manager, &callInfo) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call info does not exist!");
+               *ret_code = ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+               return FALSE;
+       }
+       /*Switch according to the CallType requested*/
+       switch (callInfo.call_type) {
+       case VC_CALL_ORIG_TYPE_NORMAL:
+       case VC_CALL_ORIG_TYPE_EMERGENCY:
+       case VC_CALL_ORIG_TYPE_NOSIM:
+       case VC_CALL_ORIG_TYPE_SAT:
+       case VC_CALL_ORIG_TYPE_PINLOCK:
+
+               /*Set the updated Object Info to the Call Manager*/
+               _vc_core_cm_set_outgoing_call_info(&pagent->call_manager, &callInfo);
+
+               if (_vc_core_tapi_rqst_prepare_setup_call(pagent) == FALSE) {
+                       _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                       *ret_code = ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Prepare Setup Call Failed");
+
+                       return FALSE;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Prepare Setup Call Success");
+               }
+
+               break;
+       default:
+               *ret_code = ERROR_VOICECALL_INVALID_CALL_TYPE;
+               CALL_ENG_DEBUG(ENG_DEBUG, "Not defined call type=%d", pagent->call_manager.setupcall_info.call_type);
+               return FALSE;
+               break;
+       }
+
+       return TRUE;
+}
+
+/**
+* This function prepares the call setup info structure for making call
+ *
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent    Handle to voicecall engine
+* @param[in]   psetup_call_info        Pointer to the call setup info structure.
+* @remarks             pvoicecall_agent and psetup_call_info cannot be NULL
+*                              Only on successfull completion of this API, _vc_core_engine_make_call can be made
+* @see                 See following API's also
+*                              -_vc_core_engine_make_call
+*                              -voicecall_clear_prepared_call
+*
+ */
+voicecall_error_t _vc_core_engine_prepare_call(voicecall_engine_t *pvoicecall_agent, voicecall_setup_info_t *psetup_call_info)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_call_objectinfo_t callobject_info;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       TelSimCardStatus_t sim_status;
+       TelSimCardType_t card_type = 0;
+       int sim_changed = 0;
+       gboolean status = FALSE;
+       int nIndex = 0;
+       int error_code = 0;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(psetup_call_info != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (FALSE == _vc_core_util_isvalid_telephone_number(psetup_call_info->tel_number)) {
+               return ERROR_VOICECALL_INVALID_TELEPHONE_NUMBER;
+       }
+
+       CALL_ENG_KPI("tel_check_service_ready start");
+       tapi_err = tel_check_service_ready(&status);
+       CALL_ENG_KPI("tel_check_service_ready done");
+       if (TAPI_API_SUCCESS != tapi_err || FALSE == status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Tapi not initialized");
+               return ERROR_VOICECALL_PHONE_NOT_INITIALIZED;
+       }
+       /*Check the Call Engines IO State*/
+       if (pagent->io_state != VC_INOUT_STATE_NONE && pagent->io_state != VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "pagent->io_state != VC_INOUT_STATE_NONE..io_state=%d", pagent->io_state);
+               return ERROR_VOICECALL_ENGINE_STATE_NOT_NONE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Checking for SIM Availablity");
+
+       /*memset(&sim_status, 0, sizeof(sim_status));*/
+       CALL_ENG_KPI("tel_get_sim_init_info start");
+       tapi_err = tel_get_sim_init_info(&sim_status, &sim_changed);
+       CALL_ENG_KPI("tel_get_sim_init_info done");
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_get_sim_init_info failed.. tapi_err = %d", tapi_err);
+
+               pagent->bis_no_sim = TRUE;
+               psetup_call_info->call_type = VC_CALL_ORIG_TYPE_NOSIM;
+       } else {
+               CALL_ENG_KPI("tel_get_sim_type start");
+               tel_get_sim_type(&card_type);
+               CALL_ENG_KPI("tel_get_sim_type done");
+               pagent->card_type = card_type;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "card_status = %d, card_type = %d", sim_status, pagent->card_type);
+               switch (sim_status) {
+               case TAPI_SIM_STATUS_CARD_NOT_PRESENT:  /* = 0x01, /**<  Card not present **/
+               case TAPI_SIM_STATUS_CARD_REMOVED:      /* =0x0b, /**<  Card removed **/
+                       pagent->bis_no_sim = TRUE;
+                       break;
+               case TAPI_SIM_STATUS_CARD_ERROR:        /* = 0x00, /**< Bad card / On the fly SIM gone bad **/
+               case TAPI_SIM_STATUS_SIM_INITIALIZING:  /* = 0x02, /**<  Sim is Initializing state **/
+               case TAPI_SIM_STATUS_SIM_INIT_COMPLETED:        /* = 0x03, /**<  Sim Initialization ok **/
+               case TAPI_SIM_STATUS_SIM_PIN_REQUIRED:  /* = 0x04, /**<  PIN  required state **/
+               case TAPI_SIM_STATUS_SIM_PUK_REQUIRED:  /* = 0x05, /**<  PUK required state **/
+               case TAPI_SIM_STATUS_CARD_BLOCKED:      /* = 0x06,              /**<  PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
+               case TAPI_SIM_STATUS_SIM_NCK_REQUIRED:  /* = 0x07,              /**<  Network Control Key required state **/
+               case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED: /* = 0x08,              /**<  Network Subset Control Key required state **/
+               case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED: /* = 0x09,              /**<  Service Provider Control Key required state **/
+               case TAPI_SIM_STATUS_SIM_CCK_REQUIRED:  /* = 0x0a,              /**<  Corporate Control Key required state **/
+               case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED:
+                       pagent->bis_no_sim = FALSE;
+                       break;
+               default:
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Unknown Card_status = %d", sim_status);
+                       pagent->bis_no_sim = TRUE;
+                       break;
+               }
+       }
+
+       /*Prepare Outgoing Call Info*/
+       _vc_core_cm_clear_call_object(&callobject_info);
+       if (__call_vc_create_outgoing_callinfo(pagent, psetup_call_info, &callobject_info, &error_code) == FALSE) {
+               return error_code;
+       }
+
+       /* Check for MO Call Possiblity */
+       if (_vc_core_ca_is_mocall_possible(pagent, callobject_info.bemergency_number) == FALSE) {
+               return ERROR_VOICECALL_CALL_NOT_ALLOWED;
+       }
+
+       /* Add the prepared call object to the CallManager */
+       nIndex = _vc_core_cm_add_call_object(&pagent->call_manager, &callobject_info);
+       if (nIndex != -1) {
+               /*If there is a previously made MO Call, clear that before setting the new mo call */
+               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+               _vc_core_cm_set_outgoing_call(&pagent->call_manager, nIndex);
+               psetup_call_info->mo_call_index = nIndex;
+       } else {
+               return ERROR_VOICECALL_CALL_NOT_ALLOWED;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function clears the data of the given call type.
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_type               call type
+* @param[in]   call_handle             Call handle of the connected call to be cleared
+* @remarks             This will clear the call data only when the call data are currently not being used
+*                              i,e) the data will be cleared only if the corresponding call is ended or the call data is not used at all.
+*                              call_handle argument is required only in case of connected call, Engine ignores call_handle for other
+*                              call types.
+*/
+voicecall_error_t _vc_core_engine_finalize_call(voicecall_engine_t *pvoicecall_agent, voicecall_call_type_t call_type, int call_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       gboolean bret_val = FALSE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_type = %d", call_type);
+
+       switch (call_type) {
+       case VC_OUTGOING_CALL:
+               {
+                       if ((VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED == pagent->io_state) || (VC_INOUT_STATE_OUTGOING_WAIT_ORIG == pagent->io_state) || (VC_INOUT_STATE_OUTGOING_WAIT_ALERT == pagent->io_state)) {
+                               return ERROR_VOICECALL_CALL_IS_IN_PROGRESS;
+                       }
+
+                       bret_val = _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+               }
+               break;
+       case VC_CONNECTED_CALL:
+               {
+                       call_vc_call_objectinfo_t call_object;
+
+                       if (TRUE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &call_object)) {
+                               if (VC_CALL_STATE_ENDED == call_object.state) {
+                                       bret_val = _vc_core_ca_clear_connected_call(pagent, call_handle);
+                               } else {
+                                       return ERROR_VOICECALL_CALL_IS_IN_PROGRESS;
+                               }
+                       }
+               }
+               break;
+       case VC_INCOMING_CALL:
+               {
+                       return ERROR_VOICECALL_NOT_SUPPORTED;
+               }
+               break;
+       default:
+               return ERROR_VOICECALL_INVALID_CALL_TYPE;
+       }
+
+       return (TRUE == bret_val) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function establishes an outgoing call with the details prepared using _vc_core_engine_prepare_call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent    Handle to voicecall engine
+* @param[in]   mo_call_index           Index of the prepare mo call
+* @param[out]  pcall_handle            Handle of the MO Call Made
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+* @see                 _vc_core_engine_end_call
+*/
+voicecall_error_t _vc_core_engine_make_call(voicecall_engine_t *pvoicecall_agent, int mo_call_index, int *pcall_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       gboolean ret_val = FALSE;
+       call_vc_call_objectinfo_t call_object;
+       int error_code = ERROR_VOICECALL_NONE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(mo_call_index >= 0 && mo_call_index <= 7, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_handle != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "...");
+
+       _vc_core_cm_clear_call_object(&call_object);
+       if (_vc_core_cm_get_outgoing_call_info(&pagent->call_manager, &call_object) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call info does not exist!");
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       if (VC_CALL_ORIG_TYPE_SAT == call_object.call_type) {
+               ret_val = __call_vc_request_sat_call(pagent, mo_call_index, &error_code);
+       } else {
+               ret_val = __call_vc_request_call(pagent, mo_call_index, &error_code);
+       }
+
+       if ((TRUE == ret_val) && (pagent->io_state == VC_INOUT_STATE_OUTGOING_WAIT_ALERT || pagent->io_state == VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED || pagent->io_state == VC_INOUT_STATE_OUTGOING_WAIT_ORIG)) {
+               *pcall_handle = _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager);
+               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call Handle: %d", *pcall_handle);
+
+       }
+
+       return (TRUE == ret_val) ? ERROR_VOICECALL_NONE : error_code;
+}
+
+static gboolean __call_vc_handle_sat_engine_events(call_vc_callagent_state_t *pcall_agent, int sat_event, int sat_event_type, int type, void *result)
+{
+       call_vc_callagent_state_t *pagent = pcall_agent;
+       call_vc_satsetup_info_t *psatsetup_info = NULL;
+       voicecall_sat_callinfo_t call_vc_sat_callinfo;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "sat_event: %d, sat_event_type: %d, command_type: %d", sat_event, sat_event_type, type);
+
+       psatsetup_info = (call_vc_satsetup_info_t *) &(pagent->call_manager.setupcall_info.satcall_setup_info);
+
+       switch (sat_event) {
+       case VC_ACTION_SAT_REQUEST:
+               {
+                       switch (sat_event_type) {
+                       case SAT_RQST_SETUP_CALL:
+                               {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "SAT_RQST_SETUP_CALL SAT Event is recieved...");
+
+                                       if ((pagent->io_state != VC_INOUT_STATE_NONE) || (pagent->callagent_state != CALL_VC_CA_STATE_NORMAL)) {
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL unable to process command!");
+                                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                               return FALSE;
+                                       }
+
+                                       /*Initialize Call Setup Data */
+                                       psatsetup_info->psat_rgb_data = NULL;
+                                       memset(&(psatsetup_info->satengine_setupcall_data), 0, sizeof(TelSatSetupCallIndCallData_t));
+                                       memcpy(&(psatsetup_info->satengine_setupcall_data), result, sizeof(TelSatSetupCallIndCallData_t));
+                                       psatsetup_info->satengine_event_type = type;
+                                       memset(&call_vc_sat_callinfo, 0, sizeof(voicecall_sat_callinfo_t));
+
+                                       _vc_core_util_strcpy(call_vc_sat_callinfo.call_number, sizeof(call_vc_sat_callinfo.call_number), (char *)psatsetup_info->satengine_setupcall_data.callNumber.string);
+                                       _vc_core_util_strcpy(call_vc_sat_callinfo.disp_text, sizeof(call_vc_sat_callinfo.disp_text), (char *)psatsetup_info->satengine_setupcall_data.dispText.string);
+                                       call_vc_sat_callinfo.duration = psatsetup_info->satengine_setupcall_data.duration;
+                                       if (call_vc_sat_callinfo.duration > 0) {
+                                               psatsetup_info->bduration = TRUE;
+
+                                               /*Store the duration, this remaining duration will be reduced in subsequent redial attempts */
+                                               psatsetup_info->remaining_duration = call_vc_sat_callinfo.duration;
+                                       }
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Voice call set up request sent to voice call application psatsetup_info->bduration = %d", psatsetup_info->bduration);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "psatsetup_info->remaining_duration = %lu", psatsetup_info->remaining_duration);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "sat call type = %d", psatsetup_info->satengine_setupcall_data.calltype);
+
+                                       _vc_core_ca_send_event_to_client(pagent, VC_ACTION_SAT_REQUEST, SAT_RQST_SETUP_CALL, 0, &call_vc_sat_callinfo);
+                               }
+                               break;
+                       case SAT_RQST_SEND_DTMF:
+                               {
+                                       memset(&(psatsetup_info->satengine_dtmf_data), 0, sizeof(TelSatSendDtmfIndDtmfData_t));
+                                       memcpy(&(psatsetup_info->satengine_dtmf_data), result, sizeof(TelSatSendDtmfIndDtmfData_t));
+                                       psatsetup_info->satengine_event_type = type;
+
+                                       if (FALSE == __vc_core_is_dtmf_possible(pagent)) {
+                                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SEND_DTMF, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                       } else {
+                                               memset(&call_vc_sat_callinfo, 0, sizeof(voicecall_sat_callinfo_t));
+
+                                               _vc_core_util_strcpy(call_vc_sat_callinfo.call_number, sizeof(call_vc_sat_callinfo.call_number), (char *)psatsetup_info->satengine_dtmf_data.dtmfString.string);
+                                               call_vc_sat_callinfo.bsat_hidden = psatsetup_info->satengine_dtmf_data.bIsHiddenMode;
+                                               _vc_core_ca_send_event_to_client(pagent, VC_ACTION_SAT_REQUEST, SAT_RQST_SEND_DTMF, 0, &call_vc_sat_callinfo);
+                                       }
+                               }
+                               break;
+                       }
+               }
+               break;
+       case VC_ACTION_SAT_RESPONSE:
+               {
+                       call_vc_call_objectinfo_t objectInfo;
+                       switch (sat_event_type) {
+                       case SAT_RESP_SETUP_CALL:
+                               {
+                                       if (_vc_core_cm_get_outgoing_call_info(&pagent->call_manager, &objectInfo) == FALSE) {
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL_CONTROL Outgoing call info does not exist..");
+                                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+                                               break;
+                                       }
+                                       memset(&(psatsetup_info->satengine_callctrl_data), 0, sizeof(psatsetup_info->satengine_callctrl_data));
+                                       memcpy(&(psatsetup_info->satengine_callctrl_data), result, sizeof(psatsetup_info->satengine_callctrl_data));
+
+                                       switch (psatsetup_info->satengine_callctrl_data.callCtrlResult) {
+                                       case TAPI_SAT_CALL_CTRL_R_ALLOWED_NO_MOD:
+                                               {
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "ret=TAPI_SAT_CALL_CTRL_R_ALLOWED_NO_MOD");
+                                                       pagent->call_manager.setupcall_info.call_control_type = CALL_VC_SAT_CC_ALLOWED;
+                                               }
+                                               break;
+                                       case TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED:
+                                               {
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "ret=TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED");
+                                                       pagent->call_manager.setupcall_info.call_control_type = CALL_VC_SAT_CC_NOT_ALLOWED;
+                                                       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+
+                                                       if (objectInfo.call_type == VC_CALL_ORIG_TYPE_SAT) {
+                                                               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                                                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_CONTROL_PERMANENT_PROBLEM);
+                                                       } else {
+                                                               _vc_core_cm_clear_outgoing_call(&pagent->call_manager);
+                                                       }
+
+                                                       memset(&call_vc_sat_callinfo, 0, sizeof(voicecall_sat_callinfo_t));
+                                                       call_vc_sat_callinfo.sat_mo_call_ctrl_res = CALL_NOT_ALLOWED;
+                                                       _vc_core_ca_send_event_to_client(pagent, VC_ACTION_SAT_RESPONSE, SAT_RESP_SETUP_CALL, 0, &call_vc_sat_callinfo);
+                                               }
+                                               break;
+                                       case TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD:
+                                               {
+                                                       gboolean bsscode = FALSE;
+
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "ret=TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD");
+                                                       pagent->call_manager.setupcall_info.call_control_type = CALL_VC_SAT_CC_ALLOWED_WITH_MODIFIED;
+
+                                                       memset(objectInfo.connected_telnumber, 0, sizeof(objectInfo.connected_telnumber));
+                                                       memset(objectInfo.connected_name, 0, sizeof(objectInfo.connected_name));
+
+                                                       _vc_core_util_strcpy(objectInfo.connected_telnumber, sizeof(objectInfo.connected_telnumber), (char *)psatsetup_info->satengine_callctrl_data.u.callCtrlCnfCallData.address.string);
+                                                       _vc_core_util_strcpy(objectInfo.connected_name, sizeof(objectInfo.connected_name), (char *)psatsetup_info->satengine_callctrl_data.dispData.string);
+
+                                                       /*Prepare the data to be sent to the client */
+                                                       memset(&call_vc_sat_callinfo, 0, sizeof(voicecall_sat_callinfo_t));
+                                                       _vc_core_util_strcpy(call_vc_sat_callinfo.call_number, sizeof(call_vc_sat_callinfo.call_number), objectInfo.connected_telnumber);
+                                                       _vc_core_util_strcpy(call_vc_sat_callinfo.disp_text, sizeof(call_vc_sat_callinfo.disp_text), objectInfo.connected_name);
+
+                                                       /* when call number is changed as SS string */
+                                                       _vc_core_engine_status_isvalid_ss_code((voicecall_engine_t *)pcall_agent, objectInfo.connected_telnumber, &bsscode);
+                                                       if (TRUE == bsscode) {
+                                                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+
+                                                               call_vc_sat_callinfo.sat_mo_call_ctrl_res = CALL_CHANGED_TO_SS;
+                                                               CALL_ENG_DEBUG(ENG_DEBUG, "VC Call Control Response Event: %d", call_vc_sat_callinfo.sat_mo_call_ctrl_res);
+                                                       } else {
+                                                               objectInfo.bemergency_number = _vc_core_util_check_emergency_number(pagent->card_type, objectInfo.connected_telnumber, pagent->bis_no_sim, &objectInfo.ecc_category);
+                                                               _vc_core_cm_set_outgoing_call_info(&pagent->call_manager, &objectInfo);
+
+                                                               call_vc_sat_callinfo.duration = psatsetup_info->satengine_setupcall_data.duration;
+                                                               call_vc_sat_callinfo.sat_mo_call_ctrl_res = CALL_ALLOWED_WITH_MOD;
+                                                               CALL_ENG_DEBUG(ENG_DEBUG, "VC Call Control Response Event: %d", call_vc_sat_callinfo.sat_mo_call_ctrl_res);
+                                                       }
+
+                                                       /*Send the Call Control response event to the client */
+                                                       _vc_core_ca_send_event_to_client(pagent, VC_ACTION_SAT_RESPONSE, SAT_RESP_SETUP_CALL, 0, &call_vc_sat_callinfo);
+                                               }
+                                               break;
+                                       default:
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL_CONTROL - not defined return code");
+                                               break;
+                                       }
+                               }
+                               break;
+                       default:
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid Sat Event Type");
+                               break;
+                       }
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid SAT Event");
+               return FALSE;
+       }
+       return TRUE;
+}
+
+static gboolean __call_vc_incoming_idle_cb(gpointer puser_data)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)puser_data;
+       call_vc_call_objectinfo_t callobject_info;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Handling Incoming call in Idle Callback");
+
+       if (FALSE == _vc_core_cm_get_incoming_call_info(&pagent->call_manager, &callobject_info)) {
+               CALL_ENG_DEBUG(ENG_ERR, "Incoming Call Info not available");
+               return FALSE;
+       }
+
+       /*If the Incoming End event arrived before processing the Incoming request, then donot change the state to Incombox */
+       if (pagent->io_state != VC_INOUT_STATE_INCOME_END) {
+               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_INCOME_BOX);
+       }
+
+       /* Send Incoming Call Event to Client */
+       /*_vc_core_ca_send_event_to_client(pagent, VC_CALL_INCOM, callobject_info.call_handle, callobject_info.bincoming_call_is_fwded, callobject_info.tel_number);*/
+       _vc_core_ca_send_event_to_client(pagent, VC_CALL_INCOM, callobject_info.call_handle, 0, callobject_info.tel_number);
+
+       /* Reset Incoming Call Details */
+       gincoming_call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       memset(&gincoming_call_info, 0, sizeof(TelCallIncomingCallInfo_t));
+
+       /*Check whether the incoming call is accepted or rejected by
+          cheking the Incoming callobjects status */
+       if (_vc_core_cm_get_call_state(&pagent->call_manager, callobject_info.call_handle) != VC_CALL_STATE_INCOME) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "[Call :%d] not in VC_CALL_STATE_INCOME state", callobject_info.call_handle);
+               return FALSE;
+       }
+
+       /*Always Return FALSE from this g_idle callback, so it will not be called again */
+       return FALSE;
+}
+
+/*Rejects the call, only if the call state is in rejected state*/
+static gboolean __call_vc_reject_call_full_idle_cb(gpointer puser_data)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)puser_data;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int pReqId = VC_RQSTID_DEFAULT;
+       call_vc_call_objectinfo_t call_object;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Rejecting the [Call:%d] in IDLE CB", gincoming_call_handle);
+
+       if (gincoming_call_handle != -1) {
+               _vc_core_cm_get_call_object(&pcall_agent->call_manager, gincoming_call_handle, &call_object);
+
+               if (VC_CALL_STATE_REJECTED == call_object.state) {
+                       /*Answer the incoming call by accepting or rejecting the call */
+                       tapi_err = tel_answer_call(gincoming_call_handle, TAPI_CALL_ANSWER_REJECT, &pReqId);
+                       if (TAPI_API_SUCCESS != tapi_err) {
+                               CALL_ENG_DEBUG(ENG_ERR, "tel_answer_call failed, Error: %d", tapi_err);
+                       }
+
+                       gincoming_call_handle = -1;
+               }
+       }
+       return FALSE;
+}
+
+/*Always reject the call, if the reject call handle is valid*/
+static gboolean __call_vc_reject_call_idle_cb(gpointer puser_data)
+{
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int pReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Rejecting the [Call Handle :%d] in IDLE CB", gincoming_call_handle);
+
+       if (gphone_rejected_call != -1) {
+               /*Answer the incoming call by accepting or rejecting the call */
+               tapi_err = tel_answer_call(gphone_rejected_call, TAPI_CALL_ANSWER_REJECT, &pReqId);
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_ERR, "tel_answer_call failed, Error: %d", tapi_err);
+               }
+               gphone_rejected_call = -1;
+       }
+       return FALSE;
+}
+
+static gboolean __call_vc_sat_idle_cb(gpointer puser_data)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)puser_data;
+
+       TelSatSetupCallIndCallData_t temp_data = { 0, };
+
+       memset(&temp_data, 0, sizeof(TelSatSetupCallIndCallData_t));
+       memcpy(&temp_data, gpresult, sizeof(TelSatSetupCallIndCallData_t));
+       CALL_ENG_DEBUG(ENG_DEBUG, "[SAT] call_data->calltype = 0x%x", temp_data.calltype);
+       CALL_ENG_DEBUG(ENG_DEBUG, "[SAT] call_data->dispText.string = %s", temp_data.dispText.string);
+       CALL_ENG_DEBUG(ENG_DEBUG, "[SAT] call_data->callNumber.string = %s", temp_data.callNumber.string);
+       CALL_ENG_DEBUG(ENG_DEBUG, "[SAT] call_data->duration = %d", (int)temp_data.duration);
+
+       __call_vc_handle_sat_engine_events(pagent, VC_ACTION_SAT_REQUEST, gsat_event_type, gtype, gpresult);
+
+       /*Free the result after copying the data */
+       /*g_free(gpresult);*/
+       gpresult = NULL;
+       /*Always Return FALSE from this g_idle callback, so it will not be called again */
+       return FALSE;
+}
+
+void _vc_core_engine_handle_incoming_tapi_events(void *mt_data, void *userdata)
+{
+       char *data = mt_data;
+
+       call_vc_callagent_state_t *pagent = gpcall_agent_for_callback;
+
+       VOICECALL_RETURN_IF_FAIL(pagent != NULL);
+
+       int current_mt_call_handle = -1;
+       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_INCOM_IND...");
+
+       /*Safety Check to avoid the mutiple incoming noti for the same call */
+       current_mt_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+       CALL_ENG_DEBUG(ENG_ERR, "current_mt_call_handle = %d", current_mt_call_handle);
+
+       if (current_mt_call_handle != VC_TAPI_INVALID_CALLHANDLE) {
+               TelCallIncomingCallInfo_t mt_call_info;
+               CALL_ENG_DEBUG(ENG_ERR, "Already an Incoming Call exits ,Problem in accpeting the incoming call, Current Call Details");
+               CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+               CALL_ENG_DEBUG(ENG_ERR, "****************Currently received call details *************************");
+
+               memset(&mt_call_info, 0, sizeof(TelCallIncomingCallInfo_t));
+               memcpy(&mt_call_info, data, sizeof(TelCallIncomingCallInfo_t));
+               CALL_ENG_DEBUG(ENG_ERR, "****************call handle = [%d] *************************", mt_call_info.CallHandle);
+               CALL_ENG_DEBUG(ENG_ERR, "****************call Number = [%s] *************************", mt_call_info.szCallingPartyNumber);
+               CALL_ENG_DEBUG(ENG_ERR, "**************** Ignoring this incoming notification *************************");
+               return;
+       }
+
+       memset(&gincoming_call_info, 0, sizeof(TelCallIncomingCallInfo_t));
+       memcpy(&gincoming_call_info, data, sizeof(TelCallIncomingCallInfo_t));
+       gincoming_call_handle = gincoming_call_info.CallHandle;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "CallHandle = %d,  Number = %s", gincoming_call_info.CallHandle, gincoming_call_info.szCallingPartyNumber);
+
+       /* Reject the Incoming call */
+       if (FALSE == gphone_init_finished) {
+               CALL_ENG_DEBUG(ENG_ERR, "Phone is not initialized, So reject the Call");
+
+               gphone_rejected_call = gincoming_call_handle;
+
+               /*Reject the Call in the Idle Callback */
+               g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_reject_call_idle_cb, pagent, NULL);
+
+               return;
+       }
+
+       /* Check the IO State before accepting the call */
+       switch (pagent->io_state) {
+       case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+       case VC_INOUT_STATE_OUTGOING_WAIT_ALERT:
+       case VC_INOUT_STATE_OUTGOING_WAIT_ORIG:
+       case VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED:
+       case VC_INOUT_STATE_INCOME_END: /*If the Previous End event is still not prcocessed then reject the call */
+               {
+                       call_vc_call_objectinfo_t objectInfo;
+
+                       /* setting the new member info */
+                       _vc_core_cm_clear_call_object(&objectInfo);
+                       objectInfo.call_handle = gincoming_call_handle;
+                       _vc_core_cm_change_call_state(&objectInfo, VC_CALL_STATE_REJECTED);
+
+                       /* add new member info */
+                       _vc_core_cm_add_call_object(&pagent->call_manager, &objectInfo);
+
+                       /*Reject the Call in the Idle Callback */
+                       g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_reject_call_full_idle_cb, pagent, NULL);
+
+                       return;
+               }
+               break;
+               /*If Outgoing call is in any of the following wait state during an Incoming Event Cancel the Outgoing Call */
+       case VC_INOUT_STATE_OUTGOING_WAIT_RELEASE:      /*If Outgoing call is in any of the following wait state during an Incoming Event Cancel the Outgoing Call */
+       case VC_INOUT_STATE_OUTGOING_ABORTED:
+       case VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE:
+       case VC_INOUT_STATE_OUTGOING_WAIT_REDIAL:
+       case VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX:
+               {
+                       int mo_call_handle = -1;
+                       mo_call_handle = _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager);
+                       _vc_core_cm_remove_call_object(&pagent->call_manager, mo_call_handle);
+
+                       /* Inform the Client that waiting outgoing call are cleaned up to accept the incoming call , */
+                       _vc_core_ca_send_event_to_client(pagent, VC_ACTION_INCOM_FORCE, mo_call_handle, 0, NULL);
+               }
+       default:
+               break;
+       }
+
+       /*If Incoming End event is still pending, First Process the incoming end indication before processing the new
+          Incoming Call */
+       if (VC_INOUT_STATE_INCOME_END == pagent->io_state) {
+               int mt_call_handle = -1;
+
+               CALL_ENG_DEBUG(ENG_ERR, "Previous Incoming End Call Not processed, Processing Here");
+               mt_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+               if (mt_call_handle != -1) {
+                       __call_vc_incomingcall_endhandle(pagent, mt_call_handle);
+               }
+       }
+
+       /* Handle Incoming Call */
+       if (TRUE == _vc_core_tapi_event_handle_incoming_event(pagent, gincoming_call_handle, &gincoming_call_info)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Using Idle Add Full with G_PRIORITY_HIGH_IDLE for processing Incoming Call");
+               g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_incoming_idle_cb, pagent, NULL);
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "MT CALL event processed done.");
+       return;
+
+}
+
+static void __call_vc_handle_tapi_events(TelTapiEvent_t *event, void *userdata)
+{
+       int event_type = event->EventType;
+       int status = event->Status;
+       char *data = event->pData;
+
+       call_vc_callagent_state_t *pagent = gpcall_agent_for_callback;
+
+       VOICECALL_RETURN_IF_FAIL(pagent != NULL);
+
+       CALL_ENG_DEBUG(ENG_WARN, "event_type:[0x%x], status= %d", event_type, status);
+
+       /* Process TAPI events */
+       switch (event_type) {
+#ifdef _INCOM_END_
+       case TAPI_EVENT_CALL_INCOM_IND:
+               {
+                       int current_mt_call_handle = -1;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_INCOM_IND...");
+
+                       /*Safety Check to avoid the mutiple incoming noti for the same call */
+                       current_mt_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+                       CALL_ENG_DEBUG(ENG_ERR, "current_mt_call_handle = %d", current_mt_call_handle);
+
+                       if (current_mt_call_handle != VC_TAPI_INVALID_CALLHANDLE) {
+                               TelCallIncomingCallInfo_t mt_call_info;
+                               CALL_ENG_DEBUG(ENG_ERR, "Already an Incoming Call exits ,Problem in accpeting the incoming call, Current Call Details");
+                               CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+                               CALL_ENG_DEBUG(ENG_ERR, "****************Currently received call details *************************");
+
+                               memset(&mt_call_info, 0, sizeof(TelCallIncomingCallInfo_t));
+                               memcpy(&mt_call_info, data, sizeof(TelCallIncomingCallInfo_t));
+                               CALL_ENG_DEBUG(ENG_ERR, "****************call handle = [%d] *************************", mt_call_info.CallHandle);
+                               CALL_ENG_DEBUG(ENG_ERR, "****************call Number = [%s] *************************", mt_call_info.szCallingPartyNumber);
+                               CALL_ENG_DEBUG(ENG_ERR, "**************** Ignoring this incoming notification *************************");
+                               return;
+                       }
+
+                       memset(&gincoming_call_info, 0, sizeof(TelCallIncomingCallInfo_t));
+                       memcpy(&gincoming_call_info, data, sizeof(TelCallIncomingCallInfo_t));
+                       gincoming_call_handle = gincoming_call_info.CallHandle;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "CallHandle = %d,  Number = %s", gincoming_call_info.CallHandle, gincoming_call_info.szCallingPartyNumber);
+
+                       /* Reject the Incoming call */
+                       if (FALSE == gphone_init_finished) {
+                               CALL_ENG_DEBUG(ENG_ERR, "Phone is not initialized, So reject the Call");
+
+                               gphone_rejected_call = gincoming_call_handle;
+
+                               /*Reject the Call in the Idle Callback */
+                               g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_reject_call_idle_cb, pagent, NULL);
+
+                               return;
+                       }
+
+                       /* Check the IO State before accepting the call */
+                       switch (pagent->io_state) {
+                       case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+                       case VC_INOUT_STATE_OUTGOING_WAIT_ALERT:
+                       case VC_INOUT_STATE_OUTGOING_WAIT_ORIG:
+                       case VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED:
+                       case VC_INOUT_STATE_INCOME_END: /*If the Previous End event is still not prcocessed then reject the call */
+                               {
+                                       call_vc_call_objectinfo_t objectInfo;
+
+                                       /* setting the new member info */
+                                       _vc_core_cm_clear_call_object(&objectInfo);
+                                       objectInfo.call_handle = gincoming_call_handle;
+                                       _vc_core_cm_change_call_state(&objectInfo, VC_CALL_STATE_REJECTED);
+
+                                       /* add new member info */
+                                       _vc_core_cm_add_call_object(&pagent->call_manager, &objectInfo);
+
+                                       /*Reject the Call in the Idle Callback */
+                                       g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_reject_call_full_idle_cb, pagent, NULL);
+
+                                       return;
+                               }
+                               break;
+                               /*If Outgoing call is in any of the following wait state during an Incoming Event Cancel the Outgoing Call */
+                       case VC_INOUT_STATE_OUTGOING_WAIT_RELEASE:      /*If Outgoing call is in any of the following wait state during an Incoming Event Cancel the Outgoing Call */
+                       case VC_INOUT_STATE_OUTGOING_ABORTED:
+                       case VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE:
+                       case VC_INOUT_STATE_OUTGOING_WAIT_REDIAL:
+                       case VC_INOUT_STATE_OUTGOING_SHOW_RETRY_CALLBOX:
+                               {
+                                       int mo_call_handle = -1;
+                                       mo_call_handle = _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager);
+                                       _vc_core_cm_remove_call_object(&pagent->call_manager, mo_call_handle);
+
+                                       /* Inform the Client that waiting outgoing call are cleaned up to accept the incoming call , */
+                                       _vc_core_ca_send_event_to_client(pagent, VC_ACTION_INCOM_FORCE, mo_call_handle, 0, NULL);
+                               }
+                       default:
+                               break;
+                       }
+
+                       /*If Incoming End event is still pending, First Process the incoming end indication before processing the new
+                          Incoming Call */
+                       if (VC_INOUT_STATE_INCOME_END == pagent->io_state) {
+                               int mt_call_handle = -1;
+
+                               CALL_ENG_DEBUG(ENG_ERR, "Previous Incoming End Call Not processed, Processing Here");
+                               mt_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+                               if (mt_call_handle != -1) {
+                                       __call_vc_incomingcall_endhandle(pagent, mt_call_handle);
+                               }
+                       }
+
+                       /* Handle Incoming Call */
+                       if (TRUE == _vc_core_tapi_event_handle_incoming_event(pagent, gincoming_call_handle, &gincoming_call_info)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Using Idle Add Full with G_PRIORITY_HIGH_IDLE for processing Incoming Call");
+                               g_idle_add_full(G_PRIORITY_HIGH_IDLE, __call_vc_incoming_idle_cb, pagent, NULL);
+                       }
+
+                       return;
+               }
+               break;
+#endif
+       case TAPI_EVENT_CALL_RELEASE_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_RELEASE_CNF..");
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /*Ignore this event as endication will be received from TAPI for the call release request */
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Success response for Call Release request");
+                               break;
+                       } else {
+                               /*Call Release request failed, handle the call end process in this event itself as the end indication may not be released */
+                               CALL_ENG_DEBUG(ENG_ERR, "Call Release request failed, proceeding with Call end process");
+                       }
+               }
+       case TAPI_EVENT_CALL_END_IND:   /*Fall Through */
+               {
+                       call_vc_call_objectinfo_t objectInfo;
+                       voicecall_call_state_t present_call_state = VC_CALL_STATE_NONE;
+                       call_vc_handle incoming_call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       TelTapiEndCause_t tapi_cause = TAPI_CALL_END_NO_CAUSE;
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       TelCallEndInfo_t callEndInfo;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_END_IND..");
+
+                       if (TAPI_EVENT_CALL_RELEASE_CNF == event_type) {
+                               /* tapicallback data =  Call Handle */
+                               memset(&call_handle, 0, sizeof(call_vc_handle));
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+
+                               /*Tapi doesn't send cause for TAPI_EVENT_CALL_RELEASE_CNF */
+                               tapi_cause = TAPI_CALL_END_NO_CAUSE;
+                       } else {
+                               /* tapicallback data =  CallEndInfo */
+                               memset(&callEndInfo, 0, sizeof(TelCallEndInfo_t));
+                               memcpy(&callEndInfo, data, sizeof(TelCallEndInfo_t));
+
+                               call_handle = callEndInfo.pCallHandle;
+                               tapi_cause = callEndInfo.CallEndCause;
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d,end cause:%d", call_handle, tapi_cause);
+
+                       /*the end of incoming call rejected by callagent, because the call had come before the phone is initialized */
+                       if (call_handle == gphone_rejected_call) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Rejected call..phone not initialized");
+
+                               gphone_rejected_call = VC_TAPI_INVALID_CALLHANDLE;
+
+                               /*If no more calls available, End the Application */
+                               __vc_core_check_engine_active_task(pagent);
+                               return;
+                       }
+
+                       incoming_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+                       present_call_state = _vc_core_cm_get_call_state(&pagent->call_manager, call_handle);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "New Call Handle = %d, Already registered MT call handle : %d", call_handle, incoming_call_handle);
+                       switch (present_call_state) {
+                       case VC_CALL_STATE_NONE:
+                       case VC_CALL_STATE_ENDED:
+                       case VC_CALL_STATE_ENDED_FINISH:
+                               {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d state is %d", call_handle, present_call_state);
+                                       /*If no more calls available, End the Application */
+                                       __vc_core_check_engine_active_task(pagent);
+                                       return;
+                               }
+                               break;
+                       case VC_CALL_STATE_REJECTED:
+                               {
+                                       /*End of incoming call (not registered as incoming call in CallAgent) rejected by callagent */
+                                       if (incoming_call_handle != call_handle) {
+                                               _vc_core_cm_remove_call_object(&pagent->call_manager, call_handle);
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "end of call rejected by callagent");
+
+                                               /*If no more calls available, End the Application */
+                                               __vc_core_check_engine_active_task(pagent);
+                                               return;
+                                       }
+                               }
+                               break;
+                       default:
+                               break;
+                       }
+
+                       /*End of the call rejected by user or by callagent (when hold is failed) */
+                       if ((VC_INOUT_STATE_INCOME_WAIT_RELEASE == pagent->io_state) && (incoming_call_handle == call_handle)) {
+                               _vc_core_cm_remove_call_object(&pagent->call_manager, call_handle);
+
+                               /*Change the In Out state to None*/
+                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+
+                               /*Notify Client about rejected Event*/
+                               _vc_core_ca_send_event_to_client(pagent, VC_CALL_REJECTED_END, call_handle, 0, NULL);
+
+                               return;
+                       }
+
+                       /*End of Incoming Call */
+                       if (incoming_call_handle == call_handle) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Adding Incoming End Event to Idle Callback");
+                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_INCOME_END);
+                               /*Make sure that the End Indication is processed always after the Incoming Indication , as both are
+                                  processed in Idle Add Callbacks */
+                               g_idle_add(__call_vc_incoming_call_end_idle_cb, pagent);
+                               return;
+                       }
+
+                       /*End of Outgoing Call */
+                       if (_vc_core_cm_get_outgoing_call_handle(&pagent->call_manager) == call_handle) {
+                               __call_vc_outgoingcall_endhandle(pagent, call_handle, TAPI_EVENT_CALL_END_IND, tapi_cause);
+                               return;
+                       }
+
+                       /*End of Normal Connected Call */
+                       _vc_core_tapi_event_handle_call_end_event(pagent, event_type, call_handle, tapi_cause);
+
+                       CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+                       _vc_core_cm_clear_call_object(&objectInfo);
+                       if (FALSE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &objectInfo)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Call Already Cleared for Call Handle = %d", call_handle);
+
+                               /*
+                                * Because of _vc_core_tapi_rqst_answer_call( .., VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT,.. ) inside _vc_core_tapi_event_handle_call_end_event(),
+                                * pagent->call_manager is cleared. so, we didn't send VC_CALL_NORMAL_END to call-ui.
+                                * so we should send this event to call-ui.
+                                */
+                               {
+                                       voice_call_end_cause_type_t end_cause_type;
+                                       _vc_core_tapi_event_get_end_cause_type(event_type, tapi_cause, &end_cause_type);
+                                       _vc_core_ca_send_event_to_client(pagent, VC_CALL_NORMAL_END, call_handle, end_cause_type, NULL);
+                               }
+                       } else {
+                               _vc_core_ca_send_event_to_client(pagent, VC_CALL_NORMAL_END, objectInfo.call_handle, objectInfo.end_cause_type, NULL);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_RELEASE_ALL_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_RELEASE_ALL_CNF");
+               }
+               break;
+       case TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF");
+               }
+               break;
+       case TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF");
+               }
+               break;
+       case TAPI_EVENT_CALL_ALERT_IND:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       call_vc_handle mo_call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_KPI("TAPI_EVENT_CALL_ALERT_IND START");
+                       /*There are possiblities, that TAPI issued the Alert Notification and it is pending in the gmain loop, but meanwhile, the call
+                          is released by the user - so ignore the event if it doesn't match with the IN OUT Wait state */
+                       if (VC_INOUT_STATE_OUTGOING_WAIT_ALERT != pagent->io_state) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Io State not in WAIT_ORIG, current io state is : %d", pagent->io_state);
+                               return;
+                       }
+                       /*tapi_data = (call_handle)*/
+                       memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Alert Call Handle = %d", call_handle);
+
+                       mo_call_handle = _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO Call Handle = %d", mo_call_handle);
+
+                       /*Get the outgoing call handle from CallManger and check*/
+                       if ((VC_TAPI_INVALID_CALLHANDLE == call_handle) || (mo_call_handle != call_handle)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call does not exist or call_handle doesn't match");
+                               break;
+                       }
+
+                       _vc_core_tapi_event_handle_alert_event(pagent, call_handle);
+                       CALL_ENG_KPI("TAPI_EVENT_CALL_ALERT_IND done");
+               }
+               break;
+       case TAPI_EVENT_CALL_SETUP_CNF:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       call_vc_call_objectinfo_t objectInfo;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Data Received for Setup CNF is %p", data);
+                       CALL_ENG_KPI("Set Up CNF start");
+
+                       if (TRUE == _vc_core_cm_get_outgoing_call_info(&pagent->call_manager, &objectInfo)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "MO call index (%d)",objectInfo.call_id);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "EXCEPTION:Outgoing call Info Missing..");
+                       }
+
+                       /*Copy Telephony Data */
+                       /* tapi_data = (call_handle) */
+                       if (data != NULL) {
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Received Call Handle = %d", call_handle);
+                       }
+
+                       if (VC_INOUT_STATE_OUTGOING_WAIT_ORIG != pagent->io_state) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Io State not in WAIT_ORIG, current io state is : %d", pagent->io_state);
+                               return;
+                       }
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /* Get the outgoing call handle from CallManger and check */
+                               if ((VC_TAPI_INVALID_CALLHANDLE == call_handle)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call does not exist or call_handle doesn't match");
+                                       break;
+                               }
+
+                               /* Set the Call Handle to the CallbObject for future reference */
+                               objectInfo.call_handle = call_handle;
+                               _vc_core_cm_set_outgoing_call_info(&pagent->call_manager, &objectInfo);
+
+                               _vc_core_tapi_event_handle_originated_event(pagent, call_handle);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "MO Call SetupCNF Failed with error cause: %d", status);
+
+                               _vc_core_cm_clear_call_object(&objectInfo);
+
+                               __call_vc_outgoingcall_endhandle(pagent, objectInfo.call_handle, TAPI_EVENT_CALL_END_IND, TAPI_CC_CAUSE_FACILITY_REJECTED);
+                       }
+                       CALL_ENG_KPI("Set Up CNF done");
+               }
+               break;
+       case TAPI_EVENT_CALL_ANSWER_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_ANSWER_CNF");
+
+                       if (status != TAPI_CAUSE_SUCCESS) {
+                               /*If IO State is waiting for Answer Response */
+                               if ((VC_INOUT_STATE_INCOME_WAIT_CONNECTED == pagent->io_state) || (VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED == pagent->io_state) || (VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED == pagent->io_state)) {
+                                       int mt_call_handle = -1;
+
+                                       mt_call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+
+                                       if (mt_call_handle != -1) {
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "mt_call_handle = %d", mt_call_handle);
+
+                                               /*Send Hold Failed Notification to client UI */
+                                               if (pagent->callagent_state == CALL_VC_CA_STATE_WAIT_HOLD) {
+                                                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                                                       _vc_core_ca_send_event_to_client(pagent, VC_ERROR_OCCURED, ERROR_VOICECALL_HOLD_FAILED, 0, NULL);
+                                               }
+
+                                               /*Send Incoming call MT End Indication to Client UI */
+                                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_INCOME_END);
+                                               g_idle_add(__call_vc_incoming_call_end_idle_cb, pagent);
+                                       }
+                               }
+                       }else {
+                               _vc_core_ca_send_event_to_client(pagent, VC_CALL_ANSWER_CNF, 0, 0, NULL);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_CONNECTED_IND:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_CONNECTED_IND...");
+                       CALL_ENG_KPI("TAPI_EVENT_CALL_CONNECTED_IND start");
+
+                       /*tapi callback data = (call_handle)*/
+                       memcpy(&call_handle, data, sizeof(int));
+                       CALL_ENG_DEBUG(ENG_DEBUG, "IO State: %d", pagent->io_state);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Connected Call Handle = %d", call_handle);
+
+                       if (call_handle == _vc_core_cm_get_incoming_call_handle(&pagent->call_manager)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call is being connected...");
+                       } else if (call_handle == _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call is being connected...");
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "invalid connected event Call Handle = %d", call_handle);
+
+                               if ((VC_INVALID_CALL_INDEX != pagent->call_manager.mtcall_index) || (VC_INVALID_CALL_INDEX != pagent->call_manager.setupcall_info.mocall_index)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "incoming/outgoin calls call exits, invalid call handle [PROBLEM]");
+                                       CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+
+                                       assert(0);
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_ERR, "No pending calls to connect, ignoreing connect event for call handle= %d", call_handle);
+                                       return;
+                               }
+                               break;
+                       }
+
+                       /*Handle Connected Call Event */
+                       _vc_core_tapi_event_handle_call_connect_event(pagent, call_handle);
+                       CALL_ENG_KPI("TAPI_EVENT_CALL_CONNECTED_IND done");
+               }
+               break;
+       case TAPI_EVENT_CALL_HOLD_CNF:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_HOLD_CNF...");
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /*tapicallback data = call_handle*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       } else {
+                               _vc_core_cm_get_first_active_call_handle(&pagent->call_manager, &call_handle);
+                       }
+
+                       if (_vc_core_tapi_event_handle_call_held_event(pagent, call_handle, status) == FALSE) {
+                               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       } else {
+                               /*
+                                  Be carefull in clearing the end call member, because _vc_core_engine_status_is_any_call_ending
+                                  function depends on the end call object status. If it is cleared often, the check by
+                                  _vc_core_engine_status_is_any_call_ending becomes invalid
+                                */
+                               _vc_core_cm_clear_endcall_member(&pagent->call_manager);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_RETRIEVE_CNF:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_RETRIEVE_CNF...");
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /*tapicallback data = call_handle*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       } else {
+                               _vc_core_cm_get_first_held_call_handle(&pagent->call_manager, &call_handle);
+                       }
+
+                       if (_vc_core_tapi_event_handle_call_retrieve_event(pagent, call_handle, status) == FALSE) {
+                               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       } else {
+                               /*
+                                  Be carefull in clearing the end call member, because _vc_core_engine_status_is_any_call_ending
+                                  function depends on the end call object status. If it is cleared often, the check by
+                                  _vc_core_engine_status_is_any_call_ending becomes invalid
+                                */
+                               _vc_core_cm_clear_endcall_member(&pagent->call_manager);
+                       }
+
+               }
+               break;
+       case TAPI_EVENT_CALL_SETUPCONFERENCE_CNF:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_SETUPCONFERENCE_CNF...");
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /*tapicallback data = call_handle*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       } else {
+                               call_handle = 0;
+                       }
+
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       _vc_core_tapi_event_handle_call_join_event(pagent, call_handle, status);
+               }
+               break;
+       case TAPI_EVENT_CALL_SPLITCONFERENCE_CNF:
+               {
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_SPLITCONFERENCE_CNF...");
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               /*tapicallback data = call_handle*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       }
+
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       _vc_core_tapi_event_handle_call_split_event(pagent, call_handle, status);
+               }
+               break;
+       case TAPI_EVENT_CALL_TRANSFER_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_TRANSFER_CNF");
+
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       _vc_core_tapi_event_handle_call_transfer_event(pagent, status);
+               }
+               break;
+       case TAPI_EVENT_CALL_RETRIEVE_IND:
+       case TAPI_EVENT_CALL_HOLD_IND:
+       case TAPI_EVENT_CALL_TRANSFER_IND:
+       case TAPI_EVENT_CALL_SETUPCONFERENCE_IND:
+       case TAPI_EVENT_CALL_BARRING_IND:
+       case TAPI_EVENT_CALL_WAITING_IND:
+       case TAPI_EVENT_CALL_COND_FORWARDING_IND:
+       case TAPI_EVENT_CALL_UNCOND_FORWARDING_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received Indication %d", event_type);
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return;
+
+                       } else {
+                               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                               /*tapicallback data = call_handle + cause*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, 0);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_CUGINFO_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received TAPI_EVENT_CALL_CUGINFO_IND");
+
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return;
+
+                       } else {
+                               int cugIndex = 0;
+                               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                               /*tapicallback data = call_handle + cause*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                               memcpy(&cugIndex, data + sizeof(call_vc_handle), sizeof(int));
+
+                               /*cugindex is not used inside this function*/
+                               /*It may be used in the future*/
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, cugIndex);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_CALLINGNAMEINFO_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received TAPI_EVENT_CALL_CALLINGNAMEINFO_IND");
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Event Not Handled, Feature Not Implemented");
+
+#ifdef _CALLING_NAME_INFO_
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return;
+
+                       } else {
+                               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                               /*Structure for calling name information */
+                               TelCallingNameInfo_t calling_nameinfo;
+                               memset(&calling_nameinfo, 0, sizeof(TelCallingNameInfo_t));
+
+                               /*TapiCallingNameInfo is padded as second parameneter
+                               tapicallback data = call_handle + cause*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                               memcpy(&calling_nameinfo, data + sizeof(call_vc_handle), sizeof(TelCallingNameInfo_t));
+
+                               /*calling_info is not used in this function, so not passed.
+                               It may be used in the future*/
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, 0);
+                       }
+#endif
+               }
+               break;
+#ifdef _OLD_TAPI_
+       case TAPI_EVENT_CALL_SSNOTIFY_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received TAPI_EVENT_CALL_SSNOTIFY_IND");
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Event Not Handled, Feature Not Implemented");
+
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return TRUE;
+
+                       } else {
+                               tapi_call_ss_codes_t ss_code;
+
+                               /*ss_code is padded as first parameter in the data
+                               data = ss_code*/
+                               memcpy(&ss_code, data, sizeof(tapi_call_ss_codes_t));
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, ss_code);
+
+                       }
+               }
+               break;
+
+       case TAPI_EVENT_CALL_REDIRECT_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received TAPI_EVENT_CALL_REDIRECT_CNF");
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Event Not Handled, Feature Not Implemented");
+
+                       /*TODO abthul, not used currently */
+                       return;
+
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return;
+                       } else {
+                               gboolean bValue;
+
+                               /*bValue is padded as first parameter in data from TAPI
+                               data = bValue*/
+                               memcpy(&bValue, data, sizeof(gboolean));
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, bValue);
+                       }
+               }
+#endif
+               break;
+       case TAPI_EVENT_CALL_FORWARD_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Received TAPI_EVENT_CALL_FORWARD_IND");
+
+                       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[Now tapi requesting...callagent_state=%d, not display network ind]", pagent->callagent_state);
+                               return;
+
+                       } else {
+                               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                               TelCallForwardType_t forwardind_type = -1;
+
+                               /*tapicallback data = call_handle + forwardind_type*/
+                               memcpy(&call_handle, data, sizeof(call_vc_handle));
+                               memcpy(&forwardind_type, data + sizeof(call_vc_handle), sizeof(TelCallForwardType_t));
+
+                               _vc_core_tapi_event_handle_notification(pagent, event_type, forwardind_type);
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_AOCINFO_IND:
+               {
+                       TelCallAocInfo_t aoc_info;
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       memset(&aoc_info, 0, sizeof(TelCallAocInfo_t));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Recived TAPI_EVENT_CALL_AOCINFO_IND...");
+
+                       /*data = call_handle + tapi_call_aoc_info_t */
+                       memcpy(&call_handle, data, sizeof(int));
+                       memcpy(&aoc_info, (data + sizeof(int)), sizeof(TelCallAocInfo_t));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+                       _vc_core_tapi_event_handle_aoc(pagent, call_handle, &aoc_info);
+               }
+               break;
+       case TAPI_EVENT_SS_AOC_RSP:
+               {
+                       TelCallAocInfo_t aoc_info;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Recived TAPI_EVENT_SS_AOC_RSP");
+
+                       if (TAPI_CAUSE_SUCCESS == status) {
+                               memset(&aoc_info, 0, sizeof(TelCallAocInfo_t));
+                               memcpy(&aoc_info, data, sizeof(TelCallAocInfo_t));
+
+                               switch (aoc_info.AocType) {
+                               case TAPI_SS_AOC_TYPE_PUC:
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Recived aoc_ppm = %f", aoc_info.PPM);
+                                       pagent->aoc_ppm = aoc_info.PPM;
+                                       break;
+                               default:
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for AOC Type : %d", aoc_info.AocType);
+                               }
+                       }
+               }
+               break;
+       case TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND:
+               {
+                       TelCallConnectedNumberInfo_t connected_number_info;
+                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+                       memset(&connected_number_info, 0, sizeof(TelCallConnectedNumberInfo_t));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND");
+
+                       /*data = callhandle + 0(dwParam)*/
+                       memcpy(&call_handle, data, sizeof(call_vc_handle));
+                       memcpy(&connected_number_info, (data + sizeof(call_vc_handle)), sizeof(TelCallConnectedNumberInfo_t));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+                       /*Abthul:todo , Check the usage of connected number info*/
+                       _vc_core_tapi_event_connected_line_ind_handle(pagent, call_handle, &connected_number_info);
+               }
+               break;
+       case TAPI_EVENT_CALL_SEND_DTMF_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "event_type == TAPI_EVENT_CALL_SEND_DTMF_CNF");
+
+                       if (TAPI_CAUSE_SUCCESS != status) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Tapi Error Code %d", status);
+                               /*Forward the events to client */
+                               _vc_core_ca_send_event_to_client(pagent, VC_CALL_DTMF_ACK, FALSE, 0, NULL);
+                       } else {
+                               /*Forward the events to client */
+                               _vc_core_ca_send_event_to_client(pagent, VC_CALL_DTMF_ACK, TRUE, 0, NULL);
+                       }
+               }
+               break;
+       case TAPI_EVENT_SOUND_VOLUMECTRL_RSP:
+               {
+                       int tapi_sound_path = 0;
+                       int volume_level = 0;
+                       tapi_sound_volumn_ctrl_res snd_resp_data;
+
+                       memset(&snd_resp_data, 0, sizeof(tapi_sound_volumn_ctrl_res));
+                       memcpy(&snd_resp_data, data, sizeof(tapi_sound_volumn_ctrl_res));
+
+                       int i = 0;
+                       tapi_sound_path = pagent->curr_tapi_path;
+                       for (i = 0; i < snd_resp_data.num_record; i++) {
+                               if (tapi_sound_path == snd_resp_data.pinfo[i].type) {
+                                       volume_level = snd_resp_data.pinfo[i].level;
+                                       break;
+                               }
+                       }
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Changed Vol Type = %d, Vol Level = %d", tapi_sound_path, volume_level);
+
+                       _vc_core_ca_send_event_to_client(pagent, VC_CALL_GET_VOLUME_RESP, tapi_sound_path, volume_level, NULL);
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Default: event_type = %d", event_type);
+               break;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "tapi event(%d) processed done.", event_type);
+
+       return;
+}
+
+static gboolean __call_vc_outgoingcall_endhandle(call_vc_callagent_state_t *pagent, call_vc_handle call_handle, int type, TelTapiEndCause_t tapi_cause)
+{
+       call_vc_call_objectinfo_t objectInfo;
+       voice_call_end_cause_type_t endcause_type = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pagent != NULL);
+
+       _vc_core_cm_clear_call_object(&objectInfo);
+       _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &objectInfo);
+
+       /*Inform Client App about MO Call Disconnect */
+       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_ABORTED);
+       _vc_core_tapi_event_get_end_cause_type(type, tapi_cause, &endcause_type);
+       _vc_core_ca_send_event_to_client(pagent, VC_CALL_OUTGOING_END, call_handle, (int)endcause_type, NULL);
+
+       /* Response call setup result to SAT if this is SAT call */
+       if (VC_CALL_ORIG_TYPE_SAT == objectInfo.call_type) {
+               /*Cancelled by user */
+               if (VC_CALL_STATE_CANCELLED == objectInfo.state) {
+                       _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN);
+               } else {        /* Disconnected by Network */
+
+                       call_vc_satsetup_info_t *pcall_vc_satcall_info = NULL;
+
+                       pcall_vc_satcall_info = (call_vc_satsetup_info_t *) &(pagent->call_manager.setupcall_info.satcall_setup_info);
+
+                       if (FALSE == pcall_vc_satcall_info->redial) {
+                               /*Send only if SAT redial is not enabled */
+                               _vc_core_ca_send_sat_response(pagent, SAT_RQST_SETUP_CALL, CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND);
+                       }
+               }
+
+               /*Free SAT Icon data if available */
+               if (pagent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data != NULL) {
+                       free(pagent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data);
+                       pagent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data = NULL;
+               }
+       }
+
+       /* SS: 1 send, while outgoing is CONNECTING state... */
+       if (CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL == pagent->callagent_state) {
+               gboolean bActiveCall = _vc_core_cm_isexists_active_call(&pagent->call_manager);
+               gboolean bHoldCall = _vc_core_cm_isexists_held_call(&pagent->call_manager);
+
+               if (FALSE == bActiveCall) {
+                       if (TRUE == bHoldCall) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Continue SS Action");
+
+                               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+
+                               if (_vc_core_tapi_rqst_retrieve_call(pagent) == TRUE) {
+                                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_UNHOLD);
+                               } else {
+                                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                               }
+                       } else {
+                               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "active call must not exist!");
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_NORMAL);
+               }
+       }
+
+       return TRUE;
+}
+
+static gboolean __call_vc_incoming_call_end_idle_cb(gpointer puser_data)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)puser_data;
+       call_vc_handle call_handle = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Ending the Incoming Call in Idle Callback");
+       /*Send the Incoming end indication to the client, only if the io state is in VC_INOUT_STATE_INCOME_END */
+       if (VC_INOUT_STATE_INCOME_END == pagent->io_state) {
+               call_handle = _vc_core_cm_get_incoming_call_handle(&pagent->call_manager);
+               if (-1 != call_handle) {
+                       __call_vc_incomingcall_endhandle(pagent, call_handle);
+               }
+       }
+       return FALSE;
+}
+
+static gboolean __call_vc_incomingcall_endhandle(call_vc_callagent_state_t *pagent, call_vc_handle call_handle)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+
+       if (TRUE == _vc_core_ca_send_event_to_client(pagent, VC_CALL_INCOM_END, call_handle, 0, NULL)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "client call back returned TRUE Removing Inomcing call Object");
+
+               /*Remove Call Object Once the Incoming Call Got Ended*/
+               _vc_core_cm_remove_call_object(&pagent->call_manager, call_handle);
+
+               CALL_VC_DUMP_CALLDETAILS(&pagent->call_manager);
+
+               /*Finally Move the IO State None*/
+               _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_NONE);
+       }
+       return TRUE;
+}
+
+static gboolean __call_vc_is_callagent_waitstate(call_vc_callagent_state_t *pagent)
+{
+
+       switch (pagent->callagent_state) {
+       case CALL_VC_CA_STATE_WAIT_SPLIT:
+       case CALL_VC_CA_STATE_WAIT_DROP:
+       case CALL_VC_CA_STATE_WAIT_SWAP:
+       case CALL_VC_CA_STATE_WAIT_HOLD:
+       case CALL_VC_CA_STATE_WAIT_UNHOLD:
+       case CALL_VC_CA_STATE_WAIT_JOIN:
+       case CALL_VC_CA_STATE_WAIT_TRANSFER_CNF:
+       case CALL_VC_CA_STATE_WAIT_TRANSFER_CALLEND:
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL:
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL:
+       case CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL:
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS:
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP:
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SWITCH_TO_VIDEO_CALL:
+               {
+                       return TRUE;
+               }
+               break;
+       default:
+               return FALSE;
+       }
+}
+
+/**
+ * This function checks whether dtmf is possible
+ *
+ * @return             This function returns TRUE if dtmf is possible or else FALSE
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean __vc_core_is_dtmf_possible(call_vc_callagent_state_t *pcall_agent)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (VC_INOUT_STATE_NONE != pcall_agent->io_state) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "__vc_core_is_dtmf_possible, io_state not idle");
+               return FALSE;
+       }
+
+       if (CALL_VC_CA_STATE_NORMAL != pcall_agent->callagent_state) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "__vc_core_is_dtmf_possible, callagent_state not idle");
+               return FALSE;
+       }
+
+       if (FALSE == _vc_core_cm_isexists_active_call(&pcall_agent->call_manager)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "NO Active Calls available to send DTMF");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "DTMF Possible");
+       return TRUE;
+}
+
+/**
+ * This function checks the voicecall engine's idle status and send VC_ACTION_NO_ACTIVE_TASK to client if engine is idle
+ *
+ * @return             void
+ * @param[in]          pcall_agent     Pointer to the call agent structure
+ */
+void __vc_core_check_engine_active_task(call_vc_callagent_state_t *pcall_agent)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_agent != NULL);
+       if (_vc_core_ca_check_end(pcall_agent)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Engine is Idle, Informing the Client");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_ACTION_NO_ACTIVE_TASK, 0, 0, NULL);
+       }
+}
+
+/**
+* This function ends only the connected call corresponding to the given call handle
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             Call handle of the call to be ended
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call
+*                              - _vc_core_engine_end_call_bycallId
+*/
+voicecall_error_t _vc_core_engine_end_call_byhandle(voicecall_engine_t *pvoicecall_agent, int call_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       return (TRUE == _vc_core_tapi_rqst_end_call_by_callhandle(pagent, call_handle)) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function ends a call corresponding to the given call ID
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_id                 call id of the call to be ended
+* @remarks             pvoicecall_agent cannot be NULL
+*                              call_id shall take only values between 1 to 7
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call
+*                              - _vc_core_engine_end_call_byhandle
+*/
+voicecall_error_t _vc_core_engine_end_call_bycallId(voicecall_engine_t *pvoicecall_agent, int call_id)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       call_vc_groupstate_t call_group_state = CALL_VC_GROUP_STATE_NONE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL((call_id >= 1 && call_id <= 7), ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       call_handle = _vc_core_cm_get_call_handle_ingroup_bycallId(&pagent->call_manager, call_id);
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       call_group_state = _vc_core_cm_get_group_state_callid(&pagent->call_manager, call_id);
+       if (CALL_VC_GROUP_STATE_ACTIVE == call_group_state) {
+
+               if (-1 == _vc_core_cm_get_active_group_index(&pagent->call_manager)) {
+                       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+               }
+
+               if (TRUE == _vc_core_tapi_rqst_end_call_by_callhandle(pagent, call_handle)) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_DROP);
+                       return ERROR_VOICECALL_NONE;
+               }
+       } else if (CALL_VC_GROUP_STATE_HOLD == call_group_state) {
+               int held_group_member_num = 0;
+               int held_group_index = -1;
+
+               held_group_index = _vc_core_cm_get_held_group_index(&pagent->call_manager);
+               if (-1 == held_group_index) {
+                       return FALSE;
+               }
+
+               held_group_member_num = _vc_core_cm_get_member_count_ingroup(&pagent->call_manager, held_group_index);
+               if (held_group_member_num > 1) {
+                       /*Individual calls cannot be ended when the conf call in held state */
+                       return ERROR_VOICECALL_OPERATION_NOT_ALLOWED;
+               }
+
+               if (TRUE == _vc_core_tapi_rqst_end_call_by_callhandle(pagent, call_handle)) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_DROP);
+                       return ERROR_VOICECALL_NONE;
+               }
+       }
+
+       return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+}
+
+/**
+* This function ends the call according to the given end call type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   end_call_type           End Call Type
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also following functions
+*                              - _vc_core_engine_make_call
+*                              - _vc_core_engine_end_call_byhandle
+*                              - _vc_core_engine_end_call_bycallId
+*                              .
+*/
+voicecall_error_t _vc_core_engine_end_call(voicecall_engine_t *pvoicecall_agent, _vc_core_engine_end_call_type_t end_call_type)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       gboolean bret_val = FALSE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*If Call Agent is waiting for any of the release event then ignore the end call request */
+       if ((CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL == pagent->callagent_state) || (CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL == pagent->callagent_state) || (CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS == pagent->callagent_state)) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "end_call_type = %d", end_call_type);
+
+       switch (end_call_type) {
+       case VC_END_OUTGOING_CALL:
+               {
+                       bret_val = _vc_core_tapi_rqst_release_outgoing_call(pagent);
+               }
+               break;
+       case VC_END_INCOMING_CALL:
+               {
+                       bret_val = _vc_core_tapi_rqst_release_incoming_call(pagent);
+               }
+               break;
+       case VC_END_ACTIVE_OR_HELD_CALLS:
+               {
+                       bret_val = _vc_core_tapi_rqst_end_call(pagent);
+               }
+               break;
+       case VC_END_ALL_ACTIVE_CALLS:
+               {
+                       bret_val = _vc_core_ca_end_active_calls(pagent);
+               }
+               break;
+       case VC_END_ALL_HELD_CALLS:
+               {
+                       bret_val = _vc_core_ca_end_held_calls(pagent);
+               }
+               break;
+       case VC_END_ALL_CALLS:
+               {
+                       bret_val = _vc_core_ca_end_all_calls(pagent);
+               }
+               break;
+       default:
+               return ERROR_VOICECALL_INVALID_CALL_TYPE;
+       }
+
+       return (TRUE == bret_val) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_INCOMPLETE;
+}
+
+/**
+* This function does the explicit call transfer
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_transfer_calls(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (CALL_VC_CA_STATE_WAIT_TRANSFER_CNF == pagent->callagent_state) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       } else if (FALSE == _vc_core_ca_is_transfer_call_possible(pagent)) {
+               return ERROR_VOICECALL_TRANSFER_CALL_NOT_POSSIBLE;
+       } else {
+               if (TRUE == _vc_core_tapi_rqst_transfer_call(pagent)) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_TRANSFER_CNF);
+                       return ERROR_VOICECALL_NONE;
+               }
+       }
+
+       return ERROR_VOICECALL_TRANSFER_FAILED;
+}
+
+/**
+* This function swaps the active and held calls if any available
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_hold_call
+*                              - _vc_core_engine_retrieve_call
+*
+*/
+voicecall_error_t _vc_core_engine_swap_calls(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*If call agent is in any of the wait states, then ignore the request */
+       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       }
+
+       if (TRUE == _vc_core_tapi_rqst_swap_calls(pagent)) {
+#ifdef SWAP_SUPPORT
+               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE);
+#else
+               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_SWAP);
+#endif
+               return ERROR_VOICECALL_NONE;
+       }
+
+       return ERROR_VOICECALL_SWAP_FAILED;
+}
+
+/**
+* This function puts the active call if any on hold
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 voicecall_retreive_call
+*/
+voicecall_error_t _vc_core_engine_hold_call(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       }
+#ifdef _CPHS_DEFINED_
+       if (TRUE == _vc_core_svcall_cphs_csp_get_status(pagent, VC_CPHS_CSP_HOLD)) {
+               if (TRUE == _vc_core_tapi_rqst_hold_call(pagent)) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_HOLD);
+                       return ERROR_VOICECALL_NONE;
+               }
+       } else {
+               return ERROR_VOICECALL_HOLD_NOT_SUPPORTED;
+       }
+#else
+       if (TRUE == _vc_core_tapi_rqst_hold_call(pagent)) {
+               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_HOLD);
+               return ERROR_VOICECALL_NONE;
+       }
+#endif
+       return ERROR_VOICECALL_HOLD_FAILED;
+}
+
+/**
+* This function retrieves/activates the held call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_hold_call
+*/
+voicecall_error_t _vc_core_engine_retrieve_call(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (TRUE == __call_vc_is_callagent_waitstate(pagent)) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       }
+
+       if (TRUE == _vc_core_tapi_rqst_retrieve_call(pagent)) {
+               _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_UNHOLD);
+               return ERROR_VOICECALL_NONE;
+       }
+       return ERROR_VOICECALL_RETREIVE_FAILED;
+}
+
+/**
+* This function sets up a conference beween the currently available active and held calls
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_private_call
+*                              - _vc_core_engine_private_call_by_callid
+*
+*/
+voicecall_error_t _vc_core_engine_setup_conference(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*If call agent is in any of the wait states, then ignore the request */
+       if (CALL_VC_CA_STATE_WAIT_JOIN == pagent->callagent_state) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       } else if (FALSE == _vc_core_ca_is_conf_call_possible(pagent)) {
+               return ERROR_VOICECALL_CONF_NOT_POSSIBLE;
+       } else {
+               if (TRUE == _vc_core_tapi_rqst_join_calls(pagent)) {
+                       _vc_core_ca_change_agent_state(pagent, CALL_VC_CA_STATE_WAIT_JOIN);
+                       return ERROR_VOICECALL_NONE;
+               }
+       }
+       return ERROR_VOICECALL_SETUP_CONF_FAILED;
+}
+
+/**
+* This function makes a private call to the call member corressponding to the given call id.
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_id                 Call ID of the call to be made private
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_setup_conference
+*                              - _vc_core_engine_private_call
+*
+*/
+voicecall_error_t _vc_core_engine_private_call_by_callid(voicecall_engine_t *pvoicecall_agent, int call_id)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL((call_id >= 1 && call_id <= 7), ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (CALL_VC_CA_STATE_WAIT_SPLIT == pagent->callagent_state) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       } else if (FALSE == _vc_core_ca_is_private_call_possible(pagent)) {
+               return ERROR__vc_core_engine_private_call_NOT_POSSIBLE;
+       } else {
+               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+               call_handle = _vc_core_cm_get_call_handle_ingroup_bycallId(&pagent->call_manager, call_id);
+
+               if (VC_TAPI_INVALID_CALLHANDLE != call_handle) {
+                       return (TRUE == _vc_core_tapi_rqst_private_call(pagent, call_handle)) ? ERROR_VOICECALL_NONE : ERROR__vc_core_engine_private_call_FAILED;
+               }
+       }
+
+       return ERROR_VOICECALL_INVALID_CALLID;
+}
+
+/**
+* This function makes a private call to the given call member from the currently available active conference call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   call_handle             call handle of the call to be made private
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 See also the following APIs
+*                              - _vc_core_engine_setup_conference
+*                              - _vc_core_engine_private_call_by_callid
+*
+*/
+voicecall_error_t _vc_core_engine_private_call(voicecall_engine_t *pvoicecall_agent, int call_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (CALL_VC_CA_STATE_WAIT_SPLIT == pagent->callagent_state) {
+               return ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+       } else if (FALSE == _vc_core_ca_is_private_call_possible(pagent)) {
+               return ERROR__vc_core_engine_private_call_NOT_POSSIBLE;
+       }
+
+       return (TRUE == _vc_core_tapi_rqst_private_call(pagent, call_handle)) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_REQUEST_FAILED;
+}
+
+/**
+* This function rejects the incoming call if any
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   budub                   User Determined User Busy - TRUE, Else - FALSE
+* @exception           In case of exceptions return value contains appropriate error code.
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_answer_call
+*/
+voicecall_error_t _vc_core_engine_reject_call(voicecall_engine_t *pvoicecall_agent, gboolean budub)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       int error_code = -1;
+       gboolean ret = FALSE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       ret = _vc_core_tapi_rqst_reject_mt_call(pagent, budub, &error_code);
+
+       return (TRUE == ret) ? ERROR_VOICECALL_NONE : error_code;
+}
+
+/**
+* This function answers a call according to the given answer type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   answer_type             The answer type to be used
+* @remarks             pvoicecall_agent and pcall_handle cannot be NULL
+* @see                 _vc_core_engine_reject_call
+*/
+voicecall_error_t _vc_core_engine_answer_call(voicecall_engine_t *pvoicecall_agent, voicecall_answer_type_t answer_type)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       int error_code = 0;
+       gboolean ret = FALSE;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+#ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(answer_type, VC_ANSWER_NORMAL, VC_ANSWER_RELEASE_ALL_AND_ACCEPT, ERROR_VOICECALL_INVALID_ARGUMENTS);
+#else
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(answer_type, VC_ANSWER_NORMAL, VC_ANSWER_RELEASE_HOLD_AND_ACCEPT, ERROR_VOICECALL_INVALID_ARGUMENTS);
+#endif
+       ret = _vc_core_tapi_rqst_answer_call(pcall_agent, answer_type, &error_code);
+
+       return (TRUE == ret) ? ERROR_VOICECALL_NONE : error_code;
+}
+
+/**
+* This function sends the given dtmf digits
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   pdtmf_string            dtmf digits to be sent
+* @remarks             pvoicecall_agent and pdtmf_string cannot be NULL
+*                              pdtmf_string shall only accept strings containing the digit value (0-9,A,B,C,D,*,#)
+*
+*/
+voicecall_error_t _vc_core_engine_send_dtmf(voicecall_engine_t *pvoicecall_agent, char *pdtmf_string)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(pdtmf_string != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       if (FALSE == _vc_core_util_isvalid_dtmf_number(pdtmf_string)) {
+               _vc_core_ca_send_event_to_client(pagent, VC_ERROR_OCCURED, ERROR_VOICECALL_INVALID_DTMF_CHAR, -1, NULL);
+               return ERROR_VOICECALL_INVALID_DTMF_CHAR;
+       }
+
+       return (TRUE == _vc_core_tapi_rqst_start_dtmf(pagent, pdtmf_string)) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_DTMF_FAILED;
+}
+
+/**
+* This function sends response to sat based on the given sat response type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to voicecall engine
+* @param[in]   sat_rqst_resp_type  sat rqst/response type sent by client
+* @param[in]   sat_response_type  sat response type to be sent to SAT
+*/
+voicecall_error_t _vc_core_engine_send_sat_response(voicecall_engine_t *pvoicecall_agent, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(sat_rqst_resp_type, SAT_RQST_SETUP_CALL, SAT_RESP_SETUP_CALL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(sat_response_type, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND, CALL_VC_ME_RET_SUCCESS, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       return (TRUE == _vc_core_ca_send_sat_response(pagent, sat_rqst_resp_type, sat_response_type)) ? ERROR_VOICECALL_NONE : ERROR_VOICECALL_REQUEST_FAILED;
+}
+
+/**
+* This function finalizes the voiecall engine and removes all allocated resources
+*
+* @return              nothing
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @remarks             pvoicecall_agent cannot be NULL
+*/
+void _vc_core_engine_engine_finish(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       int error_code = 0;
+       int index = 0;
+
+       VOICECALL_RETURN_IF_FAIL(pvoicecall_agent != NULL);
+
+       /*Unsubscribe Events */
+       CALL_ENG_DEBUG(ENG_DEBUG, "Unsubscribing Events");
+       for (index = 0; index < CALL_VC_TAPI_SUBSCRIPTION_MAX; index++) {
+               error_code = tel_deregister_event(pcall_agent->subscription_id[index]);
+               if (error_code != TAPI_API_SUCCESS) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tel_deregister_event failed. sub id is %d error_code is %d", pcall_agent->subscription_id[index], error_code);
+                       break;
+               }
+       }
+
+       tel_deinit();
+
+       VOICECALL_RETURN_IF_FAIL(pcall_agent != NULL);
+       _vc_core_ca_finish_agent(pcall_agent);
+}
+
+#ifdef _SAT_MENU_
+/**
+* This function requests SAT Engine to setup SIM services Menu
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @remarks             Voicecall Engine only requests the SAT engine to display the menu.
+*/
+voicecall_error_t voicecall_request_sat_menu(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       TelSatSetupMenuInfo_t sim_menu;
+       
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+       memset(&sim_menu, 0, sizeof(TelSatSetupMenuInfo_t));
+
+       if (FALSE == TelTapiSatGetMainMenuList(&sim_menu)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "TelTapiSatGetMainMenuList failed");
+               return ERROR_VOICECALL_REQUEST_FAILED;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retreives the SIM Menu Title from the SAT Engine
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[out]  title                                   contains the sat menu title on sucess
+*/
+voicecall_error_t voicecall_request_sat_menu_title(voicecall_engine_t *pvoicecall_agent, char *title)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       TelSatMainMenuTitleInfo_t sat_menu_title;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(title != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       memset(&sat_menu_title, 0, sizeof(TelSatMainMenuTitleInfo_t));
+
+       if (TRUE == TelTapiSatGetMainMenuTitle(&sat_menu_title)) {
+               if (TRUE == sat_menu_title.bIsMainMenuPresent) {
+                       strcpy(title, (char *)sat_menu_title.mainMenuTitle.string);
+                       return ERROR_VOICECALL_NONE;
+               }
+       }
+
+       return ERROR_VOICECALL_REQUEST_FAILED;
+}
+#endif
+
+/**
+* This function prepares the engine for the redial call. It preserves the previsouly made call object to used for the next make call
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[in]           call_handle             call handle
+* @remarks             If this API is used, _vc_core_engine_prepare_call is not reqired for making the call again. The last prepared call details will
+*                              be used for the redialling. Application has to just use _vc_core_engine_make_call API to redial the call
+*/
+voicecall_error_t _vc_core_engine_prepare_redial(voicecall_engine_t *pvoicecall_agent, int call_handle)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_call_objectinfo_t call_object;
+       int mo_call_handle = -1;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(call_handle >= 0, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Check the validity of the call handle */
+       mo_call_handle = _vc_core_cm_get_outgoing_call_handle(&pagent->call_manager);
+       if ((mo_call_handle == -1) || (mo_call_handle != call_handle)) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       if (FALSE == _vc_core_cm_get_call_object(&pagent->call_manager, call_handle, &call_object)) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       /*Set the callobject status */
+       call_object.state = VC_CALL_STATE_REDIAL;
+
+       /*Reintialize Call ID */
+       call_object.call_id = 0;
+       _vc_core_cm_set_call_object(&pagent->call_manager, &call_object);
+
+       /*Set Engine IO State */
+       _vc_core_ca_change_inout_state(pagent, VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE);
+
+       /*Abthul:todo Set SAT Redial Data */
+
+       return ERROR_VOICECALL_NONE;
+}
+
+#ifdef _OLD_SAT_
+/**
+* This function checks whether SAT redial duration is valid
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent        Handle to Voicecall Engine
+* @param[out]  bredial_duration        Contains TRUE if SAT redial duration is enabled, FALSE otherwise
+* @remarks             pvoicecall_agent and bredial_duration cannot be NULL
+*/
+voicecall_error_t voicecall_get_sat_redial_duration_status(voicecall_engine_t *pvoicecall_agent, gboolean * bredial_duration)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_satsetup_info_t *pcall_vc_satcall_info = NULL;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bredial_duration != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       pcall_vc_satcall_info = (call_vc_satsetup_info_t *) &(pagent->call_manager.setupcall_info.satcall_setup_info);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "SAT Redial Duration Status= %d", pcall_vc_satcall_info->bduration);
+
+       *bredial_duration = pcall_vc_satcall_info->bduration;
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function sets the current duration and retrieves the modified remaining SAT redial duration
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent                Handle to Voicecall Engine
+* @param[out]  remaining_duration              remaining sat duration
+* @remarks             pvoicecall_agent and remaining_duration cannot be NULL
+*/
+voicecall_error_t voicecall_get_set_sat_remaining_duration(voicecall_engine_t *pvoicecall_agent, long *remaining_duration)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_satsetup_info_t *pcall_vc_satcall_info = NULL;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(remaining_duration != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       pcall_vc_satcall_info = (call_vc_satsetup_info_t *) &(pcall_agent->call_manager.setupcall_info.satcall_setup_info);
+       *remaining_duration = pcall_vc_satcall_info->remaining_duration;
+       CALL_ENG_DEBUG(ENG_DEBUG, "Remaining Duration: %ld", *remaining_duration);
+
+       return ERROR_VOICECALL_NONE;
+}
+#endif
+
+voicecall_error_t _vc_core_engine_get_sat_dtmf_hidden_mode(voicecall_engine_t *pvoicecall_agent, gboolean *bhidden_mode)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       call_vc_satsetup_info_t *pcall_vc_satcall_info = NULL;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_FAIL(bhidden_mode != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       pcall_vc_satcall_info = (call_vc_satsetup_info_t *) &(pagent->call_manager.setupcall_info.satcall_setup_info);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "SAT Hidden Mode= %d", pcall_vc_satcall_info->satengine_dtmf_data.bIsHiddenMode);
+
+       *bhidden_mode = pcall_vc_satcall_info->satengine_dtmf_data.bIsHiddenMode;
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function changes the voice audio path
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path              audio path to be changed
+* @remarks             pvoicecall_agent cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_change_audio_path(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       tapi_sound_audio_path_t tapi_audio_path = TAPI_SOUND_HANDSET;
+       /*Enum for encapsulating errors from TAPI Lib */
+       TapiResult_t tapi_error = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Voicecall Path Should not be modified if calls are not available */
+       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) <= 0) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       switch (audio_path) {
+       case VC_AUDIO_PATH_HANDSET:
+               {
+                       tapi_audio_path = TAPI_SOUND_HANDSET;
+               }
+               break;
+       case VC_AUDIO_PATH_HEADSET:
+               {
+                       tapi_audio_path = TAPI_SOUND_HEADSET;
+               }
+               break;
+       case VC_AUDIO_PATH_HANDSFREE:
+               {
+                       tapi_audio_path = TAPI_SOUND_HANDSFREE;
+               }
+               break;
+       case VC_AUDIO_PATH_BLUETOOTH:
+               {
+                       tapi_audio_path = TAPI_SOUND_BLUETOOTH;
+               }
+               break;
+       case VC_AUDIO_PATH_STEREO_BLUETOOTH:
+               {
+                       tapi_audio_path = TAPI_SOUND_STEREO_BLUETOOTH;
+               }
+               break;
+       case VC_AUDIO_PATH_SPK_PHONE:
+               {
+                       tapi_audio_path = TAPI_SOUND_SPK_PHONE;
+               }
+               break;
+       case VC_AUDIO_PATH_HEADSET_3_5PI:
+               {
+                       tapi_audio_path = TAPI_SOUND_HEADSET_3_5PI;
+               }
+               break;
+       default:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Invalid audio path");
+                       return ERROR_VOICECALL_INVALID_ARGUMENTS;
+               }
+               break;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_audio_path: %d", tapi_audio_path);
+       tapi_error = tel_set_sound_path(tapi_audio_path, &ReqId);
+
+       if (tapi_error != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_set_sound_path error: %d", tapi_error);
+               return ERROR_VOICECALL_TAPI_ERROR;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+voicecall_error_t _vc_core_engine_set_audio_mute(voicecall_engine_t *pvoicecall_agent, gboolean bmute_audio)
+{
+       TapiResult_t error = TAPI_API_SUCCESS;
+       tapi_sound_mic_mute_t micmute_set = TAPI_SOUND_MIC_UNMUTE;
+       int req_id = VC_RQSTID_DEFAULT;
+
+       micmute_set = (TRUE == bmute_audio) ? TAPI_SOUND_MIC_MUTE : TAPI_SOUND_MIC_UNMUTE;
+
+       error = tel_set_sound_mute_status(micmute_set, &req_id);
+
+       if (error != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_set_sound_mute_status Error: %d", error);
+               return ERROR_VOICECALL_TAPI_ERROR;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "End");
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function sets the voice call audio volume for the given audio path type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path_type         audio path for the volume to be set
+* @param[in]           vol_level                       volume level
+* @remarks             pvoicecall_agent cannot be NULL
+*/
+voicecall_error_t _vc_core_engine_set_audio_volume(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path_type, voicecall_audio_volume_t vol_level)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       /*Enum for encapsulating errors from TAPI Lib */
+       TapiResult_t error = TAPI_API_SUCCESS;
+       tapi_sound_volume_control_t vol_control;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Start! path(%d), volume(%d)", audio_path_type, vol_level);
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(audio_path_type, VC_AUDIO_PATH_HANDSET, VC_AUDIO_PATH_HEADSET_3_5PI, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(vol_level, VC_AUDIO_VOLUME_LEVEL_0, VC_AUDIO_VOLUME_LEVEL_9, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Ignore the request if calls are not available */
+       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) <= 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "End");
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       vol_control.volume = vol_level;
+       switch (audio_path_type) {
+       case VC_AUDIO_PATH_HEADSET:
+               vol_control.vol_type = TAPI_SOUND_VOL_HEADSET_VOICE;
+               break;
+       case VC_AUDIO_PATH_BLUETOOTH:
+       case VC_AUDIO_PATH_STEREO_BLUETOOTH:
+               vol_control.vol_type = TAPI_SOUND_VOL_BT_VOICE;
+               break;
+       case VC_AUDIO_PATH_SPK_PHONE:
+               vol_control.vol_type = TAPI_SOUND_VOL_SPK_PHONE;
+               break;
+       default:
+               vol_control.vol_type = TAPI_SOUND_VOL_VOICE;
+               break;
+       }
+
+       error = tel_set_sound_volume_info(vol_control, &ReqId);
+
+       if (error != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Tapi API Error: %d", error);
+               return ERROR_VOICECALL_TAPI_ERROR;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "End");
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function retreives the voice call audio volume for the given audio path type
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]           pvoicecall_agent                Handle to Voicecall Engine
+* @param[in]           audio_path_type         audio path for the volume to be retreived
+* @remarks             pvoicecall_agent cannot be NULL
+*                              The audio volume level will be send as a response with the below details
+*                              event   - VC_CALL_GET_VOLUME_RESP
+*                              param1  - audio_path_type
+*                              param2   - volume level
+*                              param3   - NULL
+*/
+voicecall_error_t _vc_core_engine_get_audio_volume(voicecall_engine_t *pvoicecall_agent, voicecall_audio_path_t audio_path_type)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       TapiResult_t error = TAPI_API_SUCCESS;
+       tapi_sound_volume_type_t volume_type = TAPI_SOUND_VOL_VOICE;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_VALUE_IF_FAIL(pcall_agent != NULL, ERROR_VOICECALL_INVALID_ARGUMENTS);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(audio_path_type, VC_AUDIO_PATH_HANDSET, VC_AUDIO_PATH_HEADSET_3_5PI, ERROR_VOICECALL_INVALID_ARGUMENTS);
+
+       /*Ignore the request if calls are not available */
+       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) <= 0) {
+               return ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+       }
+
+       switch (audio_path_type) {
+       case VC_AUDIO_PATH_HEADSET:
+               volume_type = TAPI_SOUND_VOL_HEADSET_VOICE;
+               break;
+       case VC_AUDIO_PATH_BLUETOOTH:
+       case VC_AUDIO_PATH_STEREO_BLUETOOTH:
+               volume_type = TAPI_SOUND_VOL_BT_VOICE;
+               break;
+       case VC_AUDIO_PATH_SPK_PHONE:
+               volume_type = TAPI_SOUND_VOL_SPK_PHONE;
+               break;
+       default:
+               volume_type = TAPI_SOUND_VOL_VOICE;
+               break;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "volume_type = %d", volume_type);
+
+       pcall_agent->curr_tapi_path = volume_type;
+       error = tel_get_sound_volume_info(volume_type, &ReqId);
+
+       if (error != TAPI_API_SUCCESS) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Tapi API Error: %d", error);
+               return ERROR_VOICECALL_TAPI_ERROR;
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+/**
+* This function changes the inout state of the engine to the given state
+*
+* @return              ERROR_VOICECALL_NONE on success or return value contains appropriate error code on failure
+* @param[in]   pvoicecall_agent        Handle to voicecall engine
+* @param[in]   io_state                        Inout state to be set
+* @remarks             pvoicecall_agent cannot be NULL
+* @see                 _vc_core_engine_status_get_engine_iostate
+*/
+voicecall_error_t _vc_core_engine_change_engine_iostate(voicecall_engine_t *pvoicecall_agent, int io_state)
+{
+       call_vc_callagent_state_t *pagent = (call_vc_callagent_state_t *)pvoicecall_agent;
+       VOICECALL_RETURN_VALUE_IF_FAIL(pagent != NULL, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+       VOICECALL_RETURN_VALUE_IF_NOT_IN_RANGE(io_state, VC_INOUT_STATE_NONE, VC_INOUT_STATE_INCOME_END, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+
+       if (TRUE == _vc_core_ca_change_inout_state(pagent, (voicecall_inout_state_t) io_state)) {
+               return ERROR_VOICECALL_NONE;
+       }
+
+       return ERROR_VOICECALL_INVALID_ARGUMENTS;
+}
+
+voicecall_error_t _vc_core_engine_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size)
+{
+       VOICECALL_RETURN_VALUE_IF_FAIL(source_tel_number != NULL, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+       VOICECALL_RETURN_VALUE_IF_FAIL(phone_number != NULL, ERROR_VOICECALL_INVALID_CALL_HANDLE);
+
+       if (FALSE == _vc_core_util_extract_call_number(source_tel_number, phone_number, buf_size)) {
+               _vc_core_util_strcpy(phone_number, buf_size, source_tel_number);
+       }
+
+       return ERROR_VOICECALL_NONE;
+}
+
+voicecall_error_t _vc_core_engine_set_to_default_values(voicecall_engine_t *pvoicecall_agent)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pvoicecall_agent;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Start");
+       /*Initialize Call Manager */
+       _vc_core_call_manager_init(&pcall_agent->call_manager);
+
+       /* Initialize Call Agent Flags */
+       _vc_core_ca_init_data(pcall_agent);
+
+#ifdef _CCBS_DEFINED_
+       /* Init CCBS Info */
+       _vc_core_init_ccbs_info(pcall_agent);
+#endif
+
+       /* Init CPHS Info */
+#ifdef _CPHS_DEFINED_
+       _vc_core_svcall_init_cphs_info(pcall_agent);
+#endif
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+       CALL_ENG_DEBUG(ENG_DEBUG, "End");
+
+       return ERROR_VOICECALL_NONE;
+}
diff --git a/call-engine/core/vc-core-svcall.c b/call-engine/core/vc-core-svcall.c
new file mode 100755 (executable)
index 0000000..93f0137
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifdef _CPHS_DEFINED_
+
+#include <stdbool.h>
+#include <assert.h>
+#include "vc-core-engine.h"
+#include "vc-core-svcall.h"
+#include "vc-core-util.h"
+#include "tapi-inc.h"
+#include "status-interface.h"
+
+/*Local Function Decleration*/
+/**
+* This function checks whether csp is enabled in the cphs group
+*
+* @internal
+* @return              TRUE if customer service profile is enabled -FALSE otherwise
+* @param[in]           pcall_agent     Handle to Voicecall Call Agent
+*/
+static gboolean __call_vcsv_cphs_is_csp_enabled(call_vc_callagent_state_t *pcall_agent);
+
+/**
+* This function returns the csp index of the given csp service from the cphs cspprofile
+*
+* @internal
+* @return              index to the specified csp service
+* @param[in]           pcphs_csp_profile       Handle to csp profile entry table
+* @param[in]           csp_group_max_count     maximumm service entry
+* @param[in]           csp_service     csp service to be found
+*/
+static int __call_vcsv_cphs_find_csp_index(TelSimCphsCustomerServiceProfileEntry_t *pcphs_csp_profile, int csp_group_max_count, TelSimCphsCustomerServiceGroup_t csp_service);
+
+/**
+ * This function retrieves cphs information from the Telephony and stores with the engine
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent     Handle to Voicecall Call Agent
+ */
+gboolean _vc_core_svcall_init_cphs_info(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean ret_val = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       memset(&pcall_agent->cphs_status, 0, sizeof(status_class_cphs_type));
+
+       /*Read CPHS Info */
+#ifdef _CPHS_DEFINED_
+       ret_val = nps_get_cphs_status(&pcall_agent->cphs_status);
+#endif
+
+       if (FALSE == ret_val) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "nps_get_cphs_status failed or CPHS feature not enabled");
+               pcall_agent->bcphs_read_success = FALSE;
+               return FALSE;
+       }
+
+       pcall_agent->bcphs_read_success = TRUE;
+
+       return TRUE;
+}
+
+/**
+ * This function retrieves status of the given csp service type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          csp_service     csp service whose status to be retreived
+ */
+gboolean _vc_core_svcall_cphs_csp_get_status(call_vc_callagent_state_t *pcall_agent, voicecall_cphs_csp_service csp_service)
+{
+       status_class_cphs_type *pcphs_status_info = (status_class_cphs_type *) &pcall_agent->cphs_status;
+       int csp_index = -1;
+
+       if (FALSE == __call_vcsv_cphs_is_csp_enabled(pcall_agent)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "CPHS CSP Not enabled");
+
+               if (VC_CPHS_CSP_ALS == csp_service) {
+                       return FALSE;
+               } else {
+                       /*If CPHS is not supported, then by default return TRUE for the client to have default action */
+                       return TRUE;
+               }
+       }
+
+       switch (csp_service) {
+       case VC_CPHS_CSP_ALS:   /*CPHS Teleservices */
+               {
+                       csp_index = __call_vcsv_cphs_find_csp_index(pcphs_status_info->csp.serviceProfileEntry, TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX, TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES);
+               }
+               break;
+       case VC_CPHS_CSP_HOLD:  /*Call Completion Services */
+       case VC_CPHS_CSP_CW:
+       case VC_CPHS_CSP_CBS:
+       case VC_CPHS_CSP_UUS:
+               {
+                       csp_index = __call_vcsv_cphs_find_csp_index(pcphs_status_info->csp.serviceProfileEntry, TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX, TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION);
+               }
+               break;
+       case VC_CPHS_CSP_CT:    /*Call Offering Services */
+       case VC_CPHS_CSP_CFU:
+       case VC_CPHS_CSP_CFB:
+       case VC_CPHS_CSP_CFNRY:
+       case VC_CPHS_CSP_CFNRC:
+               {
+                       csp_index = __call_vcsv_cphs_find_csp_index(pcphs_status_info->csp.serviceProfileEntry, TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX, TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING);
+               }
+               break;
+       case VC_CPHS_CSP_MPTY:  /*Other Supplementary Services */
+       case VC_CPHS_CSP_CUG:
+       case VC_CPHS_CSP_AOC:
+       case VC_CPHS_CSP_PREFCUG:
+       case VC_CPHS_CSP_CUGOA:
+               {
+                       csp_index = __call_vcsv_cphs_find_csp_index(pcphs_status_info->csp.serviceProfileEntry, TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX, TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES);
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Actions defined for service type: %d", csp_service);
+               break;
+       }
+
+       if (-1 == csp_index) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "csp_index failed for csp service: %d", csp_service);
+               return FALSE;
+       }
+
+       switch (csp_service) {
+       case VC_CPHS_CSP_ALS:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.cphsTeleservices.bAlternativeLineService;
+               }
+               break;
+       case VC_CPHS_CSP_HOLD:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callComplete.bCallHold;
+               }
+               break;
+       case VC_CPHS_CSP_CW:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callComplete.bCallWaiting;
+               }
+               break;
+       case VC_CPHS_CSP_CBS:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callComplete.bCompletionOfCallToBusySubscriber;
+               }
+               break;
+       case VC_CPHS_CSP_UUS:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callComplete.bUserUserSignalling;
+               }
+               break;
+       case VC_CPHS_CSP_CFU:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callOffering.bCallForwardingUnconditional;
+               }
+               break;
+       case VC_CPHS_CSP_CFB:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callOffering.bCallForwardingOnUserBusy;
+               }
+               break;
+       case VC_CPHS_CSP_CFNRY:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callOffering.bCallForwardingOnNoReply;
+               }
+               break;
+       case VC_CPHS_CSP_CFNRC:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callOffering.bCallForwardingOnUserNotReachable;
+               }
+               break;
+       case VC_CPHS_CSP_CT:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.callOffering.bCallTransfer;
+               }
+               break;
+       case VC_CPHS_CSP_MPTY:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.otherSuppServices.bMultiPartyService;
+               }
+               break;
+       case VC_CPHS_CSP_CUG:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.otherSuppServices.bClosedUserGroup;
+               }
+               break;
+       case VC_CPHS_CSP_AOC:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.otherSuppServices.bAdviceOfCharge;
+               }
+               break;
+       case VC_CPHS_CSP_PREFCUG:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.otherSuppServices.bPreferentialClosedUserGroup;
+               }
+               break;
+       case VC_CPHS_CSP_CUGOA:
+               {
+                       return pcphs_status_info->csp.serviceProfileEntry[csp_index].u.otherSuppServices.bPreferentialClosedUserGroup;
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for csp service: %d", csp_service);
+               return FALSE;
+       }
+
+       return FALSE;
+}
+
+voice_call_cphs_alsline_t _vc_core_svcall_get_cphs_als_active_line(call_vc_callagent_state_t *pcall_agent)
+{
+       status_class_cphs_type *pcphs_status_info = (status_class_cphs_type *) &pcall_agent->cphs_status;
+
+       if (FALSE == __call_vcsv_cphs_is_csp_enabled(pcall_agent)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "CPHS CSP Not enabled");
+               return VC_CALL_CPHS_ALS_LINE1;
+       }
+
+       if (TAPI_SIM_DYNAMIC_FLAGS_LINE1 == pcphs_status_info->dflagsinfo.dynamicFlags) {
+               return VC_CALL_CPHS_ALS_LINE1;
+       } else if (TAPI_SIM_DYNAMIC_FLAGS_LINE2 == pcphs_status_info->dflagsinfo.dynamicFlags) {
+               return VC_CALL_CPHS_ALS_LINE2;
+       }
+
+       return VC_CALL_CPHS_ALS_LINE1;
+
+}
+
+/*Local Function Decleration*/
+static gboolean __call_vcsv_cphs_is_csp_enabled(call_vc_callagent_state_t *pcall_agent)
+{
+       status_class_cphs_type *pnps_cphs_status = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (pcall_agent->bcphs_read_success == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "CSP Status not read");
+               return FALSE;
+       }
+
+       pnps_cphs_status = &pcall_agent->cphs_status;
+
+       if (FALSE == pnps_cphs_status->cphsinfo.CphsServiceTable.bCustomerServiceProfile) {
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+static int __call_vcsv_cphs_find_csp_index(TelSimCphsCustomerServiceProfileEntry_t *pcphs_csp_profile, int csp_group_max_count, TelSimCphsCustomerServiceGroup_t csp_service)
+{
+       int index = 0;
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       for (index = 0; index < csp_group_max_count; index++) {
+               if (pcphs_csp_profile[index].customerServiceGroup == csp_service) {
+                       return index;
+               }
+       }
+
+       return VC_ERROR;
+}
+#endif                         /*_CPHS_DEFINED_*/
diff --git a/call-engine/core/vc-core-tapi-evnt.c b/call-engine/core/vc-core-tapi-evnt.c
new file mode 100755 (executable)
index 0000000..e0a3b88
--- /dev/null
@@ -0,0 +1,1498 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <string.h>
+#include <assert.h>
+#include "vc-core-tapi-evnt.h"
+#include "vc-core-callmanager.h"
+#include "vc-core-util.h"
+#include "vc-core-tapi-rqst.h"
+
+static int barring_ind_type = VC_BARR_IND_NONE;
+
+/**
+* This function processes the current io wait states if  available
+*
+* @internal
+* @return              if wait states are processed, FALSE otherwise
+* @param[in]           pcall_agent             handle to voicecall agent structure
+*/
+static gboolean __call_vc_process_wait_state_success_events(call_vc_callagent_state_t *pcall_agent);
+
+/**
+* This function requests the TAPI for the ppm value for callcost
+*
+* @internal
+* @return              void
+* @param[in]           pcall_agent             handle to voicecall agent structure
+*/
+static void __call_vc_get_aoc_ppm_value(call_vc_callagent_state_t *pcall_agent);
+static gboolean __call_vc_get_aoc_ppm_value_idle_cb(gpointer pdata);
+static gboolean __call_vc_download_call_timer_cb(gpointer pdata);
+
+/**
+ * This function retreives the voicecall engine specific end cause type for the given TAPI end cause type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          type                            TAPI event type
+ * @param[in]          cause                   TAPI call end cause
+ * @param[out] end_cause_type  voicecall engine end cause
+ */
+void _vc_core_tapi_event_get_end_cause_type(int type, TelTapiEndCause_t cause, voice_call_end_cause_type_t *end_cause_type)
+{
+       VOICECALL_RETURN_IF_FAIL(end_cause_type != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "EventType:[0x%x],EndCause:%d", type, cause);
+
+       switch (type) {
+       case TAPI_EVENT_CALL_END_IND:
+       /*case TAPI_EVENT_ERR:*/
+               switch (cause) {
+               case TAPI_CC_CAUSE_NORMAL_UNSPECIFIED:
+                       *end_cause_type = VC_ENDCAUSE_CALL_DISCONNECTED;
+                       break;
+               case TAPI_CC_CAUSE_FACILITY_REJECTED:
+                       *end_cause_type = VC_ENDCAUSE_CALL_FAILED;
+                       break;
+               case TAPI_CC_CAUSE_QUALITY_OF_SERVICE_UNAVAILABLE:
+               case TAPI_CC_CAUSE_ACCESS_INFORMATION_DISCARDED:
+               case TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_AUTHORISED:
+               case TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE:
+               case TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_AVAILABLE:
+               case TAPI_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED:
+               case TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED:
+
+                       *end_cause_type = VC_ENDCAUSE_CALL_ENDED;
+                       break;
+
+               case TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED:
+                       *end_cause_type = VC_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED;
+                       break;
+
+               case TAPI_CC_CAUSE_OPERATOR_DETERMINED_BARRING:
+                       *end_cause_type = VC_ENDCAUSE_CALL_BARRED;
+                       break;
+               case TAPI_REJECT_CAUSE_MM_REJ_NO_SERVICE:
+                       *end_cause_type = VC_ENDCAUSE_NO_SERVICE;
+                       break;
+
+               case TAPI_REJECT_CAUSE_CONGESTTION:
+               case TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES:
+               case TAPI_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION:      /*Match as NW_BUSY*/
+                       *end_cause_type = VC_ENDCAUSE_NW_BUSY;
+                       break;
+
+               case TAPI_REJECT_CAUSE_NETWORK_FAILURE:
+               case TAPI_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE:
+                       *end_cause_type = VC_ENDCAUSE_NW_FAILED;
+                       break;
+
+               case TAPI_REJECT_CAUSE_IMEI_NOT_ACCEPTED:
+                       {
+                               unsigned long mcc = 0;
+
+                               _vc_core_util_get_mcc(&mcc);
+
+                               if (mcc == CALL_NETWORK_MCC_UK) {
+                                       *end_cause_type = VC_ENDCAUSE_IMEI_REJECTED;    /*Display "Please verify SIM or insert valid SIM"*/
+                               } else {
+                                       *end_cause_type = VC_ENDCAUSE_NW_FAILED;        /*Display Network unavailable*/
+                               }
+                       }
+                       break;
+
+               case TAPI_CC_CAUSE_NO_ROUTE_TO_DEST:
+               case TAPI_CC_CAUSE_TEMPORARY_FAILURE:
+               case TAPI_CC_CAUSE_NETWORK_OUT_OF_ORDER:
+               case TAPI_CC_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE:
+               case TAPI_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE:
+               case TAPI_CC_CAUSE_DESTINATION_OUT_OF_ORDER:
+                       *end_cause_type = VC_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE;
+                       break;
+
+               case TAPI_CC_CAUSE_NO_USER_RESPONDING:
+               case TAPI_CC_CAUSE_USER_ALERTING_NO_ANSWER:
+                       *end_cause_type = VC_ENDCAUSE_USER_DOESNOT_RESPOND;
+                       break;
+
+               case TAPI_CC_CAUSE_ACM_GEQ_ACMMAX:
+                       *end_cause_type = VC_ENDCAUSE_NO_CREDIT;
+                       break;
+
+               case TAPI_CC_CAUSE_CALL_REJECTED:
+                       if (barring_ind_type == VC_BARR_IND_ALL)
+                               *end_cause_type = VC_ENDCAUSE_CALL_BARRED;
+                       else
+                               *end_cause_type = VC_ENDCAUSE_USER_UNAVAILABLE;
+
+                       barring_ind_type = VC_BARR_IND_NONE;
+                       break;
+
+               case TAPI_CC_CAUSE_USER_BUSY:
+                       *end_cause_type = VC_ENDCAUSE_USER_BUSY;
+                       break;
+
+               case TAPI_CC_CAUSE_USER_NOT_MEMBER_OF_CUG:
+                       *end_cause_type = VC_ENDCAUSE_WRONG_GROUP;
+                       break;
+
+               case TAPI_CC_CAUSE_INVALID_NUMBER_FORMAT:
+
+                       *end_cause_type = VC_ENDCAUSE_INVALID_NUMBER_FORMAT;
+                       break;
+
+               case TAPI_CC_CAUSE_UNASSIGNED_NUMBER:
+                       *end_cause_type = VC_ENDCAUSE_UNASSIGNED_NUMBER;
+                       break;
+
+               case TAPI_CC_CAUSE_NUMBER_CHANGED:
+                       *end_cause_type = VC_ENDCAUSE_NUMBER_CHANGED;
+                       break;
+
+               case TAPI_CALL_END_NO_CAUSE:
+               default:
+                       *end_cause_type = VC_ENDCAUSE_CALL_ENDED;
+
+                       CALL_ENG_DEBUG(ENG_ERR, "Call Ended or Default Cause Value: %d", cause);
+                       break;
+               }
+               break;
+       default:
+               *end_cause_type = VC_ENDCAUSE_CALL_FAILED;
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid call end cause or error !!");
+               break;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Engine End Cause: %d", (int)*end_cause_type);
+}
+
+void _vc_core_tapi_event_copy_incoming_call_data(call_vc_callagent_state_t *pcall_agent, TelCallIncomingCallInfo_t *callInfo, call_vc_call_objectinfo_t *pcallobject_info)
+{
+#ifdef _CPHS_DEFINED_
+       if (_vc_core_svcall_cphs_csp_get_status(pcall_agent, VC_CPHS_CSP_ALS)) {
+               TelCallActiveLine_t activeLine = callInfo->ActiveLine;
+
+               if (activeLine == TAPI_CALL_ACTIVE_LINE1) {
+                       pcallobject_info->alsLine = VC_CALL_CPHS_ALS_LINE1;
+               } else if (activeLine == TAPI_CALL_ACTIVE_LINE2) {
+                       pcallobject_info->alsLine = VC_CALL_CPHS_ALS_LINE2;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "undefined currentLine=%d", activeLine);
+               }
+       }
+#endif
+
+       _vc_core_util_strcpy(pcallobject_info->calling_name, sizeof(pcallobject_info->calling_name), callInfo->CallingNameInfo.szNameData);
+       pcallobject_info->bcalling_namemode = callInfo->CallingNameInfo.NameMode;
+
+       /* If BCD number exists, number should be shown even though number restriction is set */
+       if (strlen(callInfo->szCallingPartyNumber) > 0) {
+               pcallobject_info->brestricted_namemode = FALSE;
+
+               if (callInfo->szCallingPartyNumber[0] == '*') {
+                       pcallobject_info->bccbs_call = TRUE;
+                       _vc_core_util_strcpy(pcallobject_info->tel_number, sizeof(pcallobject_info->tel_number), callInfo->szCallingPartyNumber + 1);
+               } else {
+                       _vc_core_util_strcpy(pcallobject_info->tel_number, sizeof(pcallobject_info->tel_number), callInfo->szCallingPartyNumber);
+               }
+
+               /*mkjung_2007.12.19: check callInfo->name_mode if override category isn't supported.*/
+       } else {                /* If BCD number doesn't exist, cause_of_no_cli value should be checked to decide its presentation */
+
+               pcallobject_info->brestricted_namemode = TRUE;
+
+               pcallobject_info->name_mode = callInfo->CliCause;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "no_cli_cause = %d, name_mode = %d...", callInfo->CliCause, pcallobject_info->name_mode);
+       }
+}
+
+/**
+ * This function handles the incoming event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Incoming call handle
+ * @param[in]          callInfo                        Incoming call info associated with the incoming call
+ */
+gboolean _vc_core_tapi_event_handle_incoming_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallIncomingCallInfo_t *callInfo)
+{
+       call_vc_call_objectinfo_t callobject_info;
+       int callIndex;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, number = %s..", call_handle, callInfo->szCallingPartyNumber);
+
+       /* setting the new member info */
+       _vc_core_cm_clear_call_object(&callobject_info);
+
+       callobject_info.call_handle = call_handle;
+       callobject_info.call_id = _vc_core_cm_get_new_callId(&pcall_agent->call_manager);
+       callobject_info.bincoming_call_is_fwded = callInfo->fwded;
+
+       /* setting the incom call telephone number */
+       CALL_ENG_DEBUG(ENG_DEBUG, "[callobject_info.call_handle=%d], FWDED Call: %d", callobject_info.call_handle, callobject_info.bincoming_call_is_fwded);
+
+       /*Copy Incoming call data in to the callobject */
+       _vc_core_tapi_event_copy_incoming_call_data(pcall_agent, callInfo, &callobject_info);
+
+       /*Change the Call Object Call State*/
+       _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_INCOME);
+
+       /*Add the newly created callobject to the Call Manager*/
+       callIndex = _vc_core_cm_add_call_object(&pcall_agent->call_manager, &callobject_info);
+       if (callIndex != -1) {
+               /*Set the Call Manager's MT Call Index as CallObject Index*/
+               if (FALSE == _vc_core_cm_set_incoming_call(&pcall_agent->call_manager, callIndex)) {
+                       CALL_ENG_DEBUG(ENG_ERR, "Problem in accpeting the incoming call, Current Call Details");
+                       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+                       return FALSE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "Problem in adding the call to the call manager");
+               CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+       }
+
+       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_START);
+
+       return TRUE;
+}
+
+/**
+ * This function handles TAPI alert event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Call Handle associated with the alert event
+ */
+gboolean _vc_core_tapi_event_handle_alert_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       /* Verify call handle */
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_ERR, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       _vc_core_cm_change_call_object_state(&pcall_agent->call_manager, call_handle, VC_CALL_STATE_OUTGOING_ALERT);
+
+       /* Change Inout state to "wait connected" before sending event to client so the same state is
+          reflected in client side also */
+       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED);
+
+       /*Send Alert Event to Client*/
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_OUTGOING_ALERT, call_handle, 0, NULL);
+       return TRUE;
+}
+
+/**
+ * This function handles TAPI origination event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Call Handle associated with the alert event
+ */
+gboolean _vc_core_tapi_event_handle_originated_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle > 0);
+
+       /* Verify call handle */
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+       _vc_core_cm_change_call_object_state(&pcall_agent->call_manager, call_handle, VC_CALL_STATE_OUTGOING_ORIG);
+
+       /* Send Alert Event to Client */
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_OUTGOING_ORIG, call_handle, 0, NULL);
+
+       /* Change Inout state to "wait Alert" */
+       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_ALERT);
+
+       /* SAT's request... send response here.. not connected ind.
+        Disable checking gcf status. 20090806*/
+#ifndef _vc_core_ca_send_sat_response_ORIG
+       if (TRUE == _vc_core_util_check_gcf_status())
+#endif
+       {
+               call_vc_call_objectinfo_t callobject_info;
+
+               _vc_core_cm_clear_call_object(&callobject_info);
+
+               /*Process Connected Event*/
+               /* Get the member info and chage info */
+               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+
+               if (callobject_info.call_type == VC_CALL_ORIG_TYPE_SAT) {
+                       _vc_core_ca_send_sat_response(pcall_agent, SAT_RQST_SETUP_CALL, CALL_VC_ME_RET_SUCCESS);
+               }
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function handles the call end event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          type                            TAPI Event Type
+ * @param[in]          handle                  Call Handle of the call being ended
+ * @param[in]          cause                   TAPI End Cause
+ */
+gboolean _vc_core_tapi_event_handle_call_end_event(call_vc_callagent_state_t *pcall_agent, int type, call_vc_handle handle, TelTapiEndCause_t cause)
+{
+       gboolean active_call = FALSE;
+       gboolean held_call = FALSE;
+       int error_code = 0;
+       call_vc_call_objectinfo_t callobject_info;
+       voicecall_call_state_t prev_callstate;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       _vc_core_cm_get_call_object(&pcall_agent->call_manager, handle, &callobject_info);
+
+       prev_callstate = callobject_info.state;
+
+       _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_ENDED);
+
+       /* set end cause text*/
+       _vc_core_tapi_event_get_end_cause_type(type, cause, &callobject_info.end_cause_type);
+
+       /*Set the modified CallObject to the Call Manager*/
+       _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+
+       /*All calls are disconnected, so stop call timer*/
+       if (_vc_core_cm_isexists_connected_call(&pcall_agent->call_manager) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Connected Call Exist");
+       }
+
+       active_call = _vc_core_cm_isexists_active_call(&pcall_agent->call_manager);
+       held_call = _vc_core_cm_isexists_held_call(&pcall_agent->call_manager);
+
+       switch (pcall_agent->callagent_state) {
+       case CALL_VC_CA_STATE_WAIT_JOIN:
+               if ((FALSE == active_call) || (FALSE == held_call)) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_HOLD:
+               if (FALSE == active_call) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_UNHOLD:
+               if (FALSE == held_call) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_SWAP:
+               if ((FALSE == active_call) || (FALSE == held_call)) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL:
+#ifdef AUTO_RETREIVE_HELD_CALL
+               if (FALSE == active_call) {
+                       /* todo call: IF Ear MIC is Inserted && */
+                       if ((TRUE == held_call) && (pcall_agent->io_state == VC_INOUT_STATE_NONE) && \
+                                       (TRUE == _vc_core_tapi_rqst_retrieve_call(pcall_agent))) {
+                               _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ACTION_CALL_END_HELD_RETREIVED, handle, 0, NULL);
+
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_UNHOLD);
+                       } else {
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                       }
+               }
+#else
+               if (FALSE == active_call) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Still Active Calls are available");
+               }
+#endif
+               break;
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL:
+               if (FALSE == held_call) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS:
+               if ((active_call == FALSE) && (held_call == FALSE)) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+               break;
+       case CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Retrieve held call on active call end");
+               if (FALSE == active_call) {
+                       if ((TRUE == held_call) && (TRUE == _vc_core_tapi_rqst_retrieve_call(pcall_agent))) {
+                               _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ACTION_CALL_END_HELD_RETREIVED, handle, 0, NULL);
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_UNHOLD);
+                       } else {
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                       }
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_DROP:
+               if (VC_CALL_STATE_RELEASE_WAIT == prev_callstate) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               }
+
+               break;
+
+       case CALL_VC_CA_STATE_SPLIT_CALLBOX:
+       case CALL_VC_CA_STATE_DROP_CALLBOX:
+       case CALL_VC_CA_STATE_SENDMSG_CALLBOX:
+       case CALL_VC_CA_STATE_SAVE_TO_CONTACT_CALLBOX:
+       case CALL_VC_CA_STATE_VIEW_CONTACT_DETAIL_CALLBOX:
+               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               break;
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SWITCH_TO_VIDEO_CALL:
+               if ((FALSE == active_call) && (FALSE == held_call)) {
+                       char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];
+
+                       memset(tel_number, 0, VC_PHONE_NUMBER_LENGTH_MAX);
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP:
+               {
+                       if ((active_call == FALSE) && (held_call == FALSE)) {
+                               call_vc_call_objectinfo_t callInfo;
+                               call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               if (_vc_core_tapi_rqst_setup_call(pcall_agent) == FALSE) {
+                                       if (_vc_core_cm_get_outgoing_call_info(&pcall_agent->call_manager, &callInfo)) {
+                                               /*Send response only if call type is sat */
+                                               if (callInfo.call_type == VC_CALL_ORIG_TYPE_SAT) {
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "SAT_CALL fail to setup call");
+                                                       _vc_core_ca_send_sat_response(pcall_agent, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                               }
+                                       }
+                                       break;
+                               }
+
+                               /*Update CallManager State */
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_ORIG);
+                               call_handle = _vc_core_cm_get_outgoing_call_handle(&pcall_agent->call_manager);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Deffered Outgoing Call Handle = %d", call_handle);
+
+                               /*Inform Client about the Deferred Outgoing */
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_OUTGOING, call_handle, 0, NULL);
+                       }
+               }
+               break;
+       case CALL_VC_CA_STATE_WAIT_TRANSFER_CNF:
+               {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Waiting transfer canceled!");
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for this call agent state:%d", pcall_agent->callagent_state);
+       }
+
+       /* if waiting call end for mtc */
+       switch (pcall_agent->io_state) {
+       case VC_INOUT_STATE_INCOME_WAIT_HOLD:
+
+               if (active_call == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "call to hold is disconnected..proceed to answer call");
+                       /*It will be better to show end of call
+                       _vc_core_tapi_rqst_answer_call( pcall_agent);*/
+               }
+
+               break;
+
+       case VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVECALL:
+               if (active_call == FALSE) {
+                       /*_vc_core_tapi_rqst_answer_call( pcall_agent);*/
+               }
+               break;
+       case VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL:
+               if (held_call == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Answering call after ending held calls");
+
+                       /*Change the state to Income box, so the answer API will process it */
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_BOX);
+
+                       /* end held call and then accept incoming call */
+                       _vc_core_tapi_rqst_answer_call(pcall_agent, VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT, &error_code);
+               }
+               break;
+#ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
+       case VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL_FOR_ALL_RELEASE:
+               if (held_call == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Answering(rel and accept) call after ending held calls");
+
+                       /*Change the state to Income box, so the answer API will process it */
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_BOX);
+
+                       /* end held call and then accept incoming call */
+                       _vc_core_tapi_rqst_answer_call(pcall_agent, VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT, &error_code);
+               }
+               break;
+#endif
+       case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+               _vc_core_cm_clear_outgoing_call(&pcall_agent->call_manager);
+               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_ABORTED);
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Actions defined for IO State: %d", pcall_agent->io_state);
+       }
+
+       if (VC_CALL_ORIG_TYPE_SAT == callobject_info.call_type) {
+               if (pcall_agent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data != NULL) {
+                       free(pcall_agent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data);
+                       pcall_agent->call_manager.setupcall_info.satcall_setup_info.psat_rgb_data = NULL;
+               }
+       }
+
+       return TRUE;
+}
+
+static gboolean __call_vc_process_wait_state_success_events(call_vc_callagent_state_t *pcall_agent)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       switch (pcall_agent->io_state) {
+       case VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED:
+               {
+                       int grp_index;
+                       call_vc_handle active_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                       if (pcall_agent->callagent_state == CALL_VC_CA_STATE_WAIT_HOLD) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Separate HOLD_CNF event not arrived for HOLD and ACCEPT request, holding the call in the CONNECTED event");
+                               grp_index = _vc_core_cm_get_active_group_index(&pcall_agent->call_manager);
+
+                               if (-1 == grp_index) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, " ERROR:No Active Grp Index :grp_index = %d, Active state has been already held, check io state", grp_index);
+                                       return TRUE;
+                               }
+
+                               _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_handle);
+
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, grp_index, CALL_VC_GROUP_STATE_HOLD);
+
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_HELD, active_handle, 0, NULL);
+
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_CONNECTED);
+                       }
+               }
+               break;
+               
+#ifdef _INCOME_WAIT_CONNECTED_
+       /*currently not applied, Fix to change the group state to hold, if the second call is connected before getting the holdcnf resp from tapi */
+       case VC_INOUT_STATE_INCOME_WAIT_CONNECTED:
+               {
+                       /*Check for incoming call exists */
+                       if (VC_INVALID_CALL_INDEX == pcall_agent->call_manager.mtcall_index) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "No Incoming call exists");
+                               return TRUE;
+                       }
+
+                       if (0 == _vc_core_cm_get_connected_member_count_ingroup(&pcall_agent->call_manager, 0)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "No Previous Connected Members");
+                               return TRUE;
+                       }
+
+                       /*Connected Event for the incoming call is arrived, when waiting for hold confirmation
+                          So change the active call state to hold before processing the connected indication */
+                       if (CALL_VC_CA_STATE_WAIT_HOLD == pcall_agent->callagent_state) {
+                               int grp_index;
+                               /*call_vc_handle active_handle =TAPI_INVALID_CALLHANDLE;*/
+                               grp_index = _vc_core_cm_get_active_group_index(&pcall_agent->call_manager);
+
+                               if (-1 == grp_index) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, " ERROR:No Active Grp Index :grp_index = %d, Active state has been already held, check io state", grp_index);
+                                       return TRUE;
+                               }
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               /*_vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager,&active_handle);*/
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, grp_index, CALL_VC_GROUP_STATE_HOLD);
+                       }
+                       else if (CALL_VC_CA_STATE_WAIT_UNHOLD == pcall_agent->callagent_state) {
+                               int grp_index;
+                               call_vc_handle held_handle = VC_TAPI_INVALID_CALLHANDLE;
+                               grp_index = _vc_core_cm_get_held_group_index(&pcall_agent->call_manager);
+                               if (-1 == grp_index) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, " ERROR:No Active Grp Index :grp_index = %d, Active state has been already held, check io state", grp_index);
+                                       return TRUE;
+                               }
+                               _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &held_handle);
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, grp_index, CALL_VC_GROUP_STATE_ACTIVE);
+
+                       }
+               }
+               break;
+#endif
+       case VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED:
+               {
+                       call_vc_handle active_handle = VC_TAPI_INVALID_CALLHANDLE;;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED");
+                       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_handle);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Active Call Handle = %d", active_handle);
+
+                       /*_vc_core_tapi_event_handle_call_end_event(pcall_agent, TAPI_EVENT_CALL_END, active_handle, TAPI_CALL_END_NO_CAUSE);*/
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for this wait io state: %d", pcall_agent->io_state);
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function handles the TAPI call connect event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being connected
+ */
+gboolean _vc_core_tapi_event_handle_call_connect_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle)
+{
+       call_vc_call_objectinfo_t callobject_info;
+       int index;
+       int connectednum = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       /* Verify call handle */
+       CALL_ENG_DEBUG(ENG_DEBUG, "Started, Call Handle = %d", call_handle);
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_ERR, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       /*First Process the wait state events before processing the connect event */
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+       __call_vc_process_wait_state_success_events(pcall_agent);
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+
+       /*Process Connected Event*/
+       /* Get the member info and chage info */
+       _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+
+       /*
+        **     Reqeust from SAT. When GCF field is ON, send response when get a setup confirm.
+        **     To send response to SAT faster...
+        */
+#ifndef _vc_core_ca_send_sat_response_ORIG
+       if (FALSE == _vc_core_util_check_gcf_status()) {
+               if (callobject_info.call_type == VC_CALL_ORIG_TYPE_SAT) {
+                       _vc_core_ca_send_sat_response(pcall_agent, SAT_RQST_SETUP_CALL, CALL_VC_ME_RET_SUCCESS);
+               }
+       }
+#endif
+
+       _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_CONNECTED);
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(callobject_info.call_id != VC_INVALID_CALL_ID);
+
+       index = _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+       VOICECALL_RETURN_FALSE_IF_FAIL(index != -1);
+
+       connectednum = _vc_core_cm_get_connected_member_count_ingroup(&pcall_agent->call_manager, 0) + _vc_core_cm_get_connected_member_count_ingroup(&pcall_agent->call_manager, 1);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Connected Member Num before adding Connected call to group is :%d", connectednum);
+
+       /*If any previous calls are not cleared after end, clear it here so makes provision to add one more call to the call manager */
+       _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+
+       /*Add the conneted call to the active group */
+       if (FALSE == _vc_core_cm_add_call_member_togroup(&pcall_agent->call_manager, index)) {
+               CALL_ENG_DEBUG(ENG_ERR, "Call Object not added to the Group, [PROBLEM] !!!");
+       }
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+
+       /* Send Connected Event to the Client */
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_CONNECTED, callobject_info.call_handle, 0, NULL);
+
+       /* Once the Call is connected, change the InOut state to None */
+       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+
+       /*Getting AOC PPM Value is delayed to make the current flow faster by adding it to g_idle_add */
+       g_idle_add(__call_vc_get_aoc_ppm_value_idle_cb, pcall_agent);
+
+       if (_vc_core_engine_status_get_download_call(pcall_agent) == TRUE) {
+               g_timeout_add(9000, __call_vc_download_call_timer_cb, pcall_agent);
+
+               _vc_core_util_download_test_call("downloadcall_success");
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function handles call hold event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being held
+ * @param[in]          status                  TAPI cause incase of hold failed
+ */
+gboolean _vc_core_tapi_event_handle_call_held_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status)
+{
+       call_vc_call_objectinfo_t callobject_info;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+
+       /* Verify call handle */
+       CALL_ENG_DEBUG(ENG_DEBUG, "Started, Call Handle = %d, status = %d", call_handle, status);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       if (TAPI_CAUSE_SUCCESS != status) {
+               switch (pcall_agent->io_state) {
+               case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+                       {
+                               /* Recover and reset related state variable */
+                               if (_vc_core_cm_get_outgoing_call_info(&pcall_agent->call_manager, &callobject_info) == FALSE) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call info does not exist");
+                                       assert(0);
+                               }
+
+                               if ((callobject_info.call_type == VC_CALL_ORIG_TYPE_SAT) && \
+                                               ((pcall_agent->call_manager.setupcall_info.satcall_setup_info.satengine_setupcall_data.calltype == \
+                                                               TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD) || \
+                                                               (pcall_agent->call_manager.setupcall_info.satcall_setup_info.satengine_setupcall_data.calltype == \
+                                                                               TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL))) {
+
+                                       /*SAT Test Case(27.22.4.13.1/7), Terminal Response for Option B */
+                                       /* _vc_core_ca_send_sat_response(pcall_agent, SAT_RQST_SETUP_CALL, CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND); */
+                                       /*SAT Test Case(27.22.4.13.1/7), Terminal Response for Option A */
+                                       _vc_core_ca_send_sat_response(pcall_agent, SAT_RQST_SETUP_CALL, CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND_WITHOUT_CAUSE);
+
+                               }
+                               _vc_core_cm_clear_outgoing_call(&pcall_agent->call_manager);
+
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_OUTGOING_ABORTED, VC_ENDCAUSE_CALL_ENDED, 0, NULL);
+
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+                       }
+                       break;
+
+               case VC_INOUT_STATE_INCOME_WAIT_HOLD:
+                       break;
+
+               case VC_INOUT_STATE_NONE:
+                       break;
+
+               default:
+                       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_tapi_event_handle_call_held_event(fail): Not allowed io_state=%d", pcall_agent->io_state);
+                       break;
+               }
+
+               switch (pcall_agent->callagent_state) {
+#ifdef SWAP_SUPPORT
+               case CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE:
+                       {
+                               /* Reset the Agent State */
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SWAP_FAILED, 0, NULL);
+                       }
+                       break;
+#endif
+               case CALL_VC_CA_STATE_WAIT_SWAP:
+                       {
+                               /* Reset the Agent State */
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SWAP_FAILED, 0, NULL);
+                       }
+                       break;
+               case CALL_VC_CA_STATE_WAIT_HOLD:
+                       {
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_HOLD_FAILED, 0, NULL);
+                       }
+                       break;
+               case CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL:
+                       {
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                       }
+                       break;
+               case CALL_VC_CA_STATE_NORMAL:
+               default:        /*Fall Through */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not allowed callagent_state=%d", pcall_agent->callagent_state);
+                       return FALSE;
+                       break;
+               }
+       } else {
+               int index;
+               int grp_state = 0;
+
+               /* Get the Group Index */
+               index = _vc_core_cm_get_group_index(&pcall_agent->call_manager, call_handle);
+               grp_state = _vc_core_cm_get_group_state(&pcall_agent->call_manager, index);
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, GP_Index:%d, Cur Gp State: %d", call_handle, index, grp_state);
+
+               switch (pcall_agent->io_state) {
+               case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+                       {
+                               /* Change the Group State */
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_HOLD);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Gropu Index: %d , set to GROUP_STATE_HOLD", index);
+
+                               /* Send Call Held Event to the Client */
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_HELD, call_handle, 0, NULL);
+
+                               if (_vc_core_tapi_rqst_setup_call(pcall_agent) == FALSE) {
+                                       _vc_core_cm_clear_outgoing_call(&pcall_agent->call_manager);
+                                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_ABORTED);
+                               } else {
+                                       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+                                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_ORIG);
+                                       call_handle = _vc_core_cm_get_outgoing_call_handle(&pcall_agent->call_manager);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Deffered Outgoing Call Handle = %d", call_handle);
+                                       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_OUTGOING, call_handle, 0, NULL);
+                               }
+
+                               if (pcall_agent->callagent_state == CALL_VC_CA_STATE_WAIT_HOLD)
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               return TRUE;
+                       }
+                       break;
+               case VC_INOUT_STATE_INCOME_WAIT_HOLD:
+                       {
+                               int error_code;
+
+                               /*Change the Group State*/
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_HOLD);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Gropu Index: %d , set to GROUP_STATE_HOLD", index);
+
+                               if (_vc_core_tapi_rqst_answer_call(pcall_agent, VC_ANSWER_NORMAL, &error_code)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Voicecall Answered");
+                                       /*TODO: Inform client to update ui */
+                               }
+                               if (pcall_agent->callagent_state == CALL_VC_CA_STATE_WAIT_HOLD) {
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               }
+                       }
+                       break;
+               case VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED:
+                       {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Hold arrived for Hold and Accept Event, Current IO State:%d", pcall_agent->io_state);
+                               /*Change state to wait_connected */
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_CONNECTED);
+                       }
+                       break;
+               case VC_INOUT_STATE_NONE:
+               default:        /*Fall Through */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not allowed io_state=%d", pcall_agent->io_state);
+                       break;
+               }
+
+               switch (pcall_agent->callagent_state) {
+#ifdef SWAP_SUPPORT
+               case CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE:
+                       {
+                               int held_call_num = 0;
+                               int act_call_num = 0;
+
+                               held_call_num = _vc_core_cm_get_held_call_count(&pcall_agent->call_manager);
+                               act_call_num = _vc_core_cm_get_active_call_count(&pcall_agent->call_manager);
+                               if ((held_call_num > 0 && act_call_num <= 0) || (act_call_num > 0 && held_call_num <= 0)) {
+                                       if (CALL_VC_GROUP_STATE_HOLD != grp_state) {
+                                               /* Set the State to HOLD and inform client */
+                                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_HOLD);
+                                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_HELD, 0, 0, NULL);
+                                       }
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               } else {
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_SWAP);
+                               }
+                       }
+                       break;
+#endif
+               case CALL_VC_CA_STATE_WAIT_SWAP:
+                       {
+                               /*Always reset the agent state as the event for this wait state is arrived */
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+
+                               /*Swap the state only if the group state of the given call handle is not in hold state already
+                                  as this is a hold confirmation event */
+                               if (CALL_VC_GROUP_STATE_HOLD != grp_state) {
+                                       _vc_core_cm_swap_group_state(&pcall_agent->call_manager);
+                                       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_SWAP, call_handle, 0, NULL);
+                               }
+                       }
+                       break;
+               case CALL_VC_CA_STATE_WAIT_HOLD:
+                       {
+                               /* Change the Group State */
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_HOLD);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Group Index: %d , set to GROUP_STATE_HOLD", index);
+
+                               /* Change Call Agent State */
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_HELD, call_handle, 0, NULL);
+                       }
+                       break;
+               case CALL_VC_CA_STATE_SS_WAIT_RELEASE_ALL_ACTIVECALL:
+                       {
+                               gboolean active_call = _vc_core_cm_isexists_active_call(&pcall_agent->call_manager);
+                               gboolean held_call = _vc_core_cm_isexists_held_call(&pcall_agent->call_manager);
+
+                               /*Upon waiting for  the success event for hold request,
+                                  Other calls might have been released during this time, so the held call need to retrieved */
+                               if ((active_call == FALSE) && (held_call == TRUE)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Unhold call");
+                                       if (_vc_core_tapi_rqst_retrieve_call(pcall_agent) == TRUE) {
+                                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_UNHOLD);
+                                       }
+                               }
+                       }
+                       break;
+               case CALL_VC_CA_STATE_NORMAL:
+               default:        /*Fall Through */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not allowed callagent_state=%d", pcall_agent->callagent_state);
+                       return FALSE;
+                       break;
+               }
+       }
+
+       return TRUE;
+}
+
+/**
+* This function handles TAPI call activate/retrieve event
+*
+* @return              Returns TRUE on success and FALSE on failure
+* @param[in]           pcall_agent             Pointer to the call agent state
+* @param[in]           call_handle             call handle associated with the call being retrieved
+* @param[in]           status                  TAPI cause in case of retrieve failed
+*/
+gboolean _vc_core_tapi_event_handle_call_retrieve_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, status = %d", call_handle, status);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       if (TAPI_CAUSE_SUCCESS != status) {
+               switch (pcall_agent->callagent_state) {
+#ifdef SWAP_SUPPORT
+               case CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE:
+                       {
+                               /*Reset the Agent State*/
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SWAP_FAILED, 0, NULL);
+                       }
+                       break;
+#endif
+               case CALL_VC_CA_STATE_WAIT_SWAP:
+                       {
+                               /*Reset the Call Agent State*/
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SWAP_FAILED, 0, NULL);
+                       }
+                       break;
+               case CALL_VC_CA_STATE_WAIT_UNHOLD:
+                       {
+                               /*Reset the Agent State*/
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_RETREIVE_FAILED, 0, NULL);
+                       }
+                       break;
+               default:
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not allowed callagent_state=%d", pcall_agent->callagent_state);
+                       return FALSE;
+                       break;
+               }
+
+       } else {
+               int index;
+               int cur_grp_state = 0;
+
+               /*Get the Group Index and current group status */
+               index = _vc_core_cm_get_group_index(&pcall_agent->call_manager, call_handle);
+               cur_grp_state = _vc_core_cm_get_group_state(&pcall_agent->call_manager, index);
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, GP_Index:%d, Cur Gp State: %d", call_handle, index, cur_grp_state);
+
+               switch (pcall_agent->callagent_state) {
+#ifdef SWAP_SUPPORT
+               case CALL_VC_CA_STATE_WAIT_SWAP_HOLD_OR_ACTIVATE:
+                       {
+                               int held_call_num = 0;
+                               int act_call_num = 0;
+
+                               held_call_num = _vc_core_cm_get_held_call_count(&pcall_agent->call_manager);
+                               act_call_num = _vc_core_cm_get_active_call_count(&pcall_agent->call_manager);
+                               if ((held_call_num > 0 && act_call_num <= 0) || (act_call_num > 0 && held_call_num <= 0)) {
+                                       if (CALL_VC_GROUP_STATE_ACTIVE != cur_grp_state) {
+                                               /* Set  the State ACTIVE and inform client */
+                                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_ACTIVE);
+                                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_RETREIVED, 0, 0, NULL);
+                                       }
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+                               } else {
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_SWAP);
+                               }
+                       }
+                       break;
+#endif
+               case CALL_VC_CA_STATE_WAIT_SWAP:
+                       {
+                               /* Always reset the agent state as the event for the wait state is arrived */
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+
+                               /*Change the state only when the current state of the given handle is not in ACTIVE state */
+                               if (CALL_VC_GROUP_STATE_ACTIVE != cur_grp_state) {
+                                       _vc_core_cm_swap_group_state(&pcall_agent->call_manager);
+                                       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_SWAP, call_handle, 0, NULL);
+                               }
+                       }
+                       break;
+               case CALL_VC_CA_STATE_WAIT_UNHOLD:
+                       {
+                               int index;
+                               /* get the member info and chage info */
+                               index = _vc_core_cm_get_group_index(&pcall_agent->call_manager, call_handle);
+                               _vc_core_cm_set_group_state(&pcall_agent->call_manager, index, CALL_VC_GROUP_STATE_ACTIVE);
+
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+
+                               /*Send Call Retreived Event to Client*/
+                               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_RETREIVED, call_handle, 0, NULL);
+                       }
+                       break;
+               default:
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not allowed callagent_state=%d", pcall_agent->callagent_state);
+                       /*return FALSE if the event is not handled here, because end call memeber will be unnecessarily cleared if returned TRUE */
+                       return FALSE;
+                       break;
+               }
+
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function handles call join/conference event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle assoicated with the call being joined
+ * @param[in]          status                  tapi cause incase of join failed
+ */
+gboolean _vc_core_tapi_event_handle_call_join_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, status = %d", call_handle, status);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       if (TAPI_CAUSE_SUCCESS != status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Join fail and return..");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SETUP_CONF_FAILED, 0, NULL);
+               return TRUE;
+       }
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+
+       /* get the member info and chage info */
+       _vc_core_cm_join_group(&pcall_agent->call_manager);
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_SETUP_CONF, 0, 0, NULL);
+       return TRUE;
+}
+
+/**
+ * This function handles call split/private call event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             call handle associated with the call being made as private call
+ * @param[in]          status                  TAPI cause in case of split failed
+ */
+gboolean _vc_core_tapi_event_handle_call_split_event(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallCause_t status)
+{
+       call_vc_call_objectinfo_t callobject_info;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, status = %d", call_handle, status);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "INVALID_CALLHANDLE Error");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SPLIT_CONF_FAILED, 0, NULL);
+               return FALSE;
+       }
+
+       if (TAPI_CAUSE_SUCCESS != status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Split fail and return..");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, ERROR_VOICECALL_SPLIT_CONF_FAILED, 0, NULL);
+               return FALSE;
+       }
+
+       /* get the member info and chage info */
+       _vc_core_cm_clear_call_object(&callobject_info);
+       _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+
+       _vc_core_cm_split_group(&pcall_agent->call_manager, call_handle);
+
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_SPLIT_CONF, call_handle, 0, NULL);     /* Added Call handle for Aqilla */
+       return TRUE;
+}
+
+/**
+* This function handles the call transfer event
+*
+* @return              Returns TRUE on success and FALSE on failure
+* @param[in]           pcall_agent             Pointer to the call agent state
+* @param[in]           status                  TAPI cause in case of hold failed
+*/
+gboolean _vc_core_tapi_event_handle_call_transfer_event(call_vc_callagent_state_t *pcall_agent, TelCallCause_t status)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Started, status = %d", status);
+
+       if (TAPI_CAUSE_SUCCESS != status) {
+               int err_cause = 0;
+               CALL_ENG_DEBUG(ENG_DEBUG, "TapiTransfer Failed");
+               if (VC_TAPI_INVALID_CALLHANDLE == _vc_core_cm_get_incoming_call_handle(&pcall_agent->call_manager)
+                   && VC_TAPI_INVALID_CALLHANDLE == _vc_core_cm_get_outgoing_call_handle(&pcall_agent->call_manager)) {
+                       err_cause = ERROR_VOICECALL_TRANSFER_FAILED;
+
+               } else {
+                       if (_vc_core_cm_isexists_incoming_call(&pcall_agent->call_manager)) {
+                               err_cause = ERROR_VOICECALL_TRANSFER_FAILED;
+                       } else if (VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED == pcall_agent->io_state) {
+                               err_cause = ERROR_VOICECALL_TRANSFER_FAILED;
+                       }
+               }
+
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_ERROR_OCCURED, err_cause, 0, NULL);
+               CALL_ENG_DEBUG(ENG_DEBUG, "Transfer failed and return..");
+
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Transfer success!");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_TRANSFERRED, 0, 0, NULL);
+       }
+       /*todo ss : Check Updating flag gbpsh_voicecall_command_transfer*/
+       return TRUE;
+}
+
+/**
+* This function handles the TAPI connected line indication handle
+*
+* @return              Returns TRUE on success and FALSE on failure
+* @param[in]           pcall_agent                             Pointer to the call agent state
+* @param[in]           call_handle                             TAPI Call Handle associated with connected line indication
+* @param[in]           connected_number_info   Connected Number Details
+*/
+gboolean _vc_core_tapi_event_connected_line_ind_handle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallConnectedNumberInfo_t *connected_number_info)
+{
+       call_vc_call_objectinfo_t callobject_info;
+       call_vc_handle active_call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       gboolean bConnectedCall = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, ":Number(%s)", connected_number_info->number);
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_ERR, " INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+
+       if (_vc_core_cm_get_outgoing_call_info(&pcall_agent->call_manager, &callobject_info)) {
+               if (callobject_info.call_handle != call_handle) {
+                       CALL_ENG_DEBUG(ENG_ERR, "It is not outging call(Call Handle = %d, MO Call Handle =%d)", call_handle, callobject_info.call_handle);
+                       return FALSE;
+               }
+       } else {
+               if (_vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_call_handle) == -1) {
+                       CALL_ENG_DEBUG(ENG_ERR, "No Active Calls(Call Handle = %d)", call_handle);
+                       return FALSE;
+               }
+
+               if (active_call_handle != call_handle) {
+                       CALL_ENG_DEBUG(ENG_ERR, "Call Handle Mismatch(Call Handle = %d)", call_handle);
+                       return FALSE;
+               }
+
+               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+               bConnectedCall = TRUE;
+       }
+
+       switch (connected_number_info->name_mode) {
+       case TAPI_CALL_NAME_AVAIL:      /*if sznumber of the callInfo is null, set Anoymous*/
+
+               if (0 == strlen(connected_number_info->number)) {
+                       /*Forwarded Call number is unknown*/
+                       memset(callobject_info.connected_telnumber, 0, sizeof(callobject_info.connected_telnumber));
+               } else {
+                       _vc_core_util_strcpy(callobject_info.connected_telnumber, sizeof(callobject_info.connected_telnumber), connected_number_info->number);
+               }
+
+               break;
+
+       case TAPI_CALL_NAME_RESTRICTED:
+       case TAPI_CALL_NAME_AVAIL_RESTRICTED:   /*withheld*/
+               /*Forwarded Call number is unknown*/
+               memset(callobject_info.connected_telnumber, 0, sizeof(callobject_info.connected_telnumber));
+               break;
+
+       case TAPI_CALL_NAME_UNAVAIL:    /*Anoymous*/
+       default:
+               /*Forwarded Call number is unknown*/
+               memset(callobject_info.connected_telnumber, 0, sizeof(callobject_info.connected_telnumber));
+               break;
+       }
+
+       /*Set the modified call object to call manager*/
+       _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+
+       /*Send Event to the Client*/
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_SS_CONNECT_LINE_IND, callobject_info.call_handle, 0, (void *)callobject_info.connected_telnumber);
+
+       return TRUE;
+}
+
+/**
+ * This function handles different type of TAPI indications given in tapi_event_type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          tapi_event_type         TAPI Event Type
+ * @param[in]          param2                          sub param associated with tapi_event_type
+ */
+gboolean _vc_core_tapi_event_handle_notification(call_vc_callagent_state_t *pcall_agent, int tapi_event_type, int param2)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "eventType = %d", tapi_event_type);
+
+       /* set the notify message string as the event type */
+       switch (tapi_event_type) {
+       case TAPI_EVENT_CALL_FORWARD_IND:
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_FORWARD, VC_FRWD_IND_INCOM_IS_FRWD, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_COND_FORWARDING_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_COND_FORWARDING_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_SSNOTIFY, VC_SSNOTIFY_IND_ALL_COND_FORWARDING, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_UNCOND_FORWARDING_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_UNCOND_FORWARDING_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_SSNOTIFY, VC_SSNOTIFY_IND_CFU, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_RETRIEVE_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_ACTIVATE_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_ACTIVATE, 0, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_HOLD_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_HOLD_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_HOLD, 0, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_TRANSFER_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_TRANSFER_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_TRANSFER, 0, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_SETUPCONFERENCE_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_SETUPCONFERENCE_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_SETUPCONFERENCE, 0, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_BARRING_IND:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_BARRING_IND, cause = %d", param2);
+
+                       barring_ind_type = VC_BARR_IND_ALL;
+               }
+               break;
+
+       case TAPI_EVENT_CALL_WAITING_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_WAITING_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_WAITING, 0, 0, NULL);
+               break;
+
+       case TAPI_EVENT_CALL_CUGINFO_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_CUGINFO_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_CUGINFO, 0, 0, NULL);
+               break;
+#ifdef _OLD_TAPI_
+       case TAPI_EVENT_CALL_SSNOTIFY_IND:
+               {
+                       voicecall_ssnotify_ind_type_t ssnotify_ind_type;
+                       CALL_ENG_DEBUG(ENG_DEBUG, " TAPI_EVENT_CALL_SSNOTIFY_IND");
+                       switch (param2) {
+                       case TAPI_SSCODE_CFU:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_CFU;
+                               break;
+
+                       case TAPI_SSCODE_CFB:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_CFB;
+                               break;
+
+                       case TAPI_SSCODE_CFNRY:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_CFNRY;
+                               break;
+
+                       case TAPI_SSCODE_CFNRC:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_CFNRC;
+                               break;
+
+                       case TAPI_SSCODE_CLIR:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_CLIR;
+                               break;
+
+                       case TAPI_SSCODE_ALL_COND_FORWARDING:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_ALL_COND_FORWARDING;
+                               break;
+
+                       case TAPI_SSCODE_BARRING_OF_OUTGOING:
+                               ssnotify_ind_type = VC_SSNOTIFY_IND_BARRING_OF_OUTGOING;
+                               break;
+
+                       default:
+                               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_SSNOTIFY_IND ], No Action defined for sub type:%d", param2);
+                               return TRUE;
+
+                               break;
+                       }
+                       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_SSNOTIFY, ssnotify_ind_type, 0, NULL);
+               }
+               break;
+
+       case TAPI_EVENT_CALL_REDIRECT_CNF:
+               CALL_ENG_DEBUG(ENG_DEBUG, "TAPI_EVENT_CALL_REDIRECT_CNF");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_REDIRECT_CNF, 0, 0, NULL);
+               break;
+#endif
+       case TAPI_EVENT_CALL_CALLINGNAMEINFO_IND:
+               CALL_ENG_DEBUG(ENG_DEBUG, " TAPI_EVENT_CALL_CALLINGNAMEINFO_IND");
+               _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_CALLINGNAMEINFO, 0, 0, NULL);
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "default eventType = %d", tapi_event_type);
+               return TRUE;
+       }
+       return TRUE;
+}
+
+/**
+ * This function handles the AOC Event
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle             Call Handle
+ * @param[in]          ptapi_aoc_info  AOC info associated with the AOC Event
+ */
+gboolean _vc_core_tapi_event_handle_aoc(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, TelCallAocInfo_t *ptapi_aoc_info)
+{
+       call_vc_call_objectinfo_t callobject_info;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Started, Call Handle = %d", call_handle);
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_ERR, "INVALID_CALLHANDLE Error");
+               return FALSE;
+       }
+
+       /* get the member info and chage info */
+       _vc_core_cm_clear_call_object(&callobject_info);
+       if (FALSE == _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info)) {
+               CALL_ENG_DEBUG(ENG_ERR, "Call Object Not available");
+               return FALSE;
+       }
+
+       /* Store the call cost TAPI info */
+       callobject_info.aoc_ccm = ptapi_aoc_info->CCM;
+       memcpy((void *)callobject_info.aoc_currency, (const void *)ptapi_aoc_info->szCurrency, VC_AOC_CURRENCY_CODE_LEN_MAX);
+
+       /* Set the modified call object to the Call Mangaer */
+       _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+
+       _vc_core_ca_send_event_to_client(pcall_agent, VC_CALL_IND_AOC, call_handle, 0, &callobject_info);
+       return TRUE;
+
+}
+
+static gboolean __call_vc_get_aoc_ppm_value_idle_cb(gpointer pdata)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pdata;
+       __call_vc_get_aoc_ppm_value(pcall_agent);
+       return FALSE;
+}
+
+static gboolean __call_vc_download_call_timer_cb(gpointer pdata)
+{
+       call_vc_callagent_state_t *pcall_agent = (call_vc_callagent_state_t *)pdata;
+       _vc_core_ca_end_all_calls(pcall_agent);
+       return FALSE;
+}
+
+static void __call_vc_get_aoc_ppm_value(call_vc_callagent_state_t *pcall_agent)
+{
+       TapiResult_t tapi_error = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       if (pcall_agent->aoc_ppm == VC_INVALID_PPM) {
+               tapi_error = tel_get_ss_aoc_info(TAPI_SS_AOC_TYPE_PUC, &ReqId);
+
+               if (tapi_error != TAPI_API_SUCCESS) {
+                       CALL_ENG_DEBUG(ENG_ERR, "TAPI Error: %x", tapi_error);
+               }
+       }
+}
diff --git a/call-engine/core/vc-core-tapi-rqst.c b/call-engine/core/vc-core-tapi-rqst.c
new file mode 100755 (executable)
index 0000000..a5262fb
--- /dev/null
@@ -0,0 +1,1169 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <sys/time.h>
+#include "vc-core-tapi-rqst.h"
+#include "vc-core-util.h"
+#include "vc-core-engine-types.h"
+
+static int gcall_vc_callmember_count = 0;
+static gboolean gcall_vc_callend_wait = FALSE;
+
+#ifdef _CALL_LONG_DTMF
+static char gsz_dtmf_buffer[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];
+static int gdtmf_headindex = 0;
+static int gdtmf_tailindex = 0;
+static call_vc_dtmf_bufferstate_t gdtmf_buffer_state = CALL_VC_DTMF_BUF_NONE;
+static gboolean glong_dtmf_mode = FALSE;
+#endif
+
+/*Local Function Declerations */
+/**
+* This function splits the given call from the conference call , if available
+*
+* @internal
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           call_handle             handle of the call to be splitted
+*/
+static gboolean __call_vc_split_member(call_vc_handle call_handle);
+
+ /**
+ * This function prepares for a call setup
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_prepare_setup_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_call_objectinfo_t callobject_info = { 0 };
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "IO State =%d, Agent State: %d", pcall_agent->io_state, pcall_agent->callagent_state);
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+       if ((_vc_core_cm_get_outgoing_call_info(&pcall_agent->call_manager, &callobject_info) == FALSE) || (strlen(callobject_info.tel_number) == 0) || (pcall_agent->callagent_state != CALL_VC_CA_STATE_NORMAL)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "MO Call Not Possible: Number: %s", callobject_info.tel_number);
+               return FALSE;
+       } else if (_vc_core_cm_isexists_active_call(&pcall_agent->call_manager) && _vc_core_cm_isexists_held_call(&pcall_agent->call_manager)) {
+               /*Emergency calls should be established, even when active or hold calls exists */
+               if (TRUE == callobject_info.bemergency_number) {
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_CALLS_TO_SETUP);
+                       _vc_core_tapi_rqst_release_all_calls(pcall_agent);
+                       return TRUE;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Active&Held call exist!");
+                       return FALSE;
+               }
+       } else if (_vc_core_cm_isexists_active_call(&pcall_agent->call_manager)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There is active call when trying new call...");
+
+               /* Change the In Out State accordingly after Hold Call */
+               if (_vc_core_tapi_rqst_hold_call(pcall_agent) == FALSE) {
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+                       return FALSE;
+               } else {
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_HOLD);
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_HOLD);
+                       return TRUE;
+               }
+       } else {
+               if (_vc_core_tapi_rqst_setup_call(pcall_agent) == FALSE) {
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_tapi_rqst_prepare_setup_call:Fail to _vc_core_tapi_rqst_setup_call");
+                       return FALSE;
+               } else {
+                       /* Wait for the TAPI_EVENT_CALL_ORIG */
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_OUTGOING_WAIT_ORIG);
+                       return TRUE;
+               }
+       }
+
+       return FALSE;
+}
+
+ /**
+ * This function sets up an outgoing call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_setup_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       TelCallSetupParams_t setupCallInfo;
+/*     TelCallCugInfo_t pCugInfo = {0,};*/
+       call_vc_call_objectinfo_t callobject_info = { 0 };
+/*     TelCallIdentityMode_t   identityMode = TAPI_CALL_IDENTITY_DEFAULT;*/
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+       clock_t start;
+       clock_t end;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       memset(&setupCallInfo, 0, sizeof(TelCallSetupParams_t));
+
+       /* Get the Outgoing Call Info */
+       _vc_core_cm_clear_call_object(&callobject_info);
+       if (_vc_core_cm_get_outgoing_call_info(&pcall_agent->call_manager, &callobject_info) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call info does not exist!");
+               return FALSE;
+       }
+       /* set setupCallInfo structure for call setup */
+       if (callobject_info.bemergency_number == TRUE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Emergency call!");
+               setupCallInfo.CallType = TAPI_CALL_TYPE_E911;
+               /*setupCallInfo.Ecc = callobject_info.ecc_category;
+               CALL_ENG_DEBUG(ENG_DEBUG,"Emergency call, ecc_category:[%d]!", callobject_info.ecc_category);*/
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Normal call!");
+               setupCallInfo.CallType = TAPI_CALL_TYPE_VOICE;
+       }
+
+       /*Set the Call Object MO Flag as TRUE */
+       callobject_info.mo = TRUE;
+
+       /* cli setting */
+       if (_vc_core_util_extract_call_number_without_cli(callobject_info.source_tel_number, setupCallInfo.szNumber, sizeof(setupCallInfo.szNumber)) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No proper number = %s", callobject_info.source_tel_number);
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "tapi callnum=[%s]", setupCallInfo.szNumber);
+
+
+       /* CUG settings */
+#ifdef _TAPI_CUG_
+       setupCallInfo.pCugInfo = &pCugInfo;
+       if (FALSE == callobject_info.cug_info.bcug_used) {
+               setupCallInfo.pCugInfo->bCugFlag = FALSE;
+       } else {
+               setupCallInfo.pCugInfo->bCugFlag = TRUE;
+               /*if the index is 0, use pref cug, so no cug index */
+               if (0 == callobject_info.cug_info.cug_index) {
+                       setupCallInfo.pCugInfo->Option = TAPI_CALL_CUG_NO_INFO;
+                       setupCallInfo.pCugInfo->Index = 0;
+               } else {
+                       if ((FALSE == callobject_info.cug_info.bpref_cug) && (FALSE == callobject_info.cug_info.boa_cug)) {
+                               setupCallInfo.pCugInfo->Option = TAPI_CALL_CUG_SUPRESS_OA_AND_CUG;
+                       } else if (FALSE == callobject_info.cug_info.bpref_cug) {
+                               setupCallInfo.pCugInfo->Option = TAPI_CALL_CUG_SUPRESS_PRF_CUG;
+                       } else if (FALSE == callobject_info.cug_info.boa_cug) {
+                               setupCallInfo.pCugInfo->Option = TAPI_CALL_CUG_SUPRESS_OA;
+                       } else {
+                               setupCallInfo.pCugInfo->Option = TAPI_CALL_CUG_NO_INFO;
+                       }
+                       setupCallInfo.pCugInfo->Index = callobject_info.cug_info.cug_index;
+               }
+       }
+#endif
+
+#ifdef _CPHS_DEFINED_
+       if (TRUE == _vc_core_svcall_cphs_csp_get_status(pcall_agent, VC_CPHS_CSP_ALS)) {
+               if (callobject_info.setupBy == VC_CALL_SETUP_BY_MAILBOX) {
+                       if (callobject_info.alsLine == VC_CALL_CPHS_ALS_LINE1) {
+                               tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1, &ReqId);
+                       } else if (callobject_info.alsLine == VC_CALL_CPHS_ALS_LINE2) {
+                               tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE2, &ReqId);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "callobject_info.alsLine invalid value=%d", callobject_info.alsLine);
+                               tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1, &ReqId);
+                       }
+               } else {
+                       /*read the line information from the dynamic flags */
+                       voice_call_cphs_alsline_t als_line;
+                       callobject_info.alsLine = _vc_core_svcall_get_cphs_als_active_line(pcall_agent);
+                       tel_set_call_act_line(callobject_info.alsLine);
+                       _vc_core_cm_set_outgoing_call_info(&pcall_agent->call_manager, &callobject_info);
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "ACtive Line Set is TAPI_ACTIVE_LINE1");
+               tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1, &ReqId);
+       }
+#endif
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_type = %d", setupCallInfo.CallType);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Type by Source: %d", callobject_info.call_type);
+       if (VC_CALL_ORIG_TYPE_SAT == callobject_info.call_type) {
+               /*setupCallInfo.bRequestedBySAT = TRUE;*/
+       } else {
+               /*setupCallInfo.bRequestedBySAT = FALSE;*/
+       }
+       /*CALL_ENG_DEBUG(ENG_DEBUG,"Call Initiated by SAT: %d",setupCallInfo.bRequestedBySAT);*/
+
+       CALL_ENG_KPI("tel_exe_call_mo start");
+       /*This Function originates MO Call set-up, This is asynchronous function */
+       tapi_err = tel_exe_call_mo(&setupCallInfo, (TS_UINT *) &call_handle, &ReqId);
+       CALL_ENG_KPI("tel_exe_call_mo done");
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "ReqId is = %d", ReqId);
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_setup failed: Error Code: %d", tapi_err);
+               return FALSE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "call_handle = %d", call_handle);
+
+               /* Set the Call Handle to the CallbObject for future reference */
+               callobject_info.call_handle = call_handle;
+
+               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_OUTGOING);
+               callobject_info.call_id = _vc_core_cm_get_new_callId(&pcall_agent->call_manager);
+
+               _vc_core_cm_set_outgoing_call_info(&pcall_agent->call_manager, &callobject_info);
+
+               CALL_VC_DUMP_CALLDETAILS(&pcall_agent->call_manager);
+       }
+       return TRUE;
+}
+
+ /**
+ * This function answers the call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          answer_type     call answer type #voicecall_answer_type_t
+ * @param[out] error_code      Error code
+ */
+gboolean _vc_core_tapi_rqst_answer_call(call_vc_callagent_state_t *pcall_agent, voicecall_answer_type_t answer_type, int *error_code)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       /*Encapsulates Errors and Warnings from TAPI Library */
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(error_code != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       if ((VC_INOUT_STATE_INCOME_WAIT_CONNECTED == pcall_agent->io_state)
+           || (VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED == pcall_agent->io_state)
+           || (VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED == pcall_agent->io_state))
+               /*||(VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL == pcall_agent->io_state))*/
+       {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Answer Call Request Already Made");
+               *error_code = ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+               return FALSE;
+       }
+
+       /*
+          Process the answer call request only when the state is in income and it is not ended.
+          This must be checked as both incoming event and incoming end event from tapi are added to g_idle_add
+          so any change in state should be noted before accepting the call
+       */
+       if ((VC_INOUT_STATE_INCOME_BOX != pcall_agent->io_state) || (VC_INOUT_STATE_INCOME_END == pcall_agent->io_state)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "IO State not in VC_INOUT_STATE_INCOME_BOX, Current state: %d", pcall_agent->io_state);
+               *error_code = ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS;
+               return FALSE;
+       }
+
+       _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+       call_handle = _vc_core_cm_get_incoming_call_handle(&pcall_agent->call_manager);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "answer_type = %d,Incoming call Handle: %d", answer_type, call_handle);
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle) {
+               *error_code = ERROR_VOICECALL_CALL_INFO_NOT_AVAILABLE;
+               return FALSE;
+       }
+
+       switch (answer_type) {
+       case VC_ANSWER_NORMAL:
+               {
+                       /*Answer a call by accepting or rejecting a call */
+                       tapi_err = tel_answer_call(call_handle, TAPI_CALL_ANSWER_ACCEPT, &ReqId);
+                       if (TAPI_API_SUCCESS == tapi_err) {
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_CONNECTED);
+                       }
+               }
+               break;
+       case VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT:
+               {
+                       /*Answer a call by accepting or rejecting a call */
+                       tapi_err = tel_answer_call(call_handle, TAPI_CALL_ANSWER_HOLD_AND_ACCEPT, &ReqId);
+                       if (TAPI_API_SUCCESS == tapi_err) {
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_HOLD_CONNECTED);
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_HOLD);
+                       }
+               }
+               break;
+       case VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT:
+               {
+                       /*Answer a call by accepting or rejecting a call */
+                       tapi_err = tel_answer_call(call_handle, TAPI_CALL_ANSWER_REPLACE, &ReqId);
+                       if (TAPI_API_SUCCESS == tapi_err) {
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_RELEASE_ACTIVE_CONNECTED);
+                       }
+               }
+               break;
+       case VC_ANSWER_RELEASE_HOLD_AND_ACCEPT:
+               {
+                       /* first end held call and then accept incoming */
+                       if (TRUE == _vc_core_tapi_rqst_release_held_calls(pcall_agent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_tapi_rqst_release_held_calls returns TRUE");
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL);
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL);
+                       }
+                       return TRUE;
+               }
+               break;
+#ifdef RELEASE_ALL_AND_ACCEPT_SUPPORT
+       case VC_ANSWER_RELEASE_ALL_AND_ACCEPT:
+               {
+                       /* first (end held call) and then ( release accept and accept ) */
+                       if (TRUE == _vc_core_tapi_rqst_release_held_calls(pcall_agent)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_tapi_rqst_release_held_calls returns TRUE");
+                               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_RELEASE_HOLDCALL_FOR_ALL_RELEASE);
+                               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL);
+                       }
+                       return TRUE;
+               }
+               break;
+#endif
+       default:
+               {
+                       *error_code = ERROR_VOICECALL_NOT_SUPPORTED;
+                       return FALSE;
+               }
+       }
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_answer_call failed ,Error Code:%d", tapi_err);
+               *error_code = ERROR_VOICECALL_ANSWER_FAILED;
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_answer_call failed ,Engine Error Code:%d", *error_code);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function checks and prepares to accept a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_response_call(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean active_call, held_call, incoming_call;
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       active_call = _vc_core_cm_isexists_active_call(&pcall_agent->call_manager);
+       held_call = _vc_core_cm_isexists_held_call(&pcall_agent->call_manager);
+       incoming_call = _vc_core_cm_isexists_incoming_call(&pcall_agent->call_manager);
+
+       if (active_call && held_call) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Show EndCallChoice Box");
+               return TRUE;
+       } else if (active_call) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Case of bActiceCall...");
+               /* if there are active call, after hold call can accept mtc */
+               /* set the flag and return */
+               /*Although TapiHold failed, keep on going( because , when active call is ended, TapiHold failed then ansercall is possible... only when Tapihold succeed, state is changed to WAIT_HOLD*/
+               if (_vc_core_tapi_rqst_hold_call(pcall_agent) == TRUE) {
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_HOLD);
+                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_HOLD);
+                       return TRUE;
+               }
+       } else if (incoming_call == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Call Available");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Calling tapi_call_respond_recall(call_handle = %d, TRUE) ...", call_handle);
+
+       return TRUE;
+}
+
+/**
+ * This function releases active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_active_calls(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int nPos;
+       int nCount = 0;
+       call_vc_call_objectinfo_t callobject_info = { 0 };
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+#ifdef NEW_TAPI_API
+       nPos = _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+
+       if (call_handle != -1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "First Active call_handle = %d", call_handle);
+#ifdef SINGLE_CALL_END
+               if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+                       /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+                       tapi_err = tel_release_call_all(&pReqId);
+               } else
+#endif
+               {
+                       tapi_err = tel_release_call_all_active(&pReqId);
+               }
+
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Release All Active Failed call_handle=%d Error Code:%d...", call_handle, tapi_err);
+                       return FALSE;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "pReqId = %d", pReqId);
+                       while (nPos != -1) {
+                               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+                               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_RELEASE_WAIT);
+                               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+
+                               nPos = _vc_core_cm_get_next_active_call_handle(&pcall_agent->call_manager, &call_handle, nPos);
+                       }
+
+                       return TRUE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Active calls available");
+               return FALSE;
+       }
+#else
+       gcall_vc_callmember_count = 0;
+
+       nPos = _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+       while (nPos != -1) {
+               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+
+               if (callobject_info.state == VC_CALL_STATE_CONNECTED) {
+#ifdef SINGLE_CALL_END
+                       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+                               /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+                               tapi_err = tel_release_call_all(&pReqId);
+                       } else
+#endif
+                       {
+                               /*Releases the call identified by Call Handle irrespective of call is hold or active state */
+                               tapi_err = tel_release_call(call_handle, &pReqId);
+                       }
+
+                       if (TAPI_API_SUCCESS != tapi_err) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_relese Failed call_handle=%d Error Code:%d...", call_handle, tapi_err);
+                               return FALSE;
+                       } else {
+                               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_RELEASE_WAIT);
+                               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+                               nCount++;
+                       }
+               }
+               nPos = _vc_core_cm_get_next_active_call_handle(&pcall_agent->call_manager, &call_handle, nPos);
+       }
+
+       gcall_vc_callmember_count = nCount;
+       if (gcall_vc_callmember_count > 0) {
+               gcall_vc_callend_wait = TRUE;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There is no active call to release..");
+               return FALSE;
+       }
+#endif
+}
+
+/**
+ * This function releases held calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_held_calls(call_vc_callagent_state_t *pcall_agent)
+{
+       int nPos;
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       call_vc_call_objectinfo_t callobject_info = { 0 };
+       int nCount = 0;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+#ifdef NEW_TAPI_API
+       nPos = _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &call_handle);
+
+       if (call_handle != -1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "First Held call_handle = %d", call_handle);
+#ifdef SINGLE_CALL_END
+               if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+                       /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+                       tapi_err = tel_release_call_all(&pReqId);
+               } else
+#endif
+               {
+                       tapi_err = tel_release_call_all_held(&pReqId);
+               }
+
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Release All Held Failed call_handle=%d Error Code:%d...", call_handle, tapi_err);
+                       return FALSE;
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "pReqId = %d", pReqId);
+                       while (nPos != -1) {
+                               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+                               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_RELEASE_WAIT);
+                               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+
+                               nPos = _vc_core_cm_get_next_held_call_handle(&pcall_agent->call_manager, &call_handle, nPos);
+                       }
+
+                       return TRUE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Held calls available");
+               return FALSE;
+       }
+#else
+       gcall_vc_callmember_count = 0;
+
+       nPos = _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &call_handle);
+
+       _vc_core_cm_clear_call_object(&callobject_info);
+       while (nPos != -1) {
+               _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info);
+
+               if (callobject_info.state == VC_CALL_STATE_CONNECTED) {
+#ifdef SINGLE_CALL_END
+                       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+                               /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+                               tapi_err = tel_release_call_all(&pReqId);
+                       } else
+#endif
+                       {
+                               /*Releases the call identified by Call Handle irrespective of call is hold or active state */
+                               tapi_err = tel_release_call(call_handle, &pReqId);
+                       }
+
+                       if (TAPI_API_SUCCESS != tapi_err) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_relese Failed call_handle=%d Error Code:%d...", call_handle, tapi_err);
+                               return FALSE;
+                       } else {
+                               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_RELEASE_WAIT);
+                               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+                               nCount++;
+                       }
+               }
+               nPos = _vc_core_cm_get_next_held_call_handle(&pcall_agent->call_manager, &call_handle, nPos);
+       }
+
+       gcall_vc_callmember_count = nCount;
+       if (gcall_vc_callmember_count > 0) {
+               gcall_vc_callend_wait = TRUE;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There is no held call to release..");
+               return FALSE;
+       }
+#endif
+}
+
+/**
+ * This function releases all calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_all_calls(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle:[%d]..", call_handle);
+
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle) {
+               _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &call_handle);
+       }
+
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "invalid call handle");
+               return FALSE;
+       }
+
+       /*Releases All calls irrespective of call is in hold or active state */
+       tapi_err = tel_release_call_all(&pReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_release_call_all failed: Error _Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function releases the incoming call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_incoming_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       call_handle = _vc_core_cm_get_incoming_call_handle(&pcall_agent->call_manager);
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle)
+               return FALSE;
+
+#ifdef SINGLE_CALL_END
+       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+               /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+               tapi_err = tel_release_call_all(&pReqId);
+       } else
+#endif
+       {
+               /*Releases the call identified by Call Handle irrespective of call is hold or active state */
+               tapi_err = tel_release_call(call_handle, &pReqId);
+       }
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_release_call() call_handle=%d Failed, Error Code: %d...", call_handle, tapi_err);
+               return FALSE;
+       }
+
+       _vc_core_cm_change_call_object_state(&pcall_agent->call_manager, call_handle, VC_CALL_STATE_REJECTED);
+
+       return TRUE;
+
+}
+
+/**
+ * This function releases outgoing call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_release_outgoing_call(call_vc_callagent_state_t *pcall_agent)
+{
+
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       call_handle = _vc_core_cm_get_outgoing_call_handle(&pcall_agent->call_manager);
+
+       if (VC_TAPI_INVALID_CALLHANDLE == call_handle)
+               return FALSE;
+
+#ifdef SINGLE_CALL_END
+       if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+               /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+               tapi_err = tel_release_call_all(&pReqId);
+       } else
+#endif
+       {
+               /*Releases the call identified by Call Handle irrespective of call is hold or active state */
+               tapi_err = tel_release_call(call_handle, &pReqId);
+       }
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_release_call Failed call_handle=%d Error Code:%d", call_handle, tapi_err);
+               return FALSE;
+       }
+
+       _vc_core_cm_change_call_object_state(&pcall_agent->call_manager, call_handle, VC_CALL_STATE_CANCELLED);
+
+       return TRUE;
+}
+
+/**
+ * This function holds a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_hold_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       /*Get the current active call handle and hold it*/
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "ERROR: No active call available");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "calling tapi_call_hold, Current active call = %d...", call_handle);
+
+       /* Hold the call */
+       /*Puts the given call on hold */
+       tapi_err = tel_hold_call(call_handle, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_hold_call() Failed Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function retrieves a call from hold
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_retrieve_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "...");
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &call_handle);
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Hold Call Error...");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Cur held call_handle = %d.", call_handle);
+       /* activate the call */
+       /*This function retrieves the held call */
+       tapi_err = tel_retrieve_call(call_handle, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_retrieve_call() Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function swaps held and active calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_swap_calls(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle active_call = VC_TAPI_INVALID_CALLHANDLE, held_call = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_call);
+       if (active_call == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Active Call...");
+               return FALSE;
+       }
+
+       _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &held_call);
+       if (held_call == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_tapi_rqst_swap_calls: No Hold Call...");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Current Active call = %d, Hold call :%d", active_call, held_call);
+
+       tapi_err = tel_swap_call(active_call, held_call, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_swap_call() Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function joins two calls
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_join_calls(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle active_call = VC_TAPI_INVALID_CALLHANDLE, held_call = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_call);
+       if (active_call == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Active Call");
+               return FALSE;
+       }
+
+       _vc_core_cm_get_first_held_call_handle(&pcall_agent->call_manager, &held_call);
+       if (held_call == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Hold Call");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Current Active call = %d, Hold call :%d", active_call, held_call);
+       /*This functions joins given two calls */
+       tapi_err = tel_join_call(active_call, held_call, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_join_call() Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function splits the members of a call given its call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent structure
+ * @param[in]          call_handle     Call handle for a call the members of which has to be split
+ */
+gboolean _vc_core_tapi_rqst_private_call(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle)
+{
+
+       if (TRUE == __call_vc_split_member(call_handle)) {
+               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_SPLIT);
+               return TRUE;
+       } else {
+               _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_NORMAL);
+               return FALSE;
+       }
+}
+
+static gboolean __call_vc_split_member(call_vc_handle call_handle)
+{
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "...");
+       VOICECALL_RETURN_FALSE_IF_FAIL(call_handle != VC_TAPI_INVALID_CALLHANDLE);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle to be splited : %d", call_handle);
+
+       /*Splits a private call from multiparty call. */
+       tapi_err = tel_split_call(call_handle, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_split_call() Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function transfers call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent structure
+ */
+gboolean _vc_core_tapi_rqst_transfer_call(call_vc_callagent_state_t *pcall_agent)
+{
+       call_vc_handle active_call = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &active_call);
+       if (active_call == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Active Call...");
+
+               active_call = _vc_core_cm_get_outgoing_call_handle(&pcall_agent->call_manager);
+               if (VC_TAPI_INVALID_CALLHANDLE == active_call) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "No Outgoing Call...");
+                       return FALSE;
+               } else
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing call exist..!!");
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "active_call = %d ", active_call);
+
+       /*An explicit call transfer by connecting the two parties where in one party being
+          active (active state) and another party being held (held state) */
+       tapi_err = tel_exe_call_explicit_transfer(active_call, &ReqId);
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tel_exe_call_explicit_transfer() Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function sends the given string as dtmf
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent structure
+ * @param[in]          dtmf_string     dtmf string
+ */
+gboolean _vc_core_tapi_rqst_start_dtmf(call_vc_callagent_state_t *pcall_agent, char *dtmf_string)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int ReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Start DTMF!! string = %s", dtmf_string);
+
+       _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+
+       if (call_handle == VC_TAPI_INVALID_CALLHANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Active Call Handle..");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "string = %s", dtmf_string);
+
+       /* start DTMF */
+       /*This function sends one or more DTMF digits during call */
+       tapi_err = tel_send_call_dtmf(dtmf_string, &ReqId);
+
+       if (TAPI_API_SUCCESS != tapi_err) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_dtmf Failed, Error Code: %d", tapi_err);
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " Ended...");
+
+       return TRUE;
+
+}
+
+#ifdef _SEND_UUSINFO_
+/**
+ * This function sends user to user information
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ * @param[in]          call_handle     The call handle for which the information has to be sent
+ * @param[in]          pszUusData      User data
+ */
+gboolean call_vc_send_uusinfo(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle, char *pszUusData)
+{
+       TelCallUusInfo_t uusInfo;
+       int nPos;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       memset(&uusInfo, 0, sizeof(TelCallUusInfo_t));
+
+       uusInfo.bMoreDataPresent = FALSE;       /*more_data_present = FALSE;*/
+       uusInfo.ProtocolType = TAPI_CALL_UUS_PROTO_SPECIFIC;
+       uusInfo.UusType = TAPI_CALL_UUS_1;
+       uusInfo.UusDataLen = strlen(pszUusData);
+
+       _vc_core_util_strcpy((char *)uusInfo.UusData, sizeof(uusInfo.UusData), pszUusData);
+
+       nPos = _vc_core_cm_get_first_active_call_handle(&pcall_agent->call_manager, &call_handle);
+       while (nPos != -1) {
+               /*TAPI API not available to send user info */
+               /*tapi doen't supprot this api.*/
+               /******************************************************************************************
+               tapi_err = tapi_call_send_user_info(call_handle, &uusInfo);
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_send_user_info() Failed,Error Code: %d", tapi_err);
+                       return FALSE;
+               }
+               ******************************************************************************************/
+               nPos = _vc_core_cm_get_next_active_call_handle(&pcall_agent->call_manager, &call_handle, nPos);
+       }
+
+       return TRUE;
+}
+#endif
+
+/**
+ * This function releases the call associate with the given call handle
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent                     Pointer to the call agent state
+ * @param[in]          call_handle     handle of the call to be ended
+ */
+gboolean _vc_core_tapi_rqst_end_call_by_callhandle(call_vc_callagent_state_t *pcall_agent, call_vc_handle call_handle)
+{
+       call_vc_call_objectinfo_t callobject_info;
+       int pReqId = VC_RQSTID_DEFAULT;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       if (FALSE == _vc_core_cm_get_call_object(&pcall_agent->call_manager, call_handle, &callobject_info)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Object not available for call handle: %d", call_handle);
+               return FALSE;
+
+       }
+
+       if (VC_CALL_STATE_CONNECTED == callobject_info.state) {
+#ifdef SINGLE_CALL_END
+               if (_vc_core_cm_get_call_member_count(&pcall_agent->call_manager) == 1) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "End Single call..");
+
+                       /* Use ReleaseAll api in case single call is ended - this is caused by modem limitation */
+                       tapi_err = tel_release_call_all(&pReqId);
+               } else
+#endif
+               {
+                       /*Releases the call identified by Call Handle irrespective of call is hold or active state */
+                       tapi_err = tel_release_call(call_handle, &pReqId);
+               }
+
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_call_release Failed Call Handle: %d, Error Code: %d", call_handle, tapi_err);
+                       return FALSE;
+               }
+
+               _vc_core_cm_change_call_state(&callobject_info, VC_CALL_STATE_RELEASE_WAIT);
+               _vc_core_cm_set_call_object(&pcall_agent->call_manager, &callobject_info);
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function ends a call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent             Pointer to the call agent state
+ */
+gboolean _vc_core_tapi_rqst_end_call(call_vc_callagent_state_t *pcall_agent)
+{
+       gboolean ret_val = FALSE;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       switch (pcall_agent->callagent_state) {
+       case CALL_VC_CA_STATE_NORMAL:
+       case CALL_VC_CA_STATE_WAIT_HOLD:
+       case CALL_VC_CA_STATE_WAIT_UNHOLD:
+               {
+
+                       if (_vc_core_cm_isexists_active_call(&pcall_agent->call_manager)) {
+                               ret_val = _vc_core_tapi_rqst_release_active_calls(pcall_agent);
+                               if (TRUE == ret_val) {
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_ACTIVECALL);
+                               }
+                       } else if (_vc_core_cm_isexists_held_call(&pcall_agent->call_manager)) {
+                               ret_val = _vc_core_tapi_rqst_release_held_calls(pcall_agent);
+                               if (TRUE == ret_val) {
+                                       _vc_core_ca_change_agent_state(pcall_agent, CALL_VC_CA_STATE_WAIT_RELEASE_ALL_HOLDCALL);
+                               }
+                       } else {
+                               _vc_core_cm_clear_endcall_member(&pcall_agent->call_manager);
+                       }
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Action defined for current call agent state: %d", pcall_agent->callagent_state);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function rejects a mobile terminated call
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pcall_agent     Pointer to the call agent state
+ * @param[in]          budub           TRUE - User Determined User Busy, FALSE - otherwise
+ * @param[out] error_code      Error code
+ */
+gboolean _vc_core_tapi_rqst_reject_mt_call(call_vc_callagent_state_t *pcall_agent, gboolean budub, int *error_code)
+{
+       call_vc_handle call_handle = VC_TAPI_INVALID_CALLHANDLE;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+       int pReqId = VC_RQSTID_DEFAULT;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_agent != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "budub = %d", budub);
+       if (_vc_core_cm_isexists_incoming_call(&pcall_agent->call_manager) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call does not exist");
+               *error_code = ERROR_VOICECALL_NO_INCOMING_CALL_EXIST;
+               return FALSE;
+       }
+
+       if (pcall_agent->io_state == VC_INOUT_STATE_INCOME_WAIT_RELEASE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, " io_state is already VC_INOUT_STATE_INCOME_WAIT_RELEASE");
+               /*return TRUE since call release has been already done and it is waiting for the release*/
+               return TRUE;
+       }
+
+       if (pcall_agent->io_state == VC_INOUT_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "return FALSE io_state=%d", pcall_agent->io_state);
+               *error_code = ERROR_VOICECALL_ENGINE_STATE_NONE;
+               return FALSE;
+       }
+
+       call_handle = _vc_core_cm_get_incoming_call_handle(&pcall_agent->call_manager);
+
+       if (TRUE == budub) {
+               /*Reject the Call for User Busy Scenario */
+               tapi_err = tel_answer_call(call_handle, TAPI_CALL_ANSWER_REJECT, &pReqId);
+
+               if (TAPI_API_SUCCESS != tapi_err) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, " tel_answer_call failed: %d", tapi_err);
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+                       *error_code = ERROR_VOICECALL_TAPI_ERROR;
+                       return FALSE;
+               }
+       } else {
+               /*Release the call to end it normally */
+               if (FALSE == _vc_core_tapi_rqst_release_incoming_call(pcall_agent)) {
+                       CALL_ENG_DEBUG(ENG_ERR, "Release Incoming Call Failed");
+                       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_NONE);
+                       *error_code = ERROR_VOICECALL_TAPI_ERROR;
+                       return FALSE;
+               }
+       }
+
+       _vc_core_ca_change_inout_state(pcall_agent, VC_INOUT_STATE_INCOME_WAIT_RELEASE);
+       return TRUE;
+}
diff --git a/call-engine/core/vc-core-util.c b/call-engine/core/vc-core-util.c
new file mode 100755 (executable)
index 0000000..77dc8c2
--- /dev/null
@@ -0,0 +1,1111 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <stdbool.h>
+#include <assert.h>
+#include "vc-core-engine.h"
+#include "vc-core-util.h"
+#include "vc-core-callagent.h"
+#include "vc-core-callmanager.h"
+
+#include <sys/time.h>
+#include <sys/times.h>
+#include <unistd.h>
+#include <pmapi.h>
+
+#include <unicode/uloc.h>
+#include <unicode/udat.h>
+#include <unicode/udatpg.h>
+#include <unicode/ustring.h>
+
+#include "appcore-common.h"
+
+#define CALL_VODAFONEUK_CLI_SHOW_ID "1470"
+#define CALL_COMMON_CLI_SHOW_ID "*31#"
+#define CALL_COMMON_CLI_HIDE_ID "#31#"
+
+#define ASCII_0                48
+#define ASCII_9                57
+#define ASCII_A                65
+#define ASCII_D                68
+#define ASCII_STAR     42
+#define ASCII_HASH     35
+#define ASCII_P                80      /*PDIAL_SEND_DTMF*/
+#define        ASCII_p         112     /*PDIAL_SEND_DTMF*/
+#define        ASCII_COMMA     44      /*PDIAL_SEND_DTMF*/
+
+#define EIGTH_BIT      0x80
+#define SEVENTH_BIT 0x40
+#define SIXTH_BIT      0x20
+#define FIFTH_BIT      0x10
+#define FOURTH_BIT     0x08
+#define THIRD_BIT      0x04
+#define SECOND_BIT     0x02
+#define FIRST_BIT      0x01
+
+#define CALLVC_MIN(x, y) ((x) <= (y) ? (x) : (y))      /*PDIAL_SEND_DTMF*/
+#define ISUSSDDIGIT(X) ((X >= '2') && (X <= '9'))
+#define ISDIGIT(X) ((X >= '0') && (X <= '9'))
+#define ISSSDIGITINCALL(X) ((X >= '7') && (X <= '9'))
+#define IS1CHARUSSDDIGIT(X) ((X >= '1') && (X <= '9'))
+
+#define DATE_FORMAT_1 "EEMMMddyyyy" /* Thu Aug 23 2001 */
+#define TIME_12_TYPE "hma"  /* 7:58 AM */
+#define TIME_24_TYPE "HHmm" /* 19:58 */
+
+typedef enum _call_vc_emergency_number_type_t {
+       CALL_VC_NO_SIM_EMERGENCY,
+       CALL_VC_UK_EMERGENCY,
+       CALL_VC_UKRAINE_EMERGENCY,
+       CALL_VC_DEFAULT_EMERGENCY,
+       CALL_VC_EMERGENCY_TYPE_MAX
+} call_vc_emergency_number_type_t;
+
+
+#define CALL_VC_EMERGENCY_NUMBER_LEN_MAX       3
+
+/**************************************************************************************************************************
+#define CALL_VC_KOREA_EMERGENCY_NUMBERS_CNT                            3
+static char gcall_vc_korea_emergency_numbers[CALL_VC_KOREA_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "112",
+       "911",
+       "119"
+};
+**************************************************************************************************************************/
+
+#define CALL_VC_DEFAULT_EMERGENCY_NUMBERS_CNT                          2
+static char gcall_vc_emergency_numbers[CALL_VC_DEFAULT_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "112",
+       "911",
+};
+
+#define CALL_VC_UK_EMERGENCY_NUMBERS_CNT               3
+static char gcall_vc_uk_emergency_numbers[CALL_VC_UK_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "112",
+       "911",
+       "999",
+};
+
+#define CALL_VC_UKAINE_EMERGENCY_NUMBERS_CNT           5
+static char gcall_vc_ukaine_emergency_numbers[CALL_VC_UKAINE_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "112",
+       "911",
+       "01",
+       "02",
+       "03"
+};
+
+#define CALL_VC_ITALY_EMERGENCY_NUMBERS_CNT            6
+static char gcall_vc_italy_emergency_numbers[CALL_VC_ITALY_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "112",
+       "911",
+       "999",
+       "110",
+       "118",
+       "115"
+};
+
+#define CALL_VC_NO_SIM_DEFAULT_EMERGENCY_NUMBERS_CNT           8
+static char gcall_vc_nosim_emergency_numbers[CALL_VC_NO_SIM_DEFAULT_EMERGENCY_NUMBERS_CNT][CALL_VC_EMERGENCY_NUMBER_LEN_MAX + 1] = {
+       "000",
+       "08",
+       "112",
+       "110",
+       "118",
+       "119",
+       "911",
+       "999"
+};
+
+/**
+* This function checks the given number against the default emergency numbers list
+*
+* @internal
+* @return              TRUE if given number is found in the emergency number list, FALSE otherwise
+* @param[out]  pNumber number to be verified
+*/
+static gboolean __vc_core_util_check_default_emergency_number(char *pNumber);
+
+/**
+ * This function publishes the event of a given publish type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          src             Telehone number from which call number needd to be parsed
+ * @param[out]         dst             Pointer to the buffer to store the parsed number
+ */
+gboolean _vc_core_util_remove_invalid_chars(const char *src, char *dst)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL((src != NULL));
+       VOICECALL_RETURN_FALSE_IF_FAIL((dst != NULL));
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Source phone number - %s\n",src);
+       int i = 0;
+       int j = 0;
+       int nSrc = 0;
+
+       nSrc = strlen(src);
+       CALL_ENG_DEBUG(ENG_DEBUG, , "source String len - %d\n", nSrc);
+
+       for(i = 0; i < nSrc; ++i)
+       {
+               switch(src[i])
+               {
+                       case '(':
+                       {
+                               if(src[i+1]== '0')
+                                       ++i;
+                               break;
+                       }
+
+                       case ')':
+                       case '-':
+                       case ' ':
+                       case '/':
+                       {
+                               break;
+                       }
+
+                       default:
+                       {
+                               dst[j++] = src[i];
+                               break;
+                       }
+               }
+               if(j>40)
+               {
+                       break;
+               }
+       }
+
+       dst[j] = '\0';
+       CALL_ENG_DEBUG(ENG_DEBUG, , "Destination phone number - %s\n",dst);
+
+       return TRUE;
+}
+
+/**
+ * This function publishes the event of a given publish type
+ *
+ * @return             Returns TRUE on success and FALSE on failure
+ * @param[in]          pszTelNumber            Telehone number from which call number nned to be extracted
+ * @param[out] pBuffer                 Pointer to the buffer to store the extracted number
+ * @param[in]          nBufSize                        Size of input buffer
+ */
+gboolean _vc_core_util_extract_call_number(const char *pszTelNumber, char *pBuffer, const int nBufSize)
+{
+       char *pszNum = NULL;
+       char *pst = NULL;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL((pBuffer != NULL));
+       VOICECALL_RETURN_FALSE_IF_FAIL((pszTelNumber != NULL));
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "number = %s..", pszTelNumber);
+
+       memset(pBuffer, 0, nBufSize);
+
+       if ((strncmp(pszTelNumber, CALL_COMMON_CLI_SHOW_ID, 4) == 0) || (strncmp(pszTelNumber, CALL_COMMON_CLI_HIDE_ID, 4) == 0))
+               pszNum = (char *)pszTelNumber + 4;
+       else
+               pszNum = (char *)pszTelNumber;
+
+       pst = strchr(pszNum, 'P');
+
+       if (pst == NULL)
+               pst = strchr(pszNum, 'p');
+
+       if (pst == NULL)
+               pst = strchr(pszNum, ',');      /*browser request*/
+
+       if (pst == NULL) {
+               if (strlen(pszNum) == 0)
+                       return FALSE;
+               _vc_core_util_strcpy(pBuffer, nBufSize, pszNum);
+       } else {
+               if (pst == pszNum)
+                       return FALSE;
+
+               _vc_core_util_strcpy(pBuffer, min((((int)pst - (int)pszNum)+1), (nBufSize)), pszNum);
+       }
+       return TRUE;
+}
+
+gboolean _vc_core_util_extract_call_number_without_cli(const char *pszTelNumber, char *pBuffer, const int nBufSize)
+{
+       char *pszNum = NULL;
+       char *pst = NULL;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL((pszTelNumber != NULL));
+       VOICECALL_RETURN_FALSE_IF_FAIL((pBuffer != NULL));
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "number = %s..", pszTelNumber);
+
+       memset(pBuffer, 0, nBufSize);
+       pszNum = (char *)pszTelNumber;
+       pst = strchr(pszNum, 'P');
+
+       if (pst == NULL)
+               pst = strchr(pszNum, 'p');
+
+       if (pst == NULL)
+               pst = strchr(pszNum, ',');      /*browser request*/
+
+       if (pst == NULL) {
+               if (strlen(pszNum) == 0)
+                       return FALSE;
+               _vc_core_util_strcpy(pBuffer, nBufSize, pszNum);
+       } else {
+               if (pst == pszNum)
+                       return FALSE;
+
+               _vc_core_util_strcpy(pBuffer, min((((int)pst - (int)pszNum)+1), (nBufSize)), pszNum);
+       }
+       return TRUE;
+}
+
+/**
+* This function checks the validity of the given string for SS string
+ *
+* @return              Returns SS_SI_FORMAT_INVALID - if the string is invalid ss string, SS_SI_FORMAT_VALID - if valid
+* @param[in]   pinput_string   string to be verified
+ */
+call_vc_ss_si_format _vc_core_util_check_si_format(const char *pinput_string)
+{
+       int index = 0, pos = 1, cnt = 0;
+       VOICECALL_RETURN_VALUE_IF_FAIL((pinput_string != NULL),SS_SI_FORMAT_INVALID);
+
+       if ((pinput_string[1] == '*') || (pinput_string[1] == '#'))
+               pos = 2;
+
+       index = pos;
+
+       while (cnt < 1) {
+               if (pinput_string[index++] == '*')
+                       cnt++;
+
+               if (index >= strlen(pinput_string + pos)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "valid ss format...");
+                       return SS_SI_FORMAT_VALID;
+               }
+       }
+
+       return SS_SI_FORMAT_VALID;
+}
+
+gboolean _vc_core_util_get_mcc(unsigned long *mcc)
+{
+       int ret = 0;
+       int plmn_value = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL((mcc != NULL));
+
+       ret = vconf_get_int(VCONFKEY_TELEPHONY_PLMN, &plmn_value);
+       if (0 == ret) {
+               char mcc_value[4];
+               char plmn_string[10];
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "plmn_value = [%d]", plmn_value);
+
+               memset(plmn_string, 0, sizeof(plmn_string));
+               memset(mcc_value, 0, sizeof(mcc_value));
+
+               snprintf(plmn_string, 10, "%d", plmn_value);
+
+               /*First 3 digits of plmn value constitutes the mcc value */
+               _vc_core_util_strcpy(mcc_value, 4, plmn_string);
+               *mcc = (unsigned long)atoi(mcc_value);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+               *mcc = CALL_NETWORK_MCC_UK;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "mcc = %ld", *mcc);
+
+       return TRUE;
+}
+
+static gboolean __vc_core_util_check_default_emergency_number(char *pNumber)
+{
+       int i = 0;
+       unsigned long mcc = 0;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL((pNumber != NULL));
+
+       _vc_core_util_get_mcc(&mcc);
+
+       if (mcc == CALL_NETWORK_MCC_UK) {
+               /*112, 911,999*/
+               for (i = 0; i < CALL_VC_UK_EMERGENCY_NUMBERS_CNT; i++) {
+                       if (!strcmp(pNumber, gcall_vc_uk_emergency_numbers[i]))
+                               return TRUE;
+               }
+       } else if (mcc == CALL_NETWORK_MCC_UKRAINE) {
+               /*112, 911, 01, 02, 03*/
+               for (i = 0; i < CALL_VC_UKAINE_EMERGENCY_NUMBERS_CNT; i++) {
+                       if (!strcmp(pNumber, gcall_vc_ukaine_emergency_numbers[i]))
+                               return TRUE;
+               }
+       } else if (mcc == CALL_NETWORK_MCC_ITALY) {
+               /*112, 911, 999, 110, 118, 115*/
+               for (i = 0; i < CALL_VC_ITALY_EMERGENCY_NUMBERS_CNT; i++) {
+                       if (!strcmp(pNumber, gcall_vc_italy_emergency_numbers[i]))
+                               return TRUE;
+               }
+       } else {
+               /*112, 911*/
+               for (i = 0; i < CALL_VC_DEFAULT_EMERGENCY_NUMBERS_CNT; i++) {
+                       if (!strcmp(pNumber, gcall_vc_emergency_numbers[i]))
+                               return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+/**
+ * This function checks whether the given number is emergency number by verifying with sim emergency numbers
+ *
+ * @return             TRUE if the number is emergency number, FALSE otherwise
+ * @param[in]          card_type       simcard type
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_emergency_number(TelSimCardType_t card_type, char *pNumber, gboolean b_is_no_sim, int *ecc_category)
+{
+       int i = 0;
+       TapiResult_t tapi_err = TAPI_API_SUCCESS;
+
+       VOICECALL_RETURN_FALSE_IF_FAIL(pNumber != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(ecc_category != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "pNumber = %s", pNumber);
+       *ecc_category = 0;
+
+       /*if(call_vc_util_get_sim_mode() == CALL_VC_SIM_INSERTED)*/
+       if (b_is_no_sim == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "We have a SIM");
+               switch (card_type) {
+               case TAPI_SIM_CARD_TYPE_GSM:
+                       {
+                               TelSimEccData_t sim_ecc_info;   /* used to get data for the Ecc information for 2G and 3G. */
+                               int necc_record_count = 0;      /*Used to count number of Emergency records */
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "[SimCardType=SIM_CARD_TYPE_GSM]");
+                               memset(&sim_ecc_info, 0x00, sizeof(TelSimEccData_t));
+
+                               /*TAPI api Compliance */
+                               /*To get Emergency data of 2G */
+                               tapi_err = tel_get_sim_ecc(&sim_ecc_info, &necc_record_count);
+
+                               if (TAPI_API_SUCCESS != tapi_err) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_sim_get_ecc_info failed, tapi_err=%d", tapi_err);
+                                       return FALSE;
+                               }
+
+                               if (necc_record_count == 0) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "eccinfo is NOT exist. Check default");
+
+                                       /*SIM card inserted but no ecc infomation. Then check the default ECC number.*/
+                                       return __vc_core_util_check_default_emergency_number(pNumber);
+                               } else {
+                                       /*Check the availablity of Emergency number in the ECCInfo*/
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ecc1=%s", sim_ecc_info.EccInfo.szEcc1);
+                                       if (strcmp(pNumber, sim_ecc_info.EccInfo.szEcc1) == 0)  /*ecc1*/
+                                               return TRUE;
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ecc2=%s", sim_ecc_info.EccInfo.szEcc2);
+                                       if (strcmp(pNumber, sim_ecc_info.EccInfo.szEcc2) == 0)  /*ecc2*/
+                                               return TRUE;
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ecc3=%s", sim_ecc_info.EccInfo.szEcc3);
+                                       if (strcmp(pNumber, sim_ecc_info.EccInfo.szEcc3) == 0)  /*ecc3*/
+                                               return TRUE;
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ecc4=%s", sim_ecc_info.EccInfo.szEcc4);
+                                       if (strcmp(pNumber, sim_ecc_info.EccInfo.szEcc4) == 0)  /*ecc4*/
+                                               return TRUE;
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ecc5=%s", sim_ecc_info.EccInfo.szEcc5);
+                                       if (strcmp(pNumber, sim_ecc_info.EccInfo.szEcc5) == 0)  /*ecc5*/
+                                               return TRUE;
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "No match & check default emergency number...");
+
+                                       return __vc_core_util_check_default_emergency_number(pNumber);
+                               }
+                       }
+                       break;
+               case TAPI_SIM_CARD_TYPE_USIM:
+                       {
+                               TelSimEccData_t sim_usim_ecc_info;      /* used to get data for the Ecc information for both 2G and 3G */
+                               int nuecc_rec_count = 0;
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "SimCardType=SIM_CARD_TYPE_USIM");
+
+                               memset(&sim_usim_ecc_info, 0x00, sizeof(TelSimEccData_t));
+
+                               /*Synchronous function used to get ECC data */
+                               tapi_err = tel_get_sim_ecc(&sim_usim_ecc_info, &nuecc_rec_count);
+
+                               if (TAPI_API_SUCCESS != tapi_err) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "tapi_sim_get_usim_ecc_info failed, tapi_err=%d", tapi_err);
+                                       return FALSE;
+                               }
+
+                               if (nuecc_rec_count == 0) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ueccInfo is NOT exists...");
+
+                                       /*SIM card inserted but no ecc infomation. Then check the default ECC number.*/
+                                       return __vc_core_util_check_default_emergency_number(pNumber);
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "ueccInfo exists...");
+
+                                       /*Check in USIM Emergency Numbers*/
+                                       for (i = 0; i < nuecc_rec_count; i++) {
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "[ecc=%s, category:[%d]]", sim_usim_ecc_info.UeccInfo[i].szEcc, sim_usim_ecc_info.UeccInfo[i].EccEmergencyServiceInfo);
+                                               if (!strcmp(pNumber, sim_usim_ecc_info.UeccInfo[i].szEcc)) {
+                                                       *ecc_category = sim_usim_ecc_info.UeccInfo[i].EccEmergencyServiceInfo;
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "uecc matched!!");
+                                                       return TRUE;
+                                               }
+                                       }
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "No match & check default emergency number...");
+                                       return __vc_core_util_check_default_emergency_number(pNumber);
+                               }
+                       }
+                       break;
+
+               case TAPI_SIM_CARD_TYPE_UNKNOWN:
+               default:
+                       {
+                               return __vc_core_util_check_default_emergency_number(pNumber);
+                       }
+                       break;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No SIM!");
+               for (i = 0; i < CALL_VC_NO_SIM_DEFAULT_EMERGENCY_NUMBERS_CNT; i++) {
+                       if (!strcmp(pNumber, gcall_vc_nosim_emergency_numbers[i]))
+                               return TRUE;
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "No emegency number...");
+       return FALSE;
+}
+
+/**
+ * This function checks whether the given number is SS string or not
+ *
+ * @return             TRUE if the number is SS string, FALSE otherwise
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_ss_string(const char *pNumber)
+{
+   int len;
+   VOICECALL_RETURN_FALSE_IF_FAIL(pNumber != NULL);
+   CALL_ENG_DEBUG(ENG_DEBUG, "pNumber(%s)",pNumber);
+
+   len = strlen(pNumber);
+
+   if(len > 3) {
+         if(pNumber[len-1] == '#') {
+                if(pNumber[0] == '*' || pNumber[0] == '#') {
+                       return TRUE;
+                }
+         }
+         else {
+                /*
+                 * '*31#', '#31#' -> launch CISS
+                 * '*31#nn..', '#31#nn...' -> launch Voice-call
+                 */
+                if(strncmp (pNumber, CALL_COMMON_CLI_SHOW_ID, 4) == 0
+                          || strncmp (pNumber, CALL_COMMON_CLI_HIDE_ID, 4) == 0) {
+                       if(len > 4)
+                          return FALSE;
+                       return TRUE;
+                }
+         }
+   }
+
+   if((len == 2) && (ISUSSDDIGIT( pNumber[0] ) && ISDIGIT( pNumber[1] ))) {
+          CALL_ENG_DEBUG(ENG_DEBUG, "USSD string");
+          return TRUE;   
+   }
+
+       if((len == 1) && (IS1CHARUSSDDIGIT(pNumber[0]))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "1 character USSD string");
+               return TRUE;   
+       }
+
+   return FALSE;
+}
+
+/**
+ * This function checks whether the given number is in CALL SS string or not
+ *
+ * @return             TRUE if the number is in call SS string, FALSE otherwise
+ * @param[in]          pNumber         number to be verified
+ */
+gboolean _vc_core_util_check_incall_ss_string(const char *number)
+{
+   int len;
+   int num_int;
+   VOICECALL_RETURN_FALSE_IF_FAIL(number != NULL);
+   CALL_ENG_DEBUG(ENG_DEBUG, "number(%s)",number);
+
+   len = strlen(number);
+   if(len > 2 || len < 1)
+         return FALSE;
+
+   if(number[0] > '6')
+         return FALSE;
+
+   if(len == 1) {
+         /* 0 ~ 4 */
+         if(number[0] >= '0' && number[0] <= '4')
+                return TRUE;
+   }
+   else {
+         /* 11 ~ 17, 21 ~ 27 */
+         num_int = atoi(number);
+
+         if(num_int >= 11 && num_int <= 17)
+                return TRUE;
+         if(num_int >= 21 && num_int <= 27)
+                return TRUE;
+   }
+
+   return FALSE;
+}
+
+
+
+/*PDIAL_SEND_DTMF*/
+/**
+* This function extracts the dtmf number from the given telephone number
+*
+* @param[in]     tel_number            source telephone number
+* @param[out] dtmf_number              extracted dtmf number
+* @param[out] dtmf_buf_len             size of dtmf number buffer
+*/
+gboolean _vc_core_util_extract_dtmf_number(const char *tel_number, char *dtmf_number, const int dtmf_buf_len)
+{
+       char *pst;
+       VOICECALL_RETURN_FALSE_IF_FAIL(tel_number!= NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(dtmf_number != NULL);
+
+       memset(dtmf_number, 0, dtmf_buf_len);
+
+       pst = strchr(tel_number, 'P');
+       if (pst == NULL) {
+               pst = strchr(tel_number, 'p');
+       }
+
+       if (pst == NULL) {
+               pst = strchr(tel_number, ',');  /*Considering "," as Pause charcter - Browser Request */
+       }
+
+       if (pst == NULL) {
+               return FALSE;
+       } else {
+               _vc_core_util_strcpy(dtmf_number, CALLVC_MIN((int)strlen(pst), (dtmf_buf_len - 1)),  pst + 1);
+       }
+       return TRUE;
+}
+
+/*PDIAL_SEND_DTMF*/
+
+/**
+* This function checks whether the given number ia a valid dtmf number or not
+*
+* @return              TRUE if the number can be used for sending dtmf , FALSE otherwise
+* @param[in]           pnumber         number to be verified
+*/
+gboolean _vc_core_util_isvalid_dtmf_number(char *pnumber)
+{
+       int len = 0;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pnumber != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_util_isvalid_dtmf_number.. entering");
+
+       if (NULL == pnumber || (len = strlen(pnumber)) <= 0) {
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Length = %d", len);
+       while (len > 0) {
+               /*PDIAL_SEND_DTMF*/
+               if (IS_DIGIT(pnumber[len - 1]) || (pnumber[len - 1] >= ASCII_A && pnumber[len - 1] <= ASCII_D) || (pnumber[len - 1] == ASCII_STAR || pnumber[len - 1] == ASCII_HASH)) {
+                       return TRUE;
+               }
+               len--;
+       }
+       return FALSE;
+}
+
+/**
+* This function checks whether the given number ia a valid dtmf number or not
+*
+* @return              TRUE if the number can be used for sending dtmf , FALSE otherwise
+* @param[in]           pnumber         number to be verified
+*/
+gboolean _vc_core_util_isvalid_full_dtmf_number(char *pnumber)
+{
+       int len = 0;
+       VOICECALL_RETURN_FALSE_IF_FAIL(pnumber != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_util_isvalid_dtmf_number.. entering");
+
+       if (NULL == pnumber || (len = strlen(pnumber)) <= 0) {
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Length = %d", len);
+       while (len > 0) {
+               /*PDIAL_SEND_DTMF*/
+               if (!(IS_DIGIT(pnumber[len - 1]) || (pnumber[len - 1] >= ASCII_A && pnumber[len - 1] <= ASCII_D) || (pnumber[len - 1] == ASCII_STAR || pnumber[len - 1] == ASCII_HASH) || (pnumber[len - 1] == ASCII_P || pnumber[len - 1] == ASCII_p || pnumber[len - 1] == ASCII_COMMA))) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "invalid character encountered...");
+                       return FALSE;
+               }
+               len--;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Fully valid DTMF string..");
+       return TRUE;
+}
+
+/**
+* This function checks the validity of the given telephone number
+*
+* @return              TRUE if the given number is valid telephone number, FALSE otherwise
+* @param[in]           ptel_number     telephone number to be verified
+*/
+gboolean _vc_core_util_isvalid_telephone_number(char *ptel_number)
+{
+       int len = 0;
+       int i = 0;
+       VOICECALL_RETURN_FALSE_IF_FAIL(ptel_number != NULL);
+
+       if (ptel_number != NULL) {
+               char call_number[VC_PHONE_NUMBER_LENGTH_MAX] = { 0, };
+
+               /*
+                * If user Input "*" or "#" and then make a call,
+                * the device should alert you that the phone number is incorrect.
+                */
+               /* if ((strlen(ptel_number) == 1) && ((strcmp(ptel_number, "*") == 0) ||(strcmp(ptel_number, "#") == 0))) */
+               /* 1 digit number -> wrong number popup */
+               if (strlen(ptel_number) == 1) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "It is wrong number.(1 digit number)");
+                       return FALSE;
+               }
+               /*end*/
+
+               /*To avoid checking *31# and #31# */
+               if (_vc_core_util_extract_call_number(ptel_number, call_number, sizeof(call_number)) == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "No proper number = %s", ptel_number);
+                       return FALSE;
+               }
+
+               len = strlen(call_number);
+               for (i = 0; i < len; i++) {
+                       /*'+' should be allowed only as first digit of the dialling number */
+                       if (i >= 1 && call_number[i] == '+') {
+                               return FALSE;
+                       }
+
+                       if (!IS_DIGIT(call_number[i]) && call_number[i] != '+' && call_number[i] != ASCII_STAR && call_number[i] != ASCII_HASH && call_number[i] != 'P' && call_number[i] != 'p' && call_number[i] != ',') {
+                               return FALSE;
+                       }
+               }
+               return TRUE;
+       }
+       return FALSE;
+}
+
+gboolean _vc_core_util_check_gcf_status(void)
+{
+       gboolean bgcf_status = FALSE;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_ADMIN_GCF_TEST, &bgcf_status);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "bgcf_status = [%d]", bgcf_status);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+       }
+
+       return bgcf_status;
+}
+
+gboolean _vc_core_util_check_zuhause_status(void)
+{
+       int isZuhauseArea = 0;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_TELEPHONY_ZONE_ZUHAUSE, &isZuhauseArea);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "isZuhauseArea = [%d]", isZuhauseArea);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+       }
+
+       if (isZuhauseArea == 0) {
+               /*Not in a zuhause area..*/
+               return FALSE;
+       } else {
+               /*in a zuhause area..*/
+               return TRUE;
+       }
+}
+
+/*********************************************************************/
+gboolean _vc_core_util_set_call_status(int call_status)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_status = [%d]", call_status);
+
+       if (vconf_set_int(VCONFKEY_CALL_STATE, call_status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "vconf_set_int failed.");
+               return FALSE;
+       }
+       return TRUE;
+}
+
+gboolean _vc_core_util_set_call_volume(int vol_level)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "vol_level = [%d]", vol_level);
+
+       if (vconf_set_int(VCONFKEY_CALL_VOLUME_LEVEL, vol_level)) {
+               CALL_ENG_DEBUG(ENG_WARN, "vconf_set_int failed.");
+               return FALSE;
+       }
+       return TRUE;
+}
+
+int _vc_core_util_get_call_volume(void)
+{
+       int vol_level = 0;
+
+       if (vconf_get_int(VCONFKEY_CALL_VOLUME_LEVEL, &vol_level)) {
+               CALL_ENG_DEBUG(ENG_WARN, "vconf_set_int failed.");
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "vol_level(%d)",vol_level);
+       return vol_level;
+}
+
+gboolean _vc_core_util_check_video_call_status(void)
+{
+       int call_status = 0;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_CALL_STATE, &call_status);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "call_status = [%d]", call_status);
+               if (call_status == VCONFKEY_CALL_VIDEO_CONNECTING || call_status == VCONFKEY_CALL_VIDEO_ACTIVE) {
+                       return TRUE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+       }
+       return FALSE;
+}
+
+gboolean _vc_core_util_get_SAP_status()
+{
+       int bt_status = VCONFKEY_BT_DEVICE_NONE;
+       gboolean ret = FALSE;
+
+       ret = vconf_get_int(VCONFKEY_BT_DEVICE, &bt_status);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "bt_status = [0x%x]", bt_status);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+       }
+
+       if (bt_status == VCONFKEY_BT_DEVICE_SAP_CONNECTED) {
+               return TRUE;
+       } else {
+               return FALSE;
+       }
+}
+
+void _vc_core_util_get_cug_info(voicecall_setup_info_t *psetupcall_info)
+{
+       VOICECALL_RETURN_IF_FAIL(psetupcall_info != NULL);
+       voicecall_cug_info_t *pcug_info = NULL;
+       /*int error_code = -1;*/
+
+       pcug_info = (voicecall_cug_info_t *) &psetupcall_info->cug_info;
+
+       /*Get the CUG Information from the Settings */
+       memset(&psetupcall_info->cug_info, 0, sizeof(voicecall_cug_info_t));
+       pcug_info->bcug_used = 0;
+}
+
+void _vc_core_util_get_identity_mode(voicecall_setup_info_t *psetupcall_info)
+{
+       int id_mode = 0;        /*0 - default, 1-show, 2-hide*/
+       int ret = -1;
+       VOICECALL_RETURN_IF_FAIL(psetupcall_info != NULL);
+
+       ret = vconf_get_int(VCONFKEY_CISSAPPL_SHOW_MY_NUMBER_INT, &id_mode);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "id_mode = [%d]", id_mode);
+               psetupcall_info->identity_mode = id_mode;
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+               psetupcall_info->identity_mode = 0;
+       }
+}
+
+gboolean _vc_core_util_is_offline_mode(void)
+{
+       gboolean bstatus = -1;
+
+       if (vconf_get_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, &bstatus)) {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.");
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "bstatus:[%d]", bstatus);
+
+       return bstatus;
+}
+
+gboolean _vc_core_util_is_pwlock(void)
+{
+       int pwlock_state = -1;
+
+       if (vconf_get_int(VCONFKEY_PWLOCK_STATE, &pwlock_state)) {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed.");
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "pwlock_state:[%d]", pwlock_state);
+       if ((pwlock_state == VCONFKEY_PWLOCK_BOOTING_LOCK) || (pwlock_state == VCONFKEY_PWLOCK_RUNNING_LOCK)) {
+               return TRUE;
+       } else {
+               return FALSE;
+       }
+}
+
+gboolean _vc_core_util_get_nw_status(int *network_status)
+{
+       int svc_type = -1;
+       gboolean ret = FALSE;
+       VOICECALL_RETURN_FALSE_IF_FAIL(network_status != NULL);
+
+       ret = vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &svc_type);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "svc_type = [%d]", svc_type);
+               *network_status = svc_type;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+               return FALSE;
+       }
+}
+
+/* Function Definitions */
+/**
+ * This function copies the source string to the target string according to the size of the destination string
+ *
+ * @return             Returns newly copied string on success or NULL on failure
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]          buf_count       Size of Target Buffer
+ * @param[in]          pstring         Source String
+ */
+gboolean _vc_core_util_strcpy(char *pbuffer, int buf_count, const char *pstring)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pbuffer != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pstring != NULL);
+
+       if (buf_count == 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "buf_count is zero!!");
+               return FALSE;
+       }
+
+#ifdef _NO_USE_STRCPY_
+       if ((buf_count - 1) >= (int)strlen(pstring)) {
+               strcpy(pbuffer, pstring);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "pbuffer size is smaller than pstring!!");
+               strncpy(pbuffer, pstring, (buf_count - 1));
+               pbuffer[buf_count - 1] = '\0';
+       }
+#else
+       CALL_ENG_DEBUG(ENG_DEBUG, "pbuffer size(%d), pstring size(%d)", buf_count, strlen(pstring));
+       strncpy(pbuffer, pstring, (buf_count - 1));
+       pbuffer[buf_count - 1] = '\0';
+#endif
+       return TRUE;
+}
+
+/**
+ * This function make the date and time string
+ *
+ * @return             Returns newly copied string on success or NULL on failure
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]          time    time
+ */
+char *_vc_core_util_get_date_time(time_t time)
+{
+       int ret = 0;
+       UDate date;
+       const char *locale = uloc_getDefault();
+       UErrorCode status = U_ZERO_ERROR;
+       UDateTimePatternGenerator *generator;
+       UDateFormat *formatter;
+       UChar bestPattern[64] = { '\0', };
+       UChar formatted[64] = { '\0', };
+       char bestPatternString[128] = { '\0', };
+       char formattedString[128] = { '\0', };
+       int32_t bestPatternCapacity, formattedCapacity;
+       int32_t bestPatternLength, formattedLength;
+       char skeleton[128]={ '\0', };
+       UChar customSkeleton[64] = { '\0', };
+       enum appcore_time_format time_format;
+
+       appcore_get_timeformat(&time_format);
+
+       switch(time_format) {
+       case APPCORE_TIME_FORMAT_12:
+               snprintf(skeleton, sizeof(skeleton), "%s%s", DATE_FORMAT_1, TIME_12_TYPE);
+               break;
+       case APPCORE_TIME_FORMAT_24:
+               snprintf(skeleton, sizeof(skeleton), "%s%s", DATE_FORMAT_1, TIME_24_TYPE);
+               break;
+       case APPCORE_TIME_FORMAT_UNKNOWN:
+       default:
+               snprintf(skeleton, sizeof(skeleton), "%s%s", DATE_FORMAT_1, TIME_24_TYPE);
+               break;
+       }
+
+       u_uastrncpy(customSkeleton, skeleton,strlen(skeleton));
+
+       generator = udatpg_open(locale, &status);
+       bestPatternCapacity = (int32_t)(sizeof(bestPattern)/sizeof((bestPattern)[0]));
+
+       bestPatternLength = udatpg_getBestPattern(generator, customSkeleton, u_strlen(customSkeleton), bestPattern,   bestPatternCapacity, &status);
+       u_austrncpy(bestPatternString, bestPattern, 128);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "BestPattern(%s)", bestPatternString);
+
+       date = (UDate) time * 1000;
+
+       formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, -1, &status);
+
+       /* UDAT_IGNORE Passed so that our best pattern is used in generating pattern */
+       formattedCapacity = (int32_t)(sizeof(formatted)/sizeof((formatted)[0]));
+       formattedLength = udat_format(formatter, date, formatted, formattedCapacity, NULL, &status);
+       u_austrncpy(formattedString, formatted, 128);
+       udatpg_close(generator);
+       udat_close(formatter);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "DATE & TIME(%s)", formattedString);
+       return g_strdup(formattedString);
+}
+
+
+gboolean _vc_core_util_set_sleep_status(call_vc_power_mode_t type)
+{
+       return FALSE;           /*it will be processed with sensor in ui*/
+}
+
+gboolean _vc_core_util_get_call_alert_type(int *alert_type)    /*VCONFKEY_SETAPPL_PROFILE_CURRENT_CALL_ALERT_TYPE_INT*/
+{
+       int tmp_alert_type = -1;
+       gboolean ret = FALSE;
+       char *vconf_key = NULL;
+       VOICECALL_RETURN_FALSE_IF_FAIL(alert_type != NULL);
+
+       vconf_key = vconf_get_str("db/setting/cur_profile");
+       strncat(vconf_key, "/call_alert_type", strlen("/call_alert_type"));
+       ret = vconf_get_int(vconf_key, &tmp_alert_type);
+       CALL_ENG_DEBUG(ENG_DEBUG, "vconf_key = [%s]", vconf_key);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "alert_type = [%d]", tmp_alert_type); /*SETTING_CALL_ALERT_TYPE_MELODY,...*/
+               *alert_type = tmp_alert_type;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]", ret);
+               return FALSE;
+       }
+}
+
+gboolean _vc_core_util_phonelock_status(void)
+{
+       gboolean b_phonelock = FALSE;
+       if (!vconf_get_bool(VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, &b_phonelock)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "b_phonelock:[%d]", b_phonelock);
+               return b_phonelock;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "get VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL failed..");
+               return FALSE;
+       }
+}
+
+#ifdef TIMER_ENABLED
+clock_t _vc_core_util_get_curr_time()
+{
+       struct timeval tv;
+       long cur_time;
+       gettimeofday(&tv, NULL);
+
+       cur_time = (tv.tv_sec * 1000) + tv.tv_usec / 1000;
+       return cur_time;
+}
+
+void _vc_core_util_print_diff_time(clock_t start, clock_t end, char *message)
+{
+       long elapsed_time = 0;
+       elapsed_time = (end - start);
+       VOICECALL_RETURN_IF_FAIL(message != NULL);
+       fprintf(stderr, "\n[VoiceCall TIMER][%s]:\n[%s]\n\tstart time: %ld; end time: %ld; total time: %ld milli seconds\n", __func__, message, start, end, elapsed_time);
+}
+
+void _vc_core_util_print_curr_time(char *message)
+{
+       clock_t curr_time = _vc_core_util_get_curr_time();
+       VOICECALL_RETURN_IF_FAIL(message != NULL);
+       fprintf(stderr, "\n[VoiceCall TIMER][%s]:\n[%s]\n\t time: [%ld] milli seconds\n", __func__, message, curr_time);
+}
+#endif
+
+void _vc_core_util_download_test_call(char *result)
+{
+       int ret;
+       FILE *d_call_test = NULL;
+       char string[20] = { };
+
+       VOICECALL_RETURN_IF_FAIL(result != NULL);
+
+       /*create string*/
+       snprintf(string, sizeof(string), "/tmp/%s", result);
+
+       d_call_test = fopen(string, "w");
+       if (d_call_test == NULL) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "FAIL:fopen(%s)", string);
+               return;
+       }
+       /*ret = fwrite("\0", sizeof(char), 1, d_call_test);*/
+       /*CALL_ENG_DEBUG(ENG_DEBUG,"Result:fwrite(%d)", ret);*/
+
+       ret = fclose(d_call_test);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Result:fwrite(%d)", ret);
+       if (ret != 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "FAIL:fclose\n");
+               return;
+       }
+
+}
diff --git a/call-engine/etc/rc.d/init.d/voice-calld b/call-engine/etc/rc.d/init.d/voice-calld
new file mode 100755 (executable)
index 0000000..1eb7128
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Script for voice call daemon during booting time
+#
+if [ -x /usr/bin/voice-calld ]; then
+       /usr/bin/voice-calld &
+fi
diff --git a/call-engine/etc/rc.d/rc3.d/S60voice-calld b/call-engine/etc/rc.d/rc3.d/S60voice-calld
new file mode 100755 (executable)
index 0000000..1eb7128
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Script for voice call daemon during booting time
+#
+if [ -x /usr/bin/voice-calld ]; then
+       /usr/bin/voice-calld &
+fi
diff --git a/call-engine/include/voice-call-bt.h b/call-engine/include/voice-call-bt.h
new file mode 100755 (executable)
index 0000000..848c1d0
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_BT_H_
+#define _VOICE_CALL_BT_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "voice-call-core.h"
+#include "vconf.h"
+#include "vconf-keys.h"
+
+#define BT_IPC_STRING_SIZE 256
+
+/* Enum describes the AG request commands */
+typedef enum {
+       BT_AG_REQ_CONNECT,     /**< Headset Connected */
+       BT_AG_REQ_CONNECT_ERROR,    /**< Headset Connection Failed */
+       BT_AG_REQ_DISCONNECT,     /**< Headset Disconnected */
+       BT_AG_REQ_SPK_GAIN,     /**< Speaker volume changed */
+       BT_AG_REQ_MIC_GAIN,     /**< Microphone gain changed */
+       BT_AG_REQ_CALL_ACCEPTED,    /**< Call accepted */
+       BT_AG_REQ_CALL_REJECT,     /**< Incoming call rejected */
+       BT_AG_REQ_CALL_END,     /**< Call Ended*/
+       BT_AG_REQ_CALL_HOLD,     /**< Put Call on Hold */
+       BT_AG_REQ_CALL_RETRIEVE,    /**< Retrieve held call */
+       BT_AG_REQ_BUTTON_PRESSED,   /**< Headset Button was pressed */
+       BT_AG_REQ_CALL_REDIAL,     /**< Handsfree requested call redial */
+       BT_AG_REQ_CALL_2_SEND,     /**< Places all active calls on hold and accepts the other call */
+       BT_AG_REQ_CALL_3_SEND,     /**< Adds a held call to the conversation */
+       BT_AG_REQ_CALL_0_SEND,     /**< Releases all held calls or sets User Determined User Busy for a waiting call */
+       BT_AG_REQ_CALL_1_SEND,     /**< Releases all active calls and accepts the other call  */
+       BT_AG_REQ_HEADSET_VOL,     /**< Send current Headset Volume level to Call */
+       BT_AG_REQ_SWITCH_TO_HEADSET,/**< Switch to HS */
+       BT_AG_REQ_SWITCH_TO_PHONE,  /**< Switch to Phone */
+       BT_AG_REQ_DTMF,      /**< Send DTMF tone */
+       BT_AG_REQ_CALL_STATUS     /**< Ask current call status */
+} connectivity_bt_ag_req_t;
+
+/* Enum describes the AG response commands. */
+typedef enum {
+       BT_AG_RES_CALL_ORIG,     /**< Phone originated a call.  */
+       BT_AG_RES_CALL_INCOM,     /**< Incoming call notification to Headset */
+       BT_AG_RES_CALL_CONNECT,     /**< Call connected */
+       BT_AG_RES_CALL_END,     /**< MO or MT call ended */
+       BT_AG_RES_CALL_HOLD,     /**< Call on Hold */
+       BT_AG_RES_CALL_RETRIEVE,    /**< Held call retrieved */
+       BT_AG_RES_CALL_JOINED,     /**< Held call joined */
+       BT_AG_RES_SPK_GAIN,     /**< Speaker volume changed */
+       BT_AG_RES_MIC_GAIN,     /**< Microphone gain changed */
+       BT_AG_RES_CALL_REMOTE_RINGING,
+       /**< Remote party call alerted */
+       BT_AG_RES_SWITCH_TO_HEADSET,/**< Switch to HS */
+       BT_AG_RES_SWITCH_TO_PHONE,  /**< Switch to Phone */
+       BT_AG_RES_CALL_STATUS,     /**< For call status information to headset */
+       BT_AG_RES_HEADSET_VOL,      /**< Request Current Headset Volume level from Call */
+       BT_AG_RES_CALL_SWAPPED
+} connectivity_bt_ag_res_t;
+
+/**
+*   This enum is for ag call status
+*/
+typedef enum {
+       BT_AG_CALL_STATUS_NONE,     /**< AG Call status is None */
+       BT_AG_CALL_STATUS_DIALLING, /**< AG Call status is Dialing */
+       BT_AG_CALL_STATUS_INCOMING, /**< Incoming Call */
+       BT_AG_CALL_STATUS_INCOMING_HELD,
+       /**< Incoming call is held */
+       BT_AG_CALL_STATUS_CONNECTED,/**< Call is connected */
+       BT_AG_CALL_STATUS_HELD,     /**< Call is held */
+       BT_AG_CALL_STATUS_RETRIEVED,/**< Call is retrieved */
+       BT_AG_CALL_STATUS_RETRIVING,/**< Call is retreving */
+       BT_AG_CALL_STATUS_WAITING,  /**< Incoming call Waiting */
+       BT_AG_CALL_STATUS_ALERTING, /**< Remote Party being alerted in outgoing call */
+       BT_AG_CALL_STATUS_CANDIDATE /**< The call hed state is moved to call_candidate */
+} connectivity_bt_ag_call_value_t;
+
+typedef enum {
+       BT_AG_RES_AUDIO_CONNECTION_ERROR = 0x00F0,
+       BT_AG_RES_AUDIO_DISCONNECTION_ERROR,
+} connectivity_bt_ag_resp_status_t;
+
+typedef struct {
+       int param1;     /* Req or Res Type */
+       int param2;
+       int param3;
+       char param4[BT_IPC_STRING_SIZE];
+} __attribute__ ((packed)) connectivity_bt_ag_param_info_t;
+
+typedef struct {
+       unsigned int call_id;                   /**< Call identification */
+       connectivity_bt_ag_call_value_t call_status;    /**< Status of the call */
+} __attribute__ ((packed)) connectivity_bt_ag_call_status_info_t;
+
+gboolean _vc_bt_switch_headset_path(call_vc_core_state_t *pcall_core, gboolean bheadset, gboolean bsend_bt_response);
+
+/**
+ * This function sends event to BT for switch to Headset/Phone
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bheadset                        TRUE if sound type is Audio Headset, FALSE otherwise
+ */
+void _vc_bt_request_switch_headset_path(call_vc_core_state_t *pcall_core, gboolean bheadset);
+
+/**
+ * This function handles the bluetooth notifications sent by blue tooth application
+ *
+ * @return             TRUE -if event is handled, FALSE otherwise
+ * @param[in]          pcall_core                      Handle to voicecall core
+ * @param[in]          pbt_info                                bt notification details
+ */
+gboolean _vc_bt_handle_bt_events(call_vc_core_state_t *pcall_core, connectivity_bt_ag_param_info_t * pbt_info);
+
+/**
+ * This function sends response back to the bt application
+ *
+ * @return             void
+ * @param[in]          pcall_core                      Handle to voicecall core
+ * @param[in]          bt_event                                bluetooth event type
+ * @param[in]          param1                          user param1
+ * @param[in]          param2                          user param2
+ */
+void _vc_bt_send_response_to_bt(call_vc_core_state_t *pcall_core, int bt_event, int param1, gpointer param2);
+
+/**
+ * This function register bt callback.
+ *
+ * @return             TRUE if bt status is registered, FALSE otherwise
+ * @param[in]          void
+ */
+gboolean _vc_bt_status_init(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function gets the blue tooth active status from the phone status server
+ *
+ * @return             TRUE - if BT is enabled, FALSE otherwise
+ * @param[in]          none
+ */
+gboolean _vc_bt_get_bt_status(void);
+
+/**
+ * This function gets the BT inband ringtone activate settings
+ *
+ * @return             TRUE - if BT inband ringtone activate settings is ON, FALSE otherwise
+ * @param[in]          none
+ */
+gboolean _vc_bt_get_inband_ringtone_active(void);
+
+/**
+ * This function handles the notifications sent by phone status server
+ *
+ * @return             TRUE -if notification is handled, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bt_status                       Blue tooth status
+ */
+gboolean _vc_bt_handle_phonestatus_bt_events(keynode_t *node, call_vc_core_state_t *pcall_core);
+
+/**
+ * This function retreives volume level of headset
+ *
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+void _vc_bt_get_headset_volume(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function returns the BT connection status
+ *
+ * @return             TRUE if bt is connected, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean _vc_bt_is_bt_connected(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function returns the BT SCO status.(Synchronized Connection Oriented link)
+ *
+ * @return             TRUE if bt is connected, FALSE otherwise
+ * @param[in]          void
+ */
+gboolean _vc_bt_get_bt_sco_status(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/call-engine/include/voice-call-core.h b/call-engine/include/voice-call-core.h
new file mode 100755 (executable)
index 0000000..42028fd
--- /dev/null
@@ -0,0 +1,628 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_CORE_H_
+#define _VOICE_CALL_CORE_H_
+
+#ifdef __cplusplus
+extern "C" {
+
+#endif
+
+#include "vc-core-util.h"
+#include "vc-core-engine-types.h"
+#include "voice-call-sound.h"
+#include "voice-call-engine.h"
+
+typedef enum _call_vc_core_flags_t {
+       CALL_VC_CORE_FLAG_NONE = 0x00000000, /**< NONE state */ 
+       CALL_VC_CORE_FLAG_SOS_CALL_ONLY = 0x00000001, /**< SET - Emergency Calls Only, UNSET - All Calls Allowed */ 
+       CALL_VC_CORE_FLAG_MSG_SVC_INIT = 0x00000002, /**< SET - Messenger service intialization done, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_FDN_SVC_ENABLED = 0x00000004, /**< SET - FDN enabled, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_VOL_CHNGD_BYBT = 0x00000008, /**< SET - volume change request from BT, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_BT_EVENT_WAITING = 0x00000010, /**< SET - Waiting for Switch Headset/Phone Event fom Bluetooth, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_IT_WAS_LOCKED = 0x00000020, /**< SET - It was locked when voice call app luanched, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_UNLOC_BY_SLIDER = 0x00000040, /**< SET - Voice call unlock by slider, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_EXPT_APPLET_QUIT = 0x00000080, /**< SET - Thread safe applet quit required, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_LANG_CHGD_UPDATE = 0x00000100, /**< SET - UI needs to be updated for language change, UNSET - otherwise */ 
+       CALL_VC_CORE_FLAG_WAIT_SWITCH_FROM_BT = 0x00000200, /**< SET - Don't change path in path_change API, UNSET - change path according to current status */ 
+       CALL_VC_CORE_FLAG_SETUPCALL_FAIL = 0x00000400, /**< SET - Setup call fail.(ex. Emergency call only). UNSET - Normal mo call.*/ 
+       CALL_VC_CORE_FLAG_ACCEPT_BY_BT = 0x00000800, /**< SET - MT call accpeted by BT Headset, UNSET - MT call accept by Phone/ Call ended.*/ 
+       CALL_VC_CORE_FLAG_QC_SIM_INSERTED = 0x00001000, /**< SET - Inserted SIM is QC Test SIM, UNSET - Inserted SIM is Normal SIM.*/ 
+       CALL_VC_CORE_FLAG_MOCALL_END_BY_USER = 0x00002000, /**< SET - MO Call Ended by user, UNSET - MO Call not ended by user.*/ 
+} call_vc_core_flags_t;
+
+/**
+ * This enum defines the In Call Supplementary Services State
+ */ 
+typedef enum _call_vc_core_incall_ss_state_t {
+       CALL_VC_CORE_SS_NONE, /**< Idle State*/ 
+       CALL_VC_CORE_SS_0, /**< Releases all held calls or Set UDUB for a waiting call*/ 
+       CALL_VC_CORE_SS_1, /**< Releases all active calls and accepts the other(held or waiting) calls*/ 
+       CALL_VC_CORE_SS_1X, /**< Releases a specific active call X*/ 
+       CALL_VC_CORE_SS_2, /**< Places all active calls (if  any exist) on hold and accepts the other(held or waiting)call*/ 
+       CALL_VC_CORE_SS_2X, /**< Places all active calls on hold except call X with which communication shall be supported*/ 
+       CALL_VC_CORE_SS_3, /**< Adds a held call to the conversation*/ 
+       CALL_VC_CORE_SS_4, /**< ECT */ 
+       CALL_VC_CORE_SS_USSD /**< USSD */  
+} call_vc_core_incall_ss_state_t;
+       
+/**
+* This structure defines the details of the DTMF related data handled in document
+*/ 
+typedef struct _voicecall_dtmf_info_t {
+       gboolean bdtmf_queue;           /**< TRUE -dtmf queue enabled, FALSE - dtmf quue disabled */
+       int dtmf_index;                         /**< index of the current dtmf digit sent */
+       int dtmf_max_length;            /**< maximum length of the dtmf number being sent */
+       int dtmf_pause_timer;           /**< Timer handle of the DTMF Pause Timer */
+       gboolean bsat_dtmf;                     /**< SAT DTMF Type Engine Flag*/
+       gboolean bsat_hidden;           /**< SAT DTMF Hidden Engine Flag*/
+       char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];
+} voicecall_dtmf_info_t;
+
+/**
+ * This structure defines voicecall core info
+ */ 
+typedef struct _call_vc_core_state_t {
+       voicecall_setup_info_t call_setup_info;         /**< Info of MO Call */
+       voicecall_engine_t *pcall_engine;               /**<  Handle to Voicecall Engine */
+       voicecall_snd_mgr_t *papp_snd;                  /**< Handle to Sound Manager */
+       voicecall_dtmf_info_t dtmf_info;                                /**<  DTMF Info*/
+               
+       unsigned int core_status;                                       /**< call core status */
+       gboolean bt_connected;                                  /**< TRUE - Bluetooth connected, FALSE - otherwise */
+       gboolean bdtmf_queue;                                           /**< TRUE -dtmf queue enabled, FALSE - dtmf quue disabled */
+       int auto_redial_count;                        /** Auto Redial count **/
+       unsigned int auto_answer_timer;                         /**< Timer Handle for Auto Answering */
+       unsigned int callstatus_timer;                          /**< Timer Handle for callstatus set. */
+       int selected_call_id_in_ss;                                             /**<Call Id used for SS operations while on Call */
+       int mo_end_cause_type;                                          /**<MO call end cause type */
+       int mo_end_call_handle;                                         /**<MO call end call handle */
+       int mtcall_silent_reject_handle;
+       guint mo_redial_timer;
+       guint minute_minder_timer;
+} call_vc_core_state_t;
+\r/** 
+ * This struct provides a structure for call incoming info data.
+ */ 
+typedef struct _call_vc_core_incoming_info_t {
+       int call_handle;
+       int call_type;
+       int cli_presentation_indicator;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       int calling_name_mode;
+       char calling_name[VC_PHONE_NAME_LENGTH_MAX];
+       char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
+       char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
+       int cli_cause;
+       int bfwded;
+       int active_line;
+} call_vc_core_incoming_info_t;
+       
+/**
+ * This function puts the currently active call on hold
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_hold_call(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function retreives the currently held call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_retrieve_call(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function swaps the currently available active and held calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_swap_calls(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function clears the MO Call Details
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_clear_mo_call(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function clears the Connected Call Details
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          call_handle             Handle of the Connected Call to be cleared
+ */ 
+inline gboolean voicecall_core_clear_connected_call(voicecall_engine_t *pcall_engine, int call_handle);
+
+/**
+ * This function changes the voicecall engine's state
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          eng_state               Engine State to be changed
+ */ 
+inline gboolean voicecall_core_change_engine_state(voicecall_engine_t *pcall_engine, int eng_state);
+
+/**
+ * This function ends an Outgoing Call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_end_mo_call(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function retreives the Voicecall Engine's State
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] io_state                        Voicecall Engine InOut State
+ */ 
+inline gboolean voicecall_core_get_engine_state(voicecall_engine_t *pcall_engine, int *eng_state);
+
+/**
+ * This function checks whether any call exists
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] active_calls            TRUE - If active call exists or FALSE If active call doesn't exists
+ * @param[out] held_calls              TRUE - If held call exists or FALSE If held call doesn't exists
+ */ 
+inline gboolean voicecall_core_is_call_exists(voicecall_engine_t *pcall_engine, gboolean * active_calls, gboolean * held_calls);
+
+/**
+ * This function checks whether incoming call exists or not
+ *
+ * @return             Returns TRUE if incoming call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_is_incoming_call_exists(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function checks whether outgoing call exists or not
+ *
+ * @return             Returns TRUE if outgoing call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_is_outgoing_call_exists(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function checks whether any connexcted call exists or not
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_is_connected_call_exist(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function checks whether any connexcted call exists or not in the given group
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          group_index             Group Index to be searhced
+ */ 
+inline gboolean voicecall_core_is_connected_call_exist_in_group(voicecall_engine_t *pcall_engine, int group_index);
+
+/**
+ * This function checks whether any call exists
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_is_any_call_exists(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function retreives the totally number of availavle calls including connected, MO and MT Calls
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] ptotal_call_member      number of avialble calls
+ */ 
+inline gboolean voicecall_core_get_total_call_member(voicecall_engine_t *pcall_engine, int *ptotal_call_member);
+
+/**
+ * This function checks whether voicecall engine's call agent is idle or not
+ *
+ * @return             Returns TRUE if call agent is idle or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */ 
+inline gboolean voicecall_core_is_callagent_idle(voicecall_engine_t *pcall_engine);
+
+/**
+* This function checks the current call status and engine status
+*
+* @return              TRUE, if connected calls available and engine is in idle, FALSE otherwise
+* @param[in]           pcall_engine            Handle to voicecall engine
+*/ 
+inline gboolean voicecall_core_is_incall_request_possible(voicecall_engine_t *pcall_engine);
+
+/**
+ * This function changes the modem call audio path
+ *
+ * @return             TRUE sucess, FALSE otherwise
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          audio_path              audio path to be changed
+ */ 
+inline gboolean voicecall_core_change_audio_path(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path);
+
+/**
+ * This function sets the voice call audio volume for the given audio path type
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          tapi_snd_path           audio path for the volume to be set
+ * @param[in]          vol_level                       volume level
+ */ 
+inline gboolean voicecall_core_set_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t tapi_snd_path, int vol_level);
+
+/**
+ * This function retreives the voice call audio volume for the given audio path type
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[in]          audio_path_type         audio path for the volume to be retreived
+ */ 
+inline gboolean voicecall_core_get_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path_type);
+
+/**
+ * This function set the voice call audio mute status
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[in]          bvoice_mute                     mute status
+ */ 
+inline gboolean voicecall_core_set_audio_mute_status(voicecall_engine_t *pcall_engine, gboolean bvoice_mute);
+
+/**
+ * This function retreives the first active call among the available active calls
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[out] pcall_handle            call handle of the active call
+ */ 
+inline gboolean voicecall_core_get_zuhause(voicecall_engine_t *pcall_engine, gboolean * bzuhause);
+
+/**
+ * This function retreives the Voicecall Engine's State
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]  pcall_engine    Handle to voicecall engine
+ * @param[in]  call_handle     Call handle of the call for which the call object is retrieved
+ * @param[out] pcall_object    Pointer to the retrived call object info
+ */ 
+inline gboolean voicecall_core_get_call_object(voicecall_engine_t *pcall_engine, int call_handle, call_vc_call_objectinfo_t * pcall_object);
+
+/**
+ * This function sends response to sat engine
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]  pcall_engine    Handle to voicecall engine
+ * @param[in]          sat_rqst_resp_type sat rqst/resp type to be set by the client
+ * @param[in]          sat_response_type sat response type to be sent to sat
+ */ 
+inline gboolean voicecall_core_send_sat_response(voicecall_engine_t *pcall_engine, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type);
+
+/**
+ * This function retreives the number of active call members
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[out] pactive_member_num      number of active call members available
+ */ 
+inline gboolean voicecall_core_get_active_call_member(call_vc_core_state_t *pcall_core, int *pactive_member_num);
+
+/**
+ * This function checks whether possible to make conference call
+ *
+ * @return             Returns TRUE If Conference call can be made or FALSE if not
+ * @param[in]          papp_document   Handle to Application Document
+ */ 
+inline gboolean voicecall_core_is_conf_call_possible(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function checks whether possible to transfer call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+inline gboolean voicecall_core_is_transfer_call_possible(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function checks whether the given code is a valid Supplementary Services Code
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          pszInput                        Number to be verified
+ */ 
+inline gboolean voicecall_core_is_valid_sscode(call_vc_core_state_t *pcall_core, const char *pszInput);
+
+#ifdef _CPHS_DEFINED_
+/**
+ * This function gets the cphs status from the engine
+ *
+ * @return             TRUE if queried status is enabled, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          csp_service             csp service to be queried
+ */ 
+inline gboolean voicecall_core_get_cphs_csp_status(call_vc_core_state_t *pcall_core, voicecall_cphs_csp_service csp_service);
+#endif
+
+/**
+ * This function informs the Voicecall Engine that current SS operation has been completed
+ *
+ * @return             Returns TRUE if all the calls are ended or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall cor
+ */ 
+inline gboolean voicecall_core_set_check_ss_on_end(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function informs the Voicecall Engine that current SS operation has been completed
+ *
+ * @return             Returns TRUE if all the calls are ended or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+inline void voicecall_core_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size);
+
+/************************
+*  inline function END
+**************************/ 
+void voicecall_core_set_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags, gboolean bstatus);
+gboolean voicecall_core_get_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags);
+
+/**
+ * This function starts the supplementary services while on call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          incall_ss_state         state of the In Call Supplementary Service
+ */ 
+gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
+
+#ifdef VC_ENG_FDN_SUPPORT 
+gboolean voicecall_core_check_fdn_status(call_vc_core_state_t *pcall_core);
+#endif
+gboolean voicecall_core_set_to_default(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function initialize voicecall core
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+int voicecall_core_init(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function prepares a voice call with the given data
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bemergency              emergency call or not from dialer
+ * @param[in]          
+ */ 
+gboolean voicecall_core_setup_call(call_vc_core_state_t *pcall_core, gboolean bemergency);
+
+/**
+ * This function makes the actual voicecall prepared by the #voicecall_core_setup_call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_make_call(call_vc_core_state_t *pcall_core);
+gboolean voicecall_core_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info);
+
+/**
+ * This function processed incoming call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          
+*/ 
+gboolean voicecall_core_process_incoming_call(call_vc_core_incoming_info_t *incoming_call_info);
+
+/**
+ * This function answers an incoming call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          
+*/ 
+gboolean voicecall_core_answer_call(call_vc_core_state_t *pcall_core, gboolean auto_accept);
+
+/**
+ * This function answers an incoming call  according to the given type
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_answer_call_bytype(call_vc_core_state_t *pcall_core, voicecall_answer_type_t answer_type);
+
+/**
+* This function rejects an incoming call
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_core              Handle to voicecall core
+* @param[in]           bUDUB                   TRUE - set UDUB, FALSE - reject call
+*/ 
+gboolean voicecall_core_reject_mt(call_vc_core_state_t *pcall_core, gboolean bUDUB);
+
+/**
+ * This function ends the call by state
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_end_call(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function ends the call corresponding to the given call handle
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          call_handle             handle of the call to be ended
+ */ 
+gboolean voicecall_core_end_call_by_handle(call_vc_core_state_t *pcall_core, int call_handle);
+
+/**
+ * This function ends all available calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_end_all_calls(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function ends all available active calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_end_all_active_calls(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function ends all available held calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */ 
+gboolean voicecall_core_end_all_held_calls(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function cancel outgoing call
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */ 
+gboolean voicecall_core_cancel_call(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function process hold/retrive/swap conntected call
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */ 
+gboolean voicecall_core_process_hold_call(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function sets up a conference call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */ 
+gboolean voicecall_core_setup_conference(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function splits the call corressponding to the given call handle and makes a private call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ * @param[in]          call_handle             Call to be splitted from the conference call
+ */ 
+gboolean voicecall_core_make_private_call(call_vc_core_state_t *pcall_core, int call_handle);
+
+/**
+ * This function transfers the call from active call to the held call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */ 
+gboolean voicecall_core_transfer_calls(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function sends a dtmf string
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ * @param[in]          dtmf_string             dtmf string to be sent
+ */ 
+gboolean voicecall_core_send_dtmf(call_vc_core_state_t *pcall_core, char *dtmf_string);
+
+/**
+* This function stops sound alert
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_core              Handle to voicecall core
+*/ 
+gboolean voicecall_core_stop_alert(call_vc_core_state_t *pcall_core);
+
+/**
+* This function proce bt headset msg.
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_core              Handle to voicecall core
+* @param[in]           bheadset                        TRUE or FALSE
+*/ 
+inline gboolean voicecall_core_prepare_redial(call_vc_core_state_t *pcall_core, int call_handle);
+gboolean voicecall_core_start_redial(call_vc_core_state_t *pcall_core, int manual_redial);
+gboolean voicecall_core_stop_redial(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function parses the in call supplementary services string and returns the in call ss to be used
+ *
+ * @return             Returns in call ss state #vcui_app_incall_ss_state_t
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          number                  number to be parsed
+ */ 
+call_vc_core_incall_ss_state_t voicecall_core_parse_incall_ss_string(call_vc_core_state_t *pcall_core, char *number);
+
+/**
+ * This function starts the supplementary services while on call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          incall_ss_state         state of the In Call Supplementary Service
+ */ 
+gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state);
+
+/**
+ * This function processed the supplementary services while on call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          pdialled_number         dial number
+*/ 
+void voicecall_core_process_incall_ss(call_vc_core_state_t *pcall_core, char *pdialled_number);
+
+#ifdef PDIAL_SEND_DTMF
+/**
+ *** This function sends the dtmf number
+ ***
+ *** @return              Returns TRUE on success
+ *** @param[in]           puser_data   pointer to user data
+ **/ 
+gboolean voicecall_core_send_phone_number_dtmf(gpointer puser_data);
+#endif
+
+/**
+ *** This function change sound path
+ ***
+ *** @return              Returns TRUE on success
+ *** @param[in]           sound_path
+ **/ 
+gboolean voicecall_core_change_sound_path(call_vc_core_state_t *pcall_core, voicecall_snd_audio_type_t sound_path);
+gboolean voicecall_core_get_sound_path(call_vc_core_state_t *pcall_core, int *sound_path);
+
+#ifdef __cplusplus
+} 
+#endif /* __cplusplus */
+
+#endif /* _VOICE_CALL_CORE_H_ */
diff --git a/call-engine/include/voice-call-dbus.h b/call-engine/include/voice-call-dbus.h
new file mode 100755 (executable)
index 0000000..01be575
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALLD_H_
+#define _VOICE_CALLD_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "voice-call-bt.h"
+
+/* prototype */
+void vc_engine_on_dbus_send_response_to_bt(connectivity_bt_ag_param_info_t bt_resp_info);
+void vc_engine_on_dbus_send_connect_to_bt(void);
+int vc_engine_dbus_receiver_setup();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/call-engine/include/voice-call-device.h b/call-engine/include/voice-call-device.h
new file mode 100755 (executable)
index 0000000..453dde1
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_DEVICE_H_
+#define _VOICE_CALL_DEVICE_H_
+
+#include "voice-call-core.h"
+/**
+ * This function initialize earjack event.
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ */
+gboolean _voicecall_dvc_earjack_init(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function gets the earjack status 
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+void _voicecall_dvc_get_earjack_status(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function gets the earjack is connected or not
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean _voicecall_dvc_get_earjack_connected(void);
+
+/**
+ * This function control the lcd status.
+ *
+ * @return     void
+ * @param[in]  state   one of voicecall_lcd_control_t members.
+ */
+void _voicecall_dvc_control_lcd_state(voicecall_lcd_control_t state);
+
+/**
+ * This function return the proximity sensor status.
+ *
+ * @return     int             proximity sensor status. 1:new 2:far
+ * @param[in]  void
+ */
+int _voicecall_dvc_get_proximity_sensor_state(void);
+
+ /**
+ * This function init proximity sensor.
+ *
+ * @return     gboolean        init success or not/
+ * @param[in]  void *
+ */
+gboolean _voicecall_dvc_proximity_sensor_init(void *data);
+
+/**
+ * This function init proximity sensor.
+ *
+ * @return     gboolean        init success or not/
+ * @param[in]  void *
+ */
+gboolean _voicecall_dvc_proximity_sensor_deinit(void);
+#endif
diff --git a/call-engine/include/voice-call-engine-msg.h b/call-engine/include/voice-call-engine-msg.h
new file mode 100755 (executable)
index 0000000..6a2c14b
--- /dev/null
@@ -0,0 +1,430 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_ENGINE_MSG_H_
+#define _VOICE_CALL_ENGINE_MSG_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "vc-core-engine-types.h"
+
+typedef enum _vc_engine_msgid_t  { 
+       /* Tapi Call Related Event Types */ 
+       VC_ENGINE_MSG_INCOM_TO_UI, /**< Incoming call */ 
+       VC_ENGINE_MSG_OUTGOING_TO_UI, /**< Outgoing call. This event will be sent, when outgoing deferred and made after some time */ 
+       VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI, /**< Outgoing call originated */ 
+       VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI_TEST,  /**< Outgoing local test */ 
+       VC_ENGINE_MSG_OUTGOING_ALERT_TO_UI, /**< Outgoing alert call */ 
+       VC_ENGINE_MSG_CONNECTED_TO_UI, /**< Call connected */ 
+       VC_ENGINE_MSG_NORMAL_END_TO_UI, /**< Normal end */ 
+       VC_ENGINE_MSG_INCOM_END_TO_UI, /**< Incoming call end */ 
+       VC_ENGINE_MSG_REJECTED_END_TO_UI, /**< Rejected call end */ 
+       VC_ENGINE_MSG_OUTGOING_END_TO_UI, /**< Outgoing call end */ 
+       VC_ENGINE_MSG_OUTGOING_END_SIGNAL_PLAY_TO_UI, /**< Outgoing call end signal play */ 
+       VC_ENGINE_MSG_OUTGOING_ABORTED_TO_UI, /**< Outgoing call ended before making the call to the NW */ 
+       VC_ENGINE_MSG_DTMF_ACK_TO_UI, /**< DTMF Acknowledgement */ 
+       
+       /*Tapi Call Dependent SS related events */ 
+       VC_ENGINE_MSG_SS_HELD_TO_UI, /**< SS Held */ 
+       VC_ENGINE_MSG_SS_RETREIVED_TO_UI, /**< SS Retriebved */ 
+       VC_ENGINE_MSG_SS_SWAP_TO_UI, /**< SS call swap */ 
+       VC_ENGINE_MSG_SS_SETUP_CONF_TO_UI, /**< SS setup conference */ 
+       VC_ENGINE_MSG_SS_SPLIT_CONF_TO_UI, /**< SS Split conference */ 
+       VC_ENGINE_MSG_SS_TRANSFERRED_TO_UI, /**< SS call transferred */ 
+       VC_ENGINE_MSG_SS_CONNECT_LINE_IND_TO_UI,        /**< SS connectect line indication */
+       
+       /*Tapi Call SS Indication Related Events */ 
+       VC_ENGINE_MSG_IND_FORWARD_TO_UI, /**< Call forward */ 
+       VC_ENGINE_MSG_IND_ACTIVATE_TO_UI, /**< Activate call */ 
+       VC_ENGINE_MSG_IND_HOLD_TO_UI, /**< Hold call */ 
+       VC_ENGINE_MSG_IND_TRANSFER_TO_UI, /**< Call transfer */ 
+       VC_ENGINE_MSG_IND_SETUPCONFERENCE_TO_UI, /**< Setup conference */ 
+       VC_ENGINE_MSG_IND_BARRING_TO_UI, /**< Call barring */ 
+       VC_ENGINE_MSG_IND_WAITING_TO_UI, /**< Call waiting */ 
+       VC_ENGINE_MSG_IND_CUGINFO_TO_UI, /**< Closed User Group information */ 
+       VC_ENGINE_MSG_IND_SSNOTIFY_TO_UI, /**< SS nofify */ 
+       VC_ENGINE_MSG_IND_CALLINGNAMEINFO_TO_UI, /**< Caller name information */ 
+       VC_ENGINE_MSG_IND_REDIRECT_CNF_TO_UI, /**< Redirect confirmation */ 
+       VC_ENGINE_MSG_IND_ACTIVATECCBS_CNF_TO_UI, /**< Activate CCBS confirmation */ 
+       VC_ENGINE_MSG_IND_ACTIVATECCBS_USERINFO_TO_UI, /**< Activate CCBS user information */ 
+       VC_ENGINE_MSG_IND_AOC_TO_UI, /**< AOC indication */ 
+
+       /*Tapi Response Error Related Events */ 
+       VC_ENGINE_MSG_ERROR_OCCURED_TO_UI, /**< Error */ 
+       
+       /* Voicecall Engine triggered Event Type */ 
+       VC_ENGINE_MSG_ACTION_INCOM_FORCE_TO_UI, /**< If any outgoing data needs to be destroyed or cleaned up in the client during an incoming call, this event will be sent */ 
+       VC_ENGINE_MSG_ACTION_SAT_REQUEST_TO_UI, /**< SAT Request. This event will be sent to client , when SAT Engine requests any service from voicecall. Voicecall Engine holds the SAT engine related information, clients can get the information from the engine when it is required */ 
+       VC_ENGINE_MSG_ACTION_SAT_RESPONSE_TO_UI, /**< SAT Response */ 
+       VC_ENGINE_MSG_ACTION_CALL_END_HELD_RETREIVED_TO_UI, /**< If a held call is being retreived on end of an active call, this event will be emitted */ 
+       VC_ENGINE_MSG_ACTION_NO_ACTIVE_TASK_TO_UI, /**< This event will be published when engine becomes idle after executing/aborting a request from other apps - eg) if SAT request is not processed*/ 
+       VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI, /**< Response data from tapi for get tapi sound volume (with ringtone vol)*/ 
+       VC_ENGINE_MSG_SET_VOLUME_FROM_BT_TO_UI, /**< volume change form bt headset */ 
+       VC_ENGINE_MSG_HEADSET_STATUS_TO_UI, /**< Headset status to UI */ 
+       VC_ENGINE_MSG_EARJACK_STATUS_TO_UI, /**< Headset status to UI */ 
+       VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI, /**< Accept choice box to UI */ 
+       VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, /**< Create Message box */ 
+       VC_ENGINE_MSG_REDIAL_TO_UI, /* To send the redial message to the UI */ 
+       VC_ENGINE_MSG_STOPPED_RECORDING_TO_UI, /* Save file event sent to the UI */ 
+       VC_ENGINE_MSG_CREATE_NEWVOICEFILE_TO_UI, /* User input for voice_recording */ 
+       VC_ENGINE_MSG_MAX_TO_UI 
+} vc_engine_msgid_t;
+
+typedef enum _vc_engine_msgbox_string_id_t {
+       IDS_CALL_POP_CALL_IS_DIVERTED,
+       IDS_CALL_POP_CALLFAILED,
+       IDS_CALL_POP_CALLING_EMERG_ONLY,
+       IDS_CALL_POP_CALLNOTCALLOWED,
+       IDS_CALL_POP_CAUSE_WRONG_NUMBER,
+       IDS_CALL_POP_CHANGEOFFLINEMODETOCALL,
+       IDS_CALL_POP_DTMFSENDING_FAIL,
+       IDS_CALL_POP_FDNCALLONLY,
+       IDS_CALL_POP_HOLD_FAILED,
+       IDS_CALL_POP_HOLD_NOT_SUPPORTED,
+       IDS_CALL_POP_INCOMPLETE,
+       IDS_CALL_POP_JOIN_FAILED,
+       IDS_CALL_POP_JOIN_NOT_SUPPORTED,
+       IDS_CALL_POP_OPERATION_REFUSED,
+       IDS_CALL_POP_PHONE_NOT_INITIALISED,
+       IDS_CALL_POP_REJECTED,
+       IDS_CALL_POP_SENDING,
+       IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE,
+       IDS_CALL_POP_SPLIT_FAILED,
+       IDS_CALL_POP_SPLIT_NOT_SUPPORTED,
+       IDS_CALL_POP_SWAP_FAILED,
+       IDS_CALL_POP_SWAP_NOT_SUPPORTED,
+       IDS_CALL_POP_TRANSFER_FAILED,
+       IDS_CALL_POP_TRANSFER_NOT_SUPPORTED,
+       IDS_CALL_POP_UNABLE_TO_RETRIEVE,
+       IDS_CALL_POP_UNAVAILABLE,
+       IDS_CALL_POP_UNHOLD_NOT_SUPPORTED,
+       IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL,
+       IDS_CALL_POP_WAITING_ACTIVE,
+       IDS_CALL_BODY_CALLENDED, 
+#ifdef PDIAL_SEND_DTMF
+       IDS_CALL_POP_INVALID_DTMF,
+       IDS_CALL_POP_DTMF_SENT, 
+#endif
+       IDS_CALL_MAX 
+} vc_engine_msgbox_string_id_t;
+
+
+typedef enum _vc_engine_end_cause_type_t {
+       VC_ENGINE_ENDCAUSE_CALL_ENDED, /**< Call ended */ 
+       VC_ENGINE_ENDCAUSE_CALL_DISCONNECTED, /**< Call disconnected */ 
+       VC_ENGINE_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED, /**< Service not allowed */ 
+       VC_ENGINE_ENDCAUSE_CALL_BARRED, /**< Call barred */ 
+       VC_ENGINE_ENDCAUSE_NO_SERVICE, /**< No Service */ 
+       VC_ENGINE_ENDCAUSE_NW_BUSY, /**< Network busy */ 
+       VC_ENGINE_ENDCAUSE_NW_FAILED, /**< Network failed */ 
+       VC_ENGINE_ENDCAUSE_NO_ANSWER, /**< No anwer from other party */ 
+       VC_ENGINE_ENDCAUSE_NO_CREDIT, /**< No credit available */ 
+       VC_ENGINE_ENDCAUSE_REJECTED, /**< Call rejected */ 
+       VC_ENGINE_ENDCAUSE_USER_BUSY, /**< user busy */ 
+       VC_ENGINE_ENDCAUSE_WRONG_GROUP, /**< Wrong group */ 
+       VC_ENGINE_ENDCAUSE_CALL_NOT_ALLOWED, /**< Call not allowed */ 
+       VC_ENGINE_ENDCAUSE_TAPI_ERROR, /**< Tapi error */ 
+       VC_ENGINE_ENDCAUSE_CALL_FAILED, /**< Call Failed */ 
+       VC_ENGINE_ENDCAUSE_NO_USER_RESPONDING, /**< User not responding */ 
+       VC_ENGINE_ENDCAUSE_USER_ALERTING_NO_ANSWER, /**< User Alerting No Answer */ 
+       VC_ENGINE_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE, /**< Circuit Channel Unavailable,Network is out of Order,Switching equipment congestion,Temporary Failure */ 
+       VC_ENGINE_ENDCAUSE_USER_UNAVAILABLE, /**< Called Party Rejects the Call */ 
+       VC_ENGINE_ENDCAUSE_INVALID_NUMBER_FORMAT, /**< Entered number is invalid or incomplete */ 
+       VC_ENGINE_ENDCAUSE_NUMBER_CHANGED, /**< Entered number has been changed */ 
+       VC_ENGINE_ENDCAUSE_UNASSIGNED_NUMBER, /**< Unassigned/Unallocated number*/ 
+       VC_ENGINE_ENDCAUSE_USER_DOESNOT_RESPOND, /**< Called Party does not respond*/ 
+       VC_ENGINE_ENDCAUSE_IMEI_REJECTED, /**< Called Party does not respond*/ 
+} vc_engine_end_cause_type_t;
+
+typedef struct {
+       int len;
+       int msg_id;
+} vc_engine_msg_hdr_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int contact_index;
+       int phone_type;
+       int brejected;
+       int brestricted;
+       int bpayphone;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       char call_name[VC_DISPLAY_NAME_LENGTH_MAX];
+       char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+       char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+} vc_engine_incoming_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int contact_index;
+       int phone_type;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       char call_name[VC_DISPLAY_NAME_LENGTH_MAX];
+       char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+       char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+} vc_engine_outgoing_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int end_cause_type;
+} vc_engine_normal_end_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int bt_status;
+} vc_engine_connected_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int bemergency;
+} vc_engine_outgoing_orig_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int end_cause_type;
+       int bauto_redial;
+} vc_engine_outgoing_end_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int end_cause_type;
+} vc_engine_outgoing_end_signal_play_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+       int end_cause_type;
+} vc_engine_redial_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int call_handle;
+} vc_engine_common_with_handle_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+} vc_engine_common_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int fwd_type;
+} vc_engine_ind_forward_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int ss_type;
+} vc_engine_ind_ssnotify_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int error_code;
+} vc_engine_error_occured_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int vol_alert_type;
+       int vol_level;
+} vc_engine_vol_resp_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int vol_level;
+} vc_engine_vol_set_from_bt_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int bstatus;
+} vc_engine_headset_status_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int bstatus;
+} vc_engine_earjack_status_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int choice;
+} vc_engine_accept_choice_box_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int string_id;
+       char diverted_num[VC_PHONE_NUMBER_LENGTH_MAX];
+} vc_engine_msg_box_type;
+
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       int type;
+       char saved_filename[VC_RECORD_FULL_FILE_PATH_LENGTH];
+} vc_engine_stopped_recording_type;
+
+#ifdef PDIAL_SEND_DTMF
+typedef struct {
+       vc_engine_msg_hdr_type hdr;
+       gboolean bstatus;
+       int string_id;
+       char display_string[VC_DISPLAY_NAME_LENGTH_MAX];
+} vc_engine_dtmf_ack_type;
+#endif
+
+typedef union {
+       vc_engine_msg_hdr_type hdr;
+       vc_engine_incoming_type incoming;
+       vc_engine_outgoing_type outgoing;
+       vc_engine_outgoing_orig_type outgoing_orig;
+       vc_engine_common_with_handle_type outgoing_alert;
+       vc_engine_connected_type connected;
+       vc_engine_normal_end_type normal_end;
+       vc_engine_common_with_handle_type incom_end;
+       vc_engine_common_with_handle_type incom_droped;
+       vc_engine_common_with_handle_type rejected_end;
+       vc_engine_outgoing_end_type outgoing_end;
+       vc_engine_outgoing_end_signal_play_type outgoing_end_signal_play;
+       vc_engine_common_with_handle_type outgoing_aborted;
+       vc_engine_common_with_handle_type dtmf_ack;
+       vc_engine_common_with_handle_type auto_redial_check;
+       vc_engine_common_type ss_held;
+       vc_engine_common_type ss_retreived;
+       vc_engine_common_type ss_swap;
+       vc_engine_common_type ss_setup_conf;
+       vc_engine_common_with_handle_type ss_split_conf;
+       vc_engine_common_type ss_transferred;
+       vc_engine_common_type ss_connnect_line_ind;
+       vc_engine_ind_forward_type ss_ind_forward;
+       vc_engine_common_type ss_ind_activate;
+       vc_engine_common_type ss_ind_hold;
+       vc_engine_common_type ss_ind_transfer;
+       vc_engine_common_type ss_ind_setupconference;
+       vc_engine_common_type ss_ind_barring;
+       vc_engine_common_type ss_ind_wating;
+       vc_engine_common_type ss_ind_cuginfo;
+       vc_engine_ind_ssnotify_type ss_ind_ssnotify;
+       vc_engine_common_type ss_ind_callingnameinfo;
+       vc_engine_common_type ss_ind_redirect_cnf;
+       vc_engine_common_type ss_ind_activateccbs_cnf;
+       vc_engine_common_type ss_ind_activatedccbs_userinfo;
+       vc_engine_common_type ss_ind_aoc;
+       vc_engine_error_occured_type error_occured;
+       vc_engine_vol_resp_type vol_resp;
+       vc_engine_vol_set_from_bt_type vol_set_from_bt;
+       vc_engine_headset_status_type headset_status;
+       vc_engine_earjack_status_type earjack_status;
+       vc_engine_accept_choice_box_type accept_choice_box;
+       vc_engine_msg_box_type msg_box;
+       vc_engine_redial_type redial;
+       vc_engine_stopped_recording_type stopped_recording;
+       vc_engine_common_type voice_record;
+       
+#ifdef PDIAL_SEND_DTMF
+       vc_engine_dtmf_ack_type dtmf_progress;
+#endif
+} vc_engine_msg_type;
+
+typedef enum {
+       VC_CALL_UI_ACCEPT_1,
+       VC_CALL_UI_ACCEPT_2 
+} voicecal_ui_accept_choice_t;
+
+typedef struct {
+       int len;
+       int msg_id;
+} vcui_msg_hdr_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+} vcui_common_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int call_handle;
+} vcui_common_with_handle_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int ans_type;
+} vcui_accept_with_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int vol_alert_type;
+} vcui_vol_get_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int vol_level;
+} vcui_tapi_vol_set_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int vol_level;
+} vcui_ringtone_vol_set_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       int manual_redial;
+} vcui_common_with_redial_type;
+
+typedef struct {
+       vcui_msg_hdr_type hdr;
+       char dtmf_number[2];
+} vcui_dtmf_type;
+
+typedef union {
+       vcui_msg_hdr_type hdr;
+       vcui_common_type accept;
+       vcui_accept_with_type accept_with_type;
+       vcui_common_type reject;
+       vcui_common_type end;
+       vcui_common_with_handle_type end_with_handle;
+       vcui_common_type end_all_calls;
+       vcui_common_type end_active_calls;
+       vcui_common_type end_held_calls;
+       vcui_common_type hold;
+       vcui_common_type unhold;
+       vcui_common_type swap;
+       vcui_common_type join;
+       vcui_common_with_handle_type split;
+       vcui_common_type transfer;
+       vcui_common_type spkon;
+       vcui_common_type spkoff;
+       vcui_common_type muteon;
+       vcui_common_type muteoff;
+       vcui_vol_get_type vol_get;
+       vcui_tapi_vol_set_type tapi_vol_set;
+       vcui_ringtone_vol_set_type ringtone_vol_set;
+       vcui_common_type headset_on;
+       vcui_common_type headset_off;
+       vcui_common_with_redial_type redial_type;
+       vcui_common_type redial_stop;
+       vcui_common_type record_stop;
+       vcui_common_type record_start;
+       vcui_dtmf_type dtmf;
+} vcui_msg_type;
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/call-engine/include/voice-call-engine.h b/call-engine/include/voice-call-engine.h
new file mode 100755 (executable)
index 0000000..643f27b
--- /dev/null
@@ -0,0 +1,437 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_ENGINE_H_
+#define _VOICE_CALL_ENGINE_H_
+
+#include <glib.h>
+#include "vc-core-engine-types.h"
+
+#define VCALL_SENSOR_NEAR      1
+#define VCALL_SENSOR_FAR       2
+
+/**
+ * Voicecall Engine API result values
+ */
+typedef enum _vcall_engine_api_result_t {
+       VCALL_ENGINE_API_FAILED = -1,
+       VCALL_ENGINE_API_SUCCESS,
+
+       VCALL_ENGINE_API_ACTIVE_CALL_EXIST,
+       VCALL_ENGINE_API_ACTIVE_AND_HELD_CALL_EXIST,
+
+       VCALL_ENGINE_API_CALLNOTALLOWED,
+       VCALL_ENGINE_API_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL,
+       VCALL_ENGINE_API_UNAVAILABLE,
+       VCALL_ENGINE_API_CHANGEOFFLINEMODETOCALL,
+       VCALL_ENGINE_API_CALLING_EMERG_ONLY,
+       VCALL_ENGINE_API_FDNCALLONLY,
+       VCALL_ENGINE_API_CALLFAILED,
+       VCALL_ENGINE_API_CALLENDED,
+       VCALL_ENGINE_API_SOS_CALL_ONLY_IN_NO_SIM_MODE,
+       VCALL_ENGINE_API_PHONE_NOT_INITIALISED,
+       VCALL_ENGINE_API_CAUSE_WRONG_NUMBER,
+
+       VCALL_ENGINE_API_DTMFSENDING_FAIL,
+       VCALL_ENGINE_API_HOLD_FAILED,
+       VCALL_ENGINE_API_UNABLE_TO_RETRIEVE,
+       VCALL_ENGINE_API_SWAP_FAILED,
+       VCALL_ENGINE_API_SPLIT_FAILED,
+       VCALL_ENGINE_API_JOIN_FAILED,
+       VCALL_ENGINE_API_TRANSFER_FAILED,
+       VCALL_ENGINE_API_SWAP_NOT_SUPPORTED,
+       VCALL_ENGINE_API_HOLD_NOT_SUPPORTED,
+       VCALL_ENGINE_API_UNHOLD_NOT_SUPPORTED,
+       VCALL_ENGINE_API_JOIN_NOT_SUPPORTED,
+       VCALL_ENGINE_API_SPLIT_NOT_SUPPORTED,
+       VCALL_ENGINE_API_TRANSFER_NOT_SUPPORTED,
+       VCALL_ENGINE_API_INCOMPLETE,
+
+       VCALL_ENGINE_API_NOT_ENOUGH_MEMORY_FOR_RECORDING,
+       VCALL_ENGINE_API_NO_CONNECTED_CALL_FOR_RECORDING,
+
+       VCALL_ERROR_MAX
+} vcall_engine_api_result_t;
+
+/** 
+ * This enum defines call answer types
+ */
+typedef enum _vcall_engine_answer_type_t {
+       VCALL_ENGINE_ANSWER_HOLD_ACTIVE_AND_ACCEPT = 1,                 /**< Puts the active call on hold and accepts the call (Only CONNECTED will be sent to client) */
+       VCALL_ENGINE_ANSWER_RELEASE_ACTIVE_AND_ACCEPT,  /**< Releases the active call and accept the call (END and CONNECTED will be sent to Client) */
+       VCALL_ENGINE_ANSWER_RELEASE_HOLD_AND_ACCEPT,    /**< Releases the active call and accept the call (END and  CONNECTED will be sent to client) */
+       VCALL_ENGINE_ANSWER_RELEASE_ALL_AND_ACCEPT              /**< Releases the all calls and accept the call (END and  CONNECTED will be sent to client) */
+} vcall_engine_answer_type_t;
+
+/** 
+ * This enum defines call release types
+ */
+typedef enum _vcall_engine_release_type_t {
+       VCALL_ENGINE_RELEASE_ALL_ACTIVE_CALLS,          /**< To end all available active calls*/
+       VCALL_ENGINE_RELEASE_ALL_HELD_CALLS,            /**< To end all available held calls*/
+       VCALL_ENGINE_RELEASE_ALL_CALLS,                                 /**< To end all available calls(active,held,incoming/outgoing*/
+} vcall_engine_release_type_t;
+
+/** 
+ * This enum defines call answer types
+ */
+typedef enum _vcall_engine_vol_type_t {
+       VCALL_ENGINE_VOL_TYPE_RINGTONE,         /**< ringtone volume*/
+       VCALL_ENGINE_VOL_TYPE_VOICE,            /**< voice volume*/
+       VCALL_ENGINE_VOL_TYPE_HEADSET           /**< headset volume*/
+} vcall_engine_vol_type_t;
+
+/**
+* This enumeration defines names of the on call audio status
+*/
+typedef enum _vcall_engine_audio_type_t {
+       VCALL_ENGINE_AUDIO_NONE,                                /**< none*/
+       VCALL_ENGINE_AUDIO_SPEAKER,                     /**< System LoudSpeaker Audio */
+       VCALL_ENGINE_AUDIO_RECEIVER,            /**< System receiver Audio */
+       VCALL_ENGINE_AUDIO_HEADSET,                     /**< System Headset Audio */
+       VCALL_ENGINE_AUDIO_EARJACK,                     /**< System Earjack Audio */
+       VCALL_ENGINE_AUDIO_MAX,
+} vcall_engine_audio_type_t;
+
+/**
+* This enumeration defines names of lcd control
+*/
+typedef enum _vcall_engine_lcd_control_t {
+       VCALL_ENGINE_LCD_OFF,           /**< LCD Off*/
+       VCALL_ENGINE_LCD_ON,            /**< LCD On */
+       VCALL_ENGINE_LCD_ON_LOCK,               /**< LCD ON lock */
+       VCALL_ENGINE_LCD_ON_UNLOCK,             /**< LCD ON unlock */
+       VCALL_ENGINE_LCD_MAX,
+} vcall_engine_lcd_control_t;
+
+typedef enum {
+       VC_LCD_OFF = 1,
+       VC_LCD_ON,
+       VC_LCD_ON_LOCK,
+       VC_LCD_ON_UNLOCK,
+} voicecall_lcd_control_t;
+
+/** 
+ * This struct provides a structure for call setup info data.
+ */
+typedef struct _vcall_engine_setup_info_t {
+       int contact_index;
+       int storage_type;
+       int phone_type;
+       int bemergency;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       char call_name[VC_DISPLAY_NAME_LENGTH_MAX];
+       char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+       char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];
+} vcall_engine_setup_info_t;
+
+/** 
+ * This struct provides a structure for sat setup call info data.
+ */
+typedef struct _vcall_engine_sat_setup_call_info_t {
+       int command_id;                                                         /**<Proactive Command Number sent by USIM*/
+       int command_qualifier;  /**<call type*/
+       char disp_text[500 + 1];        /**<character data*/
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];;                                                     /**<call number*/
+       unsigned int duration;                                          /**<maximum repeat duration*/
+} vcall_engine_sat_setup_call_info_t;
+
+/** 
+ * This struct provides a structure for call incoming info data.
+ */
+typedef struct _vcall_engine_incoming_info_t {
+       int call_handle;
+       int call_type;
+       int cli_presentation_indicator;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       int calling_name_mode;
+       char calling_name[VC_PHONE_NAME_LENGTH_MAX];
+       char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
+       char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
+       int cli_cause;
+       int bfwded;
+       int active_line;
+} vcall_engine_incoming_info_t;
+
+/**< This is the prototype of the client callback function  */
+typedef gboolean(*vcall_engine_app_cb) (int event, void *pdata, void *puser_data);
+
+gboolean vcall_engine_send_event_to_client(int event, void *pdata);
+
+/**
+ * This function initialize voice call engine.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_init(vcall_engine_app_cb pcb_func, void *pusr_data);
+
+/**
+ * This function processes mo nomal call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_normal_call(char *number, int ct_index, gboolean b_download_call);
+
+/**
+ * This function processes mo emergency call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_emergency_call(char *number);
+
+int vcall_engine_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info);
+
+/**
+ * This function processes incoming call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_incoming_call(vcall_engine_incoming_info_t *incoming_call_info);
+
+/**
+ * This function answers an incoming call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+*/
+int vcall_engine_answer_call(void);
+
+/**
+ * This function answers an incoming call  according to the given type
+ *
+ * @return     int     API Result Code.
+ * @param[in]          answer_type             answer type
+ */
+int vcall_engine_answer_call_by_type(vcall_engine_answer_type_t answer_type);
+
+/**
+ * This function cancel outgoing call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_cancel_call(void);
+
+/**
+ * This function reject incoming call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_reject_call(void);
+
+/**
+ * This function release a active or held call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_release_call(void);
+
+/**
+ * This function release a call by handle
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     call_handle
+ */
+int vcall_engine_release_call_by_handle(int call_handle);
+
+/**
+ * This function release calls by type
+ *
+ * @return     int     API Result Code.
+ * @param[in]          release_type release_type
+ */
+int vcall_engine_release_call_by_type(vcall_engine_release_type_t release_type);
+
+/**
+ * This function processes hold/retrive/swap calls.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_process_hold_call(void);
+
+ /**
+ * This function processes in call SS code..
+ *
+ * @return     NONE
+ * @param[in]          none
+ */
+void vcall_engine_process_incall_ss(char *number);
+
+/**
+ * This function sets up a conference calls
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_join_call(void);
+
+/**
+ * This function make a private call in conference calls.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     call_handle
+ */
+int vcall_engine_split_call(int call_handle);
+
+/**
+ * This function transfers the call from active call to the held call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     call_handle
+ */
+int vcall_engine_transfer_call(void);
+
+/**
+ * This function processed loud speaker.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     bstatus
+ */
+int vcall_engine_process_loudspeaker(int bstatus);
+
+/**
+ * This function processed voice mute status.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     bstatus
+ */
+int vcall_engine_process_voice_mute(int bstatus);
+
+/**
+ * This function gets the volume level
+ *
+ * @return     int     API Result Code.
+ * @param[in]          vcall_engine_vol_type_t vol_type
+ */
+int vcall_engine_get_volume_level(vcall_engine_vol_type_t vol_type);
+
+/**
+ * This function sets the volume level
+ *
+ * @return     int     API Result Code.
+ * @param[in]          vcall_engine_vol_type_t vol_type
+ * @param[in]          int vol_level
+ */
+int vcall_engine_set_volume_level(vcall_engine_vol_type_t vol_type, int vol_level);
+
+/**
+ * This function stop alert
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_stop_alert(void);
+
+/**
+ * This function mute alert.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_mute_alert(void);
+
+/**
+ * This function process auto redial.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int bstatus
+ */
+int vcall_engine_process_auto_redial(int bstatus);
+
+/**
+ * This function process voice record.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int bstatus
+ */
+int vcall_engine_process_voice_record(int bstatus);
+
+/**
+ * This function send the DTMF number
+ *
+ * @return     int     API Result Code.
+ * @param[in]          char* dtmf_number
+ */
+int vcall_engine_send_dtmf_number(char *dtmf_number);
+
+/**
+ * This function processed sound path
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int     sound_path
+ */
+int vcall_engine_change_sound_path(vcall_engine_audio_type_t sound_path);
+
+/**
+ * This function get sound path
+ *
+ * @return     int     API Result Code.
+ * @param[out]         int     sound_path
+ */
+int vcall_engine_get_sound_path(int *sound_path);
+
+int vcall_engine_set_to_default();
+
+/**
+ * This function retrieves the core state instance
+ *
+ * @return     instance of the core state
+ * @param[in]          void
+ */
+gpointer vcall_engine_get_core_state(void);
+
+/**
+ * This function is interface to call-utility to perform string copy
+ *
+ * @return     instance of the core state
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]          buf_count       Size of Target Buffer
+ * @param[in]          pstring         Source String
+ */
+gboolean vcall_engine_util_strcpy(char *pbuffer, int buf_count, const char *pstring);
+
+/**
+ * This function returns the number of groups
+ *
+ * @param[in]          pcount          count of the groups
+ */
+gboolean vcall_engine_get_group_count(int *pcount);
+
+/**
+ * This function is interface to call-utility to perform string copy
+ *
+ * @return     instance of the core state
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]  time            time
+ */
+char *vcall_engine_util_get_date_time(time_t time);
+
+/**
+ * This function is force reset all engine status.
+ *
+ * @return     void
+ * @param[in] void
+ */
+void vcall_engine_force_reset(void);
+#endif                         /* _VOICE_CALL_ENGINE_H_ */
diff --git a/call-engine/include/voice-call-service.h b/call-engine/include/voice-call-service.h
new file mode 100755 (executable)
index 0000000..e831bec
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_SERVICE_H_
+#define _VOICE_CALL_SERVICE_H_
+
+#include "voice-call-core.h"
+#include "voice-call-engine-msg.h"
+
+/**
+* This struct defines a contact record information for voice-call
+*/
+typedef struct {
+       unsigned int ct_index;                                          /**<Specifies the index for a record  */
+       int phone_type;                                                         /**<Specified the phone type */
+       char display_name[VC_DISPLAY_NAME_LENGTH_MAX];                                    /**<Specifies the display name character data of a record in the contact table. */
+       char caller_id_path[VC_IMAGE_PATH_LENGTH_MAX];                                    /**<CTS_IMG_NORMAL><Specifies the caller id path of a record in the contact table. */
+       char caller_full_id_path[VC_IMAGE_PATH_LENGTH_MAX];                                    /**<CTS_IMG_FULL>*/
+       char ring_tone[VC_RINGTONE_PATH_LENGTH_MAX];                                            /**<Specifies the ring tone character data of a record in the contact table. */
+} voicecall_contact_info_t;
+
+/**
+ * This function on the loud speaker state
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_loudspeaker_on(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function off the loud speaker state
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_loudspeaker_off(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function is mute on
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_mute_status_on(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function is mute off
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_mute_status_off(call_vc_core_state_t *pcall_core);
+
+/**
+ * This function set volume level.
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ * @param[in]          vol_alert_type                  volume alert type
+ * @param[in]          volume_level                    volume level to be set
+ */
+gboolean voicecall_service_set_volume(call_vc_core_state_t *pcall_core, voicecall_snd_volume_alert_type_t vol_alert_type, int volume_level);
+#endif
diff --git a/call-engine/include/voice-call-sound.h b/call-engine/include/voice-call-sound.h
new file mode 100755 (executable)
index 0000000..e67ae0f
--- /dev/null
@@ -0,0 +1,387 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_SOUND_H_
+#define _VOICE_CALL_SOUND_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+#include <mm_message.h>
+#include <mm_player.h>
+#include <mm_sound.h>
+#include <mm_sound_private.h>
+#include <mm_types.h>
+#include <mm_error.h>
+#include <glib.h>
+
+#define VOICE_CALL_SND_RINGTONE_PATH_LEN                       256     /**<Max File length for Ringtone */
+
+/**
+ * This enum defines the sound actions with respect to the sound conflict notifications
+ */
+typedef enum _voicecall_snd_status_t {
+       VOICE_CALL_SND_STATUS_NONE,             /**<Initial State */
+       VOICE_CALL_AND_STATUS_ALTERNATE_PLAY,   /**<Alternate Play can be done */
+       VOICE_CALL_SND_STATUS_READY,            /**<Sound Player Prepared, ready to play */
+       VOICE_CALL_SND_STATUS_PROCESSED,        /**< Intial Sound Play Started */
+       VOICE_CALL_SND_STATUS_STOP,             /**< The Sound is stopped by the application */
+       VOICE_CALL_SND_STATUS_PLAY,             /**< Specifies that the sound is currently being played */
+       VOICE_CALL_SND_STATUS_PAUSE,            /**< It specifies that the sound is currently paused */
+       VOICE_CALL_SND_STATUS_STOPPED           /**< The sound is stopeed by other application */
+} voicecall_snd_status_t;
+
+/**
+* This enumeration defines names of the on call audio status
+*/
+typedef enum _voicecall_snd_audio_type_t {
+       VOICE_CALL_AUDIO_NONE,                                  /**< none */
+       VOICE_CALL_AUDIO_SPEAKER,                       /**< System LoudSpeaker Audio */
+       VOICE_CALL_AUDIO_RECEIVER,                      /**< System receiver Audio */
+       VOICE_CALL_AUDIO_HEADSET,                       /**< System Headset Audio */
+       VOICE_CALL_AUDIO_EARJACK,                       /**< System Earjack Audio */
+       VOICE_CALL_AUDIO_MAX,
+} voicecall_snd_audio_type_t;
+
+#ifdef _NEW_SND_
+/**
+* This enumeration defines names of the on call sound path status
+*/
+typedef enum _voicecall_snd_path_t {
+       VOICE_CALL_SND_PATH_NONE,                                       /**< none */
+       VOICE_CALL_SND_PATH_SPEAKER,                    /**< System LoudSpeaker path */
+       VOICE_CALL_SND_PATH_RECEIVER,                   /**< System Receiver path */
+       VOICE_CALL_SND_PATH_BT,                         /**< System BT Headset path */
+       VOICE_CALL_SND_PATH_EARJACK,                    /**< System Earjack path */
+       VOICE_CALL_SND_PATH_MAX,
+} voicecall_snd_path_t;
+#endif
+
+/**
+* This enumeration defines voice recorder status
+*/
+typedef enum __voicecall_snd_record_status_t {
+       VOICE_CALL_REC_NONE,
+       VOICE_CALL_REC_ON,
+       VOICE_CALL_REC_PAUSED
+} voicecall_snd_record_status_t;
+
+/**
+* This enumeration defines volume alert type
+*/
+typedef enum __voicecall_snd_volume_alert_type_t {
+       VOICE_CALL_VOL_TYPE_RINGTONE,
+       VOICE_CALL_VOL_TYPE_VOICE,
+       VOICE_CALL_VOL_TYPE_HEADSET
+} voicecall_snd_volume_alert_type_t;
+
+/**
+* This enumeration defines volume level to be used
+*/
+typedef enum __voicecall_snd_volume_level_t {
+       VOICE_CALL_VOL_LEVEL_1 = 1,
+       VOICE_CALL_VOL_LEVEL_2,
+       VOICE_CALL_VOL_LEVEL_3,
+       VOICE_CALL_VOL_LEVEL_4,
+       VOICE_CALL_VOL_LEVEL_5,
+       VOICE_CALL_VOL_LEVEL_6
+} voicecall_snd_volume_level_t;
+
+typedef enum __voicecall_snd_play_type_t {
+       VOICE_CALL_PLAY_TYPE_RINGTONE,
+       VOICE_CALL_PLAY_TYPE_SIGNAL,
+       VOICE_CALL_PLAY_TYPE_MAX
+} voicecall_snd_play_type_t;
+
+typedef enum __voicecall_snd_signal_type_t {
+       VOICE_CALL_SIGNAL_NONE,
+       VOICE_CALL_SIGNAL_USER_BUSY_TONE,
+       VOICE_CALL_SIGNAL_WRONG_NUMBER_TONE,
+       VOICE_CALL_SIGNAL_CALL_FAIL_TONE,
+       VOICE_CALL_SIGNAL_NW_CONGESTION_TONE,
+       VOICE_CALL_SIGNAL_MAX,
+} voicecall_snd_signal_type_t;
+
+typedef enum _voicecall_snd_effect_type_t {
+       VOICE_CALL_SND_EFFECT_CALL_CONNECT,
+       VOICE_CALL_SND_EFFECT_CALL_DISCONNECT,
+       VOICE_CALL_SND_EFFECT_CALL_MINUTE_MINDER,
+       VOICE_CALL_SND_EFFECT_MAX
+} voicecall_snd_effect_type_t;
+
+typedef enum __voicecall_snd_mm_path_type_t {
+       VOICE_CALL_MM_NONE,
+       VOICE_CALL_MM_ALERT_TONE,       /*When playing the in call alert tones like call end tone, call connected tone */
+       VOICE_CALL_MM_RING_TONE,        /*When playing the incoming call ringtone */
+       VOICE_CALL_MM_SECOND_CALL_TONE, /*When playing the second incoming call tone */
+       VOICE_CALL_MM_SIGNAL_TONE,      /*When playing the outgoing call fail signal tone */
+       VOICE_CALL_MM_RECORD,   /*When playing the voice recording beep during call */
+       VOICE_CALL_MM_VOICE,    /*During outgoing call and connected call */
+       VOICE_CALL_MM_RESET,    /*This should be used when app is closed after call */
+       VOICE_CALL_MM_MUTE_PLAY,        /*This should be used when ringtone needs to be played when mute profile is enabled */
+       VOICE_CALL_MM_MAX
+} voicecall_snd_mm_path_type_t;
+
+typedef enum __voicecall_snd_cm_status {
+       VOICE_CALL_SND_NONE,
+       VOICE_CALL_SND_VIDEOCALL,
+       VOICE_CALL_SND_OTHER,
+       VOICE_CALL_SND_MAX
+} voicecall_snd_cm_status_type_t;
+
+typedef void (*voicecall_snd_callback) (gpointer pdata);
+
+/**
+ * This enum defines sound managers components
+ */
+typedef struct __voicecall_snd_mgr_t {
+       MMHandleType pmm_player;                /**< Handle to MM Player */
+       system_audio_route_t backup_route_policy;
+       int vibration_handle;                                    /**< Handle to System Vibration Module*/
+
+       gboolean bsound_cm_state;
+
+       voicecall_snd_status_t ringtone_sound_status;           /**< Holds a current sound play status for Ringtone player*/
+#ifdef _NEW_SND_
+       voicecall_snd_path_t old_snd_path;                              /**< Holds a old sound path status*/ 
+       voicecall_snd_path_t current_snd_path;                          /**< Holds a current sound path status*/ 
+#endif
+       void *pcall_core;                                       /**< Holds a pointer to the voicecall core Handle */
+       gboolean bcall_audio_status[VOICE_CALL_AUDIO_MAX];                /**< Holds of status of the #voicecall_snd_audio_type_t*/
+       gboolean bmute_status;                  /**< voice mute*/
+
+       gboolean bincreasingmelody;                             /**<TRUE - Increasing Melody Activated, FALSE - Otherwise*/
+       int increment_melody_value;                             /**<specifies the current level of increasing melody*/
+       gboolean bvibration;                                    /**<TRUE - Vibration activated, FALSE -otherwise*/
+       gboolean bvibration_then_melody;                        /**<TRUE - Vibration then meldody is activated, FALSE -otherwise*/
+       gboolean balternate_play;
+       gboolean bmute_play;                                    /**<TRUE - Player created for playing the tone during mute play*/
+       int balternate_play_count;
+
+       char ring_tone[VOICE_CALL_SND_RINGTONE_PATH_LEN];                       /**< Holds the Path of the Ringtone to be played */
+       int current_playing_call_handle;                        /**< Holds the Call Handle of Currently Playing Call */
+       int incoming_call_handle;                       /**< Holds the Call Handle of Incoming Call */
+       int vibalert_onoff;                                     /**< On/Off Counter for periodic Vibration */
+
+       int pmm_signal_player;                                  /**< Handle to MM Signal Player */
+       voicecall_snd_signal_type_t signal_type;                /**< Signal Type */
+       char signal_tone[VOICE_CALL_SND_RINGTONE_PATH_LEN];                     /**< Holds the Path of the Signal tone to be played */
+       voicecall_snd_status_t signal_sound_status;             /**< Holds a current sound play status for Signal player*/
+
+       voicecall_snd_mm_path_type_t current_path_type;
+
+       int mmfsoundplay_handle;
+       int mmfalternateplay_handle;
+
+       int settings_sound_status;
+       int settings_vib_status;
+
+       voicecall_snd_callback psignal_play_end_cb;             /**< Callback called after Sound Play ends */
+       gpointer psignal_play_end_cb_data;                      /**< Sound Play end callback data */
+
+       voicecall_snd_status_t effect_tone_status;
+
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+       guint ring_elvator_timerid;
+#endif
+} voicecall_snd_mgr_t;
+
+ /**
+ * This function initializes the sound functionalties required by the Application
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[out] papp_snd                        Handle to the Sound Manager
+ */
+gboolean voicecall_snd_init(void *pcall_core, voicecall_snd_mgr_t **papp_snd);
+
+/**
+ * This function stops the sound alert
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_stop_alert(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function mutes the sound play
+ *
+ * @return             TRUE - Success, FALSE - Otherwise
+ * @param[in]  papp_snd                        Handle to Sound Manager
+ */
+gboolean voicecall_snd_mute_alert(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function stops the alternate sound play
+ *
+ * @return             void
+ * @param[in]  papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_stop_altenate_sound(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function plays call sound
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+gboolean voicecall_snd_play_signal(voicecall_snd_mgr_t *papp_snd, voicecall_snd_callback pplay_end_callback, void *pcallback_data);
+gboolean voicecall_snd_set_play_end_callback(voicecall_snd_mgr_t *papp_snd, voicecall_snd_callback pplay_end_callback, void *pcallback_data);
+gboolean voicecall_snd_is_signal_playing(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function stops the sound alert
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_stop_signal(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function sets the end signal of the given end cause type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          end_cause_type          Type of the end cause
+ */
+void voicecall_snd_set_signal_type(voicecall_snd_mgr_t *papp_snd, voicecall_snd_signal_type_t signal_type);
+
+/**
+ * This function plays the effect tone accordign to the given effect type
+ *
+ * @return             void
+ * @param[in]  papp_snd        Handle to Sound Manager
+ * @param[in]  effect_type     Type of effect tone to be played
+ */
+gboolean voicecall_snd_play_effect_tone(voicecall_snd_mgr_t *papp_snd, int effect_type);
+
+/**
+ * This function stops the effect tone play
+ *
+ * @return             void
+ * @param[in]  papp_snd        Handle to Sound Manager
+ */
+void voicecall_snd_stop_effect_tone(voicecall_snd_mgr_t *papp_snd);
+
+/**
+ * This function changes the mm sound path according to the current status
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_change_mm_path(voicecall_snd_mgr_t *papp_snd, voicecall_snd_mm_path_type_t mm_path_type);
+
+/**
+ * This function changes the sound path according to the current status
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_change_path(voicecall_snd_mgr_t *papp_snd);
+void voicecall_snd_change_path_real(voicecall_snd_mgr_t *papp_snd);
+
+void voicecall_snd_change_modem_path(voicecall_snd_mgr_t *papp_snd);
+
+#ifdef _NEW_SND_
+/**
+ * This function sets the status of the given call audio type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type          Type of the Device to be changed
+ * @param[in]          status                          Status, TRUE - Enable, FALSE -Disable
+ */
+void voicecall_snd_set_path_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_path_t path);
+
+voicecall_snd_path_t voicecall_snd_get_path_status(voicecall_snd_mgr_t *papp_snd);
+#else
+/**
+ * This function sets the status of the given call audio type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type          Type of the Device to be changed
+ * @param[in]          status                          Status, TRUE - Enable, FALSE -Disable
+ */
+void voicecall_snd_set_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_audio_type_t snd_audio_type, gboolean status);
+
+/**
+ * This function returns the current status of the given call audio type
+ *
+ * @return             Returns TRUE if given call audio type is enables or FALSE otherwise
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type          Type of the Device to be changed
+ */
+gboolean voicecall_snd_get_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_audio_type_t snd_audio_type);
+#endif
+
+/**
+* This function sets the volume level for the given volume alert type
+*
+* @return              void
+* @param[in]   papp_snd                Handle to Sound Manager
+* @param[in]   vol_alert_type  volume alert type #voicecall_snd_volume_alert_type_t
+* @param[in]   volume_level    volume level to be set
+*/
+void voicecall_snd_set_volume(voicecall_snd_mgr_t *papp_snd, voicecall_snd_volume_alert_type_t vol_alert_type, int volume_level);
+
+/**
+ * This function retreives the volume according to the given volume alert type
+ *
+ * @return             current volume level
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          vol_alert_type          volume alert type #voicecall_snd_volume_alert_type_t
+ */
+int voicecall_snd_get_volume(voicecall_snd_mgr_t *papp_snd, voicecall_snd_volume_alert_type_t vol_alert_type);
+
+/**
+ * This function retreives the volume according to the given volume alert type
+ *
+ * @return             return TRUE if alternate playing
+ * @param[in]          papp_snd                Handle to Sound Manager
+ */
+gboolean voicecall_snd_get_alternate_play(voicecall_snd_mgr_t *papp_snd);
+
+/**
+* This function registers the application with the sound conflict manager
+*
+* @return                      void
+* @param[in]           papp_snd                Handle to Sound Manager
+*/
+void voicecall_snd_register_cm(voicecall_snd_mgr_t *papp_snd);
+
+/**
+* This function unregisters the application from the sound conflict manager
+*
+* @return                      void
+* @param[in]           papp_snd                Handle to Sound Manager
+*/
+void voicecall_snd_unregister_cm(voicecall_snd_mgr_t *papp_snd);
+
+void voicecall_snd_prepare_alert(voicecall_snd_mgr_t *papp_snd, int call_handle);
+void voicecall_snd_play_alert(voicecall_snd_mgr_t *papp_snd);
+
+void voicecall_snd_set_to_defaults(voicecall_snd_mgr_t *papp_snd);
+
+gboolean voicecall_snd_is_effect_playing(voicecall_snd_mgr_t *papp_snd);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/call-engine/sounds/01_Minimal_tone.mp3 b/call-engine/sounds/01_Minimal_tone.mp3
new file mode 100755 (executable)
index 0000000..b85ba4d
Binary files /dev/null and b/call-engine/sounds/01_Minimal_tone.mp3 differ
diff --git a/call-engine/sounds/03_Call_connect.wav b/call-engine/sounds/03_Call_connect.wav
new file mode 100755 (executable)
index 0000000..22efdba
Binary files /dev/null and b/call-engine/sounds/03_Call_connect.wav differ
diff --git a/call-engine/sounds/04_Call_disconnect.wav b/call-engine/sounds/04_Call_disconnect.wav
new file mode 100755 (executable)
index 0000000..626ad40
Binary files /dev/null and b/call-engine/sounds/04_Call_disconnect.wav differ
diff --git a/call-engine/sounds/Call_BusyTone.wav b/call-engine/sounds/Call_BusyTone.wav
new file mode 100755 (executable)
index 0000000..9294fd3
Binary files /dev/null and b/call-engine/sounds/Call_BusyTone.wav differ
diff --git a/call-engine/sounds/Call_ErrorTone.wav b/call-engine/sounds/Call_ErrorTone.wav
new file mode 100755 (executable)
index 0000000..20a1f08
Binary files /dev/null and b/call-engine/sounds/Call_ErrorTone.wav differ
diff --git a/call-engine/sounds/Call_NwCongestionTone.wav b/call-engine/sounds/Call_NwCongestionTone.wav
new file mode 100755 (executable)
index 0000000..4fc73a2
Binary files /dev/null and b/call-engine/sounds/Call_NwCongestionTone.wav differ
diff --git a/call-engine/sounds/Call_RecordStart.wav b/call-engine/sounds/Call_RecordStart.wav
new file mode 100755 (executable)
index 0000000..ee974ca
Binary files /dev/null and b/call-engine/sounds/Call_RecordStart.wav differ
diff --git a/call-engine/sounds/Call_WaitingTone.wav b/call-engine/sounds/Call_WaitingTone.wav
new file mode 100755 (executable)
index 0000000..9e2e31c
Binary files /dev/null and b/call-engine/sounds/Call_WaitingTone.wav differ
diff --git a/call-engine/voice-call-bt.c b/call-engine/voice-call-bt.c
new file mode 100755 (executable)
index 0000000..653dcbe
--- /dev/null
@@ -0,0 +1,978 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vc-core-util.h"
+#include "vc-core-engine-status.h"
+#include "vc-core-engine-group.h"
+#include "voice-call-core.h"
+#include "voice-call-sound.h"
+#include "voice-call-bt.h"
+#include "vconf.h"
+#include "vconf-keys.h"
+#include "voice-call-dbus.h"
+#include "voice-call-engine-msg.h"
+
+/* For Debug Information, name string constant */
+/* CALL --> BT */
+static char *gszbt_res_event[BT_AG_RES_CALL_SWAPPED + 1] = {
+       "BT_AG_RES_CALL_ORIG",
+       "BT_AG_RES_CALL_INCOM",
+       "BT_AG_RES_CALL_CONNECT",
+       "BT_AG_RES_CALL_END",
+       "BT_AG_RES_CALL_HOLD",
+       "BT_AG_RES_CALL_RETRIEVE",
+       "BT_AG_RES_CALL_JOINED",
+       "BT_AG_RES_SPK_GAIN",
+       "BT_AG_RES_MIC_GAIN",
+       "BT_AG_RES_CALL_REMOTE_RINGING",
+       "BT_AG_RES_SWITCH_TO_HEADSET",
+       "BT_AG_RES_SWITCH_TO_PHONE",
+       "BT_AG_RES_CALL_STATUS",
+       "BT_AG_RES_HEADSET_VOL",
+       "BT_AG_RES_CALL_SWAPPED"
+};
+
+/* CALL <-- BT */
+static char *gszbt_req_event[BT_AG_REQ_CALL_STATUS + 1] = {
+       "BT_AG_REQ_CONNECT",
+       "BT_AG_REQ_CONNECT_ERROR",
+       "BT_AG_REQ_DISCONNECT",
+       "BT_AG_REQ_SPK_GAIN",
+       "BT_AG_REQ_MIC_GAIN",
+       "BT_AG_REQ_CALL_ACCEPTED",
+       "BT_AG_REQ_CALL_REJECT",
+       "BT_AG_REQ_CALL_END",
+       "BT_AG_REQ_CALL_HOLD",
+       "BT_AG_REQ_CALL_RETRIEVE",
+       "BT_AG_REQ_BUTTON_PRESSED",
+       "BT_AG_REQ_CALL_REDIAL",
+       "BT_AG_REQ_CALL_2_SEND",
+       "BT_AG_REQ_CALL_3_SEND",
+       "BT_AG_REQ_CALL_0_SEND",
+       "BT_AG_REQ_CALL_1_SEND",
+       "BT_AG_REQ_HEADSET_VOL",
+       "BT_AG_REQ_SWITCH_TO_HEADSET",
+       "BT_AG_REQ_SWITCH_TO_PHONE",
+       "BT_AG_REQ_DTMF",
+       "BT_AG_REQ_CALL_STATUS"
+};
+
+#ifdef _NEW_SND_
+static gboolean b_user_rqst_path_change = FALSE;
+#endif
+static int __vc_bt_converted_bt_vol_to_voice_vol(int bt_vol_level);
+static void __vc_bt_handle_connectivity_event(call_vc_core_state_t *pcall_core, gboolean bt_headset_connect_status);
+
+static int __vc_bt_converted_bt_vol_to_voice_vol(int bt_vol_level)
+{
+       int converted_vol_level = -1;
+
+       if (bt_vol_level <= 0) {
+               converted_vol_level = 1;
+       } else if (bt_vol_level > 15) {
+               converted_vol_level = 15;
+       } else {
+               converted_vol_level = bt_vol_level;
+       }
+       return converted_vol_level;
+}
+
+static void __vc_bt_handle_connectivity_event(call_vc_core_state_t *pcall_core, gboolean bt_headset_connect_status)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_core != NULL);
+
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bt_headset_connect_status = %d \n", bt_headset_connect_status);
+       if (FALSE == bt_headset_connect_status) {
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING, FALSE);
+       }
+
+       if (bt_headset_connect_status == pcall_core->bt_connected) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No change in state, Ignoring Event \n");
+               CALL_ENG_DEBUG(ENG_DEBUG, "bt_headset_connect_status = %d \n", bt_headset_connect_status);
+               return;
+       }
+       pcall_core->bt_connected = bt_headset_connect_status;
+
+       if (TRUE == pcall_core->bt_connected) {
+               /*Check the Call Status and Send Response event to the Bluetooth */
+               int call_handle = -1;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "BT connected, Not changing the sound status \n");
+               /*  Headset is connected, Set the Sound Status to Headset
+                  and change the path only incase of mocall and connected call */
+
+               _vc_core_engine_status_get_call_handle_bytype(pcall_engine, VC_INCOMING_CALL, &call_handle);
+               if (call_handle != -1) {
+                       call_vc_call_objectinfo_t callobject_info;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call Exists, call handle = %d \n", call_handle);
+
+                       voicecall_core_get_call_object(pcall_engine, call_handle, &callobject_info);
+
+                       /*Incoming Call Exists */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_INCOM, call_handle, callobject_info.tel_number);
+                       return;
+               }
+
+               _vc_core_engine_status_get_call_handle_bytype(pcall_engine, VC_OUTGOING_CALL, &call_handle);
+               if (call_handle != -1) {
+                       int io_state = VC_INOUT_STATE_NONE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing Call Exists, call handle = %d \n", call_handle);
+                       _vc_core_engine_status_get_engine_iostate(pcall_engine, &io_state);
+
+                       switch (io_state) {
+                       case VC_INOUT_STATE_OUTGOING_WAIT_ORIG:
+                       case VC_INOUT_STATE_OUTGOING_WAIT_ALERT:        /*Fall Through */
+                               {
+                                       call_vc_call_objectinfo_t callobject_info;
+
+                                       voicecall_core_get_call_object(pcall_engine, call_handle, &callobject_info);
+
+                                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_ORIG, call_handle, callobject_info.tel_number);
+                               }
+                               break;
+                       case VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED:
+                               {
+                                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_REMOTE_RINGING, call_handle, NULL);
+#ifdef _NEW_SND_
+                                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_BT);
+                                       _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+#endif
+                               }
+                               break;
+                       default:
+                               {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Engine not in desired IO State, Current IO State: %d \n", io_state);
+                                       return;
+                               }
+                               break;
+                       }
+
+                       return;
+               }
+
+               _vc_core_engine_status_get_call_handle_bytype(pcall_engine, VC_CONNECTED_CALL, &call_handle);
+               if (call_handle != -1) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Connected Call Exists, call handle = %d \n", call_handle);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT connected, Not changing the path in bt connect event\n");
+
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_CONNECT, call_handle, NULL);
+               }
+
+       } else {
+               vc_engine_headset_status_type event_data;
+
+#ifdef _NEW_SND_
+               if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_BT) {
+                       if (_voicecall_dvc_get_earjack_connected() == TRUE) {
+                               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_EARJACK);
+                       } else {
+                               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);
+                       }
+                       
+                       /* Headset is disconnected, so voice sound path should be changed to phone. */
+                       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_HEADSET, FALSE);
+                       if (voicecall_core_is_incoming_call_exists(pcall_engine)) {
+                               if (pcall_core->papp_snd->bmute_play == TRUE) {
+                                       voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_MUTE_PLAY);
+                               } else {
+                                       voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RING_TONE);
+                               }
+                       } else {
+                               if (voicecall_core_is_outgoing_call_exists(pcall_engine) || (voicecall_core_is_connected_call_exist(pcall_engine))) {
+                                       voicecall_snd_change_path(pcall_core->papp_snd);
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_ERR, "No valid calls, not changing the path \n");
+                               }
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_ERR, "BT disconnected when path is not on BT. Do NOT change path. only update UI");                  
+               }
+               
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = FALSE;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_HEADSET_STATUS_TO_UI, (void *)&event_data);
+#else
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = FALSE;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_HEADSET_STATUS_TO_UI, (void *)&event_data);
+
+               /* Headset is disconnected, so voice sound path should be changed to phone. */
+               voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_HEADSET, FALSE);
+               if (voicecall_core_is_incoming_call_exists(pcall_engine)) {
+                       if (pcall_core->papp_snd->bmute_play == TRUE) {
+                               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_MUTE_PLAY);
+                       } else {
+                               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RING_TONE);
+                       }
+               } else {
+                       if (voicecall_core_is_outgoing_call_exists(pcall_engine) || (voicecall_core_is_connected_call_exist(pcall_engine))) {
+                               voicecall_snd_change_path(pcall_core->papp_snd);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "No valid calls, not changing the path \n");
+                       }
+               }
+#endif
+       }
+
+}
+
+gboolean _vc_bt_switch_headset_path(call_vc_core_state_t *pcall_core, gboolean bheadset, gboolean bsend_bt_response)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       connectivity_bt_ag_res_t bt_event = BT_AG_RES_SWITCH_TO_PHONE;
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bheadset = %d,bsend_bt_response = %d \n", bheadset, bsend_bt_response);
+
+#ifdef _NEW_SND_
+       CALL_ENG_DEBUG(ENG_DEBUG, "b_user_rqst_path_change(%d)", b_user_rqst_path_change);
+       if (b_user_rqst_path_change == FALSE) {
+               if (TRUE == bheadset) {
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_BT);
+               }
+               else {
+                       int earjack_status = -1;
+                       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &earjack_status)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "earjack_status:[%d]\n", earjack_status);
+                               if (earjack_status == VCONFKEY_SYSMAN_EARJACK_REMOVED) {
+                                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);                              
+                               } else {
+                                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_EARJACK);                               
+                               }
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int fail");
+                               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);                              
+                       }
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Don't set path_status.. rqst from User. Already setted.");
+       }
+#else
+       /*TODO Check whehter the follwing check and set status to be done inside if((TRUE == bconnected_call_exists) || (TRUE == bmo_call_exists)) */
+       /*If Loud Speaker is ON, Change to Normal when Bluetooth Headset is switched ON */
+       if ((TRUE == bheadset) && (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER))) {
+               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, FALSE);
+       }
+       voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_HEADSET, bheadset);
+#endif
+
+       /*Donot change the path for MT Call. Change the Audio Path only for MO and Connected calls */
+       if ((TRUE == voicecall_core_is_connected_call_exist(pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_engine))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Changing the Path on BT Request \n");
+               voicecall_snd_change_path_real(papp_snd);
+
+               /*Send Response to BT only if the path is changed */
+               if (TRUE == bsend_bt_response) {
+                       bt_event = (TRUE == bheadset) ? BT_AG_RES_SWITCH_TO_HEADSET : BT_AG_RES_SWITCH_TO_PHONE;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Sending BT Response bt_event: %d \n", bt_event);
+                       _vc_bt_send_response_to_bt(pcall_core, bt_event, -1, NULL);
+               }
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function sends event to BT for switch to Headset/Phone
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bheadset                        TRUE if sound type is Audio Headset, FALSE otherwise
+ */
+void _vc_bt_request_switch_headset_path(call_vc_core_state_t *pcall_core, gboolean bheadset)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_core != NULL);
+
+       connectivity_bt_ag_res_t bt_event = BT_AG_RES_SWITCH_TO_PHONE;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       /*Donot change the path for MT Call. Change the Audio Path only for MO and Connected calls */
+       if ((TRUE == voicecall_core_is_connected_call_exist(pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_engine))) {
+               bt_event = (TRUE == bheadset) ? BT_AG_RES_SWITCH_TO_HEADSET : BT_AG_RES_SWITCH_TO_PHONE;
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sending BT Response bt_event: %d \n", bt_event);
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING, TRUE);
+
+               _vc_bt_send_response_to_bt(pcall_core, bt_event, -1, NULL);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "No Valid calls to switch path \n");
+       }
+}
+
+/**
+ * This function handles the bluetooth notifications sent by blue tooth application
+ *
+ * @return             TRUE -if event is handled, FALSE otherwise
+ * @param[in]          pcall_core                      Handle to voicecall core
+ * @param[in]          pbt_info                                bt notification details
+ */
+gboolean _vc_bt_handle_bt_events(call_vc_core_state_t *pcall_core, connectivity_bt_ag_param_info_t * pbt_info)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pbt_info != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Event: %s(%d) \n", gszbt_req_event[pbt_info->param1], pbt_info->param1);
+
+       /*HS Connection not required for sending response to BT_AG_REQ_CALL_STATUS */
+       if ((FALSE == pcall_core->bt_connected) && (BT_AG_REQ_CALL_STATUS != pbt_info->param1)) {
+               CALL_ENG_DEBUG(ENG_ERR, "BT not connected, Ignoring BT Events, BT Event= %d \n", pbt_info->param1);
+               return TRUE;
+       }
+
+       switch (pbt_info->param1) {
+       case BT_AG_REQ_CALL_STATUS:
+               {
+                       /*Send the Current  Call status to BT */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_STATUS, -1, NULL);
+
+               }
+               break;
+       case BT_AG_REQ_SPK_GAIN:
+               {
+                       int bt_vol_level = pbt_info->param2;
+                       int converted_vol_level;
+                       vc_engine_vol_set_from_bt_type event_data;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Speaker Gain Value : %d\n", bt_vol_level);
+
+#ifdef _NEW_SND_
+                       if (voicecall_snd_get_path_status(pcall_core->papp_snd) != VOICE_CALL_SND_PATH_BT) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Headset not switched on, Ignoring Speaker Gain Event \n");
+                               return TRUE;
+                       }
+#else
+                       if (FALSE == voicecall_snd_get_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_HEADSET)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Headset not switched on, Ignoring Speaker Gain Event \n");
+                               return TRUE;
+                       }
+#endif
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_VOL_CHNGD_BYBT, TRUE);
+
+                       converted_vol_level = __vc_bt_converted_bt_vol_to_voice_vol(bt_vol_level);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "converted Speaker Gain Value : %d\n", converted_vol_level);
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.vol_level = converted_vol_level;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SET_VOLUME_FROM_BT_TO_UI, (void *)&event_data);
+               }
+               break;
+       case BT_AG_REQ_CALL_ACCEPTED:
+               {
+                       if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call Accept by BT \n");
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, TRUE);
+                               if(_vc_core_util_phonelock_status() == FALSE)
+                                       vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
+#ifdef _NEW_SND_
+                               voicecall_snd_set_path_status(pcall_core->papp_snd,VOICE_CALL_SND_PATH_BT);
+#endif
+                               if (TRUE == voicecall_core_answer_call(pcall_core, FALSE)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_core_answer_call success \n");
+                               }
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "No Incoming call, skipping BT request \n");
+                       }
+               }
+               break;
+       case BT_AG_REQ_CALL_REJECT:
+               {
+                       if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                               if (FALSE == voicecall_core_reject_mt(pcall_core, TRUE)) {
+                                       CALL_ENG_DEBUG(ENG_ERR, "voicecall_core_reject_mt returned FALSE!\n");
+                               }
+                               /*Call rejected, reset the accept by flag */
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+                       } else if (TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+                               /*To retrieve the held call automatically once the mo call is ended, if held is call is available */
+                               _vc_core_engine_status_set_end_flag(pcall_core->pcall_engine, VC_RETREIVE_CALL_ON_MOCALL_END);
+
+                               voicecall_core_end_mo_call(pcall_core->pcall_engine);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "No Incoming/Outgoing calls, skipping BT request \n");
+                       }
+               }
+               break;
+       case BT_AG_REQ_BUTTON_PRESSED:
+               {
+                       if (voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+                               return voicecall_core_process_hold_call(pcall_core);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "No connected calls, skipping BT request \n");
+                       }
+
+               }
+               break;
+       case BT_AG_REQ_CALL_END:
+               {
+                       voicecall_core_end_call(pcall_core);
+               }
+               break;
+       case BT_AG_REQ_CONNECT_ERROR:
+               {
+                       /*To change path , reset flags and to update UI, if this is conisdered as Bt disconnect */
+                       __vc_bt_handle_connectivity_event(pcall_core, FALSE);
+               }
+               break;
+       case BT_AG_REQ_CALL_0_SEND:
+               {
+                       if (TRUE == voicecall_core_is_any_call_exists(pcall_core->pcall_engine)) {
+                               voicecall_core_start_incall_ss(pcall_core, CALL_VC_CORE_SS_0);
+                       }
+               }
+               break;
+       case BT_AG_REQ_CALL_1_SEND:
+               {
+                       if (TRUE == voicecall_core_is_any_call_exists(pcall_core->pcall_engine)) {
+                               if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call Accept by BT \n");
+                                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, TRUE);
+                               }
+                               voicecall_core_start_incall_ss(pcall_core, CALL_VC_CORE_SS_1);
+                       }
+               }
+               break;
+       case BT_AG_REQ_CALL_2_SEND:
+               {
+                       if (TRUE == voicecall_core_is_any_call_exists(pcall_core->pcall_engine)) {
+                               gboolean bactive_calls = FALSE;
+                               gboolean bheld_calls = FALSE;
+
+                               if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                                       voicecall_core_is_call_exists(pcall_core->pcall_engine, &bactive_calls, &bheld_calls);
+                                       if (!((TRUE == bactive_calls) && (TRUE == bheld_calls))) {
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call Accept by BT \n");
+                                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, TRUE);
+                                       }
+                               }
+                               voicecall_core_start_incall_ss(pcall_core, CALL_VC_CORE_SS_2);
+                       }
+               }
+               break;
+       case BT_AG_REQ_CALL_3_SEND:
+               {
+                       if (TRUE == voicecall_core_is_any_call_exists(pcall_core->pcall_engine)) {
+                               voicecall_core_start_incall_ss(pcall_core, CALL_VC_CORE_SS_3);
+                       }
+               }
+               break;
+       case BT_AG_REQ_HEADSET_VOL:
+               {
+                       int bt_vol_level = pbt_info->param2;
+                       int converted_vol_level;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT volume Level: %d \n", bt_vol_level);
+
+                       if (voicecall_core_is_any_call_exists(pcall_core->pcall_engine)) {
+                               vc_engine_vol_resp_type event_data;
+
+                               converted_vol_level = __vc_bt_converted_bt_vol_to_voice_vol(bt_vol_level);
+
+                               memset(&event_data, 0, sizeof(event_data));
+                               event_data.vol_alert_type = VOICE_CALL_VOL_TYPE_HEADSET;
+                               event_data.vol_level = converted_vol_level;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI, (void *)&event_data);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "NO Calls, Skipping BT Response \n");
+                       }
+               }
+               break;
+       case BT_AG_REQ_SWITCH_TO_HEADSET:
+       case BT_AG_REQ_SWITCH_TO_PHONE:
+               {
+                       gboolean bswitch_to_headset = FALSE;
+                       int bt_error = pbt_info->param2;
+
+#ifdef _NEW_SND_
+                       if(voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING) == TRUE) {
+                               b_user_rqst_path_change = TRUE;
+                       } else {
+                               b_user_rqst_path_change = FALSE;
+                       }
+#endif
+
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING, FALSE);
+
+                       /*Switch to response is received from BT, BT decision is fina, so reset the accept by BT */
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT Error :%d \n", bt_error);
+                       if (0 == bt_error) {
+                               /*Audio Connection/Disconnection Success case */
+                               bswitch_to_headset = (BT_AG_REQ_SWITCH_TO_HEADSET == pbt_info->param1) ? TRUE : FALSE;
+                       } else {
+                               /*Audio Connection/Disconnection Error Case */
+                               if (BT_AG_RES_AUDIO_CONNECTION_ERROR == bt_error) {
+                                       /*Connection Error, switch to phone */
+                                       bswitch_to_headset = FALSE;
+                               } else if (BT_AG_RES_AUDIO_DISCONNECTION_ERROR == bt_error) {
+                                       /*Disconnection Error, switch to headset */
+                                       bswitch_to_headset = TRUE;
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_ERR, "Invalid BT Error: %d \n", bt_error);
+                               }
+
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "bswitch_to_headset = %d \n", bswitch_to_headset);
+
+                       if ((TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine))) {
+                               gboolean bupdate = FALSE;
+
+                               if (0 == bt_error) {
+                                       /*Connection/Diconnection is sucess, don't send response to BT */
+                                       bupdate = _vc_bt_switch_headset_path(pcall_core, bswitch_to_headset, FALSE);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "bupdate = %d, bswitch_to_headset = %d \n", bupdate, bswitch_to_headset);
+
+                                       vc_engine_headset_status_type event_data;
+                                       memset(&event_data, 0, sizeof(event_data));
+                                       event_data.bstatus = bswitch_to_headset;
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_HEADSET_STATUS_TO_UI, (void *)&event_data);
+                               } else {
+                                       /*Connection/Diconnection is NOT sucess, change path and send response to BT */
+                                       bupdate = _vc_bt_switch_headset_path(pcall_core, bswitch_to_headset, TRUE);
+                               }
+
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "No connected/outgoing calls, Skipping BT Request \n");
+                       }
+               }
+               break;
+       case BT_AG_REQ_DTMF:
+               {
+                       gboolean active_calls = FALSE;
+                       gboolean held_calls = FALSE;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Send DTMF(%s)\n", pbt_info->param4);
+                       if ((voicecall_core_is_call_exists(pcall_core->pcall_engine, &active_calls, &held_calls)) && (TRUE == active_calls)) {
+                               voicecall_core_send_dtmf(pcall_core, pbt_info->param4);
+                       }
+               }
+               break;
+
+       case BT_AG_REQ_CALL_REDIAL:
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for bt event: %d\n", pbt_info->param1);
+               return FALSE;
+               break;
+
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function sends response back to the bt application
+ *
+ * @return             void
+ * @param[in]          pcall_core                      Handle to voicecall core
+ * @param[in]          bt_event                                bluetooth event type
+ * @param[in]          param1                          user param1
+ * @param[in]          param2                          user param2
+ */
+void _vc_bt_send_response_to_bt(call_vc_core_state_t *pcall_core, int bt_event, int param1, gpointer param2)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_core != NULL);
+
+       connectivity_bt_ag_param_info_t bt_response_info;
+       CALL_ENG_DEBUG(ENG_DEBUG, "Event: %s(%d), param1=[%d] \n", gszbt_res_event[bt_event], bt_event, param1);
+
+       /*Skip events, if Bluetooth is not connected */
+/*     if((FALSE == pcall_core->bt_connected) && (BT_AG_RES_CALL_STATUS != bt_event))
+       {
+               CALL_ENG_DEBUG(ENG_DEBUG,"Bluetooth not connected , Not sending any responses to BT\n");
+               return;
+       }
+*/
+       /*Make BT Response Info */
+       memset(&bt_response_info, 0, sizeof(connectivity_bt_ag_param_info_t));
+
+       bt_response_info.param1 = bt_event;
+
+       switch (bt_event) {
+       case BT_AG_RES_CALL_STATUS:
+       case BT_AG_RES_CALL_SWAPPED:
+               {
+                       connectivity_bt_ag_call_status_info_t call_status_info[10];
+                       int mt_call_handle = -1;
+                       int mo_call_handle = -1;
+                       int connected_call_handle = -1;
+                       int active_group_member_num = 0;
+                       int held_group_member_num = 0;
+                       int index = 0;
+                       int i = 0;
+                       char temp_str[10] = { 0, };
+                       char result_str[256] = { 0, };
+
+                       /*Incoming Call */
+                       _vc_core_engine_status_get_call_handle_bytype(pcall_core->pcall_engine, VC_INCOMING_CALL, &mt_call_handle);
+                       if (mt_call_handle != -1) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call Exists, call handle = %d \n", mt_call_handle);
+
+                               call_status_info[index].call_id = mt_call_handle;
+                               call_status_info[index].call_status = BT_AG_CALL_STATUS_INCOMING;
+                               index++;
+                               CALL_ENG_DEBUG(ENG_DEBUG, "total_call_member after mt= %d \n", index);
+                       }
+
+                       /*Outgoing Call */
+                       _vc_core_engine_status_get_call_handle_bytype(pcall_core->pcall_engine, VC_OUTGOING_CALL, &mo_call_handle);
+                       if (mo_call_handle != -1) {
+                               voicecall_call_state_t call_state;
+                               gboolean bvalid_call = TRUE;
+
+                               _vc_core_engine_status_get_call_state_byhandle(pcall_core->pcall_engine, mo_call_handle, &call_state);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call state: %d \n", call_state);
+
+                               switch (call_state) {
+                               case VC_CALL_STATE_OUTGOING_ALERT:
+                                       {
+                                               call_status_info[index].call_status = BT_AG_CALL_STATUS_ALERTING;
+                                       }
+                                       break;
+                               case VC_CALL_STATE_PREPARE_OUTGOING:
+                               case VC_CALL_STATE_OUTGOING:
+                               case VC_CALL_STATE_OUTGOING_ORIG:
+                                       {
+                                               call_status_info[index].call_status = BT_AG_CALL_STATUS_DIALLING;
+                                       }
+                                       break;
+                               default:        /*All Other states , donot consider for mocall */
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "mo call state: %d \n", call_state);
+                                       bvalid_call = FALSE;
+                               }
+
+                               if (TRUE == bvalid_call) {
+                                       call_status_info[index].call_id = mo_call_handle;
+                                       index++;
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "total_call_member after mo= %d \n", index);
+                               }
+
+                       }
+
+                       /*Connected call */
+                       int act_grp_index = -1;
+                       int held_grp_index = -1;
+
+                       _vc_core_engine_group_get_group_indices(pcall_core->pcall_engine, &act_grp_index, &held_grp_index);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "act_grp_index = %d, held_grp_index = %d\n", act_grp_index, held_grp_index);
+                       /*Active Connected Call */
+                       if (act_grp_index != -1) {
+                               _vc_core_engine_group_get_connected_member_count(pcall_core->pcall_engine, act_grp_index, &active_group_member_num);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "active_group_connected_member_num = %d \n", active_group_member_num);
+                               for (i = 0; i < active_group_member_num; i++) {
+                                       _vc_core_engine_group_get_call_handle_byposition(pcall_core->pcall_engine, act_grp_index, i, &connected_call_handle);
+                                       if (connected_call_handle != -1) {
+                                               call_status_info[index].call_id = connected_call_handle;
+                                               call_status_info[index].call_status = BT_AG_CALL_STATUS_CONNECTED;
+                                               index++;
+                                       }
+                               }
+                               CALL_ENG_DEBUG(ENG_DEBUG, "total_call_member after active calls= %d \n", index);
+                       }
+
+                       /*Held Connected Call */
+                       if (held_grp_index != -1) {
+                               _vc_core_engine_group_get_connected_member_count(pcall_core->pcall_engine, held_grp_index, &held_group_member_num);
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "held_group_member_num = %d \n", held_group_member_num);
+                               for (i = 0; i < held_group_member_num; i++) {
+                                       _vc_core_engine_group_get_call_handle_byposition(pcall_core->pcall_engine, held_grp_index, i, &connected_call_handle);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle[%d] = %d \n", i, connected_call_handle);
+                                       if (connected_call_handle != -1) {
+                                               call_status_info[index].call_id = connected_call_handle;
+                                               call_status_info[index].call_status = BT_AG_CALL_STATUS_HELD;
+                                               index++;
+                                       }
+                               }
+                               CALL_ENG_DEBUG(ENG_DEBUG, "total_call_member after held calls= %d \n", index);
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Total Calls = %d \n", index);
+                       bt_response_info.param2 = index;
+
+                       memset(result_str, 0x00, sizeof(result_str));
+                       for (i = 0; i < index; i++) {
+                               memset(temp_str, 0x00, sizeof(temp_str));
+                               snprintf(temp_str, sizeof(temp_str), "%d.%d/", call_status_info[i].call_id, call_status_info[i].call_status);
+                               strncat(result_str, temp_str, sizeof(temp_str) - 1);
+                       }
+                       CALL_ENG_DEBUG(ENG_DEBUG, "The resultant string is %s\n", result_str);
+
+                       _vc_core_util_strcpy(bt_response_info.param4, sizeof(bt_response_info.param4), result_str);
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Actual Data Passed is %s \n", bt_response_info.param4);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Actual Data Passed to BT \n");
+                       for (i = 0; i < index; i++) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call id = %d \n", call_status_info[i].call_id);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call status= %d \n", call_status_info[i].call_status);
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Verification of BT data being sent\n");
+
+               }
+               break;
+       case BT_AG_RES_CALL_INCOM:
+               {
+                       /*Length of Incoming Call Number */
+                       if (NULL != param2) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "phone number=%s\n", (char *)param2);
+                               bt_response_info.param2 = strlen(param2);
+                               bt_response_info.param3 = param1;
+                               _vc_core_util_strcpy(bt_response_info.param4, VC_PHONE_NUMBER_LENGTH_MAX, param2);
+                       }
+               }
+               break;
+       case BT_AG_RES_CALL_ORIG:
+               {
+                       if (NULL != param2) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "phone number=%s\n", (char *)param2);
+#ifdef _NEW_SND_
+                               switch (voicecall_snd_get_path_status(pcall_core->papp_snd)) {
+                                       case VOICE_CALL_SND_PATH_RECEIVER:
+                                       case VOICE_CALL_SND_PATH_SPEAKER:
+                                       case VOICE_CALL_SND_PATH_EARJACK:
+                                               bt_response_info.param2 = FALSE;
+                                               break;
+                                       case VOICE_CALL_SND_PATH_BT:
+                                               bt_response_info.param2 = TRUE;
+                                               break;
+                               }
+#else
+                               bt_response_info.param2 = strlen(param2);
+#endif
+                               bt_response_info.param3 = param1;
+                               _vc_core_util_strcpy(bt_response_info.param4, VC_PHONE_NUMBER_LENGTH_MAX, param2);
+                       }
+               }
+               break;
+       case BT_AG_RES_CALL_REMOTE_RINGING:
+               {
+                       /*Assign Call Handle */
+                       bt_response_info.param3 = param1;
+               }
+               break;
+       case BT_AG_RES_CALL_CONNECT:
+       case BT_AG_RES_CALL_END:
+               {
+#ifdef _NEW_SND_
+                       switch (voicecall_snd_get_path_status(pcall_core->papp_snd)) {
+                               case VOICE_CALL_SND_PATH_RECEIVER:
+                               case VOICE_CALL_SND_PATH_SPEAKER:
+                               case VOICE_CALL_SND_PATH_EARJACK:
+                                       bt_response_info.param2 = FALSE;
+                                       break;
+                               case VOICE_CALL_SND_PATH_BT:
+                                       bt_response_info.param2 = TRUE;
+                                       break;
+                       }
+#endif
+                       /*Assign Call Handle */
+                       bt_response_info.param3 = param1;
+               }
+               break;
+       case BT_AG_RES_SPK_GAIN:
+               /*BT Volume Level */
+               bt_response_info.param2 = param1;
+               break;
+       case BT_AG_RES_HEADSET_VOL:     /*Request For Current BT Volume Level */
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Requesting for Current BT Volume Level \n");
+               }
+               break;
+       case BT_AG_RES_SWITCH_TO_HEADSET:
+       case BT_AG_RES_SWITCH_TO_PHONE:
+               break;
+       case BT_AG_RES_CALL_HOLD:
+       case BT_AG_RES_CALL_RETRIEVE:   /*Fall Through */
+               bt_response_info.param3 = param1;
+               break;
+       case BT_AG_RES_CALL_JOINED:     /*Fall Through */
+       default:
+               break;
+       }
+
+       vc_engine_on_dbus_send_response_to_bt(bt_response_info);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bt response ended.\n");
+
+}
+
+/**
+ * This function register bt callback.
+ *
+ * @return             TRUE if bt status is registered, FALSE otherwise
+ * @param[in]          void
+ */
+gboolean _vc_bt_status_init(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       gboolean ret = FALSE;
+
+       int bstatus = 0;
+       bstatus = _vc_bt_get_bt_status();
+       CALL_ENG_DEBUG(ENG_DEBUG, "bt_connected:[%d]\n", bstatus);
+       __vc_bt_handle_connectivity_event(pcall_core, bstatus);
+
+       ret = vconf_notify_key_changed(VCONFKEY_BT_DEVICE, (void *)_vc_bt_handle_phonestatus_bt_events, pcall_core);
+       if (0 != ret) {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_notify_key_changed failed..[%d]\n", ret);
+               return FALSE;
+       }
+       return TRUE;
+}
+
+/**
+ * This function gets the blue tooth active status from the phone status server
+ *
+ * @return             TRUE - if BT is enabled, FALSE otherwise
+ * @param[in]          none
+ */
+gboolean _vc_bt_get_bt_status(void)
+{
+       int bt_status = VCONFKEY_BT_DEVICE_NONE;
+       gboolean ret = FALSE;
+
+       ret = vconf_get_int(VCONFKEY_BT_DEVICE, &bt_status);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "bt_status = [0x%x] \n", bt_status);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]\n", ret);
+       }
+
+       return (VCONFKEY_BT_DEVICE_HEADSET_CONNECTED == (bt_status & VCONFKEY_BT_DEVICE_HEADSET_CONNECTED)) ? TRUE : FALSE;
+}
+
+/**
+ * This function gets the BT inband ringtone activate settings
+ *
+ * @return             TRUE - if BT inband ringtone activate settings is ON, FALSE otherwise
+ * @param[in]          none
+ */
+gboolean _vc_bt_get_inband_ringtone_active(void)
+{
+       /* InBand_Ringtone_Active for vconf.. */
+       return FALSE;
+}
+
+/**
+ * This function handles the notifications sent by phone status server
+ *
+ * @return             TRUE -if notification is handled, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bt_status                       Blue tooth status
+ */
+gboolean _vc_bt_handle_phonestatus_bt_events(keynode_t *node, call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(node != NULL);
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       gboolean bt_conn_status = FALSE;
+       int bt_status = vconf_keynode_get_int(node);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bt_status = [0x%x] \n", bt_status);
+
+       /*set the sound status */
+       bt_conn_status = (VCONFKEY_BT_DEVICE_HEADSET_CONNECTED == (bt_status & VCONFKEY_BT_DEVICE_HEADSET_CONNECTED)) ? TRUE : FALSE;
+       CALL_ENG_DEBUG(ENG_DEBUG, "bt_conn_status = %d\n", bt_conn_status);
+
+       __vc_bt_handle_connectivity_event(pcall_core, bt_conn_status);
+       return TRUE;
+}
+
+/**
+ * This function retreives volume level of headset
+ *
+ * @return             
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+void _vc_bt_get_headset_volume(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_IF_FAIL(pcall_core != NULL);
+
+       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_HEADSET_VOL, 0, NULL);
+}
+
+/**
+ * This function returns the BT connection status
+ *
+ * @return             TRUE if bt is connected, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean _vc_bt_is_bt_connected(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       return pcall_core->bt_connected;
+}
+
+/**
+ * This function returns the BT SCO status.(Synchronized Connection Oriented link)
+ *
+ * @return             TRUE if bt is connected, FALSE otherwise
+ * @param[in]          void
+ */
+gboolean _vc_bt_get_bt_sco_status(void)
+{
+       gboolean sco_status = FALSE;
+       gboolean ret = FALSE;
+
+       ret = vconf_get_bool(VCONFKEY_BT_HEADSET_SCO, &sco_status);
+       if (0 == ret) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "sco_status = [%d] \n", sco_status);
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..[%d]\n", ret);
+       }
+
+       return sco_status;
+}
+
+/**
+ * This function processed bt handset event
+ *
+ * @return             TRUE if bt is connected, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bheadset                        headset status 
+ */
+gboolean _vc_bt_process_bt_handset(call_vc_core_state_t *pcall_core, int bheadset)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bheadset:[%d] \n", bheadset);
+       if (bheadset) {
+               if (FALSE == _vc_bt_get_bt_status()) {
+                       vc_engine_on_dbus_send_connect_to_bt();
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT is ON.. switch path to BT");
+                       _vc_bt_switch_headset_path(pcall_core, bheadset, TRUE);
+               }
+       } else {
+               _vc_bt_switch_headset_path(pcall_core, bheadset, TRUE);
+       }
+       return TRUE;
+}
diff --git a/call-engine/voice-call-core.c b/call-engine/voice-call-core.c
new file mode 100755 (executable)
index 0000000..da160a7
--- /dev/null
@@ -0,0 +1,3678 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vc-core-util.h"
+#include "vc-core-engine-types.h"
+#include "vc-core-callagent.h"
+#include "vc-core-engine.h"
+#include "vc-core-error.h"
+#include "voice-call-core.h"
+#include "voice-call-dbus.h"
+#include "voice-call-engine-msg.h"
+#include "voice-call-service.h"
+
+#include "voice-call-bt.h"
+#include "vc-core-engine.h"
+
+#include "voice-call-engine.h"
+
+#define MO_REDIAL_COUNT_MAX 10
+#define MO_REDIAL_TIMER_INTERVAL_FIRST 3000    /**< MO Redial Timer Interva; - 5 Secs*/
+#define MO_REDIAL_TIMER_INTERVAL_SECOND                3000    /**< MO Redial Timer Interva; - 1 Minute*/
+#define MO_REDIAL_TIMER_INTERVAL_THIRD 3000    /**< MO Redial Timer Interva; - 3 Minutes*/
+
+#define MINUTE_MINDER_TIMEOUT_VALUE    60000
+
+#define DTMF_PAUSE_TIMER_INTERVAL_FIRST                3000    /*3 Seconds */
+#define DTMF_PAUSE_TIMER_INTERVAL_REST                 3000    /*3 Seconds */
+#define DTMF_PAUSE_TIMER_INTERVAL_GCF_FIRST    800     /*0.8 Second */
+#define        DTMF_PAUSE_TIMER_INTERVAL_GCF_REST              3300    /*3 Seconds */
+
+gboolean mo_redial_timer_cb(void *data);
+
+#define SET_PATH_TIMER_VALUE   50
+static guint g_set_path_timer_handler = 0;
+static gboolean __voicecall_core_set_path_timer_cb(gpointer puser_data);
+
+/* For Debug Information, Call Engine Event name string constant */
+char *gszcall_engine_event[VC_ENGINE_EVENT_MAX] = {
+       "VC_CALL_INCOM",
+       "VC_CALL_OUTGOING",
+       "VC_CALL_OUTGOING_ORIG",
+       "VC_CALL_OUTGOING_ALERT",
+       "VC_CALL_CONNECTED",
+       "VC_CALL_NORMAL_END",
+       "VC_CALL_INCOM_END",
+       "VC_CALL_INCOM_DROPPED",
+       "VC_CALL_REJECTED_END",
+       "VC_CALL_OUTGOING_END",         /* 10 */
+
+       "VC_CALL_OUTGOING_ABORTED",
+       "VC_CALL_DTMF_ACK",
+       "VC_CALL_AUTO_REDIAL_CHECK",
+       "VC_CALL_ANSWER_CNF",
+       "VC_CALL_SS_HELD",
+       "VC_CALL_SS_RETREIVED",
+       "VC_CALL_SS_SWAP",
+       "VC_CALL_SS_SETUP_CONF",
+       "VC_CALL_SS_SPLIT_CONF",
+       "VC_CALL_SS_TRANSFERRED",       /* 20 */
+
+       "VC_CALL_SS_CONNECT_LINE_IND",
+       "VC_CALL_IND_FORWARD",
+       "VC_CALL_IND_ACTIVATE",
+       "VC_CALL_IND_HOLD",
+       "VC_CALL_IND_TRANSFER",
+       "VC_CALL_IND_SETUPCONFERENCE",
+       "VC_CALL_IND_BARRING",
+       "VC_CALL_IND_WAITING",
+       "VC_CALL_IND_CUGINFO",
+       "VC_CALL_IND_SSNOTIFY", /* 30 */
+
+       "VC_CALL_IND_CALLINGNAMEINFO",
+       "VC_CALL_IND_REDIRECT_CNF",
+       "VC_CALL_IND_ACTIVATECCBS_CNF",
+       "VC_CALL_IND_ACTIVATECCBS_USERINFO",
+       "VC_CALL_IND_AOC",
+       "VC_ERROR_OCCURED",
+       "VC_ACTION_INCOM_FORCE",
+       "VC_ACTION_SAT_REQUEST",
+       "VC_ACTION_SAT_RESPONSE",
+       "VC_ACTION_CALL_END_HELD_RETREIVED",    /* 40 */
+
+       "VC_ACTION_NO_ACTIVE_TASK",
+       "VC_CALL_GET_VOLUME_RESP"
+};
+
+static void __voicecall_core_check_headset_earjack_status(call_vc_core_state_t *pcall_core);
+static void __vc_core_set_auto_redial_count(call_vc_core_state_t *pcall_core, int auto_redial_count);
+static gboolean __voicecall_core_callstatus_set_timer_cb(gpointer puser_data);
+
+static int __voicecall_core_get_string_id_by_errorcode(int error_code);
+static void __voicecall_core_mocall_reset_engine_state(voicecall_engine_t *pcall_engine);
+static gboolean __voicecall_core_is_redial_cuase(int end_cause);
+
+#ifdef PDIAL_SEND_DTMF
+static gboolean __voicecall_core_queue_dtmf_string(call_vc_core_state_t *pcall_core, char *dtmf_string, gboolean bsat_dtmf);
+static gboolean __voicecall_core_handle_dtmf_ack(call_vc_core_state_t *pcall_core, gboolean success);
+#endif
+
+/**
+ * This function puts the currently active call on hold
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_hold_call(voicecall_engine_t *pcall_engine)
+{
+
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       PRINT_CURRENT_TIME("Call Hold Start at");
+       error_code = _vc_core_engine_hold_call(pcall_engine);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Error Code : %d", error_code);
+       return (ERROR_VOICECALL_NONE == error_code || ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS == error_code) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the currently held call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_retrieve_call(voicecall_engine_t *pcall_engine)
+{
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       PRINT_CURRENT_TIME("Call Retrieve Start at");
+       error_code = _vc_core_engine_retrieve_call(pcall_engine);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Error Code : %d", error_code);
+       return (ERROR_VOICECALL_NONE == error_code || ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS == error_code) ? TRUE : FALSE;
+}
+
+/**
+ * This function swaps the currently available active and held calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_swap_calls(voicecall_engine_t *pcall_engine)
+{
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       PRINT_CURRENT_TIME("Call Swap Start at");
+       error_code = _vc_core_engine_swap_calls(pcall_engine);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Error Code : %d", error_code);
+       return (ERROR_VOICECALL_NONE == error_code || ERROR_VOICECALL_PREVIOUS_REQUEST_IN_PROGRESS == error_code) ? TRUE : FALSE;
+}
+
+/**
+ * This function clears the MO Call Details
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_clear_mo_call(voicecall_engine_t *pcall_engine)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1)) ? TRUE : FALSE;
+}
+
+/**
+ * This function clears the Connected Call Details
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          call_handle             Handle of the Connected Call to be cleared
+ */
+inline gboolean voicecall_core_clear_connected_call(voicecall_engine_t *pcall_engine, int call_handle)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_finalize_call(pcall_engine, VC_CONNECTED_CALL, call_handle)) ? TRUE : FALSE;
+}
+
+/**
+ * This function changes the voicecall engine's state
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          eng_state               Engine State to be changed
+ */
+inline gboolean voicecall_core_change_engine_state(voicecall_engine_t *pcall_engine, int eng_state)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_change_engine_iostate(pcall_engine, eng_state)) ? TRUE : FALSE;
+}
+
+/**
+ * This function ends an Outgoing Call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_end_mo_call(voicecall_engine_t *pcall_engine)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call(pcall_engine, VC_END_OUTGOING_CALL)) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the Voicecall Engine's State
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] io_state                        Voicecall Engine InOut State
+ */
+inline gboolean voicecall_core_get_engine_state(voicecall_engine_t *pcall_engine, int *eng_state)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_get_engine_iostate(pcall_engine, eng_state)) ? TRUE : FALSE;
+}
+
+/**
+ * This function checks whether any call exists
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] active_calls            TRUE - If active call exists or FALSE If active call doesn't exists
+ * @param[out] held_calls              TRUE - If held call exists or FALSE If held call doesn't exists
+ */
+inline gboolean voicecall_core_is_call_exists(voicecall_engine_t *pcall_engine, gboolean * active_calls, gboolean * held_calls)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_isexists_any_call(pcall_engine, active_calls, held_calls)) ? TRUE : FALSE;
+}
+
+/**
+ * This function checks whether incoming call exists or not
+ *
+ * @return             Returns TRUE if incoming call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_is_incoming_call_exists(voicecall_engine_t *pcall_engine)
+{
+       gboolean bmtcall_exists = FALSE;
+
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_INCOMING_CALL, &bmtcall_exists);
+       return bmtcall_exists;
+}
+
+/**
+ * This function checks whether outgoing call exists or not
+ *
+ * @return             Returns TRUE if outgoing call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_is_outgoing_call_exists(voicecall_engine_t *pcall_engine)
+{
+       gboolean bmocall_exists = FALSE;
+
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_OUTGOING_CALL, &bmocall_exists);
+       return bmocall_exists;
+}
+
+/**
+ * This function checks whether any connexcted call exists or not
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_is_connected_call_exist(voicecall_engine_t *pcall_engine)
+{
+       gboolean bcall_exists = FALSE;
+
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_CONNECTED_CALL, &bcall_exists);
+       return bcall_exists;
+}
+
+/**
+ * This function checks whether any connexcted call exists or not in the given group
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          group_index             Group Index to be searhced
+ */
+inline gboolean voicecall_core_is_connected_call_exist_in_group(voicecall_engine_t *pcall_engine, int group_index)
+{
+       gboolean bcall_exists = FALSE;
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       if (ERROR_VOICECALL_NONE != _vc_core_engine_group_isexists_connected_call_ingroup(pcall_engine, group_index, &bcall_exists)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Error_code %d", error_code);
+
+       }
+
+       return bcall_exists;
+}
+
+/**
+ * This function checks whether any call exists
+ *
+ * @return             Returns TRUE if connected call exists or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_is_any_call_exists(voicecall_engine_t *pcall_engine)
+{
+       gboolean bcall_exists = FALSE;
+
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_INCOMING_CALL, &bcall_exists);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call = [%d]", bcall_exists);
+
+       if (FALSE == bcall_exists) {
+               _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_OUTGOING_CALL, &bcall_exists);
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Outgoing Call = [%d]", bcall_exists);
+
+       if (FALSE == bcall_exists) {
+               _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_CONNECTED_CALL, &bcall_exists);
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Connected Call = [%d]", bcall_exists);
+
+       return bcall_exists;
+}
+
+/**
+ * This function retreives the totally number of availavle calls including connected, MO and MT Calls
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[out] ptotal_call_member      number of avialble calls
+ */
+inline gboolean voicecall_core_get_total_call_member(voicecall_engine_t *pcall_engine, int *ptotal_call_member)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_get_call_member_count(pcall_engine, ptotal_call_member)) ? TRUE : FALSE;
+}
+
+/**
+ * This function checks whether voicecall engine's call agent is idle or not
+ *
+ * @return             Returns TRUE if call agent is idle or FALSE on failure
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ */
+inline gboolean voicecall_core_is_callagent_idle(voicecall_engine_t *pcall_engine)
+{
+       gboolean bcallagent_idle = FALSE;
+
+       _vc_core_engine_status_is_engine_busy(pcall_engine, &bcallagent_idle);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Agent Busy State : %d", bcallagent_idle);
+
+       return !bcallagent_idle;
+}
+
+/**
+* This function checks the current call status and engine status
+*
+* @return              TRUE, if connected calls available and engine is in idle, FALSE otherwise
+ * @param[in]          pcall_engine            Handle to voicecall engine
+*/
+inline gboolean voicecall_core_is_incall_request_possible(voicecall_engine_t *pcall_engine)
+{
+       int eng_state = VC_INOUT_STATE_NONE;
+       int member_num_0 = 0;
+       int member_num_1 = 0;
+
+       _vc_core_engine_group_get_connected_member_count(pcall_engine, 0, &member_num_0);
+       _vc_core_engine_group_get_connected_member_count(pcall_engine, 1, &member_num_1);
+       voicecall_core_get_engine_state(pcall_engine, &eng_state);
+       if (!(voicecall_core_is_callagent_idle(pcall_engine) && ((member_num_1 + member_num_0) > 0)
+             && (eng_state == VC_INOUT_STATE_NONE))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Engine Busy, Cannot complete Request,mem_0:%d,mem_1:%d,eng_state:%d ", member_num_0, member_num_1, eng_state);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function changes the modem call audio path
+ *
+ * @return             TRUE sucess, FALSE otherwise
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          audio_path              audio path to be changed
+ */
+inline gboolean voicecall_core_change_audio_path(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_change_audio_path(pcall_engine, audio_path)) ? TRUE : FALSE;
+}
+
+/**
+ * This function sets the voice call audio volume for the given audio path type
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine            Handle to voicecall engine
+ * @param[in]          tapi_snd_path           audio path for the volume to be set
+ * @param[in]          vol_level                       volume level
+ */
+inline gboolean voicecall_core_set_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t tapi_snd_path, int vol_level)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_set_audio_volume(pcall_engine, tapi_snd_path, (voicecall_audio_volume_t) vol_level)) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the voice call audio volume for the given audio path type
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[in]          audio_path_type         audio path for the volume to be retreived
+ */
+inline gboolean voicecall_core_get_audio_volume(voicecall_engine_t *pcall_engine, voicecall_audio_path_t audio_path_type)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_get_audio_volume(pcall_engine, audio_path_type)) ? TRUE : FALSE;
+}
+
+/**
+ * This function set the voice call audio mute status
+ *
+ * @return             returns TRUE in success , FALSE otherwise
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[in]          bvoice_mute                     mute status
+ */
+inline gboolean voicecall_core_set_audio_mute_status(voicecall_engine_t *pcall_engine, gboolean bvoice_mute)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_set_audio_mute(pcall_engine, bvoice_mute)) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the first active call among the available active calls
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_engine                    Handle to voicecall engine
+ * @param[out] pcall_handle            call handle of the active call
+ */
+inline gboolean voicecall_core_get_zuhause(voicecall_engine_t *pcall_engine, gboolean * bzuhause)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_is_zuhause_area(pcall_engine, bzuhause)) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the Voicecall Engine's State
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]  pcall_engine    Handle to voicecall engine
+ * @param[in]  call_handle     Call handle of the call for which the call object is retrieved
+ * @param[out] pcall_object    Pointer to the retrived call object info
+ */
+inline gboolean voicecall_core_get_call_object(voicecall_engine_t *pcall_engine, int call_handle, call_vc_call_objectinfo_t * pcall_object)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_get_call_object(pcall_engine, call_handle, pcall_object)) ? TRUE : FALSE;
+}
+
+/**
+ * This function sends response to sat engine
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]  pcall_engine    Handle to voicecall engine
+ * @param[in]          sat_rqst_resp_type sat rqst/resp type to be set by the client
+ * @param[in]          sat_response_type sat response type to be sent to sat
+ */
+inline gboolean voicecall_core_send_sat_response(voicecall_engine_t *pcall_engine, voicecall_engine_sat_rqst_resp_type sat_rqst_resp_type, call_vc_sat_reponse_type_t sat_response_type)
+{
+       voicecall_error_t error_code = 0;
+       error_code = _vc_core_engine_send_sat_response(pcall_engine, sat_rqst_resp_type, sat_response_type);
+       CALL_ENG_DEBUG(ENG_DEBUG, "error_code:[%d] ", error_code);
+       return (ERROR_VOICECALL_NONE == error_code) ? TRUE : FALSE;
+}
+
+/**
+ * This function retreives the number of active call members
+ *
+ * @return             Returns TRUE if success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[out] pactive_member_num      number of active call members available
+ */
+inline gboolean voicecall_core_get_active_call_member(call_vc_core_state_t *pcall_core, int *pactive_member_num)
+{
+       *pactive_member_num = 0;
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_get_call_member_info(pcall_core->pcall_engine, VC_ACTIVE_CALL, pactive_member_num)) ? TRUE : FALSE;
+}
+
+/**
+ * This function checks whether possible to make conference call
+ *
+ * @return             Returns TRUE If Conference call can be made or FALSE if not
+ * @param[in]          papp_document   Handle to Application Document
+ */
+inline gboolean voicecall_core_is_conf_call_possible(call_vc_core_state_t *pcall_core)
+{
+       gboolean bconf_call = FALSE;
+
+       _vc_core_engine_status_is_conf_call_possible(pcall_core->pcall_engine, &bconf_call);
+
+       return bconf_call;
+}
+
+/**
+ * This function checks whether possible to transfer call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+inline gboolean voicecall_core_is_transfer_call_possible(call_vc_core_state_t *pcall_core)
+{
+       gboolean btransfer_call = FALSE;
+
+       _vc_core_engine_status_is_transfer_call_possible(pcall_core->pcall_engine, &btransfer_call);
+
+       return btransfer_call;
+}
+
+/**
+ * This function checks whether the given code is a valid Supplementary Services Code
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          pszInput                        Number to be verified
+ */
+inline gboolean voicecall_core_is_valid_sscode(call_vc_core_state_t *pcall_core, const char *pszInput)
+{
+       gboolean bsscode = FALSE;
+
+       _vc_core_engine_status_isvalid_ss_code(pcall_core->pcall_engine, pszInput, &bsscode);
+
+       return bsscode;
+}
+
+#ifdef _CPHS_DEFINED_
+/**
+ * This function gets the cphs status from the engine
+ *
+ * @return             TRUE if queried status is enabled, FALSE otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          csp_service             csp service to be queried
+ */
+inline gboolean voicecall_core_get_cphs_csp_status(call_vc_core_state_t *pcall_core, voicecall_cphs_csp_service csp_service)
+{
+       gboolean bcsp_status = FALSE;
+
+       _vc_core_engine_status_get_cphs_csp_status(pcall_core->pcall_engine, csp_service, &bcsp_status);
+       return bcsp_status;
+}
+#endif
+
+/**
+ * This function informs the Voicecall Engine that current SS operation has been completed
+ *
+ * @return             Returns TRUE if all the calls are ended or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+inline gboolean voicecall_core_set_check_ss_on_end(call_vc_core_state_t *pcall_core)
+{
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_set_end_flag(pcall_core->pcall_engine, VC_RETREIVE_CALL_ON_MOCALL_END)) ? TRUE : FALSE;
+}
+
+/**
+ * This function extracts vaild phone number
+ *
+ * @return             void
+ * @param[in]          
+ */
+inline void voicecall_core_extract_phone_number(const char *source_tel_number, char *phone_number, const int buf_size)
+{
+       _vc_core_engine_extract_phone_number(source_tel_number, phone_number, buf_size);
+}
+
+/************************
+*  inline function END
+**************************/
+void voicecall_core_set_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags, gboolean bstatus)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "core flags:[0x%x], Set status:[%d] ", core_flags, bstatus);
+
+       if (CALL_VC_CORE_FLAG_NONE == core_flags) {
+               /*Set the document flag to defaults */
+               pcall_core->core_status = CALL_VC_CORE_FLAG_NONE;
+               return;
+       }
+
+       if (TRUE == bstatus) {
+               /*Set Flag */
+               pcall_core->core_status |= core_flags;
+       } else {
+               /*Remove bit field only if it is already set/ otherwise ignore it */
+               if ((pcall_core->core_status & core_flags) == core_flags) {
+                       pcall_core->core_status = (pcall_core->core_status ^ core_flags);
+               }
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "After SET, core_status:[0x%x]", pcall_core->core_status);
+
+}
+
+gboolean voicecall_core_get_status(call_vc_core_state_t *pcall_core, call_vc_core_flags_t core_flags)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "core_flags:[0x%x]", core_flags);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Before Get, core_status:[0x%x]", pcall_core->core_status);
+
+       if ((pcall_core->core_status & core_flags) == core_flags) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Flag [0x%x] is available", core_flags);
+               return TRUE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Flag [0x%x] is not available", core_flags);
+       return FALSE;
+}
+
+#ifdef VC_ENG_FDN_SUPPORT
+gboolean voicecall_core_check_fdn_status(call_vc_core_state_t *pcall_core)
+{
+       gboolean bfdn_enabled = FALSE;
+
+       /*Check the FDN Status of the number with the contact */
+       _vc_core_engine_status_isenabled_fdn(pcall_core->pcall_engine, &bfdn_enabled);
+       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_FDN_SVC_ENABLED, bfdn_enabled);
+
+       if (TRUE == bfdn_enabled) {
+               gboolean bct_exists = FALSE;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "FDN mode enabled..");
+               if (!bct_exists) {
+                       vc_engine_msg_box_type event_data;
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "FDN only...");
+                       _vc_core_engine_finalize_call(pcall_core->pcall_engine, VC_OUTGOING_CALL, -1);
+
+                       event_data.string_id = IDS_CALL_POP_FDNCALLONLY;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       return FALSE;
+               }
+
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "FDN mode disabled..");
+       }
+
+       return TRUE;
+}
+#endif
+
+static gboolean __voicecall_core_minute_minder(gpointer puser_data)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+
+       if ((voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine) == FALSE)
+           && (voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine) == FALSE)
+           && (voicecall_core_is_connected_call_exist(pcall_core->pcall_engine) == TRUE)) {
+               voicecall_snd_play_effect_tone(pcall_core->papp_snd, VOICE_CALL_SND_EFFECT_CALL_MINUTE_MINDER);
+       }
+
+       return TRUE;
+}
+
+static gboolean __voicecall_core_set_path_timer_cb(gpointer puser_data)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       VOICECALL_RETURN_FALSE_IF_FAIL(puser_data != NULL);
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+
+       voicecall_snd_change_path(pcall_core->papp_snd);
+
+       if (g_set_path_timer_handler > 0) {
+               g_source_remove(g_set_path_timer_handler);
+               g_set_path_timer_handler = 0;
+       }
+
+       return FALSE;
+}
+
+static gboolean __voicecall_core_handle_call_end_on_silent_reject(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle = %d", call_handle);
+
+       if ((pcall_core->mtcall_silent_reject_handle == call_handle)) {
+               if (FALSE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+                       /*Connected calls need to be checked, Connected emergency calls may be avaialble */
+                       voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+                       voicecall_core_set_to_default(pcall_core);
+               } else {
+                       CALL_ENG_DEBUG(ENG_ERR, "Connected calls available");
+                       _vc_core_engine_status_dump_call_details(pcall_core->pcall_engine);
+               }
+               pcall_core->mtcall_silent_reject_handle = -1;
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+static gboolean __voicecall_core_silent_reject_mt(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle = %d", call_handle);
+
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       pcall_core->mtcall_silent_reject_handle = call_handle;
+
+       /*Reject the call */
+       error_code = _vc_core_engine_reject_call(pcall_core->pcall_engine, FALSE);
+
+       if (ERROR_VOICECALL_NONE != error_code) {
+               CALL_ENG_DEBUG(ENG_ERR, "_vc_core_engine_reject_call Failed, error_code = %d", error_code);
+       }
+
+       return TRUE;
+}
+
+static void __voicecall_core_processing_mo_cancel(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+       int total_call_member;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       if (TRUE == voicecall_snd_is_signal_playing(pcall_core->papp_snd)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Signal is playing, skipping cancel timer");
+               return;
+       }
+       
+       vc_engine_outgoing_end_type event_data;
+
+       /* normal outgong end */
+       CALL_ENG_DEBUG(ENG_DEBUG, "It is normal outgong end case.");
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle:[%d],end_cause_type:[%d]", pcall_core->mo_end_call_handle, pcall_core->mo_end_cause_type);
+
+       memset(&event_data, 0, sizeof(event_data));
+       event_data.call_handle = pcall_core->mo_end_call_handle;
+       event_data.end_cause_type = pcall_core->mo_end_cause_type;
+       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_END_TO_UI, (void *)&event_data);
+
+       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, pcall_core->mo_end_call_handle, NULL);
+
+       __vc_core_set_auto_redial_count(pcall_core, 0);
+       voicecall_core_clear_mo_call(pcall_engine);
+
+       __voicecall_core_mocall_reset_engine_state(pcall_engine);
+
+       /* __vcui_app_view_mo_finish_call() start */
+       voicecall_snd_stop_signal(pcall_core->papp_snd);
+
+       voicecall_core_get_total_call_member(pcall_engine, &total_call_member);
+       /* If No Connected Calls End the UI */
+       if (total_call_member == 0) {
+               /*Reset voice call core to default values */
+               voicecall_core_set_to_default(pcall_core);
+       } else {
+               voicecall_snd_change_path(pcall_core->papp_snd);
+       }
+       /* __vcui_app_view_mo_finish_call() end */
+
+}
+
+static void __voicecall_core_mocall_signal_play_end_cb(gpointer pdata)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)pdata;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       if (FALSE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No More calls, resetting path");
+               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+               _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+       }
+
+       if (TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Updating MO UI on signal end");
+               __voicecall_core_processing_mo_cancel(pcall_core);
+       }
+}
+
+static voicecall_snd_signal_type_t __voicecall_core_get_signal_type_from_endcause(int end_cause)
+{
+       int signal_type = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "End end_cause_type: %d", end_cause);
+
+       switch (end_cause) {
+       case VC_ENDCAUSE_USER_BUSY:
+       case VC_ENDCAUSE_USER_DOESNOT_RESPOND:
+       case VC_ENDCAUSE_USER_UNAVAILABLE:
+       case VC_ENDCAUSE_NO_ANSWER:
+               {
+                       signal_type = VOICE_CALL_SIGNAL_USER_BUSY_TONE;
+               }
+               break;
+       default:
+               signal_type = VOICE_CALL_SIGNAL_NONE;
+               break;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Signal Type: %d", signal_type);
+
+       return signal_type;
+}
+
+static void __voicecall_core_handle_normal_end(call_vc_core_state_t *pcall_core, int call_handle, voice_call_end_cause_type_t end_cause)
+{
+       int total_call_member = 0;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       /*Set the callstatus to OFF before processing the End Event Animation */
+       if (TRUE == voicecall_core_is_connected_call_exist(pcall_engine)) {
+               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_ACTIVE);
+       } else if ((TRUE == voicecall_core_is_incoming_call_exists(pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_engine))) {
+               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_CONNECTING);
+       } else {
+               /*Reset the Path. Actual path must be closed when modem path closed!! */
+               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+               _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+       }
+
+       if (FALSE == voicecall_snd_play_effect_tone(pcall_core->papp_snd, VOICE_CALL_SND_EFFECT_CALL_DISCONNECT)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Effect tone not played, check and play busy tone");
+       }
+
+#ifdef _NEW_SND_
+       if ((FALSE == voicecall_core_is_connected_call_exist(pcall_engine)) 
+       && (TRUE == voicecall_core_is_incoming_call_exists(pcall_engine)) 
+       && (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_SPEAKER)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call: TRUE,Connected Call:FALSE, Speaker: TRUE. So change path to normal");
+               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);
+               voicecall_snd_change_path(pcall_core->papp_snd);
+       }
+#else
+       if ((FALSE == voicecall_core_is_connected_call_exist(pcall_engine)) 
+       && (TRUE == voicecall_core_is_incoming_call_exists(pcall_engine)) 
+       && (TRUE == voicecall_snd_get_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_SPEAKER))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call: TRUE,Connected Call:FALSE, Speaker: TRUE. So change path to normal");
+               voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_SPEAKER, FALSE);
+               voicecall_snd_change_path(pcall_core->papp_snd);
+       }
+#endif
+
+       voicecall_core_clear_connected_call(pcall_engine, call_handle);
+
+       voicecall_core_get_total_call_member(pcall_engine, &total_call_member);
+       if (0 == total_call_member) {
+               voicecall_core_set_to_default(pcall_core);
+       }
+
+}
+
+static gboolean __voicecall_core_handle_rejected_call_end(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       voicecall_snd_stop_alert(pcall_core->papp_snd);
+
+       /*Send Incoming call End Event to Blue Tooth */
+       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+       if (FALSE == voicecall_core_is_connected_call_exist(pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No More Calls");
+               voicecall_core_set_to_default(pcall_core);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Setting Path for Voicecall");
+               /*Change Path to Call, when the incomging call is cancelled. */
+               voicecall_snd_change_path(pcall_core->papp_snd);
+               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_ACTIVE);
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Reject Call End Processed");
+       return TRUE;
+}
+
+static void __voicecall_core_handle_outgoingcall_end(call_vc_core_state_t *pcall_core, int call_handle, voice_call_end_cause_type_t end_cause_type)
+{
+       gboolean bsignal_play = FALSE;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle=:%d,end_cause=%d", call_handle, end_cause_type);
+       pcall_core->mo_end_call_handle = call_handle;
+       pcall_core->mo_end_cause_type = end_cause_type;
+
+       if (FALSE == voicecall_core_is_connected_call_exist(pcall_engine)) {
+               voicecall_snd_signal_type_t end_signal_type = VOICE_CALL_SIGNAL_NONE;
+               /*Play Signal Tone only when the connected calls are not exists */
+               end_signal_type = __voicecall_core_get_signal_type_from_endcause(end_cause_type);
+
+               if (end_signal_type != VOICE_CALL_SIGNAL_NONE) {
+                       voicecall_snd_set_signal_type(pcall_core->papp_snd, end_signal_type);
+                       voicecall_snd_play_signal(pcall_core->papp_snd, __voicecall_core_mocall_signal_play_end_cb, pcall_core);
+                       bsignal_play = TRUE;
+
+                       /* signal tone play case : just end string updated */
+                       {
+                               vc_engine_outgoing_end_signal_play_type event_data;
+
+                               /* normal outgong end */
+                               CALL_ENG_DEBUG(ENG_DEBUG, "It is normal outgong end case.");
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call_handle:[%d],end_cause_type:[%d]", call_handle, pcall_core->mo_end_cause_type);
+
+                               memset(&event_data, 0, sizeof(event_data));
+                               event_data.call_handle = call_handle;
+                               event_data.end_cause_type = pcall_core->mo_end_cause_type;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_END_SIGNAL_PLAY_TO_UI, (void *)&event_data);
+                       }
+
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Connected call exists, not playing signal tone");
+       }
+       if (TRUE == voicecall_core_is_connected_call_exist(pcall_engine)) {
+               /* Set phonestatus value */
+               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_ACTIVE);
+       } else if (FALSE == bsignal_play) {
+               /*Reset the Path. Actual path must be closed when modem path closed!! */
+               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+               _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+       } else {
+               /* othing to do. */
+       }
+       __voicecall_core_processing_mo_cancel(pcall_core);
+
+}
+
+static gboolean __voicecall_core_handle_incoming_call_end(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       voicecall_snd_stop_alert(pcall_core->papp_snd);
+
+       /*Send Incoming call End Event to Blue Tooth */
+       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+       if (FALSE == voicecall_core_is_connected_call_exist(pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No More Calls");
+               voicecall_core_set_to_default(pcall_core);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Setting Path for Voicecall");
+               /*Change Path to Call, when the incomging call is cancelled. */
+               voicecall_snd_change_path(pcall_core->papp_snd);
+               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_ACTIVE);
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Incoming Call End Processed");
+       return TRUE;
+}
+
+static gboolean voicecall_core_cb(int event, int param1, int param2, void *param3, void *puser_data)
+{
+       CALL_ENG_DEBUG(ENG_WARN, " Engine Event: %s(%d)", gszcall_engine_event[event], event);
+
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_engine->call_manager);
+
+       switch (event) {
+       case VC_CALL_INCOM:
+               {
+                       int call_handle = param1;
+                       char tel_number[VC_PHONE_NUMBER_LENGTH_MAX];
+                       gboolean bauto_reject = FALSE;
+                       gboolean bauto_reject_unknown = FALSE;
+                       gboolean restricted = FALSE;
+                       gboolean bcalling_namemode = FALSE;
+                       gboolean brejected_number = FALSE;
+                       vc_engine_incoming_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "tel_number:[%s]", (char *)param3);
+                       _vc_core_util_strcpy(tel_number, sizeof(tel_number), (char *)param3);
+
+#ifdef _NEW_SND_
+#else
+                       __voicecall_core_check_headset_earjack_status(pcall_core);
+#endif
+
+                       /*Changing the path to headset/phone will be decided by user accept action.
+                          This will apply for second incoming call, if the first call was accpeted by BT Headset
+                          and the path was changed to BT headset, then the path will be in headset for second call by default
+                          So reset the headset flag for second call so the path will not
+                          be automatically changed to headset, it will be decided by user action.
+                          If this requirement fits only for first incoming call then comment this fix. */
+                       /* vcui_app_snd_set_status(papp_document->papp_snd, VCUI_APP_AUDIO_HEADSET, FALSE); */
+
+                       /*Will be set based on user action */
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+                       if (_vc_core_util_check_video_call_status() == TRUE) {
+                               if (TRUE == __voicecall_core_silent_reject_mt(pcall_core, call_handle)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Call rejected due to silent reject");
+                                       return TRUE;
+                               }
+                       }
+
+                       /* Check for Restricted Mode */
+                       _vc_core_engine_status_isrestricted_call(pcall_engine, call_handle, &restricted);
+                       _vc_core_engine_status_get_calling_namemode(pcall_engine, call_handle, &bcalling_namemode);
+                       if (TRUE == bcalling_namemode) {
+                               call_vc_call_objectinfo_t call_object;
+
+                               voicecall_core_get_call_object(pcall_engine, call_handle, &call_object);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call_object.calling_name:[%s]", call_object.calling_name);
+
+                               _vc_core_util_strcpy(event_data.call_name, sizeof(event_data.call_name), call_object.calling_name);
+                       } else if (TRUE == restricted) {
+                               call_vc_call_objectinfo_t call_object;
+
+                               voicecall_core_get_call_object(pcall_engine, call_handle, &call_object);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "call_object.name_mode:[%s]", call_object.name_mode);
+
+                               event_data.brestricted = TRUE;
+                               if (call_object.name_mode == CALL_VC_NAME_MODE_PAYPHONE) {
+                                       event_data.bpayphone = TRUE;
+                               } else {
+                                       event_data.bpayphone = FALSE;
+
+                               }
+                               event_data.contact_index = -1;
+                               event_data.phone_type = -1;
+                       }
+
+                       /* send to ui */
+                       event_data.call_handle = call_handle;
+                       event_data.brejected = brejected_number;
+                       _vc_core_util_strcpy(event_data.call_num, sizeof(event_data.call_num), tel_number);
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_INCOM_TO_UI, (void *)&event_data);
+
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_PROHIBIT_DIMMING);
+
+                       /* in case of rejected number, sound & callstatus is not processed */
+                       if (!brejected_number) {
+                               gboolean benabledTestMode = FALSE;
+                               voicecall_snd_register_cm(pcall_core->papp_snd);
+
+                               /*Send Incoming Call Event to Blue Tooth */
+                               _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_INCOM, call_handle, tel_number);
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Preparing Sound ");
+                               voicecall_snd_prepare_alert(pcall_core->papp_snd, call_handle);
+                               if (FALSE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Changing MM Path just before playing the ring tone");
+                                       voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RING_TONE);
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "2nd MT call alert.");
+                               }
+                               voicecall_snd_play_alert(pcall_core->papp_snd);
+
+                               _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_CONNECTING);
+                       }
+
+               }
+               break;
+
+       case VC_CALL_OUTGOING:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO Call Start: Call handle %d", call_handle);
+               }
+               break;
+
+       case VC_CALL_OUTGOING_ORIG:
+               {
+                       int call_handle = param1;
+                       vc_engine_outgoing_orig_type event_data;
+                       call_vc_call_objectinfo_t callobject_info;
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.call_handle = call_handle;
+                       if (pcall_core->call_setup_info.call_type == VC_CALL_ORIG_TYPE_EMERGENCY) {
+                               event_data.bemergency = TRUE;
+                       } else {
+                               event_data.bemergency = FALSE;
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, bemergency:[%d]", event_data.call_handle, event_data.bemergency);
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI, (void *)&event_data);
+                       _voicecall_dvc_proximity_sensor_init(pcall_core);
+
+                       g_set_path_timer_handler = g_timeout_add(SET_PATH_TIMER_VALUE, __voicecall_core_set_path_timer_cb, pcall_core);
+
+                       /*Send Event to Blue Tooth */
+                       voicecall_core_get_call_object(pcall_engine, call_handle, &callobject_info);
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_ORIG, call_handle, callobject_info.tel_number);
+               }
+               break;
+
+       case VC_CALL_OUTGOING_ALERT:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       PRINT_CURRENT_TIME("Alert Indication received at ");
+
+                       event_data.call_handle = call_handle;
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_ALERT_TO_UI, (void *)&event_data);
+
+                       /*Play Connected Effect Tone */
+                       CALL_ENG_KPI("voicecall_snd_play_effect_tone start");
+                       if (FALSE == voicecall_snd_play_effect_tone(pcall_core->papp_snd, VOICE_CALL_SND_EFFECT_CALL_CONNECT)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_snd_play_effect_tone return value is FALSE");
+                               voicecall_snd_change_path(pcall_core->papp_snd);
+                       }
+                       CALL_ENG_KPI("voicecall_snd_play_effect_tone done");
+
+                       CALL_ENG_KPI("_vc_bt_send_response_to_bt start");
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_REMOTE_RINGING, call_handle, NULL);
+                       CALL_ENG_KPI("_vc_bt_send_response_to_bt done");
+               }
+               break;
+
+       case VC_CALL_ANSWER_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Answer confirm");
+                       if (_vc_core_cm_get_call_member_count(&(pcall_engine->call_manager)) == 1) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "single call state");
+                               voicecall_snd_change_path(pcall_core->papp_snd);
+                       }
+               }
+               break;
+
+       case VC_CALL_CONNECTED:
+               {
+                       int call_handle = param1;
+                       vc_engine_connected_type event_data;
+                       int bstatus = FALSE;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Connected Call Handle : %d", call_handle);
+
+                       event_data.call_handle = call_handle;
+                       event_data.bt_status = (int)_vc_bt_get_bt_status();
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_CONNECTED_TO_UI, (void *)&event_data);
+                       _voicecall_dvc_proximity_sensor_init(pcall_core);
+
+                       voicecall_snd_change_path(pcall_core->papp_snd);
+
+                       /* Set phonestatus value */
+                       _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_ACTIVE);
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+
+                       /* check minute minder */
+                       if (vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &bstatus)) {
+                               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.");
+                       }
+                       if (bstatus) {
+                               if (pcall_core->minute_minder_timer == 0) {
+                                       pcall_core->minute_minder_timer = g_timeout_add(MINUTE_MINDER_TIMEOUT_VALUE, __voicecall_core_minute_minder, pcall_core);
+                               }
+                       }
+
+                       /*Send Event to Blue Tooth */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_CONNECT, call_handle, NULL);
+
+                       /*Call is accepted, reset the flag */
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+#ifdef PDIAL_SEND_DTMF
+                       g_idle_add(voicecall_core_send_phone_number_dtmf, (gpointer) call_handle);
+#endif
+               }
+               break;
+
+       case VC_CALL_NORMAL_END:
+               {
+                       int call_handle = param1;
+                       voice_call_end_cause_type_t end_cause = param2;
+                       vc_engine_normal_end_type event_data;
+                       int active_call_members = -1;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Normal End Call Handle : %d,End Cause=%d", call_handle, end_cause);
+
+                       event_data.call_handle = call_handle;
+                       event_data.end_cause_type = end_cause;
+
+                       __voicecall_core_handle_normal_end(pcall_core, call_handle, end_cause);
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_NORMAL_END_TO_UI, (void *)&event_data);
+
+                       /*Send Event to Blue Tooth */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+               }
+               break;
+
+       case VC_CALL_INCOM_END:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call End Call Handle: %d", call_handle);
+
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+                       if (TRUE == __voicecall_core_handle_call_end_on_silent_reject(pcall_core, call_handle)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Call end processed for silent reject:");
+                               return TRUE;
+                       }
+
+                       event_data.call_handle = call_handle;
+
+                       __voicecall_core_handle_incoming_call_end(pcall_core, call_handle);
+
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_INCOM_END_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_INCOM_DROPPED:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Check it. Not used");
+               }
+               break;
+
+       case VC_CALL_REJECTED_END:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Rejected call End Call Handle: %d", call_handle);
+
+                       event_data.call_handle = call_handle;
+
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+                       __voicecall_core_handle_rejected_call_end(pcall_core, call_handle);
+
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_REJECTED_END_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_OUTGOING_END:
+               {
+                       int call_handle = param1;
+                       int end_cause_type = param2;
+                       int bauto_redial = -1;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "end cause type :[%d]", end_cause_type);
+
+                       if (vconf_get_bool(VCONFKEY_CISSAPPL_VOICE_AUTO_REDIAL_BOOL, &bauto_redial)) {
+                               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.");
+                       }
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "bauto_redial:[%d]", bauto_redial);
+
+                       if ((TRUE == bauto_redial) && (FALSE == voicecall_core_is_connected_call_exist(pcall_engine))
+                           && (FALSE == voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_MOCALL_END_BY_USER))
+                           && (TRUE == __voicecall_core_is_redial_cuase(end_cause_type))) {
+                               /* auto redial */
+                               CALL_ENG_DEBUG(ENG_DEBUG, "It is auto redial case.");
+
+                               _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+
+                               vc_engine_outgoing_end_type event_data;
+
+                               memset(&event_data, 0, sizeof(event_data));
+                               event_data.call_handle = call_handle;
+                               event_data.end_cause_type = end_cause_type;
+                               event_data.bauto_redial = TRUE;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_END_TO_UI, (void *)&event_data);
+                       } else {
+                               __voicecall_core_handle_outgoingcall_end(pcall_core, call_handle, end_cause_type);
+                       }
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+               }
+               break;
+
+       case VC_CALL_OUTGOING_ABORTED:
+               {
+                       vc_engine_common_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_ABORTED_TO_UI, (void *)&event_data);
+
+                       _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+               }
+               break;
+
+       case VC_CALL_DTMF_ACK:
+               {
+                       gboolean bsuccess = param1;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "bsuccess:[%d]", bsuccess);
+#ifdef PDIAL_SEND_DTMF
+                       __voicecall_core_handle_dtmf_ack(pcall_core, bsuccess);
+#endif
+               }
+               break;
+
+       case VC_CALL_AUTO_REDIAL_CHECK:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Check it. Not used");
+               }
+               break;
+
+       case VC_CALL_SS_HELD:
+               {
+                       int io_state = -1;
+                       int call_handle = param1;
+                       vc_engine_common_type event_data;
+                       PRINT_CURRENT_TIME("Call Hold Ends at");
+
+                       /*  held popup shold not be displayed on outgoing popup */
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_HELD_TO_UI, (void *)&event_data);
+
+                       /*Send Event to Blue Tooth */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_HOLD, call_handle, NULL);
+               }
+               break;
+
+       case VC_CALL_SS_RETREIVED:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_type event_data;
+                       PRINT_CURRENT_TIME("Call Retrieve Ends at");
+
+                       /*  held popup shold not be displayed on outgoing popup */
+                       memset(&event_data, 0, sizeof(event_data));
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_RETREIVED_TO_UI, (void *)&event_data);
+
+                       /*Send Event to Blue Tooth */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_RETRIEVE, call_handle, NULL);
+               }
+               break;
+
+       case VC_CALL_SS_SWAP:
+               {
+                       vc_engine_common_type event_data;
+
+                       int call_handle = param1;
+                       PRINT_CURRENT_TIME("Call Swap Ends at");
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       /* Show Call Swapped Message Box */
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_SWAP_TO_UI, (void *)&event_data);
+
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_SWAPPED, call_handle, NULL);
+               }
+               break;
+
+       case VC_CALL_SS_SETUP_CONF:
+               {
+                       vc_engine_common_type event_data;
+
+                       PRINT_CURRENT_TIME("Setup Conf Ends at");
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       /* Show Call Joined Message Box */
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_SETUP_CONF_TO_UI, (void *)&event_data);
+
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_JOINED, 0, NULL);
+               }
+               break;
+
+       case VC_CALL_SS_SPLIT_CONF:
+               {
+                       vc_engine_common_with_handle_type event_data;
+                       int call_handle = param1;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "The handle to be split is %d", call_handle);
+
+                       PRINT_CURRENT_TIME("Split Conf Ends at");
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.call_handle = call_handle;
+
+                       /* Show Private Call Message Box */
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_SPLIT_CONF_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_SS_TRANSFERRED:
+               {
+                       vc_engine_common_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_SS_TRANSFERRED_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_SS_CONNECT_LINE_IND:
+               {
+                       int call_handle = param1;
+                       char *pconnected_number = (char *)param3;
+                       vc_engine_msg_box_type event_data;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle : [%d]", call_handle);
+
+                       /* check whether Call Info for recevice Call Handle exists or not. */
+
+                       if ((pconnected_number != NULL) && (strlen(pconnected_number) > 0)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "connected line ind : [%s]", pconnected_number);
+
+                               memset(&event_data, 0, sizeof(event_data));
+
+                               event_data.string_id = IDS_CALL_POP_CALL_IS_DIVERTED;
+                               _vc_core_util_strcpy(event_data.diverted_num, sizeof(event_data.diverted_num), pconnected_number);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "No conneccted info");
+                       }
+
+               }
+               break;
+
+       case VC_CALL_IND_FORWARD:
+               {
+                       vc_engine_ind_forward_type event_data;
+                       int fwd_type = param1;
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.fwd_type = fwd_type;
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_FORWARD_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_IND_ACTIVATE:
+               {
+                       vc_engine_common_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_ACTIVATE_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_IND_HOLD:
+               {
+                       vc_engine_common_type event_data;
+                       int call_handle = param1;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_HOLD_TO_UI, (void *)&event_data);
+
+                       /*Send Event to Blue Tooth */
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_HOLD, call_handle, NULL);
+               }
+               break;
+
+       case VC_CALL_IND_TRANSFER:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+
+       case VC_CALL_IND_SETUPCONFERENCE:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+
+       case VC_CALL_IND_BARRING:
+               {
+                       vc_engine_common_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_BARRING_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_IND_WAITING:
+               {
+                       vc_engine_common_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_WAITING_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_IND_CUGINFO:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+
+       case VC_CALL_IND_SSNOTIFY:
+               {
+                       vc_engine_ind_ssnotify_type event_data;
+                       int ss_type = param1;
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.ss_type = ss_type;
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_IND_SSNOTIFY_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_CALL_IND_CALLINGNAMEINFO:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+       case VC_CALL_IND_ACTIVATECCBS_CNF:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+
+       case VC_CALL_IND_ACTIVATECCBS_USERINFO:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not used.");
+               }
+               break;
+
+       case VC_CALL_IND_AOC:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not yet.");
+               }
+               break;
+
+       case VC_ERROR_OCCURED:
+               {
+                       int error_code = param1;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "error code:[%d]", error_code);
+                       switch (error_code) {
+                       case ERROR_VOICECALL_INVALID_DTMF_CHAR:
+                       case ERROR_VOICECALL_DTMF_FAILED:
+                               {
+                                       vc_engine_error_occured_type event_data;
+
+                                       memset(&event_data, 0, sizeof(event_data));
+                                       event_data.error_code = error_code;
+
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_ERROR_OCCURED_TO_UI, (void *)&event_data);
+                               }
+                               break;
+                       default:
+                               {
+                                       vc_engine_msg_box_type event_data;
+                                       int string_id = -1;
+
+                                       string_id = __voicecall_core_get_string_id_by_errorcode(error_code);
+
+                                       memset(&event_data, 0, sizeof(event_data));
+                                       event_data.string_id = __voicecall_core_get_string_id_by_errorcode(error_code);
+
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               }
+                               break;
+                       }
+               }
+               break;
+
+       case VC_ACTION_INCOM_FORCE:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d", call_handle);
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.call_handle = call_handle;
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_ACTION_INCOM_FORCE_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_ACTION_SAT_REQUEST:
+               {
+                       if (SAT_RQST_SETUP_CALL == param1) {
+                               voicecall_sat_callinfo_t *psat_callinfo = (voicecall_sat_callinfo_t *) param3;
+                               vc_engine_outgoing_type event_data;
+
+                               if (psat_callinfo == NULL) {
+                                       CALL_ENG_DEBUG(ENG_ERR, "psat_callinfo is NULL..");
+                                       assert(psat_callinfo != NULL);
+                               } else {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "VC_ACTION_SAT_REQUEST is received by Voice call.");
+                                       pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_SAT;
+                                       pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_SAT;
+
+                                       /*Phone Number */
+                                       _vc_core_util_strcpy(pcall_core->call_setup_info.source_tel_number, VC_PHONE_NUMBER_LENGTH_MAX, psat_callinfo->call_number);
+                                       _vc_core_engine_extract_phone_number(pcall_core->call_setup_info.source_tel_number, pcall_core->call_setup_info.tel_number, VC_PHONE_NUMBER_LENGTH_MAX);
+
+                                       /*Name */
+                                       CALL_ENG_DEBUG(ENG_ERR, "psat_callinfo->disp_text:[%s]", psat_callinfo->disp_text);
+
+                                       memset(&event_data, 0, sizeof(event_data));
+                                       _vc_core_util_strcpy(event_data.call_num, sizeof(event_data.call_num), pcall_core->call_setup_info.tel_number);
+                                       event_data.contact_index = -1;
+                                       event_data.phone_type = -1;
+                                       _vc_core_util_strcpy(event_data.call_num, sizeof(event_data.call_num), psat_callinfo->disp_text);
+
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_TO_UI, (void *)&event_data);
+
+                                       /*Get Icon Information */
+                                       if (TRUE == psat_callinfo->bicon_present) {     /*bicon_present is TRUE when SAT icon info available and when GCF is enabled */
+                                               CALL_ENG_DEBUG(ENG_ERR, "SAT icon available.");
+                                       }
+
+                                       /* Prepare and Make Call with the Give Information */
+                                       if (FALSE == voicecall_core_setup_call(pcall_core, FALSE)) {
+                                               /*Send Response to SAT Engine */
+                                               voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SETUP_CALL, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+                                       }
+                               }
+                       } else if (SAT_RQST_SEND_DTMF == param1) {
+                               voicecall_sat_callinfo_t *psat_callinfo = (voicecall_sat_callinfo_t *) param3;
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "SAT Send DTMF Number: %s, hidden: %d", psat_callinfo->call_number, psat_callinfo->bsat_hidden);
+                               __voicecall_core_queue_dtmf_string(pcall_core, psat_callinfo->call_number, TRUE);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "Invalid SAT Request Type: %d", param2);
+                       }
+               }
+               break;
+
+       case VC_ACTION_SAT_RESPONSE:
+               {
+                       if (SAT_RESP_SETUP_CALL == param1) {
+                               voicecall_sat_callinfo_t *psat_call_info = (voicecall_sat_callinfo_t *) param3;
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "sat_mo_call_ctrl_res = %d", psat_call_info->sat_mo_call_ctrl_res);
+
+                               if (CALL_NOT_ALLOWED == psat_call_info->sat_mo_call_ctrl_res) {
+                                       vc_engine_msg_box_type event_data;
+
+                                       memset(&event_data, 0, sizeof(event_data));
+                                       event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               } else if (CALL_ALLOWED_WITH_MOD == psat_call_info->sat_mo_call_ctrl_res) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "psat_call_info->call_number = [%s]", psat_call_info->call_number);
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "psat_call_info->disp_text = [%s]", psat_call_info->disp_text);
+#ifdef _OLD_SAT_
+                                       mocall_index = vcui_app_doc_get_mocall_index(papp_document);
+
+                                       /*Update MO CALL Display Data with the SAT modified info */
+                                       if (mocall_index != -1) {
+                                               vcui_app_call_display_data_t display_data;
+                                               vcui_app_call_display_data_t new_display_data;
+                                               vcui_app_view_mo_state_t *pmo_state = NULL;
+
+                                               if (FALSE == vcui_app_cdm_get_display_object_byindex(&papp_document->call_display_manager, mocall_index, &display_data)) {
+                                                       return TRUE;
+                                               }
+
+                                               vcui_app_cdm_clear_display_object(&new_display_data);
+
+                                               /*Copy all must parameters required for MO Call */
+                                               new_display_data.call_handle = display_data.call_handle;
+                                               new_display_data.call_index = display_data.call_index;
+                                               new_display_data.call_type = display_data.call_type;
+                                               new_display_data.start_time = display_data.start_time;
+                                               new_display_data.used = display_data.used;
+
+                                               if (strlen(psat_call_info->call_number) > 0) {
+                                                       vcui_app_util_strcpy(new_display_data.source_tel_number, sizeof(new_display_data.source_tel_number), psat_call_info->call_number);
+                                                       _vc_core_engine_extract_phone_number(new_display_data.source_tel_number, new_display_data.tel_number, VC_PHONE_NUMBER_LENGTH_MAX);
+                                               }
+
+                                               if (strlen(psat_call_info->disp_text) > 0) {
+                                                       vcui_app_util_strcpy(new_display_data.name, sizeof(new_display_data.name), psat_call_info->disp_text);
+                                               }
+
+                                               /* todo, Check whether contact search need to be done for the SAT modified number */
+
+                                               /*Set the newly modified data to the CDM */
+                                               vcui_app_cdm_set_display_object(pdisplay_mgr, &new_display_data);
+
+                                               /*Update the MO View */
+                                               pmo_state = (vcui_app_view_mo_state_t *) calloc(1, sizeof(vcui_app_view_mo_state_t));
+                                               pmo_state->mo_call_state = VCUI_MO_CALL_STATE_UPDATE;
+
+                                               /* Update MO Call Screen View to update the connection status */
+                                               dv_view_manager_update_view(dv_document_get_view_manager(DV_DOCUMENT(papp_document)), VCUI_APP_VIEWID_MO_VIEW, VCUI_APP_UPD_MO_SET_STATE, pmo_state);
+
+                                       } else {
+                                               VCUI_DEBUG(VCUI_LOG_ERR, "Invalid Mo Call Index: %d", mocall_index);
+                                       }
+#endif
+                               } else if (CALL_CHANGED_TO_SS == psat_call_info->sat_mo_call_ctrl_res) {
+                                       /*Issue notification to Launch SS */
+                               }
+                       }
+               }
+               break;
+
+       case VC_ACTION_CALL_END_HELD_RETREIVED:
+               {
+                       int call_handle = param1;
+                       vc_engine_common_with_handle_type event_data;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "call handle:[%d]", call_handle);
+
+                       memset(&event_data, 0, sizeof(event_data));
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_ACTION_CALL_END_HELD_RETREIVED_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       case VC_ACTION_NO_ACTIVE_TASK:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Not yet.");
+               }
+               break;
+
+       case VC_CALL_GET_VOLUME_RESP:
+               {
+                       vc_engine_vol_resp_type event_data;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Current Voicecall (TAPI)Volume Type %d, Current Volume Level: %d", param1, param2);
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.vol_alert_type = VOICE_CALL_VOL_TYPE_VOICE;
+                       event_data.vol_level = param2;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI, (void *)&event_data);
+               }
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, " Engine Event ID : %d not handled", event);
+               break;
+       }
+
+       CALL_VC_DUMP_CALLDETAILS(&pcall_engine->call_manager);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " Ended.");
+
+       return TRUE;
+}
+
+/**
+ * This function converts Error Code to string id.
+ *
+ * @return             string id
+ * @param[in]          error_code              error code to be used to display the message content
+ */
+static int __voicecall_core_get_string_id_by_errorcode(int error_code)
+{
+       int string_id = -1;
+       switch (error_code) {
+       case ERROR_VOICECALL_DTMF_FAILED:
+               string_id = IDS_CALL_POP_DTMFSENDING_FAIL;
+               break;
+
+       case ERROR_VOICECALL_CALL_NOT_ALLOWED:
+               string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+               break;
+
+       case ERROR_VOICECALL_CALL_IMPOSSIBLE_NOSIM_NOEMERGNUM:
+               string_id = IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE;
+               break;
+
+       case ERROR_VOICECALL_EMERGENCY_CALLS_ONLY:
+               string_id = IDS_CALL_POP_CALLING_EMERG_ONLY;
+               break;
+
+       case ERROR_VOICECALL_PHONE_NOT_INITIALIZED:
+               string_id = IDS_CALL_POP_PHONE_NOT_INITIALISED;
+               break;
+
+       case ERROR_VOICECALL_ANSWER_FAILED:
+               string_id = IDS_CALL_POP_CALLFAILED;
+               break;
+
+       case ERROR_VOICECALL_HOLD_REJECTED:
+       case ERROR_VOICECALL_HOLD_FAILED:
+               string_id = IDS_CALL_POP_HOLD_FAILED;
+               break;
+
+       case ERROR_VOICECALL_ACTIVATE_REJECTED:
+       case ERROR_VOICECALL_RETREIVE_FAILED:
+               string_id = IDS_CALL_POP_UNABLE_TO_RETRIEVE;
+               break;
+
+       case ERROR_VOICECALL_SWAP_REJECTED:
+       case ERROR_VOICECALL_SWAP_FAILED:
+               string_id = IDS_CALL_POP_SWAP_FAILED;
+               break;
+
+       case ERROR_VOICECALL_SPLIT_CONF_FAILED:
+               string_id = IDS_CALL_POP_SPLIT_FAILED;
+               break;
+
+       case ERROR_VOICECALL_SETUP_CONF_FAILED:
+               string_id = IDS_CALL_POP_JOIN_FAILED;
+               break;
+
+       case ERROR_VOICECALL_TRANSFER_FAILED:
+               string_id = IDS_CALL_POP_TRANSFER_FAILED;
+               break;
+
+       case ERROR_VOICECALL_SWAP_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_SWAP_NOT_SUPPORTED;
+               break;
+
+       case ERROR_VOICECALL_HOLD_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_HOLD_NOT_SUPPORTED;
+               break;
+
+       case ERROR_VOICECALL_RETREIVE_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_UNHOLD_NOT_SUPPORTED;
+               break;
+
+       case ERROR_VOICECALL_SETUP_CONF_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_JOIN_NOT_SUPPORTED;
+               break;
+
+       case ERROR_VOICECALL_SPLIT_CONF_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_SPLIT_NOT_SUPPORTED;
+               break;
+       case ERROR_VOICECALL_TRANSFER_NOT_SUPPORTED:
+               string_id = IDS_CALL_POP_TRANSFER_NOT_SUPPORTED;
+               break;
+
+       case ERROR_VOICECALL_INCOMPLETE:
+               string_id = IDS_CALL_POP_INCOMPLETE;
+               break;
+
+       case ERROR_VOICECALL_UNAVAILABLE:
+               string_id = IDS_CALL_POP_UNAVAILABLE;
+               break;
+
+       case ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED:
+               string_id = IDS_CALL_POP_CALLFAILED;
+               break;
+
+       case ERROR_VOICECALL_INVALID_CALL_TYPE:
+       case ERROR_VOICECALL_INVALID_TELEPHONE_NUMBER:
+               string_id = IDS_CALL_POP_CAUSE_WRONG_NUMBER;
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, " Invalid Error Code: %x", error_code);
+               string_id = IDS_CALL_POP_CALLFAILED;
+               break;
+       }
+       return string_id;
+}
+
+gboolean voicecall_core_set_to_default(call_vc_core_state_t *pcall_core)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+       if (pcall_core->pcall_engine == NULL)
+               return FALSE;
+
+       /*Set Engine states to default */
+       _vc_core_engine_set_to_default_values(pcall_core->pcall_engine);
+
+       /*Initialize MO Call Setup Info */
+       pcall_core->call_setup_info.mo_call_index = VC_TAPI_INVALID_CALLHANDLE;
+       pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+
+       pcall_core->call_setup_info.mo_call_index = VC_TAPI_INVALID_CALLHANDLE;
+       pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+       memset(pcall_core->call_setup_info.tel_number, 0, sizeof(pcall_core->call_setup_info.tel_number));
+
+       pcall_core->mo_redial_timer = -1;
+       __vc_core_set_auto_redial_count(pcall_core, 0);
+
+       _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_NONE, TRUE);
+       _vc_core_util_set_sleep_status(CALL_VC_POWER_NORMAL_STATUS);
+
+       pcall_core->bt_connected = _vc_bt_get_bt_status();
+       if (FALSE == pcall_core->bt_connected) {
+#ifdef _NEW_SND_
+               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);                              
+#else
+               voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_HEADSET, pcall_core->bt_connected);
+#endif
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "BT connected, Not changing the sound status");
+       }
+
+       /* sound reset */
+       voicecall_snd_unregister_cm(pcall_core->papp_snd);
+
+       return TRUE;
+}
+
+static void __voicecall_core_mocall_reset_engine_state(voicecall_engine_t *pcall_engine)
+{
+       int eng_state = VC_INOUT_STATE_NONE;
+
+       voicecall_core_get_engine_state(pcall_engine, &eng_state);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "current engine state is: %d", eng_state);
+
+       if ((eng_state > VC_INOUT_STATE_OUTGOING_START) && (eng_state < VC_INOUT_STATE_OUTGOING_END)) {
+               voicecall_core_change_engine_state(pcall_engine, VC_INOUT_STATE_NONE);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Engine state is already changed, current engine state is: %d", eng_state);
+               CALL_VC_DUMP_CALLDETAILS(&pcall_engine->call_manager);
+       }
+}
+
+/**
+ * This function initialize voicecall core
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          pcallback_func  callback function
+ */
+int voicecall_core_init(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = NULL;
+
+       if (ERROR_VOICECALL_NONE != _vc_core_engine_init(&pcall_engine, (voicecall_cb) voicecall_core_cb, pcall_core)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Voicecall Engine Init Failed");
+               return FALSE;
+       }
+
+       if (FALSE == voicecall_snd_init(pcall_core, &pcall_core->papp_snd)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_snd_init() failed");
+               return FALSE;
+       }
+       /*Store Voicecall Engine Handle */
+       pcall_core->pcall_engine = pcall_engine;
+
+       _vc_bt_status_init(pcall_core);
+
+       _voicecall_dvc_earjack_init(pcall_core);
+       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_NONE, TRUE);
+       return TRUE;
+}
+
+/**
+ * This function prepares a voice call with the given data
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          bemergency              emergency call or not from dialer
+ * @param[in]          
+ */
+gboolean voicecall_core_setup_call(call_vc_core_state_t *pcall_core, gboolean bemergency)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+       voicecall_setup_info_t setupcall_info = { 0, };
+       voicecall_error_t error_code = -1;
+       gboolean bemergency_call = FALSE;
+       int io_state;
+       gboolean bmocall_exists = FALSE;
+       gboolean bmtcall_exists = FALSE;
+       int nw_status = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SOS_CALL_ONLY, bemergency);
+
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_OUTGOING_CALL, &bmocall_exists);
+       if (TRUE == bmocall_exists) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "MO call is in progress...");
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               return FALSE;
+       }
+
+       /*Ignore the MO Call, if already an Incoming call is in progress, MT Call is given high priority */
+       _vc_core_engine_status_isexists_call_bytype(pcall_engine, VC_INCOMING_CALL, &bmtcall_exists);
+       if (TRUE == bmtcall_exists) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "MT call is in progress");
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               return FALSE;
+       }
+
+       if (TRUE == _vc_core_util_check_video_call_status()) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Voice call is not allowed during video call...");
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.string_id = IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+               return FALSE;
+       }
+
+       if (TRUE == _vc_core_util_get_SAP_status()) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "SAP is on");
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.string_id = IDS_CALL_POP_UNAVAILABLE;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+               return FALSE;
+       }
+
+       /*Prpare a call with the Voicecall Engine */
+       setupcall_info.call_type = pcall_core->call_setup_info.call_type;
+       _vc_core_util_strcpy(setupcall_info.source_tel_number, sizeof(setupcall_info.source_tel_number), pcall_core->call_setup_info.source_tel_number);
+       _vc_core_util_strcpy(setupcall_info.tel_number, sizeof(setupcall_info.tel_number), pcall_core->call_setup_info.tel_number);
+
+       /*Get CUG Details */
+       _vc_core_util_get_cug_info(&setupcall_info);
+
+       /*Get Identity Mode */
+       _vc_core_util_get_identity_mode(&setupcall_info);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "identity_mode = [%d], tel_number = [%s]", setupcall_info.identity_mode, setupcall_info.tel_number);
+
+       error_code = _vc_core_engine_prepare_call(pcall_engine, &setupcall_info);
+       if (ERROR_VOICECALL_NONE != error_code) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_engine_prepare_call failed, error code: %d", error_code);
+               _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.string_id = __voicecall_core_get_string_id_by_errorcode(error_code);
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+               return FALSE;
+       }
+       pcall_core->call_setup_info.call_type = setupcall_info.call_type;
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_type:[%d]", pcall_core->call_setup_info.call_type);
+
+       pcall_core->call_setup_info.mo_call_index = setupcall_info.mo_call_index;
+       if (TRUE == _vc_core_util_is_offline_mode()) {
+               _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.string_id = IDS_CALL_POP_CHANGEOFFLINEMODETOCALL;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+               return FALSE;
+       }
+
+       /* Check for Following Conditions , only if not emergency Number */
+       CALL_ENG_DEBUG(ENG_DEBUG, "mo_call_index = [%d]", setupcall_info.mo_call_index);
+       error_code = _vc_core_engine_status_check_emergency_byindex(pcall_engine, setupcall_info.mo_call_index, &bemergency_call);
+       if (ERROR_VOICECALL_NONE != error_code) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Emergency Check Error code: %d", error_code);
+       }
+
+       /*Check PwLock */
+       if (TRUE == _vc_core_util_is_pwlock()) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "PwLock is enabled.");
+               if (bemergency_call == FALSE) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Only emergency call is possible.");
+                       _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+
+                       vc_engine_msg_box_type event_data;
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.string_id = IDS_CALL_POP_CALLING_EMERG_ONLY;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+                       return FALSE;
+               }
+       }
+
+       /*Check for the following cases, if the call is not emergency call */
+       if (FALSE == bemergency_call) {
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               /* Check for NW Status and Emergency Mode */
+               if (FALSE == _vc_core_util_get_nw_status(&nw_status)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Can't get a network status...");
+                       _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+
+                       event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+                       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+                       return FALSE;
+               } else {
+                       if ((VCONFKEY_TELEPHONY_SVCTYPE_NONE == nw_status) || (VCONFKEY_TELEPHONY_SVCTYPE_NOSVC == nw_status) || (VCONFKEY_TELEPHONY_SVCTYPE_SEARCH == nw_status)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "No Service: Call not Allowed");
+                               _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+                               event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+                               return FALSE;
+                       } else if ((VCONFKEY_TELEPHONY_SVCTYPE_EMERGENCY == nw_status)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Emergency mode: Emergency call only...");
+                               _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+                               event_data.string_id = IDS_CALL_POP_CALLING_EMERG_ONLY;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+                               return FALSE;
+                       } else {
+                               /* ok. */
+                       }
+
+               }
+
+#ifdef VC_ENG_FDN_SUPPORT
+               /*Check FDN Status */
+               if (setupcall_info.call_setup_by != VC_CALL_SETUP_BY_SAT) {
+                       if (FALSE == voicecall_core_check_fdn_status(pcall_core)) {
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+                               return FALSE;
+                       }
+               }
+#endif
+
+               /*Check for voicemail number if it is not an emergency call */
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "MO Call Setup OVer");
+
+#ifdef _NEW_SND_
+       if(_vc_bt_get_bt_status() == TRUE){
+               voicecall_snd_set_path_status(pcall_core->papp_snd,VOICE_CALL_SND_PATH_BT);
+       }
+#endif
+
+       voicecall_core_make_call(pcall_core);
+
+       return TRUE;
+}
+
+/**
+ * This function makes the actual voicecall prepared by the #voicecall_core_setup_call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_make_call(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+       int call_handle = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       _vc_core_util_set_sleep_status(CALL_VC_POWER_PROHIBIT_DIMMING);
+
+       /*Make Actual Call with Voicecall Engine */
+       error_code = _vc_core_engine_make_call(pcall_engine, pcall_core->call_setup_info.mo_call_index, &call_handle);
+       if (ERROR_VOICECALL_NONE != error_code) {
+               vc_engine_msg_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+
+               _vc_core_engine_finalize_call(pcall_engine, VC_OUTGOING_CALL, -1);
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_engine_make_call Failed: Error_Code: %d..", error_code);
+
+               switch (error_code) {
+               case ERROR_VOICECALL_TAPI_CAUSE_CALL_FAILED:
+                       event_data.string_id = IDS_CALL_POP_CALLFAILED;
+                       break;
+
+               case ERROR_VOICECALL_CALL_IMPOSSIBLE_NOSIM_NOEMERGNUM:
+                       event_data.string_id = IDS_CALL_POP_CALLFAILED;
+                       break;
+
+               default:
+                       event_data.string_id = IDS_CALL_BODY_CALLENDED;
+                       break;
+               }
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+
+               _vc_core_util_set_sleep_status(CALL_VC_POWER_GRANT_DIMMING);
+
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle After Setup Call %d.", call_handle);
+
+       voicecall_snd_register_cm(pcall_core->papp_snd);
+
+       /* Set phonestatus value */
+       _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_CONNECTING);
+
+       return TRUE;
+}
+
+/**
+ * This function processed sat setup call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          
+*/
+gboolean voicecall_core_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+       TelSatSetupCallIndCallData_t *SatSetupCallIndCallInfo = NULL;
+
+       SatSetupCallIndCallInfo = (TelSatSetupCallIndCallData_t *) calloc(1, sizeof(TelSatSetupCallIndCallData_t));
+       if (NULL == SatSetupCallIndCallInfo)
+               return FALSE;
+
+       SatSetupCallIndCallInfo->commandId = sat_setup_call_info->command_id;
+       SatSetupCallIndCallInfo->calltype = sat_setup_call_info->command_qualifier;
+       SatSetupCallIndCallInfo->dispText.stringLen = strlen(sat_setup_call_info->disp_text);
+       memcpy(SatSetupCallIndCallInfo->dispText.string, sat_setup_call_info->disp_text, strlen(sat_setup_call_info->disp_text));
+
+       SatSetupCallIndCallInfo->callNumber.stringLen = strlen(sat_setup_call_info->call_num);
+       memcpy(SatSetupCallIndCallInfo->callNumber.string, sat_setup_call_info->call_num, strlen(sat_setup_call_info->call_num));
+
+       SatSetupCallIndCallInfo->duration = sat_setup_call_info->duration;
+
+       _vc_core_engine_handle_sat_events_cb(SatSetupCallIndCallInfo, NULL);
+
+       if (SatSetupCallIndCallInfo) {
+               free(SatSetupCallIndCallInfo);
+               SatSetupCallIndCallInfo = NULL;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "End..");
+
+       return TRUE;
+}
+
+/**
+ * This function processed incoming call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          
+*/
+gboolean voicecall_core_process_incoming_call(call_vc_core_incoming_info_t *incoming_call_info)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+       TelCallIncomingCallInfo_t *IncomingCallInfo = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " number is : [%s]", incoming_call_info->call_num);
+
+       IncomingCallInfo = (TelCallIncomingCallInfo_t *) malloc(sizeof(TelCallIncomingCallInfo_t));
+       if (NULL == IncomingCallInfo)
+               return FALSE;
+       memset(IncomingCallInfo, 0, sizeof(IncomingCallInfo));
+
+       IncomingCallInfo->CallHandle = incoming_call_info->call_handle;
+       IncomingCallInfo->CallType = incoming_call_info->call_type;
+       IncomingCallInfo->CliPresentationIndicator = incoming_call_info->cli_presentation_indicator;
+       _vc_core_util_strcpy(IncomingCallInfo->szCallingPartyNumber, sizeof(IncomingCallInfo->szCallingPartyNumber), incoming_call_info->call_num);
+       IncomingCallInfo->CallingNameInfo.NameMode = incoming_call_info->calling_name_mode;
+       _vc_core_util_strcpy(IncomingCallInfo->CallingNameInfo.szNameData, sizeof(IncomingCallInfo->CallingNameInfo.szNameData), incoming_call_info->calling_name);
+       _vc_core_util_strcpy(IncomingCallInfo->RedirectInfo.szRedirectedNumber, sizeof(IncomingCallInfo->RedirectInfo.szRedirectedNumber), incoming_call_info->redirected_number);
+       _vc_core_util_strcpy(IncomingCallInfo->RedirectInfo.szRedirectSubAddress, sizeof(IncomingCallInfo->RedirectInfo.szRedirectSubAddress), incoming_call_info->redirected_sub_address);
+       IncomingCallInfo->CliCause = incoming_call_info->cli_cause;
+       IncomingCallInfo->fwded = incoming_call_info->bfwded;
+       IncomingCallInfo->ActiveLine = incoming_call_info->active_line;
+
+       _vc_core_engine_handle_incoming_tapi_events(IncomingCallInfo, NULL);
+
+       if (IncomingCallInfo) {
+               free(IncomingCallInfo);
+               IncomingCallInfo = NULL;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "End..");
+
+       return TRUE;
+}
+
+/**
+ * This function answers an incoming call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          
+*/
+gboolean voicecall_core_answer_call(call_vc_core_state_t *pcall_core, gboolean auto_accept)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       gboolean active_calls = FALSE;
+       gboolean held_calls = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       /*First Stop the Incoming alert */
+       voicecall_snd_stop_alert(pcall_core->papp_snd);
+
+       _vc_core_engine_status_isexists_any_call(pcall_engine, &active_calls, &held_calls);
+       CALL_ENG_DEBUG(ENG_DEBUG, "active_calls=%d, held_calls=%d", active_calls, held_calls);
+
+       if (TRUE == active_calls && TRUE == held_calls) {
+               /* Both Active and held calls available, so show Accept Call Choice Box */
+               vc_engine_accept_choice_box_type event_data;
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.choice = VC_CALL_ACCEPT_2;
+
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI, (void *)&event_data);
+
+               return TRUE;
+       } else if (TRUE == active_calls) {
+               /*If Auto Accpet is FALSE, show popup for manual accept */
+               if (FALSE == auto_accept) {
+                       /* Active  calls available, so show Accept Call Choice Box */
+                       vc_engine_accept_choice_box_type event_data;
+
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.choice = VC_CALL_ACCEPT_1;
+
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI, (void *)&event_data);
+               } else {
+                       voicecall_core_answer_call_bytype(pcall_core, VC_ANSWER_HOLD_ACTIVE_AND_ACCEPT);
+               }
+               return TRUE;
+       } else if (TRUE == held_calls) {
+               /* vcui_app_view_mtcall_destroy(papp_document); */
+       }
+
+       /* Normal Call Scenario */
+       voicecall_core_answer_call_bytype(pcall_core, VC_ANSWER_NORMAL);
+
+       return TRUE;
+}
+
+/**
+ * This function answers an incoming call  according to the given type
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_answer_call_bytype(call_vc_core_state_t *pcall_core, voicecall_answer_type_t answer_type)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "answer type: %d", answer_type);
+
+       /*First Stop the Incoming alert */
+       voicecall_snd_stop_alert(pcall_core->papp_snd);
+
+       error_code = _vc_core_engine_answer_call(pcall_engine, answer_type);
+
+       if (ERROR_VOICECALL_NONE != error_code) {
+               CALL_ENG_DEBUG(ENG_ERR, "_vc_core_engine_answer_call Failed : %d", error_code);
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+* This function rejects an incoming call
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_core              Handle to voicecall core
+* @param[in]           bUDUB                   TRUE - set UDUB, FALSE - reject call
+*/
+gboolean voicecall_core_reject_mt(call_vc_core_state_t *pcall_core, gboolean bUDUB)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       /*Incoming call rejected, reset the accept by flag */
+       voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT, FALSE);
+
+       /* Stop Incmoing Call Alert */
+       voicecall_snd_stop_alert(papp_snd);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bUDUB = %d", bUDUB);
+       error_code = _vc_core_engine_reject_call(pcall_engine, bUDUB);
+
+       if (ERROR_VOICECALL_NONE != error_code) {
+               CALL_ENG_DEBUG(ENG_ERR, "_vc_core_engine_reject_call Failed, error_code = %ud", error_code);
+               return FALSE;
+       }
+
+       return TRUE;
+
+}
+
+/**
+ * This function ends the call by state
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_end_call(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call(pcall_engine, VC_END_ACTIVE_OR_HELD_CALLS)) ? TRUE : FALSE;
+}
+
+/**
+ * This function ends the call corresponding to the given call handle
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          call_handle             handle of the call to be ended
+ */
+gboolean voicecall_core_end_call_by_handle(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call_byhandle(pcall_engine, call_handle)) ? TRUE : FALSE;
+}
+
+/**
+ * This function ends all available calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_end_all_calls(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call(pcall_engine, VC_END_ALL_CALLS)) ? TRUE : FALSE;
+}
+
+/**
+ * This function ends all available active calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_end_all_active_calls(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call(pcall_engine, VC_END_ALL_ACTIVE_CALLS)) ? TRUE : FALSE;
+}
+
+/**
+ * This function ends all available held calls
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ */
+gboolean voicecall_core_end_all_held_calls(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_end_call(pcall_engine, VC_END_ALL_HELD_CALLS)) ? TRUE : FALSE;
+}
+
+/**
+ * This function cancel outgoing call
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_core_cancel_call(call_vc_core_state_t *pcall_core)
+{
+       int io_state = 0;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       voicecall_call_type_bysetup_t call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       /*Get Call Setup by Information */
+       call_setup_by = pcall_core->call_setup_info.call_setup_by;
+
+       _vc_core_engine_status_get_engine_iostate(pcall_engine, &io_state);
+
+       switch (io_state) {
+       case VC_INOUT_STATE_OUTGOING_WAIT_HOLD:
+               {
+                       int call_handle = -1;
+
+                       if (VC_CALL_SETUP_BY_SAT == call_setup_by) {
+                               _vc_core_engine_send_sat_response(pcall_engine, SAT_RQST_SETUP_CALL, CALL_VC_ME_CLEAR_DOWN_BEFORE_CONN);
+                       }
+
+                       /* Clear the MO Call, since the call is not dialed yet */
+                       _vc_core_engine_status_get_call_handle_bytype(pcall_engine, VC_OUTGOING_CALL, &call_handle);
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+                       __vc_core_set_auto_redial_count(pcall_core, 0);
+                       voicecall_core_clear_mo_call(pcall_engine);
+
+                       _vc_core_engine_change_engine_iostate(pcall_engine, VC_INOUT_STATE_OUTGOING_ABORTED);
+               }
+               return TRUE;
+
+       case VC_INOUT_STATE_OUTGOING_WAIT_ORIG:
+       case VC_INOUT_STATE_OUTGOING_WAIT_ALERT:
+       case VC_INOUT_STATE_OUTGOING_WAIT_CONNECTED:
+               {
+                       /*To retrieve the held call automatically once the mo call is ended, if held is call is available */
+                       _vc_core_engine_status_set_end_flag(pcall_engine, VC_RETREIVE_CALL_ON_MOCALL_END);
+
+                       /* release the call , since it is dialed and waiting for connecting */
+                       if (FALSE == voicecall_core_end_mo_call(pcall_engine)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "MO Call Release Failed");
+                       } else {
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_MOCALL_END_BY_USER, TRUE);
+                               _vc_core_engine_change_engine_iostate(pcall_engine, VC_INOUT_STATE_OUTGOING_WAIT_RELEASE);
+                       }
+               }
+               return TRUE;
+
+       case VC_INOUT_STATE_OUTGOING_WAIT_RELEASE:
+               {
+                       /*Call already released */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO Call has been released already");
+               }
+               return TRUE;
+
+       case VC_INOUT_STATE_OUTGOING_SHOW_REDIALCAUSE:
+       case VC_INOUT_STATE_OUTGOING_ABORTED:
+       case VC_INOUT_STATE_OUTGOING_WAIT_REDIAL:
+               {
+                       int call_handle = -1;
+
+                       if (VC_CALL_SETUP_BY_SAT == call_setup_by) {
+                               _vc_core_engine_send_sat_response(pcall_engine, SAT_RQST_SETUP_CALL, CALL_VC_NETWORK_UNABLE_TO_PROCESS_COMMAND);
+                       }
+
+                       /*Stop Signal Play */
+                       voicecall_snd_stop_signal(pcall_core->papp_snd);
+
+                       __voicecall_core_mocall_reset_engine_state(pcall_engine);
+
+                       _vc_core_engine_status_get_call_handle_bytype(pcall_engine, VC_OUTGOING_CALL, &call_handle);
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+                       __vc_core_set_auto_redial_count(pcall_core, 0);
+                       voicecall_core_clear_mo_call(pcall_engine);
+
+               }
+               return TRUE;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Action not defined for this IO State: %d", io_state);
+               break;
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function process hold/retrive/swap conntected call
+ *
+ * @return             Returns TRUE -if answer is sucess, FALSE - otherwise
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_core_process_hold_call(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       gboolean active_calls = FALSE;
+       gboolean held_calls = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (TRUE == voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_SOS_CALL_ONLY)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "SOS Call... Ignore this button...");
+               return TRUE;
+       }
+
+       if (FALSE == voicecall_core_is_incall_request_possible(pcall_engine)) {
+               return TRUE;
+       }
+
+       voicecall_core_is_call_exists(pcall_engine, &active_calls, &held_calls);
+       CALL_ENG_DEBUG(ENG_DEBUG, "active calls: %d, held calls: %d", active_calls, held_calls);
+
+       if (active_calls && held_calls) {
+               /*Both Calls available, swap the calls */
+               if (FALSE == voicecall_core_swap_calls(pcall_engine)) {
+                       return FALSE;
+               }
+       } else if (active_calls) {
+               /*Only activa call available, hold the call */
+               if (FALSE == voicecall_core_hold_call(pcall_engine)) {
+                       return FALSE;
+               }
+       } else if (held_calls) {
+               /*Only Held call available, retrieve the call */
+               if (FALSE == voicecall_core_retrieve_call(pcall_engine)) {
+                       return FALSE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "no call exists!");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function sets up a conference call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_core_setup_conference(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       PRINT_CURRENT_TIME("Setup Conf Start at");
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_setup_conference(pcall_engine)) ? TRUE : FALSE;
+}
+
+/**
+ * This function splits the call corressponding to the given call handle and makes a private call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ * @param[in]          call_handle             Call to be splitted from the conference call
+ */
+gboolean voicecall_core_make_private_call(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       PRINT_CURRENT_TIME("Split Conf Start at");
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_private_call(pcall_engine, call_handle)) ? TRUE : FALSE;
+}
+
+/**
+ * This function transfers the call from active call to the held call
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_core_transfer_calls(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_transfer_calls(pcall_engine)) ? TRUE : FALSE;
+}
+
+/**
+ * This function sends a dtmf string
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core                
+ * @param[in]          dtmf_string             dtmf string to be sent
+ */
+gboolean voicecall_core_send_dtmf(call_vc_core_state_t *pcall_core, char *dtmf_string)
+{
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+       CALL_ENG_DEBUG(ENG_DEBUG, "dtmf string: %s", dtmf_string);
+
+       pcall_core->bdtmf_queue = FALSE;
+       error_code = _vc_core_engine_send_dtmf(pcall_core->pcall_engine, dtmf_string);
+       return (ERROR_VOICECALL_NONE == error_code) ? TRUE : FALSE;
+}
+
+/**
+* This function stops sound alert
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           pcall_core              Handle to voicecall core
+*/
+gboolean voicecall_core_stop_alert(call_vc_core_state_t *pcall_core)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       /* Stop Incmoing Call Alert */
+       voicecall_snd_stop_alert(pcall_core->papp_snd);
+
+       return TRUE;
+}
+
+inline gboolean voicecall_core_get_mo_call_handle(call_vc_core_state_t *pcall_core, int *pcall_handle)
+{
+       *pcall_handle = -1;
+       return (ERROR_VOICECALL_NONE == _vc_core_engine_status_get_call_handle_bytype(pcall_core->pcall_engine, VC_OUTGOING_CALL, pcall_handle)) ? TRUE : FALSE;
+}
+
+inline int voicecall_core_get_auto_redial_count(call_vc_core_state_t *pcall_core)
+{
+       return pcall_core->auto_redial_count;
+}
+
+void __vc_core_set_auto_redial_count(call_vc_core_state_t *pcall_core, int auto_redial_count)
+{
+       pcall_core->auto_redial_count = auto_redial_count;
+}
+
+gboolean voicecall_core_start_redial(call_vc_core_state_t *pcall_core, int manual_redial)
+{
+       int auto_redial_status = FALSE;
+       int redial_count = 1;
+       int call_handle = -1;
+       int total_call_member = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (vconf_get_bool(VCONFKEY_CISSAPPL_VOICE_AUTO_REDIAL_BOOL, &auto_redial_status)) {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.");
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "auto_redial_status:[%d]", auto_redial_status);
+
+       redial_count = voicecall_core_get_auto_redial_count(pcall_core);
+
+       redial_count++;
+
+       /*
+          bmanual_redial == TRUE : Redial is made by User, No need to check the auto redial status and count
+          auto_redial_status == 1: Auto Redial for GCF case, auto redial count must be checked
+        */
+       if ((1 == manual_redial) || ((auto_redial_status == 1) && (redial_count < MO_REDIAL_COUNT_MAX))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "redial_count = %d", redial_count);
+
+               /*Start Redial Timer */
+               if (1 == redial_count) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO_REDIAL_TIMER_INTERVAL_FIRST");
+                       pcall_core->mo_redial_timer = g_timeout_add(MO_REDIAL_TIMER_INTERVAL_FIRST, mo_redial_timer_cb, pcall_core);
+               } else if ((redial_count > 1) && (redial_count < 5)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO_REDIAL_TIMER_INTERVAL_SECOND");
+                       pcall_core->mo_redial_timer = g_timeout_add(MO_REDIAL_TIMER_INTERVAL_SECOND, mo_redial_timer_cb, pcall_core);
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MO_REDIAL_TIMER_INTERVAL_THIRD");
+                       pcall_core->mo_redial_timer = g_timeout_add(MO_REDIAL_TIMER_INTERVAL_THIRD, mo_redial_timer_cb, pcall_core);
+               }
+
+               voicecall_core_change_engine_state(pcall_core->pcall_engine, VC_INOUT_STATE_OUTGOING_WAIT_REDIAL);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "You dont need to redial close the MO Call Things");
+
+               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+
+               /* __vcui_app_view_mo_canceltimer_cb() */
+               _vc_core_engine_status_get_call_handle_bytype(pcall_core->pcall_engine, VC_OUTGOING_CALL, &call_handle);
+               _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+               __vc_core_set_auto_redial_count(pcall_core, 0);
+               voicecall_core_clear_mo_call(pcall_core->pcall_engine);
+
+               __voicecall_core_mocall_reset_engine_state(pcall_core->pcall_engine);
+
+               voicecall_core_get_total_call_member(pcall_core->pcall_engine, &total_call_member);
+
+               voicecall_snd_stop_signal(pcall_core->papp_snd);
+
+               /* If No Connected Calls End the UI */
+               if (total_call_member == 0) {
+                       /*Reset voice call core to default values */
+                       voicecall_core_set_to_default(pcall_core);
+               } else {
+                       voicecall_snd_change_path(pcall_core->papp_snd);
+               }
+
+       }
+
+       return TRUE;
+}
+
+inline gboolean voicecall_core_prepare_redial(call_vc_core_state_t *pcall_core, int call_handle)
+{
+       voicecall_error_t error_code = ERROR_VOICECALL_NONE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       error_code = _vc_core_engine_prepare_redial(pcall_core->pcall_engine, call_handle);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "_vc_core_engine_prepare_redial returned : %d", error_code);
+
+       return (ERROR_VOICECALL_NONE == error_code) ? TRUE : FALSE;
+}
+
+gboolean mo_redial_timer_cb(void *data)
+{
+       int call_handle = -1;
+       int redial_count;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "mo_redial_timer_cb");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)data;
+       voicecall_core_get_mo_call_handle(pcall_core, &call_handle);
+       CALL_ENG_DEBUG(ENG_DEBUG, "call handle is %d", call_handle);
+
+       redial_count = voicecall_core_get_auto_redial_count(pcall_core);
+       redial_count++;
+       __vc_core_set_auto_redial_count(pcall_core, redial_count);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "redial_count:[%d]", redial_count);
+
+       voicecall_core_prepare_redial(pcall_core, call_handle);
+       CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_core_prepare_redial done.");
+
+       voicecall_core_make_call(pcall_core);
+       return FALSE;
+}
+
+gboolean voicecall_core_stop_redial(call_vc_core_state_t *pcall_core)
+{
+       int call_handle = -1, total_call_member = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "coming inside voicecall_core_stop_redial");
+
+       voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_RESET);
+       _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+
+       /*Cancel the Redial Timer */
+       if (pcall_core->mo_redial_timer != -1) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "mo_redial_timer removing..");
+               g_source_remove(pcall_core->mo_redial_timer);
+               pcall_core->mo_redial_timer = -1;
+       }
+
+       /* __vcui_app_view_mo_canceltimer_cb() */
+       _vc_core_engine_status_get_call_handle_bytype(pcall_core->pcall_engine, VC_OUTGOING_CALL, &call_handle);
+       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_CALL_END, call_handle, NULL);
+
+       __vc_core_set_auto_redial_count(pcall_core, 0);
+       voicecall_core_clear_mo_call(pcall_core->pcall_engine);
+
+       __voicecall_core_mocall_reset_engine_state(pcall_core->pcall_engine);
+
+       voicecall_core_get_total_call_member(pcall_core->pcall_engine, &total_call_member);
+
+       voicecall_snd_stop_signal(pcall_core->papp_snd);
+
+       /* If No Connected Calls End the UI */
+       if (total_call_member == 0) {
+               /*Reset voice call core to default values */
+               voicecall_core_set_to_default(pcall_core);
+       } else {
+               voicecall_snd_change_path(pcall_core->papp_snd);
+       }
+       return TRUE;
+
+}
+
+static gboolean __voicecall_core_auto_answer_timer_cb(gpointer puser_data)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+
+       if (pcall_core->auto_answer_timer > 0) {
+               g_source_remove(pcall_core->auto_answer_timer);
+               pcall_core->auto_answer_timer = 0;
+       }
+
+       /*Check for Incoming call and then answer the call */
+       if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Answered");
+               voicecall_core_answer_call(pcall_core, TRUE);
+       }
+
+       return FALSE;
+}
+
+static gboolean __voicecall_core_callstatus_set_timer_cb(gpointer puser_data)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+
+       if (pcall_core->callstatus_timer > 0) {
+               g_source_remove(pcall_core->callstatus_timer);
+               pcall_core->callstatus_timer = 0;
+       }
+
+       _vc_core_util_set_call_status(VCONFKEY_CALL_VOICE_CONNECTING);
+
+       return FALSE;
+}
+
+static gboolean __voicecall_core_auto_answer_idle_cb(gpointer puser_data)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+       int engine_state = 0;
+       int auto_answer_time = 0, ret = -1;
+       unsigned long auto_answer_time_interval = 0;
+
+       _vc_core_engine_status_get_engine_iostate(pcall_core->pcall_engine, &engine_state);
+       CALL_ENG_DEBUG(ENG_DEBUG, "eng_state : %d", engine_state);
+       if (engine_state != VC_INOUT_STATE_INCOME_BOX) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Engine State not in Income Box, Current State: %d", engine_state);
+               return FALSE;
+       }
+       /* Read the time interval from gconf and set the redial timer  */
+       ret = vconf_get_int(VCONFKEY_CISSAPPL_ANSWERING_MODE_TIME_INT, &auto_answer_time);
+       if (0 == ret) {
+               auto_answer_time_interval = auto_answer_time * 1000;
+               CALL_ENG_DEBUG(ENG_DEBUG, "The time interval is : %ld", auto_answer_time_interval);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "vconf_get_int FAILED");
+               return FALSE;
+       }
+
+       pcall_core->auto_answer_timer = g_timeout_add(auto_answer_time_interval, __voicecall_core_auto_answer_timer_cb, pcall_core);
+       return FALSE;
+}
+
+/**
+* This function checks BT headset and Earjack status
+*
+* @return              void
+* @param[in]           pcall_core              Handle to voicecall core
+*/
+static void __voicecall_core_check_headset_earjack_status(call_vc_core_state_t *pcall_core)
+{
+       gboolean bt_connected = FALSE;
+
+       bt_connected = _vc_bt_get_bt_status();
+       CALL_ENG_DEBUG(ENG_DEBUG, "Bt connected =%d", bt_connected);
+
+       pcall_core->bt_connected = bt_connected;
+#ifdef _NEW_SND_
+#else
+       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_HEADSET, bt_connected);
+#endif
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Update the earjack status");
+       _voicecall_dvc_get_earjack_status(pcall_core);
+}
+
+/**
+ * This function parses the in call supplementary services string and returns the in call ss to be used
+ *
+ * @return             Returns in call ss state #vcui_app_incall_ss_state_t
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          number                  number to be parsed
+ */
+call_vc_core_incall_ss_state_t voicecall_core_parse_incall_ss_string(call_vc_core_state_t *pcall_core, char *number)
+{
+       call_vc_core_incall_ss_state_t ss_value = CALL_VC_CORE_SS_USSD;
+
+       if (strlen(number) == 1) {
+               switch (number[0]) {
+               case '0':
+                       ss_value = CALL_VC_CORE_SS_0;
+                       break;
+               case '1':
+                       ss_value = CALL_VC_CORE_SS_1;
+                       break;
+               case '2':
+                       ss_value = CALL_VC_CORE_SS_2;
+                       break;
+               case '3':
+                       ss_value = CALL_VC_CORE_SS_3;
+                       break;
+               case '4':
+                       ss_value = CALL_VC_CORE_SS_4;
+                       break;
+               default:
+                       ss_value = CALL_VC_CORE_SS_USSD;
+                       break;
+               }
+       } else if (strlen(number) == 2) {
+               if ((number[0] == '1') && (number[1] > '0') && (number[1] < '8')) {
+                       pcall_core->selected_call_id_in_ss = atoi(number + 1);
+                       ss_value = CALL_VC_CORE_SS_1X;
+               }
+
+               if ((number[0] == '2') && (number[1] > '0') && (number[1] < '8')) {
+                       pcall_core->selected_call_id_in_ss = atoi(number + 1);
+                       ss_value = CALL_VC_CORE_SS_2X;
+               }
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "ss parsed value: %d", ss_value);
+       return ss_value;
+}
+
+/**
+ * This function starts the supplementary services while on call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          incall_ss_state         state of the In Call Supplementary Service
+ */
+gboolean voicecall_core_start_incall_ss(call_vc_core_state_t *pcall_core, call_vc_core_incall_ss_state_t incall_ss_state)
+{
+       gboolean active_calls = FALSE, held_calls = FALSE;
+
+       _vc_core_engine_status_isexists_any_call(pcall_core->pcall_engine, &active_calls, &held_calls);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "ss state = %d", incall_ss_state);
+       vc_engine_msg_box_type event_data;
+       memset(&event_data, 0, sizeof(event_data));
+       event_data.string_id = IDS_CALL_POP_OPERATION_REFUSED;
+
+       /*Cancel DTMF Sending if any and close the dtmf ui */
+       /* vcui_app_doc_cancel_dtmf_queue(papp_document); sathwick TBD */
+
+       switch (incall_ss_state) {
+               /* Releases all held calls or Set UDUB(User Determined User Busy) for a waiting call */
+       case CALL_VC_CORE_SS_0:
+               {
+                       /* if an incoming call is activated, reject the incoming all  */
+                       if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                               voicecall_core_reject_mt(pcall_core, TRUE);
+                               return TRUE;
+                       } else if (held_calls) {
+                               voicecall_core_end_all_held_calls(pcall_core);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "There are no held calls to do the processing");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_1:
+               {
+                       if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                               /* Accept incoming call */
+                               voicecall_core_answer_call_bytype(pcall_core, VC_ANSWER_RELEASE_ACTIVE_AND_ACCEPT);
+                               return TRUE;
+                       } else if (voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+                               /* This fucntion checks for held calls to be retreived on response of ending call */
+                               voicecall_core_set_check_ss_on_end(pcall_core);
+                               voicecall_core_end_mo_call(pcall_core->pcall_engine);
+                       } else if (active_calls) {
+                               voicecall_core_end_all_active_calls(pcall_core);
+                               voicecall_core_set_check_ss_on_end(pcall_core);
+                       } else if (held_calls) {
+                               _vc_core_engine_retrieve_call(pcall_core->pcall_engine);
+                       } else {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_1X:
+               {
+                       if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       } else if (active_calls) {
+
+                               if (!(ERROR_VOICECALL_NONE == _vc_core_engine_end_call_bycallId(pcall_core->pcall_engine, pcall_core->selected_call_id_in_ss))) {
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               }
+                       } else {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_2:
+               {
+
+                       if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+                               if (active_calls && held_calls) {
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               } else {
+#ifdef _CPHS_DEFINED_          /* Not used currently */
+                                       if (TRUE == active_calls && (voicecall_core_get_cphs_csp_status(pcall_core->pcall_engine, VC_CPHS_CSP_HOLD))) {
+
+                                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                                               break;
+                                       }
+#endif
+                                       voicecall_core_answer_call(pcall_core, TRUE);
+                               }
+                       } else if (voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       } else if (active_calls && held_calls) {
+                               _vc_core_engine_swap_calls(pcall_core->pcall_engine);
+                       } else if (active_calls) {
+                               _vc_core_engine_hold_call(pcall_core->pcall_engine);
+                       } else if (held_calls) {
+                               _vc_core_engine_retrieve_call(pcall_core->pcall_engine);
+                       } else {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_2X:
+               {
+                       if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine) || voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                       } else if (TRUE == active_calls && FALSE == held_calls) {
+                               int active_members = 0;
+
+                               voicecall_core_get_active_call_member(pcall_core, &active_members);
+
+                               if (!(active_members > 1 && (ERROR_VOICECALL_NONE == _vc_core_engine_private_call_by_callid(pcall_core->pcall_engine, pcall_core->selected_call_id_in_ss)))) {
+
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               }
+                       } else {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_3:
+               {
+                       if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                               return TRUE;
+                       }
+
+                       if (TRUE == voicecall_core_is_conf_call_possible(pcall_core)) {
+                               _vc_core_engine_setup_conference(pcall_core->pcall_engine);
+                       } else {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               }
+               break;
+       case CALL_VC_CORE_SS_4:
+               if (TRUE == voicecall_core_is_transfer_call_possible(pcall_core)) {
+                       if (FALSE == voicecall_core_transfer_calls(pcall_core)) {
+
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+                       }
+               } else {
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+               }
+               /*
+               if ( !(vcui_app_doc_is_transfer_call_possible(papp_document) && TRUE == vcui_app_doc_transfer_calls(papp_document)) )
+               {
+                       vcui_app_msgbox(papp_document, vcui_app_rsr_load_string(IDS_CALL_POP_OPERATION_REFUSED),GTK_MESSAGE_ALERT);
+               }
+               */
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid SS State");
+               CALL_ENG_DEBUG(ENG_DEBUG, "Need to show a popup to the user ");
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+       }
+       return TRUE;
+}
+
+/**
+ * This function processed the supplementary services while on call
+ *
+ * @return             Returns TRUE If transfer call can be made or FALSE if not
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[in]          pdialled_number         dial number
+ */
+void voicecall_core_process_incall_ss(call_vc_core_state_t *pcall_core, char *pdialled_number)
+{
+       call_vc_core_incall_ss_state_t incall_ss_state = CALL_VC_CORE_SS_NONE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " ..");
+
+       incall_ss_state = voicecall_core_parse_incall_ss_string(pcall_core, pdialled_number);
+
+       if (incall_ss_state != CALL_VC_CORE_SS_USSD) {
+               voicecall_core_start_incall_ss(pcall_core, incall_ss_state);
+       } else {
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Involves CISS functionality so need for us to handle and will be handled by CISS");
+               vc_engine_msg_box_type event_data;
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.string_id = IDS_CALL_POP_OPERATION_REFUSED;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&event_data);
+       }
+}
+
+#ifdef PDIAL_SEND_DTMF
+gboolean voicecall_core_send_phone_number_dtmf(gpointer puser_data)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)vcall_engine_get_core_state();
+       int call_handle = (int)puser_data;
+       char dtmf_number[VC_PHONE_NUMBER_LENGTH_MAX];
+       call_vc_call_objectinfo_t obj_info = { 0, };
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "inside ...");
+
+       if (TRUE == _vc_core_cm_get_call_object(&pcall_core->pcall_engine->call_manager, call_handle, &obj_info)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Source telephone number - %s", obj_info.source_tel_number);
+               if (TRUE == _vc_core_util_extract_dtmf_number(obj_info.source_tel_number, dtmf_number, sizeof(dtmf_number))) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "DTMF number - %s", dtmf_number);
+                       if (VC_CALL_ORIG_TYPE_SAT == pcall_core->call_setup_info.call_type) {
+                               __voicecall_core_queue_dtmf_string(pcall_core, dtmf_number, TRUE);
+                       } else {
+                               __voicecall_core_queue_dtmf_string(pcall_core, dtmf_number, FALSE);
+                       }
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Info not available for call handle: %d", call_handle);
+       }
+
+       return FALSE;
+}
+
+/**
+ * This function cancels the dtmf queue
+ *
+ * @return             TRUE - sucess, FALSE otherwise
+ * @param[in]          papp_document           Handle to Application Document
+ */
+gboolean voicecall_core_cancel_dtmf_queue(call_vc_core_state_t *pcall_core)
+{
+       voicecall_dtmf_info_t *pdtmf_info = (voicecall_dtmf_info_t *)&pcall_core->dtmf_info;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Start:pcall_core(%p)", pcall_core);
+
+       if (FALSE == pdtmf_info->bdtmf_queue) {
+               return TRUE;
+       }
+
+       /*Remove Pauser Timer */
+       g_source_remove(pdtmf_info->dtmf_pause_timer);
+       pdtmf_info->dtmf_pause_timer = -1;
+
+       /*Reset the Status Flags */
+       pdtmf_info->bdtmf_queue = FALSE;
+       pdtmf_info->dtmf_index = 0;
+       memset(pdtmf_info->dtmf_number, 0, sizeof(pdtmf_info->dtmf_number));
+       if (TRUE == pdtmf_info->bsat_dtmf) {
+               voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SEND_DTMF, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+       }
+       pdtmf_info->bsat_dtmf = FALSE;
+       pdtmf_info->bsat_hidden = FALSE;
+       CALL_ENG_DEBUG(ENG_DEBUG, "End");
+       return TRUE;
+}
+
+static gboolean __voicecall_core_dtmf_pause_timer_cb(gpointer puser_data)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)puser_data;
+
+       __voicecall_core_handle_dtmf_ack(pcall_core, TRUE);
+
+       /*Always return FALSE, so that it won't be called again */
+       return FALSE;
+}
+
+gboolean __voicecall_core_send_dtmf_idle_cb(gpointer pdata)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)pdata;
+       voicecall_dtmf_info_t *pdtmf_info = (voicecall_dtmf_info_t *)&pcall_core->dtmf_info;
+       voicecall_error_t vc_error;
+       vc_engine_dtmf_ack_type event_data;
+       char dtmf_string[2];
+
+       dtmf_string[0] = pdtmf_info->dtmf_number[pdtmf_info->dtmf_index];
+       dtmf_string[1] = '\0';
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "inside ...");
+
+       vc_error = _vc_core_engine_send_dtmf(pcall_core->pcall_engine, dtmf_string);
+
+       if (vc_error == ERROR_VOICECALL_INVALID_DTMF_CHAR) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "ERROR_VOICECALL_INVALID_DTMF_CHAR");
+       } else if (ERROR_VOICECALL_NONE != vc_error) {
+               voicecall_core_cancel_dtmf_queue(pcall_core);
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = FALSE;
+               event_data.string_id = -1;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+
+               if (TRUE == pdtmf_info->bsat_dtmf) {
+                       voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SEND_DTMF, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+               }
+
+               if (!((TRUE == pdtmf_info->bsat_dtmf) && (TRUE == pdtmf_info->bsat_hidden))) {
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.bstatus = FALSE;
+                       event_data.string_id = IDS_CALL_POP_DTMFSENDING_FAIL;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+               }
+       }
+
+       return FALSE;
+}
+
+static gboolean __voicecall_core_handle_dtmf_ack(call_vc_core_state_t *pcall_core, gboolean success)
+{
+       voicecall_dtmf_info_t *pdtmf_info = (voicecall_dtmf_info_t *)&pcall_core->dtmf_info;
+       vc_engine_dtmf_ack_type event_data;
+       CALL_ENG_DEBUG(ENG_DEBUG, "...");
+
+       if (FALSE == pdtmf_info->bdtmf_queue) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "DTMF Queue Canceled, do nothing");
+               return TRUE;
+       }
+
+       if (TRUE == success) {
+               char dtmf_string[2];
+               pdtmf_info->dtmf_index++;
+
+               dtmf_string[0] = pdtmf_info->dtmf_number[pdtmf_info->dtmf_index];
+               dtmf_string[1] = '\0';
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Current dtmf_index: %d,dtmf_max_length=%d", pdtmf_info->dtmf_index, pdtmf_info->dtmf_max_length);
+               CALL_ENG_DEBUG(ENG_DEBUG, "Current DTMF String: %s", &pdtmf_info->dtmf_number[pdtmf_info->dtmf_index]);
+
+               /*Update the DTMF Sending UI only, if it is available */
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = TRUE;
+               event_data.string_id = IDS_CALL_POP_SENDING;
+               snprintf(event_data.display_string, sizeof(event_data.display_string), &pdtmf_info->dtmf_number[pdtmf_info->dtmf_index]);
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+
+               /*Find the End of the queue */
+               if (pdtmf_info->dtmf_index >= pdtmf_info->dtmf_max_length) {
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Updating DTMF Progress before destroying");
+
+                       if (!((TRUE == pdtmf_info->bsat_dtmf) && (TRUE == pdtmf_info->bsat_hidden))) {
+                               memset(&event_data, 0, sizeof(event_data));
+                               event_data.bstatus = FALSE;
+                               event_data.string_id = IDS_CALL_POP_DTMF_SENT;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+                       }
+
+                       if (TRUE == pdtmf_info->bsat_dtmf) {
+                               voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SEND_DTMF, CALL_VC_ME_RET_SUCCESS);
+                       }
+               } else {
+                       if (0 == strcasecmp(dtmf_string, "p")) {
+                               int dtmf_interval = 0;
+
+                               if (FALSE == _vc_core_util_check_gcf_status()) {
+                                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? DTMF_PAUSE_TIMER_INTERVAL_FIRST : DTMF_PAUSE_TIMER_INTERVAL_REST;
+                               } else {
+#ifdef GCONF_GCF_SAT_TEST
+                                       int start_interval = DTMF_PAUSE_TIMER_INTERVAL_GCF_FIRST;
+                                       int rest_interval = DTMF_PAUSE_TIMER_INTERVAL_GCF_REST;
+                                       {
+                                               GConfClient *client = NULL;
+                                               client = gconf_client_get_default();
+                                               if (NULL == client) {
+                                                       CALL_ENG_DEBUG(ENG_DEBUG, "gconf_client_get_default failed..");
+                                               } else {
+
+                                                       start_interval = gconf_client_get_int(client, PATH_DTMF_INTERVAL_GCF_FIRST, NULL);
+
+                                                       rest_interval = gconf_client_get_int(client, PATH_DTMF_INTERVAL_GCF_REST, NULL);
+                                                       g_object_unref(client);
+                                               }
+
+                                       }
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "start_interval:%d, rest_interval = %d", start_interval, rest_interval);
+                                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? start_interval : rest_interval;
+#else
+                                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? DTMF_PAUSE_TIMER_INTERVAL_GCF_FIRST : DTMF_PAUSE_TIMER_INTERVAL_GCF_REST;
+#endif
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "dtmf_interval:%d", dtmf_interval);
+                               }
+                               pdtmf_info->dtmf_pause_timer = g_timeout_add(dtmf_interval, __voicecall_core_dtmf_pause_timer_cb, pcall_core);
+                       } else {
+                               g_idle_add_full(G_PRIORITY_HIGH_IDLE + 25, __voicecall_core_send_dtmf_idle_cb, pcall_core, NULL);
+                       }
+               }
+       } else {
+               voicecall_core_cancel_dtmf_queue(pcall_core);
+
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = FALSE;
+               event_data.string_id = IDS_CALL_POP_DTMFSENDING_FAIL;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function queues the dtmf digits one by one from the given dtmf string
+ *
+ * @return             TRUE - sucess, FALSE otherwise
+ * @param[in]          papp_document           Handle to Application Document
+ * @param[in]          dtmf_string                     dtmf string to be queued
+ */
+static gboolean __voicecall_core_queue_dtmf_string(call_vc_core_state_t *pcall_core, char *dtmf_string, gboolean bsat_dtmf)
+{
+       voicecall_dtmf_info_t *pdtmf_info = (voicecall_dtmf_info_t *)&pcall_core->dtmf_info;
+       gboolean bhidden_mode = FALSE;
+       char dtmf_digit[2];
+       vc_engine_dtmf_ack_type event_data;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "bsat_dtmf = %d", bsat_dtmf);
+
+       if (TRUE == bsat_dtmf) {
+               /*Always get the status from the engine */
+               _vc_core_engine_get_sat_dtmf_hidden_mode(pcall_core->pcall_engine, &bhidden_mode);
+               CALL_ENG_DEBUG(ENG_DEBUG, "SAT Hidden Mode : %d", bhidden_mode);
+       }
+
+       /*Check for the validity of the DTMF String */
+       if (FALSE == _vc_core_util_isvalid_full_dtmf_number(dtmf_string)) {
+               if (TRUE == bsat_dtmf) {
+                       voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SEND_DTMF, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+               }
+
+               if (!((TRUE == bsat_dtmf) && (TRUE == bhidden_mode))) {
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.bstatus = FALSE;
+                       event_data.string_id = IDS_CALL_POP_INVALID_DTMF;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+               }
+               return FALSE;
+       }
+
+       /*Reset DTMF Values */
+       pdtmf_info->bdtmf_queue = FALSE;
+       pdtmf_info->dtmf_index = 0;
+       pdtmf_info->bsat_dtmf = bsat_dtmf;
+
+       if (TRUE == bsat_dtmf) {
+               /*Initialize */
+               pdtmf_info->bsat_hidden = bhidden_mode;
+       }
+
+       /* Check: It takes only 40 characters from the source, rest of the characters are ignored */
+       memset(pdtmf_info->dtmf_number, 0, sizeof(pdtmf_info->dtmf_number));
+       if (1 < sizeof(pdtmf_info->dtmf_number))
+               _vc_core_util_strcpy(pdtmf_info->dtmf_number, VC_PHONE_NUMBER_LENGTH_MAX, "P");
+               
+       strncat(pdtmf_info->dtmf_number, dtmf_string, min((sizeof(pdtmf_info->dtmf_number) - 2), strlen(dtmf_string)));
+
+       pdtmf_info->dtmf_max_length = strlen(pdtmf_info->dtmf_number);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Dtmf Number:%s ,dtmf_max_length:%d", pdtmf_info->dtmf_number, pdtmf_info->dtmf_max_length);
+
+       dtmf_digit[0] = pdtmf_info->dtmf_number[pdtmf_info->dtmf_index];
+       dtmf_digit[1] = '\0';
+
+       /*Send DTMF */
+       if (0 == strcasecmp(dtmf_digit, "p")) {
+               int dtmf_interval = 0;
+
+               if (FALSE == _vc_core_util_check_gcf_status()) {
+                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? DTMF_PAUSE_TIMER_INTERVAL_FIRST : DTMF_PAUSE_TIMER_INTERVAL_REST;
+               } else {
+#ifdef GCONF_GCF_SAT_TEST
+                       int start_interval = DTMF_PAUSE_TIMER_INTERVAL_GCF_FIRST;
+                       int rest_interval = DTMF_PAUSE_TIMER_INTERVAL_GCF_REST;
+                       {
+
+                               GConfClient *client = NULL;
+                               client = gconf_client_get_default();
+                               if (NULL == client) {
+                                       CALL_ENG_DEBUG(ENG_DEBUG, "gconf_client_get_default failed..");
+                               } else {
+
+                                       start_interval = gconf_client_get_int(client, PATH_DTMF_INTERVAL_GCF_FIRST, NULL);
+
+                                       rest_interval = gconf_client_get_int(client, PATH_DTMF_INTERVAL_GCF_REST, NULL);
+                                       g_object_unref(client);
+                               }
+
+                       }
+                       CALL_ENG_DEBUG(ENG_DEBUG, "start_interval:%d, rest_interval = %d", start_interval, rest_interval);
+                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? start_interval : rest_interval;
+#else
+                       dtmf_interval = (pdtmf_info->dtmf_index == 0) ? DTMF_PAUSE_TIMER_INTERVAL_GCF_FIRST : DTMF_PAUSE_TIMER_INTERVAL_GCF_REST;
+#endif
+                       CALL_ENG_DEBUG(ENG_DEBUG, "updated dtmf_interval:%d", dtmf_interval);
+               }
+               pdtmf_info->dtmf_pause_timer = g_timeout_add(dtmf_interval, __voicecall_core_dtmf_pause_timer_cb, pcall_core);
+       } else if ((ERROR_VOICECALL_NONE != _vc_core_engine_send_dtmf(pcall_core->pcall_engine, dtmf_digit))) {
+               if (!((TRUE == pdtmf_info->bsat_dtmf) && (TRUE == pdtmf_info->bsat_hidden))) {
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.bstatus = FALSE;
+                       event_data.string_id = IDS_CALL_POP_DTMFSENDING_FAIL;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+               }
+               if (TRUE == pdtmf_info->bsat_dtmf) {
+                       voicecall_core_send_sat_response(pcall_core->pcall_engine, SAT_RQST_SEND_DTMF, CALL_VC_ME_UNABLE_TO_PROCESS_COMMAND);
+               }
+               return FALSE;
+       }
+       pdtmf_info->bdtmf_queue = TRUE;
+
+       /*Create Progressbar popup */
+       if (!((TRUE == pdtmf_info->bsat_dtmf) && (TRUE == pdtmf_info->bsat_hidden))) {
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = TRUE;
+               event_data.string_id = IDS_CALL_POP_SENDING;
+               _vc_core_util_strcpy(event_data.display_string, VC_PHONE_NUMBER_LENGTH_MAX, pdtmf_info->dtmf_number);
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_DTMF_ACK_TO_UI, (void *)&event_data);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "SAT DTMF Hidden Mode, not showing UI");
+       }
+       return TRUE;
+}
+#endif
+
+gboolean voicecall_core_change_sound_path(call_vc_core_state_t *pcall_core, voicecall_snd_audio_type_t sound_path)
+{
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       int ret = FALSE;
+       int total_call_member = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "sound_path:[%d]", sound_path);
+
+       voicecall_core_get_total_call_member(pcall_core->pcall_engine, &total_call_member);
+       if (total_call_member == 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There are not active calls hence it should not work");
+               return FALSE;
+       }
+
+       switch (sound_path) {
+       case VOICE_CALL_AUDIO_SPEAKER:
+               {
+#ifdef _NEW_SND_
+                       if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_BT) {
+                               /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+                       }
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_SPEAKER);                               
+#else
+                       if (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_HEADSET)) {
+                               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_HEADSET, FALSE);
+                               /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+                       }
+
+                       voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, TRUE);
+#endif
+                       ret = TRUE;
+               }
+               break;
+
+       case VOICE_CALL_AUDIO_HEADSET:
+               {
+#ifdef _NEW_SND_
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_BT);                            
+#else
+                       voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, FALSE);
+                       voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_HEADSET, TRUE);
+#endif
+/*                     _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_HEADSET, -1, NULL);*/
+                       _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+
+                       ret = TRUE;
+               }
+               break;
+
+       case VOICE_CALL_AUDIO_EARJACK:
+               {
+#ifdef _NEW_SND_
+                       if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_BT) {
+                               /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+                       }
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_EARJACK);                               
+#else
+                       voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, FALSE);
+
+                       if (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_HEADSET)) {
+                               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_HEADSET, FALSE);
+                               /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+                       }
+#endif
+                       ret = TRUE;
+               }
+               break;
+
+       default:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Unknown type!!");
+                       ret = FALSE;
+               }
+               break;
+       }
+
+       /* Change Audio Path according to the current status */
+       voicecall_snd_change_path(papp_snd);
+
+       return ret;
+}
+
+gboolean voicecall_core_get_sound_path(call_vc_core_state_t *pcall_core, int *sound_path)
+{
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+#ifdef _NEW_SND_
+       switch (voicecall_snd_get_path_status(papp_snd))
+       {
+               case VOICE_CALL_SND_PATH_SPEAKER:
+                       {
+                               *sound_path = VOICE_CALL_AUDIO_SPEAKER;
+                       }
+                       break;
+
+               case VOICE_CALL_SND_PATH_BT:
+                       {
+                               *sound_path = VOICE_CALL_AUDIO_HEADSET;
+                       }
+                       break;
+
+               case VOICE_CALL_SND_PATH_EARJACK:
+                       {
+                               *sound_path = VOICE_CALL_AUDIO_EARJACK;
+                       }
+                       break;
+
+               case VOICE_CALL_SND_PATH_RECEIVER:
+               default:
+                       {
+                               *sound_path = VOICE_CALL_AUDIO_RECEIVER;
+                       }
+                       break;
+
+       }
+#else
+       if (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER)) {
+               *sound_path = VOICE_CALL_AUDIO_SPEAKER;
+       } else if (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_HEADSET)) {
+               *sound_path = VOICE_CALL_AUDIO_HEADSET;
+       } else {
+               *sound_path = VOICE_CALL_AUDIO_EARJACK;
+       }
+#endif
+
+       return TRUE;
+}
+
+static gboolean __voicecall_core_is_redial_cuase(int end_cause)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "end_cause(%d)",end_cause);
+
+       switch (end_cause)
+       {       
+               case VC_ENDCAUSE_CALL_BARRED:
+               case VC_ENDCAUSE_NO_SERVICE:
+               case VC_ENDCAUSE_USER_UNAVAILABLE:
+               case VC_ENDCAUSE_INVALID_NUMBER_FORMAT:
+               case VC_ENDCAUSE_NUMBER_CHANGED:
+               case VC_ENDCAUSE_NO_CREDIT:
+               case VC_ENDCAUSE_UNASSIGNED_NUMBER:
+                       return FALSE;
+
+               case VC_ENDCAUSE_CALL_ENDED:
+               case VC_ENDCAUSE_CALL_DISCONNECTED:
+               case VC_ENDCAUSE_NO_ANSWER:
+               case VC_ENDCAUSE_NW_BUSY:
+               case VC_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED:
+               case VC_ENDCAUSE_NW_FAILED:
+               case VC_ENDCAUSE_REJECTED:
+               case VC_ENDCAUSE_USER_BUSY:
+               case VC_ENDCAUSE_WRONG_GROUP:
+               case VC_ENDCAUSE_CALL_NOT_ALLOWED:
+               case VC_ENDCAUSE_CALL_FAILED:
+               case VC_ENDCAUSE_NO_USER_RESPONDING:
+               case VC_ENDCAUSE_USER_ALERTING_NO_ANSWER:
+               case VC_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE:
+               case VC_ENDCAUSE_USER_DOESNOT_RESPOND:
+               case VC_ENDCAUSE_IMEI_REJECTED:
+               case VC_ENDCAUSE_TAPI_ERROR:
+               default:
+                       return TRUE;
+       }
+}
diff --git a/call-engine/voice-call-dbus.c b/call-engine/voice-call-dbus.c
new file mode 100755 (executable)
index 0000000..11b29a4
--- /dev/null
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-bindings.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+#include "voice-call-dbus.h"
+#include "voice-call-engine.h"
+
+#include <aul.h>
+
+/*  Voice Call  <-- BT */
+#define DBUS_BT_MATCH_RULE                     "type='signal',path='/org/projectx/bluetooth_event',interface='User.Bluetooth.AG'"
+#define DBUS_BT_OBJECT_REQUEST                 "/org/projectx/bluetooth_event"
+#define DBUS_BT_INTERFACE_REQUEST      "User.Bluetooth.AG"
+#define DBUS_BT_METHOD_REQUEST                 "Request"
+
+/*  Voice Call  --> BT */
+#define DBUS_BT_SERVICE                                "org.projectx.bluetooth"
+#define DBUS_BT_OBJECT_RESPONSE                "/org/projectx/btcall_event"
+#define DBUS_BT_INTERFACE_RESPONSE     "User.Bluetooth.AG"
+#define DBUS_BT_METHOD_RESPONSE                "Response"
+//#define DBUS_BT_METHOD_CONNECT                "Connect"
+
+#define BT_PKG          "org.tizen.bluetooth"
+
+static DBusGConnection *gconnection = NULL;
+
+typedef struct _dbus_dest_t {
+       char *service;
+       char *object_path;
+       char *interface;
+       char *method;
+} dbus_dest_t;
+
+static int vc_engine_send_via_dbus(DBusGConnection * conn, dbus_dest_t * dest, int first_arg_type, ...)
+{
+       DBusMessage *msg;
+       DBusMessageIter iter;
+       va_list list;
+       int type;
+       dbus_bool_t ret;
+
+       dbus_int32_t val_int;
+       char *val_str;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "path:%s, interface:%s, method:%s \n", dest->object_path, dest->interface, dest->method);
+       msg = dbus_message_new_signal(dest->object_path, dest->interface, dest->method);
+       if (msg == NULL) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "dbus_message_new_signal failed.\n");
+               return VC_ERROR;
+       }
+       dbus_message_set_destination(msg, dest->service);
+
+       dbus_message_iter_init_append(msg, &iter);
+
+       type = first_arg_type;
+
+       va_start(list, first_arg_type);
+       while (type != DBUS_TYPE_INVALID) {
+               switch (type) {
+               case DBUS_TYPE_INT32:
+                       val_int = *(int *)(va_arg(list, dbus_int32_t));
+                       dbus_message_iter_append_basic(&iter, type, &val_int);
+                       break;
+
+               case DBUS_TYPE_STRING:
+                       val_str = va_arg(list, char *);
+                       dbus_message_iter_append_basic(&iter, type, &val_str);
+                       break;
+               }
+               type = va_arg(list, int);
+       }
+       va_end(list);
+
+       ret = dbus_connection_send(dbus_g_connection_get_connection(conn), msg, NULL);
+       dbus_connection_flush(dbus_g_connection_get_connection(conn));
+       dbus_message_unref(msg);
+
+       if (ret != TRUE)
+               return VC_ERROR;
+
+       return VC_NO_ERROR;
+}
+
+void vc_engine_on_dbus_send_connect_to_bt(void)
+{
+       bundle *kb;
+       kb = bundle_create();
+       bundle_add(kb, "launch-type", "call");
+       aul_launch_app(BT_PKG, kb);
+       bundle_free(kb);
+       CALL_ENG_DEBUG(ENG_DEBUG, "End..");
+}
+
+void vc_engine_on_dbus_send_response_to_bt(connectivity_bt_ag_param_info_t bt_resp_info)
+{
+       dbus_dest_t bt_dbus_dest = {
+               DBUS_BT_SERVICE,
+               DBUS_BT_OBJECT_RESPONSE,
+               DBUS_BT_INTERFACE_RESPONSE,
+               DBUS_BT_METHOD_RESPONSE
+       };
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       vc_engine_send_via_dbus(gconnection, &bt_dbus_dest, 
+                       DBUS_TYPE_INT32, &bt_resp_info.param1,
+                       DBUS_TYPE_INT32, &bt_resp_info.param2,
+                       DBUS_TYPE_INT32, &bt_resp_info.param3,
+                       DBUS_TYPE_STRING, bt_resp_info.param4,
+                       DBUS_TYPE_INVALID);     
+}
+
+/* Handle all bluetooth relative signal */
+static void vc_engine_on_dbus_parsing_bt(void *user_data, DBusMessage * message)
+{
+       DBusMessageIter iter;
+       connectivity_bt_ag_param_info_t bt_event_info = { 0, };
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)vcall_engine_get_core_state();
+
+       if (dbus_message_iter_init(message, &iter))
+               dbus_message_iter_get_basic(&iter, &bt_event_info.param1);
+
+       if (dbus_message_iter_next(&iter))
+               dbus_message_iter_get_basic(&iter, &bt_event_info.param2);
+
+       if (dbus_message_iter_next(&iter))
+               dbus_message_iter_get_basic(&iter, &bt_event_info.param3);
+
+       if (dbus_message_iter_next(&iter))
+               dbus_message_iter_get_basic(&iter, &bt_event_info.param4);
+
+       CALL_ENG_DEBUG(ENG_DEBUG,"param1:[%d], param2[%d], param3[%d], param4[%s] \n",
+                       bt_event_info.param1, bt_event_info.param2, bt_event_info.param3, bt_event_info.param4);
+
+       _vc_bt_handle_bt_events(pcall_core, &bt_event_info);
+}
+
+/* Handle all dbus signal */
+static DBusHandlerResult vc_engine_on_dbus_receive(DBusConnection * connection, DBusMessage * message, void *user_data)
+{
+       int type;
+
+       const char *interface_name = dbus_message_get_interface(message);
+       const char *method_name = dbus_message_get_member(message);
+       const char *object_path = dbus_message_get_path(message);
+
+       type = dbus_message_get_type(message);
+       if (type != DBUS_MESSAGE_TYPE_SIGNAL) {
+               /* 
+                * INVALID: 0
+                * METHOD_CALL: 1
+                * METHOD_CALL_RETURN: 2
+                * ERROR: 3
+                * SIGNAL: 4 
+                */
+               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+       }
+
+       if (object_path == NULL) {
+               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+       }
+       if (interface_name == NULL) {
+               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+       }
+       if (method_name == NULL) {
+               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+       }
+
+       /* Check BT Signal */
+       if ((strcmp(object_path, DBUS_BT_OBJECT_REQUEST) == 0) && (strcmp(interface_name, DBUS_BT_INTERFACE_REQUEST) == 0)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "received DBus BT signal!\n");
+               if (strcmp(method_name, DBUS_BT_METHOD_REQUEST) == 0) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT Method :[Request] \n");
+                       vc_engine_on_dbus_parsing_bt(user_data, message);
+                       return DBUS_HANDLER_RESULT_HANDLED;
+               }
+       }
+
+       return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+int vc_engine_dbus_receiver_setup()
+{
+       GError *error = NULL;
+       DBusError derror;
+       int ret;
+
+       // connectio to dbus-daemon.    
+       gconnection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
+       if (!gconnection) {
+               printf("Could not get connection: %s\n", error->message);
+               return FALSE;
+       }
+       
+       dbus_error_init(&derror);
+
+       dbus_bus_add_match(dbus_g_connection_get_connection(gconnection), DBUS_BT_MATCH_RULE, &derror);
+       if (dbus_error_is_set(&derror)) // failure
+       {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Failed to dbus_bus_add_match(%s): %s\n", DBUS_BT_MATCH_RULE, derror.message);
+               dbus_error_free(&derror);
+               return FALSE;
+       }
+       // register event filter to handle received dbus-message.   
+       ret = dbus_connection_add_filter(dbus_g_connection_get_connection(gconnection), vc_engine_on_dbus_receive, NULL, NULL);
+       if (ret != TRUE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Failed to dbus_connection_add_filter");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
diff --git a/call-engine/voice-call-device.c b/call-engine/voice-call-device.c
new file mode 100755 (executable)
index 0000000..76d4344
--- /dev/null
@@ -0,0 +1,382 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "voice-call-device.h"
+#include "voice-call-dbus.h"
+#include "voice-call-core.h"
+#include "voice-call-sound.h"
+#include "voice-call-bt.h"
+#include "voice-call-core.h"
+#include "voice-call-engine-msg.h"
+
+#include "vc-core-callagent.h"
+#include "vc-core-engine-types.h"
+#include "vc-core-util.h"
+
+#include <pmapi.h>
+#include <sensor.h>
+
+static int g_proximity_sensor_handle = -1;
+static int g_proximity_sensor_state = -1;
+
+static gboolean __voicecall_dvc_proximity_sensor_is_request(unsigned int type, sensor_event_data_t *event, void *data);
+static void __voicecall_dvc_proximity_sensor_callback_func(unsigned int type, sensor_event_data_t *event, void *data);
+static gboolean __voicecall_dvc_earjack_status_cb(keynode_t *node, call_vc_core_state_t *pcall_core);
+static gboolean __voicecall_dvc_earjackkey_status_cb(keynode_t *node, call_vc_core_state_t *pcall_core);
+
+/**
+ * This function handles earjack event
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          node                            vconf node      
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ */
+static gboolean __voicecall_dvc_earjack_status_cb(keynode_t *node, call_vc_core_state_t *pcall_core)
+{
+       gboolean bRecieverPath = FALSE;
+       int earjack_status;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       earjack_status = vconf_keynode_get_int(node);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Earjack Status: %d \n", earjack_status);
+
+       vc_engine_headset_status_type event_data;
+
+       /*Change path only if outgoing call or connected call exists */
+#ifdef _NEW_SND_
+       if ((TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) 
+       || (TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine))) {
+               if (earjack_status == TRUE) {
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_EARJACK);
+                       voicecall_snd_change_path(pcall_core->papp_snd);
+                       memset(&event_data, 0, sizeof(event_data));
+                       event_data.bstatus = earjack_status;
+                       vcall_engine_send_event_to_client(VC_ENGINE_MSG_EARJACK_STATUS_TO_UI, (void *)&event_data);                     
+               } else {
+                       if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_EARJACK) {
+                               if (_vc_bt_is_bt_connected(pcall_core) == TRUE) {
+                                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_BT);                            
+                                       /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_HEADSET, -1, NULL);*/
+                                       _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+                               } else {
+                                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);                              
+                                       voicecall_snd_change_path(pcall_core->papp_snd);
+                               }
+                               memset(&event_data, 0, sizeof(event_data));
+                               event_data.bstatus = earjack_status;
+                               vcall_engine_send_event_to_client(VC_ENGINE_MSG_EARJACK_STATUS_TO_UI, (void *)&event_data);                             
+                       } else {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "No path change");
+                       }
+               }
+       }
+#else
+       if ((TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) || (TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine))) {
+               memset(&event_data, 0, sizeof(event_data));
+               event_data.bstatus = earjack_status;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_EARJACK_STATUS_TO_UI, (void *)&event_data);
+       }
+#endif
+       return TRUE;
+}
+
+/**
+ * This function handles earjack key event
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          node                            vconf node      
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ */
+static gboolean __voicecall_dvc_earjackkey_status_cb(keynode_t *node, call_vc_core_state_t *pcall_core)
+{
+       int key_value;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       key_value = vconf_keynode_get_int(node);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "key_value: %d \n", key_value);
+
+       if (key_value > 0) {
+               if (voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+                       voicecall_core_end_all_calls(pcall_core);
+               } else if (voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+#ifdef _NEW_SND_
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_EARJACK);
+#endif
+                       voicecall_core_answer_call(pcall_core, FALSE);
+               } else if (voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine)) {
+                       voicecall_core_cancel_call(pcall_core);
+               }
+       }
+
+       return TRUE;
+}
+
+/**
+ * This function initialize earjack event.
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ */
+gboolean _voicecall_dvc_earjack_init(call_vc_core_state_t *pcall_core)
+{
+#ifdef _NEW_SND_
+#else
+       int earjack_status = -1;
+       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &earjack_status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "earjack_status:[%d]\n", earjack_status);
+               if (earjack_status == VCONFKEY_SYSMAN_EARJACK_REMOVED) {
+                       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, FALSE);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "*****************VOICE_CALL_AUDIO_EARJACK = FALSE **********\n");
+               } else {
+                       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, TRUE);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "*****************VOICE_CALL_AUDIO_EARJACK = TRUE **********\n");
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..\n");
+               voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, FALSE);
+       }
+#endif
+
+       vconf_notify_key_changed(VCONFKEY_SYSMAN_EARJACK, (void *)__voicecall_dvc_earjack_status_cb, pcall_core);
+       vconf_notify_key_changed(VCONFKEY_SYSMAN_EARJACKKEY, (void *)__voicecall_dvc_earjackkey_status_cb, pcall_core);
+       return TRUE;
+}
+
+void _voicecall_dvc_get_earjack_status(call_vc_core_state_t *pcall_core)
+{
+       int earjack_status = -1;
+       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &earjack_status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "earjack_status:[%d]\n", earjack_status);
+               if (earjack_status == VCONFKEY_SYSMAN_EARJACK_REMOVED) {
+                       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, FALSE);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "*****************VOICE_CALL_AUDIO_EARJACK = FALSE **********\n");
+               } else {
+                       voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, TRUE);
+                       CALL_ENG_DEBUG(ENG_DEBUG, "*****************VOICE_CALL_AUDIO_EARJACK = TRUE **********\n");
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..\n");
+               voicecall_snd_set_status(pcall_core->papp_snd, VOICE_CALL_AUDIO_EARJACK, FALSE);
+       }
+}
+
+gboolean _voicecall_dvc_get_earjack_connected()
+{
+       int earjack_status = -1;
+       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &earjack_status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "earjack_status:[%d]\n", earjack_status);
+               if (earjack_status == VCONFKEY_SYSMAN_EARJACK_REMOVED) {
+                       return FALSE;
+               } else {
+                       return TRUE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_int failed..\n");
+               return FALSE;
+       }
+}
+
+void _voicecall_dvc_control_lcd_state(voicecall_lcd_control_t state)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG,"[%d]", state);
+       switch (state) {
+       case VC_LCD_OFF:
+               pm_change_state(LCD_OFF);
+               break;
+
+       case VC_LCD_ON:
+               pm_change_state(LCD_NORMAL);
+               break;
+
+       case VC_LCD_ON_LOCK:
+               pm_lock_state(LCD_NORMAL, GOTO_STATE_NOW, 0);
+               break;
+
+       case VC_LCD_ON_UNLOCK:
+               pm_unlock_state(LCD_NORMAL, PM_RESET_TIMER);
+               break;
+
+       default:
+               break;
+       }
+}
+gboolean _voicecall_dvc_proximity_sensor_init(void *data)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       int ret = -1;
+       int handle = -1;
+#ifdef _POLLING_PROXIMITY_SENSOR_
+       event_condition_t my_cond;
+#endif
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)data;
+       sensor_data_t cur_sensor_data;
+
+       if (g_proximity_sensor_handle >= 0) {
+               CALL_ENG_DEBUG(ENG_WARN, "already initialized");
+               return FALSE;
+       }
+
+       handle = sf_connect(PROXIMITY_SENSOR);
+       if (handle < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_connect failed");
+               return FALSE;
+       }
+
+#ifdef _POLLING_PROXIMITY_SENSOR_
+       my_cond.cond_op = CONDITION_EQUAL;
+       my_cond.cond_value1 = 200;
+       ret = sf_register_event(handle, PROXIMITY_EVENT_CHANGE_STATE, &my_cond, __voicecall_dvc_proximity_sensor_callback_func, pcall_core);
+#else
+       ret = sf_register_event(handle, PROXIMITY_EVENT_CHANGE_STATE, NULL, __voicecall_dvc_proximity_sensor_callback_func, pcall_core);
+#endif
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_register_event failed");
+               return FALSE;
+       }
+
+       ret = sf_start(handle, 0);
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sensor_start fail");
+               return FALSE;
+       }
+
+       ret = sf_get_data(handle, PROXIMITY_BASE_DATA_SET, &cur_sensor_data);
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_get_data fail");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "proximity_state:[%d]\n", cur_sensor_data.values[0]);
+       if (cur_sensor_data.values[0] == PROXIMITY_STATE_NEAR) {
+               if (__voicecall_dvc_proximity_sensor_is_required(pcall_core)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "PROXIMITY_STATE_NEAR");
+                       g_proximity_sensor_state = VCALL_SENSOR_NEAR;
+                       _voicecall_dvc_control_lcd_state(VC_LCD_OFF);
+               }
+       }
+
+       g_proximity_sensor_handle = handle;
+       CALL_ENG_DEBUG(ENG_DEBUG, "_voicecall_dvc_proximity_sensor_init done");
+}
+
+gboolean __voicecall_dvc_proximity_sensor_is_required(call_vc_core_state_t *pcall_core)
+{
+       voicecall_engine_t *pcall_engine = NULL;
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (pcall_core == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "Wrong pointer for pcall_core");
+               return FALSE;
+       }
+
+       pcall_engine = pcall_core->pcall_engine;
+       if (pcall_engine == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "Wrong pointer for pcall_engine");
+               return FALSE;
+       }
+
+       if (_vc_core_cm_isexists_incoming_call(&(pcall_engine->call_manager)) == TRUE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "we'll not excute sensor in case of incoming call");
+               return FALSE;
+       }
+
+       if ((_vc_core_cm_isexists_connected_call(&(pcall_engine->call_manager)) == FALSE) &&
+               (_vc_core_cm_isexits_outgoing_call(&(pcall_engine->call_manager)) == FALSE)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "we'll not excute sensor in case of NO call");
+               return FALSE;
+       }
+
+       if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_SPEAKER) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "we'll not excute sensor in case of speaker mode");
+               return FALSE;
+       }
+
+       return TRUE;
+}
+
+gboolean _voicecall_dvc_proximity_sensor_deinit(void)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       int ret = -1;
+
+       if (g_proximity_sensor_handle < 0) {
+               CALL_ENG_DEBUG(ENG_WARN, "not initialized.");
+               return FALSE;
+       }
+
+       ret = sf_unregister_event(g_proximity_sensor_handle, PROXIMITY_EVENT_CHANGE_STATE);
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_unregister_event failed");
+       }
+       ret = sf_stop(g_proximity_sensor_handle);
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_stop failed");
+       }
+       ret = sf_disconnect(g_proximity_sensor_handle);
+       if (ret < 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "sf_disconnect failed");
+       }
+
+       g_proximity_sensor_handle = -1;
+       return TRUE;
+}
+
+static void __voicecall_dvc_proximity_sensor_callback_func(unsigned int type, sensor_event_data_t *event, void *data)
+{
+       int *proxi_state;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)data;
+       voicecall_engine_t *pcall_engine = NULL;
+       CALL_ENG_DEBUG(ENG_DEBUG, "");
+
+       if (__voicecall_dvc_proximity_sensor_is_required(pcall_core) == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Proximity sensor update is not required");
+               return;
+       }
+
+       if (type != PROXIMITY_EVENT_CHANGE_STATE) {
+               return;
+       }
+
+       proxi_state = (int *)(event->event_data);
+       switch (*proxi_state) {
+       case PROXIMITY_STATE_FAR:
+               CALL_ENG_DEBUG(ENG_DEBUG, "PROXIMITY_STATE_FAR");
+               g_proximity_sensor_state = VCALL_SENSOR_FAR;
+               _voicecall_dvc_control_lcd_state(VC_LCD_ON);
+               break;
+       case PROXIMITY_STATE_NEAR:
+               CALL_ENG_DEBUG(ENG_DEBUG, "PROXIMITY_STATE_NEAR");
+               g_proximity_sensor_state = VCALL_SENSOR_NEAR;
+               _voicecall_dvc_control_lcd_state(VC_LCD_OFF);
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "wrong data");
+               break;
+       }
+}
+
+int _voicecall_dvc_get_proximity_sensor_state(void)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "g_proximity_sensor_state(%d)", g_proximity_sensor_state);
+
+       return g_proximity_sensor_state;
+}
diff --git a/call-engine/voice-call-engine.c b/call-engine/voice-call-engine.c
new file mode 100755 (executable)
index 0000000..a9b5377
--- /dev/null
@@ -0,0 +1,872 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "voice-call-engine.h"
+#include "vc-core-util.h"
+#include "voice-call-core.h"
+#include "vc-core-engine-types.h"
+#include "voice-call-service.h"
+#include "voice-call-dbus.h"
+
+typedef struct {
+       void *puser_data;
+       vcall_engine_app_cb cb_func;
+} app_cb_t;
+
+call_vc_core_state_t *global_pcall_core = NULL;
+
+static app_cb_t *app_client_data = NULL;
+
+/**
+ * This function send events to client.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+gboolean vcall_engine_send_event_to_client(int event, void *pdata)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       if (app_client_data->cb_func != NULL) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sending Event to APP Client\n");
+               app_client_data->cb_func(event, pdata, app_client_data->puser_data);
+       }
+       CALL_ENG_DEBUG(ENG_ERR, "End..\n");
+       return TRUE;
+}
+
+/**
+ * This function initialize voice call engine.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_init(vcall_engine_app_cb pcb_func, void *puser_data)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       /* thread system initialization */
+       if (!g_thread_supported()) {
+               CALL_ENG_KPI("g_thread_init start");
+               g_thread_init(NULL);
+               CALL_ENG_KPI("g_thread_init done");
+       }
+
+       global_pcall_core = (call_vc_core_state_t *)calloc(1, sizeof(call_vc_core_state_t));
+       if (global_pcall_core == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "Memory Allocation Failed\n");
+               return VCALL_ENGINE_API_FAILED;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "global_pcall_core alloctated memory:[%d],global_pcall_core(0x%x) \n", sizeof(call_vc_core_state_t), global_pcall_core);
+
+       if (FALSE == voicecall_core_init(global_pcall_core)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_core_init() failed");
+               return VCALL_ENGINE_API_FAILED;
+       }
+
+       app_client_data = (app_cb_t *) calloc(1, sizeof(app_cb_t));
+       if (app_client_data == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "Memory Allocation Failed\n");
+               return VCALL_ENGINE_API_FAILED;
+       }
+       app_client_data->cb_func = pcb_func;
+       app_client_data->puser_data = puser_data;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Init dbus connection\n");
+       vc_engine_dbus_receiver_setup();
+       return VCALL_ENGINE_API_SUCCESS;
+
+}
+
+/**
+ * This function processes mo nomal call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_normal_call(char *number, int ct_index, gboolean b_download_call)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, " number is (%s)\n", number);
+       voicecall_engine_t *pcall_engine = global_pcall_core->pcall_engine;
+       vc_engine_outgoing_type event_data;
+       char number_after_removal[VC_PHONE_NUMBER_LENGTH_MAX] = {"\0",};
+       int io_state;
+
+       if (number == NULL || pcall_engine == NULL)
+               return VCALL_ENGINE_API_FAILED;
+
+       _vc_core_engine_status_set_download_call(pcall_engine, b_download_call);
+
+       /* check the call-engine state before proceeding with call processing */
+       _vc_core_engine_status_get_engine_iostate(pcall_engine, &io_state);
+       if (io_state != VC_INOUT_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "IO State [%d] not NONE, cannot proceed with the call \n", io_state);
+               voicecall_core_set_status(global_pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type mbox_event_data;
+
+               memset(&mbox_event_data, 0, sizeof(mbox_event_data));
+               mbox_event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&mbox_event_data);
+               return VCALL_ENGINE_API_FAILED;
+       }
+
+       memset(&(global_pcall_core->call_setup_info), 0, sizeof(global_pcall_core->call_setup_info));
+       global_pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+       global_pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_NORMAL;
+
+       memset(&event_data, 0, sizeof(event_data));
+
+       _vc_core_util_remove_invalid_chars(number, number_after_removal);
+       snprintf(global_pcall_core->call_setup_info.source_tel_number, VC_PHONE_NUMBER_LENGTH_MAX, number_after_removal);
+       voicecall_core_extract_phone_number(number_after_removal, event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX);
+
+       if (strlen(event_data.call_num) > VC_PHONE_NUMBER_LENGTH_MAX) {
+               CALL_ENG_DEBUG(ENG_ERR, " WARNING!! number is larger than max num length!! \n");
+               memcpy(global_pcall_core->call_setup_info.tel_number, event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX);
+       } else {
+               memcpy(global_pcall_core->call_setup_info.tel_number, event_data.call_num, strlen(event_data.call_num));
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "number:[%s]", number);
+       CALL_ENG_DEBUG(ENG_DEBUG, "number_after_removal:[%s]", number_after_removal);
+       CALL_ENG_DEBUG(ENG_DEBUG, "global_pcall_core->call_setup_info.source_tel_number:[%s]", global_pcall_core->call_setup_info.source_tel_number);
+       CALL_ENG_DEBUG(ENG_DEBUG, "global_pcall_core->call_setup_info.tel_number:[%s]", global_pcall_core->call_setup_info.tel_number);
+       CALL_ENG_DEBUG(ENG_DEBUG, "event_data.call_num:[%s]", event_data.call_num);
+
+       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_TO_UI, (void *)&event_data);
+
+       if (voicecall_core_setup_call(global_pcall_core, FALSE)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, " success!! \n");
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, " failed!! \n");
+       }
+       return VCALL_ENGINE_API_SUCCESS;
+
+}
+
+/**
+ * This function processes mo emergency call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_emergency_call(char *number)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, " number is : [%s] \n", number);
+       voicecall_engine_t *pcall_engine = global_pcall_core->pcall_engine;
+       gboolean bDefaultNumber = FALSE;
+       vc_engine_outgoing_type event_data;
+       int io_state;
+
+       /* check the call-engine state before proceeding with emergency call processing */
+       _vc_core_engine_status_get_engine_iostate(pcall_engine, &io_state);
+       if (io_state != VC_INOUT_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "IO State [%d] not NONE, cannot proceed with the call \n", io_state);
+               voicecall_core_set_status(global_pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type mbox_event_data;
+
+               memset(&mbox_event_data, 0, sizeof(mbox_event_data));
+               mbox_event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&mbox_event_data);
+               return VCALL_ENGINE_API_FAILED;
+       }
+
+       memset(&event_data, 0, sizeof(event_data));
+
+       memset(&(global_pcall_core->call_setup_info), 0, sizeof(global_pcall_core->call_setup_info));
+
+       bDefaultNumber = strlen(number) ? FALSE : TRUE;
+       if (bDefaultNumber == TRUE) {
+               global_pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+               global_pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_EMERGENCY;
+               if (strlen("911") < sizeof(event_data.call_num))
+                       _vc_core_util_strcpy(event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX, "911");
+
+               memcpy(global_pcall_core->call_setup_info.tel_number, "911", strlen("911"));
+       } else {
+               global_pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+               global_pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_PINLOCK;
+               voicecall_core_extract_phone_number(number, event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX);
+               if (strlen(number) > VC_PHONE_NUMBER_LENGTH_MAX) {
+                       CALL_ENG_DEBUG(ENG_ERR, " WARNING!! number is larger than max num length!! \n");
+                       memcpy(global_pcall_core->call_setup_info.source_tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+                       memcpy(global_pcall_core->call_setup_info.tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+               } else {
+                       memcpy(global_pcall_core->call_setup_info.source_tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+                       memcpy(global_pcall_core->call_setup_info.tel_number, number, strlen(number));
+               }
+       }
+
+       event_data.contact_index = -1;
+       event_data.phone_type = -1;
+
+       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_TO_UI, (void *)&event_data);
+
+       if (voicecall_core_setup_call(global_pcall_core, TRUE)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, " success!! \n");
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, " failed!! \n");
+       }
+       return VCALL_ENGINE_API_SUCCESS;
+}
+
+int vcall_engine_process_emergency_call_test(char *number)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, " number is : [%s] \n", number);
+       voicecall_engine_t *pcall_engine = global_pcall_core->pcall_engine;
+       gboolean bDefaultNumber = FALSE;
+       vc_engine_outgoing_type event_data;
+       int io_state;
+
+       /* check the call-engine state before proceeding with emergency call processing */
+       _vc_core_engine_status_get_engine_iostate(pcall_engine, &io_state);
+       if (io_state != VC_INOUT_STATE_NONE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "IO State [%d] not NONE, cannot proceed with the call \n", io_state);
+               voicecall_core_set_status(global_pcall_core, CALL_VC_CORE_FLAG_SETUPCALL_FAIL, TRUE);
+               vc_engine_msg_box_type mbox_event_data;
+
+               memset(&mbox_event_data, 0, sizeof(mbox_event_data));
+               mbox_event_data.string_id = IDS_CALL_POP_CALLNOTCALLOWED;
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_MESSAGE_BOX_TO_UI, (void *)&mbox_event_data);
+               return VCALL_ENGINE_API_FAILED;
+       }
+
+       memset(&event_data, 0, sizeof(event_data));
+
+       memset(&(global_pcall_core->call_setup_info), 0, sizeof(global_pcall_core->call_setup_info));
+
+       bDefaultNumber = strlen(number) ? FALSE : TRUE;
+       if (bDefaultNumber == TRUE) {
+               global_pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+               global_pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_EMERGENCY;
+               if (strlen("911") < sizeof(event_data.call_num))
+                       _vc_core_util_strcpy(event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX, "911");
+
+               memcpy(global_pcall_core->call_setup_info.tel_number, "911", strlen("911"));
+       } else {
+               global_pcall_core->call_setup_info.call_setup_by = VC_CALL_SETUP_BY_NORMAL;
+               global_pcall_core->call_setup_info.call_type = VC_CALL_ORIG_TYPE_PINLOCK;
+               voicecall_core_extract_phone_number(number, event_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX);
+               if (strlen(number) > VC_PHONE_NUMBER_LENGTH_MAX) {
+                       CALL_ENG_DEBUG(ENG_ERR, " WARNING!! number is larger than max num length!! \n");
+                       memcpy(global_pcall_core->call_setup_info.source_tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+                       memcpy(global_pcall_core->call_setup_info.tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+               } else {
+                       memcpy(global_pcall_core->call_setup_info.source_tel_number, number, VC_PHONE_NUMBER_LENGTH_MAX);
+                       memcpy(global_pcall_core->call_setup_info.tel_number, number, strlen(number));
+               }
+       }
+
+       event_data.contact_index = -1;
+       event_data.phone_type = -1;
+
+       vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_TO_UI, (void *)&event_data);
+
+       {
+               int call_handle = 1;
+               vc_engine_outgoing_orig_type orig_event_data;
+               call_vc_call_objectinfo_t callobject_info;
+
+               memset(&orig_event_data, 0, sizeof(orig_event_data));
+               orig_event_data.call_handle = call_handle;
+               orig_event_data.bemergency = TRUE;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call Handle = %d, bemergency:[%d] \n", orig_event_data.call_handle, orig_event_data.bemergency);
+               vcall_engine_send_event_to_client(VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI_TEST, (void *)&orig_event_data);
+       }
+
+       return VCALL_ENGINE_API_SUCCESS;
+}
+
+/**
+ * This function processes sat setup call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_sat_setup_call(vcall_engine_sat_setup_call_info_t *sat_setup_call_info)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       voicecall_core_process_sat_setup_call(sat_setup_call_info);
+       return VCALL_ENGINE_API_SUCCESS;
+}
+
+/**
+ * This function processes incoming call.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+*/
+int vcall_engine_process_incoming_call(vcall_engine_incoming_info_t *incoming_call_info)
+{
+       call_vc_core_incoming_info_t tmp_incom_info = { 0, };
+
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       tmp_incom_info.call_handle = incoming_call_info->call_handle;
+       tmp_incom_info.call_type = incoming_call_info->call_type;
+       tmp_incom_info.cli_presentation_indicator = incoming_call_info->cli_presentation_indicator;
+       _vc_core_util_strcpy(tmp_incom_info.call_num, sizeof(tmp_incom_info.call_num), incoming_call_info->call_num);
+       tmp_incom_info.calling_name_mode = incoming_call_info->calling_name_mode;
+       _vc_core_util_strcpy(tmp_incom_info.calling_name, sizeof(tmp_incom_info.calling_name), incoming_call_info->calling_name);
+       _vc_core_util_strcpy(tmp_incom_info.redirected_number, sizeof(tmp_incom_info.redirected_number), incoming_call_info->redirected_number);
+       _vc_core_util_strcpy(tmp_incom_info.redirected_sub_address, sizeof(tmp_incom_info.redirected_sub_address), incoming_call_info->redirected_sub_address);
+       tmp_incom_info.cli_cause = incoming_call_info->cli_cause;
+       tmp_incom_info.bfwded = incoming_call_info->bfwded;
+       tmp_incom_info.active_line = incoming_call_info->active_line;
+
+       voicecall_core_process_incoming_call(&tmp_incom_info);
+       return VCALL_ENGINE_API_SUCCESS;
+}
+
+/**
+ * This function answers an incoming call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+*/
+int vcall_engine_answer_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = VCALL_ENGINE_API_FAILED;
+
+       ret = voicecall_core_answer_call(global_pcall_core, FALSE);
+       CALL_ENG_DEBUG(ENG_DEBUG, " ret:[%d] \n", ret);
+       return ret;
+}
+
+/**
+ * This function answers an incoming call  according to the given type
+ *
+ * @return     int     API Result Code.
+ * @param[in]          answer_type             answer type
+ */
+int vcall_engine_answer_call_by_type(vcall_engine_answer_type_t answer_type)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       CALL_ENG_DEBUG(ENG_DEBUG, "answer_type:[%d]\n", answer_type);
+
+       if (TRUE == voicecall_core_answer_call_bytype(global_pcall_core, answer_type)) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+
+}
+
+/**
+ * This function cancel outgoing call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_cancel_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       if (TRUE == voicecall_core_cancel_call(global_pcall_core)) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function reject incoming call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_reject_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       if (TRUE == voicecall_core_reject_mt(global_pcall_core, TRUE)) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function release a active or held call
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_release_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       if (TRUE == voicecall_core_end_call(global_pcall_core)) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function release a call by handle
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     call_handle
+ */
+int vcall_engine_release_call_by_handle(int call_handle)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle:[%d]\n", call_handle);
+
+       if (TRUE == voicecall_core_end_call_by_handle(global_pcall_core, call_handle)) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function release calls by type
+ *
+ * @return     int     API Result Code.
+ * @param[in]          release_type release_type
+ */
+int vcall_engine_release_call_by_type(vcall_engine_release_type_t release_type)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " release_type : [%d]\n", release_type);
+       switch (release_type) {
+       case VCALL_ENGINE_RELEASE_ALL_ACTIVE_CALLS:
+               {
+                       ret = voicecall_core_end_all_active_calls(global_pcall_core);
+               }
+               break;
+
+       case VCALL_ENGINE_RELEASE_ALL_HELD_CALLS:
+               {
+                       ret = voicecall_core_end_all_held_calls(global_pcall_core);
+               }
+               break;
+
+       case VCALL_ENGINE_RELEASE_ALL_CALLS:
+               {
+                       ret = voicecall_core_end_all_calls(global_pcall_core);
+               }
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, " Unknown release_type : [%d]\n", release_type);
+               break;
+
+       }
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function processes hold/retrive/swap calls.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_process_hold_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_process_hold_call(global_pcall_core);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function processes in call SS code..
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+void vcall_engine_process_incall_ss(char *number)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "number(%s)\n");
+
+       voicecall_core_process_incall_ss(global_pcall_core, number);
+}
+
+/**
+ * This function sets up a conference calls
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_join_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_setup_conference(global_pcall_core);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function make a private call in conference calls.
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     call_handle
+ */
+int vcall_engine_split_call(int call_handle)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_make_private_call(global_pcall_core, call_handle);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function transfers the call from active call to the held call
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     call_handle
+ */
+int vcall_engine_transfer_call(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_transfer_calls(global_pcall_core);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function processed loud speaker.
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     bstatus
+ */
+int vcall_engine_process_loudspeaker(int bstatus)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " bstatus : [%d]\n", bstatus);
+       if (bstatus) {
+               ret = voicecall_service_loudspeaker_on(global_pcall_core);
+       } else {
+               ret = voicecall_service_loudspeaker_off(global_pcall_core);
+       }
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function processed voice mute status.
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     bstatus
+ */
+int vcall_engine_process_voice_mute(int bstatus)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " bstatus : [%d]\n", bstatus);
+       if (bstatus) {
+               ret = voicecall_service_mute_status_on(global_pcall_core);
+       } else {
+               ret = voicecall_service_mute_status_off(global_pcall_core);
+       }
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function gets the volume level
+ *
+ * @return     int     API Result Code.
+ * @param[in]          vcall_engine_vol_type_t vol_type
+ * @param[in]          voicecall_snd_volume_alert_type_t vol_alert_type
+ */
+int vcall_engine_get_volume_level(vcall_engine_vol_type_t vol_type)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " vol_type : [%d]\n", vol_type);
+
+       return voicecall_snd_get_volume(global_pcall_core->papp_snd, vol_type);
+
+}
+
+/**
+ * This function sets the volume level
+ *
+ * @return     int     API Result Code.
+ * @param[in]          vcall_engine_vol_type_t vol_type
+ * @param[in]          int vol_level
+ */
+int vcall_engine_set_volume_level(vcall_engine_vol_type_t vol_type, int vol_level)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " vol_type : [%d], vol_level:[%d]\n", vol_type, vol_level);
+       ret = voicecall_service_set_volume(global_pcall_core, vol_type, vol_level);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function stop alert
+ *
+ * @return     int     API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_stop_alert(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_stop_alert(global_pcall_core);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function mute alert.
+ *
+ * @return int API Result Code.
+ * @param[in]          none
+ */
+int vcall_engine_mute_alert(void)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_snd_mute_alert(global_pcall_core->papp_snd);
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function process auto redial.
+ *
+ * @return     int     API Result Code.
+ * @param[in]          int bstatus
+ */
+int vcall_engine_process_auto_redial(int bstatus)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " bstatus : [%d]\n", bstatus);
+       if (bstatus) {
+               ret = voicecall_core_start_redial(global_pcall_core, TRUE);
+       } else {
+               ret = voicecall_core_stop_redial(global_pcall_core);
+       }
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function send the DTMF number
+ *
+ * @return     int     API Result Code.
+ * @param[in]          char* dtmf_number
+ */
+int vcall_engine_send_dtmf_number(char *dtmf_number)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_send_dtmf(global_pcall_core, dtmf_number);
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function processed sound path
+ *
+ * @return     int     API Result Code.
+ * @param[in]  int     sound_path
+ */
+int vcall_engine_change_sound_path(vcall_engine_audio_type_t sound_path)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_change_sound_path(global_pcall_core, sound_path);
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function get sound path
+ *
+ * @return     int     API Result Code.
+ * @param[out] int     sound_path
+ */
+int vcall_engine_get_sound_path(int *sound_path)
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+       int snd_path = 0;
+
+       ret = voicecall_core_get_sound_path(global_pcall_core, &snd_path);
+
+       if (snd_path == VOICE_CALL_AUDIO_SPEAKER) {
+               *sound_path = VCALL_ENGINE_AUDIO_SPEAKER;
+       } else if (snd_path == VOICE_CALL_AUDIO_RECEIVER) {
+               *sound_path = VCALL_ENGINE_AUDIO_RECEIVER;
+       } else if (snd_path == VOICE_CALL_AUDIO_HEADSET) {
+               *sound_path = VCALL_ENGINE_AUDIO_HEADSET;
+       } else if (snd_path == VOICE_CALL_AUDIO_EARJACK) {
+               *sound_path = VCALL_ENGINE_AUDIO_EARJACK;
+       } else {
+               *sound_path = VCALL_ENGINE_AUDIO_RECEIVER;
+       }
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+/**
+ * This function set call engine to default
+ *
+ * @return     int     API Result Code.
+ * @param[in]          
+ */
+int vcall_engine_set_to_default()
+{
+       CALL_ENG_DEBUG(ENG_WARN, "..\n");
+       int ret = FALSE;
+
+       ret = voicecall_core_set_to_default(global_pcall_core);
+
+       if (ret == TRUE) {
+               return VCALL_ENGINE_API_SUCCESS;
+       } else {
+               return VCALL_ENGINE_API_FAILED;
+       }
+}
+
+gpointer vcall_engine_get_core_state(void)
+{
+       return global_pcall_core;
+}
+
+/**
+ * This function is interface to call-utility to perform string copy
+ *
+ * @return     instance of the core state
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]  buf_count       Size of Target Buffer
+ * @param[in]  pstring         Source String
+ */
+gboolean vcall_engine_util_strcpy(char *pbuffer, int buf_count, const char *pstring)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       return _vc_core_util_strcpy(pbuffer, buf_count, pstring);
+}
+
+/**
+ * This function returns the number of groups
+ *
+ * @param[in]          pcount          count of the groups
+ */
+gboolean vcall_engine_get_group_count(int *pcount)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       return _vc_core_engine_group_get_enabled_group_count(global_pcall_core->pcall_engine, pcount);
+}
+
+/**
+ * This function is interface to call-utility to perform string copy
+ *
+ * @return     instance of the core state
+ * @param[out] pbuffer         Target Buffer
+ * @param[in]  time            time
+ */
+char *vcall_engine_util_get_date_time(time_t time)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+       return _vc_core_util_get_date_time(time);
+}
+
+/**
+ * This function is force reset all engine status.
+ *
+ * @return     void
+ * @param[in] void
+ */
+void vcall_engine_force_reset(void)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..");
+
+       voicecall_snd_unregister_cm(global_pcall_core->papp_snd);
+
+       _vc_core_util_set_call_status(VCONFKEY_CALL_OFF);
+
+       voicecall_core_end_all_calls(global_pcall_core);
+}
diff --git a/call-engine/voice-call-service.c b/call-engine/voice-call-service.c
new file mode 100755 (executable)
index 0000000..f48e808
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "voice-call-service.h"
+#include "voice-call-dbus.h"
+#include "vc-core-util.h"
+#include "voice-call-core.h"
+#include "voice-call-sound.h"
+#include "voice-call-bt.h"
+
+/**
+ * This function on the loud speaker state
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_loudspeaker_on(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+       
+       gboolean bloud_speaker = FALSE;
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       gboolean ret = FALSE;
+       int total_call_member = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "\n");
+
+       voicecall_core_get_total_call_member(pcall_core->pcall_engine, &total_call_member);
+       if (total_call_member == 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There are not active calls hence it should not work \n");
+               return FALSE;
+       }
+
+       /* Toggle the LoudSpeaker Status */
+#ifdef _NEW_SND_
+       if (voicecall_snd_get_path_status(pcall_core->papp_snd) != VOICE_CALL_SND_PATH_SPEAKER) {
+               if (TRUE == _vc_bt_is_bt_connected(pcall_core) && 
+               (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_BT)) {
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_SPEAKER);
+/*                     _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                       _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+               } else {
+                       voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_SPEAKER);
+                       voicecall_snd_change_path(papp_snd);
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "loudspeacker is already on.\n");
+               ret = FALSE;
+       }
+#else
+       bloud_speaker = voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER);
+       if (bloud_speaker == FALSE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Change to Speaker On. \n");
+
+               /*If current Path is Set to BT Headset, Change Path from Headset to Phone */
+               if (TRUE == _vc_bt_is_bt_connected(pcall_core)) {
+                       if (TRUE == voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_HEADSET)) {
+                               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_HEADSET, FALSE);
+/*                             _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_PHONE, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, FALSE);
+                               voicecall_snd_change_path(papp_snd);
+                       }
+               }
+
+               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, TRUE);
+
+               /* Change Audio Path according to the current status */
+               voicecall_snd_change_path(papp_snd);
+               ret = TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "loudspeacker is already on.\n");
+               ret = FALSE;
+       }
+#endif
+       return ret;
+}
+
+/**
+ * This function off the loud speaker state
+ *
+ * @return             gboolean
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_loudspeaker_off(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       gboolean bloud_speaker = FALSE;
+       gboolean ret = FALSE;
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       int total_call_member = -1;
+       voicecall_core_get_total_call_member(pcall_core->pcall_engine, &total_call_member);
+       if (total_call_member == 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "There are not active calls hence it should not work \n");
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "\n");
+
+#ifdef _NEW_SND_
+               if (voicecall_snd_get_path_status(pcall_core->papp_snd) == VOICE_CALL_SND_PATH_SPEAKER) {
+                       if (TRUE == _vc_bt_is_bt_connected(pcall_core)) {
+                               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_BT);
+                               /*_vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SWITCH_TO_HEADSET, -1, NULL);*/
+                               _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+                       } else {
+                               voicecall_snd_set_path_status(pcall_core->papp_snd, VOICE_CALL_SND_PATH_RECEIVER);
+                               voicecall_snd_change_path(papp_snd);
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "loudspeacker is already on.\n");
+                       ret = FALSE;
+               }
+#else
+
+       /* Toggle the LoudSpeaker Status */
+       bloud_speaker = voicecall_snd_get_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER);
+       if (bloud_speaker == TRUE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Change to Speaker Off. \n");
+
+               voicecall_snd_set_status(papp_snd, VOICE_CALL_AUDIO_SPEAKER, FALSE);
+
+               /* Change Audio Path according to the current status */
+               voicecall_snd_change_path(papp_snd);
+
+               ret = TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "loudspeacker is already off.\n");
+               ret = FALSE;
+       }
+#endif
+
+       return ret;
+}
+
+/**
+ * This function is mute on
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+
+gboolean voicecall_service_mute_status_on(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       gboolean bactive_calls = FALSE;
+       gboolean bheld_calls = FALSE;
+
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       voicecall_core_is_call_exists(pcall_engine, &bactive_calls, &bheld_calls);
+
+       if (FALSE == bactive_calls && TRUE == bheld_calls) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "nothing to do.\n");
+               /*Mute button should not be handled if only held calls exists */
+               return TRUE;
+       }
+
+       if (FALSE == papp_snd->bmute_status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Setting Voice Audio Mute Status On. \n");
+               voicecall_core_set_audio_mute_status(pcall_engine, TRUE);
+               papp_snd->bmute_status = TRUE;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "mute status is already on.\n");
+               return FALSE;
+       }
+
+}
+
+/**
+ * This function is mute off
+ *
+ * @return             void
+ * @param[in]          pcall_core              Handle to voicecall core                
+ */
+gboolean voicecall_service_mute_status_off(call_vc_core_state_t *pcall_core)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       gboolean bactive_calls = FALSE;
+       gboolean bheld_calls = FALSE;
+
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       voicecall_core_is_call_exists(pcall_engine, &bactive_calls, &bheld_calls);
+
+       if (FALSE == bactive_calls && TRUE == bheld_calls) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "nothing to do.\n");
+               /*Mute button should not be handled if only held calls exists */
+               return TRUE;
+       }
+
+       if (TRUE == papp_snd->bmute_status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Setting Voice Audio Mute Status Off. \n");
+               voicecall_core_set_audio_mute_status(pcall_engine, FALSE);
+               papp_snd->bmute_status = FALSE;
+               return TRUE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "mute status is already off.\n");
+               return FALSE;
+       }
+
+}
+
+/**
+ * This function set volume level.
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core                      Handle to voicecall core                
+ * @param[in]          vol_alert_type                  volume alert type
+ * @param[in]          volume_level                    volume level to be set
+ */
+gboolean voicecall_service_set_volume(call_vc_core_state_t *pcall_core, voicecall_snd_volume_alert_type_t vol_alert_type, int volume_level)
+{
+       VOICECALL_RETURN_FALSE_IF_FAIL(pcall_core != NULL);
+
+       voicecall_snd_mgr_t *papp_snd = pcall_core->papp_snd;
+
+       voicecall_snd_set_volume(papp_snd, vol_alert_type, volume_level);
+
+       return TRUE;
+}
diff --git a/call-engine/voice-call-sound.c b/call-engine/voice-call-sound.c
new file mode 100755 (executable)
index 0000000..fa24390
--- /dev/null
@@ -0,0 +1,1775 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "voice-call-sound.h"
+#include "vc-core-util.h"
+#include "vc-core-engine-types.h"
+#include "voice-call-core.h"
+#include "voice-call-bt.h"
+#include "voice-call-service.h"
+#include <vconf.h>
+#include <vconf-keys.h>
+
+#include <mm_message.h>
+#include <mm_player.h>
+#include <mm_sound.h>
+#include <mm_sound_private.h>
+#include <mm_types.h>
+#include <mm_error.h>
+
+#include <mm_session.h>
+#include <mm_session_private.h>
+
+#include <devman_haptic.h>
+
+#define VOICE_CALL_SND_INVALID_SND_HANDLE                      -1      /**<Invalid Sound lib Handle*/
+#define VOICE_CALL_SND_INVALID_PLAYER_HANDLE           0       /**<Invalid player lib Handle*/
+
+#define VOICE_CALL_SND_VIBON_TIME_PERIOD               1500    /**< Vibration On Timer Interval */
+#define VOICE_CALL_SND_VIBOFF_TIME_PERIOD              500             /**< Vibration Off Timer Interval  */
+#define VOICE_CALL_SND_INCREMENT_TIMER_INTERVAL        2000    /**< Incremental Melody Timer Interval  */
+#define VOICE_CALL_SND_VIB_THEN_MELODY_TIMER_INTERVAL  6000    /**< 6 sec  (3 * (VOICE_CALL_SND_VIBON_TIME_PERIOD + VOICE_CALL_SND_VIBOFF_TIME_PERIOD)) approximately*/
+#define VOICE_CALL_SND_2ND_CALL_BEEP_INTERVAL  2500
+
+#define VOICE_CALL_SND_DEFAULT_RINGTONE_PATH           MEDIADIR"/01_Minimal_tone.mp3"
+#define VOICE_CALL_SND_SECOND_RINGTONE_PATH                    MEDIADIR"/Call_WaitingTone.wav"
+
+#define VOICE_CALL_SND_CONNECT_SIGNAL_PATH                     MEDIADIR"/03_Call_connect.wav"
+#define VOICE_CALL_SND_DISCONNECT_SIGNAL_PATH          MEDIADIR"/04_Call_disconnect.wav"
+#define VOICE_CALL_SND_MINUTE_MINDER_SIGNAL_PATH               MEDIADIR"/03_Call_connect.wav"
+
+#define VOICE_CALL_SND_USER_BUSY_SIGNAL_PATH           MEDIADIR"/Call_BusyTone.wav"
+#define VOICE_CALL_SND_NW_CONGESTION_SIGNAL_PATH       MEDIADIR"/Call_NwCongestionTone.wav"
+#define VOICE_CALL_SND_ERROR_SIGNAL_PATH                               MEDIADIR"/Call_ErrorTone.wav"
+
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+#define VOICE_CALL_SND_INITIAL_VOL_LEVEL                       1
+#define VOICE_CALL_SND_RING_ELEVATOR_TIME_VAL          2000    /*3 Seconds Approx. */
+#endif
+
+/**
+ * Enumeration for volume level of 10 levels
+ */
+typedef enum _voicecall_snd_mm_vol_level9_t {
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_0_9 = 0,                 /**< volume level 1 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_1_9 = 16,                /**< volume level 2 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_2_9 = 28,                /**< volume level 3 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_3_9 = 39,                /**< volume level 4 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_4_9 = 50,                /**< volume level 5 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_5_9 = 62,                /**< volume level 6 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_6_9 = 73,                /**< volume level 7 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_7_9 = 82,                /**< volume level 8 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_8_9 = 91,                /**< volume level 9 of 10 */
+       VOICE_CALL_SND_MM_VOLUME_LEVEL_9_9 = 100,               /**< volume level 10 of 10 */
+} voicecall_snd_mm_vol_level9_t;
+
+typedef struct __voicecall_snd_path_info_t {
+       int phone_path;                                 /**< normal call state path */
+       int alert_phone_path;                           /**< alert sound to other party (record alert beep or answering machine guidance) */
+       gboolean bmic_on;
+} voicecall_snd_path_info_t;
+
+/* Local Fucntion Declerations */
+/**
+ * This function prepares to start the melody to be played according to the given parameters
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          papp_snd                        Handle to the Sound Manager
+ * @param[in]          bis_increasing          TRUE - Increasing Melody, FALSE -Normal Melody
+ * @param[in]          call_handle             Call Handle of the Incoming Call
+ */
+static gboolean __voicecall_snd_start_melody(voicecall_snd_mgr_t *papp_snd, gboolean bis_increasing, int call_handle);
+
+ /**
+* This function create the mm player
+*
+* @return      turns TRUE on success or FALSE on failure
+* @param[in]           papp_snd                Handle to the Soudn Manager
+* @param[in]           pPlayer         Handle to the mm player
+* @param[in]           play_type               Play Type of the Sound
+*/
+static gboolean __voicecall_snd_create_player(voicecall_snd_mgr_t *papp_snd, MMHandleType * pPlayer, voicecall_snd_play_type_t play_type);
+
+ /**
+ * This function starts the vibration
+ *
+ * @return             Returns nothing
+ * @param[in]          papp_snd                        Handle to the Sound Manager
+ */
+static void __voicecall_snd_start_vibration(voicecall_snd_mgr_t *papp_snd);
+
+/**
+* This function stops the vibration
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           papp_snd                        Handle to the Sound Manager
+*/
+static void __voicecall_snd_stop_vibration(voicecall_snd_mgr_t *papp_snd);
+
+/**
+* This function serves as the callback for vibration then melody timer
+*
+* @return              Returns TRUE on success or FALSE on failure
+* @param[in]           data                    Local data set by the caller
+*/
+static gboolean __voicecall_snd_vib_then_melody_cb(void *data);
+
+ /**
+ * This function serves as the callbback for the MM Player
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          message         MM Message from the MM Player
+ * @param[in]          data                    Data send by the MM Player according to the Message
+ * @param[in]          user_data       Local Data by the Caller
+ */
+static int __voicecall_snd_mmplayer_cb(int message, void *data, void *user_data);
+
+static void __voicecall_snd_mmplayer_signal_cb(gpointer puser_data);
+
+ /**
+ * This function serves as the callback for the increasing melody periodic timer
+ *
+ * @return             Returns TRUE if sound cane be played or FALSE otherwise
+ * @param[in]          data            Loca Data set by the caller
+ */
+static gboolean __voicecall_snd_increasing_melody_cb(void *data);
+
+ /**
+* This function plays the ringtone melody according to the settings
+*
+* @return              void
+* @param[in]           papp_snd                Handle to the Sound Manager
+* @param[in]           bis_increasing          TRUE - increasing melody, FALSE - normal
+*/
+static gboolean __voicecall_snd_play_melody(voicecall_snd_mgr_t *papp_snd, gboolean bis_increasing);
+
+/**
+ * This function retreives the tapi sound path to be used according to the current status
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[out] voice_snd_path          Tapi Sound Path
+ */
+static void __voicecall_snd_get_voice_path(voicecall_snd_mgr_t *papp_snd, int *voice_snd_path);
+
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+
+static gboolean __voicecall_and_start_ring_elevator_cb(gpointer pdata);
+static void __voicecall_snd_start_ring_elevator(voicecall_snd_mgr_t *papp_snd);
+static void __voicecall_snd_cancel_ring_elevator(voicecall_snd_mgr_t *papp_snd);
+#endif
+
+/*Function Defintions*/
+/**
+ * This function initializes the sound functionalties required by the Application
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          pcall_core              Handle to voicecall core
+ * @param[out] papp_snd                        Handle to the Sound Manager
+ */
+gboolean voicecall_snd_init(void *pcall_core, voicecall_snd_mgr_t **papp_snd)
+{
+       voicecall_snd_mgr_t *psnd_mgr = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Sound CM Test\n");
+
+       psnd_mgr = (voicecall_snd_mgr_t *)calloc(1, sizeof(voicecall_snd_mgr_t));
+
+       if (psnd_mgr == NULL) {
+               CALL_ENG_DEBUG(ENG_ERR, "Memory Allocation Failed\n");
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "psnd_mgr alloctated memory:[%d]\n", sizeof(voicecall_snd_mgr_t));
+
+       /*Store  voice call Handle */
+       psnd_mgr->pcall_core = pcall_core;
+#ifdef _NEW_SND_
+       psnd_mgr->current_snd_path = VOICE_CALL_SND_PATH_RECEIVER;
+       psnd_mgr->old_snd_path = VOICE_CALL_SND_PATH_NONE;
+#endif
+
+       psnd_mgr->bsound_cm_state = FALSE;
+
+       psnd_mgr->pmm_player = VOICE_CALL_SND_INVALID_PLAYER_HANDLE;
+       psnd_mgr->pmm_signal_player = VOICE_CALL_SND_INVALID_SND_HANDLE;
+
+       psnd_mgr->mmfsoundplay_handle = VOICE_CALL_SND_INVALID_SND_HANDLE;
+       psnd_mgr->mmfalternateplay_handle = VOICE_CALL_SND_INVALID_SND_HANDLE;
+
+       psnd_mgr->psignal_play_end_cb = NULL;
+       psnd_mgr->psignal_play_end_cb_data = NULL;
+
+       /*Return the created Sound Manager */
+       *papp_snd = psnd_mgr;
+       return TRUE;
+
+}
+
+void __voicecall_snd_alternate_sound_cb(void *puser_data);
+void __voicecall_snd_play_alternate_sound(voicecall_snd_mgr_t *papp_snd);
+gboolean __voicecall_snd_stop_alternate_sound(voicecall_snd_mgr_t *papp_snd);
+
+gboolean __voicecall_snd_alternate_sound_idle_cb(void *puser_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)puser_data;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       if (TRUE == papp_snd->balternate_play) {
+               if ((FALSE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine))
+                   && (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine))) {
+                       /* case : during 2nd incoming call, connected call is cleared. so, just 1 incoming call case... */
+                       CALL_ENG_DEBUG(ENG_DEBUG, "2nd incoming -> just single incoming call.\n");
+                       voicecall_snd_prepare_alert(papp_snd, papp_snd->incoming_call_handle);
+                       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_RING_TONE);
+                       voicecall_snd_play_alert(papp_snd);
+               } else {
+                       __voicecall_snd_play_alternate_sound(papp_snd);
+               }
+       }
+
+       return FALSE;
+}
+
+gboolean __voicecall_snd_alternate_play_timeout_cb(gpointer pdata)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)pdata;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       if (papp_snd->balternate_play == TRUE) {
+               __voicecall_snd_play_alternate_sound(papp_snd);
+       }
+
+       return FALSE;
+}
+
+void __voicecall_snd_play_alternate_sound(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       if (TRUE == voicecall_core_is_incoming_call_exists(pcall_core->pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Incoming call is there!Play Alternate Sound \n");
+
+               int mmf_error = -1;
+
+               char ring_tone[VOICE_CALL_SND_RINGTONE_PATH_LEN];
+               snprintf(ring_tone, sizeof(ring_tone), "file://%s", VOICE_CALL_SND_SECOND_RINGTONE_PATH);
+
+               voicecall_snd_change_mm_path(pcall_core->papp_snd, VOICE_CALL_MM_SECOND_CALL_TONE);
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Call mm_sound_play_sound to play alternate ringtonen\n");
+               mmf_error = mm_sound_play_sound(VOICE_CALL_SND_SECOND_RINGTONE_PATH, VOLUME_TYPE_CALL, __voicecall_snd_alternate_sound_cb, papp_snd, &papp_snd->mmfalternateplay_handle);
+
+               if (MM_ERROR_NONE == mmf_error) {
+                       papp_snd->balternate_play = TRUE;
+                       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_PLAY;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Alternate Sound Play Called,papp_snd->balternate_play=%d \n", papp_snd->balternate_play);
+               } else {
+                       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_STOP;
+                       papp_snd->balternate_play = FALSE;
+                       CALL_ENG_DEBUG(ENG_DEBUG, "mmf_error = [0x%x] \n", mmf_error);
+               }
+               CALL_ENG_DEBUG(ENG_DEBUG, "End of Alternate Sound!\n");
+       }
+}
+
+gboolean __voicecall_snd_stop_alternate_sound(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, " papp_snd->balternate_play = %d\n", papp_snd->balternate_play);
+       if (TRUE == papp_snd->balternate_play) {
+               /*Only Stop if it is in Play State */
+               if (VOICE_CALL_SND_STATUS_PLAY == papp_snd->ringtone_sound_status) {
+                       int error = 0;
+                       error = mm_sound_stop_sound(papp_snd->mmfalternateplay_handle);
+                       papp_snd->mmfalternateplay_handle = -1;
+                       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_STOP;
+                       CALL_ENG_DEBUG(ENG_ERR, "Alternate Ringtone Stopeed,Error Code: [0x%x] \n", error);
+               }
+               papp_snd->balternate_play = FALSE;
+               return TRUE;
+       }
+       return FALSE;
+}
+
+void __voicecall_snd_alternate_sound_cb(void *puser_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)puser_data;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->balternate_play= %d\n", papp_snd->balternate_play);
+
+       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_STOPPED;
+
+       /*If connected call exists then change the audio path */
+       if ((TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine))) {
+               voicecall_snd_change_path(papp_snd);
+       }
+
+       g_timeout_add(VOICE_CALL_SND_2ND_CALL_BEEP_INTERVAL, __voicecall_snd_alternate_sound_idle_cb, papp_snd);
+
+}
+
+void voicecall_snd_prepare_alert(voicecall_snd_mgr_t *papp_snd, int call_handle)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+       int err_code = -1;
+
+       papp_snd->incoming_call_handle = call_handle;
+
+       if (TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Alternate Sound Needs to be played \n");
+               papp_snd->ringtone_sound_status = VOICE_CALL_AND_STATUS_ALTERNATE_PLAY;
+               return;
+       }
+
+       /*
+          Always stop the alert before starting another
+          to make sure the previous alert is proerly closed.
+        */
+       voicecall_snd_stop_alert(papp_snd);
+
+       /*Initizlize Variables */
+       papp_snd->pmm_player = VOICE_CALL_SND_INVALID_PLAYER_HANDLE;
+       papp_snd->settings_sound_status = FALSE;
+       papp_snd->settings_vib_status = FALSE;
+
+       err_code = vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &papp_snd->settings_sound_status);
+       CALL_ENG_DEBUG(ENG_DEBUG, "cur_sound_status = %d, error_code = %d\n", papp_snd->settings_sound_status, err_code);
+
+       err_code = vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &papp_snd->settings_vib_status);
+       CALL_ENG_DEBUG(ENG_DEBUG, "cur_vib_status = %d, error_code = %d\n", papp_snd->settings_vib_status, err_code);
+
+       if (papp_snd->settings_sound_status == FALSE)
+               papp_snd->bmute_play = TRUE;
+
+       __voicecall_snd_start_melody(papp_snd, FALSE, call_handle);
+
+}
+
+void voicecall_snd_play_alert(voicecall_snd_mgr_t *papp_snd)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->ringtone_sound_status=%d \n ", papp_snd->ringtone_sound_status);
+
+       if (VOICE_CALL_AND_STATUS_ALTERNATE_PLAY == papp_snd->ringtone_sound_status) {
+               if (TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Starting Alternate Sound \n");
+                       papp_snd->balternate_play_count = 0;
+                       __voicecall_snd_play_alternate_sound(papp_snd);
+               }
+       }
+
+       if (VOICE_CALL_SND_STATUS_READY != papp_snd->ringtone_sound_status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, " Invalid ringtone_sound_status: %d \n ", papp_snd->ringtone_sound_status);
+               return;
+       }
+
+       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_PROCESSED;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " [##### papp_snd->settings_sound_status #####] : %d \n ", papp_snd->settings_sound_status);
+       CALL_ENG_DEBUG(ENG_DEBUG, " [##### papp_snd->settings_vib_status #####] : %d \n ", papp_snd->settings_vib_status);
+
+       if (papp_snd->settings_sound_status) {
+               __voicecall_snd_play_melody(papp_snd, FALSE);
+       } else if (papp_snd->bmute_play) {
+               /*Change the path to the earjack headset and play the ringtone */
+               voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_MUTE_PLAY);
+               __voicecall_snd_play_melody(papp_snd, FALSE);
+       }
+       if (papp_snd->settings_vib_status) {
+               __voicecall_snd_start_vibration(papp_snd);
+       }
+}
+
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+
+gboolean __voicecall_and_start_ring_elevator_cb(gpointer pdata)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)pdata;
+       int volume_level = VOICE_CALL_VOL_LEVEL_1;
+       int ret_value = -1;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       /*Get the settings current ringtone volume level and set to media player */
+       ret_value = vconf_get_int(VCONFKEY_SETAPPL_PROFILE_CURRENT_CALL_VOLUME_INT, &volume_level);
+       if (ret_value != 0) {
+               CALL_ENG_DEBUG(ENG_ERR, "settings read failed Error: %d\n", ret_value);
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Settings Volume Level = %d\n", volume_level);
+
+       if (papp_snd->pmm_player != VOICE_CALL_SND_INVALID_PLAYER_HANDLE) {
+               ret_value = mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, volume_level);
+               if (MM_ERROR_NONE != ret_value) {
+                       CALL_ENG_DEBUG(ENG_ERR, "Set Volume Error: [0x%x]\n", ret_value);
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "Invalid MM Plauer %d\n", papp_snd->pmm_player);
+       }
+
+       return FALSE;
+}
+
+void __voicecall_snd_start_ring_elevator(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       papp_snd->ring_elvator_timerid = g_timeout_add(VOICE_CALL_SND_RING_ELEVATOR_TIME_VAL, __voicecall_and_start_ring_elevator_cb, papp_snd);
+}
+
+void __voicecall_snd_cancel_ring_elevator(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       if (papp_snd->ring_elvator_timerid > 0) {
+               g_source_remove(papp_snd->ring_elvator_timerid);
+               papp_snd->ring_elvator_timerid = 0;
+       }
+}
+#endif
+
+gboolean voicecall_snd_mute_alert(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       if (papp_snd->pmm_player != VOICE_CALL_SND_INVALID_PLAYER_HANDLE) {
+               int ret_value = 0;
+
+               ret_value = mm_player_set_mute(papp_snd->pmm_player, TRUE);
+               CALL_ENG_DEBUG(ENG_DEBUG, "MM Set Mute Error code: [0x%x] \n", ret_value);
+       }
+
+       if (TRUE == papp_snd->bvibration) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Vibration is playing, stopping vibration \n");
+               __voicecall_snd_stop_vibration(papp_snd);
+       }
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+       __voicecall_snd_cancel_ring_elevator(papp_snd);
+#endif
+
+       /*Make Vibration than melody flag to FALSE, so melody will not be played when it is muted */
+       papp_snd->bvibration_then_melody = FALSE;
+
+       /*Make Increasing Melody flag to FALSE, so melody volume will not be increased when it is muted */
+       papp_snd->bincreasingmelody = FALSE;
+
+       return FALSE;
+}
+
+/**
+ * This function stops the sound alert
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_stop_alert(voicecall_snd_mgr_t *papp_snd)
+{
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       __voicecall_snd_stop_vibration(papp_snd);
+
+       if (TRUE == __voicecall_snd_stop_alternate_sound(papp_snd)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Alternate sound stopped \n");
+               return;
+       }
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+       /*Stop Ring Elevator */
+       __voicecall_snd_cancel_ring_elevator(papp_snd);
+#endif
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "pmm_player = %d \n", papp_snd->pmm_player);
+       if (papp_snd->pmm_player != VOICE_CALL_SND_INVALID_PLAYER_HANDLE) {
+               int ret_value = 0;
+               MMPlayerStateType mmplayer_state = MM_PLAYER_STATE_NONE;
+
+               /*Sound Stop requested by the Application */
+               papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_STOP;
+
+               mm_player_get_state(papp_snd->pmm_player, &mmplayer_state);
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Callling mmplayer_stop, current mm state = %d, Player = %d\n", mmplayer_state, papp_snd->pmm_player);
+               if (MM_PLAYER_STATE_PLAYING == mmplayer_state || MM_PLAYER_STATE_PAUSED == mmplayer_state) {
+                       ret_value = mm_player_stop(papp_snd->pmm_player);
+                       if (MM_ERROR_NONE != ret_value) {
+                               CALL_ENG_DEBUG(ENG_ERR, "mmplayer_stop failed: [0x%x]\n", ret_value);
+                       }
+               }
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Callling mmplayer_unrealize, Player = %d\n", papp_snd->pmm_player);
+               ret_value = mm_player_unrealize(papp_snd->pmm_player);
+               if (MM_ERROR_NONE != ret_value) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mmplayer_unrealize failed: [0x%x]\n", ret_value);
+               }
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Callling mmplayer_destroy, Player = %d\n", papp_snd->pmm_player);
+               ret_value = mm_player_destroy(papp_snd->pmm_player);
+               if (MM_ERROR_NONE != ret_value) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mmplayer_destroy failed: [0x%x]\n", ret_value);
+               }
+               papp_snd->pmm_player = VOICE_CALL_SND_INVALID_PLAYER_HANDLE;
+
+               papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_STOPPED;
+       }
+
+       /* Stop All periodic Timers */
+       papp_snd->bvibration_then_melody = FALSE;
+       papp_snd->bincreasingmelody = FALSE;
+
+       /* Make the Current Sound Playing Call HAndle Invalid */
+       papp_snd->current_playing_call_handle = -1;
+
+       papp_snd->bmute_play = FALSE;
+}
+
+gboolean voicecall_snd_set_play_end_callback(voicecall_snd_mgr_t *papp_snd, voicecall_snd_callback psignal_play_end_cb, gpointer psignal_play_end_cb_data)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "signal_type = %d\n", papp_snd->signal_type);
+
+       if (VOICE_CALL_SND_STATUS_NONE == papp_snd->signal_sound_status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Signal Being Played\n");
+               return FALSE;
+       }
+
+       papp_snd->psignal_play_end_cb = psignal_play_end_cb;
+       papp_snd->psignal_play_end_cb_data = psignal_play_end_cb_data;
+
+       return TRUE;
+}
+
+/**
+ * This function plays call sound
+ *
+ * @return             Returns TRUE on success or FALSE on failure
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+gboolean voicecall_snd_is_signal_playing(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "Signal Sound Status : [%d] \n", papp_snd->signal_sound_status);
+       if ((papp_snd->pmm_signal_player != VOICE_CALL_SND_INVALID_SND_HANDLE) && (VOICE_CALL_SND_STATUS_PLAY == papp_snd->signal_sound_status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Signal is playing \n");
+               return TRUE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Signal is not playing \n");
+       return FALSE;
+}
+
+gboolean voicecall_snd_play_signal(voicecall_snd_mgr_t *papp_snd, voicecall_snd_callback psignal_play_end_cb, gpointer psignal_play_end_cb_data)
+{
+       int ret_value = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "signal_type = %d\n", papp_snd->signal_type);
+
+       if (VOICE_CALL_SIGNAL_NONE == papp_snd->signal_type) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Signal Type Assinged\n");
+               return FALSE;
+       }
+
+       /*
+          Always stop the signal before playing another one
+          This is to make sure that previous signal sound is stopeed completely
+        */
+       voicecall_snd_stop_signal(papp_snd);
+
+       /*Set status, the signal play is being prepared */
+       papp_snd->signal_sound_status = VOICE_CALL_SND_STATUS_READY;
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->signal_sound_status = %d\n", papp_snd->signal_sound_status);
+
+       papp_snd->psignal_play_end_cb = psignal_play_end_cb;
+       papp_snd->psignal_play_end_cb_data = psignal_play_end_cb_data;
+
+       if (TRUE == voicecall_snd_is_effect_playing(papp_snd)) {
+               CALL_ENG_DEBUG(ENG_ERR, "Stopping effect tone to play signal \n ");
+               voicecall_snd_stop_effect_tone(papp_snd);
+       }
+
+       CALL_ENG_DEBUG(ENG_ERR, "Changing path to play signal\n ");
+       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_SIGNAL_TONE);
+       CALL_ENG_DEBUG(ENG_ERR, "Changing path to play signal Over\n ");
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "signal_tone = %s\n", papp_snd->signal_tone);
+       ret_value = mm_sound_play_sound(papp_snd->signal_tone, VOLUME_TYPE_CALL, __voicecall_snd_mmplayer_signal_cb, papp_snd, &papp_snd->pmm_signal_player);
+       if (MM_ERROR_NONE != ret_value) {
+               papp_snd->signal_sound_status = VOICE_CALL_SND_STATUS_NONE;
+               CALL_ENG_DEBUG(ENG_ERR, "mm_sound_play_sound failed,Error: [0x%x]\n", ret_value);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->pmm_signal_player[%d]\n", papp_snd->pmm_signal_player);
+               papp_snd->signal_sound_status = VOICE_CALL_SND_STATUS_PLAY;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Signal Play Started, Sound Status is: %d\n", papp_snd->signal_sound_status);
+
+       return TRUE;
+}
+
+/**
+ * This function stops the sound alert
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_stop_signal(voicecall_snd_mgr_t *papp_snd)
+{
+       int ret_value = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Sound Status: %d, papp_snd->pmm_signal_player(%d)\n", papp_snd->signal_sound_status, papp_snd->pmm_signal_player);
+       if (papp_snd->pmm_signal_player != VOICE_CALL_SND_INVALID_SND_HANDLE) {
+               if (VOICE_CALL_SND_STATUS_PLAY == papp_snd->signal_sound_status) {
+                       papp_snd->signal_sound_status = VOICE_CALL_SND_STATUS_STOPPED;
+
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Stopping Signal Sound \n");
+                       ret_value = mm_sound_stop_sound(papp_snd->pmm_signal_player);
+                       if (MM_ERROR_NONE != ret_value) {
+                               CALL_ENG_DEBUG(ENG_ERR, "mm_sound_stop_sound failed: [0x%x]\n", ret_value);
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Sound Play Over / Already Stopped \n");
+               }
+               papp_snd->pmm_signal_player = VOICE_CALL_SND_INVALID_SND_HANDLE;
+       }
+       if (papp_snd->psignal_play_end_cb != NULL) {
+               papp_snd->psignal_play_end_cb(papp_snd->psignal_play_end_cb_data);
+               papp_snd->psignal_play_end_cb = NULL;
+               papp_snd->psignal_play_end_cb_data = NULL;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Application Sound Status:%d \n", papp_snd->signal_sound_status);
+}
+
+/**
+ * This function sets the end signal of the given end cause type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          end_cause_type          Type of the end cause
+ */
+void voicecall_snd_set_signal_type(voicecall_snd_mgr_t *papp_snd, voicecall_snd_signal_type_t signal_type)
+{
+       char signal_tone[VOICE_CALL_SND_RINGTONE_PATH_LEN];
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Signal Type: %d\n", signal_type);
+
+       memset(signal_tone, 0, sizeof(signal_tone));
+
+       papp_snd->signal_type = signal_type;
+       switch (papp_snd->signal_type) {
+       case VOICE_CALL_SIGNAL_USER_BUSY_TONE:
+               {
+                       _vc_core_util_strcpy(signal_tone, VOICE_CALL_SND_RINGTONE_PATH_LEN, VOICE_CALL_SND_USER_BUSY_SIGNAL_PATH);
+               }
+               break;
+       case VOICE_CALL_SIGNAL_WRONG_NUMBER_TONE:
+               {
+                       _vc_core_util_strcpy(signal_tone, VOICE_CALL_SND_RINGTONE_PATH_LEN, VOICE_CALL_SND_ERROR_SIGNAL_PATH);
+               }
+               break;
+       case VOICE_CALL_SIGNAL_CALL_FAIL_TONE:
+       case VOICE_CALL_SIGNAL_NW_CONGESTION_TONE:
+               {
+                       _vc_core_util_strcpy(signal_tone, VOICE_CALL_SND_RINGTONE_PATH_LEN, VOICE_CALL_SND_NW_CONGESTION_SIGNAL_PATH);
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_ERR, "Invalid Signal Type \n");
+               break;
+       }
+
+       _vc_core_util_strcpy(papp_snd->signal_tone, sizeof(papp_snd->signal_tone), signal_tone);
+
+}
+
+static void __voicecall_snd_get_voice_path(voicecall_snd_mgr_t *papp_snd, int *voice_snd_path)
+{
+       voicecall_audio_path_t tmp_audio_path;
+
+#ifdef _NEW_SND_
+       CALL_ENG_DEBUG(ENG_DEBUG, "current path = %d\n", voicecall_snd_get_path_status(papp_snd));
+       
+       switch (voicecall_snd_get_path_status(papp_snd)) {
+       case VOICE_CALL_SND_PATH_BT:
+               {
+                       tmp_audio_path = VC_AUDIO_PATH_BLUETOOTH;
+               }
+               break;
+       case VOICE_CALL_SND_PATH_SPEAKER:
+               {
+                       tmp_audio_path = VC_AUDIO_PATH_SPK_PHONE;
+               }
+               break;
+       case VOICE_CALL_SND_PATH_EARJACK:
+               {
+                       tmp_audio_path = VC_AUDIO_PATH_HEADSET;
+               }
+               break;
+       case VOICE_CALL_SND_PATH_RECEIVER:
+       default:
+               {
+                       tmp_audio_path = VC_AUDIO_PATH_HANDSET;
+               }
+       }
+#else
+       CALL_ENG_DEBUG(ENG_DEBUG, "Headset Status  = %d\n", papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_HEADSET]);
+       CALL_ENG_DEBUG(ENG_DEBUG, "Loud Speaker Status  = %d\n", papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_SPEAKER]);
+
+       /*Priority is given to Headset, incase both loudspeaker and headset is enabled */
+       if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_HEADSET]) {
+               tmp_audio_path = VC_AUDIO_PATH_BLUETOOTH;
+       } else if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_SPEAKER]) {
+               tmp_audio_path = VC_AUDIO_PATH_SPK_PHONE;
+       } else if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_EARJACK]) {
+               tmp_audio_path = VC_AUDIO_PATH_HEADSET;
+       } else {
+               tmp_audio_path = VC_AUDIO_PATH_HANDSET;
+       }
+#endif
+       *voice_snd_path = tmp_audio_path;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "voice_snd_path = %d\n", *voice_snd_path);
+
+}
+
+void voicecall_snd_change_mm_path(voicecall_snd_mgr_t *papp_snd, voicecall_snd_mm_path_type_t mm_path_type)
+{
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+       voicecall_engine_t *pcall_engine = pcall_core->pcall_engine;
+       int in_path = 0;
+       int out_path = 0;
+       int gain_type = 0;
+       int mm_error = 0;
+       int option_field = MM_SOUND_PATH_OPTION_AUTO_HEADSET_CONTROL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "mm_path_type = %d\n", mm_path_type);
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->current_path_type = %d\n", papp_snd->current_path_type);
+
+#ifdef _NEW_SND_
+       switch (voicecall_snd_get_path_status(papp_snd)) {
+       case VOICE_CALL_SND_PATH_BT:
+               {
+                       out_path = MM_SOUND_PATH_BTHEADSET;
+                       in_path = MM_SOUND_PATH_BTMIC;
+               }
+               break;
+       case VOICE_CALL_SND_PATH_SPEAKER:
+               {
+                       out_path = MM_SOUND_PATH_SPK;
+                       in_path = MM_SOUND_PATH_MIC;
+                       option_field = MM_SOUND_PATH_OPTION_NONE;
+               }
+               break;
+       case VOICE_CALL_SND_PATH_EARJACK:
+       case VOICE_CALL_SND_PATH_RECEIVER:
+       default:
+               {
+                       out_path = MM_SOUND_PATH_RECV;
+                       in_path = MM_SOUND_PATH_MIC;
+               }
+               break;
+       }
+       
+#else
+       /*Define OutPath */
+       if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_HEADSET]) {
+               out_path = MM_SOUND_PATH_BTHEADSET;
+       } else if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_SPEAKER]) {
+               out_path = MM_SOUND_PATH_SPK;
+               option_field = MM_SOUND_PATH_OPTION_NONE;
+       } else {                /*Normal Phone Reciever */
+
+               out_path = MM_SOUND_PATH_RECV;
+       }
+
+       if (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_HEADSET]) {
+               in_path = MM_SOUND_PATH_BTMIC;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Don't off the MIC. Mute only modem\n");
+               in_path = MM_SOUND_PATH_MIC;
+       }
+#endif
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Out Path = %d, In Path = %d \n", out_path, in_path);
+
+       /* This patch is required : if voice path is not reset,
+        * the volume played for ringtone and signal tone will not be audible enough to hear
+        */
+       if ((VOICE_CALL_MM_VOICE == papp_snd->current_path_type) && ((VOICE_CALL_MM_RING_TONE == mm_path_type) || (VOICE_CALL_MM_SIGNAL_TONE == mm_path_type))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Resetting Voice Path before changing to some other path \n");
+       }
+
+       /*Define Gain Type */
+       switch (mm_path_type) {
+       case VOICE_CALL_MM_ALERT_TONE:
+               {
+                       gain_type = MM_SOUND_GAIN_CALLTONE;
+                       in_path = MM_SOUND_PATH_NONE;
+               }
+               break;
+       case VOICE_CALL_MM_SECOND_CALL_TONE:
+               {
+                       /* MMFW sound request. always set it. */
+                       gain_type = MM_SOUND_GAIN_KEYTONE;      /* In case of earjack inserting, during second call */
+                       in_path = MM_SOUND_PATH_NONE;
+               }
+               break;
+       case VOICE_CALL_MM_RING_TONE:
+               {
+                       int io_state = VC_INOUT_STATE_NONE;
+
+                       gain_type = MM_SOUND_GAIN_RINGTONE;
+                       in_path = MM_SOUND_PATH_NONE;
+                       option_field = MM_SOUND_PATH_OPTION_SPEAKER_WITH_HEADSET;
+
+                       voicecall_core_get_engine_state(pcall_engine, &io_state);
+                       if ((voicecall_core_is_incoming_call_exists(pcall_engine)) && (io_state != VC_INOUT_STATE_INCOME_END)) {
+                               out_path = MM_SOUND_PATH_SPK;
+                       }
+               }
+               break;
+       case VOICE_CALL_MM_MUTE_PLAY:
+               {
+                       gain_type = MM_SOUND_GAIN_RINGTONE;
+                       in_path = MM_SOUND_PATH_NONE;
+                       out_path = MM_SOUND_PATH_HEADSET;
+               }
+               break;
+       case VOICE_CALL_MM_RESET:
+               {
+                       gain_type = MM_SOUND_GAIN_VOICECALL;
+                       in_path = MM_SOUND_PATH_NONE;
+                       out_path = MM_SOUND_PATH_NONE;
+               }
+               break;
+       case VOICE_CALL_MM_SIGNAL_TONE:
+               {
+                       gain_type = MM_SOUND_GAIN_CALLTONE;
+                       in_path = MM_SOUND_PATH_NONE;
+               }
+               break;
+       case VOICE_CALL_MM_RECORD:
+               {
+                       gain_type = MM_SOUND_GAIN_VOICECALL;
+               }
+               break;
+       case VOICE_CALL_MM_VOICE:
+               {
+                       gain_type = MM_SOUND_GAIN_VOICECALL;
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid MM Path Type: %d\n", mm_path_type);
+       }
+
+       if (papp_snd->bsound_cm_state == TRUE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "mm_sound_set_path- Gain:[%d],OutPath:[%d],InPath:[%d],option:[%d] \n", gain_type, out_path, in_path, option_field);
+               CALL_ENG_KPI("mm_sound_set_path start");
+               mm_error = mm_sound_set_path(gain_type, out_path, in_path, option_field);
+               CALL_ENG_KPI("mm_sound_set_path done");
+               if (mm_error != MM_ERROR_NONE) {
+                       CALL_ENG_DEBUG(ENG_ERR, "MM Path Change Failed,mm_error =  [0x%x]\n", mm_error);
+               }
+               papp_snd->current_path_type = mm_path_type;
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "** we can't change mm path. check it. **** \n");
+       }
+
+}
+
+/**
+ * This function changes the sound path according to the current status
+ *
+ * @return             void
+ * @param[in]          papp_snd                        Handle to Sound Manager
+ */
+void voicecall_snd_change_path(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       CALL_ENG_KPI("voicecall_snd_change_path start");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+#ifdef _NEW_SND_
+       if (voicecall_snd_get_path_status(papp_snd) == VOICE_CALL_SND_PATH_BT) {
+               int bt_sco_status = 0;
+
+               bt_sco_status = _vc_bt_get_bt_sco_status();
+               if (FALSE == bt_sco_status) {
+                       gboolean bevent_wait = FALSE;
+
+                       CALL_ENG_DEBUG(ENG_ERR, "BT Sco is OFF, request BT for path change\n");
+                       bevent_wait = voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING);
+                       if (FALSE == bevent_wait) {
+                               /*Request BT for change path to headset */
+                               _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "bevent_wait = %d, waiting for BT Event \n", bevent_wait);
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT SCO is open, Change the path to sync with BT Path\n");
+                       voicecall_snd_change_path_real(papp_snd);
+               }
+       }else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "new PATH is not BT.");
+               gboolean bevent_wait = FALSE;
+
+               bevent_wait = voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING);
+               if (FALSE == bevent_wait) {
+                       /*Request BT for change path to headset */
+                       voicecall_snd_change_path_real(papp_snd);
+               } else {
+                       CALL_ENG_DEBUG(ENG_ERR, "bevent_wait = %d, waiting for BT Event \n", bevent_wait);
+               }
+       }
+#else
+       if ((TRUE == _vc_bt_is_bt_connected(pcall_core))
+           && (TRUE == papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_HEADSET])) {
+
+               int bt_sco_status = 0;
+
+               bt_sco_status = _vc_bt_get_bt_sco_status();
+               if (FALSE == bt_sco_status) {
+                       gboolean bevent_wait = FALSE;
+
+                       CALL_ENG_DEBUG(ENG_ERR, "BT Sco is OFF, request BT for path change\n");
+                       bevent_wait = voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_BT_EVENT_WAITING);
+                       if (FALSE == bevent_wait) {
+                               /*Request BT for change path to headset */
+                               _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+                       } else {
+                               CALL_ENG_DEBUG(ENG_ERR, "bevent_wait = %d, waiting for BT Event \n", bevent_wait);
+                       }
+               } else {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "BT SCO is open, Change the path to sync with BT Path\n");
+                       voicecall_snd_change_path_real(papp_snd);
+               }
+       } else if ((TRUE == _vc_bt_is_bt_connected(pcall_core)) && (TRUE == voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_ACCEPT_BY_BT))) {
+               /*Request BT for change path to headset, actual voice path will be changed in the response from BT */
+               CALL_ENG_DEBUG(ENG_ERR, "Headset Connected Call is accepted by BT, requesting BT to change path\n");
+               _vc_bt_request_switch_headset_path(pcall_core, TRUE);
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Headset connected/Headset connected call accepted by Phone, Normal Path Change..\n");
+               voicecall_snd_change_path_real(papp_snd);
+       }
+#endif
+       CALL_ENG_KPI("voicecall_snd_change_path done");
+
+}
+
+void voicecall_snd_change_path_real(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       /* Change the mm sound path */
+       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_VOICE);
+
+       voicecall_snd_change_modem_path(papp_snd);
+}
+
+void voicecall_snd_change_modem_path(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       int audio_path = VC_AUDIO_PATH_HANDSET;
+
+       /* Change the tapi sound path */
+       __voicecall_snd_get_voice_path(papp_snd, &audio_path);
+
+       if (FALSE == voicecall_core_change_audio_path(pcall_core->pcall_engine, audio_path)) {
+               CALL_ENG_DEBUG(ENG_ERR, "TAPI Audio Change Path ERROR \n");
+       }
+}
+
+/**
+ * This function sets the status of the given call audio type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type          Type of the Device to be changed
+ * @param[in]          status                          Status, TRUE - Enable, FALSE -Disable
+ */
+void voicecall_snd_set_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_audio_type_t snd_audio_type, gboolean status)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "snd_audio_type:[%d], status:[%d]\n", snd_audio_type, status);
+
+       /*if BT headset is connected , switch off loud speaker - it will be reflectd in the next sound path change */
+       if (((VOICE_CALL_AUDIO_HEADSET == snd_audio_type) || (VOICE_CALL_AUDIO_EARJACK == snd_audio_type)) && (TRUE == status)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "loud speaker status is to be FALSE\n");
+               papp_snd->bcall_audio_status[VOICE_CALL_AUDIO_SPEAKER] = FALSE;
+       }
+       papp_snd->bcall_audio_status[snd_audio_type] = status;
+}
+
+/**
+ * This function returns the current status of the given call audio type
+ *
+ * @return             Returns TRUE if given call audio type is enables or FALSE otherwise
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type  Type of the Device to be changed
+ */
+gboolean voicecall_snd_get_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_audio_type_t snd_audio_type)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "Status[%d] = %d \n", snd_audio_type, papp_snd->bcall_audio_status[snd_audio_type]);
+       return papp_snd->bcall_audio_status[snd_audio_type];
+}
+
+#ifdef _NEW_SND_
+/**
+ * This function sets the status of the given call audio type
+ *
+ * @return             void
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          snd_audio_type          Type of the Device to be changed
+ * @param[in]          status                          Status, TRUE - Enable, FALSE -Disable
+ */
+void voicecall_snd_set_path_status(voicecall_snd_mgr_t *papp_snd, voicecall_snd_path_t path)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "current path:[%d], new path:[%d]\n", papp_snd->current_snd_path, path);
+
+       papp_snd->old_snd_path = papp_snd->current_snd_path;
+       papp_snd->current_snd_path = path;
+}
+
+voicecall_snd_path_t voicecall_snd_get_path_status(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "old path:[%d], current path:[%d]\n", papp_snd->old_snd_path, papp_snd->current_snd_path);
+
+       return papp_snd->current_snd_path;
+}
+#endif
+
+/**
+* This function sets the volume level for the given volume alert type
+*
+* @return              void
+* @param[in]   papp_snd                Handle to Sound Manager
+* @param[in]   vol_alert_type  volume alert type #voicecall_snd_volume_alert_type_t
+* @param[in]   volume_level    volume level to be set
+*/
+void voicecall_snd_set_volume(voicecall_snd_mgr_t *papp_snd, voicecall_snd_volume_alert_type_t vol_alert_type, int volume_level)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "volume_level = %d \n", volume_level);
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       switch (vol_alert_type) {
+       case VOICE_CALL_VOL_TYPE_RINGTONE:
+               {
+                       int ret_value = 0;
+                       int volume;
+
+                       if (VOICE_CALL_SND_INVALID_PLAYER_HANDLE == papp_snd->pmm_player) {
+                               CALL_ENG_DEBUG(ENG_ERR, "Invalid MM Player Handle \n");
+                               return;
+                       }
+
+                       /* Make Increasing Melody flag to FALSE, so melody volume will not be increased when volume it adjusted by user during increasing melody */
+                       papp_snd->bincreasingmelody = FALSE;
+
+                       volume = volume_level;
+
+                       ret_value = mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, volume);
+                       if (MM_ERROR_NONE != ret_value) {
+                               CALL_ENG_DEBUG(ENG_ERR, "mmplayer_set_volume failed Error: [0x%x]\n", ret_value);
+                       }
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+                       __voicecall_snd_cancel_ring_elevator(papp_snd);
+#endif
+               }
+               break;
+       case VOICE_CALL_VOL_TYPE_VOICE:
+               {
+                       int incall_vol_level = 0;
+                       int audio_path = 0;
+
+                       if (VOICE_CALL_VOL_LEVEL_1 >= volume_level) {
+                               incall_vol_level = VOICE_CALL_VOL_LEVEL_1;
+                       } else if (VOICE_CALL_VOL_LEVEL_6 < volume_level) {
+                               incall_vol_level = VOICE_CALL_VOL_LEVEL_6;
+                       } else {
+                               incall_vol_level = volume_level;
+                       }
+
+                       __voicecall_snd_get_voice_path(papp_snd, &audio_path);
+
+                       _vc_core_util_set_call_volume(volume_level);
+
+                       /* MODEM want to get volume level as 0~5, not a 1~6. So pass -1 value */
+                       if (FALSE == voicecall_core_set_audio_volume(pcall_core->pcall_engine, audio_path, (incall_vol_level-1))) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "voicecall_doc_set_audio_volume failed\n");
+                       }
+               }
+               break;
+       case VOICE_CALL_VOL_TYPE_HEADSET:
+               {
+                       int bt_vol_level = 0;
+                       if (TRUE == voicecall_core_get_status(pcall_core, CALL_VC_CORE_FLAG_VOL_CHNGD_BYBT)) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "BT Requested Volume flag is enabled, not sending response \n");
+                               voicecall_core_set_status(pcall_core, CALL_VC_CORE_FLAG_VOL_CHNGD_BYBT, FALSE);
+                       } else {
+                               bt_vol_level = volume_level;
+                               CALL_ENG_DEBUG(ENG_DEBUG, "bt_vol_level = %d\n", bt_vol_level);
+
+                               _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_SPK_GAIN, bt_vol_level, NULL);
+                       }
+
+               }
+               break;
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "No Actions Defined for the volume alert type: %d \n", vol_alert_type);
+
+       }
+}
+
+/**
+ * This function retreives the volume according to the given volume alert type
+ *
+ * @return             current volume level
+ * @param[in]          papp_snd                Handle to Sound Manager
+ * @param[in]          vol_alert_type          volume alert type #voicecall_snd_volume_alert_type_t
+ */
+int voicecall_snd_get_volume(voicecall_snd_mgr_t *papp_snd, voicecall_snd_volume_alert_type_t vol_alert_type)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "\n");
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       switch (vol_alert_type) {
+       case VOICE_CALL_VOL_TYPE_RINGTONE:
+               {
+                       int ret_val = 0;
+                       unsigned int volume = 0;
+
+                       ret_val = mm_sound_volume_get_value(VOLUME_TYPE_RINGTONE, &volume);
+                       if (MM_ERROR_NONE != ret_val) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "ret_val = [0x%x]\n", ret_val);
+                               return VC_INVALID_VOLUME;
+                       }
+                       CALL_ENG_DEBUG(ENG_DEBUG, "MM Volume Level : %d\n", volume);
+
+                       return volume;
+
+               }
+               break;
+       case VOICE_CALL_VOL_TYPE_VOICE:
+               {
+                       return _vc_core_util_get_call_volume();
+               }
+               break;
+       case VOICE_CALL_VOL_TYPE_HEADSET:
+               {
+                       _vc_bt_send_response_to_bt(pcall_core, BT_AG_RES_HEADSET_VOL, 0, NULL);
+                       return VC_INVALID_VOLUME;       /*Return Invalid Volume level as default */
+               }
+               break;
+       default:
+               return VC_INVALID_VOLUME;       /*Return Invalid Volume level as default */
+       }
+
+       return VC_INVALID_VOLUME;
+}
+
+gboolean voicecall_snd_get_alternate_play(voicecall_snd_mgr_t *papp_snd)
+{
+       return papp_snd->balternate_play;
+}
+
+static gboolean __voicecall_snd_start_melody(voicecall_snd_mgr_t *papp_snd, gboolean bis_increasing, int call_handle)
+{
+       char *setting_file_path = NULL;
+       char ringtone_path[VOICE_CALL_SND_RINGTONE_PATH_LEN] = { 0, };
+       call_vc_call_objectinfo_t callobject_info;
+       voicecall_contact_info_t ct_info;
+
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "call_handle = %d\n", call_handle);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Contact ring_tone_path = [%s]\n", papp_snd->ring_tone);
+
+       if (strlen(papp_snd->ring_tone) <= 0) {
+               setting_file_path = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR);
+               if ((setting_file_path == NULL) || (strlen(setting_file_path) <= 0) ||
+               (FALSE == g_file_test(setting_file_path, G_FILE_TEST_EXISTS)))
+               {
+                       CALL_ENG_DEBUG(ENG_ERR, "setting ring tone path is invalid : [%s]\n", setting_file_path);
+                       /*snprintf(ringtone_path, sizeof(ringtone_path), "file://%s", VOICE_CALL_SND_DEFAULT_RINGTONE_PATH);*/
+                       return;
+               } else {
+                       snprintf(ringtone_path, sizeof(ringtone_path), "file://%s", setting_file_path);
+
+               }
+               CALL_ENG_DEBUG(ENG_DEBUG, "Ringtone From Settings : %s\n", ringtone_path);
+               _vc_core_util_strcpy(papp_snd->ring_tone, sizeof(papp_snd->ring_tone), ringtone_path);
+       }
+
+       /* Create MM Player */
+       papp_snd->pmm_player = VOICE_CALL_SND_INVALID_PLAYER_HANDLE;
+       __voicecall_snd_create_player(papp_snd, &papp_snd->pmm_player, VOICE_CALL_PLAY_TYPE_RINGTONE);
+
+       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_READY;
+
+       return TRUE;
+}
+
+static gboolean __voicecall_snd_create_player(voicecall_snd_mgr_t *papp_snd, MMHandleType * pPlayer, voicecall_snd_play_type_t play_type)
+{
+       int ret_value = 0;
+       MMMessageCallback callback = NULL;
+       char *mmf_error = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Start..\n");
+
+       if (*pPlayer != VOICE_CALL_SND_INVALID_SND_HANDLE) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Player = %d \n", *pPlayer);
+               mm_player_destroy(*pPlayer);
+               *pPlayer = VOICE_CALL_SND_INVALID_SND_HANDLE;
+       }
+
+       ret_value = mm_player_create(pPlayer);
+       if (MM_ERROR_NONE != ret_value || *pPlayer == VOICE_CALL_SND_INVALID_SND_HANDLE) {
+               CALL_ENG_DEBUG(ENG_ERR, "mmplayer_create failed , Error:[0x%x]\n", ret_value);
+               return FALSE;
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "*pPlayer: %d\n", *pPlayer);
+
+       switch (play_type) {
+               /*Set the MM Player Attributes according to the Display Priority Type */
+       case VOICE_CALL_PLAY_TYPE_RINGTONE:
+               {
+                       mm_player_set_attribute(*pPlayer, &mmf_error,
+                                               "sound_volume_type", MM_SOUND_VOLUME_TYPE_RINGTONE,
+                                               "profile_uri", papp_snd->ring_tone, VOICE_CALL_SND_RINGTONE_PATH_LEN,
+                                               "profile_play_count", -1, "sound_route", MM_AUDIOROUTE_USE_EXTERNAL_SETTING, "sound_spk_out_only", TRUE, "sound_stop_when_unplugged", FALSE, NULL);
+                       callback = __voicecall_snd_mmplayer_cb;
+
+               }
+               break;
+       default:
+               break;
+       }
+
+       mm_player_set_message_callback(*pPlayer, callback, papp_snd);
+
+       ret_value = mm_player_realize(*pPlayer);
+       if (MM_ERROR_NONE != ret_value) {
+               CALL_ENG_DEBUG(ENG_ERR, "mmplayer_realize failed , Error:[0x%x]\n", ret_value);
+               return FALSE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Finish..\n");
+       return TRUE;
+}
+
+static gboolean __voicecall_snd_play_melody(voicecall_snd_mgr_t *papp_snd, gboolean bis_increasing)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       if (strlen(papp_snd->ring_tone) > 0) {
+               int mm_error = MM_ERROR_NONE;
+
+               mm_error = mm_player_start(papp_snd->pmm_player);
+               if (MM_ERROR_NONE != mm_error) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_player_start failed,Error: [0x%x]\n", mm_error);
+               } else {
+                       if (TRUE == bis_increasing) {
+                               papp_snd->bincreasingmelody = TRUE;
+                               g_timeout_add(VOICE_CALL_SND_INCREMENT_TIMER_INTERVAL, __voicecall_snd_increasing_melody_cb, (gpointer) papp_snd);
+                       } else {
+#ifdef VOICE_CALL_RINGTONE_ELEVATOR
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Starting Ringtone Elevator\n");
+                               /*Start only when the volume is not incremental volume */
+                               __voicecall_snd_start_ring_elevator(papp_snd);
+#endif
+                       }
+
+                       papp_snd->ringtone_sound_status = VOICE_CALL_SND_STATUS_PLAY;
+                       return TRUE;
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_ERR, "Ringtone is empty(Problem) \n");
+       }
+
+       return FALSE;
+}
+
+static int __voicecall_snd_mmplayer_cb(int message, void *data, void *user_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)user_data;
+       if (VOICE_CALL_SND_STATUS_PLAY != papp_snd->ringtone_sound_status) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sound Play stopped by application, callback not handled \n");
+               return FALSE;
+       }
+
+       switch (message) {
+       case MM_MESSAGE_END_OF_STREAM:
+               {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Ringtone loop count is supported by MMF , need not restart the ringtone \n");
+               }
+               break;
+       default:
+               return FALSE;
+               break;
+       }
+       return TRUE;
+}
+
+gboolean __voicecall_snd_mmplayer_signal_end_callback_idle_cb(gpointer pdata)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)pdata;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, " \n");
+
+       /*Callback needs to be called, only when the tone is played completely and it is ended
+          if the signal is explictly stopped, don't call the user callback */
+       if (papp_snd->psignal_play_end_cb != NULL) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Calling user callback \n");
+               papp_snd->psignal_play_end_cb(papp_snd->psignal_play_end_cb_data);
+               papp_snd->psignal_play_end_cb = NULL;
+               papp_snd->psignal_play_end_cb_data = NULL;
+       }
+
+       return FALSE;
+}
+
+static void __voicecall_snd_mmplayer_signal_cb(gpointer puser_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)puser_data;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Sound Play Over \n");
+
+       if (papp_snd->signal_sound_status != VOICE_CALL_SND_STATUS_PLAY) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sound Play already stopped by application \n");
+               return;
+       }
+
+       papp_snd->signal_sound_status = VOICE_CALL_SND_STATUS_STOPPED;
+
+       __voicecall_snd_mmplayer_signal_end_callback_idle_cb(papp_snd);
+}
+
+static gboolean __voicecall_snd_increasing_melody_cb(void *data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)data;
+       int ret_value = 0;
+       int set_volume_level = VOICE_CALL_VOL_LEVEL_1;
+
+       if (FALSE == papp_snd->bincreasingmelody) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Already Deactivated\n");
+               return FALSE;
+       }
+
+       if (FALSE == vconf_get_int(VCONFKEY_SETAPPL_PROFILE_CURRENT_CALL_VOLUME_INT, &set_volume_level)) {
+               CALL_ENG_DEBUG(ENG_ERR, "settings read failed Error: %d\n", ret_value);
+       }
+
+       if ((set_volume_level != 0) && (papp_snd->increment_melody_value <= set_volume_level)) {
+               int volume_val;
+
+               papp_snd->increment_melody_value++;
+
+               volume_val = papp_snd->increment_melody_value;
+               ret_value = mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, volume_val);
+
+               if (MM_ERROR_NONE != ret_value) {
+                       CALL_ENG_DEBUG(ENG_ERR, "Set Volume Error: [0x%x]\n", ret_value);
+               }
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Increasing Melody Continuing, Current Increased Melody : %d\n", papp_snd->increment_melody_value);
+               if (papp_snd->increment_melody_value >= set_volume_level) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "Increasing Melody Ended\n");
+                       return FALSE;
+               }
+
+               return TRUE;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "Increasing Melody Ended\n");
+       return FALSE;
+}
+
+static void __voicecall_snd_start_vibration(voicecall_snd_mgr_t *papp_snd)
+{
+       /*First Stop the previous Vibration and then start it again */
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+       int vib_type = -1;
+       int vib_level = -1;
+       int haptic_vib_type = -1;
+
+       papp_snd->bvibration = FALSE;
+
+       papp_snd->vibration_handle = device_haptic_open(DEV_IDX_0, 0);
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "srart vibration device_handle=%d \n", papp_snd->vibration_handle);
+
+       if (papp_snd->vibration_handle < 0) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "device_haptic_open error \n");
+               return;
+       }
+
+       if (vconf_get_int(VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT, &vib_type)) {
+               CALL_ENG_DEBUG(ENG_ERR, "VCONFKEY_SETAPPL_CALL_VIBRATION_PATTERN_INT vconf_get_bool failed.\n");
+       }
+       if (vconf_get_int(VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT, &vib_level)) {
+               CALL_ENG_DEBUG(ENG_ERR, "VCONFKEY_SETAPPL_NOTI_VIBRATION_LEVEL_INT vconf_get_bool failed.\n");
+       }
+
+       if (vib_level > 5)
+               vib_level = 5;
+
+       switch (vib_type) {
+       case SETTING_CALL_ALERT_VIB_TYPE1:
+               haptic_vib_type = EFFCTVIBE_INCOMING_CALL01;
+               break;
+       case SETTING_CALL_ALERT_VIB_TYPE2:
+               haptic_vib_type = EFFCTVIBE_INCOMING_CALL02;
+               break;
+       case SETTING_CALL_ALERT_VIB_TYPE3:
+               haptic_vib_type = EFFCTVIBE_INCOMING_CALL03;
+               break;
+       default:
+               haptic_vib_type = EFFCTVIBE_INCOMING_CALL01;
+               break;
+       }
+       if (device_haptic_play_pattern(papp_snd->vibration_handle, haptic_vib_type, 255, vib_level)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "device_haptic_play_pattern error \n");
+               return;
+       }
+       if (device_haptic_play_monotone(papp_snd->vibration_handle, 60000)) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "device_haptic_play_monotone error \n");
+               return;
+       }
+
+       papp_snd->bvibration = TRUE;
+
+}
+
+static gboolean __voicecall_snd_vib_then_melody_cb(void *data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)data;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       __voicecall_snd_stop_vibration(papp_snd);
+
+       if (FALSE == papp_snd->bvibration_then_melody) {
+               return FALSE;
+       }
+
+       if (FALSE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) {
+
+               int ret_value = -1;
+               int set_volume_level = 0;
+               int volume_val;
+
+               vconf_get_int(VCONFKEY_SETAPPL_PROFILE_CURRENT_CALL_VOLUME_INT, &set_volume_level);
+
+               volume_val = set_volume_level;
+
+               ret_value = mm_sound_volume_set_value(VOLUME_TYPE_RINGTONE, volume_val);
+
+               CALL_ENG_DEBUG(ENG_ERR, "__voicecall_snd_vib_then_melody_cb() : volume = %d\n", volume_val);
+
+               __voicecall_snd_play_melody(papp_snd, FALSE);
+       }
+
+       return FALSE;
+}
+
+static void __voicecall_snd_stop_vibration(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_DEBUG, "..\n");
+
+       if (TRUE == papp_snd->bvibration) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Stopping Vibration , handle=%d \n", papp_snd->vibration_handle);
+
+               if (device_haptic_stop_play(papp_snd->vibration_handle)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "device_haptic_play_stop error \n");
+                       return;
+               }
+
+               if (device_haptic_close(papp_snd->vibration_handle)) {
+                       CALL_ENG_DEBUG(ENG_DEBUG, "device_haptic_close error \n");
+                       return;
+               }
+
+               papp_snd->vibration_handle = -1;
+
+               papp_snd->bvibration = FALSE;
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "bvibration is not enabled.\n");
+       }
+
+}
+
+/*
+* This function is callback of mm_sound_route_add_callback
+* @return      void
+* @param[in]   data    call user data
+*               policy system audio route policy which has applied.
+*/
+void voicecall_snd_route_change_cb(void *data, system_audio_route_t policy)
+{
+       int error_code = 0;
+       CALL_ENG_DEBUG(ENG_ERR, "System audio route policy has changed");
+       if (policy != SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP) {
+               error_code = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP);
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_set_system_policy failed. error_code:[0x%x]\n", error_code);
+               }
+       }
+}
+
+/**
+* This function unregisters the application with the sound conflict manager
+*
+* @return                      void
+* @param[in]           papp_snd                Handle to Sound Manager
+*/
+void voicecall_snd_register_cm(voicecall_snd_mgr_t *papp_snd)
+{
+       int error_code = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "current bsound_cm_state:[%d]. \n", papp_snd->bsound_cm_state);
+
+       if (FALSE == papp_snd->bsound_cm_state) {
+               CALL_ENG_KPI("mm_session_init start");
+               error_code = mm_session_init(MM_SESSION_TYPE_CALL);
+               CALL_ENG_KPI("mm_session_init done");
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_session_init failed. error_code:[0x%x]\n", error_code);
+                       return;
+               }
+               error_code = mm_sound_route_get_system_policy(&papp_snd->backup_route_policy);
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_get_system_policy failed. error_code:[0x%x]\n", error_code);
+                       return;
+               }
+               error_code = mm_sound_route_set_system_policy(SYSTEM_AUDIO_ROUTE_POLICY_IGNORE_A2DP);
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_set_system_policy failed. error_code:[0x%x]\n", error_code);
+                       return;
+               }
+               error_code = mm_sound_route_add_change_callback(voicecall_snd_route_change_cb, NULL);
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_add_change_callback failed. error_code:[0x%x]\n", error_code);
+                       return;
+               }
+
+               papp_snd->bsound_cm_state = TRUE;
+       }
+       return;
+}
+
+/**
+* This function unregisters the application from the sound conflict manager
+*
+* @return                      void
+* @param[in]           papp_snd                Handle to Sound Manager
+*/
+void voicecall_snd_unregister_cm(voicecall_snd_mgr_t *papp_snd)
+{
+       int error_code = 0;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "current bsound_cm_state:[%d]. \n", papp_snd->bsound_cm_state);
+
+       if (TRUE == papp_snd->bsound_cm_state) {
+               /*Reset the Path when the app is closed - safety code */
+               voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_RESET);
+               CALL_ENG_DEBUG(ENG_DEBUG, "Sound Path reset to Default\n");
+
+               papp_snd->bsound_cm_state = FALSE;
+
+               CALL_ENG_DEBUG(ENG_DEBUG, "Unregistering Sound CM\n");
+               error_code = mm_session_finish();
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_session_finish failed. error_code:[0x%x]\n", error_code);
+               }
+               error_code = mm_sound_route_remove_change_callback();
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_remove_change_callback failed. error_code:[0x%x]\n", error_code);
+               }
+               error_code = mm_sound_route_set_system_policy(papp_snd->backup_route_policy);
+               if (error_code) {
+                       CALL_ENG_DEBUG(ENG_ERR, "mm_sound_route_set_system_policy failed. error_code:[0x%x]\n", error_code);
+               }
+       }
+       /*Set to Defaults */
+       voicecall_snd_set_to_defaults(papp_snd);
+       return;
+}
+
+gboolean __voicecall_snd_effect_idle_cb(gpointer puser_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)puser_data;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       papp_snd->effect_tone_status = VOICE_CALL_SND_STATUS_NONE;
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd->effect_tone_status = %d\n", papp_snd->effect_tone_status);
+
+       /*If connected call exists then change the audio path */
+       if ((TRUE == voicecall_core_is_connected_call_exist(pcall_core->pcall_engine)) || (TRUE == voicecall_core_is_outgoing_call_exists(pcall_core->pcall_engine))) {
+               CALL_ENG_DEBUG(ENG_DEBUG, "Connected call exists, changing path at the end of effect tone \n");
+
+               CALL_ENG_DEBUG(ENG_ERR, "papp_snd->signal_sound_status = %d \n", papp_snd->signal_sound_status);
+               /*Check the signal play status, if signal is being prepared / played, don't change the path */
+               if (VOICE_CALL_SND_STATUS_NONE == papp_snd->signal_sound_status) {
+                       voicecall_snd_change_path(papp_snd);
+               } else {
+                       CALL_ENG_DEBUG(ENG_ERR, "Signal is playing, skipping path change, it will be done at the end of signal \n");
+               }
+       } else {
+               CALL_ENG_DEBUG(ENG_DEBUG, "non connected call\n");
+       }
+       CALL_ENG_DEBUG(ENG_DEBUG, "Over\n");
+       return FALSE;
+}
+
+static void __voicecall_snd_effect_cb(gpointer puser_data)
+{
+       voicecall_snd_mgr_t *papp_snd = (voicecall_snd_mgr_t *)puser_data;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "effect_tone_status = %d, Calling Idle\n", papp_snd->effect_tone_status);
+       papp_snd->effect_tone_status = VOICE_CALL_SND_STATUS_STOPPED;
+
+       __voicecall_snd_effect_idle_cb(papp_snd);
+       CALL_ENG_DEBUG(ENG_DEBUG, "End : papp_snd->effect_tone_status = %d\n", papp_snd->effect_tone_status);
+}
+
+gboolean voicecall_snd_play_effect_tone(voicecall_snd_mgr_t *papp_snd, int effect_type)
+{
+       int error_code = -1;
+       gboolean bzuhause = FALSE;
+       gboolean bstatus = FALSE;
+       call_vc_core_state_t *pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "effect type:[%d] \n", effect_type);
+
+       switch (effect_type) {
+       case VOICE_CALL_SND_EFFECT_CALL_CONNECT:
+               {
+                       CALL_ENG_KPI("voicecall_core_get_zuhause start");
+                       voicecall_core_get_zuhause(pcall_core->pcall_engine, &bzuhause);
+                       CALL_ENG_KPI("voicecall_core_get_zuhause done");
+
+                       if (bzuhause == TRUE) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "It's zuhause area! don't play connect tone!\n");
+                               return FALSE;
+                       }
+
+                       CALL_ENG_KPI("get VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL start");
+                       if (vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &bstatus)) {
+                               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.\n");
+                       }
+                       CALL_ENG_KPI("get VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL done");
+
+                       if (!bstatus) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Connect Tone Settings not enabled \n");
+                               return FALSE;
+                       }
+
+                       /*First Reset the audio Path to PDA */
+                       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_ALERT_TONE);
+
+                       error_code = mm_sound_play_sound(VOICE_CALL_SND_CONNECT_SIGNAL_PATH, VOLUME_TYPE_CALL, __voicecall_snd_effect_cb, papp_snd, &papp_snd->mmfsoundplay_handle);
+               }
+               break;
+       case VOICE_CALL_SND_EFFECT_CALL_DISCONNECT:
+               {
+
+                       if (vconf_get_bool(VCONFKEY_CISSAPPL_CALL_END_TONE_BOOL, &bstatus)) {
+                               CALL_ENG_DEBUG(ENG_ERR, "vconf_get_bool failed.\n");
+                       }
+
+                       if (!bstatus) {
+                               CALL_ENG_DEBUG(ENG_DEBUG, "Disconnect Tone Settings not enabled \n");
+                               return FALSE;
+                       }
+
+                       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_ALERT_TONE);
+
+                       error_code = mm_sound_play_sound(VOICE_CALL_SND_DISCONNECT_SIGNAL_PATH, VOLUME_TYPE_CALL, __voicecall_snd_effect_cb, papp_snd, &papp_snd->mmfsoundplay_handle);
+
+               }
+               break;
+
+       case VOICE_CALL_SND_EFFECT_CALL_MINUTE_MINDER:
+               {
+                       voicecall_snd_change_mm_path(papp_snd, VOICE_CALL_MM_ALERT_TONE);
+                       error_code = mm_sound_play_sound(VOICE_CALL_SND_MINUTE_MINDER_SIGNAL_PATH, VOLUME_TYPE_CALL, __voicecall_snd_effect_cb, papp_snd, &papp_snd->mmfsoundplay_handle);
+               }
+               break;
+
+       default:
+               CALL_ENG_DEBUG(ENG_DEBUG, "Invalid Effect Type: %d \n", effect_type);
+
+       }
+
+       if (MM_ERROR_NONE == error_code) {
+               papp_snd->effect_tone_status = VOICE_CALL_SND_STATUS_PLAY;
+       }
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "error code = [0x%x] \n", error_code);
+       return (MM_ERROR_NONE == error_code) ? TRUE : FALSE;
+}
+
+gboolean voicecall_snd_is_effect_playing(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_ERR, "Effect tone status: %d\n", papp_snd->effect_tone_status);
+       if (VOICE_CALL_SND_STATUS_PLAY == papp_snd->effect_tone_status) {
+               return TRUE;
+       }
+
+       return FALSE;
+}
+
+void voicecall_snd_stop_effect_tone(voicecall_snd_mgr_t *papp_snd)
+{
+       CALL_ENG_DEBUG(ENG_ERR, "Effect tone status: %d\n", papp_snd->effect_tone_status);
+
+       if (VOICE_CALL_SND_STATUS_PLAY == papp_snd->effect_tone_status) {
+               if (MM_ERROR_NONE != mm_sound_stop_sound(papp_snd->mmfsoundplay_handle)) {
+                       CALL_ENG_DEBUG(ENG_ERR, "MM Stop Sound Failed \n");
+               }
+
+               papp_snd->effect_tone_status = VOICE_CALL_SND_STATUS_NONE;
+               papp_snd->mmfsoundplay_handle = VOICE_CALL_SND_INVALID_SND_HANDLE;
+       }
+       CALL_ENG_DEBUG(ENG_ERR, "Effect tone status: %d\n", papp_snd->effect_tone_status);
+}
+
+void voicecall_snd_set_to_defaults(voicecall_snd_mgr_t *papp_snd)
+{
+       call_vc_core_state_t *pcall_core = NULL;
+
+       CALL_ENG_DEBUG(ENG_DEBUG, "papp_snd = %p \n", papp_snd);
+
+       /*Backup core handle */
+       pcall_core = (call_vc_core_state_t *)papp_snd->pcall_core;
+
+       /*Reset Sound Magr Data */
+       memset(papp_snd, 0, sizeof(voicecall_snd_mgr_t));
+
+       /*Re Assign core handle */
+       papp_snd->pcall_core = pcall_core;
+
+       /*Set to Defaults */
+       papp_snd->pmm_player = VOICE_CALL_SND_INVALID_PLAYER_HANDLE;
+       papp_snd->pmm_signal_player = VOICE_CALL_SND_INVALID_SND_HANDLE;
+
+       papp_snd->mmfsoundplay_handle = VOICE_CALL_SND_INVALID_SND_HANDLE;
+       papp_snd->mmfalternateplay_handle = VOICE_CALL_SND_INVALID_SND_HANDLE;
+
+}
diff --git a/debian/README b/debian/README
new file mode 100755 (executable)
index 0000000..1aea91c
--- /dev/null
@@ -0,0 +1,6 @@
+The Debian Package call
+----------------------------
+
+Comments regarding the Package
+
+ -- unknown <wonguk.jeong@samsung.com>  Tue, 17 Nov 2009 09:51:48 +0900
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..423071f
--- /dev/null
@@ -0,0 +1,9 @@
+call (0.2.333) unstable; urgency=low
+
+  * 1. Apply EFL migration change
+    2. Update bilerplate
+    3. Support appsvc mo call
+  * Git: pkgs/c/call
+  * Tag: call_0.2.333
+
+ -- Jungmin Kim <jm15.kim@samsung.com>  Fri, 17 Feb 2012 21:14:16 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100755 (executable)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100755 (executable)
index 0000000..229a680
--- /dev/null
@@ -0,0 +1,42 @@
+Source: call
+Section: comm
+Priority: extra
+Maintainer: Sung Joon Won <sungjoon.won@samsung.com>, SHUAIB SHUKUR <shuaib.s@samsung.com>, Goo Lee <goo81.lee@samsung.com>
+Uploaders: Sung Joon Won <sungjoon.won@samsung.com>, SHUAIB SHUKUR <shuaib.s@samsung.com>, JongSeok Lee <js49.lee@samsung.com>, Yountaek Oh <ohyt@samsung.com>, Goo Lee <goo81.lee@samsung.com>
+Build-Depends: debhelper (>= 5),
+               autotools-dev,
+               libappcore-efl-dev,
+               libelm-dev, 
+               libslp-tapi-dev,
+               libslp-setting-dev,
+               libcontacts-service-dev,
+               libui-gadget-dev,
+               libslp-utilx-dev,
+               libmm-sound-dev,
+               libmm-player-dev,
+               libslp-pm-dev,
+               libaul-1-dev,
+               libdevman-haptic-dev,
+               libmm-camcorder-dev,
+               libmm-session-dev,
+               dlog-dev,
+               libslp-sensor-0,
+               libslp-sysman,
+               libslp-msg-service-dev,
+               libicu-dev,
+               libappsvc-dev,
+               libnotification-dev,
+               libug-contacts-dev (>= 0.1.0-31),
+Standards-Version: 3.7.2
+
+Package: org.tizen.call
+Section: comm
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: call application
+
+Package: org.tizen.call-dbg
+Section: comm
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: call application (unstripped)
diff --git a/debian/copyright b/debian/copyright
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/debian/dirs b/debian/dirs
new file mode 100755 (executable)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100755 (executable)
index 0000000..7a77580
--- /dev/null
@@ -0,0 +1,2 @@
+CMakeCache.txt
+CMakeLists.txt
diff --git a/debian/org.tizen.call.install.in b/debian/org.tizen.call.install.in
new file mode 100755 (executable)
index 0000000..d693a62
--- /dev/null
@@ -0,0 +1,4 @@
+@PREFIX@/bin/*
+@PREFIX@/res/*
+@PREFIX@/data
+/opt/share/applications/*
diff --git a/debian/org.tizen.call.postinst b/debian/org.tizen.call.postinst
new file mode 100755 (executable)
index 0000000..8c2fa75
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+if [ ${USER} == "root" ]
+then
+       # 5000 is inhouse user id
+       # do not use relative path
+       chown -R 5000:5000 /opt/apps/org.tizen.call/data
+       /usr/bin/vconftool set -t int "memory/call/state" "0" -g 6521 -i
+       /usr/bin/vconftool set -t int "db/call/vol_level" "4" -g 6521
+else
+       /usr/bin/vconftool set -t int "memory/call/state" "0" -i
+fi
+
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..2de8e30
--- /dev/null
@@ -0,0 +1,154 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall -g
+CXXFLAGS ?=  -Wall -g
+LDFLAGS ?= 
+PREFIX ?= /opt/apps/org.tizen.call
+RESDIR ?= ${PREFIX}/res
+DATADIR ?= ${PREFIX}/data
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+CFLAGS += -fPIC
+CXXFLAGS += -fPIC
+
+LDFLAGS += -Wl,--rpath=$(/PREFIX)/lib -Wl,--hash-style=both -Wl,--as-needed
+
+CMAKE_TMP_DIR = $(CURDIR)/cmake_tmp
+
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       mkdir -p $(CMAKE_TMP_DIR);
+       cd $(CMAKE_TMP_DIR); CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX)
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       cd $(CMAKE_TMP_DIR) && $(MAKE)
+       #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(RESDIR)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       -cd $(CMAKE_TMP_DIR) && $(MAKE) clean
+       rm -rf $(CMAKE_TMP_DIR)
+
+       rm -rf CMakeCache.txt
+       rm -rf CMakeFiles
+       rm -rf cmake_install.cmake
+       rm -rf Makefile
+       rm -rf install_manifest.txt
+       
+       rm -rf daemon/CMakeFiles
+       rm -rf daemon/cmake_install.cmake
+       rm -rf daemon/Makefile
+       rm -rf daemon/install_manifest.txt
+
+       rm -rf ui/CMakeFiles
+       rm -rf ui/cmake_install.cmake
+       rm -rf ui/Makefile
+       rm -rf ui/install_manifest.txt
+
+       rm -rf ui/*.edj
+       rm -rf ui/themes/*.edj
+
+       rm -rf ui/po/CMakeFiles
+       rm -rf ui/po/cmake_install.cmake
+       rm -rf ui/po/Makefile
+
+       rm -rf ui/org.tizen.call.desktop
+       
+       rm -rf cmake_tmp
+       
+       
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/wavplayer.
+       cd $(CMAKE_TMP_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+#      dh_installchangelogs 
+#      dh_installdocs
+#      dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+#      dh_strip
+       dh_strip --dbg-package=org.tizen.call-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/packaging/org.tizen.call.spec b/packaging/org.tizen.call.spec
new file mode 100644 (file)
index 0000000..030f352
--- /dev/null
@@ -0,0 +1,66 @@
+Name:       org.tizen.call
+Summary:    call application
+Version:    0.2.333
+Release:    1
+Group:      Applications
+License:    Flora Software License 
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  pkgconfig(appcore-efl)
+BuildRequires:  pkgconfig(elementary)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(utilX)
+BuildRequires:  pkgconfig(alsa)
+BuildRequires:  pkgconfig(pmapi)
+BuildRequires:  pkgconfig(sensor)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(aul)
+BuildRequires:  pkgconfig(contacts-service)
+BuildRequires:  pkgconfig(ui-gadget)
+BuildRequires:  pkgconfig(tapi)
+BuildRequires:  pkgconfig(mm-sound)
+BuildRequires:  pkgconfig(mm-camcorder)
+BuildRequires:  pkgconfig(mm-session)
+BuildRequires:  pkgconfig(mm-player)
+BuildRequires:  pkgconfig(devman_haptic)
+BuildRequires:  pkgconfig(msg-service)
+BuildRequires:  pkgconfig(ecore-x)
+BuildRequires:  pkgconfig(ecore-input)
+BuildRequires:  pkgconfig(icu-i18n)
+BuildRequires:  pkgconfig(appsvc)
+BuildRequires:  pkgconfig(notification)
+BuildRequires:  libug-contacts-devel
+BuildRequires:  cmake
+BuildRequires:  gettext-tools
+BuildRequires:  edje-tools
+Requires(post): /usr/bin/vconftool
+
+
+%description
+call application.
+
+%prep
+%setup -q
+
+%build
+
+%define PREFIX    "/opt/apps/org.tizen.call"
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX}
+
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post
+/usr/bin/vconftool set -t int "memory/call/state" "0" -g 6521 -i
+/usr/bin/vconftool set -t int "db/call/vol_level" "4" -g 6521
+chown -R 5000:5000 /opt/apps/org.tizen.call/data
+
+%files
+/opt/apps/org.tizen.call/bin/*
+/opt/apps/org.tizen.call/res/*
+/opt/share/applications/org.tizen.call.desktop
+%dir /opt/apps/org.tizen.call/data
+
diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..9c7d4bc
--- /dev/null
@@ -0,0 +1,167 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(UI_SRCS 
+       ../call-engine/core/vc-core-engine.c
+       ../call-engine/core/vc-core-callmanager.c
+       ../call-engine/core/vc-core-engine-status.c 
+       ../call-engine/core/vc-core-tapi-evnt.c
+       ../call-engine/core/vc-core-util.c
+       ../call-engine/core/vc-core-callagent.c
+       ../call-engine/core/vc-core-ccbs.c
+       ../call-engine/core/vc-core-engine-group.c 
+       ../call-engine/core/vc-core-svcall.c
+       ../call-engine/core/vc-core-tapi-rqst.c
+       ../call-engine/voice-call-core.c
+       ../call-engine/voice-call-sound.c
+       ../call-engine/voice-call-service.c
+       ../call-engine/voice-call-device.c
+       ../call-engine/voice-call-bt.c
+       ../call-engine/voice-call-engine.c
+       ../call-engine/voice-call-dbus.c        
+       vcui-application.c
+       vcui-app-window.c
+       vcui-view-choice.c
+       vcui-engine-interface.c
+       vcui-document.c 
+       vcui-view-dialing.c 
+       vcui-view-incoming.c 
+       vcui-view-incoming-lock.c
+       vcui-view-keypad.c
+       vcui-view-elements.c
+       vcui-view-common.c 
+       vcui-view-single-call.c
+       vcui-view-multi-call-split.c
+       vcui-view-multi-call-conf.c
+       vcui-view-multi-call-list.c
+       vcui-view-popup.c
+       vcui-doc-launch.c
+       vcui-view-callend.c
+ )
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ../call-engine/include ../call-engine/core/include)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(EDJDIR "${RESDIR}/edje")
+SET(IMGDIR "${RESDIR}/images")
+SET(MEDIADIR "${RESDIR}/media")
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+
+# for LOG
+ADD_DEFINITIONS("-DCALL_DEBUG_ON_DLOG")
+
+# for Engine
+ADD_DEFINITIONS("-DSWAP_SUPPORT")
+ADD_DEFINITIONS("-DCALL_VC_SEND_SAT_RESPONSE_ORIG")
+ADD_DEFINITIONS("-DRELEASE_ALL_AND_ACCEPT_SUPPORT")
+ADD_DEFINITIONS("-DVC_ENG_FDN_SUPPORT")
+
+# for debuging                 
+#ADD_DEFINITIONS("-DTIMER_ENABLED")
+#ADD_DEFINITIONS("-DVOICECALL_KPI")
+#ADD_DEFINITIONS("-DCALLDETAILS_DUMP")
+
+#for UI
+ADD_DEFINITIONS("-DEND_KEY_PROCESSING")
+ADD_DEFINITIONS("-DPDIAL_SEND_DTMF")
+#ADD_DEFINITIONS("-DBG")
+ADD_DEFINITIONS("-D_NEW_SND_")
+ADD_DEFINITIONS("-DSIGNAL_HANDLER")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(ui_pkgs REQUIRED
+       appcore-efl
+       vconf
+       utilX
+       alsa
+       pmapi   
+       sensor
+       dlog
+       aul
+       contacts-service
+       ui-gadget
+       tapi 
+       contacts-service 
+       mm-sound
+       mm-camcorder
+       mm-player
+       mm-session 
+       pmapi 
+       devman_haptic 
+       msg-service 
+       ecore
+       ecore-x
+       ecore-input
+       edje
+       eina
+       evas
+       elementary
+       icu-i18n
+       appsvc
+       notification
+)
+
+
+SET(EXTRA_CFLAGS "")
+FOREACH(flag ${ui_pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${COMMON_C_FLAGS} -fpie ${EXTRA_CFLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+ADD_DEFINITIONS("-DIMGDIR=\"${IMGDIR}\"")
+ADD_DEFINITIONS("-DMEDIADIR=\"${MEDIADIR}\"")
+
+ADD_EXECUTABLE(voice-call-ui ${UI_SRCS})
+TARGET_LINK_LIBRARIES(voice-call-ui "-pie" ${ui_pkgs_LDFLAGS})
+message(${ui_pkgs_LDFLAGS})
+
+ADD_CUSTOM_TARGET(voice-call-ui.edj
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images ${SHARED_FLAGS}
+               ${CMAKE_CURRENT_SOURCE_DIR}/call_edc/voice-call-ui.edc ${CMAKE_CURRENT_SOURCE_DIR}/voice-call-ui.edj
+               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/call_edc/voice-call-ui.edc
+)
+ADD_DEPENDENCIES(voice-call-ui voice-call-ui.edj)
+
+ADD_CUSTOM_TARGET(call_theme.edj
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/themes
+               ${CMAKE_CURRENT_SOURCE_DIR}/themes/call_theme.edc ${CMAKE_CURRENT_SOURCE_DIR}/themes/call_theme.edj
+               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/themes/call_theme.edc
+)
+ADD_DEPENDENCIES(voice-call-ui voice-call-ui.edj call_theme.edj)
+
+#install binary & edj files
+INSTALL(TARGETS voice-call-ui DESTINATION ${BINDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/voice-call-ui.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/themes/call_theme.edj DESTINATION ${EDJDIR})
+
+# install ini file ( not used)
+#INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/voice-call-ui.ini DESTINATION share/process-info)
+
+# install desktop file & icon
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.call.desktop.in ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.call.desktop)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.call.desktop DESTINATION /opt/share/applications)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/hd/icon/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(DIRECTORY ../call-engine/sounds/ DESTINATION ${MEDIADIR} FILES_MATCHING PATTERN "*.wav")
+
+# install application HOME directory
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+
+# i18n
+ADD_SUBDIRECTORY(po)
diff --git a/ui/call_edc/vcui-view-dialing.edc b/ui/call_edc/vcui-view-dialing.edc
new file mode 100755 (executable)
index 0000000..ff23891
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group{
+       name: "mo-view";
+       parts{
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: DIALLING_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+                          
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_CID_L DIALLING_CID_T; }
+                               rel2 { relative: DIALLING_CID_R DIALLING_CID_B; }
+                       }
+               }
+
+               part { name: "txt_mo_status"; // dialling or connecting text
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_STATUS_L DIALLING_STATUS_T;to: "background";}
+                               rel2 { relative: DIALLING_STATUS_R DIALLING_STATUS_B;to: "background";  }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+  
+            
+               part { name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NAME_L DIALLING_NAME_T;to: "background";}
+                               rel2 { relative: DIALLING_NAME_R DIALLING_NAME_B;to: "background";  }                           
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; // contact phone type -> call number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NUMBER_L DIALLING_NUMBER_T; to: "background"; }
+                               rel2 { relative: DIALLING_NUMBER_R DIALLING_NUMBER_B;to: "background";  }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+       }
+
+    programs{
+               program { name: "init";
+                       signal: "INIT";
+                       source: "PROG";
+                       action: STATE_SET "default" 0.0;
+                       target: "background";
+                       target: "swl_cid";
+                       target: "swl_cid_background";
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-end-conf-call.edc b/ui/call_edc/vcui-view-end-conf-call.edc
new file mode 100755 (executable)
index 0000000..f6a1c7a
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "end-confcall";
+       parts {
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_BACKGROUND_CID_L INCALL_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: INCALL_BACKGROUND_CID_R INCALL_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+       part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_CID_L INCALL_CID_T; }
+                               rel2 { relative: INCALL_CID_R INCALL_CID_B; }
+                       }
+               }
+
+               part { name: "swl_cid_dim"; /*for held call dim*/
+                       type: RECT;
+                       scale: 1;               
+                       mouse_events: 1;
+                       repeat_events: 1;                       
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;                             
+                               color: COLOR_BG_FOR_HELD_CALL_DIM;
+                       }
+                       description {
+                               state: "wvga" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; offset: 6 0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; offset: -6 0; to: "swl_cid";}
+                       }
+                       description {
+                               state: "hd" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; to: "swl_cid";}
+                       }
+               }
+
+               part { name: "txt_call_name"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NAME_L INCALL_NAME_T; }
+                               rel2 { relative: INCALL_NAME_R INCALL_NAME_B;  }                                
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; /*in case of multicallconf, it is num of people*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NUMBER_L INCALL_NUMBER_T; }
+                               rel2 { relative: INCALL_NUMBER_R INCALL_NUMBER_B;  }                            
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_TIMER_L INCALL_TIMER_T; }
+                               rel2 { relative: INCALL_TIMER_R INCALL_TIMER_B; }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 1.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+       }
+                       
+       programs {
+               program { name: "hide_dim_cid";
+                       signal: "HIDE_DIM";
+                       source: "CID";
+                       action: STATE_SET "default" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_wvga";
+                       signal: "SHOW_DIM_WVGA";
+                       source: "CID_WVGA";
+                       action: STATE_SET "wvga" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_hd";
+                       signal: "SHOW_DIM_HD";
+                       source: "CID_HD";
+                       action: STATE_SET "hd" 0.0;
+                       target: "swl_cid_dim";
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-end-single-call.edc b/ui/call_edc/vcui-view-end-single-call.edc
new file mode 100755 (executable)
index 0000000..e3475ed
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+group {
+    name: "end-singlecall";
+
+    parts {
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: ENDSINGLECALL_BACKGROUND_CID_L ENDSINGLECALL_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: ENDSINGLECALL_BACKGROUND_CID_R ENDSINGLECALL_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+                          
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: ENDSINGLECALL_CID_L ENDSINGLECALL_CID_T; }
+                               rel2 { relative: ENDSINGLECALL_CID_R ENDSINGLECALL_CID_B; }
+                       }
+               }
+               
+               part { name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: ENDSINGLECALL_NAME_L ENDSINGLECALL_NAME_T; }
+                               rel2 { relative: ENDSINGLECALL_NAME_R ENDSINGLECALL_NAME_B;  }                          
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; // contact phone type -> call number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: ENDSINGLECALL_NUMBER_L ENDSINGLECALL_NUMBER_T; }
+                               rel2 { relative: ENDSINGLECALL_NUMBER_R ENDSINGLECALL_NUMBER_B;  }                              
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: ENDSINGLECALL_TIMER_L ENDSINGLECALL_TIMER_T; }
+                               rel2 { relative: ENDSINGLECALL_TIMER_R ENDSINGLECALL_TIMER_B; }                         
+                               text { font, FONT_SLP_Roman; size, 44; align, 1.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+       }
+ }
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-incoming-lock.edc b/ui/call_edc/vcui-view-incoming-lock.edc
new file mode 100755 (executable)
index 0000000..2911a01
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "lock_accept";
+
+       parts {
+               part { 
+                       name: "accept_bg"; 
+                       type: IMAGE; 
+                       mouse_events:1; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_ACCEPT_BG_L INCOMING_LOCK_ACCEPT_BG_T; } 
+                               rel2 { relative: INCOMING_LOCK_ACCEPT_BG_R INCOMING_LOCK_ACCEPT_BG_B; } 
+                               image {
+                                       normal: IMG_SRC_DIR/"vc_lock_left_bg.png";
+                               }
+                               align: 0.0 0.5;
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                               
+               }
+               
+               part { 
+                       name: "accept_icon"; 
+                       type: IMAGE; 
+                       mouse_events:1; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_ACCEPT_ICON_L INCOMING_LOCK_ACCEPT_ICON_T; to: "accept_bg"; } 
+                               rel2 { relative: INCOMING_LOCK_ACCEPT_ICON_R INCOMING_LOCK_ACCEPT_ICON_B; to: "accept_bg"; } 
+                               image {
+                                       normal: IMG_SRC_DIR/"vc_lock_accept_icon.png";
+                               }
+                               align: 0.5 0.5;
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                                       
+               }
+
+               part {
+                       name: "accept_text";
+                       type: TEXT;
+                       mouse_events:0; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_ACCEPT_TEXT_L INCOMING_LOCK_ACCEPT_TEXT_T; to: "accept_bg"; } 
+                               rel2 { relative: INCOMING_LOCK_ACCEPT_TEXT_R INCOMING_LOCK_ACCEPT_TEXT_B; to: "accept_bg"; }  
+                               text { font, FONT_SLP_Roman; size, 58; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                                       
+               }
+       }
+
+       programs {
+               program {
+                       name: "lock_accept,default";
+                       signal: "lock_accept,default";
+                       source: "prog";
+                       action: STATE_SET "default" 0.0;
+                       target: "accept_bg";
+                       target: "accept_icon";
+                       target: "accept_text";
+                       transition: LINEAR 0.3;
+               }                       
+               program {
+                       name: "lock_accept,alpha";
+                       signal: "lock_accept,alpha";
+                       source: "prog";
+                       action: STATE_SET "alpha" 0.0;
+                       target: "accept_bg";
+                       target: "accept_icon";
+                       target: "accept_text";
+                       transition: LINEAR 0.3;
+               }
+       }
+}
+
+group {
+       name: "lock_reject";
+
+       parts {
+               part { 
+                       name: "reject_bg"; 
+                       type: IMAGE; 
+                       mouse_events:1; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_REJECT_BG_L INCOMING_LOCK_REJECT_BG_T; } 
+                               rel2 { relative: INCOMING_LOCK_REJECT_BG_R INCOMING_LOCK_REJECT_BG_B; } 
+                               image {
+                                       normal: IMG_SRC_DIR/"vc_lock_right_bg.png";
+                               }
+                               align: 0.0 0.5;
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                                       
+               }
+               
+               part { 
+                       name: "reject_icon"; 
+                       type: IMAGE; 
+                       mouse_events:1; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_REJECT_ICON_L INCOMING_LOCK_REJECT_ICON_T; to: "reject_bg"; } 
+                               rel2 { relative: INCOMING_LOCK_REJECT_ICON_R INCOMING_LOCK_REJECT_ICON_B; to: "reject_bg"; } 
+                               image {
+                                       normal: IMG_SRC_DIR/"vc_lock_reject_icon.png";
+                               }
+                               align: 0.5 0.5;
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                                       
+               }
+
+               part {
+                       name: "reject_text";
+                       type: TEXT;
+                       mouse_events:0; 
+                       scale: 1;
+                       description { 
+                               state: "default" 0.0; 
+                               rel1 { relative: INCOMING_LOCK_REJECT_TEXT_L INCOMING_LOCK_REJECT_TEXT_T; to: "reject_bg"; } 
+                               rel2 { relative: INCOMING_LOCK_REJECT_TEXT_R INCOMING_LOCK_REJECT_TEXT_B; to: "reject_bg"; }  
+                               text { font, FONT_SLP_Roman; size, 58; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               visible: 1;
+                       } 
+                       description { 
+                               state: "alpha" 0.0; 
+                               inherit: "default" 0.0;
+                               color: 255 255 255 76; // 30%
+                               visible: 1;
+                       }                                       
+               }
+       }
+
+       programs {
+               program {
+                       name: "lock_reject,default";
+                       signal: "lock_reject,default";
+                       source: "prog";
+                       action: STATE_SET "default" 0.0;
+                       target: "reject_bg";
+                       target: "reject_icon";
+                       target: "reject_text";
+                       transition: LINEAR 0.3;
+               }                       
+               program {
+                       name: "lock_reject,alpha";
+                       signal: "lock_reject,alpha";
+                       source: "prog";
+                       action: STATE_SET "alpha" 0.0;
+                       target: "reject_bg";
+                       target: "reject_icon";
+                       target: "reject_text";
+                       transition: LINEAR 0.3;
+               }
+       }
+}
+
+group {
+       name: "mtlock";
+    parts {
+            part { name: "background";
+                        type: RECT;
+                        description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+                        
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: DIALLING_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+
+               part { name: "swl_calling_name_bg";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: MT_CALLING_BG_L MT_CALLING_BG_T; to: "background";}
+                               rel2 { relative: MT_CALLING_BG_R MT_CALLING_BG_B; to: "background";}
+                       }
+               }
+
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_CID_L DIALLING_CID_T; }
+                               rel2 { relative: DIALLING_CID_R DIALLING_CID_B; }
+                       }
+               }
+               
+               part { name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NAME_L DIALLING_NAME_T;to: "background";}
+                               rel2 { relative: DIALLING_NAME_R DIALLING_NAME_B;to: "background";  }                           
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; // contact phone type -> call number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NUMBER_L DIALLING_NUMBER_T; to: "background"; }
+                               rel2 { relative: DIALLING_NUMBER_R DIALLING_NUMBER_B;to: "background";  }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }          
+
+               /*
+           part { name: "txt_mt_status"; // Voice call
+                               type: TEXT;
+                               effect: SHADOW;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 { relative: DIALLING_MT_STATUS_L DIALLING_MT_STATUS_T;to: "background";}
+                                       rel2 { relative: DIALLING_MT_STATUS_R DIALLING_MT_STATUS_B;to: "background";  }                         
+                                       text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 255;
+                               }
+                       }
+               */ 
+       }//parts
+
+       programs {
+               program { 
+                       name: "init";
+                       signal: "INIT";
+                       source: "PROG";
+                       action: STATE_SET "default" 0.0;
+                       target: "background";
+                       target: "swl_cid";
+                       target: "swl_cid_background";
+               }       
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-incoming.edc b/ui/call_edc/vcui-view-incoming.edc
new file mode 100755 (executable)
index 0000000..4a7aaf5
--- /dev/null
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group{
+       name: "mt-view";
+       parts {
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: DIALLING_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+
+               part { name: "swl_calling_name_bg";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: MT_CALLING_BG_L MT_CALLING_BG_T; to: "background";}
+                               rel2 { relative: MT_CALLING_BG_R MT_CALLING_BG_B; to: "background";}
+                       }
+               }
+                          
+               part { name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NAME_L DIALLING_NAME_T;to: "background";}
+                               rel2 { relative: DIALLING_NAME_R DIALLING_NAME_B;to: "background";  }                           
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; // contact phone type -> call number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_NUMBER_L DIALLING_NUMBER_T; to: "background"; }
+                               rel2 { relative: DIALLING_NUMBER_R DIALLING_NUMBER_B;to: "background";  }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_CID_L DIALLING_CID_T; }
+                               rel2 { relative: DIALLING_CID_R DIALLING_CID_B; }
+                       }
+               }
+               
+               /*
+               part { name: "txt_mt_status"; // Voice call
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_MT_STATUS_L DIALLING_MT_STATUS_T;to: "background";}
+                               rel2 { relative: DIALLING_MT_STATUS_R DIALLING_MT_STATUS_B;to: "background";  }                         
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+               */
+               
+               part { name: "btn_accept";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_MT_BTN1_L DIALLING_MT_BTN1_T; to: "background";}
+                               rel2 { relative: DIALLING_MT_BTN1_R DIALLING_MT_BTN1_B; to: "background";}
+                       }
+               }               
+               part { name: "btn_reject";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_MT_BTN2_L DIALLING_MT_BTN2_T; to: "background";}
+                               rel2 { relative: DIALLING_MT_BTN2_R DIALLING_MT_BTN2_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_incoming1";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_INCOMING_1_L SIX_BTN_INCOMING_1_T; to: "background";}
+                               rel2 { relative: SIX_BTN_INCOMING_1_R SIX_BTN_INCOMING_1_B; to: "background";}
+                       }
+               }                       
+               part { name: "btn_incoming2";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_INCOMING_2_L SIX_BTN_INCOMING_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_INCOMING_2_R SIX_BTN_INCOMING_2_B; to: "background";}
+                       }
+               }                       
+               part { name: "btn_incoming3";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_INCOMING_3_L SIX_BTN_INCOMING_3_T; to: "background";}
+                               rel2 { relative: SIX_BTN_INCOMING_3_R SIX_BTN_INCOMING_3_B; to: "background";}
+                       }
+               }                       
+               part { name: "btn_incoming4";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }                   
+            }//parts
+
+            programs{
+
+              program { name: "init";
+                       signal: "INIT";
+                       source: "PROG";
+                       action: STATE_SET "default" 0.0;
+                       target: "background";
+                       target: "swl_cid";
+                       target: "swl_cid_background";
+               }
+          }
+
+    }
diff --git a/ui/call_edc/vcui-view-keypad.edc b/ui/call_edc/vcui-view-keypad.edc
new file mode 100755 (executable)
index 0000000..4d293ad
--- /dev/null
@@ -0,0 +1,482 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#define        KEYPAD_EACH_BTN_WIDTH 200
+#define        KEYPAD_COL1_BTN_L_PAD 40
+#define        KEYPAD_COL2_BTN_L_PAD 260
+#define        KEYPAD_COL3_BTN_L_PAD 480
+
+#define        KEYPAD_EACH_BTN_HEIGHT 138
+#define        KEYPAD_BTN_TXT_REGION_HEIGHT 112
+#define        KEYPAD_ROW1_BTN_T_PAD 0
+#define        KEYPAD_ROW2_BTN_T_PAD 158
+#define        KEYPAD_ROW3_BTN_T_PAD 316
+#define        KEYPAD_ROW4_BTN_T_PAD 474
+
+#define RIGHT_ICON_L_PAD 28
+#define RIGHT_ICON_WIDTH 70
+#define RIGHT_ICON_HEIGHT 36
+
+#define LEFT_TXT_L_PAD 24
+#define LEFT_TXT_WIDTH 64
+#define RIGHT_TXT_TYPE1_L_PAD 28
+#define RIGHT_TXT_TYPE2_L_PAD 10
+
+#define        REL_KEYPAD_BTN_W(x) ((x)/KEYPAD_EACH_BTN_WIDTH)
+
+#define        KEYPAD_BTN_LEFT_TXT_L REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD)
+#define        KEYPAD_BTN_LEFT_TXT_R REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD+LEFT_TXT_WIDTH)
+#define        KEYPAD_BTN_RIGHT_TXT_TYPE1_L REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD+LEFT_TXT_WIDTH+RIGHT_TXT_TYPE1_L_PAD)
+#define        KEYPAD_BTN_RIGHT_TXT_TYPE2_L REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD+LEFT_TXT_WIDTH+RIGHT_TXT_TYPE2_L_PAD)
+#define KEYPAD_BTN_RIGHT_ICON_L REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD+LEFT_TXT_WIDTH+RIGHT_ICON_L_PAD)
+#define KEYPAD_BTN_RIGHT_ICON_R REL_KEYPAD_BTN_W(LEFT_TXT_L_PAD+LEFT_TXT_WIDTH+RIGHT_ICON_L_PAD+RIGHT_ICON_WIDTH)
+
+#define PART_KEYPAD_CUSTOM_TWO_LABLE(txt, offx, offy, file, file_press,label_left_text,label_left_font,label_left_size,label_right_text,label_right_font,label_right_size, right_txt_lpad) \
+                       part { \
+                               name: txt; \
+                               type: IMAGE; \
+                               scale: 1; \
+                               mouse_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       rel1 { relative: REL_KEYPAD_W(offx) REL_KEYPAD_H(offy); to:"keypad/bg";} \
+                                       rel2 { relative: REL_KEYPAD_W(offx+KEYPAD_EACH_BTN_WIDTH) REL_KEYPAD_H(offy+KEYPAD_EACH_BTN_HEIGHT); to:"keypad/bg"; } \
+                                       color: 255 255 255 179; \
+                                       image { \
+                                               normal: file; \
+                                               border: 7 7 7 7; \
+                                               border_scale: 1; \
+                                       } \
+                               } \
+                               description { \
+                                       state: "pressed" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       image.normal: file_press; \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } \
+                       part { \
+                               name: txt"_left"; \
+                               type: TEXT; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               repeat_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       rel1 { relative: KEYPAD_BTN_LEFT_TXT_L 0.0; to: txt;} \
+                                       rel2 { relative: KEYPAD_BTN_LEFT_TXT_R 1.0; to: txt;} \
+                                       fixed: 1 1; \
+                                       align: 0.5 0.5; \
+                                       color: 221 210 202 255; \
+                                       text { \
+                                               font: label_left_font; \
+                                               text: label_left_text; \
+                                               size: label_left_size; \
+                                               min:  1 1; \
+                                               align: 0.5 0.5; \
+                                       } \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } \
+                       part { \
+                               name: txt"_right"; \
+                               type: TEXT; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               repeat_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       rel1 { relative: right_txt_lpad 0.0; to: txt;} \
+                                       rel2 { relative: 1.0 1.0; to: txt;} \
+                                       fixed: 1 1; \
+                                       align: 0.5 0.5; \
+                                       color: 221 210 202 255; \
+                                       text { \
+                                               font: label_right_font; \
+                                               text: label_right_text; \
+                                               size: label_right_size; \
+                                               min:  1 1; \
+                                               align: 0.0 0.5; \
+                                       } \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } 
+
+
+#define PART_KEYPAD_CUSTOM_ONELABEL_ONEICON(txt, offx, offy, file, file_press,icon_right,icon_right_sizex,icon_right_sizey,label_left_text,label_left_font,label_left_size) \
+                       part { \
+                               name: txt; \
+                               type: IMAGE; \
+                               scale: 1; \
+                               mouse_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       rel1 { relative: REL_KEYPAD_W(offx) REL_KEYPAD_H(offy); to:"keypad/bg";} \
+                                       rel2 { relative: REL_KEYPAD_W(offx+KEYPAD_EACH_BTN_WIDTH) REL_KEYPAD_H(offy+KEYPAD_EACH_BTN_HEIGHT); to:"keypad/bg"; } \
+                                       color: 255 255 255 179; \
+                                       image { \
+                                               normal: file; \
+                                               border: 7 7 7 7; \
+                                               border_scale: 1; \
+                                       } \
+                               } \
+                               description { \
+                                       state: "pressed" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       image.normal: file_press; \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } \
+                       part { \
+                               name: txt"_left"; \
+                               type: TEXT; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               repeat_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       rel1 { relative: KEYPAD_BTN_LEFT_TXT_L 0.0; to: txt;} \
+                                       rel2 { relative: KEYPAD_BTN_LEFT_TXT_R 1.0; to: txt;} \
+                                       fixed: 1 1; \
+                                       align: 0.5 0.5; \
+                                       color: 221 210 202 255; \
+                                       text { \
+                                               font: label_left_font; \
+                                               text: label_left_text; \
+                                               size: label_left_size; \
+                                               min:  1 1; \
+                                               align: 0.5 0.5; \
+                                       } \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } \
+                       part { \
+                               name: txt"_right"; \
+                               type: IMAGE; \
+                               scale: 1; \
+                               mouse_events: 0; \
+                               repeat_events: 1; \
+                               description { \
+                                       state: "default" 0.0; \
+                                       min: icon_right_sizex icon_right_sizey; \
+                                       fixed: 1 1; \
+                                       rel1 { relative: KEYPAD_BTN_RIGHT_ICON_L 0.5; to: txt;} \
+                                       rel2 { relative: KEYPAD_BTN_RIGHT_ICON_R 0.5; to: txt;} \
+                                       align: 0.5 0.5; \
+                                       image.normal: icon_right; \
+                               } \
+                               description { \
+                                       state: "hide" 0.0; \
+                                       inherit: "default" 0.0; \
+                                       visible: 0; \
+                               } \
+                       } 
+       
+
+
+#define PROG_KEYPAD(txt) \
+       program { \
+               name: "down_"txt; \
+               signal: "mouse,down,*"; \
+               source: txt; \
+               script { \
+                       set_state(PART:txt, "pressed", 0.0); \
+                       emit("pad_down", txt); \
+               } \
+       } \
+       program { \
+               name: "ani_"txt; \
+               signal: "ani"; \
+               source: txt; \
+               action: STATE_SET "default" 0.0; \
+               transition: SINUSOIDAL 0.1; \
+               target: txt; \
+       } \
+       program { \
+               name: "up_"txt; \
+               signal: "mouse,up,1"; \
+               source: txt; \
+               script { \
+                       emit("pad_up", txt); \
+                       emit("ani", txt); \
+               } \
+       } \
+       program { \
+               name: "clicked_"txt; \
+               signal: "mouse,clicked,1"; \
+               source: txt; \
+               script { \
+                       emit("pad_clicked", txt); \
+               } \
+       }
+
+#define TARGET_KEYPAD(txt) \
+       target: txt;    \
+       target: txt"_left";     \
+       target: txt"_right";    
+
+group{
+       name: "keypad";
+               parts {
+                    part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALLING_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: DIALLING_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+                          
+
+               part { name: "keypad/bg";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               rel1 { relative: DIALLING_KEYPAD_L DIALLING_KEYPAD_B; to: "background";}
+                               rel2 { relative: DIALLING_KEYPAD_R DIALLING_KEYPAD_B; to: "background";}
+                       }
+                       description {
+                               state: "show" 0.0;
+                               visible: 1;
+                               rel1 { relative: DIALLING_KEYPAD_L DIALLING_KEYPAD_T; to: "background";}
+                               rel2 { relative: DIALLING_KEYPAD_R DIALLING_KEYPAD_B; to: "background";}
+                       }
+                       description { 
+                               state: "hide" 0.0; 
+                               inherit: "default" 0.0;
+                               visible: 0; 
+                       } 
+               }
+                
+               part {
+                       name: "textblock/bg";
+                       type: SWALLOW;
+                       mouse_events: 0;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative:DIALLING_ENTRY_TEXT_L DIALLING_ENTRY_TEXT_T  ; to: "background";}
+                               rel2 { relative: DIALLING_ENTRY_TEXT_R DIALLING_ENTRY_TEXT_B ; to: "background";}
+                               //rel2 { relative: 1.0 0.0; to: "button/bg";}
+                               //      color: 246 245 237 255; 
+                       }
+               }
+
+               part {
+                       name: "textblock/textarea";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               fixed: 1 1;
+                               align: 0.5 0.5;
+                               rel1 { relative: 0.0 0.0; to: "textblock/bg"; }
+                               rel2 { relative: 1.0 1.0; to: "textblock/bg"; }
+                       }
+                       description { 
+                               state: "hide" 0.0; 
+                               inherit: "default" 0.0;
+                               visible: 0; 
+                       }                               
+               }
+
+               part { 
+                       name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;                             
+                               rel1 { relative: INCALL_DIALER_TIMER_L INCALL_DIALER_TIMER_T; to:"background";}
+                               rel2 { relative: INCALL_DIALER_TIMER_R INCALL_DIALER_TIMER_B; to:"background";}                         
+                               text { font, FONT_SLP_Roman; size, 48; align, 1.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }       
+                       description { 
+                               state: "hide" 0.0; 
+                               inherit: "default" 0.0;
+                               visible: 0; 
+                       }                       
+               }
+
+
+               part { 
+                       name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               rel1 { relative: INCALL_DIALER_NAME_L INCALL_DIALER_NAME_T;to: "background";}
+                               rel2 { relative: INCALL_DIALER_NAME_R INCALL_DIALER_NAME_B;to: "background";  }                         
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }               
+                       description { 
+                               state: "hide" 0.0; 
+                               inherit: "default" 0.0;
+                               visible: 0; 
+                       }                       
+               }
+
+               PART_KEYPAD_CUSTOM_ONELABEL_ONEICON("1", KEYPAD_COL1_BTN_L_PAD, KEYPAD_ROW1_BTN_T_PAD,  IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_icon.png", RIGHT_ICON_WIDTH, RIGHT_ICON_HEIGHT, "1", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("2", KEYPAD_COL2_BTN_L_PAD, KEYPAD_ROW1_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "2", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "ABC", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("3", KEYPAD_COL3_BTN_L_PAD, KEYPAD_ROW1_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "3", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "DEF", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("4", KEYPAD_COL1_BTN_L_PAD, KEYPAD_ROW2_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "4", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "GHI", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("5", KEYPAD_COL2_BTN_L_PAD, KEYPAD_ROW2_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "5", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "JKL", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("6", KEYPAD_COL3_BTN_L_PAD, KEYPAD_ROW2_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "6", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "MNO", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("7", KEYPAD_COL1_BTN_L_PAD, KEYPAD_ROW3_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "7", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "PQRS", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE2_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("8", KEYPAD_COL2_BTN_L_PAD, KEYPAD_ROW3_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "8", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "TUV", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("9", KEYPAD_COL3_BTN_L_PAD, KEYPAD_ROW3_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "9", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "WXYZ", FONT_SLP_Roman, 32, KEYPAD_BTN_RIGHT_TXT_TYPE2_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("star", KEYPAD_COL1_BTN_L_PAD, KEYPAD_ROW4_BTN_T_PAD,      IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "*", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "P", FONT_SLP_Roman, 64, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("0", KEYPAD_COL2_BTN_L_PAD, KEYPAD_ROW4_BTN_T_PAD, IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "0", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "+", FONT_SLP_Roman, 64, KEYPAD_BTN_RIGHT_TXT_TYPE1_L)
+               PART_KEYPAD_CUSTOM_TWO_LABLE("sharp", KEYPAD_COL3_BTN_L_PAD, KEYPAD_ROW4_BTN_T_PAD,     IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png", IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png", "#", FONT_SLP_Roman, KEYPAD_BTN_TXT_REGION_HEIGHT, "", FONT_SLP_Roman, 64, KEYPAD_BTN_RIGHT_TXT_TYPE2_L)
+
+
+               part { 
+                       name: "btn_hide";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALER_BTN1_L DIALER_BTN1_T; to: "background";}
+                               rel2 { relative: DIALER_BTN1_R DIALER_BTN1_B; to: "background";}
+                       }
+               }        
+
+               part { 
+                       name: "btn_end";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: DIALER_BTN2_L DIALER_BTN2_T; to: "background";}
+                               rel2 { relative: DIALER_BTN2_R DIALER_BTN2_B; to: "background";}
+                       }
+               }
+       }
+
+       programs{
+               program { name: "show_keypadbtn";
+                       signal: "SHOW";
+                       source: "KEYPADBTN";
+                       action: STATE_SET "show" 0.0;
+                       transition: LINEAR 0.5;
+                       target: "keypad/bg";
+                       after: "show_keypadbtn_next";
+               }
+               program { name: "show_keypadbtn_next";
+                       action: STATE_SET "show" 0.0;
+                       target: "txt_call_name";
+                       target: "txt_timer";                    
+               }               
+               program { name: "hide_keypadbtn";
+                       signal: "HIDE";
+                       source: "KEYPADBTN";
+                       action: STATE_SET "hide" 0.0;
+                       target: "textblock/textarea";
+                       target: "txt_call_name";
+                       target: "txt_timer";                                            
+                       after: "hide_keypadbtn_next";
+               }                               
+               program { name: "hide_keypadbtn_next";
+                       action: STATE_SET "hide" 0.0;
+                       transition: ACCELERATE 0.5;
+                       target: "keypad/bg";    
+                       TARGET_KEYPAD("1")
+                       TARGET_KEYPAD("2")
+                       TARGET_KEYPAD("3")
+                       TARGET_KEYPAD("4")
+                       TARGET_KEYPAD("5")
+                       TARGET_KEYPAD("6")
+                       TARGET_KEYPAD("7")
+                       TARGET_KEYPAD("8")
+                       TARGET_KEYPAD("9")
+                       TARGET_KEYPAD("star")
+                       TARGET_KEYPAD("0")
+                       TARGET_KEYPAD("sharp")
+                       after: "hide_keypadbtn_done";
+               }               
+               program { name: "hide_keypadbtn_done";
+                       action: SIGNAL_EMIT "DONE" "HIDEKEYPAD";
+               }                       
+               PROG_KEYPAD("1")
+               PROG_KEYPAD("2")
+               PROG_KEYPAD("3")
+               PROG_KEYPAD("4")
+               PROG_KEYPAD("5")
+               PROG_KEYPAD("6")
+               PROG_KEYPAD("7")
+               PROG_KEYPAD("8")
+               PROG_KEYPAD("9")
+               PROG_KEYPAD("star")
+               PROG_KEYPAD("0")
+               PROG_KEYPAD("sharp")
+       }        
+}
diff --git a/ui/call_edc/vcui-view-multi-call-conf.edc b/ui/call_edc/vcui-view-multi-call-conf.edc
new file mode 100755 (executable)
index 0000000..7937bc1
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+    name: "multicall-conf";
+    parts {
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_BACKGROUND_CID_L INCALL_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: INCALL_BACKGROUND_CID_R INCALL_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+               
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_CID_L INCALL_CID_T; }
+                               rel2 { relative: INCALL_CID_R INCALL_CID_B; }
+                       }
+               }
+
+               part { name: "swl_cid_dim"; /*for held call dim*/
+                       type: RECT;
+                       scale: 1;               
+                       mouse_events: 1;
+                       repeat_events: 1;                       
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;                             
+                               color: COLOR_BG_FOR_HELD_CALL_DIM;
+                       }
+                       description {
+                               state: "wvga" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; offset: 6 0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; offset: -6 0; to: "swl_cid";}
+                       }
+                       description {
+                               state: "hd" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; to: "swl_cid";}
+                       }
+               }
+
+               part { name: "txt_call_name"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NAME_L INCALL_NAME_T; }
+                               rel2 { relative: INCALL_NAME_R INCALL_NAME_B;  }                                
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; /*in case of multicallconf, it is num of people*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NUMBER_L INCALL_NUMBER_T; }
+                               rel2 { relative: INCALL_NUMBER_R INCALL_NUMBER_B;  }                            
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_TIMER_L INCALL_TIMER_T; }
+                               rel2 { relative: INCALL_TIMER_R INCALL_TIMER_B; }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 1.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "end" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+     }//parts
+                       
+       programs {
+               program { name: "hide_dim_cid";
+                       signal: "HIDE_DIM";
+                       source: "CID";
+                       action: STATE_SET "default" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_wvga";
+                       signal: "SHOW_DIM_WVGA";
+                       source: "CID_WVGA";
+                       action: STATE_SET "wvga" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_hd";
+                       signal: "SHOW_DIM_HD";
+                       source: "CID_HD";
+                       action: STATE_SET "hd" 0.0;
+                       target: "swl_cid_dim";
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-multi-call-list.edc b/ui/call_edc/vcui-view-multi-call-list.edc
new file mode 100755 (executable)
index 0000000..5028996
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "multicall-list";
+       parts {
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: MULTICALL_SPLIT_BACKGROUND_CID_L MULTICALL_SPLIT_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: MULTICALL_SPLIT_BACKGROUND_CID_R MULTICALL_SPLIT_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+               
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+                               
+               part { name: "navigation_bar";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               fixed: 1 1;
+                               min: 0 50;
+                               state: "default" 0.0;
+                               rel1 { relative: CALL_NAVIGATION_BAR_L CALL_NAVIGATION_BAR_T; to: "background";}
+                               rel2 { relative: CALL_NAVIGATION_BAR_R CALL_NAVIGATION_BAR_B; to: "background";}                        
+                       }
+               }
+
+               part { name: "swl_calllist";
+                       type: SWALLOW;
+                       description {
+                               state: "show" 0.0;
+                               rel1 { relative: MULTICALL_LIST_L MULTICALL_LIST_T; to: "background"; }
+                               rel2 { relative: MULTICALL_LIST_R MULTICALL_LIST_B; to: "background"; }
+                       }
+                       description {
+                               state: "hide" 0.0;
+                               visible: 0;
+                       }
+               }
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: MULTICALL_LIST_TIMER_L MULTICALL_LIST_TIMER_T; to: "background"; }
+                               rel2 { relative: MULTICALL_LIST_TIMER_R MULTICALL_LIST_TIMER_B; to: "background"; }                             
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "end" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+               }       
+               
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: MULTICALL_LIST_BIG_END_L MULTICALL_LIST_BIG_END_T; to: "background"; }
+                               rel2 { relative: MULTICALL_LIST_BIG_END_R MULTICALL_LIST_BIG_END_B; to: "background"; }
+                       }
+               }
+       }//parts
+
+       programs {
+
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-multi-call-split.edc b/ui/call_edc/vcui-view-multi-call-split.edc
new file mode 100755 (executable)
index 0000000..5579bf1
--- /dev/null
@@ -0,0 +1,728 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "multicall-split";
+       parts {
+
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_BACKGROUND_CID_L MULTICALL_SPLIT_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: MULTICALL_SPLIT_BACKGROUND_CID_R MULTICALL_SPLIT_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+               
+               part { name: "swl_cid_1";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_CID_1_L MULTICALL_SPLIT_CID_1_T; }
+                               rel2 { relative: MULTICALL_SPLIT_CID_1_R MULTICALL_SPLIT_CID_1_B; }
+                       }
+               }
+               
+               part { name: "swl_pause";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_PAUSE_L MULTICALL_SPLIT_PAUSE_T; }
+                               rel2 { relative: MULTICALL_SPLIT_PAUSE_R MULTICALL_SPLIT_PAUSE_B; }
+                       }
+               }
+
+               part { name: "swl_cid_2";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_CID_2_L MULTICALL_SPLIT_CID_2_T; }
+                               rel2 { relative: MULTICALL_SPLIT_CID_2_R MULTICALL_SPLIT_CID_2_B; }
+                       }
+               }
+
+               part { name: "swl_cid_2_dim";   /*dim icon for held call*/
+                       type: RECT;
+                       scale: 1;               
+                       mouse_events: 1;
+                       repeat_events: 1;                       
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               color: COLOR_BG_FOR_HELD_CALL_DIM;
+                       }
+                       description {
+                               state: "portrait_wvga" 0.0;
+                               inherit: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; offset: 4 0; to: "swl_cid_2"; }
+                               rel2 { relative: 1.0 1.0; offset: -5 0; to: "swl_cid_2"; }
+                               visible: 1;
+                       }
+                       description {
+                               state: "portrait_hd" 0.0;
+                               inherit: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid_2"; }
+                               rel2 { relative: 1.0 1.0; to: "swl_cid_2"; }
+                               visible: 1;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                       }
+               }
+
+               part { name: "swl_play";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_PLAY_L MULTICALL_SPLIT_PLAY_T; }
+                               rel2 { relative: MULTICALL_SPLIT_PLAY_R MULTICALL_SPLIT_PLAY_B; }
+                       }
+               }
+               
+               part { name: "txt_call_name_1"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 58; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_NAME_1_L MULTICALL_SPLIT_NAME_1_T; }
+                               rel2 { relative: MULTICALL_SPLIT_NAME_1_R MULTICALL_SPLIT_NAME_1_B;  }                          
+                       }
+               }
+
+               part { name: "txt_call_name_2"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 36; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_NAME_2_L MULTICALL_SPLIT_NAME_2_T; }
+                               rel2 { relative: MULTICALL_SPLIT_NAME_2_R MULTICALL_SPLIT_NAME_2_B;  }                          
+                       }
+               }
+
+       /*              part { name: "txt_active";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 28; align, 0.0 0.5; }
+                               color: 139 246 50 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_ACTIVE_TXT_L MULTICALL_SPLIT_ACTIVE_TXT_T; }
+                               rel2 { relative: MULTICALL_SPLIT_ACTIVE_TXT_R MULTICALL_SPLIT_ACTIVE_TXT_B; }
+                       }
+               }
+       */
+
+               part { name: "swl_more";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_MORE_ICON_L MULTICALL_SPLIT_MORE_ICON_T; to: "background";}
+                               rel2 { relative: MULTICALL_SPLIT_MORE_ICON_R MULTICALL_SPLIT_MORE_ICON_B; to: "background";}
+                       }
+               }
+
+               part { name: "txt_onhold";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 36; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_ON_HOLD_TXT_L MULTICALL_SPLIT_ON_HOLD_TXT_T; }
+                               rel2 { relative: MULTICALL_SPLIT_ON_HOLD_TXT_R MULTICALL_SPLIT_ON_HOLD_TXT_B; }
+                       }
+                       description {
+                               state: "portrait_icon" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_L MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_T; }
+                               rel2 { relative: MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_R MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_B; }
+                       }
+               }
+               
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 44; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "end" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_TIMER_L MULTICALL_SPLIT_TIMER_T; }
+                               rel2 { relative: MULTICALL_SPLIT_TIMER_R MULTICALL_SPLIT_TIMER_B; }                             
+                       }
+               }       
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+       }//parts
+                       
+       programs {
+               program { name: "show_portrait_mode";
+                       signal: "set-portrait";
+                       source: "incall-split1-view";
+                       action: STATE_SET "portrait" 0.0;
+                       target: "swl_cid_background";
+                       target: "swl_cid_1";
+                       target: "swl_cid_2";
+                       target: "swl_pause";
+                       target: "swl_play";
+                       target: "txt_call_name_1";
+                       target: "txt_call_name_2";
+                       target: "txt_onhold";
+                       target: "txt_timer";
+                       target: "btn_bigend";
+                       target: "btn_speaker";
+               }
+               program { name: "show_portrait_swl_dim_wvga";
+                       signal: "show-swl-dim-wvga";
+                       source: "cid-wvga";
+                       action: STATE_SET "portrait_wvga" 0.0;
+                       target: "swl_cid_2_dim";
+               }
+               program { name: "show_portrait_swl_dim_hd";
+                       signal: "show-swl-dim-hd";
+                       source: "cid-hd";
+                       action: STATE_SET "portrait_hd" 0.0;
+                       target: "swl_cid_2_dim";
+               }
+               program { name: "show_conf_list_portrait";
+                       signal: "show-more-portrait";
+                       source: "incall-split1-conf-call";
+                       action: STATE_SET "portrait" 0.0;
+                       target: "swl_more";
+               }
+               program { name: "show_conf_list_portrait_onhold";
+                       signal: "show-more-portrait";
+                       source: "incall-split1-conf-call";
+                       action: STATE_SET "portrait_icon" 0.0;
+                       target: "txt_onhold";
+               }
+       }
+}
+
+group {
+
+       name: "multicall-split2";
+       parts {
+
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_BACKGROUND_CID_L MULTICALL_SPLIT_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: MULTICALL_SPLIT_BACKGROUND_CID_R MULTICALL_SPLIT_BACKGROUND_CID_B; to: "background";}
+                       }
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+               
+               part { name: "swl_cid_1";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_CID_2_L MULTICALL_SPLIT_SWAP_CID_2_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_CID_2_R MULTICALL_SPLIT_SWAP_CID_2_B; }
+                       }
+               }
+               
+               part { name: "swl_pause";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_PAUSE_L MULTICALL_SPLIT_SWAP_PAUSE_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_PAUSE_R MULTICALL_SPLIT_SWAP_PAUSE_B; }
+                       }
+               }
+
+               part { name: "swl_cid_2";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_CID_1_L MULTICALL_SPLIT_SWAP_CID_1_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_CID_1_R MULTICALL_SPLIT_SWAP_CID_1_B; }
+                       }
+               }
+
+               part { name: "swl_cid_2_dim"; /*for held call dim*/
+                       type: RECT;
+                       scale: 1;               
+                       mouse_events: 1;
+                       repeat_events: 1;                       
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid_2"; }
+                               rel2 { relative: 1.0 1.0; to: "swl_cid_2"; }                            
+                               color: COLOR_BG_FOR_HELD_CALL_DIM;
+                       }
+                       description {
+                               state: "portrait_wvga" 0.0;
+                               inherit: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; offset: 4 0; to: "swl_cid_2"; }
+                               rel2 { relative: 1.0 1.0; offset: -5 0; to: "swl_cid_2"; }
+                               visible: 1;
+                       }
+                       description {
+                               state: "portrait_hd" 0.0;
+                               inherit: "default" 0.0;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid_2"; }
+                               rel2 { relative: 1.0 1.0; to: "swl_cid_2"; }
+                               visible: 1;
+                       }
+               }
+
+               part { name: "swl_play";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_PLAY_L MULTICALL_SPLIT_SWAP_PLAY_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_PLAY_R MULTICALL_SPLIT_SWAP_PLAY_B; }
+                       }
+               }
+               
+               part { name: "txt_call_name_1"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 58; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_NAME_2_L MULTICALL_SPLIT_SWAP_NAME_2_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_NAME_2_R MULTICALL_SPLIT_SWAP_NAME_2_B;  }                                
+                       }
+               }
+
+               part { name: "txt_call_name_2"; /*call name or number*/
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 36; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_NAME_1_L MULTICALL_SPLIT_SWAP_NAME_1_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_NAME_1_R MULTICALL_SPLIT_SWAP_NAME_1_B;  }                                
+                       }
+               }
+
+               part { name: "swl_more";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_MORE_ICON_L MULTICALL_SPLIT_SWAP_MORE_ICON_T; to: "background";}
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_MORE_ICON_R MULTICALL_SPLIT_SWAP_MORE_ICON_B; to: "background";}
+                       }
+               }
+
+               part { name: "txt_onhold";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 36; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_L MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_R MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_B; }
+                       }
+               }
+
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               text { font, FONT_SLP_Roman; size, 44; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "end" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_TIMER_L MULTICALL_SPLIT_SWAP_TIMER_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_TIMER_R MULTICALL_SPLIT_SWAP_TIMER_B; }                           
+                       }
+                       description {
+                               state: "portrait_icon" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_L MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_T; }
+                               rel2 { relative: MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_R MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_B; }                               
+                       }
+               }       
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_keypad";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_1_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_1_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_addcall";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_2_L SIX_BTN_1_T; to: "background";}
+                               rel2 { relative: SIX_BTN_2_R SIX_BTN_1_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_join";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_3_L SIX_BTN_1_T; to: "background";}
+                               rel2 { relative: SIX_BTN_3_R SIX_BTN_1_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_mute";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_2_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_2_R SIX_BTN_2_B; to: "background";}                            
+                       }
+               }
+
+               part { name: "btn_contacts";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                       }
+                       description {
+                               state: "portrait" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_3_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_3_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+       }//parts
+                       
+       programs {
+               program { name: "show_portrait_mode";
+                       signal: "set-portrait";
+                       source: "incall-split2-view";
+                       action: STATE_SET "portrait" 0.0;
+                       target: "swl_cid_background";
+                       target: "swl_cid_1";
+                       target: "swl_cid_2";
+                       target: "swl_pause";
+                       target: "swl_play";
+                       target: "txt_call_name_1";
+                       target: "txt_call_name_2";
+                       target: "txt_onhold";
+                       target: "txt_timer";
+                       target: "btn_bigend";
+                       target: "btn_keypad";
+                       target: "btn_contacts";
+                       target: "btn_join";
+                       target: "btn_speaker";
+                       target: "btn_mute";
+                       target: "btn_addcall";
+               }
+               program { name: "show_portrait_swl_dim_wvga";
+                       signal: "show-swl-dim-wvga";
+                       source: "cid-wvga";
+                       action: STATE_SET "portrait_wvga" 0.0;
+                       target: "swl_cid_2_dim";
+               }
+               program { name: "show_portrait_swl_dim_hd";
+                       signal: "show-swl-dim-hd";
+                       source: "cid-hd";
+                       action: STATE_SET "portrait_hd" 0.0;
+                       target: "swl_cid_2_dim";
+               }
+               program { name: "show_conf_list_portrait";
+                       signal: "show-more-portrait";
+                       source: "incall-split2-conf-call";
+                       action: STATE_SET "portrait" 0.0;
+                       target: "swl_more";
+               }
+               program { name: "show_conf_list_portrait_onhold";
+                       signal: "show-more-portrait";
+                       source: "incall-split2-conf-call";
+                       action: STATE_SET "portrait_icon" 0.0;
+                       target: "txt_timer";
+               }
+               program { name: "hide_conf_list";
+                       signal: "hide-more";
+                       source: "incall-split-view";
+                       action: STATE_SET "default" 0.0;
+                       target: "swl_more";
+               }
+       }
+}
diff --git a/ui/call_edc/vcui-view-naviframe.edc b/ui/call_edc/vcui-view-naviframe.edc
new file mode 100755 (executable)
index 0000000..64eaf3c
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "navigation_view";
+       parts {
+               part {
+                       name: "base";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: 0 0 0 0;
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-single-call.edc b/ui/call_edc/vcui-view-single-call.edc
new file mode 100755 (executable)
index 0000000..a7daf0d
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+    name: "incall";
+    parts {
+
+               part { name: "background";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_DEFAULT;
+                       }
+               }
+
+               part { name: "swl_cid_background";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               visible: 1; 
+                               rel1 { relative: INCALL_BACKGROUND_CID_L INCALL_BACKGROUND_CID_T; to: "background";}
+                               rel2 { relative: INCALL_BACKGROUND_CID_R INCALL_BACKGROUND_CID_B; to: "background";}
+                       }
+                       description { 
+                               state: "hide" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       } 
+               }
+
+               part { name: "bg_alpha";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               color: COLOR_BG_ALPHA;
+                       }
+               }
+                          
+               part { name: "swl_cid";
+                       type: SWALLOW;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_CID_L INCALL_CID_T; }
+                               rel2 { relative: INCALL_CID_R INCALL_CID_B; }
+                       }
+               }
+
+               part { name: "swl_cid_dim"; // for held call dim
+                       type: RECT;
+                       scale: 1;                       
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               color: COLOR_BG_FOR_HELD_CALL_DIM;
+                       }
+                       description {
+                               state: "wvga" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; offset: 6 0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; offset: -6 0; to: "swl_cid";}
+                       }
+                       description {
+                               state: "hd" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: 0.0 0.0; to: "swl_cid";}
+                               rel2 { relative: 1.0 1.0; to: "swl_cid";}
+                       }
+               }
+               
+               part { name: "txt_call_name"; // call name or number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NAME_L INCALL_NAME_T; }
+                               rel2 { relative: INCALL_NAME_R INCALL_NAME_B;  }                                
+                               text { font, FONT_SLP_Roman; size, 76; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_contact_phone_type"; // contact phone type -> call number
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_NUMBER_L INCALL_NUMBER_T; }
+                               rel2 { relative: INCALL_NUMBER_R INCALL_NUMBER_B;  }                            
+                               text { font, FONT_SLP_Roman; size, 48; align, 0.5 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+               }
+
+               part { name: "txt_timer";
+                       type: TEXT;
+                       effect: SHADOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: INCALL_TIMER_L INCALL_TIMER_T; }
+                               rel2 { relative: INCALL_TIMER_R INCALL_TIMER_B; }                               
+                               text { font, FONT_SLP_Roman; size, 48; align, 1.0 0.5; }
+                               color: 255 255 255 255;
+                               color2: 0 0 0 255;
+                       }
+                       description {
+                               state: "end" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+
+               part { name: "btn_bigend";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               fixed: 1 1;
+                               rel1 { relative: SIX_BTN_BIG_END_L 1.0; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R 1.0; to: "background";}
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_BIG_END_L SIX_BTN_BIG_END_T; to: "background";}
+                               rel2 { relative: SIX_BTN_BIG_END_R SIX_BTN_BIG_END_B; to: "background";}
+                       }
+               }
+
+               part { name: "btn_speaker";
+                       type: SWALLOW;
+                       scale: 1;
+                       description {
+                               state: "default" 0.0;
+                               visible: 0;
+                               fixed: 1 1;
+                               rel1 { relative: SIX_BTN_1_L 1.0; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R 1.0; to: "background";}
+                       }                       
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               rel1 { relative: SIX_BTN_1_L SIX_BTN_2_T; to: "background";}
+                               rel2 { relative: SIX_BTN_1_R SIX_BTN_2_B; to: "background";}
+                       }
+               }
+     }//parts
+                       
+       programs {
+               program { name: "show_effect_allbtn";
+                       signal: "SHOW_EFFECT";
+                       source: "ALLBTN";
+                       action: STATE_SET "show" 0.0;
+                       transition: DECELERATE 0.5; //LINEAR 1.0;
+                       target: "btn_bigend";
+                       target: "btn_speaker";
+               }
+
+               program { name: "show_no_effect_allbtn";
+                       signal: "SHOW_NO_EFFECT";
+                       source: "ALLBTN";
+                       action: STATE_SET "show" 0.0;
+                       target: "btn_bigend";
+                       target: "btn_speaker";
+               }               
+               
+               program { name: "hide_dim_cid";
+                       signal: "HIDE_DIM";
+                       source: "CID";
+                       action: STATE_SET "default" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_wvga";
+                       signal: "SHOW_DIM_WVGA";
+                       source: "CID_WVGA";
+                       action: STATE_SET "wvga" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_dim_cid_hd";
+                       signal: "SHOW_DIM_HD";
+                       source: "CID_HD";
+                       action: STATE_SET "hd" 0.0;
+                       target: "swl_cid_dim";
+               }
+               program { name: "show_cid_bg";
+                       signal: "SHOW_CID_BG";
+                       source: "CID_BG";
+                       action: STATE_SET "default" 0.0;
+                       target: "swl_cid_background";
+               }
+               program { name: "hide_cid_bg";
+                       signal: "HIDE_CID_BG";
+                       source: "CID_BG";
+                       action: STATE_SET "hide" 0.0;
+                       target: "swl_cid_background";
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-ug-effect.edc b/ui/call_edc/vcui-view-ug-effect.edc
new file mode 100755 (executable)
index 0000000..80320af
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "ug_effect";
+       parts {
+               part {
+                       name: "clip";
+                       type: RECT;
+                       description {
+                               state: "default" 0.0;
+                               rel1 { relative: 1 0; }
+                               rel2 { relative: 2 1; }
+                               color: 255 255 255 0;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               rel1 { relative: 0 0; }
+                               rel2 { relative: 1 1; }
+                               color: 255 255 255 255;
+                       }
+               }
+               part {
+                       name: "elm.swallow.content";
+                       type: SWALLOW;
+                       clip_to: "clip";
+                       description {
+                               rel1.to: "clip";
+                               rel2.to: "clip";
+                       }
+               }
+               part {
+                       name: "event_blocker";
+                       description {
+                               state: "default" 0.0;
+                               visible: 1;
+                       }
+                       description {
+                               state: "show" 0.0;
+                               inherit: "default" 0.0;
+                       }
+                       description {
+                               state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 0;
+                       }
+               }
+       }
+       programs {
+               program {
+                       name: "show";
+                       signal: "elm,state,show";
+                       action: STATE_SET "show" 0.0;
+                       target: "clip";
+                       target: "event_blocker";
+                       transition: "DECELERATE" 0.5;
+                       after: "show_end";
+               }       
+               program {
+                       name: "hide";
+                       signal: "elm,state,hide";
+                       action: STATE_SET "default" 0.0;
+                       target: "clip";
+                       target: "event_blocker";
+                       transition: "DECELERATE" 0.5;
+                       after: "hide_end";
+               }
+               program {
+                       name: "disable_blocker";
+                       action: STATE_SET "disabled" 0.0;
+                       target: "event_blocker";
+               }
+               program {
+                       name: "show_end";
+                       action: SIGNAL_EMIT "elm,action,show,finished" "";
+                       after: "disable_blocker";
+               }
+               program {
+                       name: "hide_end";
+                       action: SIGNAL_EMIT "elm,action,hide,finished" "";
+                       after: "disable_blocker"; 
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/vcui-view-volume-popup.edc b/ui/call_edc/vcui-view-volume-popup.edc
new file mode 100755 (executable)
index 0000000..312fea9
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+group {
+       name: "volume";
+       parts {
+               part {
+                       name: "base";
+                       type: RECT;
+                       description {
+                       state: "default" 0.0;
+                       color: 0 0 0 0;
+                       }
+               }
+
+               part {
+                       name: "body_bg";
+                       type: RECT;
+                       scale: 1;
+                       mouse_events: 0;
+                       description {
+                               state: "default" 0.0;
+                               min: 624 126;
+                               max: 624 126;
+                               rel1 { relative: 0.0 0.0; to: "base"; }
+                               rel2 { relative: 1.0 1.0; to: "base"; }
+                               color: 0 0 0 0;
+                       }
+               }
+
+               part {
+                       name: "volume_icon";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               min: 64 64;
+                               max: 64 64;
+                               align: 0.5 0.5;
+                               rel1 { relative: (40/624) (31/126); to: "body_bg"; }
+                               rel2 { relative: (104/624) (95/126); to: "body_bg"; }
+                               color: 255 255 255 255;
+                       }
+                       description {
+                               state: "mute" 0.0;
+                               inherit: "default" 0.0;
+                       }
+               }
+
+               part {
+                       name: "volume_slider";
+                       type: SWALLOW;
+                       scale: 1;
+                       mouse_events: 1;
+                       description {
+                               state: "default" 0.0;
+                               align: 0.5 0.5;
+                               rel1 { relative: 130/624 0.0; to: "body_bg"; }
+                               rel2 { relative: 584/624 1.0; to: "body_bg"; }
+                               color: 0 0 0 0;
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/ui/call_edc/voice-call-ui.edc b/ui/call_edc/voice-call-ui.edc
new file mode 100755 (executable)
index 0000000..bf8daa9
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+//#include "../vcui-view-layout.h"
+#include "../vcui-view-layout-hd.h"
+
+#define FONT_SLP_Bold "SLP:style=Bold"
+#define FONT_SLP_Medium "SLP:style=Medium"
+#define FONT_SLP_Roman "SLP:style=Roman"
+
+//#define      IMG_SRC_DIR "./wvga"
+#define        IMG_SRC_DIR "./hd"
+
+images {
+       /*image: IMG_SRC_DIR/"08_voicecall_multicall_icon01.png" COMP;
+       image: IMG_SRC_DIR/"08_voicecall_multicall_icon02.png" COMP;*/
+
+       image: IMG_SRC_DIR/"./keypad/vc_keypad_btn_normal.png" COMP;    
+       image: IMG_SRC_DIR/"./keypad/vc_keypad_btn_press.png" COMP;
+       image: IMG_SRC_DIR/"./keypad/vc_keypad_btn_icon.png" COMP;
+
+       image: IMG_SRC_DIR/"vc_lock_left_bg.png" COMP;
+       image: IMG_SRC_DIR/"vc_lock_right_bg.png" COMP;
+       image: IMG_SRC_DIR/"vc_lock_accept_icon.png" COMP;
+       image: IMG_SRC_DIR/"vc_lock_reject_icon.png" COMP;
+       image: IMG_SRC_DIR/"vc_lock_bottom_bg.png" COMP;
+ }
+
+
+collections {
+
+       #include "vcui-view-incoming.edc"
+       #include "vcui-view-incoming-lock.edc"
+       #include "vcui-view-dialing.edc"
+       #include "vcui-view-keypad.edc"
+       #include "vcui-view-single-call.edc"
+       #include "vcui-view-multi-call-conf.edc"
+       #include "vcui-view-multi-call-split.edc"
+       #include "vcui-view-multi-call-list.edc"
+       #include "vcui-view-naviframe.edc"
+       #include "vcui-view-ug-effect.edc"
+       #include "vcui-view-end-single-call.edc"
+       #include "vcui-view-end-conf-call.edc"
+       #include "vcui-view-volume-popup.edc"
+}
diff --git a/ui/default.conf b/ui/default.conf
new file mode 100755 (executable)
index 0000000..f65a00c
--- /dev/null
@@ -0,0 +1,3 @@
+PREFIX=/usr
+EDJDIR=share/edje
+LOCALEDIR=/share/locale
diff --git a/ui/images/PUT_IMAGES_HERE b/ui/images/PUT_IMAGES_HERE
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/ui/images/hd/icon/vc_add_icon.png b/ui/images/hd/icon/vc_add_icon.png
new file mode 100644 (file)
index 0000000..ff5ad9a
Binary files /dev/null and b/ui/images/hd/icon/vc_add_icon.png differ
diff --git a/ui/images/hd/icon/vc_add_icon_dim.png b/ui/images/hd/icon/vc_add_icon_dim.png
new file mode 100644 (file)
index 0000000..8549399
Binary files /dev/null and b/ui/images/hd/icon/vc_add_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_btn_more.png b/ui/images/hd/icon/vc_btn_more.png
new file mode 100644 (file)
index 0000000..7024668
Binary files /dev/null and b/ui/images/hd/icon/vc_btn_more.png differ
diff --git a/ui/images/hd/icon/vc_calling_name_BG_image.png b/ui/images/hd/icon/vc_calling_name_BG_image.png
new file mode 100644 (file)
index 0000000..7b0b153
Binary files /dev/null and b/ui/images/hd/icon/vc_calling_name_BG_image.png differ
diff --git a/ui/images/hd/icon/vc_conference_private.png b/ui/images/hd/icon/vc_conference_private.png
new file mode 100644 (file)
index 0000000..0b7431d
Binary files /dev/null and b/ui/images/hd/icon/vc_conference_private.png differ
diff --git a/ui/images/hd/icon/vc_contact_icon.png b/ui/images/hd/icon/vc_contact_icon.png
new file mode 100644 (file)
index 0000000..3cf5856
Binary files /dev/null and b/ui/images/hd/icon/vc_contact_icon.png differ
diff --git a/ui/images/hd/icon/vc_contact_icon_dim.png b/ui/images/hd/icon/vc_contact_icon_dim.png
new file mode 100644 (file)
index 0000000..30ed016
Binary files /dev/null and b/ui/images/hd/icon/vc_contact_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_icon_conf_call_end.png b/ui/images/hd/icon/vc_icon_conf_call_end.png
new file mode 100644 (file)
index 0000000..c6ddfea
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_conf_call_end.png differ
diff --git a/ui/images/hd/icon/vc_icon_conf_list_hold.png b/ui/images/hd/icon/vc_icon_conf_list_hold.png
new file mode 100755 (executable)
index 0000000..26cd3e7
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_conf_list_hold.png differ
diff --git a/ui/images/hd/icon/vc_icon_conf_list_unhold.png b/ui/images/hd/icon/vc_icon_conf_list_unhold.png
new file mode 100755 (executable)
index 0000000..330c3ed
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_conf_list_unhold.png differ
diff --git a/ui/images/hd/icon/vc_icon_hold.png b/ui/images/hd/icon/vc_icon_hold.png
new file mode 100755 (executable)
index 0000000..ff00328
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_hold.png differ
diff --git a/ui/images/hd/icon/vc_icon_hold_dim.png b/ui/images/hd/icon/vc_icon_hold_dim.png
new file mode 100755 (executable)
index 0000000..25ad3b0
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_hold_dim.png differ
diff --git a/ui/images/hd/icon/vc_icon_pause.png b/ui/images/hd/icon/vc_icon_pause.png
new file mode 100644 (file)
index 0000000..2134376
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_pause.png differ
diff --git a/ui/images/hd/icon/vc_icon_play.png b/ui/images/hd/icon/vc_icon_play.png
new file mode 100644 (file)
index 0000000..c59be52
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_play.png differ
diff --git a/ui/images/hd/icon/vc_icon_unhold.png b/ui/images/hd/icon/vc_icon_unhold.png
new file mode 100755 (executable)
index 0000000..8d28fa4
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_unhold.png differ
diff --git a/ui/images/hd/icon/vc_icon_unhold_dim.png b/ui/images/hd/icon/vc_icon_unhold_dim.png
new file mode 100755 (executable)
index 0000000..5f0c986
Binary files /dev/null and b/ui/images/hd/icon/vc_icon_unhold_dim.png differ
diff --git a/ui/images/hd/icon/vc_join_icon.png b/ui/images/hd/icon/vc_join_icon.png
new file mode 100644 (file)
index 0000000..c9205df
Binary files /dev/null and b/ui/images/hd/icon/vc_join_icon.png differ
diff --git a/ui/images/hd/icon/vc_join_icon_dim.png b/ui/images/hd/icon/vc_join_icon_dim.png
new file mode 100644 (file)
index 0000000..15b25ec
Binary files /dev/null and b/ui/images/hd/icon/vc_join_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_keypad_icon.png b/ui/images/hd/icon/vc_keypad_icon.png
new file mode 100644 (file)
index 0000000..75ce6ef
Binary files /dev/null and b/ui/images/hd/icon/vc_keypad_icon.png differ
diff --git a/ui/images/hd/icon/vc_keypad_icon_dim.png b/ui/images/hd/icon/vc_keypad_icon_dim.png
new file mode 100644 (file)
index 0000000..02bc557
Binary files /dev/null and b/ui/images/hd/icon/vc_keypad_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_mute_icon.png b/ui/images/hd/icon/vc_mute_icon.png
new file mode 100644 (file)
index 0000000..e8205c1
Binary files /dev/null and b/ui/images/hd/icon/vc_mute_icon.png differ
diff --git a/ui/images/hd/icon/vc_mute_icon_dim.png b/ui/images/hd/icon/vc_mute_icon_dim.png
new file mode 100644 (file)
index 0000000..5635cda
Binary files /dev/null and b/ui/images/hd/icon/vc_mute_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_normal_caller_ID.png b/ui/images/hd/icon/vc_normal_caller_ID.png
new file mode 100755 (executable)
index 0000000..9f7931f
Binary files /dev/null and b/ui/images/hd/icon/vc_normal_caller_ID.png differ
diff --git a/ui/images/hd/icon/vc_normal_caller_ID_group.png b/ui/images/hd/icon/vc_normal_caller_ID_group.png
new file mode 100755 (executable)
index 0000000..24b3aab
Binary files /dev/null and b/ui/images/hd/icon/vc_normal_caller_ID_group.png differ
diff --git a/ui/images/hd/icon/vc_qp_caller_ID.png b/ui/images/hd/icon/vc_qp_caller_ID.png
new file mode 100644 (file)
index 0000000..fa4f113
Binary files /dev/null and b/ui/images/hd/icon/vc_qp_caller_ID.png differ
diff --git a/ui/images/hd/icon/vc_qp_caller_ID_group.png b/ui/images/hd/icon/vc_qp_caller_ID_group.png
new file mode 100644 (file)
index 0000000..a651273
Binary files /dev/null and b/ui/images/hd/icon/vc_qp_caller_ID_group.png differ
diff --git a/ui/images/hd/icon/vc_rcs_share_icon.png b/ui/images/hd/icon/vc_rcs_share_icon.png
new file mode 100644 (file)
index 0000000..756347c
Binary files /dev/null and b/ui/images/hd/icon/vc_rcs_share_icon.png differ
diff --git a/ui/images/hd/icon/vc_rcs_share_icon_dim.png b/ui/images/hd/icon/vc_rcs_share_icon_dim.png
new file mode 100644 (file)
index 0000000..9a6a326
Binary files /dev/null and b/ui/images/hd/icon/vc_rcs_share_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_record_icon.png b/ui/images/hd/icon/vc_record_icon.png
new file mode 100644 (file)
index 0000000..da6b8e8
Binary files /dev/null and b/ui/images/hd/icon/vc_record_icon.png differ
diff --git a/ui/images/hd/icon/vc_record_icon_dim.png b/ui/images/hd/icon/vc_record_icon_dim.png
new file mode 100644 (file)
index 0000000..d2d9523
Binary files /dev/null and b/ui/images/hd/icon/vc_record_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_record_stop_icon_crop.png b/ui/images/hd/icon/vc_record_stop_icon_crop.png
new file mode 100644 (file)
index 0000000..3048ae9
Binary files /dev/null and b/ui/images/hd/icon/vc_record_stop_icon_crop.png differ
diff --git a/ui/images/hd/icon/vc_reject_with_msg_header_icon_others.png b/ui/images/hd/icon/vc_reject_with_msg_header_icon_others.png
new file mode 100644 (file)
index 0000000..4fc9dfa
Binary files /dev/null and b/ui/images/hd/icon/vc_reject_with_msg_header_icon_others.png differ
diff --git a/ui/images/hd/icon/vc_speaker_icon.png b/ui/images/hd/icon/vc_speaker_icon.png
new file mode 100644 (file)
index 0000000..cda8b82
Binary files /dev/null and b/ui/images/hd/icon/vc_speaker_icon.png differ
diff --git a/ui/images/hd/icon/vc_speaker_icon_dim.png b/ui/images/hd/icon/vc_speaker_icon_dim.png
new file mode 100644 (file)
index 0000000..6204bba
Binary files /dev/null and b/ui/images/hd/icon/vc_speaker_icon_dim.png differ
diff --git a/ui/images/hd/icon/vc_volume_icon.png b/ui/images/hd/icon/vc_volume_icon.png
new file mode 100644 (file)
index 0000000..4039b0d
Binary files /dev/null and b/ui/images/hd/icon/vc_volume_icon.png differ
diff --git a/ui/images/hd/icon/vc_volume_mute_icon.png b/ui/images/hd/icon/vc_volume_mute_icon.png
new file mode 100644 (file)
index 0000000..6214599
Binary files /dev/null and b/ui/images/hd/icon/vc_volume_mute_icon.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_icon-1.png b/ui/images/hd/keypad/vc_keypad_btn_icon-1.png
new file mode 100644 (file)
index 0000000..b2396b6
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_icon-1.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_icon.png b/ui/images/hd/keypad/vc_keypad_btn_icon.png
new file mode 100644 (file)
index 0000000..90ba199
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_icon.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_normal-1.png b/ui/images/hd/keypad/vc_keypad_btn_normal-1.png
new file mode 100644 (file)
index 0000000..f17991d
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_normal-1.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_normal.png b/ui/images/hd/keypad/vc_keypad_btn_normal.png
new file mode 100644 (file)
index 0000000..10e74b5
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_normal.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_press-1.png b/ui/images/hd/keypad/vc_keypad_btn_press-1.png
new file mode 100644 (file)
index 0000000..74ef761
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_press-1.png differ
diff --git a/ui/images/hd/keypad/vc_keypad_btn_press.png b/ui/images/hd/keypad/vc_keypad_btn_press.png
new file mode 100644 (file)
index 0000000..f4e474c
Binary files /dev/null and b/ui/images/hd/keypad/vc_keypad_btn_press.png differ
diff --git a/ui/images/hd/vc_lock_accept_icon.png b/ui/images/hd/vc_lock_accept_icon.png
new file mode 100644 (file)
index 0000000..a4367c6
Binary files /dev/null and b/ui/images/hd/vc_lock_accept_icon.png differ
diff --git a/ui/images/hd/vc_lock_bottom_bg.png b/ui/images/hd/vc_lock_bottom_bg.png
new file mode 100644 (file)
index 0000000..ba8bc4c
Binary files /dev/null and b/ui/images/hd/vc_lock_bottom_bg.png differ
diff --git a/ui/images/hd/vc_lock_left_bg.png b/ui/images/hd/vc_lock_left_bg.png
new file mode 100644 (file)
index 0000000..539d1e1
Binary files /dev/null and b/ui/images/hd/vc_lock_left_bg.png differ
diff --git a/ui/images/hd/vc_lock_reject_icon.png b/ui/images/hd/vc_lock_reject_icon.png
new file mode 100644 (file)
index 0000000..526b99c
Binary files /dev/null and b/ui/images/hd/vc_lock_reject_icon.png differ
diff --git a/ui/images/hd/vc_lock_right_bg.png b/ui/images/hd/vc_lock_right_bg.png
new file mode 100644 (file)
index 0000000..6f2f35e
Binary files /dev/null and b/ui/images/hd/vc_lock_right_bg.png differ
diff --git a/ui/images/wvga/icon/vc_add_icon.png b/ui/images/wvga/icon/vc_add_icon.png
new file mode 100644 (file)
index 0000000..74cbecd
Binary files /dev/null and b/ui/images/wvga/icon/vc_add_icon.png differ
diff --git a/ui/images/wvga/icon/vc_add_icon_dim.png b/ui/images/wvga/icon/vc_add_icon_dim.png
new file mode 100644 (file)
index 0000000..93cd789
Binary files /dev/null and b/ui/images/wvga/icon/vc_add_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_btn_more.png b/ui/images/wvga/icon/vc_btn_more.png
new file mode 100644 (file)
index 0000000..9ae6a5a
Binary files /dev/null and b/ui/images/wvga/icon/vc_btn_more.png differ
diff --git a/ui/images/wvga/icon/vc_conference_private-1.png b/ui/images/wvga/icon/vc_conference_private-1.png
new file mode 100644 (file)
index 0000000..a980096
Binary files /dev/null and b/ui/images/wvga/icon/vc_conference_private-1.png differ
diff --git a/ui/images/wvga/icon/vc_conference_private.png b/ui/images/wvga/icon/vc_conference_private.png
new file mode 100644 (file)
index 0000000..0b7431d
Binary files /dev/null and b/ui/images/wvga/icon/vc_conference_private.png differ
diff --git a/ui/images/wvga/icon/vc_contact_icon.png b/ui/images/wvga/icon/vc_contact_icon.png
new file mode 100644 (file)
index 0000000..aa21319
Binary files /dev/null and b/ui/images/wvga/icon/vc_contact_icon.png differ
diff --git a/ui/images/wvga/icon/vc_contact_icon_dim.png b/ui/images/wvga/icon/vc_contact_icon_dim.png
new file mode 100644 (file)
index 0000000..ca9ca55
Binary files /dev/null and b/ui/images/wvga/icon/vc_contact_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_icon_conf_call_end-1.png b/ui/images/wvga/icon/vc_icon_conf_call_end-1.png
new file mode 100644 (file)
index 0000000..e7c78b9
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_conf_call_end-1.png differ
diff --git a/ui/images/wvga/icon/vc_icon_conf_call_end.png b/ui/images/wvga/icon/vc_icon_conf_call_end.png
new file mode 100644 (file)
index 0000000..c6ddfea
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_conf_call_end.png differ
diff --git a/ui/images/wvga/icon/vc_icon_hold.png b/ui/images/wvga/icon/vc_icon_hold.png
new file mode 100644 (file)
index 0000000..26cd3e7
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_hold.png differ
diff --git a/ui/images/wvga/icon/vc_icon_mute_press.png b/ui/images/wvga/icon/vc_icon_mute_press.png
new file mode 100644 (file)
index 0000000..062056f
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_mute_press.png differ
diff --git a/ui/images/wvga/icon/vc_icon_pause.png b/ui/images/wvga/icon/vc_icon_pause.png
new file mode 100644 (file)
index 0000000..6317e16
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_pause.png differ
diff --git a/ui/images/wvga/icon/vc_icon_play.png b/ui/images/wvga/icon/vc_icon_play.png
new file mode 100644 (file)
index 0000000..dd5f28e
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_play.png differ
diff --git a/ui/images/wvga/icon/vc_icon_sound_press.png b/ui/images/wvga/icon/vc_icon_sound_press.png
new file mode 100644 (file)
index 0000000..846ac44
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_sound_press.png differ
diff --git a/ui/images/wvga/icon/vc_icon_unhold.png b/ui/images/wvga/icon/vc_icon_unhold.png
new file mode 100644 (file)
index 0000000..330c3ed
Binary files /dev/null and b/ui/images/wvga/icon/vc_icon_unhold.png differ
diff --git a/ui/images/wvga/icon/vc_join_icon.png b/ui/images/wvga/icon/vc_join_icon.png
new file mode 100644 (file)
index 0000000..fd07d29
Binary files /dev/null and b/ui/images/wvga/icon/vc_join_icon.png differ
diff --git a/ui/images/wvga/icon/vc_join_icon_dim.png b/ui/images/wvga/icon/vc_join_icon_dim.png
new file mode 100644 (file)
index 0000000..fc9fc41
Binary files /dev/null and b/ui/images/wvga/icon/vc_join_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_keypad_icon.png b/ui/images/wvga/icon/vc_keypad_icon.png
new file mode 100644 (file)
index 0000000..d43b10e
Binary files /dev/null and b/ui/images/wvga/icon/vc_keypad_icon.png differ
diff --git a/ui/images/wvga/icon/vc_keypad_icon_dim.png b/ui/images/wvga/icon/vc_keypad_icon_dim.png
new file mode 100644 (file)
index 0000000..087565b
Binary files /dev/null and b/ui/images/wvga/icon/vc_keypad_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_mute_icon.png b/ui/images/wvga/icon/vc_mute_icon.png
new file mode 100644 (file)
index 0000000..890ef31
Binary files /dev/null and b/ui/images/wvga/icon/vc_mute_icon.png differ
diff --git a/ui/images/wvga/icon/vc_mute_icon_dim.png b/ui/images/wvga/icon/vc_mute_icon_dim.png
new file mode 100644 (file)
index 0000000..3679bc1
Binary files /dev/null and b/ui/images/wvga/icon/vc_mute_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_normal_caller_ID.png b/ui/images/wvga/icon/vc_normal_caller_ID.png
new file mode 100644 (file)
index 0000000..474f9e2
Binary files /dev/null and b/ui/images/wvga/icon/vc_normal_caller_ID.png differ
diff --git a/ui/images/wvga/icon/vc_normal_caller_ID_group.png b/ui/images/wvga/icon/vc_normal_caller_ID_group.png
new file mode 100644 (file)
index 0000000..22227e1
Binary files /dev/null and b/ui/images/wvga/icon/vc_normal_caller_ID_group.png differ
diff --git a/ui/images/wvga/icon/vc_qp_caller_ID.png b/ui/images/wvga/icon/vc_qp_caller_ID.png
new file mode 100644 (file)
index 0000000..fa4f113
Binary files /dev/null and b/ui/images/wvga/icon/vc_qp_caller_ID.png differ
diff --git a/ui/images/wvga/icon/vc_qp_caller_ID_group.png b/ui/images/wvga/icon/vc_qp_caller_ID_group.png
new file mode 100644 (file)
index 0000000..a651273
Binary files /dev/null and b/ui/images/wvga/icon/vc_qp_caller_ID_group.png differ
diff --git a/ui/images/wvga/icon/vc_rcs_share_icon.png b/ui/images/wvga/icon/vc_rcs_share_icon.png
new file mode 100644 (file)
index 0000000..756347c
Binary files /dev/null and b/ui/images/wvga/icon/vc_rcs_share_icon.png differ
diff --git a/ui/images/wvga/icon/vc_rcs_share_icon_dim.png b/ui/images/wvga/icon/vc_rcs_share_icon_dim.png
new file mode 100644 (file)
index 0000000..9a6a326
Binary files /dev/null and b/ui/images/wvga/icon/vc_rcs_share_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_record_icon.png b/ui/images/wvga/icon/vc_record_icon.png
new file mode 100644 (file)
index 0000000..470f482
Binary files /dev/null and b/ui/images/wvga/icon/vc_record_icon.png differ
diff --git a/ui/images/wvga/icon/vc_record_icon_dim.png b/ui/images/wvga/icon/vc_record_icon_dim.png
new file mode 100644 (file)
index 0000000..032a6af
Binary files /dev/null and b/ui/images/wvga/icon/vc_record_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_record_stop_icon_crop.png b/ui/images/wvga/icon/vc_record_stop_icon_crop.png
new file mode 100644 (file)
index 0000000..3048ae9
Binary files /dev/null and b/ui/images/wvga/icon/vc_record_stop_icon_crop.png differ
diff --git a/ui/images/wvga/icon/vc_reject_with_msg_header_icon_others.png b/ui/images/wvga/icon/vc_reject_with_msg_header_icon_others.png
new file mode 100644 (file)
index 0000000..4fc9dfa
Binary files /dev/null and b/ui/images/wvga/icon/vc_reject_with_msg_header_icon_others.png differ
diff --git a/ui/images/wvga/icon/vc_speaker_icon.png b/ui/images/wvga/icon/vc_speaker_icon.png
new file mode 100644 (file)
index 0000000..a25ad4a
Binary files /dev/null and b/ui/images/wvga/icon/vc_speaker_icon.png differ
diff --git a/ui/images/wvga/icon/vc_speaker_icon_dim.png b/ui/images/wvga/icon/vc_speaker_icon_dim.png
new file mode 100644 (file)
index 0000000..3f1a9df
Binary files /dev/null and b/ui/images/wvga/icon/vc_speaker_icon_dim.png differ
diff --git a/ui/images/wvga/icon/vc_volume_icon.png b/ui/images/wvga/icon/vc_volume_icon.png
new file mode 100644 (file)
index 0000000..4039b0d
Binary files /dev/null and b/ui/images/wvga/icon/vc_volume_icon.png differ
diff --git a/ui/images/wvga/icon/vc_volume_mute_icon.png b/ui/images/wvga/icon/vc_volume_mute_icon.png
new file mode 100644 (file)
index 0000000..6214599
Binary files /dev/null and b/ui/images/wvga/icon/vc_volume_mute_icon.png differ
diff --git a/ui/images/wvga/keypad/vc_keypad_btn_icon.png b/ui/images/wvga/keypad/vc_keypad_btn_icon.png
new file mode 100644 (file)
index 0000000..b2396b6
Binary files /dev/null and b/ui/images/wvga/keypad/vc_keypad_btn_icon.png differ
diff --git a/ui/images/wvga/keypad/vc_keypad_btn_normal.png b/ui/images/wvga/keypad/vc_keypad_btn_normal.png
new file mode 100644 (file)
index 0000000..f17991d
Binary files /dev/null and b/ui/images/wvga/keypad/vc_keypad_btn_normal.png differ
diff --git a/ui/images/wvga/keypad/vc_keypad_btn_press.png b/ui/images/wvga/keypad/vc_keypad_btn_press.png
new file mode 100644 (file)
index 0000000..74ef761
Binary files /dev/null and b/ui/images/wvga/keypad/vc_keypad_btn_press.png differ
diff --git a/ui/images/wvga/vc_lock_accept_icon.png b/ui/images/wvga/vc_lock_accept_icon.png
new file mode 100644 (file)
index 0000000..a4367c6
Binary files /dev/null and b/ui/images/wvga/vc_lock_accept_icon.png differ
diff --git a/ui/images/wvga/vc_lock_bottom_bg.png b/ui/images/wvga/vc_lock_bottom_bg.png
new file mode 100644 (file)
index 0000000..ba8bc4c
Binary files /dev/null and b/ui/images/wvga/vc_lock_bottom_bg.png differ
diff --git a/ui/images/wvga/vc_lock_left_bg.png b/ui/images/wvga/vc_lock_left_bg.png
new file mode 100644 (file)
index 0000000..539d1e1
Binary files /dev/null and b/ui/images/wvga/vc_lock_left_bg.png differ
diff --git a/ui/images/wvga/vc_lock_reject_icon.png b/ui/images/wvga/vc_lock_reject_icon.png
new file mode 100644 (file)
index 0000000..526b99c
Binary files /dev/null and b/ui/images/wvga/vc_lock_reject_icon.png differ
diff --git a/ui/images/wvga/vc_lock_right_bg.png b/ui/images/wvga/vc_lock_right_bg.png
new file mode 100644 (file)
index 0000000..6f2f35e
Binary files /dev/null and b/ui/images/wvga/vc_lock_right_bg.png differ
diff --git a/ui/org.tizen.call.desktop.in b/ui/org.tizen.call.desktop.in
new file mode 100755 (executable)
index 0000000..b2f7cf7
--- /dev/null
@@ -0,0 +1,10 @@
+Name=Call
+Type=Application
+Exec=${PREFIX}/bin/voice-call-ui
+MimeType=tel.uri
+nodisplay=True
+Version=0.2.0
+X-Tizen-TaskManage=False
+X-Tizen-Multiple=False
+X-Tizen-Removable=False
+X-Tizen-Svc=http://tizen.org/appsvc/operation/call|tel|NULL
diff --git a/ui/po/CMakeLists.txt b/ui/po/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..914608f
--- /dev/null
@@ -0,0 +1,25 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en.po es_ES.po fr_FR.po it_IT.po ja_JP.po 
+ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po )
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/ui/po/de_DE.po b/ui/po/de_DE.po
new file mode 100755 (executable)
index 0000000..619d86e
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Ablehnungsnachricht erstellen"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Liste der Ablehnungs-Nachrichten ist leer"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Ablehnen und Mitteilung senden"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Anruf"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Teiln. nicht erreich."
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Anruf beendet"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Anruf abgelehnt"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Getrennt"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Ungültige Nummer"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Im Anruf"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Konferenz"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Antwortet nicht"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Nummer gewechselt"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Nummer nicht vorhanden"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Gehalten"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Teilnehmer"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Annehmen"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Anruf hin."
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Kontakte"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Beenden"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Headset"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Halten"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Konferenz"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Stumm"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Abweisen"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Lautsp."
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Teilen"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Abrufen"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Konferenz"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Aktuellen Anruf beenden und antworten"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Aktuellen Anruf halten und antworten"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Privat"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Systemfehler"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Alle eingehenden Anrufe gesperrt"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Alle ausgehenden Anrufe gesperrt"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Anruf fehlgeschlagen"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Nur Notrufe"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Anruf unzulässig"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Anruf gesperrt"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Umleitung aktiv: Immer"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Umleitung aktiv: Immer"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Umleitung aktiv: Nicht erreichbar"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Umleitung aktiv: Bei besetzt"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Anruf weitergeleitet"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Falsche Nummer"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Wechseln Sie vom Offline-Profil zu einem anderen Profil, um Netzdienste nutzen zu können"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Wählen ..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Sendevorgang fehlgeschlagen. Erneut versuchen"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Notruf"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Nur FDN-Anrufe"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Gehalten"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Halten fehlgeschlagen"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Halten nicht unterstützt"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Eingehende Anrufe bei Roaming gesperrt"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Unvollständig"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Konferenz"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Konferenz fehlgeschlagen"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Konferenz nicht unterstützt"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Netz besetzt"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Netzwerk nicht verfügbar"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Kein Guthaben übrig"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Kein Netz"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Betrieb abgelehnt"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Ausgehende internationale Anrufe außer Daheim gesperrt"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Ausgehende internationale Anrufe gesperrt"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Telefon nicht initialisiert"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 abgelehnt"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Wahlwiederholung..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Dienst unzulässig"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Nur SOS-Anruf. SIM-Karte einsetzen, um Netzdienste zu nutzen"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Teilen fehlgeschlagen"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Teilen nicht unterstützt"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Getauscht"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Tauschen fehlgeschlagen"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Tauschen nicht unterstützt"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Zu BT-Headset gewechselt"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Zu Telefon gewechselt"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Übertragungsfehler"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Übertragen nicht unterstützt"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Kann nicht abgerufen werden"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Nicht verfügbar"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Übernommen"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Nicht halten nicht unterstützt"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Besetzt"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "SIM verifizieren oder gültige SIM eingeben"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Sprachanruf ist während Videoanruf nicht zugelassen"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Warten aktiv"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Falsche Gruppe"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Anruf mit Nachricht abweisen"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Aktives Gespräch beenden"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Anruf halten"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Gehaltenes Gespräch beenden"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Alle Anrufe beenden"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Aktive Anrufe beenden (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Gehaltene Anrufe beenden (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Kopfhörer"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Empfänger"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Konto konnte nicht registriert werden."
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Aktiven Anruf halten"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Nicht genügend Speicher. Löschen Sie einige Elemente"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Beenden"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Ton"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Service nicht verfügbar"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Tasten-\nfeld"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Verbindung wird hergestellt..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Abgewiesen"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Sendevorgang läuft..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Tastatur ausbl."
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Rec"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Unbekannten Anruf abgewiesen"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Gespeichert"
+
diff --git a/ui/po/el_GR.po b/ui/po/el_GR.po
new file mode 100755 (executable)
index 0000000..4923d0b
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Δημιουργία μηνύματος απόρριψης"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Η λίστα μηνυμάτων απόρριψης είναι κενά"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Απόρριψη με μήνυμα"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Κλήση"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Ο καλ.δεν είναι διαθ."
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Τέλος κλήσης"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Απόρριψη κλήσης"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Αποσυνδέθηκε"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Μη έγκυρος αριθμός"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Σε κλήση"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Συνδιάσκεψη"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Δεν απαντά"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Ο αριθμός άλλαξε"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Δεν υπάρχει ο αριθμός."
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Αναμονή"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "People"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Αποδοχή"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Πρ. κλήσ."
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Επαφές"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Λήξη"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Ακουστικά"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Αναμονή"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Ένωση"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Σίγαση"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Απόρριψη"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Ηχείο"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Διαχωρ."
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Απελευθ."
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Τηλεφωνική συνδιάσκεψη"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Τερματισμός τρέχουσας κλήσης και απάντηση"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Αναμονή τρέχουσας κλήσης και απάντηση"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Προσωπικό"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Σφάλμα συστήματος"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Φραγή όλων των εισερχόμενων κλήσεων"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Φραγή όλων των εξερχόμενων κλήσεων"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Αποτυχία κλήσης"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Μόνο επείγουσες κλήσεις"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Μη επιτρεπτή κλήση"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Φραγή κλήσης"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Ενεργή Προώθηση Κλήσεων: Πάντα"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Προώθηση κλήσεων ενεργή: Εάν δεν απαντά"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Προώθηση κλήσεων ενεργή: Aδύνατη πρόσβαση"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Προώθηση κλήσεων ενεργή: Σε κατειλημμένη γραμμή"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Έγινε προώθηση κλήσης"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Λάθος αριθμός"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Αλλαγή από προφίλ χωρίς σύνδεση σε άλλο προφίλ για υπηρεσίες δικτύου"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Κλήση..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Αποτυχία αποστολής. Επανάληψη"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Κλήση έκτακτης ανάγκης"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Μόνο κλήσεις FDN"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Αναμονή"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Αποτυχία αναμονής"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Η αναμονή δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Φραγή εισερχομένων σε περιαγωγή"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Δεν ολοκληρώθηκε"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Ενώθηκε"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Αποτυχία ένωσης"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Η ένωση δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Κατειλημμένο δίκτυο"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Δίκτυο μη διαθέσιμο"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Εξάντληση μονάδων"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Μη διαθέσιμη υπηρεσία"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Η λειτουργία απορρίφθηκε"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Φραγή εξερχομένων διεθνών εκτός χώρας επιλογής"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Φραγή όλων των\nεξερχόμενων διεθνών κλήσεων"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Το τηλέφωνο δεν ξεκίνησε"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 απορρίφθηκε"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Επανάκληση..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Δεν επιτρέπεται η υπηρεσία"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Μόνο κλήση SOS. Τοποθετήστε την κάρτα SIM για πρόσβαση στις υπηρεσίες δικτύου"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Αποτυχία διαχωρισμού"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Ο διαχωρισμός δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Εναλλαγή"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Αποτυχία εναλλαγής"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Η εναλλαγή δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Έγινε αλλαγή σε ακουστικά BT"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Αλλαγή σε τηλέφωνο"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Σφάλμα μεταφοράς"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Η μεταφορά δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Δεν είναι δυνατή η ανάκτηση"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Μη διαθέσιμο"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Απενεργοποίηση αναμονής"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Η κατάργηση αναμονής δεν υποστηρίζεται"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Κατειλημμένη γραμμή"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Επαληθεύστε SIM ή εισάγετε έγκυρη SIM"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Δεν επιτρέπεται φωνητική κλήση κατά τη διάρκεια κλήσης βίντεο"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Αναμονή ενεργή"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Λάθος ομάδα"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Απόρριψη κλήσης με μήνυμα"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Τερματισμός ενεργής κλήσης"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Κλήση σε αναμονή"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Λήξη κλήσης σε αναμονή"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Τερματ. όλων κλήσεων"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Τερματισμός ενεργών κλήσεων (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Τερματισμός κλήσεων σε αναμονή (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Ακουστικά"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Δέκτης"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Αποτυχία καταχώρισης λογαριασμού"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Ενερ. κλήση σε κράτ."
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Δεν υπάρχει αρκετή μνήμη. Διαγράψτε ορισμένα στοιχεία"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Τερμ.κλ."
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Ήχος"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Μη διαθέσιμη λειτουργία"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Πληκτρολ."
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Σύνδεση..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Απόρριψη"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Αποστολή..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Απόκρ. πληκτρ."
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Εγγρ."
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Άγνωστη κλήση απορρίφθηκε"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Αποθηκεύτηκε"
+
diff --git a/ui/po/en.po b/ui/po/en.po
new file mode 100755 (executable)
index 0000000..c0c7a85
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Create reject message"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Reject message list is empty"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Reject with message"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Call"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Called party not available"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Call ended"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Call rejected"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Disconnected"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Invalid number"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "In call"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Multiparty"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "No answer"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Number changed"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Number does not exist"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "On hold"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "People"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Accept"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Add call"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Contacts"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "End"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Headset"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Hold"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Join"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Mute"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Reject"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Speaker"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Split"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Unhold"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Conference call"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "End current call & answer"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Hold current call & answer"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Private"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "System error"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "All incoming calls barred"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "All outgoing calls barred"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Call failed"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Emergency calls only"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Call not allowed"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Call barred"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Divert calls: Always"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Divert calls: No answer"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Divert calls: Unreachable"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Divert calls: When busy"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Call diverted"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Wrong number"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Change from Offline to other profile for network services"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Dialling..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Sending failed. Try again"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Emergency call"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "FDN calls only"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Held"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Hold failed"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Hold not supported"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Incoming calls barred when roaming"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Incomplete"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Joined"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Join failed"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Join not supported"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Network busy"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Network not available"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "No credit left"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "No service"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Operation refused"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Outgoing international calls except home barred"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Outgoing international calls barred"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Phone not initialised"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "%s rejected"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Redialling..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Service not allowed"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "SOS call only. Insert SIM card to access network services"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Split failed"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Split not supported"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Swapped"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Swap failed"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Swap not supported"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Switched to BT headset"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Switched to phone"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Transfer failed"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Transfer not supported"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Unable to retrieve"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Unavailable"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Unheld"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Unhold not supported"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "User busy"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Verify SIM or insert valid SIM"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Voice call is not allowed during video call"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Waiting active"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Wrong group"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Reject call with message"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "End active call"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Hold call"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "End held call"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "End all calls"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "End active calls (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "End held calls (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Headphones"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Receiver"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Failed to register account"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Hold active call"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Not enough memory. Delete some items"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "End call"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Sound"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Service not available"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Keypad"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Connecting..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Rejected"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Sending..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Hide keypad"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "REC"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Unknown call rejected"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Saved"
+
diff --git a/ui/po/es_ES.po b/ui/po/es_ES.po
new file mode 100755 (executable)
index 0000000..15ca367
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Crear mensaje para rechazar"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Lista de mensajes rechazados vacía"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Rechazar con mensaje"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Llamadas"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Destinatario ocupado"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Llamada finalizada"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Llamada rechazada"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Desconectado"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Número no válido"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "En llamada"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Multiconferencia"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Sin respuesta"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Número cambiado"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "No hay número"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "En espera"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Gente"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Aceptar"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Añadir llamada"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Contactos"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Finalizar"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Auricul"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Retener"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Enlazar"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Silencio"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Rechazar"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Altavoz"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Dividir"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Canc. ret."
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Multiconferencia"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Finalizar llamada actual y responder"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Mantener llamada actual en espera y responder"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Particular"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Error del sistema"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Restringidas todas las llamadas entrantes"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Restringidas todas las llamadas salientes"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Error al llamar"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Sólo llamadas de emergencia"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Llamada no permitida"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Llamada restringida"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Desvío de llamadas: Siempre"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Desvío de llamadas: Sin respuesta"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Desvío de llamada: Si no localizable"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Desvío de llamada: Si ocupado"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Llamada reenviada"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Número erróneo"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Cambiar de Fuera de línea a otro perfil de servicios de red"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Marcando..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Error al enviar. Inténtelo de nuevo"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Llamada de emergencia"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Sólo llamadas FDN"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Espera"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Error de espera"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Espera no admitida"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Llamadas entrantes restringidas en el extranjero"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Incompleto"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Enlazada"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Error de enlace"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Enlace no admitido"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Red ocupada"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Red no disponible"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "No queda saldo"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Sin servicio"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Operación rechazada"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Llamadas internacionales salientes excepto país de origen restringidas"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Llamadas salientes internacionales restringidas"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Teléfono no iniciado"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rechazado"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Marcando nuevamente..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Servicio no permitido"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Sólo llamadas de emergencia. Inserte tarjeta SIM para acceder a los servicios de red"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Error al dividir"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "División no admitida"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Cambiada"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Error al cambiar"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Cambio no admitido"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Cambiado a auricular BT"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Cambiado a teléfono"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Error de transferencia"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Transferencia no admitida"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "No se puede recuperar"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "No disponible"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Desactivar en espera"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Desactivación de espera no admitida"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Usuario ocupado"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Compruebe SIM o inserte SIM válida"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "No se permite realizar llamadas de voz durante una llamada de vídeo"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Espera activa"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Grupo erróneo"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Rechazar llamada con mensaje"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Finalizar llamada activa"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Retener llamada"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Finalizar llamada en espera"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Fin todas llamadas"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Finalizar llamadas activas (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Finalizar llamadas retenidas (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Auriculares"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Receptor"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Error al registrar la cuenta"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Poner llam act esper"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "No hay memoria suficiente. Elimine algunos elementos"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Fin llam"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Sonido"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Servicio no disponible"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Teclado"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Conectando..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Rechazado"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Enviando..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Ocultar teclado"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "REC"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Llamada desconocida rechazada"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Guardado"
+
diff --git a/ui/po/fr_FR.po b/ui/po/fr_FR.po
new file mode 100755 (executable)
index 0000000..0316cf0
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Créer un message de rejet"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "La liste des messages de rejet est vide"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Refus avec message"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Appels"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Contact indisponible"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Fin d'appel"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Appel refusé"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Déconnecté"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Numéro non valide"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Appel"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Conférence"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Aucune réponse"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Numéro modifié"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Le numéro n'existe pas."
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Attente"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Personnes"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Accepter"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Ajouter"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Contacts"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Fin"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Casque"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Attente"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Rejoindre"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Muet"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Refuser"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "HP"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Isoler"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Récup."
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Conférence téléphonique"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Mettre fin à l'appel en cours et répondre"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Mettre l'appel en cours en attente et répondre"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Confidentiel"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Erreur système"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Tous appels entrants interdits"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Tous appels sortants interdits"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Echec de l'appel"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Appels d'urgence uniquement"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Appel non autorisé"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Appel interdit"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Renvoi d'appel activé : Toujours"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Renvoi d'appel activé : Aucune réponse"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Renvoi d'appel activé : Injoignable"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Renvoi d'appel activé : Occupé"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Appel transféré"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Numéro incorrect"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Quittez le profil hors-ligne pour les services radio"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Composition..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Echec de l'envoi. Réessayez ultérieurement"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Appel d'urgence"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Appels FDN uniquement"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "En attente"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Échec de mise en attente"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Mise en attente non supportée"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Appels entrants interdits en itinérance"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Non terminé"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Ajouté"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Échec conférence"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Conférence non supportée"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Réseau occupé"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Réseau non disponible"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Crédit épuisé"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Aucun service"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Opération refusée"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Appels internationaux sortants interdits sauf vers pays d'origine"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Appels internationaux sortants interdits"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Téléphone non initialisé"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 refusé"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Rappel..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Service non autorisé"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Appel d'urgence uniquement. Insérez la carte SIM pour accéder aux services réseau"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Échec appel isolé"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Appel isolé non supporté"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Permuté"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Échec permut."
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Permutation non supportée"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Basculer sur le casque Bluetooth"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Basculer sur le téléphone"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Erreur de transfert"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Transfert non supporté"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Récupération impossible"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Non disponible"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Récupération"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Récupération non supportée"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Occupé"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Vérifiez la carte SIM ou insérez-en une valide"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Appel vocal non autorisé pendant un appel visio"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "En attente"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Groupe incorrect"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Rejeter l'appel avec message"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Terminer l'appel en cours"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Mettre l'appel en attente"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Terminer l'appel en attente"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Terminer tous les appels"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Terminer appels actifs (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Terminer appels en attente (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Ecouteurs"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Destinataire"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Impossible d'enregistrer le compte"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Mettre en attente"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Mémoire insuffisante. Supprimez certains éléments"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Fin"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Son"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Service non disponible"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Clavier"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Connexion ..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Rejeté"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Envoi ..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Masquer clavier"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "ENREG"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Appelant inconnu\nrefusé"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Enregistré"
+
diff --git a/ui/po/it_IT.po b/ui/po/it_IT.po
new file mode 100755 (executable)
index 0000000..cdc7cfc
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Crea messaggio di rifiuto"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "L'elenco dei messaggi rifiutati è vuoto"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Rifiuta con messaggio"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Chiamata"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Utente non disponib."
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Chiamata terminata"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Chiamata rifiutata"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Disconnesso"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Numero non valido"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Chiamata"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Conferenza"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Nessuna risposta"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Numero modificato"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Numero non esistente"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "In attesa"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Persone"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Accetta"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Chiama"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Rubrica"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Termina"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Auric. BT"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "In attesa"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "In conf."
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Muto"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Rifiuta"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Vivavoce"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Separa"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Recupera"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Conferenza"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Termina chiamata corrente e rispondi"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Metti in attesa chiamata corrente e rispondi"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Conversazione privata"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Errore di sistema"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Blocco di tutte le chiamate entranti"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Blocco di tutte le chiamate uscenti"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Chiamata non riuscita"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Solo chiamate di emergenza"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Chiamata non consentita"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Chiamata bloccata"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Trasferimento chiamate attivo: sempre"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Trasferimento chiamate attivo: nessuna risposta"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Trasferimento chiamate attivo: non raggiungibile"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Trasferimento chiamate attivo: occupato"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Chiamata inoltrata"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Numero errato"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Passare da Offline ad altro profilo per accedere ai servizi di rete"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Composizione..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Invio non eseguito. Riprovare"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Chiamata di emergenza"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Solo chiamate FDN"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "In attesa"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Messa in attesa non eseguita"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Messa in attesa non supportata"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Chiamate in arrivo bloccate durante roaming"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Incompleto"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "In conferenza"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Connessione non eseguita"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Connessione non supportata"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Rete occupata"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Rete non disponibile"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Credito esaurito"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Nessun servizio"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Operazione rifiutata"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Chiamate internazionali in uscita bloccate tranne verso proprio paese"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Uscenti internazionali bloccate"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Telefono non inizializzato"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rifiutato"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Ricomposizione..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Servizio non consentito"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Solo chiamate di emergenza. Inserire scheda SIM per accedere ai servizi di rete"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Divisione non eseguita"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Divisione non supportata"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Scambiata"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Scambio non eseguito"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Scambio non supportato"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Commutato su auricolare BT"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Telefono attivato"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Errore trasferimento"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Trasferimento non supportato"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Impossibile recuperare"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Non disponibile"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Annullamento attesa eseguito"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Annullamento attesa non supportato"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Utente occupato"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Verifica SIM o inserisci SIM valida"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Chiamata vocale non  consentita durante una videochiamata"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Avviso di chiamata attivo"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Gruppo errato"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Rifiuta con messaggio"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Termina chiamata attiva"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Chiamata in attesa"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Termina chiamata in attesa"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Termina tutte le chiamate"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Termina chiamate attive (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Termina chiamate in attesa (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Cuffie"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Ricevitore"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Registrazione account non riuscita"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Ch. attiva in attesa"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Memoria insufficiente. Eliminare alcuni elementi"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Termina"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Suono"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Servizio non disponibile"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Tastiera"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Connessione..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Rifiutata"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Invio..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Nasc. tastiera"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Reg"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Chiamata sconosciuta rifiutata"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Salvato"
+
diff --git a/ui/po/ja_JP.po b/ui/po/ja_JP.po
new file mode 100755 (executable)
index 0000000..7b5ce4c
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "拒否​メッセージ​の​作成"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "拒否​メッセージ​リスト​は​空​です"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "拒否してSMS送信"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "通話設定"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "発信​相手​は​電話​に​出られ​ません"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "通話​終了"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "通話​拒否​されました"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "切断しました。"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "番号​が​無効​です"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "通話中"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "マルチ​パーティー"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "応答​なし"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "番号​が​変更​されました"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "番号​が​存在​しません"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "保留中"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "人"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "応答"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "通話を​追加"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "連絡先"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "終了"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "ヘッドセット"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "保留"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "参加"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "ミュート"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "拒否"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "スピーカー"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "分割"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "保留解除"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "グループ通話"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "現在の通話を終了して応答"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "現在の通話を保留にして応答"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "個人携帯"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "システム​エラー"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "全ての​着信​が​規制​されて​います"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "全ての​発信​が​規制​されて​います"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "発信​できません​でした"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "緊急通報のみ発信可能です。"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "通話​は​許可されて​いません"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "通話​は​規制​されて​います"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "通話​を​転送する:常時"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "通話​を転送​する:​応答​なし"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "通話​を​転送:​​圏外時"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "通話​を​転送:​ビジー時"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "通話転送されました"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "番号​が​正しく​ありません"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "オフライン​から​他の​ネットワーク​サービス​の​接続先​に​変更"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "発信中..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "送信​に​失敗​しました。​リトライ"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "緊急通話"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "FDN電話​限定​です"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "保留にしました"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "保留​できません​でした"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "保留​に​対応して​いません"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "ローミング​中​は​着信​が​規制​されます"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "操作が中断されました"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "参加"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "グループ​通話​参加に失敗しました"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "グループ​通話​参加に対応していません"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "ネットワーク​混雑中"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "ネットワーク​を​利用​できません"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "料金​上限​設定​を​超えて​います"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "サービスが利用できません。"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "操作​は​拒否​されました"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "自国​以外の​全ての​国際​電話​発信​が​規制​されています"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "全ての​国際電話発信​が​規制​されて​います"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "写真​は​初期化​されて​いません"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "%sからの着信を拒否しました"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "リダイヤル中..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "サービス​は​許可されて​いません"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "SOS​通話​のみ。​ SIM​​カード​を​挿入して、​ネットワーク​サービス​に​アクセス​します"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "分割​に​失敗​しました"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "分割​に​対応​して​いません"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "交換しました"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "切り替え​できません​でした"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "切り替え​に​対応​して​いません"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "BT​ヘッド​セットに​切り​替え​ました"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "本体​に​切り​替え​ます"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "転送​に​失敗​しました"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "転送​に​対応​して​いません"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "受信できません"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "不可"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "保留解除"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "保留​解除​に​対応して​いません"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "話し中,​または​通信中​です"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "SIM​を​確認​する​か、​有効​な​SIM​を​挿入​して​ください"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "テレビ​電話中​は​音声​電話​を​使用​できません"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "割込​通話​設定中​です"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "グループ​が​間違って​います"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "着信拒否時にSMS送信"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "現在の​通話​を​終了"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "通話​を​保留​します"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "保留中の​通話​を​終了​"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "全ての​相手​と​終話"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "アクティブ​通話​を​終了​する​(%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "保留中の​通話​を​終了​する​(%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "ヘッドホン"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "受話​器"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "アカウント​の​登録​に​失敗​しました"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "現在の​通話​を​保留"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "メモリーが​不足​しています。​いくつかのアイテム​を​削除​してください"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "通話​を​終了​"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "サウンド"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "サービス​を​利用​できません"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "キーパッド"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "接続中..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "拒否されました。"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "送信中..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "キーパッド​を​非表示"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "録音"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "非通知​通話​を​拒否​しました"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "保存しました。"
+
diff --git a/ui/po/ko_KR.po b/ui/po/ko_KR.po
new file mode 100755 (executable)
index 0000000..1ec8536
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "수신 거부 메시지 작성"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "수신 거부 메시지 목록이 비어있습니다"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "수신 거절 메시지"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "통화"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "상대방이 전화를 받지 않습니다"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "통화가 종료되었습니다"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "전화가 거부되었습니다"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "연결 끊김"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "전화번호가 바르지 않습니다"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "통화 중"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "회의통화"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "응답이 없습니다"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "전화번호가 변경되었습니다"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "사용할 수 있는 번호가 없습니다"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "보류됨"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "인원"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "통화"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "통화 추가"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "연락처"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "종료"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "헤드셋"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "일시중단"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "연결"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "음소거"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "거절"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "스피커"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "통화 분리"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "중단해제"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "회의통화"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "현재 통화 종료 후 전화 받기"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "현재 통화를 보류 후 전화 받기"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "비공개"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "시스템 오류가 발생하였습니다"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "모든 수신 전화가 제한되었습니다"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "모든 발신 전화가 제한되었습니다"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "연결하지 못하였습니다"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "긴급전화만 가능합니다"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "전화를 연결할 수 없습니다"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "통화가 제한되었습니다"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "착신통화 : 항상"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "착신통화 : 응답 없을 때"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "착신통화 : 서비스 지역 이탈 시"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "통화 중일 때"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "착신전환되었습니다"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "전화번호가 바르지 않습니다"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "네트워크에 연결하려면 비행기 탑승 모드를 해제하세요"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "발신 중..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "전송하지 못하였습니다. 잠시 후 다시 시도하세요"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "긴급전화"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "발신 허용 번호로만 전화를 걸 수 있습니다"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "일시 중단 되었습니다"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "통화를 보류하지 못하였습니다"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "통화 보류가 지원되지 않습니다"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "로밍 중에는 전화 수신이 제한됩니다"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "완료되지 않았습니다"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "연결하였습니다"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "연결하지 못하였습니다"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "회의통화가 지원되지 않습니다"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "네트워크 연결 상태가 원활하지 않습니다"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "네트워크에 연결할 수 없습니다"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "크레디트가 없습니다"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "서비스 지역이 아닙니다"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "작업이 거부되었습니다"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "자국으로 거는 전화를 제외한 모든 국제전화 발신이 제한되었습니다"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "국제전화 발신이 제한되었습니다"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "휴대폰이 초기화되지 않았습니다"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "%s이(가) 수신 거부되었습니다"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "다시 거는 중..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "사용할 수 없는 서비스입니다"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "긴급전화만 사용할 수 있습니다. 네트워크 서비스를 이용하려면 SIM을 삽입하세요"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "통화를 분리하지 못하였습니다"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "통화 분리가 지원되지 않습니다"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "전환되었습니다"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "전환하지 못하였습니다"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "통화 전환이 지원되지 않습니다"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "블루투스 헤드셋으로 전환되었습니다"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "휴대폰으로 전환되었습니다"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "연결하지 못하였습니다"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "상대방 연결이 지원되지 않습니다"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "통화 보류를 취소할 수 없습니다"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "사용할 수 없음"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "통화 보류가 해제되었습니다"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "통화 보류를 취소할 수 없습니다"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "상대방이 통화 중입니다"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "SIM을 확인해 보거나 사용할 수 있는 SIM을 삽입하세요"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "영상통화 중에는 음성통화를 할 수 없습니다"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "통화대기가 실행되어 있습니다"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "그룹이 바르지 않습니다"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "수신 거절 메시지"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "현재 통화 종료"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "통화 보류"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "보류 통화 종료"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "모든 통화 종료"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "현재 통화(%d개) 종료"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "보류 통화(%d개) 종료"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "헤드폰"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "수화음 송출부"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "계정을 등록하지 못하였습니다"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "현재 통화 보류"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "저장 공간이 없습니다. 필요 없는 파일을 삭제하세요"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "통화 종료"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "소리"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "서비스를 사용할 수 없습니다"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "키패드"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "연결 중..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "수신 거부하였습니다"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "전송 중..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "키패드 숨기기"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "녹음"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "발신자 번호가 없는 전화를 거부하였습니다"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "저장되었습니다"
+
diff --git a/ui/po/nl_NL.po b/ui/po/nl_NL.po
new file mode 100755 (executable)
index 0000000..db8d6b0
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Weigeringsbericht maken"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Lijst met weigeringsberichten is leeg"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Weigeren met bericht"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Oproepen"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Gebelde niet besch."
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Oproep beëindigd"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Oproep geweigerd"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Verbinding verbroken"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Ongeldig getal"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "In gesprek"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Multiparty"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Geen gehoor"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Nummer gewijzigd"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Nummer bestaat niet"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "In wacht"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Mensen"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Opnemen"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Nwe oproep"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Contacten"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Stop"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Headset"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "In wacht"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Deeln."
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Dempen"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Weigeren"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Luidspreker"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Splitsen"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Uit wacht"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Vergaderoproep"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Huidige oproep beëindigen en opnemen"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Huidige oproep in de wacht en opnemen"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Privé"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Systeemfout"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Alle inkomende oproepen geblokkeerd"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Alle uitgaande oproepen geblokkeerd"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Oproep mislukt"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Alleen noodoproepen"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Oproep niet toegestaan"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Oproep geblokkeerd"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Alle oproepen doorschakelen"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Oproepen doorschakelen bij geen antwoord"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Doorschakelen indien onbereikbaar"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Doorschakelen bij in gesprek"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Oproep doorgestuurd"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Nummer onjuist"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Voor netwerkdiensten vliegtuigprofiel in ander profiel wijzigen"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Kiezen..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Verzenden mislukt. Opnieuw"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Noodoproep"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Alleen FDN-oproepen"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "In de wacht"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "In wacht zetten mislukt"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "In wacht zetten niet ondersteund"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Inkomende oproepen in buitenland geblokkeerd"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Niet compleet"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Toegevoegd"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Deelnemen aan multiparty mislukt"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Deelnemen aan multiparty niet ondersteund"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Netwerk bezet"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Netwerk niet beschikbaar"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Beltegoed is op"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Geen netwerk"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Actie geweigerd"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Uitgaande internationale oproepen geblokkeerd behalve naar eigen land"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Uitgaande internationale oproepen geblokkeerd"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Telefoon niet geïnitialiseerd"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 geweigerd"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Opnieuw kiezen..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Dienst niet toegestaan"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Alleen noodoproepen mogelijk. Voor netwerkdiensten SIM-kaart plaatsen"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Uit multiparty halen mislukt"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Uit multiparty halen niet ondersteund"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Gewisseld"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Wisselen mislukt"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Wisselen niet ondersteund"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Overgeschakeld naar BT-headset"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Overgeschakeld naar telefoon"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Fout bij doorverbinden"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Doorverbinden niet ondersteund"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Kan de details niet ophalen"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Niet beschikbaar"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Uit wacht halen"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Uit wacht halen niet ondersteund"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "In gesprek"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "SIM controleren of geldige SIM plaatsen"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Spraakoproep is niet toegestaan tijdens videogesprek"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Wisselgesprek"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Groep onjuist"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Oproep met bericht weigeren"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Actieve oproep beëindigen"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "In wacht"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Oproep in wacht beëindigen"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Alle gespr. beëindigen"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Actieve oproepen (%d) beëindigen"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Oproepen in de wacht (%d) beëindigen"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Koptelefoons"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Ontvanger"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Kan account niet registreren"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Huidige opr in wacht"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Onvoldoende geheugen. Wis een aantal items"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Einde"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Geluid"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Service niet beschikbaar"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Toetsen-\nbord"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Verbinden..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Geweigerd"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Verzenden..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Verberg toetsen"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Opn."
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Onbekende oproep geweigerd"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Opgeslagen"
+
diff --git a/ui/po/pt_PT.po b/ui/po/pt_PT.po
new file mode 100755 (executable)
index 0000000..7d23966
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Criar mensagem de rejeição"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "A lista de mensagens rejeitadas está vazia"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Rejeitar com mensagem"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Chamada"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Destinatario indispon"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Chamada terminada"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Chamada rejeitada"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Desligado"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Número inválido"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Em chamada"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Conferência"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Não atendida"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Número alterado"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Número inexistente"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Em espera"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Pessoas"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Aceitar"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Ad. cham."
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Contactos"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Terminar"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Auric."
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Reter"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Aderir"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Desl. mic."
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Rejeitar"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Altifal."
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Dividir"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Obter"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Chamada de conferência"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Terminar a chamada actual e atender"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Colocar a chamada actual em espera e atender"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Privado"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Erro de sistema"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Todas as chamadas recebidas restringidas"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Todas as chamadas efectuadas restringidas"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Falha na chamada"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Apenas chamadas de emergência"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Chamada não permitida"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Chamada restringida"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Desvio de chamadas activado: Sempre"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Desvio de chamadas activado: Não atende"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Desvio de chamadas activado: Incontactável"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Desvio de chamadas activado: Se ocupado"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Chamada encaminhada"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Número incorrecto"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Mudar de Offline para outro perfil para serviços de rede"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "A marcar..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Falha ao enviar. Tente novamente"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Chamada de emergência"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Só chamadas FDN"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Retida"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Falha ao colocar em espera"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Função de espera não suportada"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Chamadas recebidas barradas quando em roaming"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Incompleto"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Unida"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Falha ao aderir"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Adesão não suportada"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Rede ocupada"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Rede indisponível"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Crédito esgotado"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Sem serviço"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Operação recusada"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Chamadas internacionais efectuadas barradas excepto para origem"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Chamadas internacionais restringidas"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "O telefone não foi inicializado"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rejeitado"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "A remarcar..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Serviço não permitido"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Apenas chamada SOS. Insira o cartão SIM para aceder aos serviços de rede"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Falha ao dividir"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Divisão não suportada"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Mudado"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Falha ao mudar"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Mudança não suportada"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Mudado para auricular BT"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Mudado para telefone"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Erro de transferência"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Transferência não suportada"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Impossível receber"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Indisponível"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Obtida"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Retoma não suportada"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Utilizador ocupado"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Verificar SIM ou inserir SIM válido"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Chamada de voz não permitida durante chamada de vídeo"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Espera activa"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Grupo incorrecto"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Rejeitar chamadas com mensagem"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Terminar chamada activa"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Colocar chamada em espera"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Terminar chamada em espera"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Terminar todas chamadas"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Terminar chamadas activas (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Terminar chamadas em espera (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Auscultadores"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Destinatário"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Falha ao registar conta"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Col. ch. act. em es."
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Memória insuficiente. Apague alguns itens"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Ter. ch."
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Som"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Serviço não disponível"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Teclado"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "A ligar..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Rejeitado"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "A enviar..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Ocultar teclado"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "GRAV."
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Chamada anónima rejeitada"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Guardado"
+
diff --git a/ui/po/ru_RU.po b/ui/po/ru_RU.po
new file mode 100755 (executable)
index 0000000..728cde0
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Создать сообщение для отклонения вызова"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Список сообщений для отклонения вызова пуст"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Отклонить и отправить сообщение"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Вызовы"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Абонент недоступен"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Вызов завершен"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Вызов отклонен"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Отключено"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Неправильный номер"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "При вызове"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Конференция"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Нет ответа"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Номер изменен"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Номер не существует"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Удержание"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Люди"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Принять"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Доб. вызов"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Контакты"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Завершить"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Гарнитура"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Удержать"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Конф."
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Звук"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Отказ"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Динамик"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Разделить"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Извлечь"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Конференция"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Завершить текущий вызов и ответить"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Удержать текущий вызов и ответить"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Частный"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Системная ошибка"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Все входящие вызовы запрещены"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Все исходящие вызовы\nзапрещены"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Сбой вызова"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Только экстренные вызовы"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "Вызов запрещен"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Вызов запрещен"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Переадресация вызовов: Всегда"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Переадресация вызова: Нет ответа"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Переадресация вызовов: Если недоступен"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Переадресация вызова: Если занято"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Вызов переадресован"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Неверный номер"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Выключите автономный режим для использования сервисов сети"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Вызов..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Сбой отправки. Повторите попытку"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Экстренный вызов"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "Только разрешенные вызовы"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Удержано"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Сбой удержания"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Удержание не поддерживается"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Входящие вызовы запрещены при роуминге"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Не завершено"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Объединено"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Сбой объединения"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Объединение не поддерживается"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Сеть занята"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Сеть недоступна"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Нет средств на счете"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Нет сети"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "Операция отклонена"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Запрет исходящих международных вызовов, кроме домашних"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Исходящие международные\nвызовы запрещены"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Телефон не инициализирован"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 отклонен"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Повторный набор..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Сервис запрещен"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Только экстренный вызов. Для доступа к услугам сети вставьте SIM-карту"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Сбой разделения"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Разделение не поддерживается"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Переключено"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Сбой переключения"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Переключение не поддерживается"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "Переключено на гарнитуру Bluetooth"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Переключено на телефон"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Сбой перевода"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Перевод не поддерживается"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Невозможно извлечь"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Недоступно"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Извлечено"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Извлечение не поддерживается"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Абонент занят"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "Проверьте SIM-карту или вставьте действующую SIM-карту"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Голосовой вызов невозможен во время видеовызова"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Ожидание включено"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Неверная грyппа"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Отклонить и сообщение"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Завершить активный вызов"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Удерживаемый"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Завершить удерживаемый вызов"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Завершить все вызовы"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Завершить активные вызовы (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Завершить удерживаемые вызовы (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Наушники"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Динамик"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Не удается зарегистрировать учетную запись"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Удержать акт. вызов"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Недостаточно памяти. Удалите некоторые элементы"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Заверш."
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Звук"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Услуга недоступна"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Клавиатура"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Подключение..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Отклонено"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Отправка..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Скрыть клавиатуру"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Зап."
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Неизвестный вызов отклонен"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Соxранено"
+
diff --git a/ui/po/tr_TR.po b/ui/po/tr_TR.po
new file mode 100755 (executable)
index 0000000..b6264cb
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "Reddetme mesajı oluştur"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "Reddetme mesajı listesi boş"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "Mesajla reddet"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "Arama"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "Aranan taraf yok"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "Arama sonlandırıldı"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "Arama reddedildi"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "Bağlantı kesildi"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "Geçersiz numara"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "Görüşme"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "Konferans"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "Cevap yok"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "Numara değiştirildi"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "Numara\nyok"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "Beklemede"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "Kişi"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "Kabul et"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "Çağrı ekle"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "Rehber"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "Bitir"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "Kulaklık"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "Beklet"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "Katıl"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "Sessiz"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "Reddet"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "Hoparlör"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "Ayır"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "Bırak"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "Konferans görüşmesi"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "Geçerli aramayı sonlandır ve yanıtla"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "Geçerli aramayı beklet ve yanıtla"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "Özel"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "Sistem hatası"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "Gelen tüm aramalar engellendi"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "Giden tüm aramalar engellendi"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "Arama başarısız"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "Yalnızca acil aramalar"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "İzin yok"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "Arama engellendi"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "Arama yönlendirme etkin: Her zaman"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "Arama yönlendirme etkin: Cevap yokken"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "Arama yönlendirme etkin: Ulaşılamadığında"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "Arama yönlendirme etkin: Meşgulken"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "Arama iletildi"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "Yanlış numara"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "Şebeke hizmetleri için Çevrimdışı profilinden çıkın"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "Aranıyor..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "Gönderim başarısız. Tekrar deneyin"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "Acil arama"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "sadece FDN aramalar"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "Beklemede"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "Tutma başarısız"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "Tutma desteklenmiyor"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "Geçiş yaparken gelen arama engelleme"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "Tamamlanmadı"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "Konferans başlatıldı"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "Katılma başarısız"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "Katılma desteklenmiyor"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "Şebeke meşgul"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "Bağlantı Yok"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "Kredi yok"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "Servis yok"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "İşlem reddedildi"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "Yurt için hariç uluslar arası gideni engelle"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "Giden uluslararası aramalar engellendi"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "Telefon başlatılamadı"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 reddedildi"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "Tekrar aranıyor..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "Servise izin yok"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "Yalnızca acil aramalar. Şebeke servislerine erişmek için SIM kartını takın"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "Ayırma başarısız"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "Ayırma desteklenmiyor"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "Değişti"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "Değişme başarısız"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "Değişme desteklenmiyor"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "BT kulaklığa geçildi"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "Telefona geçildi"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "Transfer başarısız"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "Transfer desteklenmiyor"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "Alınamadı"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "Mevcut değil"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "Alındı"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "Bırakma desteklenmiyor"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "Kullanıcı meşgul"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "SIM’i doğrula veya geçerli SIM tak"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "Görüntülü çağrı sırasında sesli çağrıya izin verilmez"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "Bekletme aktif"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "Yanlış grup"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "Aramayı mesajla reddet"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "Aktif aramayı bitir"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "Aramayı beklet"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "Tutulan aramayı bitir"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "Tüm çağrıları sonlandır"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "Aktif çağrıları sonlandır (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "Tutulan çağrıları sonlandır (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "Kulaklıklar"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "Alıcı"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "Hesap kaydı başarısız"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "Aktif görüşme beklet"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "Yeterli hafıza yok. Bazı öğeleri silin."
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "Bitir"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "Ses"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "Servis Kullanılamıyor"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "Tuşlar"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "Bağlanılıyor..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "Reddedildi"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "Gönderiliyor..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "Tuş takmını gzle"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "Kayıt"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "Bilinmeyen arama reddedildi"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "Kaydedildi"
+
diff --git a/ui/po/zh_CN.po b/ui/po/zh_CN.po
new file mode 100755 (executable)
index 0000000..7f216ad
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "新建拒绝信息"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "拒绝信息列表空"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "带信息拒绝"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "通话"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "被呼叫方不可用"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "已结束通话"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "通话被拒绝"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "已断开"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "数值无效"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "通话中"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "多方通话"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "无应答"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "号码已更改"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "号码不存在"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "保持中"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "人员"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "接受"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "添加呼叫"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "联系人"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "结束"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "耳机"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "保持"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "加入"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "静音"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "拒绝"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "扬声器"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "分开"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "取消保持"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "电话会议"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "结束当前呼叫并应答"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "保持当前电话并应答"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "个人通话"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "系统出错"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "禁止所有来电"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "禁止全部拨出电话"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "通话失败"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "仅限紧急通话"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "禁止通话"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "通话被限制"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "激活呼叫转移:始终"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "激活呼叫转移:无应答"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "激活呼叫转移:无法接通"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "激活呼叫转移:遇忙"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "呼叫已转移"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "错误号码"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "关闭飞行模式以使用网络服务"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "拨号中..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "发送失败。再试"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "紧急呼叫"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "仅限 FDN 呼叫"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "保持"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "通话保持失败"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "通话保持不支持"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "漫游时呼入限制"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "不完整"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "已加入"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "加入失败"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "不支持加入"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "网络繁忙"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "网络无法使用"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "无余额"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "无服务"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "拒绝操作"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "除本国外的国际呼出"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "禁止拨打国际长途"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "手机未初始化"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rejected"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "重新拨号中..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "服务禁止"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "只能打SOS电话.请插入SIM卡以访问网络服务"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "断开失败"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "不支持断开"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "已切换"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "切换失败"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "不支持切换"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "已切换到蓝牙耳机"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "已切换到手机"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "转换失败"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "不支持转换"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "无法取回"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "不适用"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "取消保持"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "取消保持不支持"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "用户繁忙"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "验证SIM卡或插入有效SIM卡"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "视频通话期间不允许进行语音呼叫"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "等待启动"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "错误分组"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "拒接来电并发送短信"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "结束当前通话"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "保持通话"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "结束保持通话"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "结束所有呼叫"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "结束当前通话 (%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "结束保持通话 (%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "耳机"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "听筒"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "注册帐户失败"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "保持通话"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "存储空间不足。请删除部分项目"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "结束通话"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "声音"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "服务无法正常提供"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "键盘"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "连接中..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "被拒绝"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "发送中…"
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "隐藏键盘"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "录音"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "已拒绝未知来电"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "已存储"
+
diff --git a/ui/po/zh_HK.po b/ui/po/zh_HK.po
new file mode 100755 (executable)
index 0000000..04228e0
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "建立拒絕訊息"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "拒絕訊息清單是空的"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "發訊息拒絕"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "通話"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "無法接通對方電話"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "通話已結束"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "通話已拒絕"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "已中斷"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "號碼無效"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "通話中"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "多方"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "無人接聽"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "號碼已更改"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "號碼不存在"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "保留中"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "People"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "接受"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "加入通話"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "聯絡人"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "結束"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "耳機"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "保留"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "加入"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "靜音"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "拒絕"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "揚聲器"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "分割"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "不保留"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "會議通話"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "結束目前通話並接聽"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "保留目前通話並接聽"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "私人"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "系統錯誤"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "已限制全部來電"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "已限制所有撥出電話"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "通話失敗"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "只限緊急通話"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "通話不允許"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "通話已限制"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "轉駁來電:全部轉駁"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "轉駁來電:無人接聽"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "來電轉駁:無法接通"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "來電轉駁:線路繁忙"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "通話已轉駁"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "號碼錯誤"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "由離線設定更改為其他設定以使用網絡服務"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "正在撥號..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "發送失敗。請重試"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "緊急通話"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "只限固定撥號通話"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "已保留"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "保留失敗"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "保留通話不支援"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "漫遊時來電限制"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "未完成"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "已加入"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "加入失敗"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "不支援加入"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "網絡繁忙"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "網絡不可用"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "無剩餘"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "無服務"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "操作已拒絕"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "限制撥出國際電話(本地除外)"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "已限制撥出國際長途電話"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "手機未初始化"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rejected"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "正在重撥..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "服務不允許"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "只限 SOS 通話。 請插入 SIM 卡以存取網絡服務"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "分割失敗"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "不支援分割"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "已切換"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "切換先敗"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "不支援切換"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "切換至藍牙耳機"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "已切換到手機"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "傳送失敗"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "不支援轉駁"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "無法取回"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "不可用"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "取消保留"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "不支援取消保留"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "用戶繁忙"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "確認SIM卡或插入有效SIM卡"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "視像通話進行中不允許撥打語音通話"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "已啟動來電等待"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "錯誤群組"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "發訊息以拒絕來電"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "結束當前通話"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "保留通話"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "結束已保留通話"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "結束全部通話"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "結束啟動中的通話(%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "結束保留通話(%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "耳機"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "聽筒"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "註冊帳戶失敗"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "保留當前通話"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "記憶體不足。請刪除一些項目"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "結束通話"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "聲音"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "無可用服務"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "鍵盤"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "連接中..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "已拒絕"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "正在發送..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "隱藏鍵盤"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "錄音"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "已拒絕不明來電"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "已儲存"
+
diff --git a/ui/po/zh_TW.po b/ui/po/zh_TW.po
new file mode 100755 (executable)
index 0000000..3483c0b
--- /dev/null
@@ -0,0 +1,333 @@
+msgid "IDS_CALL_HEADER_CREATE_REJECT_MESSAGE"
+msgstr "建立拒絕訊息"
+
+msgid "IDS_CALL_POP_REJECT_MESSAGE_LIST_IS_EMPTY"
+msgstr "拒絕郵件清單是空的"
+
+msgid "IDS_VCALL_BUTTON_REJECT_WITH_MESSAGE"
+msgstr "用訊息拒絕"
+
+msgid "IDS_CALL_BODY_CALL"
+msgstr "通話"
+
+msgid "IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE"
+msgstr "無法接通電話"
+
+msgid "IDS_CALL_BODY_CALLENDED"
+msgstr "通話已結束"
+
+msgid "IDS_CALL_BODY_CALL_REJECTED"
+msgstr "通話遭拒"
+
+msgid "IDS_CALL_BODY_DISCONNECTED"
+msgstr "已中斷連線"
+
+msgid "IDS_CALL_BODY_INVALID_NUMBER"
+msgstr "號碼無效"
+
+msgid "IDS_CALL_BODY_IN_CALL"
+msgstr "通話中"
+
+msgid "IDS_CALL_BODY_MPTY"
+msgstr "多方通話"
+
+msgid "IDS_CALL_BODY_NO_ANSWER"
+msgstr "無人接聽"
+
+msgid "IDS_CALL_BODY_NUMBER_CHANGED"
+msgstr "號碼已更改"
+
+msgid "IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST"
+msgstr "號碼不存在"
+
+msgid "IDS_CALL_BODY_ON_HOLD_ABB"
+msgstr "保留"
+
+msgid "IDS_CALL_BODY_PEOPLE"
+msgstr "個聯絡人"
+
+msgid "IDS_CALL_BUTTON_ACCEPT"
+msgstr "接受"
+
+msgid "IDS_CALL_BUTTON_ADD_CALL"
+msgstr "增加電話"
+
+msgid "IDS_CALL_BUTTON_CONTACTS"
+msgstr "聯絡人"
+
+msgid "IDS_CALL_BUTTON_END_M_CALL_BUTTON"
+msgstr "結束"
+
+msgid "IDS_CALL_BUTTON_HEADSET"
+msgstr "耳機"
+
+msgid "IDS_CALL_BUTTON_HOLD"
+msgstr "保留"
+
+msgid "IDS_CALL_BUTTON_JOIN"
+msgstr "加入"
+
+msgid "IDS_CALL_BUTTON_MUTE_ABB"
+msgstr "靜音"
+
+msgid "IDS_CALL_BUTTON_REJECT"
+msgstr "拒絕"
+
+msgid "IDS_CALL_BUTTON_SPEAKER"
+msgstr "揚聲器"
+
+msgid "IDS_CALL_BUTTON_SPLIT"
+msgstr "分割"
+
+msgid "IDS_CALL_BUTTON_UNHOLD"
+msgstr "不保留"
+
+msgid "IDS_CALL_OPT_CONFERENCE_CALL"
+msgstr "電話會議"
+
+msgid "IDS_CALL_OPT_END_CURRENT_CALL_N_ANSWER"
+msgstr "結束目前通話及應答"
+
+msgid "IDS_CALL_OPT_HOLD_CURRENT_CALL_N_ANSWER"
+msgstr "保留目前通話及接聽"
+
+msgid "IDS_CALL_OPT_PRIVATE"
+msgstr "私人"
+
+msgid "IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR"
+msgstr "系統錯誤"
+
+msgid "IDS_CALL_POP_ALL_INCOMING_CALLS_BARRED"
+msgstr "已限制所有來電"
+
+msgid "IDS_CALL_POP_ALL_OUTGOING_CALLS_BARRED"
+msgstr "已阻止所有撥出電話"
+
+msgid "IDS_CALL_POP_CALLFAILED"
+msgstr "通話失敗"
+
+msgid "IDS_CALL_POP_CALLING_EMERG_ONLY"
+msgstr "僅限緊急通話"
+
+msgid "IDS_CALL_POP_CALLNOTCALLOWED"
+msgstr "不允許通話"
+
+msgid "IDS_CALL_POP_CALL_BARRED"
+msgstr "通話受限"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_ALWAYS"
+msgstr "轉移呼叫:永遠"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_NO_ANSWER"
+msgstr "轉移呼叫:無人接聽"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_UNREACHABLE"
+msgstr "轉移呼叫:無法接通"
+
+msgid "IDS_CALL_POP_CALL_DIVERTING_ACTIVE_C_WHEN_BUSY"
+msgstr "轉移呼叫:忙線時"
+
+msgid "IDS_CALL_POP_CALL_IS_DIVERTED"
+msgstr "來電已轉移"
+
+msgid "IDS_CALL_POP_CAUSE_WRONG_NUMBER"
+msgstr "號碼錯誤"
+
+msgid "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL"
+msgstr "由離線更改為其他設定以使用網路服務"
+
+msgid "IDS_CALL_POP_DIALLING"
+msgstr "正在撥號..."
+
+msgid "IDS_CALL_POP_DTMFSENDING_FAIL"
+msgstr "傳送失敗。請重試"
+
+msgid "IDS_CALL_POP_EMERGENCY_CALL"
+msgstr "緊急電話"
+
+msgid "IDS_CALL_POP_FDNCALLONLY"
+msgstr "僅限 FDN 通話"
+
+msgid "IDS_CALL_POP_HELD"
+msgstr "已保留"
+
+msgid "IDS_CALL_POP_HOLD_FAILED"
+msgstr "保留失敗"
+
+msgid "IDS_CALL_POP_HOLD_NOT_SUPPORTED"
+msgstr "不支援保留通話"
+
+msgid "IDS_CALL_POP_INCOMING_CALLS_BARRED_WHEN_ROAMING"
+msgstr "漫遊時限制來電"
+
+msgid "IDS_CALL_POP_INCOMPLETE"
+msgstr "不完整"
+
+msgid "IDS_CALL_POP_JOINED"
+msgstr "已加入"
+
+msgid "IDS_CALL_POP_JOIN_FAILED"
+msgstr "加入失敗"
+
+msgid "IDS_CALL_POP_JOIN_NOT_SUPPORTED"
+msgstr "不支援加入"
+
+msgid "IDS_CALL_POP_NETWORKBUSY"
+msgstr "網路忙碌"
+
+msgid "IDS_CALL_POP_NETWORK_UNAVAILABLE"
+msgstr "無可用網路"
+
+msgid "IDS_CALL_POP_NOCREDITLEFT"
+msgstr "無剩餘點數"
+
+msgid "IDS_CALL_POP_NOSERVICE"
+msgstr "無服務"
+
+msgid "IDS_CALL_POP_OPERATION_REFUSED"
+msgstr "操作遭拒"
+
+msgid "IDS_CALL_POP_OUTGOING_INTERNATIONAL_CALLS_EXCEPT_HOME_BARRED"
+msgstr "限制撥出國際電話(本國除外)"
+
+msgid "IDS_CALL_POP_OUTGOING_INTER_CALLS_BARRED"
+msgstr "已限制撥出國際電話"
+
+msgid "IDS_CALL_POP_PHONE_NOT_INITIALISED"
+msgstr "未初始化手機"
+
+msgid "IDS_CALL_POP_PS_REJECTED"
+msgstr "4422341526 rejected"
+
+msgid "IDS_CALL_POP_REDIALLING"
+msgstr "正在重撥..."
+
+msgid "IDS_CALL_POP_SERVICE_NOT_ALLOWED"
+msgstr "不允許的服務"
+
+msgid "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE"
+msgstr "僅限 SOS 通話。 請插入 SIM 卡以存取網路服務"
+
+msgid "IDS_CALL_POP_SPLIT_FAILED"
+msgstr "分割失敗"
+
+msgid "IDS_CALL_POP_SPLIT_NOT_SUPPORTED"
+msgstr "分割不受支援"
+
+msgid "IDS_CALL_POP_SWAPPED"
+msgstr "已交換"
+
+msgid "IDS_CALL_POP_SWAP_FAILED"
+msgstr "交換失敗"
+
+msgid "IDS_CALL_POP_SWAP_NOT_SUPPORTED"
+msgstr "不支援交換"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_BT_HEADSET"
+msgstr "下載項目中斷。再試一次?"
+
+msgid "IDS_CALL_POP_SWITCHED_TO_PHONE"
+msgstr "已切換到手機"
+
+msgid "IDS_CALL_POP_TRANSFER_FAILED"
+msgstr "傳輸失敗"
+
+msgid "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED"
+msgstr "不支援轉移"
+
+msgid "IDS_CALL_POP_UNABLE_TO_RETRIEVE"
+msgstr "無法擷取"
+
+msgid "IDS_CALL_POP_UNAVAILABLE"
+msgstr "無法使用"
+
+msgid "IDS_CALL_POP_UNHELD"
+msgstr "已取消保留"
+
+msgid "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED"
+msgstr "不支援取消保留"
+
+msgid "IDS_CALL_POP_USER_BUSY"
+msgstr "使用者忙碌"
+
+msgid "IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM"
+msgstr "驗證SIM卡或插入有效SIM卡"
+
+msgid "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL"
+msgstr "視訊通話進行中不允許撥打語音電話"
+
+msgid "IDS_CALL_POP_WAITING_ACTIVE"
+msgstr "已啟動呼叫等待"
+
+msgid "IDS_CALL_POP_WRONG_GROUP"
+msgstr "群組錯誤"
+
+msgid "IDS_CST_BODY_REJECT_CALL_WITH_MESSAGE"
+msgstr "使用訊息拒絕來電"
+
+msgid "IDS_CALL_POP_END_ACTIVE_CALL"
+msgstr "結束當前通話"
+
+msgid "IDS_CALL_OPT_HOLDCALL"
+msgstr "保留通話"
+
+msgid "IDS_CALL_OPT_END_HELD_CALL"
+msgstr "結束已保留通話"
+
+msgid "IDS_CALL_OPT_END_ALL_CALLS"
+msgstr "結束所有通話"
+
+msgid "IDS_CALL_BODY_END_ACTIVE_CALLS_HPD"
+msgstr "結束當前通話(%d)"
+
+msgid "IDS_CALL_BODY_END_HELD_CALLS_HPD"
+msgstr "結束保留的通話(%d)"
+
+msgid "IDS_CALL_BUTTON_HEADPHONES"
+msgstr "耳機"
+
+msgid "IDS_CALL_BUTTON_RECEIVER"
+msgstr "耳機"
+
+msgid "IDS_CALL_BODY_FAILED_TO_REGISTER_ACCOUNT"
+msgstr "註冊帳號失敗"
+
+msgid "IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"
+msgstr "保留當前通話"
+
+msgid "IDS_CALL_POP_NOT_ENOUGH_MEMORY_DELETE_SOME_ITEMS"
+msgstr "記憶體不足。請刪除部分項目"
+
+msgid "IDS_CALL_SK3_END_CALL"
+msgstr "結束通話"
+
+msgid "IDS_MSGC_OPT_SOUND"
+msgstr "聲音"
+
+msgid "IDS_CALL_BODY_SERVICE_UNAVAILABLE"
+msgstr "無法使用服務"
+
+msgid "IDS_CALL_SK3_KEYPAD"
+msgstr "鍵盤"
+
+msgid "IDS_CALL_POP_CONNECTING"
+msgstr "連線中..."
+
+msgid "IDS_CALL_POP_REJECTED"
+msgstr "已拒絕"
+
+msgid "IDS_CALL_POP_SENDING"
+msgstr "正在傳送..."
+
+msgid "IDS_CALL_BUTTON2_HIDE_KEYPAD"
+msgstr "隱藏鍵盤"
+
+msgid "IDS_CALL_SK_REC_ABB"
+msgstr "錄影"
+
+msgid "IDS_CALL_POP_UNKNOWNREJECTED"
+msgstr "已拒接不明來電"
+
+msgid "IDS_CALL_POP_SAVED"
+msgstr "已儲存"
+
diff --git a/ui/themes/call_theme.edc b/ui/themes/call_theme.edc
new file mode 100755 (executable)
index 0000000..dd63238
--- /dev/null
@@ -0,0 +1,8070 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../vcui-view-layout-hd.h"
+
+#define FONT_SLP_Bold "SLP:style=Bold"
+#define FONT_SLP_Medium "SLP:style=Medium"
+#define FONT_SLP_Roman "SLP:style=Roman"
+
+#define BUTTON_STATE_ENABLED 0
+#define BUTTON_STATE_DISABLED 1
+
+#define        SCREEN_TYPE "./hd"
+
+collections {
+////////////// elm/button/base/default -disabled  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_sixbtn_disabled";
+               images {
+                       image: "vc_six_btn_layout_normal.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_six_btn_layout_normal.png";
+                                               border: 9 9 0 0;
+                                               border_scale: 1;
+                                       }
+                                       color: 255 255 255 102; /*40%*/
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       align: 0.5 0.5;
+                                       aspect: 0.5 1.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 0.66;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 0 0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXT;
+                               effect: SOFT_SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       rel1.to_y: "elm.swallow.content";
+                                       rel1.relative: 0.5 1.0;
+                                       rel2.relative: 0.5 1.0;
+                                       color: 255 255 255 51; /*opacity : 20%*/
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Roman;
+                                               size: 36;
+                                               min: 1 1;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "button_image";
+                       action: STATE_SET "visible" 0.0;
+                       target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/default - pressed  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_sixbtn_pressed";
+               images {
+                       image: "vc_six_btn_layout_press.png" COMP;
+                       image: "vc_six_btn_layout_normal.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_six_btn_layout_press.png";
+                                               border: 9 9 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_six_btn_layout_normal.png";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 0.5 1.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 0.66;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 0 0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXT;
+                               effect: SOFT_SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       rel1.to_y: "elm.swallow.content";
+                                       rel1.relative: 0.5 1.0;
+                                       rel2.relative: 0.5 1.0;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Roman;
+                                               size: 36;
+                                               min: 1 1;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "button_image";
+                       action: STATE_SET "visible" 0.0;
+                       target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/default  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_sixbtn";
+               images {
+                       image: "vc_six_btn_layout_normal.png" COMP;
+                       image: "vc_six_btn_layout_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_six_btn_layout_normal.png";
+                                               border: 9 9 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_six_btn_layout_press.png";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 0.5 1.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 0.66;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 0 0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXT;
+                               effect: SOFT_SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       rel1.to_y: "elm.swallow.content";
+                                       rel1.relative: 0.5 1.0;
+                                       rel2.relative: 0.5 1.0;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Roman;
+                                               size: 36;
+                                               min: 1 1;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "button_image";
+                       action: STATE_SET "visible" 0.0;
+                       target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/icon_only/default  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_smallbtn";
+               images {
+                       image: "vc_six_btn_layout_normal.png" COMP;
+                       image: "vc_six_btn_layout_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_six_btn_layout_normal.png";
+                                               border: 9 9 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_six_btn_layout_press.png";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 0.5 1.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 0 0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "button_image";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+               }
+       }
+
+////////////// elm/button/base/icon_only/default  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_smallbtn_pressed";
+               images {
+                       image: "vc_conference_call_btn_normal.png" COMP;
+                       image: "vc_conference_call_btn_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_conference_call_btn_press.png";
+                                               border: 5 5 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_conference_call_btn_normal.png";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               description { state: "default" 0.0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 0.5 1.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 1.0 0.52;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                                       fixed: 0 0;
+                                       visible: 1;
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       rel2.relative: 1.0 0.52;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXT;
+                               effect: SOFT_SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       rel1.to_y: "elm.swallow.content";
+                                       rel1.relative: 0.5 1.0;
+                                       rel2.relative: 0.5 1.0;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Roman;
+                                               size: 20;
+                                               min: 1 1;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                       action: STATE_SET "default" 0.0;
+                       target: "button_image";
+                       action: STATE_SET "visible" 0.0;
+                       target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/icon_only/default  //////////////////////////////////////////////
+       group { name: "elm/button/base/icon_only/style_call_icon_only_private";
+               images {
+                       image: "vc_conference_call_btn_normal.png" COMP;
+                       image: "vc_conference_call_btn_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 120 72;
+                                       max: 120 72;
+                                       image {
+                                               normal: "vc_conference_call_btn_normal.png";
+                                               border: 5 5 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image {
+                                               normal: "vc_conference_call_btn_press.png";
+                                               border: 5 5 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 120 72;
+                                       max: 120 72;
+                                       fixed: 1 1;
+                                       visible: 0;
+                                       rel1 { to: "button_image"; }
+                                       rel2 { to: "button_image"; }
+                                       align: 0.5 0.5;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               rel1.to: "button_image";
+                               rel2.to: "button_image";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       rel1.to: "button_image";
+                                       rel2.to: "button_image";
+                                       color: 0 0 0 0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over1";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over1";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over1";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over2";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: STATE_SET "default" 0.0;
+                               target: "over2";
+                               after: "button_unclick3";
+                       }
+                       program { name: "button_unclick3";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "disabler";
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "disabler";
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+               }
+       }
+
+////////////// elm/button/base/text_only/style_call_small_text_only_red  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_call_small_text_only_red";
+               images {
+                       image: "vc_button_red_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_red_normal.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 36;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/text_only/style_call_text_only_red  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_call_text_only_red";
+               images {
+                       image: "vc_button_red_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_red_normal.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 48;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+
+       ///////////////////////////////////////////////////////////////////////////////////////
+       group { name: "elm/button/base/multiline_text_black";
+               images {
+                       image: "vc_second_mt_btn_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               script {
+                       public button_state = BUTTON_STATE_ENABLED;
+               }
+               styles{
+                       style { name: "btn_multiline_navigationbar_controlbar_style";
+                               base: "font=SLP:style=Medium font_size="48" align=center color=#ffffff wrap=mixed";
+                               tag: "br" "\n";
+                               tag: "ps" "ps";
+                               tag: "tab" "\t";
+                       }
+               }
+               parts {
+                       part { name: "button_image";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 22 46;
+                                       rel1.offset: 0 0;
+                                       rel2.offset: -1 -1;
+                                       image.normal: "vc_second_mt_btn_normal.png";
+                                       image.border: 16 16 0 0;
+                                       color: 255 255 255 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_button_press.png";
+                               }
+                       }
+                       part {
+                               name: "padding_left_top";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 0.0;
+                                       min: 10 2;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "padding_right_bottom";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 1.0 1.0;
+                                       rel1.relative: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                                       min: 10 2;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "icon_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 0;
+                                       fixed: 1 0;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+                                       align: 0.0 0.5;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 22 22;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "padding_after_icon";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+                                       rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+                                       fixed: 1 0;
+                                       min: 0 0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 6 0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "padding_before_text";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 1.0 0.5;
+                                       visible: 0;
+                                       rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+                                       fixed: 1 0;
+                                       min: 6 0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               scale: 1;
+                               clip_to: "clipper";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       align: 0.0 0.5;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+                                       fixed: 1 0;
+                               }
+                               description { state: "visible" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       min: 22 22;
+                                       max: 22 22;
+                                       align: 1.0 0.5;
+                                       rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "icononly" 0.0;
+                                       visible: 1;
+                                       min: 30 30;
+                                       max: 30 30;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXTBLOCK;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clipper";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       text {
+                                               style: "btn_multiline_navigationbar_controlbar_style";
+                                               min: 0 0;
+                                               max: 0 1;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 80 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 0;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part { name: "clipper";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       color: 255 255 255 127;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               after: "text_clicked";
+                       }
+                       program { name: "text_clicked";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "clicked", 0.0);
+                               }
+                       }
+                       program { name: "button_unpress";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (strcmp(st, "icononly")) {
+                                               emit("elm,action,default,text,set", "");
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       }
+                                       if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                                               set_state(PART:"button_image", "default", 0.0);
+                               }
+                               after: button_unpress;
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,clicked,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly")) {
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                               set_state(PART:"icon_rect", "visible", 0.0);
+                                               set_state(PART:"padding_after_icon", "visible", 0.0);
+                                       }
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible")) {
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                               set_state(PART:"icon_rect", "icononly", 0.0);
+                                               set_state(PART:"padding_after_icon", "icononly", 0.0);
+                                       }
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible")) {
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                               set_state(PART:"icon_rect", "visible", 0.0);
+                                               set_state(PART:"padding_after_icon", "visible", 0.0);
+                                       }
+                                       else
+                                       {
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                               set_state(PART:"icon_rect", "icononly", 0.0);
+                                               set_state(PART:"padding_after_icon", "icononly", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "clipper";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       set_int(button_state, BUTTON_STATE_DISABLED);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "clipper";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       set_int(button_state, BUTTON_STATE_ENABLED);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               after: "unfocus_text";
+                       }
+                       program { name: "unfocus_text";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+       ///////////////////////////////////////////////////////////////////////////////////////
+       group { name: "elm/button/base/multiline_text_red";
+               images {
+                       image: "vc_button_red_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               script {
+                       public button_state = BUTTON_STATE_ENABLED;
+               }
+               styles{
+                       style { name: "btn_multiline_navigationbar_controlbar_style2";
+                               base: "font=SLP:style=Medium font_size="48" align=center color=#ffffff wrap=mixed";
+                               tag: "br" "\n";
+                               tag: "ps" "ps";
+                               tag: "tab" "\t";
+                       }
+               }
+               parts {
+                       part { name: "button_image";
+                               type: IMAGE;
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 22 46;
+                                       rel1.offset: 0 0;
+                                       rel2.offset: -1 -1;
+                                       image.normal: "vc_button_red_normal.png";
+                                       image.border: 16 16 0 0;
+                                       color: 255 255 255 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_button_press.png";
+                               }
+                       }
+                       part {
+                               name: "padding_left_top";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 0.0 0.0;
+                                       rel1.relative: 0.0 0.0;
+                                       rel2.relative: 0.0 0.0;
+                                       min: 10 2;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "padding_right_bottom";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 1.0 1.0;
+                                       rel1.relative: 1.0 1.0;
+                                       rel2.relative: 1.0 1.0;
+                                       min: 10 2;
+                                       fixed: 1 1;
+                                       visible: 0;
+                               }
+                       }
+                       part {
+                               name: "icon_rect";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       min: 0 0;
+                                       fixed: 1 0;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+                                       align: 0.0 0.5;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 22 22;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "padding_after_icon";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       align: 0.0 0.0;
+                                       rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+                                       rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+                                       fixed: 1 0;
+                                       min: 0 0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       min: 6 0;
+                               }
+                               description { state: "icononly" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {
+                               name: "padding_before_text";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       align: 1.0 0.5;
+                                       visible: 0;
+                                       rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+                                       fixed: 1 0;
+                                       min: 6 0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               scale: 1;
+                               clip_to: "clipper";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       align: 0.0 0.5;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+                                       fixed: 1 0;
+                               }
+                               description { state: "visible" 0.0;
+                                       fixed: 1 0;
+                                       visible: 1;
+                                       min: 22 22;
+                                       max: 22 22;
+                                       align: 1.0 0.5;
+                                       rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                               description { state: "icononly" 0.0;
+                                       visible: 1;
+                                       min: 30 30;
+                                       max: 30 30;
+                                       rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+                                       align: 0.5 0.5;
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                       }
+                       part { name: "elm.text";
+                               type: TEXTBLOCK;
+                               mouse_events: 0;
+                               scale: 1;
+                               clip_to: "clipper";
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+                                       rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+                                       //max: 150 46;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       text {
+                                               style: "btn_multiline_navigationbar_controlbar_style2";
+                                               min: 0 0;
+                                               max: 0 1;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 80 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 0 0;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part { name: "clipper";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       color: 255 255 255 127;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               after: "text_clicked";
+                       }
+                       program { name: "text_clicked";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.text", "clicked", 0.0);
+                               }
+                       }
+                       program { name: "button_unpress";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (strcmp(st, "icononly")) {
+                                               emit("elm,action,default,text,set", "");
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                       }
+                                       if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                                               set_state(PART:"button_image", "default", 0.0);
+                               }
+                               after: button_unpress;
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,clicked,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly")) {
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                               set_state(PART:"icon_rect", "visible", 0.0);
+                                               set_state(PART:"padding_after_icon", "visible", 0.0);
+                                       }
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible")) {
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                               set_state(PART:"icon_rect", "icononly", 0.0);
+                                               set_state(PART:"padding_after_icon", "icononly", 0.0);
+                                       }
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible")) {
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                               set_state(PART:"icon_rect", "visible", 0.0);
+                                               set_state(PART:"padding_after_icon", "visible", 0.0);
+                                       }
+                                       else
+                                       {
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                                               set_state(PART:"icon_rect", "icononly", 0.0);
+                                               set_state(PART:"padding_after_icon", "icononly", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "clipper";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       set_int(button_state, BUTTON_STATE_DISABLED);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "clipper";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       set_int(button_state, BUTTON_STATE_ENABLED);
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               after: "unfocus_text";
+                       }
+                       program { name: "unfocus_text";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/text_only/title  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_call_text_only_green";
+               images {
+                       image: "vc_btn_green.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_btn_green.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 54;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// HIDE_BUTTON (text_only/title)  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_keypad_hide_button";
+               images {
+                       image: "vc_button_hide_keypad_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_button_hide_keypad_normal.png";
+                                               border: 10 10 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 10 10 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 48;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// HIDE_BUTTON (text_only/title)  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_keypad_end_button";
+               images {
+                       image: "vc_button_red_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       image {
+                                               normal: "vc_button_red_normal.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 48;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+////////////// elm/button/base/icon_only/default  //////////////////////////////////////////////
+       group { name: "elm/button/base/style_call_smallbtn_red";
+               images {
+                       image: "vc_conference_call_btn_red.png" COMP;
+                       image: "vc_conference_call_btn_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 120 72;
+                                       max: 120 72;
+                                       image {
+                                               normal: "vc_conference_call_btn_red.png";
+                                               border: 5 5 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_conference_call_btn_press.png";
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "elm.swallow.content";
+                               type: SWALLOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 120 72;
+                                       max: 120 72;
+                                       fixed: 1 1;
+                                       visible: 1;
+                                       rel1 { to: "button_image"; }
+                                       rel2 { to: "button_image"; }
+                                       align: 0.5 0.5;
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       aspect: 1.0 1.0;
+                                       aspect_preference: VERTICAL;
+                               }
+                       }
+                       part { name: "over2";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               type: RECT;
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 0 0 0 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                               description { state: "default" 0.0;
+                                       visible: 0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "clicked")) {
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "icononly"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                               }
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_show";
+                               signal: "elm,state,icon,visible";
+                               source: "elm";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.swallow.content", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                               set_state(PART:"elm.swallow.content", "visible", 0.0);
+                                       else
+                                               set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                               }
+                       }
+                       program { name: "icon_hide";
+                               signal: "elm,state,icon,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.swallow.content";
+                       }
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over2";
+                               target: "disabler";
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                       }
+               }
+       }
+
+////////////////////////////////////////////////////
+///////// multicall-list genlist ///////////
+#define BEAT_GENLIST_PART_BASE( param_item_height ) \
+               part { name: "base"; \
+                       type: RECT; \
+                       repeat_events: 1; \
+                       scale: 1; \
+                       description { state: "default" 0.0; \
+                               min: 0 param_item_height; \
+                               color: 0 0 0 24; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_BG \
+               part { name: "bg"; \
+                       type: RECT; \
+                       clip_to: "disclip"; \
+                       mouse_events: 0; \
+                       description { state: "default" 0.0; \
+                               color: 0 0 0 24; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_BG_IMAGE \
+               part { name: "bg_image"; \
+                       clip_to: "disclip"; \
+                       mouse_events: 0; \
+                       description { state: "default" 0.0; \
+                               visible: 0; \
+                               image.normal: "vc_conf_call_list_bg.png"; \
+                       } \
+                       description { state: "selected" 0.0; \
+                               inherit: "default" 0.0; \
+                               visible: 1; \
+                       } \
+               }
+
+#define GENLIST_PART_BG_IMAGE \
+               part { name: "bg_image"; \
+                       type: RECT; \
+                       clip_to: "disclip"; \
+                       mouse_events: 0; \
+                       description { state: "default" 0.0; \
+                               color: 199 185 164 0; \
+                       } \
+                       description { state: "selected" 0.0; \
+                               inherit: "default" 0.0; \
+                               color: 199 185 164 255; \
+                       } \
+               }
+
+#define GENLIST_PART_BG_IMAGE_NO_SELECT \
+               part { name: "bg_image"; \
+                       type: RECT; \
+                       clip_to: "disclip"; \
+                       mouse_events: 0; \
+                       description { state: "default" 0.0; \
+                               color: 199 185 164 0; \
+                       } \
+                       description { state: "selected" 0.0; \
+                               inherit: "default" 0.0; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_BOTTOM_LINE \
+               part { name: "bottom_line"; \
+                       type: RECT; \
+                       clip_to: "disclip"; \
+                       mouse_events: 0; \
+                       description { state: "default" 0.0; \
+                               min: 0 1; \
+                               fixed: 0 1; \
+                               visible: 1; \
+                               color: 0 0 0 24; \
+                               rel1 { \
+                                       relative: 0.0 1.0; \
+                                       offset: 0 -1; \
+                               } \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_PADDING_LEFT( param_padding_size ) \
+               part { name: "elm.padding.left"; \
+                       type: RECT; \
+                       scale: 1; \
+                       description { \
+                               state: "default" 0.0; \
+                               min: param_padding_size 0; \
+                               fixed: 1 0; \
+                               visible: 0; \
+                               rel2.relative: 0.0 1.0; \
+                               align: 0.0 0.0; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_PADDING_RIGHT( param_padding_size ) \
+               part { name: "elm.padding.right"; \
+                       type: RECT; \
+                       scale: 1; \
+                       description { state: "default" 0.0; \
+                               min: param_padding_size 0; \
+                               fixed: 1 0; \
+                               visible: 0; \
+                               rel1.relative: 1.0 0.0; \
+                               align: 1.0 0.0; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_DISCLIP \
+               part { name: "disclip"; \
+                       type: RECT; \
+                       description { state: "default" 0.0; \
+                       } \
+                       description { state: "disabled" 0.0; \
+                               inherit: "default" 0.0; \
+                               color: 255 255 255 64; \
+                       } \
+               }
+
+#define BEAT_GENLIST_PART_DIALOGUE_ITEM \
+               part { name: "elm.rect.dialogue"; \
+                       type: RECT; \
+                       scale: 1; \
+                       description { state: "default" 0.0; \
+                               min: 16 0; \
+                               fixed: 1 0; \
+                               color: 199 199 199 255; \
+                               rel2.relative: 0.0 1.0; \
+                               align: 0.0 0.0; \
+                       } \
+               }
+
+#define GENLIST_GROUP_PART_BASE_EVENT_INC \
+               part { name: "base_event";\
+                       type: RECT;\
+                       repeat_events: 0;\
+                       description { state: "default" 0.0;\
+                               color: 0 0 0 0;\
+                       }\
+               }
+
+#define GENLIST_PADDING_10_INC 16
+#define GENLIST_HEIGHT_31_INC 49
+#define GENLIST_SIZE_30_INC 48
+#define GENLIST_FONT_20_INC 32
+#define GENLIST_GROUP_BG_COLOR_DEFAULT_INC 0 0 0 120
+#define GENLIST_GROUP_BG_COLOR_ALPHA_OFF_INC 15 15 15 255
+#define GENLIST_GROUP_PART_BASE_IMAGE_INC
+#define GENLIST_GROUP_PART_TEXT_COLOR_INC 255 255 255 255
+
+       group {
+               name: "elm/genlist/item/call/grouptitle/default";
+               alias: "elm/genlist/item_odd/call/grouptitle/default";
+               alias: "elm/genlist/item_compress/call/grouptitle/default";
+               alias: "elm/genlist/item_compress_odd/call/grouptitle/default";
+
+               data.item: "stacking" "above";
+               data.item: "selectraise" "on";
+               data.item: "texts" "elm.text";
+               data.item: "treesize" "GENLIST_TREESIZE_20_INC";
+               parts {
+                       GENLIST_GROUP_PART_BASE_EVENT_INC
+                       BEAT_GENLIST_PART_PADDING_LEFT( GENLIST_PADDING_10_INC )
+                       BEAT_GENLIST_PART_PADDING_RIGHT( GENLIST_PADDING_10_INC )
+                       part { name: "rect";
+                               type: RECT;
+                               repeat_events: 1;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 GENLIST_HEIGHT_31_INC;
+                                       color: GENLIST_GROUP_BG_COLOR_DEFAULT_INC;
+                               }
+                               description { state: "alpha_off" 0.0;
+                                       min: 0 GENLIST_SIZE_30_INC;
+                                       color: GENLIST_GROUP_BG_COLOR_ALPHA_OFF_INC;
+                               }
+                       }
+                       GENLIST_GROUP_PART_BASE_IMAGE_INC
+
+                       part { name: "elm.text";
+                               type: TEXT;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       align: 0.0 0.5;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to_x: "elm.padding.left";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 1.0;
+                                               offset: 0 0;
+                                               to_x: "elm.padding.right";
+                                       }
+                                       color: GENLIST_GROUP_PART_TEXT_COLOR_INC;
+                                       text {
+                                               font: "SLP:style=Medium";
+                                               size: GENLIST_FONT_20_INC;
+                                               min: 1 1;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                       }
+               }
+               program {
+                       name: "enable_alpha";
+                       signal: "elm,state,alpha,enable";
+                       source: "elm";
+                       action: STATE_SET "default" 0.0;
+                       target: "rect";
+               }
+               program {
+                       name: "disable_alpha";
+                       signal: "elm,state,alpha,disable";
+                       source: "elm";
+                       action: STATE_SET "alpha_off" 0.0;
+                       target: "rect";
+               }
+               program {
+                       name: "selected";
+                       source: "rect";
+                       signal: "mouse,clicked,1";
+                       action: SIGNAL_EMIT "elm,title_action,item,click" "elm";
+               }
+       }
+
+       group { name: "elm/genlist/item/multicall_list/default";
+               alias: "elm/genlist/item_odd/multicall_list/default";
+               alias: "elm/genlist/item_compress/multicall_list/default";
+               alias: "elm/genlist/item_compress_odd/multicall_list/default";
+
+                       data.item: "stacking" "above";
+                       data.item: "selectraise" "on";
+                       data.item: "texts" "elm.text";
+                       data.item: "contents" "elm.swallow.end elm.swallow.private";
+                       data.item: "treesize" "20";
+
+                       images {
+                               image: "vc_conf_call_list_bg.png" COMP;
+                       }
+
+                       parts {
+                               BEAT_GENLIST_PART_BASE( 112 )
+                               BEAT_GENLIST_PART_BG
+                               GENLIST_PART_BG_IMAGE_NO_SELECT
+                               BEAT_GENLIST_PART_BOTTOM_LINE
+                               BEAT_GENLIST_PART_PADDING_LEFT( 32 )
+                               BEAT_GENLIST_PART_PADDING_RIGHT( 16 )
+                               BEAT_GENLIST_PART_DIALOGUE_ITEM
+
+                               part { name: "elm.swallow.end";
+                                       type: SWALLOW;
+                                       scale: 1;
+                                       description { state: "default" 0.0;
+                                               fixed: 1 0;
+                                               align: 1.0 0.5;
+                                               rel1.to_x: "elm.padding.right";
+                                               rel2 {
+                                                       relative: 0.0 1.0;
+                                                       to_x: "elm.padding.right";
+                                               }
+                                       }
+                               }
+
+                               part { name: "elm.padding.end.left";
+                                       type: RECT;
+                                       scale: 1;
+                                       description { state: "default" 0.0;
+                                               min: 16 0;
+                                               fixed: 1 0;
+                                               visible: 0;
+                                               rel1.to_x: "elm.swallow.end";
+                                               rel2 {
+                                                       relative: 0.0 1.0;
+                                                       to_x: "elm.swallow.end";
+                                               }
+                                               align: 1.0 0.0;
+                                       }
+                               }
+
+                               part { name: "elm.swallow.private";
+                                       type: SWALLOW;
+                                       scale: 1;
+                                       description { state: "default" 0.0;
+                                               fixed: 1 0;
+                                               align: 1.0 0.5;
+                                               rel1.to_x: "elm.padding.end.left";
+                                               rel2 {
+                                                       relative: 0.0 1.0;
+                                                       to_x: "elm.padding.end.left";
+                                               }
+                                       }
+                               }
+
+                               part { name: "elm.padding.private.left";
+                                       type: RECT;
+                                       scale: 1;
+                                       description { state: "default" 0.0;
+                                               min: 16 0;
+                                               fixed: 1 0;
+                                               visible: 0;
+                                               rel1.to_x: "elm.swallow.private";
+                                               rel2 {
+                                                       relative: 0.0 1.0;
+                                                       to_x: "elm.swallow.private";
+                                               }
+                                               align: 1.0 0.0;
+                                       }
+                               }
+
+                      part { name: "elm.text";
+                               clip_to: "disclip";
+                               type: TEXT;
+                               mouse_events: 0;
+                               scale: 1;
+                              description { state: "default" 0.0;
+                                      rel1 {
+                                               relative: 1.0  0.0;
+                                               offset: 0 0;
+                                               to_x: "elm.padding.left";
+                                      }
+                                      rel2 {
+                                               relative: 0.0  1.0;
+                                               to_x: "elm.padding.private.left";
+                                      }
+                                       color: 255 255 255 255;
+                                      text {
+                                               font: FONT_SLP_Roman;
+                                               size: 44;
+                                               min: 0 1;
+                                               align: 0.0 0.5;
+                                      }
+                               }
+                              description { state: "selected" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 255 255 255 255; //225 225 225 255;
+                              }
+                       }
+
+                       BEAT_GENLIST_PART_DISCLIP
+              }
+              programs {
+                      program { name: "go_active";
+                               signal: "elm,state,selected";
+                               source: "elm";
+                               action: STATE_SET "selected" 0.0;
+                               target: "bg_image";
+                               target: "elm.text";
+                      }
+                      program { name: "go_passive";
+                               signal: "elm,state,unselected";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "bg_image";
+                               target: "elm.text";
+                               transition: LINEAR 0.1;
+                      }
+                      program { name: "go_disabled";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "disclip";
+                      }
+                      program { name: "go_enabled";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "disclip";
+                      }
+               }
+       }
+
+#define BEAT_GENLIST_PART_PADDING_TOP( param_padding_size ) \
+       part { name: "elm.padding.top"; \
+            type: RECT; \
+            scale: 1; \
+            description { \
+               state: "default" 0.0; \
+               min: 0 param_padding_size; \
+               fixed: 0 1; \
+               visible: 0; \
+               rel2.relative: 1.0 0.0; \
+               align: 0.0 0.0; \
+            } \
+         }
+
+#define BEAT_GENLIST_PART_PADDING_BOTTOM( param_padding_size ) \
+       part { name: "elm.padding.bottom"; \
+            type: RECT; \
+            scale: 1; \
+            description { \
+               state: "default" 0.0; \
+               min: 0 param_padding_size; \
+               fixed: 0 1; \
+               visible: 0; \
+               rel1.relative: 0.0 1.0; \
+               align: 0.0 1.0; \
+            } \
+         }
+
+       ////////////// elm/button/base/text_only/title  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_call_text_only_red_disabled";
+               images {
+                       image: "vc_button_red_normal.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_red_normal.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                                       color: 255 255 255 102;
+                               }
+                               description { state: "clicked" 0.0;
+                                       min: 100 50;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 51;  /*20%*/
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 48;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+
+   /////navigation frame/////
+#define VC_NAVIFRAME_TITLE_H_INC 100
+#define VC_NAVIFRAME_OH_CLOSED_H_INC 8
+#define VC_NAVIFRAME_OH_OPENED_H_INC 106
+#define VC_NAVIFRAME_OH_CONTENT_H_INC 74
+#define VC_NAVIFRAME_OH_PADDING_INC 16
+#define VC_NAVIFRAME_OH_OPENED_DOUBLE_H_INC 196
+#define VC_NAVIFRAME_INDICATOR_W_INC 128
+#define VC_NAVIFRAME_PADDING_EXPANDED_INC 141
+#define VC_NAVIFRAME_TITLE_FONT_SIZE_INC 36
+#define VC_NAVIFRAME_ICON_SIZE_INC 32 32
+#define VC_NAVIFRAME_ICON_PADDING_INC 16 0
+#define VC_NAVIFRAME_OH_ARROW_SIZE_INC 19 14
+#define VC_NAVIFRAME_TITLE_TEXT_COLOR_INC 255 255 255 255
+#define VC_NAVIFRAME_TITLE_BG_COLOR_INC 0 0 0 0
+#define VC_NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC 0 0 0 0
+#define VC_NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC 0 0 0 255
+
+#define VC_NAVIFRAME_NEW_TITLE_BG_COLOR_INC 0 0 0 102
+#define VC_NAVIFRAME_BOTTOM_H_INC 114
+#define VC_NAVIFRAME_PREV_BTN_LPAD 44
+#define VC_NAVIFRAME_NEW_ICON_SIZE_INC 56 56
+
+#define BUTTON_STATE_ENABLED  0
+#define BUTTON_STATE_DISABLED 1
+
+   group { name: "elm/naviframe/item/basic/vcui_naviframe/default";
+          alias:"elm/naviframe/item/vcui_naviframe_item_1line/default";
+      images {
+             image: "vc_reject_with_msg_control_top_arrow.png" COMP;
+             image: "vc_reject_with_msg_control_top_bg.png" COMP;
+      }
+      script {
+         public oh_show = 0;
+         public oh_close = 0;
+      }
+      parts {
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "optionheader_clip";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_OH_CLOSED_H_INC;
+               align: 0.5 0;
+               fixed: 0 1;
+               rel1.to_x: "elm.swallow.content";
+               rel1.to_y: "title_clip";
+               rel1.relative: 0 1;
+               rel2.to_x: "elm.swallow.content";
+               rel2.to_y: "title_clip";
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               min: 1 VC_NAVIFRAME_OH_OPENED_H_INC;
+            }
+         }
+         part { name: "optionheader_bg";
+            type: IMAGE;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               rel1 { to: "optionheader_clip"; }
+               rel2 { to: "optionheader_clip"; }
+               image { normal: "vc_reject_with_msg_control_top_bg.png";
+                  border: 0 0 1 0;
+               }
+            }
+         }
+         part { name: "elm.swallow.optionheader.top.padding";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 0.0; to: "optionheader_bg"; }
+               rel2 { relative: 1.0 0.0; to: "optionheader_bg"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "elm.swallow.optionheader";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_OH_CONTENT_H_INC;
+               rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader.top.padding"; }
+               rel2 { relative: 1.0 1.0; to: "elm.swallow.optionheader.top.padding"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "elm.swallow.optionheader.bottom.padding";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "optionheader_clip";
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_OH_PADDING_INC;
+               rel1 { relative: 0.0 1.0; to: "elm.swallow.optionheader"; }
+               fixed: 0 1;
+               align: 0.0 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "content_clip";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               rel1.to_y: "optionheader_bg";
+               rel1.relative: 0 1;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            repeat_events: 0;
+            clip_to: "content_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 1.0;
+               rel1.to_y: "optionheader_bg";
+               rel2.relative: 1.0 1.0;
+            }
+           description { state: "left" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: -1.0 1.0;
+               rel2.relative: 0.0 1.0;
+            }
+            description { state: "right" 0.0;
+               inherit: "default" 0.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 2.0 1.0;
+            }
+         }
+         part { name: "title_base";
+            type: RECT;
+            clip_to: "title_clip";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_TITLE_H_INC;
+               align: 0.5 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+               color: VC_NAVIFRAME_TITLE_BG_COLOR_INC;
+            }
+         }
+         part { name: "elm.rect.pada";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: VC_NAVIFRAME_INDICATOR_W_INC 0;
+               fixed: 1 0;
+               align: 0.0 0.5;
+               rel1 { relative: 0.0 0.0; to: "title_base"; }
+               rel2 { relative: 0.0 1.0; to: "title_base"; }
+               visible: 0;
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               min: VC_NAVIFRAME_PADDING_EXPANDED_INC 0;
+            }
+         }
+         part { name: "separator_1";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0;
+               min: 1 0;
+               rel1 { relative: 0.0 0.2; to:"elm.rect.padb"; to: "title_base"; }
+               rel2 { relative: 0.0 0.8; to:"elm.rect.padb"; to: "title_base"; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part { name: "separator_2";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0;
+               min: 1 0;
+               rel1 { relative: 0.0 0.0; to: "separator_1"; to: "title_base"; }
+               rel2 { relative: 0.0 1.0; to: "separator_1"; to: "title_base"; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part { name: "elm.rect.padb";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               min: VC_NAVIFRAME_INDICATOR_W_INC 0;
+               fixed: 1 0;
+               align: 1.0 0.5;
+               rel1 { relative: 1.0 0.0; to: "title_base"; }
+               rel2 { relative: 1.0 1.0; to: "title_base"; }
+               visible: 0;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  size: VC_NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: VC_NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               rel1.to: "title_base";
+               rel2.to: "title_base";
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             description { state: "default" 0.0;
+                rel1 { to: "title_base"; }
+                rel2 { to: "elm.rect.padb"; relative: 0.0 1.0; }
+             }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 0 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "title_base"; }
+               rel2 { relative: 0.0 1.0; to: "title_base"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               max: VC_NAVIFRAME_ICON_SIZE_INC;
+               rel1 { relative: 0.0 0.0; to_x: "padding_before_text"; }
+               rel2 { relative: 0.0 1.0; to_x: "padding_before_text"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "elm.text.title"; }
+               rel2 { relative: 0.0 1.0; to_x: "elm.text.title"; }
+               fixed: 1 0;
+               min: VC_NAVIFRAME_ICON_PADDING_INC;
+               visible: 0;
+            }
+         }
+         part { name: "optionheader_arrow";
+            type: IMAGE;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: VC_NAVIFRAME_OH_ARROW_SIZE_INC;
+               max: VC_NAVIFRAME_OH_ARROW_SIZE_INC;
+               fixed: 1 1;
+               align: 0.5 1;
+               visible: 0;
+               rel1.to_y: "optionheader_bg";
+               rel1.offset: 0 1;
+               rel2.relative: 1 0;
+               rel2.to_y: "optionheader_bg";
+               rel2.offset: -1 0;
+               image {
+                  normal: "vc_reject_with_msg_control_top_arrow.png";
+               }
+            }
+            description { state: "show" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "content_new_pusehd";
+            signal: "elm,state,new,pushed,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "show_finished";
+         }
+         program { name: "content_cur_pusehd";
+            signal: "elm,state,cur,pushed,internal";
+            source: "";
+            action: STATE_SET "left" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "pushed_finished";
+         }
+         program { name: "content_prev_popped";
+            signal: "elm,state,prev,popped,internal";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "show_finished";
+         }
+         program { name: "content_cur_popped";
+            signal: "elm,state,cur,popped,internal";
+            source: "";
+            action: STATE_SET "right" 0.0;
+            target: "elm.swallow.content";
+            transition: DECELERATE 0.5;
+            after: "popped_finished";
+         }
+         program { name: "cur_pushed";
+            signal: "elm,state,cur,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"elm.swallow.content", "default", 0.0);
+               emit("elm,state,cur,pushed,internal", "");
+            }
+         }
+         program { name: "new_pushed";
+            signal: "elm,state,new,pushed";
+            source: "elm";
+            script {
+               set_state(PART:"elm.swallow.content", "right", 0.0);
+               emit("elm,state,new,pushed,internal", "");
+            }
+         }
+         program { name: "prev_popped";
+            signal: "elm,state,prev,popped";
+            source: "elm";
+            script {
+               set_state(PART:"elm.swallow.content", "left", 0.0);
+               emit("elm,state,prev,popped,internal", "");
+            }
+         }
+         program { name: "cur_popped";
+            signal: "elm,state,cur,popped";
+            source: "elm";
+            script {
+               set_state(PART:"elm.swallow.content", "default", 0.0);
+               emit("elm,state,cur,popped,internal", "");
+            }
+         }
+         program { name: "visible";
+            signal: "elm,state,visible";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "title_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+         }
+         program { name: "optionheader_show";
+            signal: "elm,state,elm.swallow.optionheader,show";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_clip", "show", 0.0);
+               set_state(PART:"optionheader_arrow", "show", 0.0);
+               set_state(PART:"elm.swallow.optionheader", "show", 0.0);
+               set_int(oh_show, 1);
+               emit("elm,state,optionheader_arrow,show", "");
+            }
+         }
+         program { name: "optionheader_hide";
+            signal: "elm,state,elm.swallow.optionheader,hide";
+            source: "elm";
+            script {
+               set_state(PART:"optionheader_clip", "default", 0.0);
+               set_state(PART:"optionheader_arrow", "default", 0.0);
+               set_state(PART:"elm.swallow.optionheader", "default", 0.0);
+               set_int(oh_show, 0);
+            }
+         }
+         program { name: "optionheader_open";
+            signal: "elm,state,optionheader,open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_clip";
+            target: "elm.swallow.optionheader";
+            transition: LINEAR 0.2;
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_close";
+            signal: "elm,state,optionheader,close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_clip";
+            target: "elm.swallow.optionheader";
+            transition: LINEAR 0.2;
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_instant_open";
+            signal: "elm,state,optionheader,instant_open";
+            source: "";
+            action: STATE_SET "show" 0.0;
+            target: "optionheader_clip";
+            target: "elm.swallow.optionheader";
+            after: "optionheader_open_set";
+         }
+         program { name: "optionheader_instant_close";
+            signal: "elm,state,optionheader,instant_close";
+            source: "";
+            action: STATE_SET "default" 0.0;
+            target: "optionheader_clip";
+            target: "elm.swallow.optionheader";
+            after: "optionheader_close_set";
+         }
+         program { name: "optionheader_close_set";
+            signal: "elm,state,optionheader,close_set";
+            source: "";
+            script {
+               set_int(oh_close, 1);
+            }
+         }
+         program { name: "optionheader_open_set";
+            signal: "elm,state,optionheader,open_set";
+            source: "";
+            script {
+               set_int(oh_close, 0);
+            }
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program { name: "title_clicked_signal";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            script {
+               if (get_int(oh_show) == 1) {
+                  if (get_int(oh_close) == 1) {
+                     emit("elm,state,optionheader,open", "");
+                  }else {
+                     emit("elm,state,optionheader,close", "");
+                  }
+               }
+            }
+            after: "title_clicked_signal";
+         }
+      }
+   }
+
+   group { name: "elm/naviframe/item/basic/vcui_naviframe_new/default";
+          alias:"elm/naviframe/item/vcui_naviframe_new_item_1line/default";
+      parts {
+         part { name: "title_clip";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_TITLE_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "title_base";
+            type: RECT;
+            clip_to: "title_clip";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_TITLE_H_INC;
+               align: 0.5 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; }
+               rel2 { relative: 1.0 0.0; }
+               color: VC_NAVIFRAME_NEW_TITLE_BG_COLOR_INC;
+            }
+         }
+         part { name: "elm.text.title";
+            type: TEXT;
+            scale: 1;
+            clip_to: "title_clip";
+            description { state: "default" 0.0;
+               text { font: "SLP:style=Medium";
+                  size: VC_NAVIFRAME_TITLE_FONT_SIZE_INC;
+                  min: 0 0;
+                  max: 1 0;
+                  align: 0.5 0.5;
+               }
+               color: VC_NAVIFRAME_TITLE_TEXT_COLOR_INC;
+               align: 0.5 0.5;
+               rel1.to: "title_base";
+               rel2.to: "title_base";
+            }
+         }
+         part { name: "click_event_area";
+             ignore_flags: ON_HOLD;
+             description { state: "default" 0.0;
+                rel1 { to: "title_base"; }
+                rel2 { to: "title_base"; }
+             }
+         }
+          part { name: "bottom_clip";
+            type: RECT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_BOTTOM_H_INC;
+               align: 0.0 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 (1166/1280); }
+               rel2 { relative: 1.0 1.0; }
+            }
+            description { state: "hide" 0.0;
+               inherit: "default" 0.0;
+               min: 0 0;
+               max: 0 0;
+               fixed: 1 1;
+            }
+         }
+         part { name: "bottom_base";
+            type: RECT;
+            clip_to: "bottom_clip";
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 1 VC_NAVIFRAME_BOTTOM_H_INC;
+               align: 0.5 0.0;
+               fixed: 0 1;
+               rel1 { relative: 0.0 0.0; to: "bottom_clip"; }
+               rel2 { relative: 1.0 1.0; to: "bottom_clip"; }
+               color: VC_NAVIFRAME_NEW_TITLE_BG_COLOR_INC;
+            }
+         }
+         part { name: "elm.swallow.prev_btn";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "bottom_clip";
+            description { state: "default" 0.0;
+               align: 0.0 0.5;
+               fixed: 1 1;
+               rel1 { relative: 0.0 0.0; to: "bottom_base"; }
+               rel2 { relative: 0.0 1.0; to: "bottom_base"; }
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "bottom_clip";
+            description { state: "default" 0.0;
+               max: VC_NAVIFRAME_NEW_ICON_SIZE_INC;
+               rel1 { relative: 0.0 0.0; to_x: "padding_before_prevbtn"; }
+               rel2 { relative: 0.0 1.0; to_x: "padding_before_prevbtn"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 1.0 0.5;
+            }
+         }
+         part { name: "padding_before_prevbtn";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            clip_to: "bottom_clip";
+            description { state: "default" 0.0;
+               min: VC_NAVIFRAME_PREV_BTN_LPAD 0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 0.0; to_x: "bottom_clip"; }
+               rel2 { relative: 0.0 1.0; to_x: "bottom_clip"; }
+               fixed: 1 0;
+               visible: 0;
+            }
+         }
+      }
+      programs {
+         program { name: "title_show";
+            signal: "elm,state,title,show";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "title_clip";
+            target: "bottom_clip";
+         }
+         program { name: "title_hide";
+            signal: "elm,state,title,hide";
+            source: "elm";
+            action: STATE_SET "hide" 0.0;
+            target: "title_clip";
+            target: "bottom_clip";
+         }
+         program { name: "show_finished";
+            action: SIGNAL_EMIT "elm,action,show,finished" "";
+         }
+         program { name: "pushed_finished";
+            action: SIGNAL_EMIT "elm,action,pushed,finished" "";
+         }
+         program { name: "popped_finished";
+            action: SIGNAL_EMIT "elm,action,popped,finished" "";
+         }
+         program { name: "title_clicked_signal";
+            action: SIGNAL_EMIT "elm,action,title,clicked" "";
+         }
+         program {
+            name: "title_clicked";
+            signal: "mouse,clicked,1";
+            source: "click_event_area";
+            after: "title_clicked_signal";
+         }
+      }
+   }
+
+   group { name: "elm/button/base/vcui_naviframe_control/left";
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      images.image: "vc_reject_with_msg_option_header_bt_press.png" COMP;
+      parts {
+         part { name: "button_image";
+            type: IMAGE;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 20;
+               color: 0 0 0 0;
+               rel1.offset: 0 0;
+               rel2.offset: -1 -1;
+               color: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "vc_reject_with_msg_option_header_bt_press.png";
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 22 22;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 6 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 6 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            clip_to: "disabler";
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 22 22;
+               max: 22 22;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 30 30;
+               max: 30 30;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            clip_to: "disabler";
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 255 255 255 255;
+               text {
+                  font: FONT_SLP_Medium;
+                  size: 32;
+                  min: 0 0;
+                  align: 0.0 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               color: 255 255 255 255;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 255 255 255 255;
+            }
+            description { state: "disabled" 0.0;
+               color: 255 255 255 127;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_click2";
+            signal: "mouse,down,1";
+            source: "over3";
+            action: STATE_SET "clicked" 0.0;
+            target: "over3";
+         }
+         program { name: "button_unclick2";
+            signal: "mouse,clicked,1";
+            source: "over3";
+            action: STATE_SET "default" 0.0;
+            target: "over3";
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "over2";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_DISABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "over2";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               set_int(button_state, BUTTON_STATE_ENABLED);
+               set_state(PART:"elm.text", "visible", 0.0);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+   group { name: "elm/button/base/vcui_naviframe_backbutton/default";
+       //TODO: Remove this alias later
+       alias: "elm/button/base/vcui_naviframe_backbutton/default";
+       images {
+         image: "vc_control_btn_prev.png" COMP;
+      }
+      parts {
+         part { name: "button_image";
+            type: RECT;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 106 40;
+               color: 0 0 0 0;
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {name: "padding_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 1 0.2; }
+               rel2 { relative: 1 0.8; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part {name: "padding_before_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 0 0; to: "padding_right"; }
+               rel2 { relative: 0 1; to: "padding_right"; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part { name: "button_center_part";
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 36 32;
+               max: 36 32;
+               align: 0.5 0.5;
+               rel2 { relative: 0 1; to_x: "padding_before_right"; }
+               image {
+                  normal: "vc_control_btn_prev.png";
+               }
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "over1";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick";
+            signal: "mouse,up,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program { name: "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick2";
+            signal: "mouse,clicked,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+      }
+   }
+
+   group { name: "elm/button/base/vcui_naviframe_new_backbutton/default";
+       //TODO: Remove this alias later
+       alias: "elm/button/base/vcui_naviframe_new_backbutton/default";
+       images {
+         image: "vc_control_btn_new_prev.png" COMP;
+      }
+      parts {
+         part { name: "button_image";
+            type: RECT;
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 100 114;
+               color: 0 0 0 0;
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+            description {
+               state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {name: "padding_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 1 0.2; }
+               rel2 { relative: 1 0.8; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_RIGHT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part {name: "padding_before_right";
+            type: RECT;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1 0;
+               min: 1 0;
+               rel1 { relative: 0 0; to: "padding_right"; }
+               rel2 { relative: 0 1; to: "padding_right"; }
+               fixed: 1 0;
+               color: VC_NAVIFRAME_TITLE_LEFT_SEPARATOR_COLOR_INC;
+            }
+         }
+         part { name: "button_center_part";
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: VC_NAVIFRAME_NEW_ICON_SIZE_INC;
+               max: VC_NAVIFRAME_NEW_ICON_SIZE_INC;
+               align: 0.5 0.5;
+               rel2 { relative: 0 1; to_x: "padding_before_right"; }
+               image {
+                  normal: "vc_control_btn_new_prev.png";
+               }
+            }
+            description {
+               state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part { name: "over1";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over2";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick";
+            signal: "mouse,up,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+            after: "button_unclick_anim";
+         }
+         program { name: "button_unclick_anim";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "button_center_part";
+         }
+         program { name: "button_unclick2";
+            signal: "mouse,clicked,1";
+            source: "over1";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "disabler";
+            target: "button_image";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/style_call_lscape_join";
+      images {
+                       image: "vc_six_btn_layout_normal.png" COMP;
+                       image: "vc_six_btn_layout_press.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 46;
+               image {
+                  normal: "vc_six_btn_layout_normal.png";
+                  border: 9 9 0 0;
+                  border_scale: 1;
+               }
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "vc_six_btn_layout_press.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0; //when only icon or no icon is there
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 255 0 100;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0; //when only icon or no icon is there
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               text {
+                  font: "SLP:style=Medium";
+                  size: 32;
+                  min: 0 0;
+                  align: 0.5 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 28;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 28;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                  set_state(PART:"elm.text", "visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/style_call_lscape_join_disabled";
+      images {
+                       image: "vc_six_btn_layout_normal.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 46;
+               image {
+                  normal: "vc_six_btn_layout_normal.png";
+                  border: 9 9 0 0;
+                  border_scale: 1;
+               }
+                               color: 255 255 255 102;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 255 0 100;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 26 28;
+               max: 26 28;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+                               color: 255 255 255 51;  /*20%*/
+               text {
+                  font: "SLP:style=Medium";
+                  size: 32;
+                  min: 0 0;
+                  align: 0.5 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 28;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 28;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                  set_state(PART:"elm.text", "visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/style_call_lscape_endcall_red";
+      images {
+                       image: "vc_button_red_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 46;
+               image {
+                  normal: "vc_button_red_normal.png";
+                  border: 16 16 0 0;
+                  border_scale: 1;
+               }
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "vc_button_press.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "vc_button_press.png";
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 255 0 100;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               text {
+                  font: "SLP:style=Medium";
+                  size: 32;
+                  min: 0 0;
+                  align: 0.5 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 40;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+                               color: 255 255 255 51;  /*20%*/
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 40;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                  set_state(PART:"elm.text", "visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/style_call_lscape_endcall_red_disabled";
+      images {
+                       image: "vc_button_red_normal.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 46;
+               image {
+                  normal: "vc_button_red_normal.png";
+                  border: 16 16 0 0;
+                  border_scale: 1;
+               }
+                               color: 255 255 255 102;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 255 0 100;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 40 40;
+               max: 40 40;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+                               color: 255 255 255 51;  /*20%*/
+               text {
+                  font: "SLP:style=Medium";
+                  size: 32;
+                  min: 0 0;
+                  align: 0.5 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 40;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 40;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                  set_state(PART:"elm.text", "visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+///////////////////////////////////////////////////////////////////////////////////////
+   group { name: "elm/button/base/style_call_lscape_split";
+      images {
+                       image: "vc_conference_call_btn_normal.png" COMP;
+                       image: "vc_conference_call_btn_press.png" COMP;
+      }
+      script {
+         public button_state = BUTTON_STATE_ENABLED;
+      }
+      parts {
+         part { name: "button_image";
+            mouse_events: 1;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 20 46;
+               image {
+                  normal: "vc_conference_call_btn_normal.png";
+                  border: 5 5 0 0;
+                  border_scale: 1;
+               }
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               image.normal: "vc_conference_call_btn_press.png";
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_left_top";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1.relative: 0.0 0.0;
+               rel2.relative: 0.0 0.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "padding_right_bottom";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 1.0;
+               rel1.relative: 1.0 1.0;
+               rel2.relative: 1.0 1.0;
+               min: 10 5;
+               fixed: 1 1;
+               visible: 0;
+            }
+         }
+         part {
+            name: "icon_rect";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               min: 52 35;
+               max: 52 35;
+               fixed: 1 0;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               align: 0.0 0.5;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_after_icon";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 0 0;
+               color: 0 255 0 100;
+            }
+            description { state: "visible" 0.0;
+               visible: 1;
+               align: 0.0 0.0;
+               rel1 { relative: 1.0 0.0; to: "icon_rect"; }
+               rel2 { relative: 1.0 1.0; to: "icon_rect"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+            description { state: "icononly" 0.0;
+               inherit: "default" 0.0;
+            }
+         }
+         part {
+            name: "padding_before_text";
+            type: RECT;
+            scale: 1;
+            mouse_events: 0;
+            description { state: "default" 0.0;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "elm.text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "elm.text"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+               min: 10 0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               fixed: 1 0;
+            }
+            description { state: "visible" 0.0;
+               fixed: 1 0;
+               visible: 1;
+               min: 52 35;
+               max: 52 35;
+               align: 1.0 0.5;
+               rel1 { relative: 0.0 1.0; to_x: "padding_before_text"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to_x: "padding_before_text"; to_y: "padding_right_bottom"; }
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+            description { state: "icononly" 0.0;
+               visible: 1;
+               min: 52 35;
+               max: 52 35;
+               rel1 { relative: 1.0 1.0; to: "padding_left_top"; }
+               rel2 { relative: 1.0 0.0; to_x: "padding_left_top"; to_y: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+            }
+         }
+         part { name: "elm.text";
+            type: TEXT;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 { relative: 1.0 1.0; to_x: "padding_after_icon"; to_y: "padding_left_top"; }
+               rel2 { relative: 0.0 0.0; to: "padding_right_bottom"; }
+               align: 0.5 0.5;
+               text {
+                  font: "SLP:style=Medium";
+                  size: 32;
+                  min: 0 0;
+                  align: 0.5 0.5;
+                  max: 1 0;
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 35;
+            }
+            description { state: "clicked" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               color: 0 0 0 128;
+            }
+            description { state: "disabled_visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 90 35;
+            }
+            description { state: "focused" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               min: 0 0;
+            }
+         }
+         part { name: "over2";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            ignore_flags: ON_HOLD;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "over3";
+            type: RECT;
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "disabler";
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+               visible: 0;
+            }
+            description { state: "disabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "button_click";
+            signal: "mouse,down,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,press" "";
+            after: "button_click_anim";
+         }
+         program { name: "button_click_anim";
+            action: STATE_SET "clicked" 0.0;
+            target: "button_image";
+            after: "text_clicked";
+         }
+         program { name: "text_clicked";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "clicked", 0.0);
+            }
+         }
+         program { name: "button_unpress";
+            action: SIGNAL_EMIT "elm,action,unpress" "";
+         }
+         program { name: "button_mouseout_clicked";
+            signal: "mouse,up,1";
+            source: "over3";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (strcmp(st, "icononly"))
+                 {
+                    emit("elm,action,default,text,set", "");
+                    set_state(PART:"elm.text", "visible", 0.0);
+                 }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                  set_state(PART:"button_image", "default", 0.0);
+            }
+            after: button_unpress;
+         }
+         program { name: "button_unclick3";
+            signal: "mouse,clicked,1";
+            source: "over2";
+            action: SIGNAL_EMIT "elm,action,click" "";
+         }
+         program { name: "text_show";
+            signal: "elm,state,text,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "icononly"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               if(get_int(button_state) != BUTTON_STATE_DISABLED)
+                 set_state(PART:"elm.text", "visible", 0.0);
+               else
+                 set_state(PART:"elm.text", "disabled_visible", 0.0);
+            }
+         }
+         program { name: "text_hide";
+            signal: "elm,state,text,hidden";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.swallow.content", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+               set_state(PART:"elm.text", "default", 0.0);
+            }
+         }
+         program { name: "icon_show";
+            signal: "elm,state,icon,visible";
+            source: "elm";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+               {
+                  set_state(PART:"elm.swallow.content", "visible", 0.0);
+                  set_state(PART:"icon_rect", "visible", 0.0);
+                  set_state(PART:"padding_after_icon", "visible", 0.0);
+               }
+               else
+               {
+                  set_state(PART:"elm.swallow.content", "icononly", 0.0);
+                  set_state(PART:"icon_rect", "icononly", 0.0);
+                  set_state(PART:"padding_after_icon", "icononly", 0.0);
+               }
+            }
+         }
+         program { name: "icon_hide";
+            signal: "elm,state,icon,hidden";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.content";
+         }
+         program { name: "disable";
+            signal: "elm,state,disabled";
+            source: "elm";
+            action: STATE_SET "disabled" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "disable_text";
+         }
+         program { name: "disable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "visible"))
+                  set_state(PART:"elm.text", "disabled_visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "disabled", 0.0);
+               set_int(button_state, BUTTON_STATE_DISABLED);
+            }
+         }
+         program { name: "enable";
+            signal: "elm,state,enabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            target: "disabler";
+            after: "enable_text";
+         }
+         program { name: "enable_text";
+            script {
+               new st[31];
+               new Float:vl;
+               get_state(PART:"elm.text", st, 30, vl);
+               if (!strcmp(st, "disabled_visible"))
+                  set_state(PART:"elm.text", "visible", 0.0);
+               else
+                  set_state(PART:"elm.text", "default", 0.0);
+               set_int(button_state, BUTTON_STATE_ENABLED);
+            }
+         }
+         program { name: "focused";
+            action: STATE_SET "focused" 0.0;
+            target: "button_image";
+            target: "elm.text";
+         }
+         program { name: "unfocused";
+            action: STATE_SET "default" 0.0;
+            target: "button_image";
+            after: "unfocus_text";
+         }
+         program { name: "unfocus_text";
+            action: STATE_SET "visible" 0.0;
+            target: "elm.text";
+         }
+      }
+   }
+
+     ////////////// elm/button/base/text_only/call_end_grey  //////////////////////////////////////////////
+       group { name: "elm/button/base/text_only/style_call_text_only_grey";
+               images {
+                       image: "vc_second_mt_btn_normal.png" COMP;
+                       image: "vc_button_press.png" COMP;
+               }
+               parts {
+                       part { name: "button_image";
+                               mouse_events: 1;
+                               scale: 1;
+                               effect: SOFT_SHADOW;
+                               description { state: "default" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_second_mt_btn_normal.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "clicked" 0.0;
+                                       min: 100 50;
+                                       image {
+                                               normal: "vc_button_press.png";
+                                               border: 16 16 0 0;
+                                               border_scale: 1;
+                                       }
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "clicked" 0.0;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       image.normal: "vc_button_press.png";
+                               }
+                       }
+                       part {  name: "elm.text";
+                               type: TEXT;
+                               effect: SHADOW;
+                               mouse_events: 0;
+                               scale: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       fixed: 1 1;
+                                       align: 0.5 0.5;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                                       text {
+                                               font: FONT_SLP_Medium;
+                                               size: 48;
+                                               min: 0 0;
+                                               align: 0.5 0.5;
+                                       }
+                               }
+                               description { state: "visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                                       color2: 0 0 0 102;
+                                       color3: 0 0 0 255;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                               }
+                               description { state: "disabled_visible" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 0 0 0 128;
+                                       color3: 0 0 0 0;
+                                       visible: 1;
+                                       min: 1 1;
+                               }
+                               description { state: "focused" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       min: 1 1;
+                                       color: 255 255 255 255;
+                               }
+                       }
+                       part { name: "over1";
+                               mouse_events: 0;
+                               description { state: "default" 0.0;
+                                       rel2.relative: 1.0 0.5;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                               }
+                       }
+                       part { name: "over2";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               ignore_flags: ON_HOLD;
+                               description { state: "default" 0.0;
+                               }
+                               description { state: "disabled" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 0;
+                               }
+                       }
+                       part { name: "over3";
+                               mouse_events: 1;
+                               repeat_events: 1;
+                               description { state: "default" 0.0;
+                                       color: 255 255 255 0;
+                               }
+                               description { state: "clicked" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                                       color: 255 255 255 0;
+                               }
+                       }
+                       part { name: "disabler";
+                               type: RECT;
+                       description { state: "default" 0.0;
+                               color: 0 0 0 0;
+                               visible: 0;
+                       }
+                       description { state: "disabled" 0.0;
+                               inherit: "default" 0.0;
+                               visible: 1;
+                               }
+                       }
+               }
+               programs {
+                       program { name: "button_click";
+                               signal: "mouse,down,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,press" "";
+                               after: "button_click_anim";
+                       }
+                       program { name: "button_click_anim";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "button_unclick";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,unpress" "";
+                               after: "button_unclick_anim";
+                       }
+                       program { name: "button_unclick_anim";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "button_mouseout_clicked";
+                               signal: "mouse,out";
+                               source: "over2";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "clicked"))
+                                       {
+                                               set_state(PART:"elm.text", "visible", 0.0);
+                                               set_state(PART:"button_image", "visible", 0.0);
+                                       }
+                               }
+                       }
+                       program { name: "button_click2";
+                               signal: "mouse,down,1";
+                               source: "over3";
+                               action: STATE_SET "clicked" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick2";
+                               signal: "mouse,up,1";
+                               source: "over3";
+                               action: STATE_SET "default" 0.0;
+                               target: "over3";
+                       }
+                       program { name: "button_unclick3";
+                               signal: "mouse,up,1";
+                               source: "over2";
+                               action: SIGNAL_EMIT "elm,action,click" "";
+                       }
+                       program { name: "text_show";
+                               signal: "elm,state,text,visible";
+                               source: "elm";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+                       program { name: "text_hide";
+                               signal: "elm,state,text,hidden";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "elm.text";
+                       }
+
+                       program { name: "disable";
+                               signal: "elm,state,disabled";
+                               source: "elm";
+                               action: STATE_SET "disabled" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "disable_text";
+                       }
+                       program { name: "disable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "visible"))
+                                       set_state(PART:"elm.text", "disabled_visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "disabled", 0.0);
+                               }
+                       }
+                       program { name: "enable";
+                               signal: "elm,state,enabled";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               target: "over1";
+                               target: "over2";
+                               target: "disabler";
+                               after: "enable_text";
+                       }
+                       program { name: "enable_text";
+                               script {
+                                       new st[31];
+                                       new Float:vl;
+                                       get_state(PART:"elm.text", st, 30, vl);
+                                       if (!strcmp(st, "disabled_visible"))
+                                       set_state(PART:"elm.text", "visible", 0.0);
+                                       else
+                                       set_state(PART:"elm.text", "default", 0.0);
+                               }
+                       }
+                       program { name: "focused";
+                               signal: "elm,action,focus";
+                               source: "elm";
+                               action: STATE_SET "focused" 0.0;
+                               target: "button_image";
+                               target: "elm.text";
+                       }
+                       program { name: "unfocused";
+                               signal: "elm,action,unfocus";
+                               source: "elm";
+                               action: STATE_SET "default" 0.0;
+                               target: "button_image";
+                               action: STATE_SET "visible" 0.0;
+                               target: "elm.text";
+                       }
+               }
+       }
+}
diff --git a/ui/themes/vc_btn_green.png b/ui/themes/vc_btn_green.png
new file mode 100644 (file)
index 0000000..87c4b51
Binary files /dev/null and b/ui/themes/vc_btn_green.png differ
diff --git a/ui/themes/vc_button_grey.png b/ui/themes/vc_button_grey.png
new file mode 100644 (file)
index 0000000..da986e8
Binary files /dev/null and b/ui/themes/vc_button_grey.png differ
diff --git a/ui/themes/vc_button_hide_keypad_normal.png b/ui/themes/vc_button_hide_keypad_normal.png
new file mode 100644 (file)
index 0000000..9df94e7
Binary files /dev/null and b/ui/themes/vc_button_hide_keypad_normal.png differ
diff --git a/ui/themes/vc_button_press.png b/ui/themes/vc_button_press.png
new file mode 100644 (file)
index 0000000..417bb59
Binary files /dev/null and b/ui/themes/vc_button_press.png differ
diff --git a/ui/themes/vc_button_red_normal.png b/ui/themes/vc_button_red_normal.png
new file mode 100644 (file)
index 0000000..b0b5da1
Binary files /dev/null and b/ui/themes/vc_button_red_normal.png differ
diff --git a/ui/themes/vc_button_rej_w_msg_normal.png b/ui/themes/vc_button_rej_w_msg_normal.png
new file mode 100644 (file)
index 0000000..73c5314
Binary files /dev/null and b/ui/themes/vc_button_rej_w_msg_normal.png differ
diff --git a/ui/themes/vc_button_rej_w_msg_press.png b/ui/themes/vc_button_rej_w_msg_press.png
new file mode 100644 (file)
index 0000000..1267a27
Binary files /dev/null and b/ui/themes/vc_button_rej_w_msg_press.png differ
diff --git a/ui/themes/vc_conf_call_list_bg.png b/ui/themes/vc_conf_call_list_bg.png
new file mode 100644 (file)
index 0000000..42cabe8
Binary files /dev/null and b/ui/themes/vc_conf_call_list_bg.png differ
diff --git a/ui/themes/vc_conference_call_btn_normal.png b/ui/themes/vc_conference_call_btn_normal.png
new file mode 100644 (file)
index 0000000..35d2203
Binary files /dev/null and b/ui/themes/vc_conference_call_btn_normal.png differ
diff --git a/ui/themes/vc_conference_call_btn_press.png b/ui/themes/vc_conference_call_btn_press.png
new file mode 100644 (file)
index 0000000..7b9fc6e
Binary files /dev/null and b/ui/themes/vc_conference_call_btn_press.png differ
diff --git a/ui/themes/vc_conference_call_btn_red.png b/ui/themes/vc_conference_call_btn_red.png
new file mode 100644 (file)
index 0000000..7494936
Binary files /dev/null and b/ui/themes/vc_conference_call_btn_red.png differ
diff --git a/ui/themes/vc_control_btn_new_prev.png b/ui/themes/vc_control_btn_new_prev.png
new file mode 100644 (file)
index 0000000..d708747
Binary files /dev/null and b/ui/themes/vc_control_btn_new_prev.png differ
diff --git a/ui/themes/vc_control_btn_prev.png b/ui/themes/vc_control_btn_prev.png
new file mode 100644 (file)
index 0000000..d45184d
Binary files /dev/null and b/ui/themes/vc_control_btn_prev.png differ
diff --git a/ui/themes/vc_reject_with_msg_back_icon.png b/ui/themes/vc_reject_with_msg_back_icon.png
new file mode 100755 (executable)
index 0000000..c56c14b
Binary files /dev/null and b/ui/themes/vc_reject_with_msg_back_icon.png differ
diff --git a/ui/themes/vc_reject_with_msg_control_top_arrow.png b/ui/themes/vc_reject_with_msg_control_top_arrow.png
new file mode 100755 (executable)
index 0000000..5078031
Binary files /dev/null and b/ui/themes/vc_reject_with_msg_control_top_arrow.png differ
diff --git a/ui/themes/vc_reject_with_msg_control_top_bg.png b/ui/themes/vc_reject_with_msg_control_top_bg.png
new file mode 100755 (executable)
index 0000000..adb35a0
Binary files /dev/null and b/ui/themes/vc_reject_with_msg_control_top_bg.png differ
diff --git a/ui/themes/vc_reject_with_msg_option_header_bt_press.png b/ui/themes/vc_reject_with_msg_option_header_bt_press.png
new file mode 100755 (executable)
index 0000000..f21ad02
Binary files /dev/null and b/ui/themes/vc_reject_with_msg_option_header_bt_press.png differ
diff --git a/ui/themes/vc_second_mt_btn_normal.png b/ui/themes/vc_second_mt_btn_normal.png
new file mode 100644 (file)
index 0000000..7e44719
Binary files /dev/null and b/ui/themes/vc_second_mt_btn_normal.png differ
diff --git a/ui/themes/vc_six_btn_layout_normal.png b/ui/themes/vc_six_btn_layout_normal.png
new file mode 100644 (file)
index 0000000..10e74b5
Binary files /dev/null and b/ui/themes/vc_six_btn_layout_normal.png differ
diff --git a/ui/themes/vc_six_btn_layout_press.png b/ui/themes/vc_six_btn_layout_press.png
new file mode 100644 (file)
index 0000000..f4e474c
Binary files /dev/null and b/ui/themes/vc_six_btn_layout_press.png differ
diff --git a/ui/vcui-app-data.h b/ui/vcui-app-data.h
new file mode 100755 (executable)
index 0000000..8ff4314
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VCUI_APP_DATA_H_
+#define _VCUI_APP_DATA_H_
+
+typedef enum {
+       CALL_LOCK = 1,
+       CALL_UNLOCK
+} vcui_app_lock_type_t;
+
+typedef enum {
+       CALL_OUTGOING = 1,
+       CALL_INCOMING
+} vcui_app_call_dirction_t;
+
+typedef enum {
+       CALL_HOLD = 1,
+       CALL_UNHOLD
+} vcui_app_call_status_t;
+
+#define TIME_END_START 1
+#define TIME_END_NO      0
+#define TIME_END_MAX_SHOW 8
+
+#define MY_HANDLE 252
+#define ALL_HANDLE 253
+#define NO_HANDLE 254
+#define NO_STATUS 254
+
+#define WIN_HIDE 0
+#define WIN_SHOW 1
+
+typedef enum {
+       VIEW_DIALLING_VIEW = 0,
+       VIEW_INCOMING_VIEW,
+       VIEW_INCOMING_LOCK_VIEW,
+       VIEW_INCALL_ONECALL_VIEW,
+       VIEW_INCALL_MULTICALL_SPLIT_VIEW,
+       VIEW_INCALL_MULTICALL_CONF_VIEW,
+       VIEW_INCALL_MULTICALL_LIST_VIEW,
+       VIEW_INCALL_KEYPAD_VIEW,
+       VIEW_ENDCALL_VIEW,
+       VIEW_MAX
+} vcui_app_call_view_id_t;
+
+typedef struct _appdata {
+       Evas *evas;
+       Evas_Object *win_main;
+
+       int root_w;     /**<Width of a root window */
+       int root_h;     /**<Height of a root window */
+
+       Evas_Coord touch_x;
+       Evas_Coord touch_y;
+
+       double scale_factor;
+
+       Evas_Object *actionslider;
+
+       Ecore_X_Window win;     /* key grab */
+       Ecore_X_Display *disp;  /* key grab */
+
+       Evas_Object *bg;
+
+       int full_image_type;
+       Evas_Object *full_image_eo;
+
+       int headset_status;
+       int speaker_status;
+       int mute_status;
+
+       int brecord_voice;
+       int show_flag;
+       int ball_view_hide;
+
+       struct _view_data *(*func_new[VIEW_MAX]) ();
+       struct _view_data *view_st[VIEW_MAX];
+       vcui_app_call_view_id_t view_top;
+       vcui_app_call_view_id_t view_before_top;
+       vcui_app_call_view_id_t view_before_reject_view;
+
+       Ecore_Timer *popup_delay;
+
+       Evas_Object *popup_mw;
+       Evas_Object *popup_eo;
+       Evas_Object *popup_vol_ly;
+       Evas_Object *popup_progress_eo;
+       Evas_Object *ctxpopup_eo;
+       Evas_Object *ctxpopup_radio_group_eo;
+
+       int child_is;
+
+       /* for multi split view */
+       int bswapped;
+       int bholdisleft;
+
+       /* for one-call view */
+       int beffect_needed;
+
+       /* Volume Control */
+       int bmute_ringtone;
+       int vol_key_status;
+       int vol_longpress_cnt;
+
+       int ringtone_val;
+       int voice_vol_val;
+       int bt_vol_val;
+
+       Ecore_Timer *ringtone_longpress_mute_timer;
+       Ecore_Timer *volup_key_longpress_timer;
+       Ecore_Timer *voldown_key_longpress_timer;
+
+       Evas_Object *vol_ringtone_slider_eo;
+       Evas_Object *vol_ringtone_popup_eo;
+       Ecore_Timer *vol_ringtone_popup_del_timer;
+
+       Evas_Object *vol_voice_slider_eo;
+       Evas_Object *vol_voice_popup_eo;
+       Ecore_Timer *vol_voice_popup_del_timer;
+
+       Evas_Object *vol_bt_slider_eo;
+       Evas_Object *vol_bt_popup_eo;
+       Ecore_Timer *vol_bt_popup_del_timer;
+
+       struct ui_gadget *contact_ug;
+       Evas_Object *ly;
+
+       struct vcui_ugs_array ugs_array_data;
+
+       int call_end_type;
+
+       Ecore_Event_Handler *downkey_handler;
+       Ecore_Event_Handler *upkey_handler;
+       Ecore_Event_Handler *mouse_evnt_handler;
+
+       Ecore_Timer *ticker_tm;
+} vcui_app_call_data_t;
+
+typedef struct _view_data {
+       vcui_app_call_view_id_t type;
+       vcui_app_call_data_t *app_data;
+
+       int (*onCreate) (struct _view_data *view_data, int param1, void *param2, void *param3);
+       int (*onUpdate) (struct _view_data *view_data, void *update_data1, void *update_data2);
+       int (*onDestroy) (struct _view_data *view_data);
+       int (*onShow) (struct _view_data *view_data);
+       int (*onHide) (struct _view_data *view_data);
+
+       Evas_Object *layout;
+       void *priv;
+} voice_call_view_data_t;
+
+#endif
diff --git a/ui/vcui-app-window.c b/ui/vcui-app-window.c
new file mode 100755 (executable)
index 0000000..0b864ab
--- /dev/null
@@ -0,0 +1,323 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-app-window.h"
+
+static void __vcui_app_win_focus_in_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_app_win_focus_out_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_app_win_main_win_del_cb(void *data, Evas_Object *obj, void *event);
+static Eina_Bool __vcui_app_win_hard_key_down_cb(void *data, int type, void *event);
+static Eina_Bool __vcui_app_win_hard_key_up_cb(void *data, int type, void *event);
+static Eina_Bool __vcui_app_win_mouse_down_cb(void *data, int type, void *event);
+static Eina_Bool __vcui_app_win_longpress_mute_timer_cb(void *data);
+static Eina_Bool __vcui_app_win_volup_key_longpress_timer_cb(void *data);
+static Eina_Bool __vcui_app_win_voldown_key_longpress_timer_cb(void *data);
+
+Evas_Object *_vcui_app_win_create_main(vcui_app_call_data_t *ad, const char *name)
+{
+       Evas_Object *eo;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               evas_object_smart_callback_add(eo, "delete,request", __vcui_app_win_main_win_del_cb, NULL);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(), &ad->root_w, &ad->root_h);
+               evas_object_resize(eo, ad->root_w, ad->root_h);
+               elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_SHOW);
+               evas_object_smart_callback_add(eo, "focus-in", __vcui_app_win_focus_in_cb, ad);
+               evas_object_smart_callback_add(eo, "focus-out", __vcui_app_win_focus_out_cb, ad);
+       }
+
+       return eo;
+}
+
+static void __vcui_app_win_focus_in_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+}
+
+static void __vcui_app_win_focus_out_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+}
+
+static void __vcui_app_win_main_win_del_cb(void *data, Evas_Object *obj, void *event)
+{
+       CALL_UI_DEBUG("..");
+       elm_exit();
+}
+
+static Eina_Bool __vcui_app_win_hard_key_down_cb(void *data, int type, void *event)
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       Ecore_Event_Key *ev = event;
+
+       retvm_if(ev == NULL, 0, "ERROR!!! ========= Event is NULL!!!");
+
+       if (ad->view_top == -1) {
+               CALL_UI_DEBUG("ad->view_top is -1.");
+#ifndef END_KEY_PROCESSING
+               if ((ad->contact_ug != NULL) && (!strcmp(ev->keyname, KEY_END))) {
+                       CALL_UI_DEBUG("send end key to contact ug.");
+                       ug_send_key_event(UG_KEY_EVENT_END);
+               }
+#endif
+               return EINA_FALSE;
+       }
+
+       if (!strcmp(ev->keyname, KEY_VOLUMEUP)) {
+               CALL_UI_DEBUG("[KEY]KEY_VOLUMEUP pressed");
+               if ((ad->view_st[ad->view_top]->type == VIEW_INCOMING_VIEW) || (ad->view_st[ad->view_top]->type == VIEW_INCOMING_LOCK_VIEW)) {
+                       _vcui_engine_interface_process_mute_alert();
+                       ad->bmute_ringtone = EINA_TRUE;
+               } else {
+                       ad->vol_longpress_cnt = 0;
+                       if (_voicecall_dvc_get_proximity_sensor_state() != VCALL_SENSOR_NEAR)
+                               _voicecall_dvc_control_lcd_state(VC_LCD_ON);
+                       _vcui_set_volume(VAL_VOL_UP);
+                       ad->volup_key_longpress_timer = ecore_timer_add(VOLUME_KEY_LONG_PRESS_TIMEOUT, __vcui_app_win_volup_key_longpress_timer_cb, ad);
+               }
+       } else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) {
+               CALL_UI_DEBUG("[KEY]KEY_VOLUMEDOWN pressed");
+               if ((ad->view_st[ad->view_top]->type == VIEW_INCOMING_VIEW) || (ad->view_st[ad->view_top]->type == VIEW_INCOMING_LOCK_VIEW)) {
+                       _vcui_engine_interface_process_mute_alert();
+                       ad->bmute_ringtone = EINA_TRUE;
+               } else {
+                       ad->vol_longpress_cnt = 0;
+                       if (_voicecall_dvc_get_proximity_sensor_state() != VCALL_SENSOR_NEAR)
+                               _voicecall_dvc_control_lcd_state(VC_LCD_ON);
+                       _vcui_set_volume(VAL_VOL_DOWN);
+                       ad->voldown_key_longpress_timer = ecore_timer_add(VOLUME_KEY_LONG_PRESS_TIMEOUT, __vcui_app_win_voldown_key_longpress_timer_cb, ad);
+               }
+       }
+
+       CALL_UI_DEBUG("End..");
+       return EINA_FALSE;
+}
+
+static Eina_Bool __vcui_app_win_hard_key_up_cb(void *data, int type, void *event)
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       Ecore_Event_Key *ev = event;
+
+       retvm_if(ev == NULL, 0, "ERROR!!! ========= Event is NULL!!!");
+
+       if (0 == strcmp(ev->keyname, KEY_VOLUMEDOWN)) {
+               if (ad->ringtone_longpress_mute_timer) {
+                       ecore_timer_del(ad->ringtone_longpress_mute_timer);
+                       ad->ringtone_longpress_mute_timer = NULL;
+               }
+       }
+
+       ad->vol_longpress_cnt = 0;
+
+       if (ad->volup_key_longpress_timer) {
+               ecore_timer_del(ad->volup_key_longpress_timer);
+               ad->volup_key_longpress_timer = NULL;
+       }
+
+       if (ad->voldown_key_longpress_timer) {
+               ecore_timer_del(ad->voldown_key_longpress_timer);
+               ad->voldown_key_longpress_timer = NULL;
+       }
+
+       return EINA_FALSE;
+}
+
+static Eina_Bool __vcui_app_win_mouse_down_cb(void *data, int type, void *event)
+{
+       /*CALL_UI_DEBUG("..");*/
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       Ecore_Event_Mouse_Button *ev = event;
+
+       ad->touch_x = ev->x;
+       ad->touch_y = ev->y;
+       return EINA_FALSE;
+}
+
+void _vcui_app_win_key_grab(vcui_app_call_data_t *ad)
+{
+       int result = 0;
+       CALL_UI_KPI("_vcui_app_win_key_grab start");
+
+       /* Key Grab */
+       ad->disp = ecore_x_display_get();
+       ad->win = elm_win_xwindow_get(ad->win_main);
+
+       result = utilx_grab_key(ad->disp, ad->win, KEY_VOLUMEUP, EXCLUSIVE_GRAB);
+       if (result)
+               CALL_UI_DEBUG("KEY_VOLUMEUP key grab failed");
+
+       result = utilx_grab_key(ad->disp, ad->win, KEY_VOLUMEDOWN, EXCLUSIVE_GRAB);
+       if (result)
+               CALL_UI_DEBUG("KEY_VOLUMEDOWN key grab failed");
+
+       if (ad->downkey_handler == NULL)
+               ad->downkey_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, __vcui_app_win_hard_key_down_cb, ad);
+       if (ad->upkey_handler == NULL)
+               ad->upkey_handler = ecore_event_handler_add(ECORE_EVENT_KEY_UP, __vcui_app_win_hard_key_up_cb, ad);     /* (for long press)*/
+       if (ad->mouse_evnt_handler == NULL)
+               ad->mouse_evnt_handler = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, __vcui_app_win_mouse_down_cb, ad);      /*for ctxpopup*/
+
+       CALL_UI_KPI("_vcui_app_win_key_grab done");
+}
+
+static Eina_Bool __vcui_app_win_longpress_mute_timer_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       call_data_t *call_data = _vcui_doc_get_recent_mt();
+
+       if (call_data == NULL)
+               return ECORE_CALLBACK_CANCEL;
+
+       if (ad->ringtone_longpress_mute_timer) {
+               ecore_timer_del(ad->ringtone_longpress_mute_timer);
+               ad->ringtone_longpress_mute_timer = NULL;
+       }
+
+       ad->vol_longpress_cnt = 0;
+
+       if (ad->volup_key_longpress_timer) {
+               ecore_timer_del(ad->volup_key_longpress_timer);
+               ad->volup_key_longpress_timer = NULL;
+       }
+
+       if (ad->voldown_key_longpress_timer) {
+               ecore_timer_del(ad->voldown_key_longpress_timer);
+               ad->voldown_key_longpress_timer = NULL;
+       }
+
+       _vcui_view_popup_unload(ad->vol_ringtone_popup_eo);
+
+       _vcui_engine_interface_process_mute_alert();
+       ad->bmute_ringtone = EINA_TRUE;
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool __vcui_app_win_volup_key_longpress_timer_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+
+       if ((ad->view_st[ad->view_top]->type == VIEW_INCOMING_VIEW || ad->view_st[ad->view_top]->type == VIEW_INCOMING_LOCK_VIEW)) {
+               if((ad->ringtone_val == RINGTONE_MAX) || (ad->bmute_ringtone == EINA_TRUE)){
+                       if (ad->volup_key_longpress_timer) {
+                               ecore_timer_del(ad->volup_key_longpress_timer);
+                               ad->volup_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       } else if (ad->headset_status == EINA_TRUE) {
+               if(ad->bt_vol_val== BT_VOL_MAX) {
+                       if (ad->volup_key_longpress_timer) {
+                               ecore_timer_del(ad->volup_key_longpress_timer);
+                               ad->volup_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       } else {
+               if(ad->voice_vol_val == VOICE_VOL_MAX) {
+                       if (ad->volup_key_longpress_timer) {
+                               ecore_timer_del(ad->volup_key_longpress_timer);
+                               ad->volup_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       }
+
+       ad->vol_longpress_cnt++;
+
+       if ((ad->vol_longpress_cnt % 3) == 0) {
+               _vcui_set_volume(VAL_VOL_UP);
+       }
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool __vcui_app_win_voldown_key_longpress_timer_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+
+       if ((ad->view_st[ad->view_top]->type == VIEW_INCOMING_VIEW || ad->view_st[ad->view_top]->type == VIEW_INCOMING_LOCK_VIEW)) {
+               if((ad->ringtone_val == RINGTONE_MAX) || (ad->bmute_ringtone == EINA_TRUE)) {
+                       if (ad->voldown_key_longpress_timer) {
+                               ecore_timer_del(ad->voldown_key_longpress_timer);
+                               ad->voldown_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       } else if (ad->headset_status == EINA_TRUE) {
+               if(ad->bt_vol_val == BT_VOL_MIN) {
+                       if (ad->voldown_key_longpress_timer) {
+                               ecore_timer_del(ad->voldown_key_longpress_timer);
+                               ad->voldown_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       } else {
+               if(ad->voice_vol_val == VOICE_VOL_MIN) {
+                       if (ad->voldown_key_longpress_timer) {
+                               ecore_timer_del(ad->voldown_key_longpress_timer);
+                               ad->voldown_key_longpress_timer = NULL;
+                       }
+                       return ECORE_CALLBACK_CANCEL;
+               }
+       }
+
+       ad->vol_longpress_cnt++;
+
+       if((ad->vol_longpress_cnt % 3) == 0) {
+               _vcui_set_volume(VAL_VOL_DOWN);
+       }
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+void _vcui_app_win_set_noti_type(int bwin_noti)
+{
+       Ecore_X_Window xwin;
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       /* Get x-window */
+       xwin = elm_win_xwindow_get(ad->win_main);
+
+       if (bwin_noti == EINA_FALSE) {
+               CALL_UI_DEBUG("window type: NORMAL");
+               /* Set Normal window */
+               ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NORMAL);
+       } else {
+               CALL_UI_DEBUG("window type: NOTI-HIGH");
+               /* Set Notification window */
+               ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+               /* Set Notification's priority to LEVEL_HIGH */
+               utilx_set_system_notification_level(ecore_x_display_get(), xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
+       }
+       return;
+}
+
diff --git a/ui/vcui-app-window.h b/ui/vcui-app-window.h
new file mode 100755 (executable)
index 0000000..aab8e7c
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VCUI_APP_WINDOW_H_
+#define __VCUI_APP_WINDOW_H_
+
+#include "vcui-application.h"
+
+Evas_Object *_vcui_app_win_create_main(vcui_app_call_data_t *ad, const char *name);
+void _vcui_app_win_key_grab(vcui_app_call_data_t *ad);
+void _vcui_app_win_set_noti_type(int bwin_noti);
+
+#endif                         /* __VCUI_MAIN_H_ */
diff --git a/ui/vcui-application.c b/ui/vcui-application.c
new file mode 100755 (executable)
index 0000000..41c9d7d
--- /dev/null
@@ -0,0 +1,1224 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-app-window.h"
+#include "vcui-app-data.h"
+#include "vcui-document.h"
+
+#include "vcui-view-dialing.h"
+#include "vcui-view-incoming.h"
+#include "vcui-view-incoming-lock.h"
+#include "vcui-view-keypad.h"
+#include "vcui-view-single-call.h"
+#include "vcui-view-multi-call-split.h"
+#include "vcui-view-multi-call-conf.h"
+#include "vcui-view-multi-call-list.h"
+#include "vcui-view-callend.h"
+ #include "vcui-view-popup.h"
+#include <glib.h>
+#include <glib-2.0/glib.h>
+#include <dbus/dbus-glib.h>
+#include <notification.h>
+#ifdef SIGNAL_HANDLER
+#include <signal.h>
+#endif
+
+static vcui_app_call_data_t global_ad;
+
+#ifdef SIGNAL_HANDLER
+#define VCUI_SIG_NUM 12
+static struct sigaction vcui_app_sigact;
+static struct sigaction vcui_app_sigoldact[VCUI_SIG_NUM];
+static int vcui_app_sig_to_handle[] = {SIGABRT,SIGBUS,SIGFPE,SIGILL,SIGQUIT,SIGSEGV,SIGSYS,SIGTRAP,SIGXCPU,SIGXFSZ,SIGTERM,SIGPIPE};
+#endif
+
+static gboolean g_avoid_multi_setup = EINA_FALSE;
+static Eina_Bool __vcui_avoid_multi_setup_timer_cb(void *data);
+
+#define CISS_AUL_CMD "org.tizen.ciss"
+#define CISS_MODE_OPT "REQ"
+#define __VCUI_NOTIFICATION_CALL_GROUP_ID 1001
+
+static int __vcui_launch_ciss(const char *number);
+static void __vcui_cache_flush_set(Evas *e);
+static void __vcui_init_view_register_function(vcui_app_call_data_t *app_data, vcui_app_call_view_id_t view_id, voice_call_view_data_t *(*view_new) ());
+static int __vcui_app_create(void *data);
+static int __vcui_app_pause(void *data);
+static int __vcui_app_reset(bundle *kb, void *data);
+static int __vcui_app_resume(void *data);
+static int __vcui_app_terminate(void *data);
+static void __vcui_fade_out_cb_routine(void);
+static int __vcui_lang_changed_cb(void *data);
+static int __vcui_low_mem_cb(void *data);
+static int __vcui_low_bat_cb(void *data);
+static void __vcui_init(vcui_app_call_data_t *ad);
+
+#ifdef SIGNAL_HANDLER
+/**
+* This function serves as the signal handler function for the SIGSEGV Signal
+*
+* @return              nothing
+* @param[in]           signal_no               Signal Number
+* @param[in]           signal_info     Information associated with the generated signal
+* @param[in]           signal_context  Signal Context Info
+*/
+static void __vcui_exit_handler(void)
+{
+       printf("\n __vcui_app_exit_handler\n");
+       /*syslog (LOG_INFO, "[VOICE-CALL] __vcui_app_exit_handler\n");*/
+}
+
+/**
+* This function serves as the signal handler function for the SIGSEGV Signal
+*
+* @return              nothing
+* @param[in]           signal_no               Signal Number
+* @param[in]           signal_info     Information associated with the generated signal
+* @param[in]           signal_context  Signal Context Info
+*/
+static void __vcui_sigsegv_handler(int signal_no)
+{
+       int i=0;
+
+       CALL_UI_DEBUG("SISEGV Received, Signal Number: :%d \n", signal_no);
+
+       vcall_engine_force_reset();
+       __vcui_fade_out_cb_routine();
+
+       for (i=0; i < VCUI_SIG_NUM; i++)
+       {
+               sigaction(vcui_app_sig_to_handle[i], &(vcui_app_sigoldact[i]), NULL);
+       }
+
+       raise(signal_no); /*raise signal intentionally (pass the same signal)*/
+}
+
+/**
+* This function registers a user space signal handler for the signal SIGSEGV (Signal #11)
+*
+* @return              nothing
+*/
+static void __vcui_register_sigsegv_handler()
+{
+       CALL_UI_DEBUG("..");
+
+       int i =0;
+       vcui_app_sigact.sa_flags = SA_NOCLDSTOP;
+       vcui_app_sigact.sa_handler =  (void *)__vcui_sigsegv_handler;
+       sigemptyset(&vcui_app_sigact.sa_mask);
+
+
+       for (;i < VCUI_SIG_NUM; i++)
+       {
+               sigaction (vcui_app_sig_to_handle[i], &vcui_app_sigact, &(vcui_app_sigoldact[i]));
+       }
+
+}
+#endif
+
+static int __vcui_launch_ciss(const char *number)
+{
+   bundle *kb;
+
+   CALL_UI_DEBUG("number(%s)");
+   kb = bundle_create();
+   bundle_add(kb, "CISS_LAUNCHING_MODE", CISS_MODE_OPT);
+   bundle_add(kb, "CISS_REQ_STRING", number);
+   aul_launch_app(CISS_AUL_CMD, kb);
+   bundle_free(kb);
+   return VC_NO_ERROR;
+}
+
+static int __vcui_app_create(void *data)
+{
+       CALL_UI_DEBUG("__vcui_app_create()..");
+       CALL_UI_KPI("__vcui_app_create start");
+       vcui_app_call_data_t *ad = data;
+
+       elm_theme_extension_add(NULL, CALL_THEME);
+
+       CALL_UI_KPI("_vcui_app_win_create_main start");
+       ad->win_main = (Evas_Object *)_vcui_app_win_create_main(ad, PACKAGE);
+       CALL_UI_KPI("_vcui_app_win_create_main done");
+       if (ad->win_main == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return VC_ERROR;
+       }
+
+       UG_INIT_EFL(ad->win_main, UG_OPT_INDICATOR_ENABLE);
+
+       __vcui_hide_main_ui_set_flag();
+
+       ad->evas = evas_object_evas_get(ad->win_main);
+       ad->scale_factor = elm_config_scale_get();
+
+       __vcui_cache_flush_set(ad->evas);
+
+       ecore_init();
+       ecore_x_init(NULL);
+       _vcui_app_win_key_grab(ad);
+
+       _vcui_view_common_timer_text_init();
+
+       _vcui_app_win_set_noti_type(EINA_TRUE);
+
+       /* add system event callback */
+       appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, __vcui_lang_changed_cb, ad);
+       appcore_set_event_callback(APPCORE_EVENT_LOW_MEMORY, __vcui_low_mem_cb, NULL);
+       appcore_set_event_callback(APPCORE_EVENT_LOW_BATTERY, __vcui_low_bat_cb, NULL);
+
+#ifdef SIGNAL_HANDLER
+               __vcui_register_sigsegv_handler();
+               atexit(__vcui_exit_handler);
+#endif
+
+       CALL_UI_KPI("__vcui_app_create done");
+       return VC_NO_ERROR;
+}
+
+static int __vcui_app_pause(void *data)
+{
+       CALL_UI_DEBUG("__vcui_app_pause()..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       return VC_NO_ERROR;
+}
+
+static int __vcui_app_reset(bundle *kb, void *data)
+{
+       CALL_UI_DEBUG("__vcui_app_reset()..");
+       CALL_UI_KPI("__vcui_app_reset start");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+
+       const char *launch_type = NULL;
+       const char *mime_type = NULL;
+       const char *tmp = NULL;
+       const char *uri_bundle = NULL;
+       char *telnum = NULL;
+
+#ifdef _RESET_OPEN_APP_
+       {
+               launch_type = bundle_get_val(kb, "__AUL_CMD__");
+               if (launch_type != NULL) {
+                       CALL_UI_DEBUG("launch type: [%s]", launch_type);
+                       if (!strncmp(launch_type, "OPEN_APP", 8)) {
+                               elm_win_raise(ad->win_main);
+                               return;
+                       }
+               }
+       }
+#endif
+
+       /* mime content based AUL */
+       mime_type = bundle_get_val(kb, AUL_K_MIME_TYPE);
+       if (mime_type != NULL) {
+               CALL_UI_DEBUG("mime_type: [%s]", mime_type);
+               if (strncmp(mime_type, "phonenum.uri",12) == 0 || strncmp(mime_type, "tel.uri",7) == 0) {
+                       tmp = bundle_get_val(kb, AUL_K_MIME_CONTENT);
+                       if (tmp == NULL) {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       if (strncmp(tmp, "tel:", 4) == 0) {
+                               telnum = (char *)tmp + 4;
+                       }
+
+                       CALL_UI_DEBUG("number: [%s]", telnum);
+
+                       vcui_call_type_t call_type;
+                       vcui_call_mo_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_MO;
+
+                       snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", telnum);
+
+                       _vcui_engine_interface_process_mo_call(call_type, &call_data);
+
+                       return VC_NO_ERROR;
+               } else {
+                       CALL_UI_DEBUG("wrong mime type!!");
+                       elm_exit();
+                       return VC_NO_ERROR;
+               }
+       }
+
+       uri_bundle = (const char *)appsvc_get_uri(kb);
+       if (uri_bundle != NULL) {
+               CALL_UI_DEBUG("tmp: [%s]", uri_bundle);
+               if (strncmp(uri_bundle, "tel:", 4) == 0) {
+                       telnum = (char *)uri_bundle + 4;
+                       CALL_UI_DEBUG("number: [%s]", telnum);
+
+                       vcui_call_type_t call_type;
+                       tmp = (char *)appsvc_get_data(kb, "calltype");
+                       
+                       if (tmp) {
+                               CALL_UI_DEBUG("calltype: [%s]", tmp);
+                               if (!strncmp(tmp, "EMERGENCY", 9)) {
+                                       vcui_call_ecc_data_t call_data;
+
+                                       memset(&call_data, 0, sizeof(call_data));
+                                       call_type = VCUI_CALL_TYPE_ECC;
+
+                                       snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", telnum);
+
+                                       _vcui_engine_interface_process_ecc_call(call_type, &call_data);
+                               } else {
+                                       CALL_UI_DEBUG("wrong calltype!");
+                                       elm_exit();
+                                       return VC_ERROR;
+                               }
+                       } else {
+                               vcui_call_mo_data_t call_data;
+
+                               memset(&call_data, 0, sizeof(call_data));
+
+                               snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", telnum);
+
+                               call_type = VCUI_CALL_TYPE_MO;
+
+                               tmp = (char *)appsvc_get_data(kb, "ctindex");
+                               if (tmp) {
+                                       CALL_UI_DEBUG("ctindex: [%s]", tmp);
+                                       call_data.ct_index = atoi(tmp);
+                               } else {
+                                       CALL_UI_DEBUG("bundle val is NULL");
+                                       call_data.ct_index = -1;
+                               }
+
+                               if ((_vc_core_util_check_incall_ss_string(call_data.call_number) == EINA_TRUE) && (_vcui_doc_get_count() >= 1)) {
+                                       vcall_engine_process_incall_ss(call_data.call_number);
+                                       _vcui_view_auto_change();
+                               } else if (_vc_core_util_check_ss_string(call_data.call_number) == EINA_TRUE) {
+                                       __vcui_launch_ciss(call_data.call_number);
+                                       if (_vcui_doc_get_count() == 0)
+                                               elm_exit();
+                                       return VC_NO_ERROR;
+                               } else {
+                                       _vcui_engine_interface_process_mo_call(call_type, &call_data);
+                               }
+                       }
+
+                       return VC_NO_ERROR;
+               } else {
+                       CALL_UI_DEBUG("wrong type!");
+                       elm_exit();
+                       return VC_NO_ERROR;
+               }
+       }
+
+       /* AUL */
+       launch_type = bundle_get_val(kb, "launch-type");
+       if (launch_type != NULL) {
+               CALL_UI_DEBUG("launch type: [%s]", launch_type);
+               if (!strncmp(launch_type, "MO", 2)) {
+
+                       if (g_avoid_multi_setup == EINA_TRUE) {
+                               CALL_UI_DEBUG("Avoid multi touch setup");
+                               return VC_NO_ERROR;
+                       }
+                       
+                       ecore_timer_add(3.5, __vcui_avoid_multi_setup_timer_cb, ad);
+                       g_avoid_multi_setup = EINA_TRUE;
+                       
+                       vcui_call_type_t call_type;
+                       vcui_call_mo_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_MO;
+
+                       tmp = bundle_get_val(kb, "number");
+                       if (tmp) {
+                               CALL_UI_DEBUG("number: [%s]", tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+                       snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", tmp);
+
+                       tmp = bundle_get_val(kb, "ctindex");
+                       if (tmp) {
+                               CALL_UI_DEBUG("ctindex: [%s]", tmp);
+                               call_data.ct_index = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               call_data.ct_index = -1;
+                       }
+
+                       if ((_vc_core_util_check_incall_ss_string(call_data.call_number) == EINA_TRUE) && (_vcui_doc_get_count() >= 1)) {
+                               vcall_engine_process_incall_ss(call_data.call_number);
+                               _vcui_view_auto_change();
+                       } else if (_vc_core_util_check_ss_string(call_data.call_number) == EINA_TRUE) {
+                               __vcui_launch_ciss(call_data.call_number);
+                               if(_vcui_doc_get_count() == 0)
+                                       elm_exit();
+                               return VC_NO_ERROR;
+                       } else {
+                               _vcui_engine_interface_process_mo_call(call_type, &call_data);
+                       }
+               } else if (!strncmp(launch_type, "MT", 2)) {
+
+                       vcui_call_type_t call_type;
+                       vcui_call_mt_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_MT;
+
+                       tmp = bundle_get_val(kb, "handle");
+                       if (tmp) {
+                               CALL_UI_DEBUG("handle: [%s]", tmp);
+                               call_data.call_handle = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "calltype");
+                       if (tmp) {
+                               CALL_UI_DEBUG("calltype: [%s]", tmp);
+                               call_data.call_type = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("calltype is NULL but NOT mendatory");
+                               call_data.call_type = 0;
+                       }
+
+                       tmp = bundle_get_val(kb, "cliindicator");
+                       if (tmp) {
+                               CALL_UI_DEBUG("cliindicator: [%s]", tmp);
+                               call_data.cli_presentation_indicator = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("cliindicator is NULL but NOT mendatory");
+                               call_data.cli_presentation_indicator = 0;
+                       }
+
+                       tmp = bundle_get_val(kb, "number");
+                       if (tmp) {
+                               CALL_UI_DEBUG("number: [%s]", tmp);
+                               vcall_engine_util_strcpy(call_data.call_num, VC_PHONE_NUMBER_LENGTH_MAX, tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               /*return VC_NO_ERROR;*/ /*check clir mt call.*/
+                       }
+
+                       tmp = bundle_get_val(kb, "name_mode");
+                       if (tmp) {
+                               CALL_UI_DEBUG("name_mode: [%s]", tmp);
+                               call_data.calling_name_mode= atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("name_mode is NULL but NOT mendatory");
+                               call_data.calling_name_mode = -1;
+                       }
+
+                       tmp = bundle_get_val(kb, "name");
+                       if (tmp) {
+                               CALL_UI_DEBUG("name: [%s]", tmp);
+                               vcall_engine_util_strcpy(call_data.calling_name, VC_PHONE_NAME_LENGTH_MAX, tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL but NOT mendatory");
+                       }
+
+                       tmp = bundle_get_val(kb, "rdnumber");
+                       if (tmp) {
+                               CALL_UI_DEBUG("rdnumber: [%s]", tmp);
+                               vcall_engine_util_strcpy(call_data.redirected_number, VC_PHONE_NUMBER_LENGTH_MAX, tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL but NOT mendatory");
+                       }
+
+                       tmp = bundle_get_val(kb, "rdsubaddress");
+                       if (tmp) {
+                               CALL_UI_DEBUG("rdnumber: [%s]", tmp);
+                               vcall_engine_util_strcpy(call_data.redirected_sub_address, VC_PHONE_SUBADDRESS_LENGTH_MAX, tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL but NOT mendatory");
+                       }
+
+                       tmp = bundle_get_val(kb, "clicause");
+                       if (tmp) {
+                               CALL_UI_DEBUG("clicause: [%s]", tmp);
+                               call_data.cli_cause = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "fwded");
+                       if (tmp) {
+                               CALL_UI_DEBUG("fwded: [%s]", tmp);
+                               call_data.bfwded = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "activeline");
+                       if (tmp) {
+                               CALL_UI_DEBUG("activeline: [%s]", tmp);
+                               call_data.active_line = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+                       _vcui_engine_interface_process_mt_call(call_type, &call_data);
+                       } else if (!strncmp(launch_type, "EMERGENCY", 9)) {
+
+                       vcui_call_type_t call_type;
+                       vcui_call_ecc_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_ECC;
+
+                       tmp = bundle_get_val(kb, "number");
+                       if (tmp) {
+                               CALL_UI_DEBUG("number: [%s]", tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                       }
+                       snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", tmp);
+
+                       _vcui_engine_interface_process_ecc_call(call_type, &call_data);
+
+               } else if (!strncmp(launch_type, "SATSETUPCALL", 12)) {
+                       vcui_call_type_t call_type;
+                       vcui_call_sat_data_t sat_setup_call_info;
+
+                       memset(&sat_setup_call_info, 0, sizeof(sat_setup_call_info));
+                       call_type = VCUI_CALL_TYPE_SAT;
+
+                       tmp = bundle_get_val(kb, "cmd_id");
+                       if (tmp) {
+                               CALL_UI_DEBUG("cmd_id: [%s]", tmp);
+                               sat_setup_call_info.command_id = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "cmd_qual");
+                       if (tmp) {
+                               CALL_UI_DEBUG("cmd_qual: [%s]", tmp);
+                               sat_setup_call_info.command_qualifier = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "disp_text");
+                       if (tmp) {
+                               CALL_UI_DEBUG("disp_text: [%s]", tmp);
+                               vcall_engine_util_strcpy(sat_setup_call_info.disp_text, sizeof(sat_setup_call_info.disp_text), tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               /*elm_exit();
+                               return VC_NO_ERROR;*/
+                       }
+
+                       tmp = bundle_get_val(kb, "call_num");
+                       if (tmp) {
+                               CALL_UI_DEBUG("call_num: [%s]", tmp);
+                               vcall_engine_util_strcpy(sat_setup_call_info.call_num, sizeof(sat_setup_call_info.call_num), tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+
+                       tmp = bundle_get_val(kb, "dur");
+                       if (tmp) {
+                               CALL_UI_DEBUG("dur: [%s]", tmp);
+                               sat_setup_call_info.duration = atoi(tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                               elm_exit();
+                               return VC_NO_ERROR;
+                       }
+                       _vcui_engine_interface_process_sat_call(call_type, &sat_setup_call_info);
+                       } else if (!strncmp(launch_type, "ECCTEST", 7)) {
+
+                       vcui_call_type_t call_type;
+                       vcui_call_ecc_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_ECC_TEST;
+
+                       _vcui_engine_interface_process_ecc_call(call_type, &call_data);
+
+               } else if (!strncmp(launch_type, "DOWNLOADCALL", 12)) {
+                       vcui_call_type_t call_type;
+                       vcui_call_mo_data_t call_data;
+
+                       memset(&call_data, 0, sizeof(call_data));
+                       call_type = VCUI_CALL_TYPE_DOWNLOAD_CALL;
+
+                       tmp = bundle_get_val(kb, "number");
+                       if (tmp) {
+                               CALL_UI_DEBUG("number: [%s]", tmp);
+                       } else {
+                               CALL_UI_DEBUG("bundle val is NULL");
+                       }
+
+                       if(tmp != NULL) {
+                               snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", tmp);
+                       } else {
+                               snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", "116");
+                       }
+
+                       vcall_engine_util_strcpy(call_data.call_number, sizeof(call_data.call_number), tmp);
+
+                       _vcui_engine_interface_process_mo_call(call_type, &call_data);
+               } else {        /*if ear jack is needed, add it*/
+                       CALL_UI_DEBUG("unknown launch type");
+               }
+               CALL_UI_KPI("__vcui_app_reset done");
+               return VC_NO_ERROR;
+       }
+
+       CALL_UI_DEBUG("bundle data is wrong!!");
+       elm_exit();
+       return VC_NO_ERROR;
+}
+
+static int __vcui_app_resume(void *data)
+{
+       CALL_UI_DEBUG("__vcui_app_resume()..");
+
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       return VC_NO_ERROR;
+}
+
+static int __vcui_app_terminate(void *data)
+{
+       CALL_UI_DEBUG("__vcui_app_terminate()..");
+
+       if (_vcui_doc_get_count() >= 1) {
+               CALL_UI_DEBUG("WARNING!! call exists. abnormal terminate!!");
+               _vcui_engine_end_all_call();
+               vcall_engine_set_to_default();
+       }
+       __vcui_fade_out_cb_routine();
+       return VC_NO_ERROR;
+}
+
+static void __vcui_cache_flush_set(Evas *e)
+{
+#ifdef _CACHE_FLUSH_
+       evas_image_cache_set(e, 4096 * 1024);
+       evas_font_cache_set(e, 512 * 1024);
+
+       edje_file_cache_set(0);
+       edje_collection_cache_set(0);
+#endif
+}
+
+static void __vcui_init_view_register_function(vcui_app_call_data_t *app_data, vcui_app_call_view_id_t view_id, voice_call_view_data_t *(*view_new) ())
+{
+       app_data->func_new[view_id] = view_new;
+}
+
+void _vcui_response_volume(int vol_alert_type, int vol_level)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (vol_alert_type == VCUI_VOL_VOICE) {
+               ad->voice_vol_val = vol_level;
+               _vcui_set_volume(ad->vol_key_status);
+       } else if (vol_alert_type == VCUI_VOL_HEADSET) {
+               ad->bt_vol_val = vol_level;
+               _vcui_set_volume(ad->vol_key_status);
+       } else {
+               CALL_UI_DEBUG("ERROR");
+       }
+}
+
+void _vcui_set_volume(int key_status)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (_vcui_doc_get_count() == 0) {
+               CALL_UI_DEBUG("ignore it");
+               return;
+       }
+
+       if ((ad->view_st[ad->view_top]->type == VIEW_INCOMING_VIEW || ad->view_st[ad->view_top]->type == VIEW_INCOMING_LOCK_VIEW)) {
+               int err_code = 0;
+               int settings_sound_status = EINA_FALSE;
+
+               err_code = vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &settings_sound_status);
+               if (settings_sound_status == EINA_FALSE) {
+                       CALL_UI_DEBUG("ringtone vol is ignored in sound off status.");
+                       return;
+               }
+
+               if (ad->bmute_ringtone == EINA_TRUE) {
+                       CALL_UI_DEBUG("during mute ringtone, vol will not changed");
+                       return;
+               }
+
+               if (ad->ringtone_val < RINGTONE_MIN) {
+                       int vol_level = _vcui_engine_get_volume_level(VCUI_VOL_RING);
+                       if ((vol_level < RINGTONE_MIN) || (vol_level > RINGTONE_MAX)) {
+                               CALL_UI_DEBUG("ERROR : ringtone vol:[%d]", vol_level);
+                               return;
+                       }
+                       ad->ringtone_val = vol_level;
+               }
+
+               CALL_UI_DEBUG("RINGTONE : Set Volume");
+               if (key_status == VAL_VOL_DOWN && ad->ringtone_val > RINGTONE_MIN) {
+                       ad->ringtone_val--;
+                       _vcui_engine_set_volume_level(VCUI_VOL_RING, ad->ringtone_val);
+               } else if (key_status == VAL_VOL_UP && ad->ringtone_val < RINGTONE_MAX) {
+                       ad->ringtone_val++;
+                       _vcui_engine_set_volume_level(VCUI_VOL_RING, ad->ringtone_val);
+               }
+               _vcui_view_popup_vol_ringtone(ad->ringtone_val);
+       } else if (ad->headset_status == EINA_TRUE) {
+               if (ad->bt_vol_val < BT_VOL_MIN) {
+                       CALL_UI_DEBUG("BT VOL : Get Volume");
+                       ad->vol_key_status = key_status;
+                       _vcui_engine_get_volume_level(VCUI_VOL_HEADSET);
+                       return;
+               }
+
+               CALL_UI_DEBUG("BT VOL : Set Volume");
+               if (key_status == VAL_VOL_DOWN && ad->bt_vol_val > BT_VOL_MIN) {        /*Key Down*/
+                       ad->bt_vol_val--;
+                       _vcui_engine_set_volume_level(VCUI_VOL_HEADSET, ad->bt_vol_val);
+               } else if (key_status == VAL_VOL_UP && ad->bt_vol_val < BT_VOL_MAX) {   /*Key Up*/
+                       ad->bt_vol_val++;
+                       _vcui_engine_set_volume_level(VCUI_VOL_HEADSET, ad->bt_vol_val);
+               }
+               _vcui_view_popup_vol_bt(ad->bt_vol_val);
+       } else {
+               CALL_UI_DEBUG("TAPI VOL : Get Volume");
+               ad->vol_key_status = key_status;
+               ad->voice_vol_val = _vcui_engine_get_volume_level(VCUI_VOL_VOICE);
+
+               CALL_UI_DEBUG("TAPI VOL : Set Volume");
+               if (key_status == VAL_VOL_DOWN && ad->voice_vol_val > VOICE_VOL_MIN) {  /*Key Down*/
+                       ad->voice_vol_val--;
+                       _vcui_engine_set_volume_level(VCUI_VOL_VOICE, ad->voice_vol_val);
+               } else if (key_status == VAL_VOL_UP && ad->voice_vol_val < VOICE_VOL_MAX) {     /*Key Up*/
+                       ad->voice_vol_val++;
+                       _vcui_engine_set_volume_level(VCUI_VOL_VOICE, ad->voice_vol_val);
+               }
+               _vcui_view_popup_vol_voice(ad->voice_vol_val);
+       }
+
+}
+
+static void __vcui_fade_out_cb_routine()
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (ad->child_is == 1) {
+               /*system("killall dialer");*/
+       }
+       if (ad->disp && ad->win) {
+               utilx_ungrab_key(ad->disp, ad->win, KEY_VOLUMEUP);
+               utilx_ungrab_key(ad->disp, ad->win, KEY_VOLUMEDOWN);
+       }
+       _vcui_doc_remove_all_data();
+       _voicecall_dvc_proximity_sensor_deinit();
+       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+       _vcui_view_common_timer_destroy();
+}
+
+static int __vcui_lang_changed_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       _vcui_view_auto_change();
+       return VC_NO_ERROR;
+}
+
+static int __vcui_low_mem_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_low_bat_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       return VC_NO_ERROR;
+}
+
+static void __vcui_init(vcui_app_call_data_t *ad)
+{
+       CALL_UI_KPI("g_type_init start");
+       g_type_init();
+       CALL_UI_KPI("g_type_init done");
+       _vcui_doc_recent_init();
+       _vcui_doc_caller_list_init();
+       _vcui_view_common_init();
+       _vcui_engine_init(ad);
+
+       CALL_UI_KPI("__vcui_init_view_register_function for all views start");
+       __vcui_init_view_register_function(ad, VIEW_DIALLING_VIEW, _vcui_view_dialing_new);
+       __vcui_init_view_register_function(ad, VIEW_INCOMING_VIEW, _vcui_view_incoming_new);
+       __vcui_init_view_register_function(ad, VIEW_INCOMING_LOCK_VIEW, _vcui_view_incoming_lock_new);
+       __vcui_init_view_register_function(ad, VIEW_INCALL_ONECALL_VIEW, _vc_ui_view_single_call_new);
+       __vcui_init_view_register_function(ad, VIEW_INCALL_MULTICALL_SPLIT_VIEW, _vcui_view_multi_call_split_new);
+       __vcui_init_view_register_function(ad, VIEW_INCALL_MULTICALL_CONF_VIEW, _vcui_view_multi_call_conf_new);
+       __vcui_init_view_register_function(ad, VIEW_INCALL_MULTICALL_LIST_VIEW, _vcui_view_multi_call_list_new);
+       __vcui_init_view_register_function(ad, VIEW_INCALL_KEYPAD_VIEW, _vcui_view_keypad_new);
+       __vcui_init_view_register_function(ad, VIEW_ENDCALL_VIEW, _vcui_view_callend_new);
+       CALL_UI_KPI("__vcui_init_view_register_function for all views done");
+
+       ad->view_top = -1;
+       ad->view_before_top = -1;
+       ad->view_before_reject_view = -1;
+       ad->headset_status = (int)_vcui_is_headset_conected();
+       ad->speaker_status = EINA_FALSE;
+       ad->mute_status = EINA_FALSE;
+       ad->child_is = -1;
+       ad->show_flag = WIN_HIDE;
+       ad->brecord_voice = 0;
+       ad->ringtone_val = -1;
+       ad->voice_vol_val = -1;
+       ad->bt_vol_val = -1;
+       ad->call_end_type = CALL_END_TYPE_NONE;
+}
+
+char *_vcui_get_endcause_string(int end_cause, char *data)
+{
+       char *string_id = NULL;
+       CALL_UI_DEBUG("end type : %d", end_cause);
+       switch (end_cause) {
+       case VC_ENGINE_ENDCAUSE_USER_UNAVAILABLE:
+               string_id = _("IDS_CALL_BODY_CALLED_PARTY_UNAVAILABLE");
+               break;
+       case VC_ENGINE_ENDCAUSE_UNASSIGNED_NUMBER:
+               string_id = _("IDS_CALL_BODY_NUMBER_DOES_NOT_EXIST");
+               break;
+       case VC_ENGINE_ENDCAUSE_USER_DOESNOT_RESPOND:
+               string_id = _("IDS_CALL_BODY_NO_ANSWER");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_DISCONNECTED:
+               string_id = _("IDS_CALL_BODY_DISCONNECTED");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_ENDED:
+               string_id = _("IDS_CALL_BODY_CALLENDED");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_SERVICE_NOT_ALLOWED:
+               string_id = _("IDS_CALL_POP_SERVICE_NOT_ALLOWED");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_BARRED:
+               string_id = _("IDS_CALL_POP_CALL_BARRED");
+               break;
+       case VC_ENGINE_ENDCAUSE_NO_SERVICE:
+               string_id = _("IDS_CALL_POP_NOSERVICE");
+               break;
+       case VC_ENGINE_ENDCAUSE_NW_BUSY:
+               string_id = _("IDS_CALL_POP_NETWORKBUSY");
+               break;
+       case VC_ENGINE_ENDCAUSE_NW_FAILED:
+               string_id = _("IDS_CALL_POP_NETWORK_UNAVAILABLE");
+               break;
+       case VC_ENGINE_ENDCAUSE_SERVICE_TEMP_UNAVAILABLE:
+               string_id = _("IDS_CALL_BODY_SERVICE_UNAVAILABLE");
+               break;
+       case VC_ENGINE_ENDCAUSE_NO_ANSWER:
+               string_id = _("IDS_CALL_BODY_NO_ANSWER");
+               break;
+       case VC_ENGINE_ENDCAUSE_NO_CREDIT:
+               string_id = _("IDS_CALL_POP_NOCREDITLEFT");
+               break;
+       case VC_ENGINE_ENDCAUSE_REJECTED:
+               string_id = _("IDS_CALL_BODY_CALL_REJECTED");
+               break;
+       case VC_ENGINE_ENDCAUSE_USER_BUSY:
+               string_id = _("IDS_CALL_POP_USER_BUSY");
+               break;
+       case VC_ENGINE_ENDCAUSE_WRONG_GROUP:
+               string_id = _("IDS_CALL_POP_WRONG_GROUP");
+               break;
+       case VC_ENGINE_ENDCAUSE_INVALID_NUMBER_FORMAT:
+               string_id = _("IDS_CALL_POP_CAUSE_WRONG_NUMBER");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_NOT_ALLOWED:
+               string_id = _("IDS_CALL_POP_CALLNOTCALLOWED");
+               break;
+       case VC_ENGINE_ENDCAUSE_TAPI_ERROR:
+               string_id = _("IDS_CALL_POP_AEESYS_SYSTEMFAILUREERROR");
+               break;
+       case VC_ENGINE_ENDCAUSE_CALL_FAILED:
+               string_id = _("IDS_CALL_POP_CALLFAILED");
+               break;
+       case VC_ENGINE_ENDCAUSE_NUMBER_CHANGED:
+               string_id = _("IDS_CALL_BODY_NUMBER_CHANGED");
+               break;
+       case VC_ENGINE_ENDCAUSE_IMEI_REJECTED:
+               string_id = _("IDS_CALL_POP_VERIFY_SIM_OR_INSERT_VALID_SIM");
+               break;
+       case VC_ENGINE_ENDCAUSE_NO_USER_RESPONDING:     /**< User not responding */
+       case VC_ENGINE_ENDCAUSE_USER_ALERTING_NO_ANSWER:        /**< User Alerting No Answer */
+       default:
+               string_id = _("IDS_CALL_BODY_CALLENDED");
+               break;
+       }
+       vcall_engine_util_strcpy(data, VC_DATA_LENGTH_MAX, string_id);
+       return data;
+}
+
+void _vcui_cache_flush()
+{
+#ifdef _CACHE_FLUSH_
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       evas_font_cache_flush(ad->evas);
+       evas_image_cache_flush(ad->evas);
+
+       edje_file_cache_flush();
+       edje_collection_cache_flush();
+
+       evas_render_idle_flush(ad->evas);
+#endif
+}
+
+int _vcui_is_idle_lock()
+{
+       int lock_state;
+       int ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &(lock_state));
+       if (ret == -1) {
+               CALL_UI_DEBUG("Cannot get vconf key");
+       }
+
+       if (lock_state == VCONFKEY_IDLE_LOCK)
+               return CALL_LOCK;
+       else
+               return CALL_UNLOCK;
+}
+
+unsigned long _vcui_get_diff_now(time_t start_time)
+{
+       time_t curr_time;
+       unsigned long call_duration_in_sec = 0;
+       curr_time = time(&curr_time);
+       call_duration_in_sec = curr_time - start_time;
+       return call_duration_in_sec;
+}
+
+gboolean _vcui_is_gcf_mode(void)
+{
+       gboolean bgcf_status = EINA_FALSE;
+       int ret = -1;
+
+       ret = vconf_get_int(VCONFKEY_ADMIN_GCF_TEST, &bgcf_status);
+       if (0 == ret) {
+               CALL_UI_DEBUG("bgcf_status = [%d]\n", bgcf_status);
+       } else {
+               CALL_UI_DEBUG("vconf_get_int failed..[%d]\n", ret);
+       }
+
+       return bgcf_status;
+}
+
+gboolean _vcui_is_headset_conected(void)
+{
+       int bt_connected = VCONFKEY_BT_DEVICE_NONE;
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = vconf_get_int(VCONFKEY_BT_DEVICE, &bt_connected);
+       if (0 == ret) {
+               CALL_UI_DEBUG("bt_connected = [0x%x] ", bt_connected);
+       } else {
+               CALL_UI_DEBUG("vconf_get_int failed..[%d]", ret);
+       }
+
+       return (VCONFKEY_BT_DEVICE_HEADSET_CONNECTED == (bt_connected & VCONFKEY_BT_DEVICE_HEADSET_CONNECTED)) ? EINA_TRUE : EINA_FALSE;
+}
+
+gboolean _vcui_is_headset_switch_on(void)
+{
+       int bt_status = VCONFKEY_BT_STATUS_OFF;
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = vconf_get_int(VCONFKEY_BT_STATUS, &bt_status);
+       if (0 == ret) {
+               CALL_UI_DEBUG("bt_status = [0x%x] ", bt_status);
+       } else {
+               CALL_UI_DEBUG("vconf_get_int failed..[%d]", ret);
+       }
+
+       return (VCONFKEY_BT_STATUS_ON == (bt_status & VCONFKEY_BT_STATUS_ON)) ? EINA_TRUE : EINA_FALSE;
+}
+
+gboolean _vcui_is_answering_mode_on(void)
+{
+       gboolean bAnswerMode = EINA_FALSE;
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = vconf_get_bool(VCONFKEY_CISSAPPL_ANSWERING_KEY_BOOL, &bAnswerMode);
+       if (0 == ret) {
+               CALL_UI_DEBUG("bAnswerMode = [%d] \n", bAnswerMode);
+       } else {
+               CALL_UI_DEBUG("vconf_get_int failed..[%d]\n", ret);
+       }
+
+       return bAnswerMode;
+}
+
+gboolean _vcui_is_powerkey_mode_on(void)
+{
+       gboolean bPowerkeyMode = EINA_FALSE;
+       Eina_Bool ret = EINA_FALSE;
+
+       ret = vconf_get_bool(VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, &bPowerkeyMode);
+       if (0 == ret) {
+               CALL_UI_DEBUG("bPowerkeyMode = [%d] \n", bPowerkeyMode);
+       } else {
+               CALL_UI_DEBUG("vconf_get_int failed..[%d]\n", ret);
+       }
+
+       return bPowerkeyMode;
+}
+
+gboolean _vcui_is_phonelock_status()
+{
+       gboolean b_phonelock = EINA_FALSE;
+       if (!vconf_get_bool(VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL, &b_phonelock)) {
+               CALL_UI_DEBUG("b_phonelock:[%d]", b_phonelock);
+               return b_phonelock;
+       } else {
+               CALL_UI_DEBUG("get VCONFKEY_SETAPPL_STATE_POWER_ON_LOCK_BOOL failed..");
+               return EINA_FALSE;
+       }
+}
+
+void _vcui_add_calllog(int type, call_data_t *data, int boutgoing_end)
+{
+       CALL_UI_DEBUG("type = [0x%x] ", type);
+       CTSvalue *plog;
+       time_t current_time;
+
+       if (data == NULL)
+               return;
+       contacts_svc_connect();
+
+       current_time = time(NULL);
+
+       plog = contacts_svc_value_new(CTS_VALUE_PHONELOG);
+       contacts_svc_value_set_str(plog, CTS_PLOG_VAL_NUMBER_STR, data->call_num);
+       contacts_svc_value_set_int(plog, CTS_PLOG_VAL_LOG_TIME_INT, (int)current_time);
+       contacts_svc_value_set_int(plog, CTS_PLOG_VAL_LOG_TYPE_INT, type);
+       contacts_svc_value_set_int(plog, CTS_PLOG_VAL_RELATED_ID_INT, data->contact_id);
+
+       if ((type == CTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN) || (type == CTS_PLOG_TYPE_VOICE_REJECT) ||
+               (type == CTS_PLOG_TYPE_VOICE_BLOCKED) || (boutgoing_end == EINA_TRUE)) {
+               contacts_svc_value_set_int(plog, CTS_PLOG_VAL_DURATION_INT, 0);
+       } else {
+               contacts_svc_value_set_int(plog, CTS_PLOG_VAL_DURATION_INT, _vcui_get_diff_now(data->start_time));
+       }
+       contacts_svc_insert_phonelog(plog);
+
+       contacts_svc_value_free(plog);
+       contacts_svc_disconnect();
+
+       /* vconf set & quickpanel noti (for missed call) */
+       if (type == CTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN) {
+               char szname[255] = { 0, };
+               int ret;
+               notification_h noti = NULL;
+               notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+               if (strlen((char *)data->call_display) == 0) {
+                       snprintf(szname, sizeof(szname), "%s", data->call_num);
+               } else {
+                       snprintf(szname, sizeof(szname), "%s", data->call_display);
+               }
+               CALL_UI_DEBUG("szname:[%s]", szname);
+
+               noti = notification_new(NOTIFICATION_TYPE_NOTI, __VCUI_NOTIFICATION_CALL_GROUP_ID, NOTIFICATION_PRIV_ID_NONE);
+               if(noti == NULL) {
+                       CALL_UI_DEBUG("Fail to notification_new\n");
+                       return;
+               }
+
+               noti_err = notification_set_application(noti, DIALER_PKG);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_application : %d\n", noti_err);
+               }
+
+               bundle *args  = bundle_create();
+
+               bundle_add(args, "logs", "missed_call");
+               noti_err = notification_set_args(noti, args, NULL);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_args : %d\n", noti_err);
+               }
+               bundle_free(args);
+
+               noti_err = notification_set_time(noti, current_time);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_icon : %d\n", noti_err);
+               }
+
+               noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, szname, szname, NOTIFICATION_VARIABLE_TYPE_NONE);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_title : %d\n", noti_err);
+               }
+
+               CALL_UI_DEBUG("data->call_file_path(%s)",data->call_file_path);
+               if (strlen(data->call_file_path) > 0) {
+                       noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL, data->call_file_path);
+                       if(noti_err != NOTIFICATION_ERROR_NONE) {
+                               CALL_UI_DEBUG("Fail to notification_set_title : %d\n", noti_err);
+                       }
+               }
+               
+               noti_err = notification_insert(noti, NULL);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_text_domain\n");
+               }
+
+               noti_err = notification_free(noti);
+               if(noti_err != NOTIFICATION_ERROR_NONE) {
+                       CALL_UI_DEBUG("Fail to notification_set_text_domain\n");
+               }
+       }
+}
+
+void _vcui_raise_main_win()
+{
+       CALL_UI_DEBUG("..");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       if (ad == NULL) {
+               CALL_UI_DEBUG("App data is NULL");
+               return;
+       }
+       if (ad->win_main == NULL) {
+               CALL_UI_DEBUG("Main Window is NULL");
+               return;
+       }
+
+       elm_win_activate(ad->win_main);
+       _vcui_show_main_ui_set_flag();
+       /*view_refresh_now();*/
+
+}
+
+int _vcui_check_valid_eo(Evas_Object *eo, char *v_name)
+{
+       /*CALL_UI_DEBUG("eo addr:[%p], v_name:[%s]", eo, v_name);*/
+       const char *obj_name = evas_object_name_get(eo);
+       if (obj_name == NULL) {
+               CALL_UI_DEBUG("obj_name is NULL!!. eo addr:[%p], v_name:[%s]", eo, v_name);
+               return VC_ERROR;
+       }
+       if (strncmp(obj_name, v_name, strlen(obj_name)) == 0) {
+               return VC_NO_ERROR;
+       } else {
+               CALL_UI_DEBUG("different name !! ");
+               return VC_ERROR;
+       }
+}
+
+vcui_app_call_data_t *_vcui_get_app_data()
+{
+       return &global_ad;
+}
+
+void _vcui_show_main_ui_set_flag()
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       if (ad->show_flag == WIN_HIDE) {
+               CALL_UI_DEBUG("show_flag : WIN_SHOW");
+               evas_object_show(ad->win_main);
+               ad->show_flag = WIN_SHOW;
+       }
+}
+
+void __vcui_hide_main_ui_set_flag()
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       CALL_UI_DEBUG("show_flag: WIN_HIDE");
+       evas_object_hide(ad->win_main);
+       ad->show_flag = WIN_HIDE;
+}
+
+Evas_Object *_vcui_load_edj(Evas_Object *parent, const char *file, const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       eo = elm_layout_add(parent);
+       if (eo) {
+               r = elm_layout_file_set(eo, file, group);
+               if (!r) {
+                       evas_object_del(eo);
+                       CALL_UI_DEBUG("ERROR!!");
+                       return NULL;
+               }
+
+               evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       }
+
+       return eo;
+}
+
+int main(int argc, char *argv[])
+{
+       CALL_UI_DEBUG("voice call ui main()..");
+
+       struct appcore_ops ops = {
+               .create = __vcui_app_create,
+               .terminate = __vcui_app_terminate,
+               .pause = __vcui_app_pause,
+               .resume = __vcui_app_resume,
+               .reset = __vcui_app_reset,
+       };
+
+       memset(&global_ad, 0, sizeof(vcui_app_call_data_t));
+
+       ops.data = &global_ad;
+
+       CALL_UI_KPI("__vcui_init start");
+       __vcui_init(&global_ad);
+       CALL_UI_KPI("__vcui_init done");
+
+       appcore_set_i18n(PACKAGE, LOCALEDIR);
+
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
+
+static Eina_Bool __vcui_avoid_multi_setup_timer_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       g_avoid_multi_setup = EINA_FALSE;
+       
+       return ECORE_CALLBACK_CANCEL;
+}
+
diff --git a/ui/vcui-application.h b/ui/vcui-application.h
new file mode 100755 (executable)
index 0000000..85386f5
--- /dev/null
@@ -0,0 +1,318 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VCUI_MAIN_H_
+#define __VCUI_MAIN_H_
+
+#include <contacts-svc.h>
+#include <dlog.h>
+
+#include <glib.h>
+
+#ifndef Eina_Bool
+#include <stdbool.h>
+#endif
+
+#include <Evas.h>
+#include <Edje.h>
+#include <Eina.h>
+#include <stdio.h>
+#include <string.h>
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Ecore_X_Atoms.h>
+#include <utilX.h>
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <sys/time.h>
+#include <sys/un.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <sys/ioctl.h>
+
+#include <aul.h>
+#include "appcore-efl.h"
+
+#include "vcui-doc-launch.h"
+#include "voice-call-engine-msg.h"
+
+#include "vcui-app-data.h"
+#include "vcui-document.h"
+#include "vcui-view-choice.h"
+#include "vcui-engine-interface.h"
+#include "vcui-view-common.h"
+#include "vcui-view-elements.h"
+#include "vcui-view-popup.h"
+
+#include <vconf.h>
+
+#include "ui-gadget.h"         /*for UG_INIT_EFL() & ug usage*/
+
+#include "libintl.h"
+
+#define DIALER_PKG             "org.tizen.phone"
+#define CONTACTS_PKG   "org.tizen.contacts"
+
+#if !defined(PACKAGE)
+#  define PACKAGE "voice-call-ui"
+#endif
+
+#if !defined(LOCALEDIR)
+#  define LOCALEDIR "/opt/apps/org.tizen.call/res/locale"
+#endif
+
+#if !defined(EDJDIR)
+#  define EDJDIR "/opt/apps/org.tizen.call/res/edje"
+#endif
+
+#if !defined(IMGDIR)
+#  define IMGDIR "/opt/apps/org.tizen.call/res/images"
+#endif
+
+#if !defined(MEDIADIR)
+#  define MEDIADIR "/opt/apps/org.tizen.call/res/media"
+#endif
+
+#if !defined(ICONDIR)
+#  define ICONDIR "/opt/apps/org.tizen.call/res/icons/default/small"
+#endif
+
+#define EDJ_NAME EDJDIR"/voice-call-ui.edj"
+#define CALL_THEME EDJDIR"/call_theme.edj"
+
+#define GRP_MTVIEW "mt-view"
+#define GRP_MOVIEW "mo-view"
+#define GRP_INCALL "incall"
+#define GRP_MTLOCK "mtlock"
+#define GRP_KEYPAD "keypad"
+#define GRP_MULTICALL_SPLIT "multicall-split"
+#define GRP_MULTICALL_SPLIT2 "multicall-split2"
+#define GRP_MULTICALL_CONF "multicall-conf"
+#define GRP_MULTICALL "multicall-list"
+#define GRP_UG_EFFECT "ug_effect"
+#define GRP_END_SINGLECALL "end-singlecall"
+#define GRP_END_CONFCALL "end-confcall"
+#define GRP_LOCK_ACCEPT "lock_accept"
+#define GRP_LOCK_REJECT "lock_reject"
+
+#define        QP_NOIMG_ICON   IMGDIR"/vc_qp_caller_ID.png"
+#define        QP_CONF_ICON    IMGDIR"/vc_qp_caller_ID_group.png"
+#define NOIMG_ICON IMGDIR"/vc_normal_caller_ID.png"
+#define CONF_ICON IMGDIR"/vc_normal_caller_ID_group.png"
+#define PRIVATE_ICON IMGDIR"/vc_conference_private.png"
+#define HOLD_ICON IMGDIR"/vc_icon_hold.png"
+#define UNHOLD_ICON IMGDIR"/vc_icon_unhold.png"
+#define KEYPAD_ICON IMGDIR"/vc_keypad_icon.png"
+#define CONTACT_ICON IMGDIR"/vc_contact_icon.png"
+#define ADDCALL_ICON IMGDIR"/vc_add_icon.png"
+#define JOIN_ICON IMGDIR"/vc_join_icon.png"
+#define SPEAKER_ICON IMGDIR"/vc_speaker_icon.png"
+#define MUTE_ICON IMGDIR"/vc_mute_icon.png"
+#define PLAY_ICON IMGDIR"/vc_icon_play.png"
+#define PAUSE_ICON IMGDIR"/vc_icon_pause.png"
+#define MORE_ICON IMGDIR"/vc_btn_more.png"
+#define CONF_CALL_END_ICON IMGDIR"/vc_icon_conf_call_end.png"
+#define CALLING_NAME_BG_IMAGE IMGDIR"/vc_calling_name_BG_image.png"
+
+#define HOLD_DISABLED_ICON IMGDIR"/vc_icon_hold_dim.png"
+#define UNHOLD_DISABLED_ICON IMGDIR"/vc_icon_unhold_dim.png"
+#define KEYPAD_DISABLED_ICON IMGDIR"/vc_keypad_icon_dim.png"
+#define CONTACT_DISABLED_ICON IMGDIR"/vc_contact_icon_dim.png"
+#define ADDCALL_DISABLED_ICON IMGDIR"/vc_add_icon_dim.png"
+#define JOIN_DISABLED_ICON IMGDIR"/vc_join_icon_dim.png"
+#define SPEAKER_DISABLED_ICON IMGDIR"/vc_speaker_icon_dim.png"
+#define MUTE_DISABLED_ICON IMGDIR"/vc_mute_icon_dim.png"
+#define        CONF_LIST_HOLD_ICON IMGDIR"/vc_icon_conf_list_hold.png"
+#define        CONF_LIST_UNHOLD_ICON IMGDIR"/vc_icon_conf_list_unhold.png"
+
+#define VOLUME_ICON IMGDIR"/vc_volume_icon.png"
+#define VOLUME_MUTE_ICON IMGDIR"/vc_volume_mute_icon.png"
+
+#define NVAI_CONTROL_OTHER_ICON IMGDIR"/vc_reject_with_msg_header_icon_others.png"
+
+#define MINI_CONTROLLER_WIDTH (480)
+#define MINI_CONTROLLER_HEIGHT (42)
+
+#define DEF_BUF_LEN (128)
+#define DEF_BUF_LEN_LONG (256)
+
+#define VAL_VOL_UP (1)
+#define VAL_VOL_DOWN (0)
+
+#define RINGTONE_MIN (0)
+#define RINGTONE_MAX (15)
+#define VOICE_VOL_MIN (1)
+#define VOICE_VOL_MAX (7)      /* It must change to 6 later.. */
+#define BT_VOL_MIN (1)
+#define BT_VOL_MAX (15)
+
+#define RINGTONE_LONGPRESS_MUTE_TIMEOUT                        0.7
+#define VOLUME_KEY_LONG_PRESS_TIMEOUT                  0.1
+
+#define POPUP_TIMEOUT_SHORT            (2.0)
+#define POPUP_TIMEOUT_NORMAL           (3.0)
+#define POPUP_TIMEOUT_LONG             (5.0)
+#define POPUP_TIMEOUT_VERY_LONG        (10.0)
+
+#define TIMER_TIMEOUT_0_1_SEC  (0.1)
+#define TIMER_TIMEOUT_0_3_SEC  (0.3)
+#define TIMER_TIMEOUT_0_5_SEC  (0.5)
+#define TIMER_TIMEOUT_1_SEC    (1.0)
+#define TIMER_TIMEOUT_2_SEC    (2.0)
+#define TIMER_TIMEOUT_4_SEC    (4.0)
+
+#define BLUR_VALUE                             30
+#define IMG_TYPE_FULL                  1
+#define IMG_TYPE_WALLPAPER             2
+#define IMG_TYPE_BLUR                  3
+
+#define BG_DEFAULT_PATH                "/opt/media/Images and videos/Wallpapers/Home_default.png"
+
+#ifndef EINA_TRUE
+#define EINA_TRUE      1
+#endif
+
+#ifndef EINA_FALSE
+#define EINA_FALSE     0
+#endif
+
+#ifdef CALL_DEBUG_ON_DLOG
+#define CALL_UI_DEBUG(frmt, args...)  do { LOG(LOG_DEBUG, TAG_CALL, "[vcui] [%s:%d] "frmt"\n",  __func__, __LINE__, ##args); } while (0)
+#define        CALL_UI_KPI(frmt, args...)  do { LOG(LOG_DEBUG, TAG_CALL_LAUNCH, "[VC_KPI] [%s:%d] "frmt"\n",  __func__, __LINE__, ##args); } while (0)
+#else
+#define CALL_UI_DEBUG(args...)
+#endif
+
+#ifndef retv_if
+#define retv_if(expr, val) do { \
+               if (expr) { \
+                       CALL_UI_DEBUG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+#endif
+
+#ifndef retvm_if
+#define retvm_if(expr, val, fmt, arg...) do { \
+               if (expr) { \
+                       CALL_UI_DEBUG(fmt, ##arg); \
+                       CALL_UI_DEBUG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+#endif
+
+#ifndef VCUI_RETURN_IF_FAIL
+#define VCUI_RETURN_IF_FAIL(check_condition)   \
+                       if (!(check_condition)) return;
+#endif
+
+#ifndef VCUI_RETURN_FALSE_IF_FAIL
+#define VCUI_RETURN_FALSE_IF_FAIL(check_condition)     \
+                       if (!(check_condition)) return EINA_FALSE;
+#endif
+
+#ifndef VCUI_RETURN_VALUE_IF_FAIL
+#define VCUI_RETURN_VALUE_IF_FAIL(check_condition, value)      \
+                       if (!(check_condition)) return value;
+#endif
+
+#ifndef VCUI_RETURN_NULL_IF_FAIL
+#define VCUI_RETURN_NULL_IF_FAIL(check_condition)      \
+                       if (!(check_condition)) return NULL;
+#endif
+
+#ifndef VCUI_RETURN_ZERO_IF_FAIL
+#define VCUI_RETURN_ZERO_IF_FAIL(check_condition)      \
+                       if (!(check_condition)) return 0;
+#endif
+
+#ifndef VCUI_RETURN_INVALID_IF_FAIL
+#define VCUI_RETURN_INVALID_IF_FAIL(check_condition)   \
+                       if (!(check_condition)) return -1;
+#endif
+
+#ifndef VCUI_RETURN_VALUE_IF_NOT_IN_RANGE
+#define VCUI_RETURN_VALUE_IF_NOT_IN_RANGE(value, min_value, max_value, ret_val)        \
+                       if ((value < min_value) || (value > max_value)) return ret_val;
+#endif
+
+#ifndef _EDJ
+#define _EDJ(obj) elm_layout_edje_get(obj)
+#endif
+
+#define        _EVAS_OBJ_DEL(obj)      if (obj) \
+       { \
+               evas_object_del(obj); \
+               obj = NULL; \
+       }
+
+struct text_part {
+       char *part;
+       char *msgid;
+};
+
+typedef enum _voice_call_bg_type_t {
+       BG_HIDE,
+       BG_SHOW
+} voice_call_bg_type_t;
+
+typedef enum {
+       CALL_END_TYPE_NONE = -1,
+       CALL_END_TYPE_SINGLE_CALL,
+       CALL_END_TYPE_CONF_CALL,
+} voice_call_end_type_t;
+
+/************************************************************************************/
+void _create_main_ui_set_flag();
+void _create_main_ui_real();
+void _vcui_show_main_ui_set_flag();
+void __vcui_hide_main_ui_set_flag();
+
+void _vcui_determine_background_show_hide();
+
+void _vcui_cache_flush();
+vcui_app_call_data_t *_vcui_get_app_data();
+int _vcui_is_idle_lock();
+
+gboolean _vcui_is_gcf_mode(void);
+gboolean _vcui_is_headset_conected(void);
+gboolean _vcui_is_headset_switch_on(void);
+gboolean _vcui_is_answering_mode_on(void);
+gboolean _vcui_is_powerkey_mode_on(void);
+gboolean _vcui_is_phonelock_status(void);
+
+void _vcui_add_calllog(int type, call_data_t *data, int boutgoing_end);
+
+void _vcui_response_volume(int vol_alert_type, int vol_level);
+void _vcui_set_volume(int key_status);
+
+void _vcui_raise_main_win();
+int _vcui_check_valid_eo(Evas_Object *eo, char *v_name);
+
+unsigned long _vcui_get_diff_now(time_t start_time);
+
+char *_vcui_get_endcause_string(int end_cause, char *data);
+
+Evas_Object *_vcui_load_edj(Evas_Object *parent, const char *file, const char *group);
+
+#endif                         /* __VCUI_MAIN_H_ */
diff --git a/ui/vcui-doc-launch.c b/ui/vcui-doc-launch.c
new file mode 100755 (executable)
index 0000000..d58ea02
--- /dev/null
@@ -0,0 +1,453 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#include "vcui-application.h"\r
+#include "contacts-ug.h"\r
+\r
+#define MSG_COMPOSER_UG                "msg-composer-efl"\r
+#define MSG_PKG                                "org.tizen.message"\r
+#define ADD_TO_CONTACTS_UG     "contacts-details-efl"\r
+\r
+struct vcui_ug_priv_data *local_priv_data = NULL;\r
+\r
+#define COMMON_FUNCTIONS\r
+#ifdef COMMON_FUNCTIONS\r
+static void __vcui_doc_launch_ug_common_back_btn_cb(void *data, Evas_Object *obj, void *event_info)\r
+{\r
+       Evas_Object *navi = data;\r
+       elm_naviframe_item_pop(navi);\r
+}\r
+\r
+static void __vcui_doc_launch_ug_common_hide_effect_finished(void *data, Evas_Object *obj, const char *emission, const char *source)\r
+{\r
+       struct vcui_ug_priv_data *temp_priv_data = (struct vcui_ug_priv_data *)data;\r
+\r
+       Evas_Object *base;\r
+       base = temp_priv_data->need_layout;\r
+\r
+       if (temp_priv_data->need_ug != NULL) {\r
+               CALL_UI_DEBUG("__vcui_doc_launch_ug_common_hide_effect_finished start");\r
+\r
+               if (base != NULL)\r
+                       evas_object_hide(base);\r
+\r
+               elm_object_part_content_unset(base, "elm.swallow.content");\r
+\r
+               if (temp_priv_data->on_destroy_callback != NULL)\r
+                       temp_priv_data->on_destroy_callback(temp_priv_data->destroy_callback_param);\r
+\r
+               ug_destroy((struct ui_gadget *)(temp_priv_data->need_ug));\r
+\r
+               free(temp_priv_data);\r
+               local_priv_data = NULL;\r
+\r
+               evas_object_del(base);\r
+               CALL_UI_DEBUG("__vcui_doc_launch_ug_common_hide_effect_finished end");\r
+       }\r
+}\r
+\r
+static void __vcui_doc_launch_ug_common_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)\r
+{\r
+       Evas_Object *base, *win;\r
+       struct vcui_ug_priv_data *temp_priv_data = (struct vcui_ug_priv_data *)priv;\r
+\r
+       if (!ug)\r
+               return;\r
+\r
+       base = ug_get_layout(ug);\r
+       if (!base)\r
+               return;\r
+\r
+#ifdef _LOCAL_UG_EFFECT_\r
+       Evas_Object *ly = elm_layout_add(temp_priv_data->need_parent);\r
+       win = ug_get_window();\r
+       elm_win_resize_object_add(win, ly);\r
+       elm_layout_file_set(ly, EDJ_NAME, "ug_effect");\r
+       elm_object_part_content_set(ly, "elm.swallow.content", base);\r
+       evas_object_show(ly);\r
+       temp_priv_data->need_layout = ly;\r
+\r
+       edje_object_signal_callback_add(elm_layout_edje_get(ly), "elm,action,hide,finished", "", __vcui_doc_launch_ug_common_hide_effect_finished, temp_priv_data);\r
+       edje_object_signal_emit(elm_layout_edje_get(ly), "elm,state,show", "");\r
+#else\r
+       evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);\r
+       elm_win_resize_object_add(win, base);\r
+       evas_object_show(base);\r
+#endif\r
+}\r
+\r
+static void __vcui_doc_launch_ug_common_destroy_cb(struct ui_gadget *ug, void *priv)\r
+{\r
+       CALL_UI_DEBUG("");\r
+       struct vcui_ug_priv_data *temp_priv_data = NULL;\r
+       if(priv != NULL)\r
+               temp_priv_data = (struct vcui_ug_priv_data *)priv;\r
+       else\r
+               temp_priv_data = local_priv_data;\r
+\r
+#ifdef _LOCAL_UG_EFFECT_\r
+       if (temp_priv_data->need_navi != NULL) {\r
+               Evas_Object *base;\r
+               base = ug_get_layout(ug);\r
+\r
+               if (ug != NULL) {\r
+                       ug_destroy(ug);\r
+\r
+                       if (temp_priv_data->on_destroy_callback != NULL)\r
+                               temp_priv_data->on_destroy_callback(temp_priv_data->destroy_callback_param);\r
+\r
+\r
+                       struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)(temp_priv_data->need_ug_lists);\r
+                       if (pugs_array != NULL) {\r
+                               pugs_array->ug_lists = eina_list_remove(pugs_array->ug_lists, temp_priv_data->need_ug);\r
+                               pugs_array->ug_count = pugs_array->ug_count - 1;\r
+                               pugs_array->last_ug_type = VCUI_UG_TYPE_NOE;\r
+                       }\r
+                       free(temp_priv_data);\r
+                       local_priv_data = NULL;\r
+               }\r
+               CALL_UI_DEBUG("__vcui_doc_launch_ug_common_destroy_cb");\r
+       } else {\r
+               struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)(temp_priv_data->need_ug_lists);\r
+               CALL_UI_DEBUG("pugs_array(0x%x)");\r
+               if (pugs_array != NULL) {\r
+                       pugs_array->ug_lists = eina_list_remove(pugs_array->ug_lists, temp_priv_data->need_ug);\r
+                       pugs_array->ug_count = pugs_array->ug_count - 1;\r
+                       pugs_array->last_ug_type = VCUI_UG_TYPE_NOE;\r
+               }\r
+               edje_object_signal_emit(elm_layout_edje_get(temp_priv_data->need_layout), "elm,state,hide", "");\r
+               CALL_UI_DEBUG("Send Hide");\r
+       }\r
+#else\r
+       Evas_Object *base;\r
+       base = ug_get_layout(ug);\r
+\r
+       if (ug != NULL) {\r
+               ug_destroy(ug);\r
+\r
+               if (temp_priv_data->on_destroy_callback != NULL)\r
+                       temp_priv_data->on_destroy_callback(temp_priv_data->destroy_callback_param);\r
+\r
+\r
+               struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)(temp_priv_data->need_ug_lists);\r
+               if (pugs_array != NULL) {\r
+                       pugs_array->ug_lists = eina_list_remove(pugs_array->ug_lists, temp_priv_data->need_ug);\r
+                       pugs_array->ug_count = pugs_array->ug_count - 1;\r
+                       pugs_array->last_ug_type = VCUI_UG_TYPE_NOE;\r
+               }\r
+               free(temp_priv_data);\r
+               local_priv_data = NULL;\r
+       }\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_common_destroy_cb");\r
+#endif\r
+}\r
+#endif\r
+\r
+static void __vcui_doc_launch_ug_contact_list_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)\r
+{\r
+       __vcui_doc_launch_ug_common_layout_cb(ug, mode, priv);\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_contact_list_layout_cb success");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_contact_list_destroy_cb(struct ui_gadget *ug, void *priv)\r
+{\r
+       __vcui_doc_launch_ug_common_destroy_cb(ug, priv);\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_contact_list_destroy_cb success");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_contact_list_result_cb(struct ui_gadget *ug, bundle *result, void *priv)\r
+{\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_contact_list_result_cb nothing");\r
+}\r
+\r
+void _vcui_doc_launch_contact_list_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data)\r
+{\r
+       CALL_UI_DEBUG("_vcui_doc_launch_contact_list_ug start");\r
+       bundle *bd = bundle_create();\r
+\r
+       if (bd == NULL) {\r
+               CALL_UI_DEBUG("bundle_craete() return NULL");\r
+               return;\r
+       }\r
+\r
+       bundle_add(bd, "type", "1");\r
+\r
+       struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+       if (pugs_array->last_ug_type == VCUI_UG_TYPE_CONTACT_LIST) {\r
+               CALL_UI_DEBUG("launch exit because of same ug execution");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       struct ug_cbs cbs = { 0, };\r
+       cbs.layout_cb = __vcui_doc_launch_ug_contact_list_layout_cb;\r
+       cbs.destroy_cb = __vcui_doc_launch_ug_contact_list_destroy_cb;\r
+       cbs.result_cb = __vcui_doc_launch_ug_contact_list_result_cb;\r
+\r
+       struct vcui_ug_priv_data *temp_priv_data = malloc(sizeof(struct vcui_ug_priv_data));\r
+       if (temp_priv_data == NULL) {\r
+               CALL_UI_DEBUG("malloc error.\n");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       temp_priv_data->on_start_callback = on_start_callback;\r
+       temp_priv_data->on_destroy_callback = on_destroy_callback;\r
+       temp_priv_data->destroy_callback_param = callback_param;\r
+       temp_priv_data->need_navi = navi;\r
+       temp_priv_data->need_parent = parent;\r
+       temp_priv_data->need_ug_lists = ugs_array_data;\r
+       local_priv_data = cbs.priv = temp_priv_data;\r
+\r
+       struct ui_gadget *ug = ug_create(parent_ui_gadget, PKGNAME_CONTACT_UG, UG_MODE_FULLVIEW, bd, &cbs);\r
+       temp_priv_data->need_ug = ug;\r
+       if (ug == NULL) {\r
+               free(temp_priv_data);\r
+               local_priv_data = NULL;\r
+               CALL_UI_DEBUG("_vcui_doc_launch_contact_list_ug fail");\r
+       } else {\r
+               struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+               pugs_array->ug_count = pugs_array->ug_count + 1;\r
+               pugs_array->last_ug_type = VCUI_UG_TYPE_CONTACT_LIST;\r
+               pugs_array->ug_lists = eina_list_append(pugs_array->ug_lists, (void *)ug);\r
+       }\r
+       bundle_free(bd);\r
+       CALL_UI_DEBUG("_vcui_doc_launch_contact_list_ug end");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_phoneui_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)\r
+{\r
+       __vcui_doc_launch_ug_common_layout_cb(ug, mode, priv);\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_phoneui_layout_cb success");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_phoneui_destroy_cb(struct ui_gadget *ug, void *priv)\r
+{\r
+       __vcui_doc_launch_ug_common_destroy_cb(ug, priv);\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_phoneui_destroy_cb success");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_phoneui_result_cb(struct ui_gadget *ug, bundle *result, void *priv)\r
+{\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_phoneui_result_cb nothing");\r
+}\r
+\r
+void _vcui_doc_launch_phoneui_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data)\r
+{\r
+       CALL_UI_DEBUG("launch_PHONEUI UG start");\r
+       bundle *bd = bundle_create();\r
+\r
+       if (bd == NULL) {\r
+               CALL_UI_DEBUG("bundle_craete() return NULL");\r
+               return;\r
+       }\r
+\r
+       bundle_add(bd, "type", "1");\r
+\r
+       struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+       if (pugs_array->last_ug_type == VCUI_UG_TYPE_ADD_CALL) {\r
+               CALL_UI_DEBUG("launch exit because of same ug execution");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       struct ug_cbs cbs = { 0, };\r
+       cbs.layout_cb = __vcui_doc_launch_ug_phoneui_layout_cb;\r
+       cbs.destroy_cb = __vcui_doc_launch_ug_phoneui_destroy_cb;\r
+       cbs.result_cb = __vcui_doc_launch_ug_phoneui_result_cb;\r
+\r
+       struct vcui_ug_priv_data *temp_priv_data = malloc(sizeof(struct vcui_ug_priv_data));\r
+       if (temp_priv_data == NULL) {\r
+               CALL_UI_DEBUG("malloc error.\n");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       temp_priv_data->on_start_callback = on_start_callback;\r
+       temp_priv_data->on_destroy_callback = on_destroy_callback;\r
+       temp_priv_data->destroy_callback_param = callback_param;\r
+       temp_priv_data->need_navi = navi;\r
+       temp_priv_data->need_parent = parent;\r
+       temp_priv_data->need_ug_lists = ugs_array_data;\r
+       local_priv_data = cbs.priv = temp_priv_data;\r
+\r
+       struct ui_gadget *ug = ug_create(parent_ui_gadget, PKGNAME_DIALER_UG, UG_MODE_FULLVIEW, bd, &cbs);\r
+       temp_priv_data->need_ug = ug;\r
+       if (ug == NULL) {\r
+               free(temp_priv_data);\r
+               local_priv_data = NULL;\r
+               CALL_UI_DEBUG("_vcui_doc_launch_contact_list_ug fail");\r
+       } else {\r
+               struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+               pugs_array->ug_count = pugs_array->ug_count + 1;\r
+               pugs_array->last_ug_type = VCUI_UG_TYPE_ADD_CALL;\r
+               pugs_array->ug_lists = eina_list_append(pugs_array->ug_lists, (void *)ug);\r
+       }\r
+       bundle_free(bd);\r
+       CALL_UI_DEBUG("_vcui_doc_launch_contact_list_ug end");\r
+}\r
+\r
+static void __vcui_doc_launch_render_flush_post_cb(void *data, Evas *e, void *event_info)\r
+{\r
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;\r
+       if (!ad)\r
+               return;\r
+\r
+       edje_object_signal_emit(_EDJ(ad->ly), "elm,state,show", "");\r
+       evas_event_callback_del(e, EVAS_CALLBACK_RENDER_FLUSH_POST, __vcui_doc_launch_render_flush_post_cb);\r
+}\r
+\r
+void _vcui_doc_launch_msg_composer(void *data, char *number)\r
+{\r
+       CALL_UI_DEBUG("..");\r
+\r
+       bundle *kb;\r
+       kb = bundle_create();\r
+\r
+       bundle_add(kb, "type", "compose");\r
+       bundle_add(kb, "TO", number);\r
+       aul_launch_app(MSG_PKG, kb);\r
+       bundle_free(kb);\r
+}\r
+\r
+void _vcui_doc_launch_destroy_ug_all(void *ugs_array_data)\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       Evas_Object *base;\r
+\r
+       struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+       if (pugs_array != NULL) {\r
+               pugs_array->ug_lists = eina_list_free(pugs_array->ug_lists);\r
+               pugs_array->ug_count = 0;\r
+               pugs_array->last_ug_type = VCUI_UG_TYPE_NOE;\r
+\r
+#ifdef _LOCAL_UG_EFFECT_\r
+               if (local_priv_data->need_ug != NULL) {\r
+                       CALL_UI_DEBUG("__vcui_doc_launch_ug_common_hide_effect_finished start");\r
+                       base = local_priv_data->need_layout;\r
+\r
+                       if (base != NULL) {\r
+                               evas_object_hide(base);\r
+                               elm_objectt_part_content_unset(base, "elm.swallow.content");\r
+                               evas_object_del(base);\r
+                       }\r
+                       if (local_priv_data->on_destroy_callback != NULL)\r
+                               local_priv_data->on_destroy_callback(local_priv_data->destroy_callback_param);\r
+\r
+                       ug_destroy_all();\r
+\r
+                       if (ad->contact_ug != NULL) {\r
+                               ad->contact_ug = NULL;\r
+                               _vcui_view_common_call_terminate_or_view_change();\r
+                       }\r
+\r
+                       free(local_priv_data);\r
+                       local_priv_data = NULL;\r
+\r
+                       CALL_UI_DEBUG("__vcui_doc_launch_ug_common_hide_effect_finished end");\r
+               }\r
+#else\r
+               ug_destroy_all();\r
+\r
+               if (ad->contact_ug != NULL) {\r
+                       ad->contact_ug = NULL;\r
+                       _vcui_view_common_call_terminate_or_view_change();\r
+               }\r
+\r
+               if (local_priv_data != NULL) {\r
+                       free(local_priv_data);\r
+                       local_priv_data = NULL;\r
+               }\r
+#endif\r
+       }\r
+}\r
+\r
+static void __vcui_doc_launch_ug_contact_layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)\r
+{\r
+       __vcui_doc_launch_ug_common_layout_cb(ug, mode, priv);\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_contact_layout_cb success");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_contact_result_cb(struct ui_gadget *ug, bundle *result, void *priv)\r
+{\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_phoneui_result_cb nothing");\r
+}\r
+\r
+static void __vcui_doc_launch_ug_contact_destroy_cb(struct ui_gadget *ug, void *priv)\r
+{\r
+       CALL_UI_DEBUG("__vcui_doc_launch_ug_contact_destroy_cb..");\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       __vcui_doc_launch_ug_common_destroy_cb(ug, priv);\r
+       ad->contact_ug = NULL;\r
+       _vcui_view_common_call_terminate_or_view_change();\r
+}\r
+\r
+void _vcui_doc_launch_add_to_contacts_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data, void *data)\r
+{\r
+       CALL_UI_DEBUG("launch_ADD_TO_CONTACTS UG start");\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       bundle *bd = bundle_create();\r
+       char buf[4] = {0,};\r
+\r
+       if (bd == NULL) {\r
+               CALL_UI_DEBUG("bundle_craete() return NULL");\r
+               return;\r
+       }\r
+\r
+       snprintf(buf, sizeof(buf), "%d", CT_UG_REQUEST_ADD_WITH_NUM);\r
+       bundle_add(bd, CT_UG_BUNDLE_TYPE, buf); /*CT_UG_REQUEST_ADD_WITH_NUM*/\r
+       CALL_UI_DEBUG("number %s", (char*) data);\r
+       bundle_add(bd, CT_UG_BUNDLE_NUM, (char*) data);\r
+\r
+       struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+       if (pugs_array->last_ug_type == VCUI_UG_TYPE_ADD_TO_CONTACTS) {\r
+               CALL_UI_DEBUG("launch exit because of same ug execution");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       struct ug_cbs cbs = { 0, };\r
+       cbs.layout_cb = __vcui_doc_launch_ug_contact_layout_cb;\r
+       cbs.destroy_cb = __vcui_doc_launch_ug_contact_destroy_cb;\r
+       cbs.result_cb = __vcui_doc_launch_ug_contact_result_cb;\r
+\r
+       struct vcui_ug_priv_data *temp_priv_data = malloc(sizeof(struct vcui_ug_priv_data));\r
+       if (temp_priv_data == NULL) {\r
+               CALL_UI_DEBUG("malloc error.\n");\r
+               bundle_free(bd);\r
+               return;\r
+       }\r
+       temp_priv_data->on_start_callback = on_start_callback;\r
+       temp_priv_data->on_destroy_callback = on_destroy_callback;\r
+       temp_priv_data->destroy_callback_param = callback_param;\r
+       temp_priv_data->need_navi = navi;\r
+       temp_priv_data->need_parent = parent;\r
+       temp_priv_data->need_ug_lists = ugs_array_data;\r
+       local_priv_data = cbs.priv = temp_priv_data;\r
+\r
+       struct ui_gadget *ug = ug_create(parent_ui_gadget, ADD_TO_CONTACTS_UG, UG_MODE_FULLVIEW, bd, &cbs);\r
+       temp_priv_data->need_ug = ug;\r
+       if (ug == NULL) {\r
+               free(temp_priv_data);\r
+               local_priv_data = NULL;\r
+               CALL_UI_DEBUG("_vcui_doc_launch_add_to_contacts_ug fail");\r
+       } else {\r
+               struct vcui_ugs_array *pugs_array = (struct vcui_ugs_array *)ugs_array_data;\r
+               pugs_array->ug_count = pugs_array->ug_count + 1;\r
+               pugs_array->last_ug_type = VCUI_UG_TYPE_ADD_TO_CONTACTS;\r
+               pugs_array->ug_lists = eina_list_append(pugs_array->ug_lists, (void *)ug);\r
+               ad->contact_ug = ug;\r
+       }\r
+       bundle_free(bd);\r
+       CALL_UI_DEBUG("_vcui_doc_launch_add_to_contacts_ug end");\r
+}\r
diff --git a/ui/vcui-doc-launch.h b/ui/vcui-doc-launch.h
new file mode 100755 (executable)
index 0000000..5ccaa70
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "ui-gadget.h"
+
+#ifndef _VCUI_DOC_LAUNCH_
+#define _VCUI_DOC_LAUNCH_
+
+#define PKGNAME_CONTACT_UG     "contacts-list-efl"
+#define PKGNAME_DIALER_UG      "phoneui-efl"
+
+typedef enum {
+       VCUI_UG_TYPE_NOE = 0,
+       VCUI_UG_TYPE_CONTACT_LIST,
+       VCUI_UG_TYPE_ADD_CALL,
+       VCUI_UG_TYPE_ADD_TO_CONTACTS,
+       VCUI_UG_TYPE_MAX
+} vcui_ug_type;
+
+struct vcui_ugs_array {
+       int ug_count;
+       int last_ug_type;
+       Eina_List *ug_lists;
+};
+
+struct vcui_ug_priv_data {
+       void (*on_start_callback) (void *);
+       void (*on_destroy_callback) (void *);
+       void *destroy_callback_param;
+       void *need_navi;
+       void *need_parent;
+       void *need_layout;
+       void *need_ug;
+       void *need_ug_lists;
+};
+
+void _vcui_doc_launch_contact_list_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data);
+void _vcui_doc_launch_phoneui_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data);
+void _vcui_doc_launch_add_to_contacts_ug(void *parent_ui_gadget, void *navi, void *parent, void (*on_start_callback) (void *), void (*on_destroy_callback) (void *), void *callback_param, void *ugs_array_data, void *data);
+
+void _vcui_doc_launch_msg_composer(void *data, char *number);
+void _vcui_doc_launch_destroy_ug_all(void *ugs_array_data);
+
+#endif
diff --git a/ui/vcui-document.c b/ui/vcui-document.c
new file mode 100755 (executable)
index 0000000..b518a52
--- /dev/null
@@ -0,0 +1,501 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#include "vcui-application.h"\r
+#include "vcui-document.h"\r
+\r
+static call_data_t *recent_mo;\r
+static call_data_t *recent_mt;\r
+static call_data_t *recent_mt_mo;\r
+static Eina_List *caller_list;\r
+\r
+void _vcui_doc_recent_init()\r
+{\r
+       recent_mo = NULL;\r
+       recent_mt = NULL;\r
+       recent_mt_mo = NULL;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_recent_mo()\r
+{\r
+       return recent_mo;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_recent_mt()\r
+{\r
+       return recent_mt;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_all_recent()\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       if (recent_mt_mo == NULL) {\r
+               CALL_UI_DEBUG("recent is NULL");\r
+               if (recent_mo != NULL) {\r
+                       recent_mt_mo = recent_mo;\r
+                       CALL_UI_DEBUG("recent is mo");\r
+               } else if (recent_mt != NULL) {\r
+                       recent_mt_mo = recent_mt;\r
+                       CALL_UI_DEBUG("recent is mt");\r
+               }\r
+       }\r
+       return recent_mt_mo;\r
+}\r
+\r
+void _vcui_doc_set_all_recent(call_data_t *in)\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       if (in == NULL) {\r
+               CALL_UI_DEBUG("set recent_mt_mo to null");\r
+       }\r
+       recent_mt_mo = in;\r
+}\r
+\r
+void _vcui_doc_set_mo_recent(call_data_t *in)\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       if (in == NULL) {\r
+               CALL_UI_DEBUG("set recent_mo to null");\r
+       }\r
+       if (recent_mo != NULL && recent_mo->call_handle == NO_HANDLE) {\r
+               CALL_UI_DEBUG("Set_recent 1");\r
+               free(recent_mo);\r
+               recent_mo = NULL;\r
+       }\r
+       _vcui_doc_set_all_recent(in);\r
+       recent_mo = in;\r
+}\r
+\r
+void _vcui_doc_set_mt_recent(call_data_t *in)\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       if (in == NULL) {\r
+               CALL_UI_DEBUG("set recent_mt to null");\r
+       }\r
+       _vcui_doc_set_all_recent(in);\r
+       recent_mt = in;\r
+}\r
+\r
+void _vcui_doc_caller_list_init()\r
+{\r
+       caller_list = NULL;\r
+}\r
+\r
+int _vcui_doc_is_call_data(call_data_t *in)\r
+{\r
+       if (in == NULL)\r
+               return EINA_FALSE;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd == in) {\r
+                       return EINA_TRUE;\r
+               }\r
+       }\r
+\r
+       return EINA_FALSE;\r
+}\r
+\r
+void _vcui_doc_add_call_data(call_data_t *in)\r
+{\r
+       if (in == NULL)\r
+               return;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd == in) {\r
+                       return;\r
+               }\r
+       }\r
+\r
+       caller_list = eina_list_append(caller_list, (void *)in);\r
+}\r
+\r
+void _vcui_doc_update_call_data(call_data_t *in)\r
+{\r
+       if (in == NULL)\r
+               return;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd == in) {\r
+                       *cd = *in;\r
+                       return;\r
+               }\r
+       }\r
+}\r
+\r
+void _vcui_doc_remove_all_data()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       free(cd);\r
+                       cd = NULL;\r
+               }\r
+       }\r
+       eina_list_free(caller_list);\r
+       caller_list = NULL;\r
+}\r
+\r
+call_data_t *_vcui_doc_remove_call_data_only_list(call_data_t *in)\r
+{\r
+       if (in == NULL) {\r
+               CALL_UI_DEBUG("Call data is Null");\r
+               return NULL;\r
+       }\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd == in) {\r
+                       caller_list = eina_list_remove(caller_list, in);\r
+                       return in;\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+void _vcui_doc_remove_call_data(call_data_t *in)\r
+{\r
+       if (in == NULL) {\r
+               CALL_UI_DEBUG("Call data is Null");\r
+               return;\r
+       }\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd == in) {\r
+                       if (in == _vcui_doc_get_recent_mo())\r
+                               _vcui_doc_set_mo_recent(NULL);\r
+                       if (in == _vcui_doc_get_recent_mt())\r
+                               _vcui_doc_set_mt_recent(NULL);\r
+\r
+                       caller_list = eina_list_remove(caller_list, in);\r
+                       free(in);\r
+                       in = NULL;\r
+                       CALL_UI_DEBUG("Call data removed");\r
+                       break;\r
+               }\r
+\r
+       }\r
+\r
+       if (_vcui_doc_get_count() == 0) {\r
+               eina_list_free(caller_list);\r
+               caller_list = NULL;\r
+       }\r
+\r
+}\r
+\r
+call_data_t *_vcui_doc_get_call_handle(int handle)\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->call_handle == handle) {\r
+                               return cd;\r
+                       }\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_first_unhold()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_UNHOLD) {\r
+                               return cd;\r
+                       }\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_first_hold()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_HOLD) {\r
+                               return cd;\r
+                       }\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_last_status(int call_status)\r
+{\r
+\r
+       Eina_List *l;\r
+       call_data_t *fast_cd = NULL;\r
+       call_data_t *cd;\r
+       int i = 0;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == call_status) {\r
+                               if (i == 0) {\r
+                                       fast_cd = cd;\r
+                                       i++;\r
+                                       continue;\r
+                               } else {\r
+                                       if (fast_cd->start_time > cd->start_time) {\r
+                                               fast_cd = cd;\r
+                                       }\r
+                               }\r
+                               i++;\r
+                       }\r
+               }\r
+       }\r
+       return fast_cd;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_last_type_mo()\r
+{\r
+\r
+       Eina_List *l;\r
+       call_data_t *last_cd = NULL;\r
+       call_data_t *cd;\r
+       int i = 0;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->mo_mt_status == CALL_OUTGOING) {\r
+                               if (i == 0) {\r
+                                       last_cd = cd;\r
+                                       i++;\r
+                                       continue;\r
+                               } else {\r
+                                       if (last_cd->start_time < cd->start_time) {\r
+                                               last_cd = cd;\r
+                                       }\r
+                               }\r
+                               i++;\r
+                       }\r
+               }\r
+       }\r
+       return last_cd;\r
+}\r
+\r
+call_data_t *_vcui_doc_get_first()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd)\r
+           if (cd != NULL) {\r
+               return cd;\r
+       }\r
+       return NULL;\r
+}\r
+\r
+void _vcui_doc_set_unhold_all()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_HOLD) {\r
+                               cd->caller_status = CALL_UNHOLD;\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+void _vcui_doc_set_hold_all()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_UNHOLD) {\r
+                               cd->caller_status = CALL_HOLD;\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+void _vcui_doc_set_swap_all()\r
+{\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_HOLD) {\r
+                               cd->caller_status = CALL_UNHOLD;\r
+                       } else if (cd->caller_status == CALL_UNHOLD) {\r
+                               cd->caller_status = CALL_HOLD;\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+int _vcui_doc_get_show_callstatus()\r
+{\r
+       if (_vcui_doc_get_count() > 1) {\r
+               if (_vcui_doc_get_count_hold() > 1)\r
+                       return CALL_HOLD;\r
+               else\r
+                       return CALL_UNHOLD;\r
+       } else\r
+               return CALL_UNHOLD;\r
+}\r
+\r
+int _vcui_doc_get_count()\r
+{\r
+       int i = eina_list_count(caller_list);\r
+       return i;\r
+}\r
+\r
+int _vcui_doc_get_count_hold()\r
+{\r
+       int i = 0;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_HOLD) {\r
+                               i++;\r
+                       }\r
+               }\r
+       }\r
+       CALL_UI_DEBUG("(%d)",i);\r
+       return i;\r
+}\r
+\r
+int _vcui_doc_get_count_unhold()\r
+{\r
+       int i = 0;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_UNHOLD) {\r
+                               i++;\r
+                       }\r
+               }\r
+       }\r
+       CALL_UI_DEBUG("(%d)",i);\r
+       return i;\r
+}\r
+\r
+int _vcui_doc_get_count_nostatus()\r
+{\r
+       int i = 0;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == NO_STATUS) {\r
+                               i++;\r
+                       }\r
+               }\r
+       }\r
+       return i;\r
+}\r
+\r
+Eina_List *_vcui_doc_get_hold_caller()\r
+{\r
+       if (_vcui_doc_get_count() == 0)\r
+               return NULL;\r
+       Eina_List *hold_list = NULL;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       if (cd->caller_status == CALL_HOLD) {\r
+                               hold_list = eina_list_append(hold_list, cd);\r
+                       }\r
+               }\r
+       }\r
+       return hold_list;\r
+}\r
+\r
+Eina_List *_vcui_doc_get_unhold_caller()\r
+{\r
+       if (_vcui_doc_get_count() == 0)\r
+               return NULL;\r
+       Eina_List *unhold_list = NULL;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       CALL_UI_DEBUG("_vcui_doc_get_unhold_caller");\r
+                       if (cd->caller_status == CALL_UNHOLD) {\r
+                               CALL_UI_DEBUG("find it");\r
+                               unhold_list = eina_list_append(unhold_list, cd);\r
+                       }\r
+               }\r
+       }\r
+       return unhold_list;\r
+}\r
+\r
+Eina_List *_vcui_doc_get_caller()\r
+{\r
+       if (_vcui_doc_get_count() == 0)\r
+               return NULL;\r
+\r
+       Eina_List *list = NULL;\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               list = eina_list_append(list, cd);\r
+       }\r
+       return list;\r
+}\r
+\r
+void _vcui_doc_all_print_address()\r
+{\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       CALL_UI_DEBUG("----------address----------");\r
+       CALL_UI_DEBUG("View Data : DIALING VIEW %p", ad->view_st[VIEW_DIALLING_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCOMING VIEW %p", ad->view_st[VIEW_INCOMING_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCOMING LOCK VIEW %p", ad->view_st[VIEW_INCOMING_LOCK_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCALL ONEVIEW %p", ad->view_st[VIEW_INCALL_ONECALL_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCALL MULTIVIEW SPLIT %p", ad->view_st[VIEW_INCALL_MULTICALL_SPLIT_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCALL MULTIVIEW CONF %p", ad->view_st[VIEW_INCALL_MULTICALL_CONF_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCALL MULTIVIEW LIST %p", ad->view_st[VIEW_INCALL_MULTICALL_LIST_VIEW]);\r
+       CALL_UI_DEBUG("View Data : INCALL KEYPAD %p", ad->view_st[VIEW_INCALL_KEYPAD_VIEW]);\r
+       CALL_UI_DEBUG(" --------------------------");\r
+\r
+}\r
+\r
+void _vcui_doc_all_print(char *msg_pos)\r
+{\r
+       CALL_UI_DEBUG(" --------%s------------", msg_pos);\r
+       Eina_List *l;\r
+       call_data_t *cd;\r
+       EINA_LIST_FOREACH(caller_list, l, cd) {\r
+               if (cd != NULL) {\r
+                       CALL_UI_DEBUG(" call_handle %d", cd->call_handle);\r
+                       CALL_UI_DEBUG(" call_num %s", cd->call_num);\r
+                       CALL_UI_DEBUG(" call_display %s", cd->call_display);\r
+                       CALL_UI_DEBUG(" call_file_path %s", cd->call_file_path);\r
+                       CALL_UI_DEBUG(" call_full_file_path %s", cd->call_full_file_path);\r
+                       CALL_UI_DEBUG(" caller_status %d", cd->caller_status);\r
+                       CALL_UI_DEBUG(" call_time %d", (int)(cd->start_time));\r
+               }\r
+       }\r
+       CALL_UI_DEBUG(" --------------------------");\r
+}\r
+\r
diff --git a/ui/vcui-document.h b/ui/vcui-document.h
new file mode 100755 (executable)
index 0000000..7d52d7d
--- /dev/null
@@ -0,0 +1,87 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VOICE_CALL_UI_VIEW_DOCUMENT\r
+#define _VOICE_CALL_UI_VIEW_DOCUMENT\r
+\r
+typedef struct _call_data_t {\r
+       unsigned char call_handle;\r
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];\r
+       char call_display[VC_DISPLAY_NAME_LENGTH_MAX];\r
+       char call_file_path[VC_IMAGE_PATH_LENGTH_MAX];\r
+       char call_full_file_path[VC_IMAGE_PATH_LENGTH_MAX];\r
+       int caller_status;\r
+       time_t start_time;\r
+\r
+       int mo_mt_status;\r
+\r
+       int contact_id;\r
+       int contact_phone_type;\r
+       gboolean bno_end_show;  /* multi list end */\r
+} call_data_t;\r
+\r
+int _vcui_doc_get_count_hold();\r
+int _vcui_doc_get_count_unhold();\r
+int _vcui_doc_get_count_nostatus();\r
+\r
+int _vcui_doc_is_call_data(call_data_t *in);\r
+void _vcui_doc_add_call_data(call_data_t *in);\r
+void _vcui_doc_update_call_data(call_data_t *in);\r
+void _vcui_doc_remove_call_data(call_data_t *in);\r
+void _vcui_doc_remove_all_data();\r
+call_data_t *_vcui_doc_remove_call_data_only_list(call_data_t *in);\r
+\r
+call_data_t *_vcui_doc_get_call_handle(int handle);\r
+\r
+int _vcui_doc_get_count();\r
+\r
+Eina_List *_vcui_doc_get_hold_caller();\r
+Eina_List *_vcui_doc_get_unhold_caller();\r
+Eina_List *_vcui_doc_get_caller();\r
+\r
+call_data_t *_vcui_doc_get_last_status(int call_status);\r
+call_data_t *_vcui_doc_get_last_type_mo();\r
+\r
+void _vcui_doc_caller_list_init();\r
+call_data_t *_vcui_doc_get_first();\r
+\r
+call_data_t *_vcui_doc_get_first_hold();\r
+call_data_t *_vcui_doc_get_first_unhold();\r
+\r
+void _vcui_doc_recent_init();\r
+call_data_t *_vcui_doc_get_recent_mo();\r
+call_data_t *_vcui_doc_get_recent_mt();\r
+call_data_t *_vcui_doc_get_all_recent();\r
+void _vcui_doc_set_all_recent(call_data_t *in);\r
+void _vcui_doc_set_mo_recent(call_data_t *in);\r
+void _vcui_doc_set_mt_recent(call_data_t *in);\r
+\r
+void _vcui_doc_set_unhold_all();\r
+void _vcui_doc_set_hold_all();\r
+void _vcui_doc_set_swap_all();\r
+\r
+int _vcui_doc_get_show_callstatus();\r
+\r
+void _vcui_doc_all_print(char *);\r
+void _vcui_doc_all_print_address();\r
+\r
+int get_status_backhide();\r
+int get_status_delete();\r
+void add_status(int in);\r
+int get_status_all();\r
+#endif\r
+\r
diff --git a/ui/vcui-engine-interface.c b/ui/vcui-engine-interface.c
new file mode 100755 (executable)
index 0000000..db246d2
--- /dev/null
@@ -0,0 +1,1113 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-engine-interface.h"
+#include "vcui-view-dialing.h"
+
+/* For Debug Information, Call Event name string constant */
+static char *gszcall_callback_msg[VC_ENGINE_MSG_MAX_TO_UI] = {
+       "VC_ENGINE_MSG_INCOM_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI_TEST",
+       "VC_ENGINE_MSG_OUTGOING_ALERT_TO_UI",
+       "VC_ENGINE_MSG_CONNECTED_TO_UI",
+       "VC_ENGINE_MSG_NORMAL_END_TO_UI",
+       "VC_ENGINE_MSG_INCOM_END_TO_UI",
+       "VC_ENGINE_MSG_REJECTED_END_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_END_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_END_SIGNAL_PLAY_TO_UI",
+       "VC_ENGINE_MSG_OUTGOING_ABORTED_TO_UI",
+       "VC_ENGINE_MSG_DTMF_ACK_TO_UI",
+
+       "VC_ENGINE_MSG_SS_HELD_TO_UI",
+       "VC_ENGINE_MSG_SS_RETREIVED_TO_UI",
+       "VC_ENGINE_MSG_SS_SWAP_TO_UI",
+       "VC_ENGINE_MSG_SS_SETUP_CONF_TO_UI",
+       "VC_ENGINE_MSG_SS_SPLIT_CONF_TO_UI",
+       "VC_ENGINE_MSG_SS_TRANSFERRED_TO_UI",
+       "VC_ENGINE_MSG_SS_CONNECT_LINE_IND_TO_UI",
+
+       "VC_ENGINE_MSG_IND_FORWARD_TO_UI",
+       "VC_ENGINE_MSG_IND_ACTIVATE_TO_UI",
+       "VC_ENGINE_MSG_IND_HOLD_TO_UI",
+       "VC_ENGINE_MSG_IND_TRANSFER_TO_UI",
+       "VC_ENGINE_MSG_IND_SETUPCONFERENCE_TO_UI",
+       "VC_ENGINE_MSG_IND_BARRING_TO_UI",
+       "VC_ENGINE_MSG_IND_WAITING_TO_UI",
+       "VC_ENGINE_MSG_IND_CUGINFO_TO_UI",
+       "VC_ENGINE_MSG_IND_SSNOTIFY_TO_UI",
+       "VC_ENGINE_MSG_IND_CALLINGNAMEINFO_TO_UI",
+       "VC_ENGINE_MSG_IND_REDIRECT_CNF_TO_UI",
+       "VC_ENGINE_MSG_IND_ACTIVATECCBS_CNF_TO_UI",
+       "VC_ENGINE_MSG_IND_ACTIVATECCBS_USERINFO_TO_UI",
+       "VC_ENGINE_MSG_IND_AOC_TO_UI",
+
+       "VC_ENGINE_MSG_ERROR_OCCURED_TO_UI",
+
+       "VC_ENGINE_MSG_ACTION_INCOM_FORCE_TO_UI",
+       "VC_ENGINE_MSG_ACTION_SAT_REQUEST_TO_UI",
+       "VC_ENGINE_MSG_ACTION_SAT_RESPONSE_TO_UI",
+       "VC_ENGINE_MSG_ACTION_CALL_END_HELD_RETREIVED_TO_UI",
+       "VC_ENGINE_MSG_ACTION_NO_ACTIVE_TASK_TO_UI",
+
+       "VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI",
+       "VC_ENGINE_MSG_SET_VOLUME_FROM_BT_TO_UI",
+       "VC_ENGINE_MSG_HEADSET_STATUS_TO_UI",
+       "VC_ENGINE_MSG_EARJACK_STATUS_TO_UI",
+
+       "VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI",
+       "VC_ENGINE_MSG_MESSAGE_BOX_TO_UI",
+
+       "VC_ENGINE_MSG_REDIAL_TO_UI",
+       "VC_ENGINE_MSG_STOPPED_RECORDING_TO_UI",
+       "VC_ENGINE_MSG_CREATE_NEWVOICEFILE_TO_UI",
+};
+
+static char *gszcall_error_msg[IDS_CALL_MAX] = {
+       "IDS_CALL_POP_CALL_IS_DIVERTED",
+       "IDS_CALL_POP_CALLFAILED",
+       "IDS_CALL_POP_CALLING_EMERG_ONLY",
+       "IDS_CALL_POP_CALLNOTCALLOWED",
+       "IDS_CALL_POP_CAUSE_WRONG_NUMBER",
+       "IDS_CALL_POP_CHANGEOFFLINEMODETOCALL",
+       "IDS_CALL_POP_DTMFSENDING_FAIL",
+       "IDS_CALL_POP_FDNCALLONLY",
+       "IDS_CALL_POP_HOLD_FAILED",
+       "IDS_CALL_POP_HOLD_NOT_SUPPORTED",
+       "IDS_CALL_POP_INCOMPLETE",
+       "IDS_CALL_POP_JOIN_FAILED",
+       "IDS_CALL_POP_JOIN_NOT_SUPPORTED",
+       "IDS_CALL_POP_OPERATION_REFUSED",
+       "IDS_CALL_POP_PHONE_NOT_INITIALISED",
+       "IDS_CALL_POP_REJECTED",
+       "IDS_CALL_POP_SENDING",
+       "IDS_CALL_POP_SOS_CALL_ONLY_IN_NO_SIM_MODE",
+       "IDS_CALL_POP_SPLIT_FAILED",
+       "IDS_CALL_POP_SPLIT_NOT_SUPPORTED",
+       "IDS_CALL_POP_SWAP_FAILED",
+       "IDS_CALL_POP_SWAP_NOT_SUPPORTED",
+       "IDS_CALL_POP_TRANSFER_FAILED",
+       "IDS_CALL_POP_TRANSFER_NOT_SUPPORTED",
+       "IDS_CALL_POP_UNABLE_TO_RETRIEVE",
+       "IDS_CALL_POP_UNAVAILABLE",
+       "IDS_CALL_POP_UNHOLD_NOT_SUPPORTED",
+       "IDS_CALL_POP_VOICE_CALL_IS_NOT_ALLOWED_DURING_VIDEO_CALL",
+       "IDS_CALL_POP_WAITING_ACTIVE",
+       "IDS_CALL_BODY_CALLENDED",
+       "Invalid DTMF",
+       "Sent"
+};
+
+void _vcui_engine_init(vcui_app_call_data_t *ad)
+{
+       CALL_UI_DEBUG("..");
+       vcall_engine_init((vcall_engine_app_cb) _vcui_engine_callback, ad);
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_answer_call(void)
+{
+       int ret = VCALL_ENGINE_API_SUCCESS;
+
+       CALL_UI_DEBUG("..");
+
+       ret = vcall_engine_answer_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_answer_call_by_type(int ans_type)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_answer_call_by_type(ans_type);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_cancel_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_cancel_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_reject_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_reject_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_set_volume_level(vcui_vol_type_t vol_type, int level)
+{
+       int vol = 0;
+       vcall_engine_vol_type_t engine_vol_type = VCALL_ENGINE_VOL_TYPE_RINGTONE;
+       CALL_UI_DEBUG("..");
+
+       if (vol_type == VCUI_VOL_RING) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_RINGTONE;
+       } else if (vol_type == VCUI_VOL_VOICE) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_VOICE;
+       } else if (vol_type == VCUI_VOL_HEADSET) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_HEADSET;
+       }
+
+       vol = vcall_engine_set_volume_level(engine_vol_type, level);
+       CALL_UI_DEBUG("End..");
+}
+
+int _vcui_engine_get_volume_level(vcui_vol_type_t vol_type)
+{
+       int vol = 0;
+       vcall_engine_vol_type_t engine_vol_type = VCALL_ENGINE_VOL_TYPE_RINGTONE;
+       CALL_UI_DEBUG("vol_type(%d)", vol_type);
+
+       if (vol_type == VCUI_VOL_RING) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_RINGTONE;
+       } else if (vol_type == VCUI_VOL_VOICE) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_VOICE;
+       } else if (vol_type == VCUI_VOL_HEADSET) {
+               engine_vol_type = VCALL_ENGINE_VOL_TYPE_HEADSET;
+       }
+
+       vol = vcall_engine_get_volume_level(engine_vol_type);
+       CALL_UI_DEBUG("End..");
+
+       return vol;
+}
+
+void _vcui_engine_change_sound_path(vcui_audio_type_t sound_path)
+{
+       int ret = 0;
+       vcall_engine_audio_type_t rqst_snd_path = VCALL_ENGINE_AUDIO_NONE;
+       CALL_UI_DEBUG("sound_path(%d)", sound_path);
+
+       if (sound_path == VCUI_AUDIO_SPEAKER) {
+               rqst_snd_path = VCALL_ENGINE_AUDIO_SPEAKER;
+       } else if (sound_path == VCUI_AUDIO_HEADSET) {
+               rqst_snd_path = VCALL_ENGINE_AUDIO_HEADSET;
+       } else if (sound_path == VCUI_AUDIO_EARJACK) {
+               rqst_snd_path = VCALL_ENGINE_AUDIO_EARJACK;
+       }
+
+       vcall_engine_change_sound_path(rqst_snd_path);
+       CALL_UI_DEBUG("End..");
+}
+
+vcui_audio_type_t _vcui_engine_get_sound_path(void)
+{
+       int ret = 0;
+       int snd_path = VCALL_ENGINE_AUDIO_NONE;
+
+       ret = vcall_engine_get_sound_path(&snd_path);
+
+       if (snd_path == VCALL_ENGINE_AUDIO_SPEAKER) {
+               return VCUI_AUDIO_SPEAKER;
+       } else if (snd_path == VCALL_ENGINE_AUDIO_HEADSET) {
+               return VCUI_AUDIO_HEADSET;
+       } else if (snd_path == VCALL_ENGINE_AUDIO_EARJACK) {
+               return VCUI_AUDIO_EARJACK;
+       } else if (snd_path == VCALL_ENGINE_AUDIO_RECEIVER) {
+               return VCUI_AUDIO_RECEIVER;
+       } else {
+               return VCALL_ENGINE_AUDIO_NONE;
+       }
+}
+
+void _vcui_engine_stop_alert(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_stop_alert();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_end_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_release_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_end_call_by_handle(int handle)
+{
+       CALL_UI_DEBUG("handle(%d)",handle);
+
+       vcall_engine_release_call_by_handle(handle);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_end_all_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_release_call_by_type(VCALL_ENGINE_RELEASE_ALL_CALLS);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_end_active_calls(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_release_call_by_type(VCALL_ENGINE_RELEASE_ALL_ACTIVE_CALLS);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_end_held_calls(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_release_call_by_type(VCALL_ENGINE_RELEASE_ALL_HELD_CALLS);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_hold_unhold_swap_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_process_hold_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_join_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_join_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_split_call(int call_handle)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_split_call(call_handle);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_transfer_call(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_transfer_call();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_speaker_on_off(int bLoundSpeaker)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_process_loudspeaker(bLoundSpeaker);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_mute_on_off(int bMute)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_process_voice_mute(bMute);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_interface_process_auto_redial(int bRedial)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_process_auto_redial(bRedial);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_interface_process_mute_alert(void)
+{
+       CALL_UI_DEBUG("..");
+
+       vcall_engine_mute_alert();
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_interface_send_dtmf_number(char data)
+{
+       CALL_UI_DEBUG("..");
+       char dtmf_number[2];
+
+       dtmf_number[0] = data;
+       dtmf_number[1] = '\0';
+
+       vcall_engine_send_dtmf_number(dtmf_number);
+
+       CALL_UI_DEBUG("End..");
+}
+
+void _vcui_engine_interface_process_mo_call(vcui_call_type_t call_type, vcui_call_mo_data_t *data)
+{
+       CALL_UI_DEBUG(".");
+
+       CALL_UI_KPI("vcall_engine_process_normal_call start");
+       vcui_call_mo_data_t *mocall = (vcui_call_mo_data_t *) data;
+       CALL_UI_DEBUG("number is : [%s] ", mocall->call_number);
+
+       if (call_type == VCUI_CALL_TYPE_MO)
+               vcall_engine_process_normal_call(mocall->call_number, mocall->ct_index, EINA_FALSE);
+       else if (call_type == VCUI_CALL_TYPE_DOWNLOAD_CALL)
+               vcall_engine_process_normal_call(mocall->call_number, mocall->ct_index, EINA_TRUE);
+
+       CALL_UI_KPI("vcall_engine_process_normal_call done");
+
+}
+
+void _vcui_engine_interface_process_mt_call(vcui_call_type_t call_type, vcui_call_mt_data_t *data)
+{
+       CALL_UI_KPI("vcall_engine_process_incoming_call start");
+       vcui_call_mt_data_t *mtcall = (vcui_call_mt_data_t *) data;
+       vcall_engine_incoming_info_t mtcall_info;
+       CALL_UI_DEBUG("number is : [%s] ", mtcall->call_num);
+
+       mtcall_info.call_handle = mtcall->call_handle;
+       mtcall_info.call_type = mtcall->call_type;
+       mtcall_info.cli_presentation_indicator = mtcall->cli_presentation_indicator;
+       _vc_core_util_strcpy(mtcall_info.call_num, sizeof(mtcall_info.call_num), mtcall->call_num);
+       mtcall_info.calling_name_mode = mtcall->calling_name_mode;
+       _vc_core_util_strcpy(mtcall_info.calling_name, sizeof(mtcall_info.calling_name), mtcall->calling_name);
+       _vc_core_util_strcpy(mtcall_info.redirected_number, sizeof(mtcall_info.redirected_number), mtcall->redirected_number);
+       _vc_core_util_strcpy(mtcall_info.redirected_sub_address, sizeof(mtcall_info.redirected_sub_address), mtcall->redirected_sub_address);
+       mtcall_info.cli_cause = mtcall->cli_cause;
+       mtcall_info.bfwded = mtcall->bfwded;
+       mtcall_info.active_line = mtcall->active_line;
+
+       vcall_engine_process_incoming_call(&mtcall_info);
+       CALL_UI_KPI("vcall_engine_process_incoming_call done");
+}
+
+void _vcui_engine_interface_process_ecc_call(vcui_call_type_t call_type, vcui_call_ecc_data_t *data)
+{
+       vcui_call_ecc_data_t *emercall = (vcui_call_ecc_data_t *) data;
+
+       CALL_UI_DEBUG("number is : [%s] ", emercall->call_number);
+       if (call_type == VCUI_CALL_TYPE_ECC)
+               vcall_engine_process_emergency_call(emercall->call_number);
+       else if (call_type == VCUI_CALL_TYPE_ECC_TEST)
+               vcall_engine_process_emergency_call_test(emercall->call_number);
+
+}
+
+void _vcui_engine_interface_process_sat_call(vcui_call_type_t call_type, vcui_call_sat_data_t *data)
+{
+       vcui_call_sat_data_t *satcall = (vcui_call_sat_data_t *) data;
+       vcall_engine_sat_setup_call_info_t sat_setup_call_info;
+       CALL_UI_DEBUG("..");
+
+       memset(&sat_setup_call_info, 0, sizeof(sat_setup_call_info));
+       sat_setup_call_info.command_id = satcall->command_id;
+       sat_setup_call_info.command_qualifier = satcall->command_qualifier;
+       sat_setup_call_info.duration = satcall->duration;
+       memcpy(sat_setup_call_info.disp_text, satcall->disp_text, sizeof(sat_setup_call_info.disp_text));
+       memcpy(sat_setup_call_info.call_num, satcall->call_num, VC_PHONE_NUMBER_LENGTH_MAX);
+
+       vcall_engine_process_sat_setup_call(&sat_setup_call_info);
+}
+
+void _vcui_engine_callback(int event, void *pdata, void *puser_data)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) puser_data;
+       vc_engine_msg_type *msg = (vc_engine_msg_type *)pdata;
+
+       if ((ad == NULL) || (msg == NULL)) {
+               CALL_UI_DEBUG("ERROR.NULL pointer");
+               return;
+       }
+       CALL_UI_DEBUG("@@@ event:[%s], view_top:[%d], count:[%d]  @@@ \n", gszcall_callback_msg[event], ad->view_top, _vcui_doc_get_count());
+
+       switch (event) {
+       case VC_ENGINE_MSG_INCOM_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_LOCK);
+
+                       CALL_UI_DEBUG("num:[%s], name:[%s]", msg->incoming.call_num, msg->incoming.call_name);
+
+                       call_data_t *call_data = malloc(sizeof(call_data_t));
+                       if (call_data == NULL)
+                               return;
+                       memset(call_data, 0, sizeof(call_data_t));
+
+                       call_data->call_handle = msg->incoming.call_handle;
+                       call_data->contact_id = msg->incoming.contact_index;
+                       call_data->contact_phone_type = msg->incoming.phone_type;
+                       vcall_engine_util_strcpy(call_data->call_num, sizeof(call_data->call_num), msg->incoming.call_num);
+                       if (msg->incoming.brestricted == EINA_TRUE) {
+                               if (msg->incoming.bpayphone == EINA_TRUE) {
+                                       vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, _("Payphone"));
+                               } else {
+                                       vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, dgettext("sys_string", "IDS_COM_BODY_UNKNOWN"));
+                               }
+                       } else {
+                               vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, msg->incoming.call_name);
+                       }
+
+                       if (strcmp((char *)msg->incoming.call_file_path, "default") == 0)
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else if (strlen((char *)msg->incoming.call_file_path) == 0)
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, msg->incoming.call_file_path);
+
+                       if (strcmp((char *)msg->incoming.call_full_file_path, "default") == 0)
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else if (strlen((char *)msg->incoming.call_full_file_path) == 0)
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, msg->incoming.call_full_file_path);
+
+                       call_data->caller_status = NO_STATUS;
+                       call_data->mo_mt_status = CALL_INCOMING;
+
+                       _vcui_doc_set_mt_recent(call_data);
+                       _vcui_doc_add_call_data(call_data);
+
+                       if (_vcui_is_idle_lock() == CALL_LOCK) {
+                               _vcui_view_change(VIEW_INCOMING_LOCK_VIEW, 0, NULL, NULL);
+                       } else {
+                               _vcui_view_change(VIEW_INCOMING_VIEW, 0, NULL, NULL);
+                       }
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_TO_UI:
+               {
+                       call_data_t *call_data = malloc(sizeof(call_data_t));
+                       if (call_data == NULL)
+                               return;
+                       memset(call_data, 0, sizeof(call_data_t));
+
+                       call_data->call_handle = NO_HANDLE;
+                       call_data->contact_id = msg->outgoing.contact_index;
+                       call_data->contact_phone_type = msg->outgoing.phone_type;
+                       vcall_engine_util_strcpy(call_data->call_num, VC_PHONE_NUMBER_LENGTH_MAX, msg->outgoing.call_num);
+                       vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, msg->outgoing.call_name);
+
+                       if (strcmp((char *)msg->outgoing.call_file_path, "default") == 0)
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else if (strlen((char *)msg->outgoing.call_file_path) == 0)
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, msg->outgoing.call_file_path);
+
+                       if (strcmp((char *)msg->outgoing.call_full_file_path, "default") == 0)
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else if (strlen((char *)msg->outgoing.call_full_file_path) == 0)
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                       else
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, msg->outgoing.call_full_file_path);
+
+                       call_data->caller_status = NO_STATUS;
+                       call_data->mo_mt_status = CALL_OUTGOING;
+                       call_data->start_time = time(&(call_data->start_time));
+
+                       _vcui_doc_set_mo_recent(call_data);
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI:
+               {
+                       if (_voicecall_dvc_get_proximity_sensor_state() != VCALL_SENSOR_NEAR)
+                               _voicecall_dvc_control_lcd_state(VC_LCD_ON_LOCK);
+
+                       vc_engine_outgoing_orig_type outgoing_orig = msg->outgoing_orig;
+
+                       call_data_t *call_data = _vcui_doc_get_recent_mo();
+                       call_data->call_handle = outgoing_orig.call_handle;
+
+                       if (outgoing_orig.bemergency == EINA_TRUE) {
+                               CALL_UI_DEBUG("it is emergency call");
+                               char *em_name = _("IDS_CALL_POP_EMERGENCY_CALL");
+
+                               memset(call_data->call_display, 0, sizeof(call_data->call_display));
+                               memset(call_data->call_file_path, 0, sizeof(call_data->call_file_path));
+                               memset(call_data->call_full_file_path, 0, sizeof(call_data->call_full_file_path));
+
+                               vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, em_name);
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                               call_data->contact_phone_type = -1;
+                       }
+
+                       _vcui_doc_add_call_data(call_data);
+                       _vcui_view_change(VIEW_DIALLING_VIEW, 0, NULL, NULL);
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_ORIG_TO_UI_TEST:
+               {
+                       if (_voicecall_dvc_get_proximity_sensor_state() != VCALL_SENSOR_NEAR)
+                               _voicecall_dvc_control_lcd_state(VC_LCD_ON_LOCK);
+
+                       vc_engine_outgoing_orig_type outgoing_orig = msg->outgoing_orig;
+
+                       call_data_t *call_data = _vcui_doc_get_recent_mo();
+                       call_data->call_handle = 1;
+
+                       if (outgoing_orig.bemergency == EINA_TRUE) {
+                               CALL_UI_DEBUG("it is emergency call");
+                               char *em_name = _("IDS_CALL_POP_EMERGENCY_CALL");
+
+                               memset(call_data->call_display, 0, sizeof(call_data->call_display));
+                               memset(call_data->call_file_path, 0, sizeof(call_data->call_file_path));
+                               memset(call_data->call_full_file_path, 0, sizeof(call_data->call_full_file_path));
+
+                               vcall_engine_util_strcpy(call_data->call_display, VC_DISPLAY_NAME_LENGTH_MAX, em_name);
+                               vcall_engine_util_strcpy(call_data->call_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                               vcall_engine_util_strcpy(call_data->call_full_file_path, VC_IMAGE_PATH_LENGTH_MAX, NOIMG_ICON);
+                               call_data->contact_phone_type = -1;
+                       }
+
+                       _vcui_doc_add_call_data(call_data);
+                       _vcui_view_change(VIEW_DIALLING_VIEW, 0, NULL, NULL);
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_ALERT_TO_UI:
+               {
+                       call_data_t *call_data = _vcui_doc_get_recent_mo();
+
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       }
+
+                       if (_vcui_doc_is_call_data(call_data) == EINA_FALSE) {
+                               CALL_UI_DEBUG("Error. check outgoing_orig msg.");
+                               elm_exit();
+                               return;
+                       }
+
+                       _vcui_view_dialing_draw_txt_connecting(ad->view_st[VIEW_DIALLING_VIEW]);
+               }
+               break;
+
+       case VC_ENGINE_MSG_CONNECTED_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_connected_type connected = msg->connected;
+                       call_data_t *call_data = _vcui_doc_get_call_handle(connected.call_handle);
+
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       }
+
+                       call_data->caller_status = CALL_UNHOLD;
+                       call_data->call_handle = connected.call_handle;
+                       call_data->start_time = time(&(call_data->start_time));
+
+                       /* When new call connected, if it's multiparty call, always show split1 first. */
+                       ad->bswapped = EINA_FALSE;
+
+                       _vcui_view_auto_change();
+               }
+               break;
+
+       case VC_ENGINE_MSG_NORMAL_END_TO_UI:
+               {
+                       vc_engine_normal_end_type normal_end = msg->normal_end;
+
+                       CALL_UI_DEBUG("end_cause_type:[%d]", normal_end.end_cause_type);
+
+                       call_data_t *call_data = _vcui_doc_get_call_handle(normal_end.call_handle);
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       }
+                       if (call_data->mo_mt_status == CALL_INCOMING)
+                               _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_INCOMMING, call_data, EINA_FALSE);
+                       else if (call_data->mo_mt_status == CALL_OUTGOING)
+                               _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_OUTGOING, call_data, EINA_FALSE);
+
+                       time_t start_time;
+                       memcpy(&start_time, &(call_data->start_time), sizeof(call_data->start_time));
+
+                       if (call_data->bno_end_show == EINA_TRUE) {
+                               _vcui_doc_remove_call_data(call_data);
+                               _vcui_view_common_call_terminate_or_view_change();
+                       } else {
+                               vcui_app_call_data_t *ad = _vcui_get_app_data();
+                               if (_vcui_doc_get_count() == 1 && ad->view_top == VIEW_INCALL_ONECALL_VIEW) {
+                                       ad->call_end_type = CALL_END_TYPE_SINGLE_CALL;
+                               }
+                               CALL_UI_DEBUG("ad->call_end_type[%d]", ad->call_end_type);
+                               if (ad->call_end_type == CALL_END_TYPE_SINGLE_CALL || ad->call_end_type == CALL_END_TYPE_CONF_CALL) {
+                                       CALL_UI_DEBUG("Show end screen - %d", ad->call_end_type);
+                                       _vcui_view_change(VIEW_ENDCALL_VIEW, -1, call_data, NULL);
+                                       ad->call_end_type = CALL_END_TYPE_NONE;
+                                       CALL_UI_DEBUG("Blink show: end call time");
+                                       _vcui_view_common_call_end_show(start_time, normal_end.end_cause_type);
+                                       _vcui_doc_remove_call_data(call_data);
+                               }
+                               else {
+                                       _vcui_doc_remove_call_data(call_data);
+                                       _vcui_view_common_call_terminate_or_view_change();
+                               }
+                       }
+               }
+               break;
+
+       case VC_ENGINE_MSG_INCOM_END_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_common_with_handle_type incom_end = msg->incom_end;
+
+                       call_data_t *call_data = _vcui_doc_get_call_handle(incom_end.call_handle);
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       }
+
+                       _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN, call_data, EINA_FALSE);
+                       _vcui_doc_remove_call_data(call_data);
+
+                       _vcui_view_common_call_terminate_or_view_change();
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_REJECTED_END_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_common_with_handle_type rejected_end = msg->rejected_end;
+
+                       call_data_t *call_data = _vcui_doc_get_call_handle(rejected_end.call_handle);
+
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+
+                               return;
+                       }
+
+                       _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_REJECT, call_data, EINA_FALSE);
+                       _vcui_doc_remove_call_data(call_data);
+                       _vcui_view_common_call_terminate_or_view_change();
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_END_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_outgoing_end_type outgoing_end = msg->outgoing_end;
+                       call_data_t *call_data = _vcui_doc_get_call_handle(outgoing_end.call_handle);
+
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("It is the case which call orig is not received.");
+                               char data[VC_DATA_LENGTH_MAX] = { 0, };
+                               _vcui_view_popup_load(_vcui_get_endcause_string(outgoing_end.end_cause_type, data), POPUP_TIMEOUT_LONG, EINA_TRUE);
+                       } else {
+                               _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_OUTGOING, call_data, EINA_TRUE);
+                               if (outgoing_end.bauto_redial == EINA_TRUE) {
+                                       CALL_UI_DEBUG("bauto_redial is EINA_TRUE");
+                                       _vcui_doc_remove_call_data_only_list(call_data);
+                               } else {
+                                       CALL_UI_DEBUG("show the call end screen");
+                                       vcui_app_call_data_t *ad = _vcui_get_app_data();
+                                       if (_vcui_doc_get_count() == 1 && ad->view_top == VIEW_DIALLING_VIEW) {
+                                               ad->call_end_type = CALL_END_TYPE_SINGLE_CALL;
+                                               _vcui_view_change(VIEW_ENDCALL_VIEW, -1, call_data, NULL);
+                                       }
+                                       _vcui_doc_remove_call_data(call_data);
+                               }
+                               _vcui_view_common_call_end_show_dialing(outgoing_end.end_cause_type, outgoing_end.bauto_redial);
+                       }
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_END_SIGNAL_PLAY_TO_UI:
+               {
+                       vc_engine_outgoing_end_signal_play_type outgoing_end_signal_play = msg->outgoing_end_signal_play;
+                       call_data_t *call_data = _vcui_doc_get_call_handle(outgoing_end_signal_play.call_handle);
+
+                       if (call_data != NULL) {
+                               _vcui_view_dialing_draw_txt_ended(ad->view_st[ad->view_top], outgoing_end_signal_play.end_cause_type);
+                       } else {
+                               CALL_UI_DEBUG("Check it whether call data exists. handle:[%d]", outgoing_end_signal_play.call_handle);
+                       }
+               }
+               break;
+
+       case VC_ENGINE_MSG_OUTGOING_ABORTED_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_common_with_handle_type outgoing_aborted = msg->outgoing_aborted;
+                       call_data_t *call_data = _vcui_doc_get_call_handle(outgoing_aborted.call_handle);
+
+                       if (call_data == NULL)
+                               call_data = _vcui_doc_get_recent_mo();
+
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       }
+
+                       _vcui_add_calllog(CTS_PLOG_TYPE_VOICE_OUTGOING, call_data, EINA_TRUE);
+
+                       _vcui_doc_remove_call_data(call_data);
+
+                       _vcui_view_common_call_terminate_or_view_change();
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_DTMF_ACK_TO_UI:
+               {
+#ifdef PDIAL_SEND_DTMF
+
+                       vc_engine_dtmf_ack_type dtmf_ack = msg->dtmf_progress;
+
+                       if (EINA_FALSE == dtmf_ack.bstatus) {
+                               _vcui_view_popup_unload_progress(ad);
+                               if ((dtmf_ack.string_id != -1) && (dtmf_ack.string_id != IDS_CALL_POP_DTMF_SENT)) {
+                                       CALL_UI_DEBUG("load popup window... Start");
+                                       _vcui_view_popup_load(_(gszcall_error_msg[dtmf_ack.string_id]), POPUP_TIMEOUT_LONG, EINA_FALSE);
+                               }
+                       } else {
+                               CALL_UI_DEBUG("display_string:[%s], string_id:[%d]", dtmf_ack.display_string, dtmf_ack.string_id);
+                               _vcui_view_popup_load_sending_dtmf(_(gszcall_error_msg[dtmf_ack.string_id]), dtmf_ack.display_string);
+                       }
+#endif
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_HELD_TO_UI:
+               {
+                       _vcui_doc_set_hold_all();
+                       _vcui_view_update();
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_RETREIVED_TO_UI:
+               {
+                       _vcui_doc_set_unhold_all();
+                       _vcui_view_update();
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_SWAP_TO_UI:
+               {
+                       _vcui_view_popup_unload(ad->popup_eo);
+
+                       if (ad->bholdisleft == EINA_TRUE) {
+                               ad->bswapped = EINA_FALSE;
+                       } else {
+                               ad->bswapped = EINA_TRUE;
+                       }
+
+                       _vcui_doc_set_swap_all();
+                       _vcui_view_auto_change();
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_SETUP_CONF_TO_UI:
+               {
+                       _vcui_view_popup_unload(ad->popup_eo);
+
+                       _vcui_doc_set_unhold_all();
+                       _vcui_view_auto_change();
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_SPLIT_CONF_TO_UI:
+               {
+                       vc_engine_common_with_handle_type ss_split_conf = msg->ss_split_conf;
+
+                       CALL_UI_DEBUG("[UI]The handle is %d ", ss_split_conf.call_handle);
+
+                       call_data_t *call_data = _vcui_doc_get_call_handle(ss_split_conf.call_handle);
+                       if (call_data == NULL) {
+                               CALL_UI_DEBUG("Error");
+                               elm_exit();
+                               return;
+                       } else {
+                               _vcui_doc_set_hold_all();
+                               call_data->caller_status = CALL_UNHOLD;
+
+                               _vcui_view_auto_change();
+                       }
+               }
+               break;
+
+       case VC_ENGINE_MSG_SS_TRANSFERRED_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_SS_CONNECT_LINE_IND_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_FORWARD_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_ACTIVATE_TO_UI:
+               {
+                       _vcui_view_popup_load(_("IDS_CALL_POP_UNHELD"), POPUP_TIMEOUT_SHORT, EINA_FALSE);
+               }
+               break;
+
+       case VC_ENGINE_MSG_IND_HOLD_TO_UI:
+               {
+                       _vcui_view_popup_load(_("IDS_CALL_POP_HELD"), POPUP_TIMEOUT_SHORT, EINA_FALSE);
+               }
+               break;
+
+       case VC_ENGINE_MSG_IND_TRANSFER_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_SETUPCONFERENCE_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_BARRING_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_WAITING_TO_UI:
+               {
+                       _vcui_view_popup_load(_("IDS_CALL_POP_WAITING_ACTIVE"), POPUP_TIMEOUT_SHORT, EINA_FALSE);
+               }
+               break;
+
+       case VC_ENGINE_MSG_IND_CUGINFO_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_SSNOTIFY_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_CALLINGNAMEINFO_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_REDIRECT_CNF_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_ACTIVATECCBS_CNF_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_ACTIVATECCBS_USERINFO_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_GET_VOLUME_RESP_TO_UI:
+               {
+                       vc_engine_vol_resp_type vol_resp = msg->vol_resp;
+                       _vcui_response_volume(vol_resp.vol_alert_type, vol_resp.vol_level);
+               }
+               break;
+
+       case VC_ENGINE_MSG_SET_VOLUME_FROM_BT_TO_UI:
+               {
+                       vc_engine_vol_set_from_bt_type vol_set_from_bt = msg->vol_set_from_bt;
+                       ad->bt_vol_val = vol_set_from_bt.vol_level;
+                       _vcui_view_popup_vol_bt(ad->bt_vol_val);
+               }
+               break;
+
+       case VC_ENGINE_MSG_ACTION_NO_ACTIVE_TASK_TO_UI:
+               {
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_ACTION_CALL_END_HELD_RETREIVED_TO_UI:
+               {
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_ACTION_SAT_RESPONSE_TO_UI:
+               {
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_ACTION_SAT_REQUEST_TO_UI:
+               {
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_ERROR_OCCURED_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_IND_AOC_TO_UI:
+               break;
+
+       case VC_ENGINE_MSG_ACCEPT_CHOICE_BOX_TO_UI:
+               {
+                       CALL_UI_DEBUG("not supported");
+               }
+               break;
+
+       case VC_ENGINE_MSG_HEADSET_STATUS_TO_UI:
+               {
+                       vc_engine_headset_status_type headset_status = msg->headset_status;
+                       ad->headset_status = headset_status.bstatus;
+                       if (ad->headset_status == EINA_TRUE) {
+                               ad->speaker_status = EINA_FALSE;
+                       }
+
+                       CALL_UI_DEBUG("Headset Status = %d", ad->headset_status);
+                       CALL_UI_DEBUG("ad->view_top:[%d]", ad->view_top);
+
+                       if ((ad->view_top == VIEW_INCALL_ONECALL_VIEW) || (ad->view_top == VIEW_INCALL_MULTICALL_SPLIT_VIEW)
+                           || (ad->view_top == VIEW_INCALL_MULTICALL_CONF_VIEW) || (ad->view_top == VIEW_DIALLING_VIEW)) {
+                               if (ad->view_st[ad->view_top] != NULL) {
+                                       ad->view_st[ad->view_top]->onUpdate(ad->view_st[ad->view_top], NULL, NULL);
+                               }
+                       }
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_EARJACK_STATUS_TO_UI:
+               {
+                       vc_engine_earjack_status_type earjack_status = msg->earjack_status;
+
+                       CALL_UI_DEBUG("earjack Status = %d", earjack_status.bstatus);
+                       CALL_UI_DEBUG("ad->view_top:[%d]", ad->view_top);
+
+                       if(earjack_status.bstatus == EINA_TRUE) {
+                               if (ad->ctxpopup_radio_group_eo != NULL )
+                                       elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_EARJACK);
+#ifdef _NEW_SND_
+#else
+                               _vcui_engine_change_sound_path(VCUI_AUDIO_EARJACK);
+#endif
+                               
+                               ad->speaker_status = EINA_FALSE;
+                               ad->headset_status = EINA_FALSE;
+                               
+                               if ((ad->view_top == VIEW_INCALL_ONECALL_VIEW) || (ad->view_top == VIEW_INCALL_MULTICALL_SPLIT_VIEW)
+                                       || (ad->view_top == VIEW_INCALL_MULTICALL_CONF_VIEW) || (ad->view_top == VIEW_DIALLING_VIEW)) {
+                                       if (ad->view_st[ad->view_top] != NULL) {
+                                               ad->view_st[ad->view_top]->onUpdate(ad->view_st[ad->view_top], NULL, NULL);
+                                       }
+                               }
+                       } else {
+                               if (_vcui_is_headset_conected() == EINA_TRUE) {
+                                       if (ad->ctxpopup_radio_group_eo != NULL )
+                                               elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_HEADSET);
+                                       
+#ifdef _NEW_SND_
+#else
+                                       _vcui_engine_change_sound_path(VCUI_AUDIO_HEADSET);
+#endif
+
+                                       ad->speaker_status = EINA_FALSE;
+                                       ad->headset_status = EINA_TRUE;
+
+                                       if ((ad->view_top == VIEW_INCALL_ONECALL_VIEW) || (ad->view_top == VIEW_INCALL_MULTICALL_SPLIT_VIEW)
+                                               || (ad->view_top == VIEW_INCALL_MULTICALL_CONF_VIEW) || (ad->view_top == VIEW_DIALLING_VIEW)) {
+                                               if (ad->view_st[ad->view_top] != NULL) {
+                                                       ad->view_st[ad->view_top]->onUpdate(ad->view_st[ad->view_top], NULL, NULL);
+                                               }
+                                       }
+                               } else {
+                                       if (ad->ctxpopup_radio_group_eo != NULL )
+                                               elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_EARJACK);
+                                       
+#ifdef _NEW_SND_
+#else
+                                       _vcui_engine_change_sound_path(VCUI_AUDIO_EARJACK);
+#endif
+
+                                       ad->speaker_status = EINA_FALSE;
+                                       ad->headset_status = EINA_FALSE;
+
+                                       if ((ad->view_top == VIEW_INCALL_ONECALL_VIEW) || (ad->view_top == VIEW_INCALL_MULTICALL_SPLIT_VIEW)
+                                               || (ad->view_top == VIEW_INCALL_MULTICALL_CONF_VIEW) || (ad->view_top == VIEW_DIALLING_VIEW)) {
+                                               if (ad->view_st[ad->view_top] != NULL) {
+                                                       ad->view_st[ad->view_top]->onUpdate(ad->view_st[ad->view_top], NULL, NULL);
+                                               }
+                                       }
+                               }
+                       }
+               }
+               break;
+
+       case VC_ENGINE_MSG_ACTION_INCOM_FORCE_TO_UI:
+               {
+                       call_data_t *recent_mo = _vcui_doc_get_recent_mo();
+                       if (recent_mo != NULL && recent_mo->call_handle == NO_HANDLE) {
+                               _vcui_doc_remove_call_data_only_list(recent_mo);
+                               _vcui_doc_set_mo_recent(NULL);
+                       }
+
+               }
+               break;
+
+       case VC_ENGINE_MSG_MESSAGE_BOX_TO_UI:
+               {
+                       _voicecall_dvc_control_lcd_state(VC_LCD_ON_UNLOCK);
+
+                       vc_engine_msg_box_type msg_box = msg->msg_box;
+                       _vcui_view_popup_load(_(gszcall_error_msg[msg_box.string_id]), POPUP_TIMEOUT_LONG, EINA_TRUE);
+               }
+               break;
+
+       case VC_ENGINE_MSG_REDIAL_TO_UI:
+               {
+                       CALL_UI_DEBUG("not used");
+               }
+               break;
+
+       case VC_ENGINE_MSG_CREATE_NEWVOICEFILE_TO_UI:
+               {
+                       CALL_UI_DEBUG("not used");
+               }
+
+       default:
+               break;
+       }
+
+       _vcui_doc_all_print(gszcall_callback_msg[event]);
+
+       CALL_UI_DEBUG("End..");
+
+}
diff --git a/ui/vcui-engine-interface.h b/ui/vcui-engine-interface.h
new file mode 100755 (executable)
index 0000000..01d12ef
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_UI_IPC_
+#define _VOICE_CALL_UI_IPC_
+
+#include "voice-call-engine.h"
+
+typedef enum _vcui_snd_path_type_t{
+       VCUI_SND_PATH_NONE,
+       VCUI_SND_PATH_HEADSET,
+       VCUI_SND_PATH_EARJACK,
+       VCUI_SND_PATH_SPEAKER,
+       VCUI_SND_PATH_MAX,
+}vcui_snd_path_type_t;
+
+typedef enum _vcui_call_type_t {
+       VCUI_CALL_TYPE_MO,
+       VCUI_CALL_TYPE_MT,
+       VCUI_CALL_TYPE_ECC,
+       VCUI_CALL_TYPE_ECC_TEST,
+       VCUI_CALL_TYPE_DOWNLOAD_CALL,
+       VCUI_CALL_TYPE_SAT,
+       VCUI_CALL_TYPE_MAX
+} vcui_call_type_t;
+
+typedef struct _vcui_call_mo_data_t {
+       char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
+       int ct_index;
+} vcui_call_mo_data_t;
+
+typedef struct _vcui_call_mt_data_t {
+       int call_handle;
+       int call_type;
+       int cli_presentation_indicator;
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];
+       int calling_name_mode;
+       char calling_name[VC_PHONE_NAME_LENGTH_MAX];
+       char redirected_number[VC_PHONE_NUMBER_LENGTH_MAX];
+       char redirected_sub_address[VC_PHONE_SUBADDRESS_LENGTH_MAX];
+       int cli_cause;
+       int bfwded;
+       int active_line;
+} vcui_call_mt_data_t;
+
+typedef struct _vcui_call_ecc_data_t {
+       char call_number[VC_PHONE_NUMBER_LENGTH_MAX];
+} vcui_call_ecc_data_t;
+
+typedef struct _vcui_call_sat_data_t {
+       int command_id;                                                         /**<Proactive Command Number sent by USIM*/
+       int command_qualifier;                                          /**<call type*/
+       char disp_text[500 + 1];                                        /**<character data*/
+       char call_num[VC_PHONE_NUMBER_LENGTH_MAX];;     /**<call number*/
+       unsigned int duration;                                          /**<maximum repeat duration*/
+} vcui_call_sat_data_t;
+
+typedef enum _vcui_vol_type_t {
+       VCUI_VOL_RING,
+       VCUI_VOL_VOICE,
+       VCUI_VOL_HEADSET,
+       VCUI_VOL_MAX
+} vcui_vol_type_t;
+
+typedef enum _vcui_rec_result_t {
+       VCUI_REC_RESULT_SUCCESS,
+       VCUI_REC_RESULT_NOT_ENOUGH_MEMORY,
+       VCUI_REC_RESULT_NO_CONNECTED_CALL,
+       VCUI_REC_RESULT_MAX
+} vcui_rec_result_t;
+
+/**
+* This enumeration defines names of the on call audio status
+*/
+typedef enum _vcui_audio_type_t {
+       VCUI_AUDIO_NONE,                                /**< none*/
+       VCUI_AUDIO_SPEAKER,                     /**< System LoudSpeaker Audio */
+       VCUI_AUDIO_RECEIVER,            /**< System Receiver Audio */
+       VCUI_AUDIO_HEADSET,                     /**< System Headset Audio */
+       VCUI_AUDIO_EARJACK,                     /**< System Earjack Audio */
+       VCUI_AUDIO_MAX,
+} vcui_audio_type_t;
+
+void _vcui_engine_init(vcui_app_call_data_t *ad);
+void _vcui_engine_answer_call(void);
+void _vcui_engine_answer_call_by_type(int type);
+void _vcui_engine_cancel_call(void);
+void _vcui_engine_reject_call(void);
+void _vcui_engine_stop_alert(void);
+void _vcui_engine_end_call(void);
+void _vcui_engine_end_call_by_handle(int handle);
+void _vcui_engine_end_all_call(void);
+void _vcui_engine_end_active_calls(void);
+void _vcui_engine_end_held_calls(void);
+void _vcui_engine_hold_unhold_swap_call(void);
+void _vcui_engine_join_call(void);
+void _vcui_engine_split_call(int call_handle);
+void _vcui_engine_transfer_call(void);
+void _vcui_engine_speaker_on_off(int bLoundSpeaker);
+void _vcui_engine_mute_on_off(int bMute);
+void _vcui_engine_set_volume_level(vcui_vol_type_t vol_type, int level);
+int _vcui_engine_get_volume_level(vcui_vol_type_t vol_type);
+void _vcui_engine_change_sound_path(vcui_audio_type_t sound_path);
+vcui_audio_type_t _vcui_engine_get_sound_path(void);
+
+void _vcui_engine_interface_process_auto_redial(int bRedial);
+void _vcui_engine_interface_process_voice_record(int bRecord);
+void _vcui_engine_interface_process_mute_alert(void);
+void _vcui_engine_interface_send_dtmf_number(char data);
+void _vcui_engine_interface_process_mo_call(vcui_call_type_t call_type, vcui_call_mo_data_t *data);
+void _vcui_engine_interface_process_mt_call(vcui_call_type_t call_type, vcui_call_mt_data_t *data);
+void _vcui_engine_interface_process_ecc_call(vcui_call_type_t call_type, vcui_call_ecc_data_t *data);
+void _vcui_engine_interface_process_sat_call(vcui_call_type_t call_type, vcui_call_sat_data_t *data);
+
+// Add callback function to handle voicecall-engine library events
+void _vcui_engine_callback(int event, void *pdata, void *puser_data);
+
+#endif
diff --git a/ui/vcui-view-callend.c b/ui/vcui-view-callend.c
new file mode 100755 (executable)
index 0000000..fca9be6
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-common.h"
+#include "vcui-view-callend.h"
+#include "vcui-view-elements.h"
+
+static call_data_t *call_data = NULL;
+
+static int __vcui_view_callend_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_callend_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_callend_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_callend_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_callend_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_ENDCALL_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_callend_oncreate,
+       .onUpdate = __vcui_view_callend_onupdate,
+       .onHide = __vcui_view_callend_onhide,
+       .onShow = __vcui_view_callend_onshow,
+       .onDestroy = __vcui_view_callend_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_callend_new(vcui_app_call_data_t *ad)
+{
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(endcall_view_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!!");
+       }
+
+       return &s_view;
+}
+
+static void __vcui_view_callend_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       endcall_view_priv_t *priv = (endcall_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       /* ============ Check valid Evas Object ============= */
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "ENDCALLVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== ENDCALLVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+       /* ============ Check valid Evas Object ============= */
+
+       if (ad->call_end_type == CALL_END_TYPE_SINGLE_CALL) {
+               CALL_UI_DEBUG("CALL_END_TYPE_SINGLE_CALL type end screen");
+
+               /* call image */
+               _vcui_delete_contact_image(priv->contents);
+               if (strcmp((char *)call_data->call_file_path, NOIMG_ICON) == 0 && strcmp((char *)call_data->call_full_file_path, NOIMG_ICON) == 0) {
+                       _vcui_show_wallpaper_image(priv->contents);
+               } else {
+                       if (strcmp((char *)call_data->call_full_file_path, NOIMG_ICON) == 0) {  /* normal size */
+                               _vcui_show_wallpaper_image(priv->contents);
+                               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, call_data->call_file_path);
+                       } else {                /* full size */
+                               _vcui_set_full_image(priv->contents, vd->app_data->win_main, call_data->call_full_file_path);
+                       }
+               }
+
+               /* call name (if nothing, call number) */
+               if (strlen((char *)call_data->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)call_data->call_num);
+                       edje_object_signal_emit(_EDJ(eo), "show-all-buttons", "end-screen");
+               } else {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)call_data->call_display);
+                       edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)call_data->call_num);
+                       edje_object_signal_emit(_EDJ(eo), "show-some-buttons", "end-screen");
+               }
+
+               _vcui_view_common_set_each_time(call_data->start_time);
+       } else if (ad->call_end_type == CALL_END_TYPE_CONF_CALL) {
+               CALL_UI_DEBUG("CALL_END_TYPE_CONF_CALL type end screen");
+               char buf[DEF_BUF_LEN] = { 0, };
+
+               /* Conference image */
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_default_image(priv->contents, vd->app_data->win_main, CONF_ICON);
+               if (priv->call_status == CALL_HOLD) {
+                       double scale_factor = 0.0;
+                       scale_factor = elm_config_scale_get();
+                       CALL_UI_DEBUG("scale_factor %f", scale_factor);
+
+                       if (scale_factor == 1.0) {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_HD", "CID_HD");
+                       } else {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_WVGA", "CID_WVGA");
+                       }
+               } else {
+                       edje_object_signal_emit(_EDJ(priv->contents), "HIDE_DIM", "CID");
+               }
+
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+               snprintf(buf, DEF_BUF_LEN, "%d %s", (_vcui_doc_get_count_hold() + _vcui_doc_get_count_unhold()), _("IDS_CALL_BODY_PEOPLE"));
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", buf);             /* in case of multicallconf, it is num of people */
+
+               _vcui_create_top_left_button_disabled(vd);
+               _vcui_create_top_middle_button_disabled(vd);
+               _vcui_create_top_right_button_disabled(vd);
+               _vcui_create_bottom_left_button_disabled(vd);
+               _vcui_create_bottom_middle_button_disabled(vd);
+               _vcui_create_bottom_right_button_disabled(vd);
+
+               _vcui_create_button_bigend_disabled(vd);
+
+       } else {
+               CALL_UI_DEBUG("invalid type... return");
+               return;
+       }
+
+       evas_object_show(eo);
+}
+
+static Evas_Object *__vcui_view_callend_create_contents(void *data)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_app_call_data_t *ad = vd->app_data;
+       Evas_Object *eo = NULL;
+
+       /* load edje */
+       if (ad->call_end_type == CALL_END_TYPE_SINGLE_CALL)
+               eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_END_SINGLECALL);
+       else if (ad->call_end_type == CALL_END_TYPE_CONF_CALL)
+               eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_END_CONFCALL);
+
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_callend_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_callend_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("endcall view create");
+       voice_call_view_data_t *vd = view_data;
+       vcui_app_call_data_t *ad = vd->app_data;
+       endcall_view_priv_t *priv = (endcall_view_priv_t *)vd->priv;
+
+       CALL_UI_DEBUG("call_end_type[%d]", ad->call_end_type);
+       if (ad->call_end_type == CALL_END_TYPE_SINGLE_CALL) {
+               call_data = (call_data_t *)param2;
+       } else if (ad->call_end_type == CALL_END_TYPE_CONF_CALL) {
+               priv->call_status = _vcui_doc_get_show_callstatus();
+               call_data = _vcui_doc_get_last_status(priv->call_status);
+       }
+
+       if (call_data == NULL) {
+               CALL_UI_DEBUG("call Data is NULL");
+               return;
+       }
+
+       if (!vd->layout) {
+
+               /* Create Main Layout */
+               vd->layout = __vcui_view_callend_create_layout_main(vd->app_data->win_main);
+               if (vd->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+               /* Create Contents */
+               priv->contents = __vcui_view_callend_create_contents(vd);
+               elm_object_part_content_set(vd->layout, "elm.swallow.content", priv->contents);
+
+               evas_object_name_set(priv->contents, "ENDCALLVIEW");
+               CALL_UI_DEBUG("[========== ENDCALLVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+
+       } else {
+               CALL_UI_DEBUG("[UI]ad->layout_end call==NULL case ");
+               evas_object_show(vd->layout);
+       }
+
+       __vcui_view_callend_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_callend_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("end call view update");
+
+       __vcui_view_callend_onshow(view_data);
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_callend_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("end call view hide");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_callend_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("end call view show");
+       CALL_UI_KPI("__vcui_view_callend_onshow start");
+       endcall_view_priv_t *priv = (endcall_view_priv_t *)view_data->priv;
+
+       __vcui_view_callend_draw_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_callend_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("endcall view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_ENDCALL_VIEW];
+       endcall_view_priv_t *priv = (endcall_view_priv_t *)vd->priv;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_ENDCALL_VIEW] = NULL;
+       call_data = NULL;
+       ad->call_end_type = CALL_END_TYPE_NONE;
+
+       _vcui_cache_flush();
+       CALL_UI_DEBUG("complete destroy one view");
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-callend.h b/ui/vcui-view-callend.h
new file mode 100755 (executable)
index 0000000..df0dceb
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+typedef struct {
+       Evas_Object *contents;
+       Evas_Object *ic;        /* small size call image */
+       Evas_Object *record_btn;
+       vcui_app_call_status_t call_status;
+} endcall_view_priv_t;
+
+voice_call_view_data_t *_vcui_view_callend_new(vcui_app_call_data_t *ad);
diff --git a/ui/vcui-view-choice.c b/ui/vcui-view-choice.c
new file mode 100755 (executable)
index 0000000..c3d688a
--- /dev/null
@@ -0,0 +1,205 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#include "vcui-application.h"\r
+#include "vcui-app-data.h"\r
+#include "vcui-view-choice.h"\r
+#include "vcui-view-dialing.h"\r
+#include "vcui-view-incoming.h"\r
+#include "vcui-view-incoming-lock.h"\r
+#include "vcui-view-single-call.h"\r
+#include "vcui-view-multi-call-list.h"\r
+#include "vcui-view-multi-call-split.h"\r
+#include "vcui-view-multi-call-conf.h"\r
+#include "vcui-view-keypad.h"\r
+#include "vcui-view-callend.h"\r
+static const char *vcui_view_name[] = {\r
+               "VIEW_DIALLING_VIEW",\r
+               "VIEW_INCOMING_VIEW",\r
+               "VIEW_INCOMING_LOCK_VIEW",\r
+               "VIEW_INCALL_ONECALL_VIEW",\r
+               "VIEW_INCALL_MULTICALL_SPLIT_VIEW",\r
+               "VIEW_INCALL_MULTICALL_CONF_VIEW",\r
+               "VIEW_INCALL_MULTICALL_LIST_VIEW",\r
+               "VIEW_INCALL_KEYPAD_VIEW",\r
+               "VIEW_ENDCALL_VIEW",\r
+               "VIEW_MAX",\r
+};\r
+\r
+void _vcui_view_change(vcui_app_call_view_id_t view_id, int param1, void *param2, void *param3)\r
+{\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       int valid = 0;\r
+       CALL_UI_DEBUG("view:[%d] -> [%d]", ad->view_top, view_id);\r
+       if (view_id >= VIEW_MAX) {\r
+               CALL_UI_DEBUG("[=========== ERROR!!!! Invalid View ID : %d =================]", view_id);\r
+               return;\r
+       }\r
+       ad->ball_view_hide = EINA_FALSE;\r
+#ifdef _DESTROY_UG_ALL_FORCE_\r
+       if (ad->ugs_array_data.ug_count != 0)\r
+               _vcui_doc_launch_destroy_ug_all(&(ad->ugs_array_data));\r
+#else\r
+       if (ad->ugs_array_data.ug_count != 0) {\r
+               Eina_List *l;\r
+               struct ui_gadget *ug;\r
+               EINA_LIST_FOREACH(ad->ugs_array_data.ug_lists, l, ug) {\r
+                       CALL_UI_DEBUG("Destroy UG due to _vcui_view_change");\r
+                       ug_destroy(ug);\r
+               }\r
+               ad->ugs_array_data.ug_lists = eina_list_free(ad->ugs_array_data.ug_lists);\r
+               ad->ugs_array_data.ug_count = 0;\r
+               ad->ugs_array_data.last_ug_type = VCUI_UG_TYPE_NOE;\r
+       }\r
+#endif\r
+       if (ad->view_st[view_id]) {\r
+               CALL_UI_DEBUG("[============  Layout exists !! ============]");\r
+               voice_call_view_data_t *vd = (voice_call_view_data_t *) ad->view_st[view_id];\r
+               if (vd->layout) {\r
+                       if (view_id == VIEW_DIALLING_VIEW) {\r
+                               vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");\r
+                       } else if (view_id == VIEW_INCOMING_VIEW) {\r
+                               incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "INCOMINGVIEW");\r
+                       } else if (view_id == VIEW_INCOMING_LOCK_VIEW) {\r
+                               incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "INCOMINGLOCKVIEW");\r
+                       } else if (view_id == VIEW_INCALL_ONECALL_VIEW) {\r
+                               incall_one_view_priv_t *priv = (incall_one_view_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "ONEVIEW");\r
+                       } else if (view_id == VIEW_INCALL_MULTICALL_SPLIT_VIEW) {\r
+                               incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWSPLIT");\r
+                       } else if (view_id == VIEW_INCALL_MULTICALL_CONF_VIEW) {\r
+                               vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWCONF");\r
+                       } else if (view_id == VIEW_INCALL_MULTICALL_LIST_VIEW) {\r
+                               vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWLIST");\r
+                       } else if (view_id == VIEW_INCALL_KEYPAD_VIEW) {\r
+                               vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "KEYPADVIEW");\r
+                       } else if (view_id == VIEW_ENDCALL_VIEW) {\r
+                               endcall_view_priv_t *priv = (endcall_view_priv_t *) vd->priv;\r
+                               valid = _vcui_check_valid_eo(priv->contents, "ENDCALLVIEW");\r
+                       } else {\r
+                               CALL_UI_DEBUG("[============ BAD INPUT!!!! Check Input Layout!!!!! %d============]", view_id);\r
+                       }\r
+                       if (valid == -1) {\r
+                               CALL_UI_DEBUG("[========== WARNING!! Invalid Evas Object  ==========]");\r
+                               ad->view_st[view_id] = NULL;\r
+\r
+                               /* free priv */\r
+                       }\r
+               }\r
+       } else {\r
+               CALL_UI_DEBUG("[============  Create Layout !! ============]");\r
+       }\r
+       ad->view_before_top = ad->view_top;     /* hold the current top window in the before_top pointer */\r
+       ad->view_top = view_id; /* set the new top window to the view_id which is passed... this step enables in setting 00:00:00 as timer */\r
+       if (view_id == VIEW_DIALLING_VIEW || view_id == VIEW_INCOMING_VIEW || view_id == VIEW_INCOMING_LOCK_VIEW) {\r
+               _vcui_raise_main_win();\r
+       }\r
+       if ((ad->view_before_top != -1) && (ad->view_before_top != view_id)) {\r
+               CALL_UI_DEBUG("hide & destory [%d]", ad->view_before_top);\r
+               CALL_UI_KPI("%s onHide start", vcui_view_name[ad->view_before_top]);\r
+               ad->view_st[ad->view_before_top]->onHide(ad->view_st[ad->view_before_top]);\r
+               CALL_UI_KPI("%s onHide done", vcui_view_name[ad->view_before_top]);\r
+               CALL_UI_KPI("%s onDestroy start", vcui_view_name[ad->view_before_top]);\r
+               ad->view_st[ad->view_before_top]->onDestroy(ad->view_st[ad->view_before_top]);\r
+               CALL_UI_KPI("%s onDestroy done", vcui_view_name[ad->view_before_top]);\r
+       }\r
+       if (ad->view_st[view_id] == NULL) {\r
+               CALL_UI_DEBUG("Create view data");\r
+               voice_call_view_data_t *view_data = ad->func_new[view_id] (ad);\r
+               ad->view_st[view_id] = view_data;\r
+       }\r
+       if (ad->view_st[view_id]->layout == NULL) {\r
+               CALL_UI_DEBUG("Create layout");\r
+               CALL_UI_KPI("%s onCreate start", vcui_view_name[view_id]);\r
+               ad->view_st[view_id]->onCreate(ad->view_st[view_id], param1, param2, param3);\r
+               CALL_UI_KPI("%s onCreate done", vcui_view_name[view_id]);\r
+       } else {\r
+               CALL_UI_DEBUG("Update layout");\r
+               CALL_UI_KPI("%s onUpdate start", vcui_view_name[view_id]);\r
+               ad->view_st[view_id]->onUpdate(ad->view_st[view_id], param2, param3);\r
+               CALL_UI_KPI("%s onUpdate done", vcui_view_name[view_id]);\r
+       }\r
+       _vcui_show_main_ui_set_flag();\r
+       CALL_UI_DEBUG("End");\r
+}\r
+\r
+void _vcui_view_auto_change()\r
+{\r
+       CALL_UI_DEBUG("..");\r
+       if (_vcui_doc_get_count_nostatus() == 1) {\r
+               call_data_t *call_data = _vcui_doc_get_all_recent();\r
+               if (call_data->mo_mt_status == CALL_OUTGOING) {\r
+                       _vcui_view_change(VIEW_DIALLING_VIEW, 0, NULL, NULL);\r
+               } else if (call_data->mo_mt_status == CALL_INCOMING) {\r
+                       if (_vcui_is_idle_lock() == CALL_UNLOCK)\r
+                               _vcui_view_change(VIEW_INCOMING_VIEW, 0, NULL, NULL);\r
+\r
+                       else\r
+                               _vcui_view_change(VIEW_INCOMING_LOCK_VIEW, 0, NULL, NULL);\r
+               } else {\r
+                       CALL_UI_DEBUG("ERROR");\r
+               }\r
+       } else if (_vcui_doc_get_count() > 1) {\r
+               if (_vcui_doc_get_count_unhold() == 0 || _vcui_doc_get_count_hold() == 0) {\r
+                       _vcui_view_change(VIEW_INCALL_MULTICALL_CONF_VIEW, 0, NULL, NULL);\r
+               } else {\r
+                       _vcui_view_change(VIEW_INCALL_MULTICALL_SPLIT_VIEW, 0, NULL, NULL);\r
+               }\r
+       } else {\r
+               _vcui_view_change(VIEW_INCALL_ONECALL_VIEW, 0, NULL, NULL);\r
+       }\r
+       CALL_UI_DEBUG("End..");\r
+}\r
+\r
+void _vcui_view_all_hide()\r
+{\r
+       int i = 0;\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       for (i = 0; i < VIEW_MAX; i++) {\r
+               if (ad->view_st[i] != NULL) {\r
+                       ad->view_st[i]->onHide(ad->view_st[i]);\r
+               }\r
+       }\r
+       ad->ball_view_hide = EINA_TRUE;\r
+       _vcui_show_main_ui_set_flag();\r
+}\r
+\r
+void _vcui_view_update()\r
+{\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       if (ad->view_top != -1 && ad->view_st[ad->view_top] != NULL) {\r
+               ad->view_st[ad->view_top]->onUpdate(ad->view_st[ad->view_top], NULL, NULL);\r
+       }\r
+       _vcui_show_main_ui_set_flag();\r
+}\r
+\r
+void _vcui_view_destroy(vcui_app_call_view_id_t view_id)\r
+{\r
+       CALL_UI_DEBUG("view_id:[%d]", view_id);\r
+       vcui_app_call_data_t *ad = _vcui_get_app_data();\r
+       if (ad->view_st[view_id]) {\r
+               ad->view_st[view_id]->onHide(ad->view_st[view_id]);\r
+               ad->view_st[view_id]->onDestroy(ad->view_st[view_id]);\r
+       }\r
+}\r
diff --git a/ui/vcui-view-choice.h b/ui/vcui-view-choice.h
new file mode 100755 (executable)
index 0000000..f50d019
--- /dev/null
@@ -0,0 +1,27 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef        _VCUI_VIEW_CHOICE_H_\r
+#define        _VCUI_VIEW_CHOICE_H_\r
+\r
+void _vcui_view_change(vcui_app_call_view_id_t view_id, int param1, void *param2, void *param3);\r
+void _vcui_view_auto_change();\r
+void _vcui_view_update();\r
+void _vcui_view_all_hide();\r
+void _vcui_view_destroy(vcui_app_call_view_id_t view_id);\r
\r
+#endif /*_VCUI_VIEW_CHOICE_H_*/\r
diff --git a/ui/vcui-view-common.c b/ui/vcui-view-common.c
new file mode 100755 (executable)
index 0000000..8c1cf06
--- /dev/null
@@ -0,0 +1,420 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-common.h"
+
+#include "vcui-view-dialing.h"
+#include "vcui-view-incoming.h"
+#include "vcui-view-single-call.h"
+#include "vcui-view-multi-call-split.h"
+#include "vcui-view-multi-call-conf.h"
+#include "vcui-view-multi-call-list.h"
+#include "vcui-view-keypad.h"
+#include "vcui-view-callend.h"
+
+static vcui_view_common_t gincall_common_data;
+
+void _vcui_view_common_init()
+{
+       memset(&gincall_common_data, 0, sizeof(vcui_view_common_t));
+}
+
+static vcui_view_common_t *__vcui_view_common_get_common_data()
+{
+       return &gincall_common_data;
+}
+
+static Eina_Bool __vcui_view_common_timer_cb(void *data)
+{
+       //voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       //vcui_app_call_data_t *ad = vd->app_data;
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       char dur[TIME_BUF_LEN];
+       static int end_count = 0;
+
+       if (common_data->timer_flag == 1) {
+               if (common_data->time_end_flag == TIME_END_START) {
+                       end_count = 0;
+                       return 1;
+               } else if (common_data->time_end_flag == TIME_END_NO) {
+                       end_count++;
+                       if (end_count == 1) {
+                               return 1;
+                       }
+               }
+       }
+       common_data->current_call_time = time(NULL);
+
+       if (common_data->timer_flag == 1) {
+               if (common_data->current_call_time > common_data->start_call_time) {
+                       time_t call_time = common_data->current_call_time - common_data->start_call_time;
+                       struct tm loctime;
+
+                       gmtime_r((const time_t *)&call_time, &loctime);
+                       snprintf(dur, TIME_BUF_LEN, "%02d:%02d:%02d", loctime.tm_hour, loctime.tm_min, loctime.tm_sec);
+
+                       _vcui_view_common_set_text_time(dur);
+               }
+       }
+
+       return 1;
+}
+
+static Eina_Bool __vcui_view_common_timer_end_cb(void *data)
+{
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       int end_type = common_data->end_type;
+       char dur[TIME_BUF_LEN];
+
+       if ((common_data->timer_flag == 1) && (common_data->time_end_flag == TIME_END_START)) {
+               snprintf(dur, TIME_BUF_LEN, "%02d:%02d:%02d", common_data->hour, common_data->min, common_data->sec);
+               if (common_data->time_count == 0) {
+                       _vcui_view_common_set_text_time(dur);
+               } else if (common_data->time_count == 1) {
+                       _vcui_view_common_set_text_time(_(" "));
+               } else if (common_data->time_count == 2) {
+                       _vcui_view_common_set_text_time(dur);
+               } else if (common_data->time_count == 3) {
+                       _vcui_view_common_set_text_time(_(" "));
+               } else if (common_data->time_count == 4) {
+                       char data[VC_DATA_LENGTH_MAX] = { 0, };
+                       _vcui_view_common_set_text_time(_vcui_get_endcause_string(end_type, data));
+               }
+
+               common_data->time_count++;
+               if (common_data->time_count == TIME_END_MAX_SHOW) {
+                       common_data->time_end_flag = TIME_END_NO;
+                       common_data->time_count = 0;
+
+                       if (common_data->tm_end) {
+                               ecore_timer_del(common_data->tm_end);
+                               common_data->tm_end = NULL;
+                       }
+
+                       _vcui_view_common_call_terminate_or_view_change();
+               }
+       }
+       return 1;
+}
+
+static Eina_Bool __vcui_view_common_timer_end_dialing_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (common_data->tm_end_dialing) {
+               ecore_timer_del(common_data->tm_end_dialing);
+               common_data->tm_end_dialing = NULL;
+       }
+
+       if (common_data->bredial == EINA_TRUE) {
+               /*_vcui_view_all_hide();*/
+               _vcui_engine_interface_process_auto_redial(EINA_TRUE);
+               _vcui_view_popup_load_redial();
+               _vcui_view_dialing_draw_txt_dialing(ad->view_st[VIEW_DIALLING_VIEW]);
+       } else {
+               _vcui_view_common_call_terminate_or_view_change();
+       }
+
+       return 1;
+}
+
+static Eina_Bool __vcui_view_common_timer_end_force_cb(void *data)
+{
+       CALL_UI_DEBUG("..");
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+
+       if (common_data->tm_end_force) {
+               ecore_timer_del(common_data->tm_end_force);
+               common_data->tm_end_force = NULL;
+       }
+
+       _vcui_view_common_call_terminate_or_view_change();
+
+       return 1;
+}
+
+void _vcui_view_common_set_text_time(char *time_dur)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       voice_call_view_data_t *data = ad->view_st[ad->view_top];
+       int valid = 0;
+
+       if (data != NULL) {
+               if (data->type == VIEW_INCALL_ONECALL_VIEW) {
+                       if (data->priv) {
+                               incall_one_view_priv_t *priv = data->priv;
+                               if (priv->contents) {
+                                       /* ============ Check valid Evas Object ============= */
+                                       valid = _vcui_check_valid_eo(priv->contents, "ONEVIEW");
+                                       if (valid == -1) {
+                                               CALL_UI_DEBUG("[========== ONEVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                               return;
+                                       }
+                                       /* ============ Check valid Evas Object ============= */
+                                       edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                               } else {
+                                       CALL_UI_DEBUG("ERR : Null Evas_Object priv->contents");
+                               }
+
+                       }
+               } else if (data->type == VIEW_INCALL_MULTICALL_SPLIT_VIEW) {
+                       if (data->priv) {
+                               incall_multi_view_split_priv_t *priv = data->priv;
+                               /* ============ Check valid Evas Object ============= */
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWSPLIT");
+                               if (valid == -1) {
+                                       CALL_UI_DEBUG("[========== MULTIVIEWSPLIT : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                       return;
+                               }
+                               /* ============ Check valid Evas Object ============= */
+                               edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                       } else {
+                               CALL_UI_DEBUG("ERR : Null Evas_Object data->layout");
+                       }
+               } else if (data->type == VIEW_INCALL_MULTICALL_CONF_VIEW) {
+                       if (data->priv) {
+                               vcui_view_multi_call_conf_priv_t *priv = data->priv;
+                               /* ============ Check valid Evas Object ============= */
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWCONF");
+                               if (valid == -1) {
+                                       CALL_UI_DEBUG("[========== MULTIVIEWCONF : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                       return;
+                               }
+                               /* ============ Check valid Evas Object ============= */
+                               edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                       } else {
+                               CALL_UI_DEBUG("ERR : Null Evas_Object data->layout");
+                       }
+               } else if (data->type == VIEW_INCALL_MULTICALL_LIST_VIEW) {
+                       if (data->priv) {
+                               vcui_view_multi_call_list_priv_t *priv = data->priv;
+                               /* ============ Check valid Evas Object ============= */
+                               valid = _vcui_check_valid_eo(priv->contents, "MULTIVIEWLIST");
+                               if (valid == -1) {
+                                       CALL_UI_DEBUG("[========== MULTIVIEWLIST : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                       return;
+                               }
+                               /* ============ Check valid Evas Object ============= */
+                               edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                       } else {
+                               CALL_UI_DEBUG("ERR : Null Evas_Object data->layout");
+                       }
+               } else if (data->type == VIEW_INCALL_KEYPAD_VIEW) {
+                       if (data->priv) {
+                               vcui_view_keypad_priv_t *priv = data->priv;
+                               /* ============ Check valid Evas Object ============= */
+                               valid = _vcui_check_valid_eo(priv->contents, "KEYPADVIEW");
+                               if (valid == -1) {
+                                       CALL_UI_DEBUG("[========== KEYPADVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                       return;
+                               }
+                               /* ============ Check valid Evas Object ============= */
+                               edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                       } else {
+                               CALL_UI_DEBUG("ERR : Null Evas_Object data->layout");
+                       }
+               } else if (data->type == VIEW_ENDCALL_VIEW) {
+                       if (data->priv) {
+                               endcall_view_priv_t *priv = data->priv;
+                               /* ============ Check valid Evas Object ============= */
+                               valid = _vcui_check_valid_eo(priv->contents, "ENDCALLVIEW");
+                               if (valid == -1) {
+                                       CALL_UI_DEBUG("[========== KEYPADVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+                                       return;
+                               }
+                               /* ============ Check valid Evas Object ============= */
+                               edje_object_part_text_set(_EDJ(priv->contents), "txt_timer", _(time_dur));      //TODO
+                       } else {
+                               CALL_UI_DEBUG("ERR : Null Evas_Object data->layout");
+                       }
+               } else {
+                       /*to do nothing in case of other view.*/
+               }
+       }
+ }
+
+void _vcui_view_common_set_each_time(time_t starttime)
+{
+       time_t curr_time;
+       //char call_duration[9];
+       unsigned long call_duration_in_sec = 0;
+       unsigned long sec = 0;
+       unsigned long min = 0;
+       unsigned long hr = 0;
+
+       curr_time = time(&curr_time);
+       call_duration_in_sec = curr_time - starttime;
+       sec = call_duration_in_sec % 60;
+       min = (call_duration_in_sec / 60) % 60;
+       hr = call_duration_in_sec / 3600;
+
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+
+       // set the start time for every call
+       common_data->start_call_time = starttime;
+       CALL_UI_DEBUG(" common_data->start_call_time %lu", (unsigned long)common_data->start_call_time);
+
+       CALL_UI_DEBUG(" _vcui_view_common_set_each_time curr_time %d starttime %d", (int)curr_time, (int)starttime);
+
+       common_data->sec = sec;
+       common_data->min = min;
+       common_data->hour = hr;
+
+       char dur[TIME_BUF_LEN];
+       snprintf(dur, TIME_BUF_LEN, "%02d:%02d:%02d", common_data->hour, common_data->min, common_data->sec);
+       if (common_data->timer_flag == 1)
+               _vcui_view_common_set_text_time(dur);
+
+       CALL_UI_DEBUG(" complete input time");
+
+}
+
+void _vcui_view_common_timer_text_init()
+{
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+
+       if (!common_data->tm) {
+               if (common_data->timer_flag == 0) {
+                       common_data->sec = 0;
+                       common_data->min = 0;
+                       common_data->hour = 0;
+                       common_data->timer_flag = 1;
+               }
+               common_data->tm = ecore_timer_add(TIMER_TIMEOUT_1_SEC, __vcui_view_common_timer_cb, NULL);
+       }
+}
+
+void _vcui_view_common_timer_destroy()
+{
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       if (common_data->tm) {
+               ecore_timer_del(common_data->tm);
+               common_data->tm = NULL;
+       }
+}
+
+void _vcui_view_common_timer_end_destroy()
+{
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       if (common_data->tm_end) {
+               ecore_timer_del(common_data->tm_end);
+               common_data->tm_end = NULL;
+       }
+}
+
+void _vcui_view_common_timer_end_dialing_destroy()
+{
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       if (common_data->tm_end_dialing) {
+               ecore_timer_del(common_data->tm_end_dialing);
+               common_data->tm_end_dialing = NULL;
+       }
+}
+
+void _vcui_view_common_timer_redial_reset()
+{
+       CALL_UI_DEBUG("..");
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+
+       _vcui_view_common_timer_end_destroy();
+       _vcui_view_common_timer_end_dialing_destroy();
+       common_data->time_end_flag = TIME_END_NO;
+}
+
+void _vcui_view_common_call_end_show_dialing(int end_type, int bredial)
+{
+       CALL_UI_DEBUG("end_type:[%d]", end_type);
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       char data[VC_DATA_LENGTH_MAX] = { 0, };
+
+       if (ad->call_end_type == CALL_END_TYPE_NONE) {
+               _vcui_view_dialing_draw_txt_ended(ad->view_st[ad->view_top], end_type);
+       } else if (ad->call_end_type == CALL_END_TYPE_SINGLE_CALL) {
+               common_data->time_end_flag = TIME_END_START;    // to stop timer from updating the call end screen
+               _vcui_view_common_set_text_time(_vcui_get_endcause_string(end_type, data));
+       }
+
+       if (common_data->tm_end_dialing) {
+               ecore_timer_del(common_data->tm_end_dialing);
+               common_data->tm_end_dialing = NULL;
+       }
+       common_data->bredial = bredial;
+       common_data->tm_end_dialing = ecore_timer_add(TIMER_TIMEOUT_2_SEC, __vcui_view_common_timer_end_dialing_cb, NULL);
+
+}
+
+void _vcui_view_common_call_end_show(time_t start_time, int end_type)
+{
+       CALL_UI_DEBUG("end_type:[%d]", end_type);
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+
+       if (common_data->tm_end) {
+               ecore_timer_del(common_data->tm_end);
+               common_data->tm_end = NULL;
+       }
+       common_data->time_end_flag = TIME_END_START;
+       _vcui_view_common_set_each_time(start_time);
+
+       common_data->end_type = end_type;
+       common_data->tm_end = ecore_timer_add(TIMER_TIMEOUT_0_3_SEC, __vcui_view_common_timer_end_cb, NULL);
+}
+
+void _vcui_view_common_call_end_timer_reset(void)
+{
+       CALL_UI_DEBUG("..");
+       vcui_view_common_t *common_data = __vcui_view_common_get_common_data();
+       if (common_data->tm_end) {
+               ecore_timer_del(common_data->tm_end);
+               common_data->tm_end = NULL;
+       }
+
+       if (common_data->tm_end_dialing) {
+               ecore_timer_del(common_data->tm_end_dialing);
+               common_data->tm_end_dialing = NULL;
+       }
+
+       common_data->tm_end_force = ecore_timer_add(TIMER_TIMEOUT_2_SEC, __vcui_view_common_timer_end_force_cb, NULL);
+}
+
+int _vcui_view_common_call_terminate_or_view_change(void)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (_vcui_doc_get_count() == 0) {
+               if (ad->contact_ug == NULL) {
+                       CALL_UI_DEBUG("EXIT - contact ug is closed");
+                       elm_exit();
+               } else {
+                       CALL_UI_DEBUG("show contact ug");
+                       CALL_UI_DEBUG("hide & destory [%d]", ad->view_top);
+                       if (ad->view_top != -1) {
+                               ad->view_st[ad->view_top]->onHide(ad->view_st[ad->view_top]);
+                               ad->view_st[ad->view_top]->onDestroy(ad->view_st[ad->view_top]);
+                               ad->view_top = -1;
+                       }
+                       evas_object_show((Evas_Object *)ug_get_layout(ad->contact_ug));
+               }
+       } else {
+               _vcui_view_auto_change();
+       }
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-common.h b/ui/vcui-view-common.h
new file mode 100755 (executable)
index 0000000..e3f10cf
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_UI_INCALL_
+#define _VOICE_CALL_UI_INCALL_
+
+#include <time.h>
+
+#define TIME_BUF_LEN (16)
+#define MIN_SEC (60)
+#define HOUR_MIN (60)
+#define DAY_HOUR (24)
+
+#define TB_W (480)
+#define TB_H (90)
+
+typedef struct _vcui_view_common_t {
+       Ecore_Timer *tm;
+       Ecore_Timer *tm_end;
+       Ecore_Timer *tm_end_dialing;
+       Ecore_Timer *tm_end_force;
+
+       int bredial;
+
+       char sec, min, hour;
+       int timer_flag;
+       unsigned int call_time;
+
+       int time_end_flag;
+       int time_count;
+       int end_type;
+
+       time_t current_call_time;
+       time_t start_call_time;
+} vcui_view_common_t;
+
+void _vcui_view_common_set_each_time(time_t starttime);
+
+void _vcui_view_common_timer_text_init();
+
+void _vcui_view_common_set_text_time(char *time_dur);
+void _vcui_view_common_init();
+
+void _vcui_view_common_call_end_show(time_t start_time, int end_type);
+void _vcui_view_common_call_end_show_dialing(int end_type, int bredial);
+void _vcui_view_common_call_end_timer_reset(void);
+
+void _vcui_view_common_timer_destroy();
+void _vcui_view_common_timer_end_destroy();
+void _vcui_view_common_timer_end_dialing_destroy();
+void _vcui_view_common_timer_redial_reset();
+
+int _vcui_view_common_call_terminate_or_view_change(void);
+
+#endif
diff --git a/ui/vcui-view-dialing.c b/ui/vcui-view-dialing.c
new file mode 100755 (executable)
index 0000000..b18a144
--- /dev/null
@@ -0,0 +1,368 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-dialing.h"
+#include "vcui-view-elements.h"
+
+static int __vcui_view_dialing_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_dialing_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_dialing_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_dialing_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_dialing_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_DIALLING_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_dialing_oncreate,
+       .onUpdate = __vcui_view_dialing_onupdate,
+       .onHide = __vcui_view_dialing_onhide,
+       .onShow = __vcui_view_dialing_onshow,
+       .onDestroy = __vcui_view_dialing_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_dialing_new(vcui_app_call_data_t *ad)
+{
+
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(vcui_view_dialing_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!! ");
+       }
+
+       return &s_view;
+}
+
+void _vcui_view_dialing_draw_txt_ended(voice_call_view_data_t *vd, int end_type)
+{
+       /* ============ Check valid Evas Object ============= */
+       if (vd == NULL) {
+               CALL_UI_DEBUG("View Data is NULL");
+               return;
+       }
+
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       } else {
+               char data[VC_DATA_LENGTH_MAX] = { 0, };
+               edje_object_part_text_set(_EDJ(priv->contents), "txt_mo_status", _(_vcui_get_endcause_string(end_type, data)));
+       }
+       /* ============ Check valid Evas Object ============= */
+}
+
+void _vcui_view_dialing_draw_txt_connecting(voice_call_view_data_t *vd)
+{
+       /* ============ Check valid Evas Object ============= */
+       if (vd == NULL) {
+               CALL_UI_DEBUG("View Data is NULL");
+               return;
+       }
+
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       } else {
+               edje_object_part_text_set(_EDJ(priv->contents), "txt_mo_status", _("IDS_CALL_POP_CONNECTING"));
+       }
+       /* ============ Check valid Evas Object ============= */
+}
+
+void _vcui_view_dialing_draw_txt_dialing(voice_call_view_data_t *vd)
+{
+       /* ============ Check valid Evas Object ============= */
+       if (vd == NULL) {
+               CALL_UI_DEBUG("View Data is NULL");
+               return;
+       }
+
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       } else {
+               edje_object_part_text_set(_EDJ(priv->contents), "txt_mo_status", _("IDS_CALL_POP_DIALLING"));
+       }
+       /* ============ Check valid Evas Object ============= */
+}
+
+static void __vcui_view_dialing_update_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       call_data_t *now_call_data = _vcui_doc_get_recent_mo();
+
+       /* ============ Check valid Evas Object ============= */
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+       /* ============ Check valid Evas Object ============= */
+
+       if (now_call_data == NULL) {
+               CALL_UI_DEBUG("Now Data is NULL");
+               return;
+       }
+
+       /* call image */
+       if (strcmp((char *)priv->now_data->call_file_path, NOIMG_ICON) == 0) {
+               _vcui_show_wallpaper_image(priv->contents);
+       } else {
+               CALL_UI_DEBUG("there is caller image.");
+
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, priv->now_data->call_file_path);
+       }
+
+       /* call name (if nothing, call number) */
+       if (strlen((char *)priv->now_data->call_display) == 0) {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_num);
+       } else {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_display);
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)priv->now_data->call_num);
+       }
+
+       _vcui_create_top_left_button_disabled(vd);
+       _vcui_create_top_middle_button_disabled(vd);
+       _vcui_create_top_right_button_disabled(vd);
+       _vcui_create_bottom_left_button(vd);
+       _vcui_create_bottom_middle_button_disabled(vd);
+       _vcui_create_bottom_right_button_disabled(vd);
+
+       _vcui_create_button_bigend(vd);
+
+       evas_object_show(eo);
+}
+
+static void __vcui_view_dialing_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       call_data_t *now_call_data = _vcui_doc_get_recent_mo();
+
+       /* ============ Check valid Evas Object ============= */
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+       /* ============ Check valid Evas Object ============= */
+
+       if (now_call_data == NULL) {
+               CALL_UI_DEBUG("Now Data is NULL");
+               return;
+       }
+
+       /* call image */
+       if (strcmp((char *)priv->now_data->call_file_path, NOIMG_ICON) == 0) {
+               _vcui_show_wallpaper_image(priv->contents);
+       } else {
+               CALL_UI_DEBUG("there is caller image.");
+
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, priv->now_data->call_file_path);
+       }
+
+       /* call name (if nothing, call number) */
+       if (strlen((char *)priv->now_data->call_display) == 0) {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_num);
+       } else {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_display);
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)priv->now_data->call_num);
+       }
+
+       edje_object_part_text_set(_EDJ(priv->contents), "txt_mo_status", _("IDS_CALL_POP_DIALLING"));
+
+       _vcui_create_top_left_button_disabled(vd);
+       _vcui_create_top_middle_button_disabled(vd);
+       _vcui_create_top_right_button_disabled(vd);
+       _vcui_create_bottom_left_button(vd);
+       _vcui_create_bottom_middle_button_disabled(vd);
+       _vcui_create_bottom_right_button_disabled(vd);
+
+       _vcui_create_button_bigend(vd);
+
+       evas_object_show(eo);
+}
+
+static Evas_Object *__vcui_view_dialing_create_contents(void *data)
+{
+       CALL_UI_KPI("__vcui_view_dialing_create_contents start");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       Evas_Object *eo = NULL;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_MOVIEW);
+       if (eo == NULL)
+               return NULL;
+       CALL_UI_KPI("__vcui_view_dialing_create_contents done");
+       return eo;
+}
+
+static Evas_Object *__vcui_view_dialing_create_layout_main(Evas_Object *parent)
+{
+       CALL_UI_KPI("__vcui_view_dialing_create_layout_main start");
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+       CALL_UI_KPI("__vcui_view_dialing_create_layout_main done");
+       return ly;
+}
+
+static int __vcui_view_dialing_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("dialling view create!!");
+
+       vcui_app_call_data_t *ad = view_data->app_data;
+       vcui_view_dialing_priv_t *priv = view_data->priv;
+
+       if (!view_data->layout) {
+
+               /* Create Main Layout */
+               view_data->layout = __vcui_view_dialing_create_layout_main(ad->win_main);
+
+               if (view_data->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+               /* Create Contents */
+               priv->contents = __vcui_view_dialing_create_contents(view_data);
+               elm_object_part_content_set(view_data->layout, "elm.swallow.content", priv->contents);
+
+               evas_object_name_set(priv->contents, "DIALVIEW");
+               CALL_UI_DEBUG("[========== DIALVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+       }
+
+       __vcui_view_dialing_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_dialing_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("dialling view update");
+       vcui_view_dialing_priv_t *priv = view_data->priv;
+
+       __vcui_view_dialing_update_screen(priv->contents, view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_dialing_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("dialling view hide");
+
+       int valid = 0;
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)view_data->priv;
+       valid = _vcui_check_valid_eo(priv->contents, "DIALVIEW");
+
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== DIALVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       }
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_dialing_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_KPI("__vcui_view_dialing_onshow start");
+       CALL_UI_DEBUG("dialling view show");
+
+       vcui_view_dialing_priv_t *priv = view_data->priv;
+       priv->now_data = _vcui_doc_get_recent_mo();
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return VC_ERROR;
+       }
+
+       __vcui_view_dialing_draw_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+
+       if (_vcui_is_idle_lock() == CALL_LOCK)
+               _vcui_app_win_set_noti_type(EINA_TRUE);
+       else
+               _vcui_app_win_set_noti_type(EINA_FALSE);
+
+       CALL_UI_KPI("__vcui_view_dialing_onshow done");
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_dialing_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("dialling view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_DIALLING_VIEW];
+       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *)vd->priv;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_DIALLING_VIEW] = NULL;
+
+       _vcui_cache_flush();
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-dialing.h b/ui/vcui-view-dialing.h
new file mode 100755 (executable)
index 0000000..f90d6b1
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VCUI_VIEW_DIALING_\r
+#define _VCUI_VIEW_DIALING_\r
+\r
+typedef struct {\r
+       Evas_Object *contents;\r
+       Evas_Object *ic;\r
+       call_data_t *now_data;\r
+} vcui_view_dialing_priv_t;\r
+\r
+\r
+\r
+voice_call_view_data_t * _vcui_view_dialing_new(vcui_app_call_data_t * ad);\r
+\r
+void _vcui_view_dialing_draw_txt_ended(voice_call_view_data_t *vd, int end_type);\r
+void _vcui_view_dialing_draw_txt_connecting(voice_call_view_data_t *vd);\r
+void _vcui_view_dialing_draw_txt_dialing(voice_call_view_data_t *vd);\r
+\r
+#endif\r
diff --git a/ui/vcui-view-elements.c b/ui/vcui-view-elements.c
new file mode 100755 (executable)
index 0000000..e540f16
--- /dev/null
@@ -0,0 +1,1158 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-elements.h"
+#include "vcui-view-dialing.h"
+#include "vcui-view-incoming.h"
+#include "vcui-view-single-call.h"
+#include "vcui-view-multi-call-conf.h"
+#include "vcui-view-multi-call-split.h"
+#include "vcui-view-multi-call-list.h"
+#include "vcui-view-keypad.h"
+#include "vcui-view-callend.h"
+
+static void __vcui_hold_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_unhold_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_join_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_keypad_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_contacts_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_addcall_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_sound_path_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_spk_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_spk_press_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_mute_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_bigend_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_reject_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_reject_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_hold_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_end_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_end_active_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_end_hold_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_second_incoming_end_all_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_videocall_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_voicecall_btn_cb(void *data, Evas_Object *obj, void *event_info);
+static void __vcui_msg_btn_cb(void *data, Evas_Object *obj, void *event_info);
+
+static void __vcui_hold_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_engine_hold_unhold_swap_call();
+}
+
+static void __vcui_unhold_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_engine_hold_unhold_swap_call();
+}
+
+void _vcui_swap_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       ad->bholdisleft = ad->bswapped;
+       _vcui_view_popup_load(_("IDS_CALL_POP_SWAPPED"), POPUP_TIMEOUT_LONG, EINA_FALSE);
+       _vcui_engine_hold_unhold_swap_call();
+}
+
+static void __vcui_join_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_create_top_right_button_disabled(data);
+       _vcui_engine_join_call();
+}
+
+void _vcui_conf_img_cb(void *data, Evas_Object *obj, void *event_info) /* for multicall list view */
+{
+       CALL_UI_DEBUG("..");
+       _vcui_view_change(VIEW_INCALL_MULTICALL_LIST_VIEW, 0, 0, 0);
+}
+
+static void __vcui_keypad_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_view_change(VIEW_INCALL_KEYPAD_VIEW, 0, NULL, NULL);
+}
+
+static void __vcui_contacts_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       _vcui_doc_launch_contact_list_ug(NULL, NULL, vd->layout, NULL, NULL, NULL, &(vd->app_data->ugs_array_data));
+}
+
+static void __vcui_addcall_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       _vcui_doc_launch_phoneui_ug(NULL, NULL, vd->layout, NULL, NULL, NULL, &(vd->app_data->ugs_array_data));
+}
+
+static void __vcui_sound_path_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_view_popup_load_snd_path();
+}
+
+static void __vcui_spk_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       CALL_UI_DEBUG("vd->type:[%d]", vd->type);
+
+       _vcui_engine_speaker_on_off(EINA_TRUE);
+
+       ad->speaker_status = EINA_TRUE;
+       _vcui_create_bottom_left_button(vd);
+}
+
+static void __vcui_spk_press_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       CALL_UI_DEBUG("vd->type:[%d]", vd->type);
+
+       _vcui_engine_speaker_on_off(EINA_FALSE);
+
+       ad->speaker_status = EINA_FALSE;
+       _vcui_create_bottom_left_button(vd);
+}
+
+static void __vcui_mute_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       CALL_UI_DEBUG("vd->type:[%d]", vd->type);
+
+       _vcui_engine_mute_on_off(EINA_TRUE);
+
+       ad->mute_status = EINA_TRUE;
+       _vcui_create_bottom_middle_button(vd);
+}
+
+static void __vcui_mute_press_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       CALL_UI_DEBUG("vd->type:[%d]", vd->type);
+
+       _vcui_engine_mute_on_off(EINA_FALSE);
+
+       ad->mute_status = EINA_FALSE;
+       _vcui_create_bottom_middle_button(vd);
+}
+
+static void __vcui_bigend_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+       CALL_UI_DEBUG("vd->type:[%d]", vd->type);
+
+       _vcui_create_button_bigend_disabled(vd);
+
+       switch (vd->type) {
+       case VIEW_DIALLING_VIEW:
+               {
+                       _vcui_engine_cancel_call();
+               }
+               break;
+       case VIEW_INCALL_ONECALL_VIEW:
+               {
+                       _vcui_engine_end_call();
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_SPLIT_VIEW:
+               {
+                       _vcui_engine_end_active_calls();
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_CONF_VIEW:
+               {
+                       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *) vd->priv;
+                       if (priv->call_status == CALL_HOLD)
+                               _vcui_engine_end_held_calls();
+                       else
+                               _vcui_engine_end_active_calls();
+                       ad->call_end_type = CALL_END_TYPE_CONF_CALL;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_LIST_VIEW:
+               {
+                       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *) vd->priv;
+                       if (priv->call_status == CALL_HOLD)
+                               _vcui_engine_end_held_calls();
+                       else
+                               _vcui_engine_end_active_calls();
+
+                       int grp_count = 0;
+                       vcall_engine_get_group_count(&grp_count);
+                       CALL_UI_DEBUG("No. of groups - %d", grp_count);
+                       if (grp_count == 1)
+                               ad->call_end_type = CALL_END_TYPE_CONF_CALL;
+                       else
+                               ad->call_end_type = CALL_END_TYPE_NONE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return;
+               break;
+
+       }
+}
+
+static void __vcui_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+
+       if (priv->bselected_btn == EINA_TRUE) {
+               CALL_UI_DEBUG("already clicked!!");
+       } else {
+               priv->bselected_btn = EINA_TRUE;
+               _vcui_engine_answer_call();
+       }
+}
+
+static void __vcui_reject_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+
+       if (priv->bselected_btn == EINA_TRUE) {
+               CALL_UI_DEBUG("already clicked!!");
+       } else {
+               priv->bselected_btn = EINA_TRUE;
+               _vcui_engine_reject_call();
+       }
+}
+
+static void __vcui_second_incoming_reject_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_engine_reject_call();
+}
+
+static void __vcui_second_incoming_hold_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       priv->bdont_refresh = EINA_TRUE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               break;
+       }
+
+       _vcui_engine_answer_call_by_type(1);
+}
+
+static void __vcui_second_incoming_end_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       priv->bdont_refresh = EINA_TRUE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               break;
+       }
+
+       _vcui_engine_answer_call_by_type(2);
+}
+
+static void __vcui_second_incoming_end_active_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       priv->bdont_refresh = EINA_TRUE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               break;
+       }
+
+       _vcui_engine_answer_call_by_type(2);
+}
+
+static void __vcui_second_incoming_end_hold_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       priv->bdont_refresh = EINA_TRUE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               break;
+       }
+
+       _vcui_engine_answer_call_by_type(3);
+}
+
+static void __vcui_second_incoming_end_all_and_accept_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       priv->bdont_refresh = EINA_TRUE;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               break;
+       }
+
+       _vcui_engine_answer_call_by_type(4);
+}
+
+Evas_Object *_vcui_create_top_left_button(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_top_left_button_disabled(void *data)
+{
+       return NULL;
+}
+
+
+Evas_Object *_vcui_create_top_middle_button(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_top_middle_button_disabled(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_top_right_button(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_top_right_button_disabled(void *data)
+{
+       return NULL;
+}
+
+/* Speaker Button ENABLED */
+Evas_Object *_vcui_create_bottom_left_button(void *data)
+{
+       CALL_UI_KPI("_vcui_create_bottom_left_button start");
+       Evas_Object *btn;
+       Evas_Object *ic;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       switch (vd->type) {
+       case VIEW_DIALLING_VIEW:
+               {
+                       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_ONECALL_VIEW:
+               {
+                       incall_one_view_priv_t *priv = (incall_one_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_SPLIT_VIEW:
+               {
+                       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_CONF_VIEW:
+               {
+                       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_speaker");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+       if (EINA_TRUE == _vcui_is_headset_conected()) {
+               btn = elm_button_add(layout);
+               CALL_UI_KPI("elm_object_style_set start :: style_call_sixbtn");
+               elm_object_style_set(btn, "style_call_sixbtn");
+               CALL_UI_KPI("elm_object_style_set done :: style_call_sixbtn");
+               elm_object_part_content_set(layout, "btn_speaker", btn);
+               ic = elm_icon_add(layout);
+               elm_icon_file_set(ic, SPEAKER_ICON, NULL);
+               evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+               elm_icon_resizable_set(ic, 1, 1);
+               elm_object_part_content_set(btn, "icon", ic);
+               elm_object_text_set(btn, _("IDS_MSGC_OPT_SOUND"));
+               evas_object_smart_callback_add(btn, "clicked", __vcui_sound_path_btn_cb, vd);
+       } else {
+               if (ad->speaker_status == EINA_FALSE) {
+                       btn = elm_button_add(layout);
+                       CALL_UI_KPI("elm_object_style_set start :: style_call_sixbtn");
+                       elm_object_style_set(btn, "style_call_sixbtn");
+                       CALL_UI_KPI("elm_object_style_set done :: style_call_sixbtn");
+                       elm_object_part_content_set(layout, "btn_speaker", btn);
+                       ic = elm_icon_add(layout);
+                       elm_icon_file_set(ic, SPEAKER_ICON, NULL);
+                       evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+                       elm_icon_resizable_set(ic, 1, 1);
+                       elm_object_part_content_set(btn, "icon", ic);
+                       elm_object_text_set(btn, _("IDS_CALL_BUTTON_SPEAKER"));
+                       evas_object_smart_callback_add(btn, "clicked", __vcui_spk_btn_cb, vd);
+               } else {
+                       btn = elm_button_add(layout);
+                       CALL_UI_KPI("elm_object_style_set start :: style_call_sixbtn_pressed");
+                       elm_object_style_set(btn, "style_call_sixbtn_pressed");
+                       CALL_UI_KPI("elm_object_style_set done :: style_call_sixbtn_pressed");
+                       elm_object_part_content_set(layout, "btn_speaker", btn);
+                       ic = elm_icon_add(layout);
+                       elm_icon_file_set(ic, SPEAKER_ICON, NULL);
+                       evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+                       elm_icon_resizable_set(ic, 1, 1);
+                       elm_object_part_content_set(btn, "icon", ic);
+                       elm_object_text_set(btn, _("IDS_CALL_BUTTON_SPEAKER"));
+                       evas_object_smart_callback_add(btn, "clicked", __vcui_spk_press_btn_cb, vd);
+               }
+       }
+       CALL_UI_KPI("_vcui_create_bottom_left_button done");
+       return layout;
+}
+
+/* Speaker Button DISABLED */
+Evas_Object *_vcui_create_bottom_left_button_disabled(void *data)
+{
+       CALL_UI_KPI("_vcui_create_bottom_left_button_disabled start");
+       Evas_Object *btn;
+       Evas_Object *ic;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_ENDCALL_VIEW:
+               {
+                       endcall_view_priv_t *priv = (endcall_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_speaker");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       CALL_UI_KPI("elm_object_style_set start :: style_call_sixbtn_disabled");
+       elm_object_style_set(btn, "style_call_sixbtn_disabled");
+       CALL_UI_KPI("elm_object_style_set done :: style_call_sixbtn_disabled");
+       elm_object_part_content_set(layout, "btn_speaker", btn);
+       ic = elm_icon_add(layout);
+       elm_icon_file_set(ic, SPEAKER_DISABLED_ICON, NULL);
+       evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+       elm_icon_resizable_set(ic, 1, 1);
+       elm_object_part_content_set(btn, "icon", ic);
+       elm_object_text_set(btn, _("IDS_CALL_BUTTON_SPEAKER"));
+       CALL_UI_KPI("_vcui_create_bottom_left_button_disabled done");
+       return layout;
+}
+
+Evas_Object *_vcui_create_bottom_middle_button(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_bottom_middle_button_disabled(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_bottom_right_button(void *data)
+{
+       return NULL;
+}
+
+
+Evas_Object *_vcui_create_bottom_right_button_disabled(void *data)
+{
+       return NULL;
+}
+
+
+Evas_Object *_vcui_create_button_bigend(void *data)
+{
+       CALL_UI_KPI("_vcui_create_button_bigend start");
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_DIALLING_VIEW:
+               {
+                       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_ONECALL_VIEW:
+               {
+                       incall_one_view_priv_t *priv = (incall_one_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_SPLIT_VIEW:
+               {
+                       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_CONF_VIEW:
+               {
+                       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_LIST_VIEW:
+               {
+                       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_bigend");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_bigend", btn);
+       CALL_UI_KPI("elm_object_style_set start :: text_only/style_call_text_only_red");
+       elm_object_style_set(btn, "text_only/style_call_text_only_red");
+       CALL_UI_KPI("elm_object_style_set done :: text_only/style_call_text_only_red");
+       elm_object_text_set(btn, _("IDS_CALL_SK3_END_CALL"));
+       evas_object_smart_callback_add(btn, "clicked", __vcui_bigend_btn_cb, vd);
+       CALL_UI_KPI("_vcui_create_button_bigend done");
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_bigend_disabled(void *data)
+{
+       CALL_UI_KPI("_vcui_create_button_bigend_disabled start");
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_DIALLING_VIEW:
+               {
+                       vcui_view_dialing_priv_t *priv = (vcui_view_dialing_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_ONECALL_VIEW:
+               {
+                       incall_one_view_priv_t *priv = (incall_one_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_SPLIT_VIEW:
+               {
+                       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_INCALL_MULTICALL_CONF_VIEW:
+               {
+                       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       case VIEW_ENDCALL_VIEW:
+               {
+                       endcall_view_priv_t *priv = (endcall_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_bigend");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_bigend", btn);
+       CALL_UI_KPI("elm_object_style_set start :: text_only/style_call_text_only_red_disabled");
+       elm_object_style_set(btn, "text_only/style_call_text_only_red_disabled");
+       CALL_UI_KPI("elm_object_style_set done :: text_only/style_call_text_only_red_disabled");
+       elm_object_text_set(btn, _("IDS_CALL_SK3_END_CALL"));
+       CALL_UI_KPI("_vcui_create_button_bigend_disabled done");
+       return layout;
+}
+
+Evas_Object *_vcui_create_conf_list_button_hold(void *data)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_button_accept(void *data)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_accept");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_accept", btn);
+       CALL_UI_KPI("elm_object_style_set start :: text_only/style_call_text_only_green");
+       elm_object_style_set(btn, "text_only/style_call_text_only_green");
+       CALL_UI_KPI("elm_object_style_set done :: text_only/style_call_text_only_green");
+       elm_object_text_set(btn, _("IDS_CALL_BUTTON_ACCEPT"));
+       evas_object_smart_callback_add(btn, "clicked", __vcui_accept_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_reject(void *data)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_reject");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_reject", btn);
+       CALL_UI_KPI("elm_object_style_set start :: text_only/style_call_text_only_red");
+       elm_object_style_set(btn, "text_only/style_call_text_only_red");
+       CALL_UI_KPI("elm_object_style_set done :: text_only/style_call_text_only_red");
+       elm_object_text_set(btn, _("IDS_CALL_BUTTON_REJECT"));
+       evas_object_smart_callback_add(btn, "clicked", __vcui_reject_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_reject(void *data, char *text, char *part_name)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), part_name);
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, part_name, btn);
+       CALL_UI_KPI("elm_object_style_set start :: multiline_text_black");
+       elm_object_style_set(btn, "multiline_text_black");
+       CALL_UI_KPI("elm_object_style_set done :: multiline_text_black");
+       elm_object_text_set(btn, text);
+       evas_object_smart_callback_add(btn, "clicked", __vcui_second_incoming_reject_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_hold_and_accept(void *data, char *text)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_end_and_accept(void *data, char *text)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_incoming4");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_incoming4", btn);
+       CALL_UI_KPI("elm_object_style_set start :: multiline_text_red");
+       elm_object_style_set(btn, "multiline_text_red");
+       CALL_UI_KPI("elm_object_style_set done :: multiline_text_red");
+       elm_object_text_set(btn, text);
+       evas_object_smart_callback_add(btn, "clicked", __vcui_second_incoming_end_and_accept_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_end_active_and_accept(void *data, char *text)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_incoming2");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_incoming2", btn);
+       CALL_UI_KPI("elm_object_style_set start :: multiline_text_black");
+       elm_object_style_set(btn, "multiline_text_black");
+       CALL_UI_KPI("elm_object_style_set done :: multiline_text_black");
+       elm_object_text_set(btn, text);
+       evas_object_smart_callback_add(btn, "clicked", __vcui_second_incoming_end_active_and_accept_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_end_hold_and_accept(void *data, char *text)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_incoming3");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_incoming3", btn);
+       CALL_UI_KPI("elm_object_style_set start :: multiline_text_black");
+       elm_object_style_set(btn, "multiline_text_black");
+       CALL_UI_KPI("elm_object_style_set done :: multiline_text_black");
+       elm_object_text_set(btn, text);
+       evas_object_smart_callback_add(btn, "clicked", __vcui_second_incoming_end_hold_and_accept_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_create_button_second_incoming_end_all_and_accept(void *data, char *text)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       switch (vd->type) {
+       case VIEW_INCOMING_VIEW:
+               {
+                       incoming_view_priv_t *priv = (incoming_view_priv_t *) vd->priv;
+                       layout = priv->contents;
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong vd type:[%d]", vd->type);
+               return NULL;
+               break;
+
+       }
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_incoming4");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_incoming4", btn);
+       CALL_UI_KPI("elm_object_style_set start :: multiline_text_red");
+       elm_object_style_set(btn, "multiline_text_red");
+       CALL_UI_KPI("elm_object_style_set done :: multiline_text_red");
+       elm_object_text_set(btn, text);
+       evas_object_smart_callback_add(btn, "clicked", __vcui_second_incoming_end_all_and_accept_btn_cb, vd);
+
+       return layout;
+}
+
+Evas_Object *_vcui_show_wallpaper_image(Evas_Object *contents)
+{
+       return NULL;
+}
+
+Evas_Object *_vcui_show_calling_name_bg(Evas_Object *contents)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       Evas_Object *sw = NULL;
+       Evas_Object *ic = NULL;
+
+       sw = edje_object_part_swallow_get(_EDJ(contents), "swl_calling_name_bg");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(contents), sw);
+               evas_object_del(sw);
+       }
+
+       ic = elm_icon_add(ad->win_main);
+       elm_object_part_content_set(contents, "swl_calling_name_bg", ic);
+       elm_icon_file_set(ic, CALLING_NAME_BG_IMAGE, NULL);
+       elm_icon_fill_outside_set(ic, EINA_TRUE);
+
+       return ic;
+}
+
+void _vcui_delete_contact_image(Evas_Object *contents)
+{
+       Evas_Object *sw;
+
+       sw = edje_object_part_swallow_get(_EDJ(contents), "swl_cid");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(contents), sw);
+               evas_object_del(sw);
+       }
+}
+
+Evas_Object *_vcui_show_contact_image(Evas_Object *contents, Evas_Object *win_main, char *path)
+{
+       Evas_Object *sw;
+       Evas_Object *ic;
+
+       sw = edje_object_part_swallow_get(_EDJ(contents), "swl_cid");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(contents), sw);
+               evas_object_del(sw);
+       }
+
+       ic = elm_icon_add(win_main);
+       elm_object_part_content_set(contents, "swl_cid", ic);
+       elm_icon_file_set(ic, path, NULL);
+
+       return ic;
+}
+
+Evas_Object *_vcui_show_default_image(Evas_Object *contents, Evas_Object *win_main, char *path)
+{
+       Evas_Object *sw;
+       Evas_Object *ic;
+
+       sw = edje_object_part_swallow_get(_EDJ(contents), "swl_cid");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(contents), sw);
+               evas_object_del(sw);
+       }
+
+       ic = elm_icon_add(win_main);
+       elm_object_part_content_set(contents, "swl_cid", ic);
+       elm_icon_file_set(ic, path, NULL);
+
+       return ic;
+}
+
+void _vcui_set_full_image(Evas_Object *contents, Evas_Object *win_main, char *img_path)
+{
+       Evas_Object *d_image;
+       Evas_Object *sw;
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       CALL_UI_DEBUG("path:[%s]", img_path);
+
+       sw = edje_object_part_swallow_get(_EDJ(contents), "swl_cid_background");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(contents), sw);
+               evas_object_del(sw);
+       }
+
+       d_image = elm_image_add(contents);
+       elm_image_file_set(d_image, img_path, NULL);
+       elm_object_part_content_set(contents, "swl_cid_background", d_image);
+}
+
+static void __vcui_videocall_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("__vcui_videocall_btn_cb..");
+       char *tel_num = (char *)data;
+
+       bundle *kb;
+       kb = bundle_create();
+       bundle_add(kb, "KEY_CALL_TYPE", "MO");
+       bundle_add(kb, "number", tel_num);
+       aul_launch_app("org.tizen.vtmain", kb);
+       bundle_free(kb);
+
+       free(tel_num);
+       tel_num = NULL;
+
+       _vcui_view_common_call_end_timer_reset();
+       evas_object_smart_callback_del(obj, "clicked", __vcui_videocall_btn_cb);
+}
+
+static void __vcui_voicecall_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("__vcui_voicecall_btn_cb..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       char *tel_num = (char *)data;
+       vcui_call_type_t call_type;
+       vcui_call_mo_data_t call_data;
+
+       _vcui_view_common_timer_redial_reset();
+       ad->speaker_status = EINA_FALSE;
+       ad->mute_status = EINA_FALSE;
+
+       memset(&call_data, 0, sizeof(call_data));
+       call_type = VCUI_CALL_TYPE_MO;
+
+       snprintf(call_data.call_number, sizeof(call_data.call_number), "%s", tel_num);
+
+       _vcui_engine_interface_process_mo_call(call_type, &call_data);
+
+       free(tel_num);
+       tel_num = NULL;
+
+       evas_object_smart_callback_del(obj, "clicked", __vcui_voicecall_btn_cb);
+}
+
+static void __vcui_msg_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("__vcui_msg_btn_cb..");
+       char *tel_num = (char *)data;
+
+       _vcui_doc_launch_msg_composer(NULL, tel_num);
+
+       free(tel_num);
+       tel_num = NULL;
+
+       _vcui_view_common_call_end_timer_reset();
+       evas_object_smart_callback_del(obj, "clicked", __vcui_msg_btn_cb);
+}
+
+static void __vcui_add_to_contacts_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("__vcui_add_to_contacts_btn_cb..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       voice_call_view_data_t *vd = ad->view_st[VIEW_ENDCALL_VIEW];
+       char *tel_num = (char *)data;
+
+       _vcui_doc_launch_add_to_contacts_ug(NULL, NULL, vd->layout, NULL, NULL, NULL, &(vd->app_data->ugs_array_data), tel_num);
+
+       free(tel_num);
+       tel_num = NULL;
+
+       evas_object_smart_callback_del(obj, "clicked", __vcui_add_to_contacts_btn_cb);
+}
+static void __qp_end_btn_cb(void *data, Evas_Object * obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = (voice_call_view_data_t *) data;
+       vcui_app_call_data_t *ad = vd->app_data;
+       int grp_count = 0;
+
+       vcall_engine_get_group_count(&grp_count);
+       CALL_UI_DEBUG("No. of groups - %d", grp_count);
+
+       if (grp_count > 1) {
+               CALL_UI_DEBUG("multi-party call");
+               _vcui_engine_end_active_calls();
+       } else if (grp_count == 1) {
+               CALL_UI_DEBUG("single-party call");
+               int all_calls = 0, call_status = 0;
+               all_calls = _vcui_doc_get_count();
+               call_status = _vcui_doc_get_show_callstatus();
+               CALL_UI_DEBUG("all_calls[%d], call_status[%d]", all_calls, call_status);
+
+               if (all_calls > 1) {
+                       CALL_UI_DEBUG("End active conference call");
+                       if (call_status == CALL_HOLD)
+                               _vcui_engine_end_held_calls();
+                       else
+                               _vcui_engine_end_active_calls();
+                       ad->call_end_type = CALL_END_TYPE_CONF_CALL;    /*conf call end screen SHOW*/
+               } else if (all_calls == 1) {
+                       CALL_UI_DEBUG("End single active call");
+                       _vcui_engine_end_call();
+               } else {
+                       CALL_UI_DEBUG("invalid case");
+               }
+       } else {
+               CALL_UI_DEBUG("dialing/connecting screen end");
+               _vcui_engine_cancel_call();
+       }
+}
diff --git a/ui/vcui-view-elements.h b/ui/vcui-view-elements.h
new file mode 100755 (executable)
index 0000000..466edf7
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_UI_CALLBACK_
+#define _VOICE_CALL_UI_CALLBACK_
+
+void _vcui_swap_btn_cb(void *data, Evas_Object * obj, void *event_info);
+void _vcui_conf_img_cb(void *data, Evas_Object * obj, void *event_info);
+
+Evas_Object *_vcui_create_top_left_button(void *data);
+Evas_Object *_vcui_create_top_left_button_disabled(void *data);
+Evas_Object *_vcui_create_top_middle_button(void *data);
+Evas_Object *_vcui_create_top_middle_button_disabled(void *data);
+Evas_Object *_vcui_create_top_right_button(void *data);
+Evas_Object *_vcui_create_top_right_button_disabled(void *data);
+Evas_Object *_vcui_create_bottom_left_button(void *data);
+Evas_Object *_vcui_create_bottom_left_button_disabled(void *data);
+Evas_Object *_vcui_create_bottom_middle_button(void *data);
+Evas_Object *_vcui_create_bottom_middle_button_disabled(void *data);
+Evas_Object *_vcui_create_bottom_right_button(void *data);
+Evas_Object *_vcui_create_bottom_right_button_disabled(void *data);
+Evas_Object *_vcui_create_button_bigend(void *data);
+Evas_Object *_vcui_create_button_bigend_disabled(void *data);
+
+Evas_Object *_vcui_create_conf_list_button_hold(void *data);
+
+Evas_Object *_vcui_create_button_accept(void *data);
+Evas_Object *_vcui_create_button_reject(void *data);
+Evas_Object *_vcui_create_button_second_incoming_reject(void *data, char *text, char *part_name);
+Evas_Object *_vcui_create_button_second_incoming_hold_and_accept(void *data, char *text);
+Evas_Object *_vcui_create_button_second_incoming_end_and_accept(void *data, char *text);
+Evas_Object *_vcui_create_button_second_incoming_end_active_and_accept(void *data, char *text);
+Evas_Object *_vcui_create_button_second_incoming_end_hold_and_accept(void *data, char *text);
+Evas_Object *_vcui_create_button_second_incoming_end_all_and_accept(void *data, char *text);
+
+Evas_Object *_vcui_show_wallpaper_image(Evas_Object *contents);
+void _vcui_delete_contact_image(Evas_Object *contents);
+Evas_Object *_vcui_show_contact_image(Evas_Object *contents, Evas_Object *win_main, char *path);
+Evas_Object *_vcui_show_default_image(Evas_Object *contents, Evas_Object *win_main, char *path);
+void _vcui_set_full_image(Evas_Object *contents, Evas_Object *win_main, char *img_path);
+Evas_Object *_vcui_show_calling_name_bg(Evas_Object *contents); 
+#endif /* _VOICE_CALL_UI_CALLBACK_ */
diff --git a/ui/vcui-view-incoming-lock.c b/ui/vcui-view-incoming-lock.c
new file mode 100755 (executable)
index 0000000..18ab954
--- /dev/null
@@ -0,0 +1,421 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-incoming-lock.h"
+
+#define ACCEPT_DIFF_VALUE (130)
+#define ACCEPT_DIFF_VALUE_MAX (182)
+
+#define REJECT_DIFF_VALUE (-130)
+#define REJECT_DIFF_VALUE_MAX (-182)
+
+static int __vcui_view_incoming_lock_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_incoming_lock_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_incoming_lock_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_incoming_lock_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_incoming_lock_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCOMING_LOCK_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_incoming_lock_oncreate,
+       .onUpdate = __vcui_view_incoming_lock_onupdate,
+       .onHide = __vcui_view_incoming_lock_onhide,
+       .onShow = __vcui_view_incoming_lock_onshow,
+       .onDestroy = __vcui_view_incoming_lock_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_incoming_lock_new(vcui_app_call_data_t *ad)
+{
+
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(incoming_lock_view_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!!");
+       }
+
+       return &s_view;
+}
+
+static Evas_Object *__vcui_view_incoming_lock_load_edj(Evas *evas, char *edjname, const char *grpname)
+{
+       Evas_Object *edj;
+
+       edj = edje_object_add(evas);
+       if (!edje_object_file_set(edj, edjname, grpname)) {
+               CALL_UI_DEBUG("ERROR!!");
+               return NULL;
+       }
+
+       return edj;
+}
+
+static void __vcui_view_incoming_lock_accept_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       Evas_Event_Mouse_Move *ev = event_info;
+
+       priv->accept_start_x = ev->cur.canvas.x;
+}
+
+static void __vcui_view_incoming_lock_accept_mouse_move_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+       Evas_Event_Mouse_Move *ev = event_info;
+
+       int diff_x = 0;
+
+       priv->accept_cur_x = ev->cur.canvas.x;
+       diff_x = priv->accept_cur_x - priv->accept_start_x;
+
+
+       if (diff_x >= 0) {
+               if (diff_x < (ACCEPT_DIFF_VALUE * ad->scale_factor)) {
+                       evas_object_move(priv->lock_accept, diff_x, 0);
+
+                       edje_object_signal_emit(priv->lock_reject, "lock_reject,default", "prog");
+               } else if (diff_x < (ACCEPT_DIFF_VALUE_MAX * ad->scale_factor)) {
+                       evas_object_move(priv->lock_accept, diff_x, 0);
+                       evas_object_move(priv->lock_reject, (diff_x - (ACCEPT_DIFF_VALUE * ad->scale_factor)), 0);
+
+                       edje_object_signal_emit(priv->lock_reject, "lock_reject,default", "prog");
+               } else {
+                       evas_object_move(priv->lock_accept, (ACCEPT_DIFF_VALUE_MAX * ad->scale_factor), 0);
+                       evas_object_move(priv->lock_reject, ((ACCEPT_DIFF_VALUE_MAX * ad->scale_factor) - (ACCEPT_DIFF_VALUE * ad->scale_factor)), 0);
+
+                       edje_object_signal_emit(priv->lock_reject, "lock_reject,alpha", "prog");
+               }
+       }
+}
+
+static void __vcui_view_incoming_lock_accept_mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       int diff_x = priv->accept_cur_x - priv->accept_start_x;
+
+       if (diff_x >= (ACCEPT_DIFF_VALUE_MAX * ad->scale_factor)) {
+               if(_vcui_is_phonelock_status() == EINA_FALSE)
+                       vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
+               _vcui_engine_answer_call();
+       } else {
+               evas_object_move(priv->lock_accept, 0, 0);
+               evas_object_move(priv->lock_reject, 0, 0);
+       }
+
+}
+
+static Evas_Object *__vcui_view_incoming_lock_create_button_accept(void *data)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       if(priv->lock_accept != NULL) {
+               evas_object_del(priv->lock_accept);
+               priv->lock_accept = NULL;
+       }       
+       priv->lock_accept = __vcui_view_incoming_lock_load_edj(evas_object_evas_get(ad->win_main), EDJ_NAME, GRP_LOCK_ACCEPT);
+       evas_object_resize(priv->lock_accept, ad->root_w, ad->root_h);
+
+       evas_object_event_callback_add(priv->lock_accept, EVAS_CALLBACK_MOUSE_DOWN, __vcui_view_incoming_lock_accept_mouse_down_cb, vd);
+       evas_object_event_callback_add(priv->lock_accept, EVAS_CALLBACK_MOUSE_MOVE, __vcui_view_incoming_lock_accept_mouse_move_cb, vd);
+       evas_object_event_callback_add(priv->lock_accept, EVAS_CALLBACK_MOUSE_UP, __vcui_view_incoming_lock_accept_mouse_up_cb, vd);
+
+       edje_object_part_text_set(priv->lock_accept, "accept_text", _("IDS_CALL_BUTTON_ACCEPT"));
+
+       evas_object_show(priv->lock_accept);
+
+       return priv->lock_accept;
+}
+
+static void __vcui_view_incoming_lock_reject_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       Evas_Event_Mouse_Move *ev = event_info;
+
+       priv->reject_start_x = ev->cur.canvas.x;
+}
+
+static void __vcui_view_incoming_lock_reject_mouse_move_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+       Evas_Event_Mouse_Move *ev = event_info;
+
+       int diff_x = 0;
+
+       priv->reject_cur_x = ev->cur.canvas.x;
+       diff_x = priv->reject_cur_x - priv->reject_start_x;
+
+       if (diff_x <= 0) {
+               if (diff_x > (REJECT_DIFF_VALUE * ad->scale_factor)) {
+                       evas_object_move(priv->lock_reject, diff_x, 0);
+
+                       edje_object_signal_emit(priv->lock_accept, "lock_accept,default", "prog");
+               } else if (diff_x > (REJECT_DIFF_VALUE_MAX * ad->scale_factor)) {
+                       evas_object_move(priv->lock_reject, diff_x, 0);
+                       evas_object_move(priv->lock_accept, (diff_x - (REJECT_DIFF_VALUE * ad->scale_factor)), 0);
+
+                       edje_object_signal_emit(priv->lock_accept, "lock_accept,default", "prog");
+               } else {
+                       evas_object_move(priv->lock_reject, (REJECT_DIFF_VALUE_MAX * ad->scale_factor), 0);
+                       evas_object_move(priv->lock_accept, ((REJECT_DIFF_VALUE_MAX * ad->scale_factor) - (REJECT_DIFF_VALUE * ad->scale_factor)), 0);
+
+                       edje_object_signal_emit(priv->lock_accept, "lock_accept,alpha", "prog");
+
+               }
+       }
+}
+
+static void __vcui_view_incoming_lock_reject_mouse_up_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       int diff_x = priv->reject_cur_x - priv->reject_start_x;
+
+       if (diff_x <= (REJECT_DIFF_VALUE_MAX * ad->scale_factor)) {
+/*             vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);*/
+               _vcui_engine_reject_call();
+       } else {
+               evas_object_move(priv->lock_reject, 0, 0);
+               evas_object_move(priv->lock_accept, 0, 0);
+       }
+
+}
+
+static Evas_Object *__vcui_view_incoming_lock_create_button_reject(void *data)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       if(priv->lock_reject != NULL) {
+               evas_object_del(priv->lock_reject);
+               priv->lock_reject = NULL;
+       }
+       priv->lock_reject = __vcui_view_incoming_lock_load_edj(evas_object_evas_get(ad->win_main), EDJ_NAME, GRP_LOCK_REJECT);
+       evas_object_resize(priv->lock_reject, ad->root_w, ad->root_h);
+
+       evas_object_event_callback_add(priv->lock_reject, EVAS_CALLBACK_MOUSE_DOWN, __vcui_view_incoming_lock_reject_mouse_down_cb, vd);
+       evas_object_event_callback_add(priv->lock_reject, EVAS_CALLBACK_MOUSE_MOVE, __vcui_view_incoming_lock_reject_mouse_move_cb, vd);
+       evas_object_event_callback_add(priv->lock_reject, EVAS_CALLBACK_MOUSE_UP, __vcui_view_incoming_lock_reject_mouse_up_cb, vd);
+
+       edje_object_part_text_set(priv->lock_reject, "reject_text", _("IDS_CALL_BUTTON_REJECT"));
+
+       evas_object_show(priv->lock_reject);
+
+       return priv->lock_reject;
+}
+
+static void __vcui_view_incoming_lock_draw_screen(voice_call_view_data_t *vd)
+{
+       CALL_UI_DEBUG("..");
+
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+       Evas_Object *eo = priv->contents;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       priv->now_data = _vcui_doc_get_recent_mt();
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+       if (priv->now_data->mo_mt_status != CALL_INCOMING) {
+               CALL_UI_DEBUG("it is not call_incoming.");
+               return;
+       }
+
+       /* call image */
+       if (strcmp((char *)priv->now_data->call_file_path, NOIMG_ICON) == 0) {
+               _vcui_show_wallpaper_image(priv->contents);
+       } else {
+               CALL_UI_DEBUG("there is caller image.");
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, priv->now_data->call_file_path);
+       }
+
+       /* call name (if nothing, call number) */
+       if (strlen((char *)priv->now_data->call_display) == 0) {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_num);
+       } else {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_display);
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)priv->now_data->call_num);
+       }
+
+       __vcui_view_incoming_lock_create_button_accept(vd);
+       __vcui_view_incoming_lock_create_button_reject(vd);
+
+       ad->beffect_needed = EINA_TRUE;
+
+       evas_object_show(eo);
+
+}
+
+static Evas_Object *__vcui_view_incoming_lock_create_contents(void *data)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       Evas_Object *eo;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_MTLOCK);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_incoming_lock_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_incoming_lock_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("mt-lock view create!!");
+
+       vcui_app_call_data_t *ad = view_data->app_data;
+       incoming_lock_view_priv_t *priv = view_data->priv;
+
+       if (!view_data->layout) {
+               view_data->layout = __vcui_view_incoming_lock_create_layout_main(ad->win_main);
+               if (view_data->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+               priv->contents = __vcui_view_incoming_lock_create_contents(view_data);
+               elm_object_part_content_set(view_data->layout, "elm.swallow.content", priv->contents);
+
+               evas_object_name_set(priv->contents, "INCOMINGLOCKVIEW");
+               CALL_UI_DEBUG("[========== INCOMINGLOCKVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+
+       }
+
+       __vcui_view_incoming_lock_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_lock_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("mt-lock view update!!");
+
+       __vcui_view_incoming_lock_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_lock_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("mt-lock view hide!!");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_lock_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("mt-lock view show!!");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       int result = 0;
+
+       __vcui_view_incoming_lock_draw_screen(view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+       _vcui_app_win_set_noti_type(EINA_TRUE);
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_lock_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("mt-lock view destroy!!");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCOMING_LOCK_VIEW];
+       incoming_lock_view_priv_t *priv = (incoming_lock_view_priv_t *)vd->priv;
+
+       if (_vcui_is_idle_lock() == CALL_LOCK)
+               _vcui_app_win_set_noti_type(EINA_TRUE);
+       else
+               _vcui_app_win_set_noti_type(EINA_FALSE);
+
+       ad->bmute_ringtone = EINA_FALSE;
+       if (priv != NULL) {
+               if (priv->lock_accept) {
+                       evas_object_del(priv->lock_accept);
+                       priv->lock_accept = NULL;
+               }
+               if (priv->lock_reject) {
+                       evas_object_del(priv->lock_reject);
+                       priv->lock_reject = NULL;
+               }
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCOMING_LOCK_VIEW] = NULL;
+
+       _vcui_cache_flush();
+
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-incoming-lock.h b/ui/vcui-view-incoming-lock.h
new file mode 100755 (executable)
index 0000000..57df16f
--- /dev/null
@@ -0,0 +1,39 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VOICE_CALL_UI_INCOMING_LOCK_VIEW_\r
+#define _VOICE_CALL_UI_INCOMING_LOCK_VIEW_\r
+\r
+typedef struct {\r
+       Evas_Object *contents;\r
+       Evas_Object *ic;\r
+\r
+       Evas_Object *lock_accept;\r
+       int accept_start_x;\r
+       int accept_cur_x;\r
+\r
+       Evas_Object *lock_reject;\r
+       int reject_start_x;\r
+       int reject_cur_x;\r
+\r
+       call_data_t *now_data;\r
+\r
+} incoming_lock_view_priv_t;\r
+\r
+voice_call_view_data_t *_vcui_view_incoming_lock_new(vcui_app_call_data_t *ad);\r
+\r
+#endif\r
diff --git a/ui/vcui-view-incoming.c b/ui/vcui-view-incoming.c
new file mode 100755 (executable)
index 0000000..bd924b5
--- /dev/null
@@ -0,0 +1,350 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-incoming.h"
+#include "vcui-view-elements.h"
+
+static int __vcui_view_incoming_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_incoming_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_incoming_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_incoming_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_incoming_destroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCOMING_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_incoming_oncreate,
+       .onUpdate = __vcui_view_incoming_onupdate,
+       .onHide = __vcui_view_incoming_onhide,
+       .onShow = __vcui_view_incoming_onshow,
+       .onDestroy = __vcui_view_incoming_destroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_incoming_new(vcui_app_call_data_t *ad)
+{
+
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(incoming_view_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!! ");
+       }
+
+       return &s_view;
+}
+
+static void __vcui_view_incoming_clear_button(Evas_Object *eo)
+{
+       CALL_UI_DEBUG("..");
+       Evas_Object *sw;
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_accept");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_reject");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_incoming1");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_incoming2");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_incoming3");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+       sw = edje_object_part_swallow_get(_EDJ(eo), "btn_incoming4");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(eo), sw);
+               evas_object_del(sw);
+       }
+}
+
+static void __vcui_view_incoming_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incoming_view_priv_t *priv = (incoming_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+       int hold_cnt = 0;
+       int active_cnt = 0;
+
+       /* ============ Check valid Evas Object ============= */
+       int valid = 0;
+       valid = _vcui_check_valid_eo(priv->contents, "INCOMINGVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== INCOMINGVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+       /* ============ Check valid Evas Object ============= */
+
+       if (strcmp((char *)priv->now_data->call_file_path, NOIMG_ICON) == 0) {
+               _vcui_show_wallpaper_image(priv->contents);
+               _vcui_show_calling_name_bg(priv->contents);
+       } else {
+               CALL_UI_DEBUG("there is caller image.");
+               _vcui_show_wallpaper_image(priv->contents);
+               _vcui_show_calling_name_bg(priv->contents);
+               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, priv->now_data->call_file_path);
+       }
+
+       /* call name (if nothing, call number) */
+       if (strlen((char *)priv->now_data->call_display) == 0) {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_num);
+       } else {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_display);
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)priv->now_data->call_num);
+       }
+
+       active_cnt = _vcui_doc_get_count_unhold();
+       hold_cnt = _vcui_doc_get_count_hold();
+       CALL_UI_DEBUG("unhold:[%d], hold:[%d]",active_cnt, hold_cnt );
+       __vcui_view_incoming_clear_button(priv->contents);      /* to change 2nd incoming call view -> normal incoming call view. */
+       if (active_cnt == 0) {  /* no active call  - single mt call or 2nd call(1hold) */
+               CALL_UI_DEBUG("normal incoming call");
+
+               _vcui_create_button_accept(vd);
+               _vcui_create_button_reject(vd);
+
+               ad->beffect_needed = EINA_TRUE;
+       } else if (hold_cnt == 0) {     /* active call & no hold call - 2nd call(1active) */
+               CALL_UI_DEBUG("2nd incoming call-1");
+               char text[256] = { 0, };
+               _vcui_create_button_second_incoming_reject(vd, _("IDS_CALL_BUTTON_REJECT"), "btn_incoming3");
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_BODY_HOLD_ACTIVE_CALL_ABB"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_hold_and_accept(vd, text);
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_POP_END_ACTIVE_CALL"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_and_accept(vd, text);
+       } else if (active_cnt == 1 && hold_cnt == 1) {  /* 1active & 1hold */
+               CALL_UI_DEBUG("2nd incoming call - 1ACT & 1HLD");
+               char text[256] = { 0, };
+               _vcui_create_button_second_incoming_reject(vd, _("IDS_CALL_BUTTON_REJECT"), "btn_incoming1");
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_POP_END_ACTIVE_CALL"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_active_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_OPT_END_HELD_CALL"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_hold_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_OPT_END_ALL_CALLS"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_all_and_accept(vd, text);
+       } else if (active_cnt >= 1 && hold_cnt == 1) {  /* 1+active & 1hold */
+               CALL_UI_DEBUG("2nd incoming call - [1+]ACT & 1HLD");
+               char text[256] = { 0, };
+               _vcui_create_button_second_incoming_reject(vd, _("IDS_CALL_BUTTON_REJECT"), "btn_incoming1");
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s(%d) + %s", _("IDS_CALL_POP_END_ACTIVE_CALL"), active_cnt, _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_active_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_OPT_END_HELD_CALL"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_hold_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_OPT_END_ALL_CALLS"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_all_and_accept(vd, text);
+       } else if (active_cnt == 1 && hold_cnt >= 1) {  /*  1active & 1+hold */
+               CALL_UI_DEBUG("2nd incoming call - 1ACT & [1+]HLD");
+               char text[256] = { 0, };
+               _vcui_create_button_second_incoming_reject(vd, _("IDS_CALL_BUTTON_REJECT"), "btn_incoming1");
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_POP_END_ACTIVE_CALL"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_active_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s(%d) + %s", _("IDS_CALL_OPT_END_HELD_CALL"), hold_cnt, _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_hold_and_accept(vd, text);
+
+               memset(text, 0x00, 256);
+               snprintf(text, 256, "%s + %s", _("IDS_CALL_OPT_END_ALL_CALLS"), _("IDS_CALL_BUTTON_ACCEPT"));
+               _vcui_create_button_second_incoming_end_all_and_accept(vd, text);
+       }
+       CALL_UI_DEBUG("unhold:[%d], hold:[%d]", active_cnt, hold_cnt);
+
+       evas_object_show(eo);
+}
+
+static Evas_Object *__vcui_view_incoming_create_contents(void *data)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       Evas_Object *eo = NULL;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_MTVIEW);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_incoming_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_incoming_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("incoming view create!!");
+
+       vcui_app_call_data_t *ad = view_data->app_data;
+       incoming_view_priv_t *priv = view_data->priv;
+
+       if (!view_data->layout) {
+
+               view_data->layout = __vcui_view_incoming_create_layout_main(ad->win_main);
+               if (view_data->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+
+               priv->contents = __vcui_view_incoming_create_contents(view_data);
+               elm_object_part_content_set(view_data->layout, "elm.swallow.content", priv->contents);
+
+               evas_object_name_set(priv->contents, "INCOMINGVIEW");
+               CALL_UI_DEBUG("[========== INCOMINGVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+
+       }
+
+       __vcui_view_incoming_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("incoming view update");
+       incoming_view_priv_t *priv = view_data->priv;
+       if (priv->bdont_refresh == EINA_TRUE) {
+               return VC_NO_ERROR;
+       }
+       priv->bselected_btn = EINA_FALSE;
+       __vcui_view_incoming_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incoming view hide");
+
+       int valid = 0;
+       incoming_view_priv_t *priv = (incoming_view_priv_t *)view_data->priv;
+       valid = _vcui_check_valid_eo(priv->contents, "INCOMINGVIEW");
+
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== INCOMINGVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       }
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incoming view show");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       int result = 0;
+
+       incoming_view_priv_t *priv = view_data->priv;
+       priv->now_data = _vcui_doc_get_recent_mt();
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return VC_ERROR;
+       }
+
+       __vcui_view_incoming_draw_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+
+       _vcui_app_win_set_noti_type(EINA_TRUE);
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_incoming_destroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incoming view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCOMING_VIEW];
+       incoming_view_priv_t *priv = (incoming_view_priv_t *)vd->priv;
+
+       if (_vcui_is_idle_lock() == CALL_LOCK)
+               _vcui_app_win_set_noti_type(EINA_TRUE);
+       else
+               _vcui_app_win_set_noti_type(EINA_FALSE);
+
+       ad->bmute_ringtone = EINA_FALSE;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCOMING_VIEW] = NULL;
+       _vcui_cache_flush();
+
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-incoming.h b/ui/vcui-view-incoming.h
new file mode 100755 (executable)
index 0000000..baaad16
--- /dev/null
@@ -0,0 +1,34 @@
+/*\r
+ * Copyright 2012  Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.tizenopensource.org/license\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+\r
+#ifndef _VOICE_CALL_UI_INCOMING_VIEW_\r
+#define _VOICE_CALL_UI_INCOMING_VIEW_\r
+\r
+typedef struct {\r
+       Evas_Object *contents;\r
+\r
+       call_data_t *now_data;\r
+       Evas_Object *ic;\r
+\r
+       int bdont_refresh;\r
+       int bselected_btn;\r
+\r
+} incoming_view_priv_t;\r
+\r
+voice_call_view_data_t *_vcui_view_incoming_new(vcui_app_call_data_t *ad);\r
+\r
+#endif\r
diff --git a/ui/vcui-view-keypad.c b/ui/vcui-view-keypad.c
new file mode 100755 (executable)
index 0000000..c2294f6
--- /dev/null
@@ -0,0 +1,438 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-keypad.h"
+#include "vcui-view-common.h"
+
+static int _vcui_view_keypad_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int _vcui_view_keypad_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int _vcui_view_keypad_onhide(voice_call_view_data_t *view_data);
+static int _vcui_view_keypad_onshow(voice_call_view_data_t *view_data);
+static int _vcui_view_keypad_ondestroy(voice_call_view_data_t *view_data);
+static Evas_Object *__vcui_view_keypad_create_single_line_scrolled_entry(void *content);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCALL_KEYPAD_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = _vcui_view_keypad_oncreate,
+       .onUpdate = _vcui_view_keypad_onupdate,
+       .onHide = _vcui_view_keypad_onhide,
+       .onShow = _vcui_view_keypad_onshow,
+       .onDestroy = _vcui_view_keypad_ondestroy,
+       .priv = NULL,
+};
+
+static void __vcui_view_keypad_on_keypad_down(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       CALL_UI_DEBUG("source(%s)",source);
+
+       char before_dest[KEYPAD_STR_DEFINE_OPEN_SIZE+KEYPAD_ENTRY_DISP_DATA_SIZE+1] = { 0, };
+       char *sub_buffer_pointer = NULL;
+       char entry_dest[KEYPAD_ENTRY_SET_DATA_SIZE+1] = { 0, };
+       char *keypad_source;
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_keypad_priv_t *priv = NULL;
+
+       if (NULL == vd) {
+               CALL_UI_DEBUG("\n data is null \n");
+               return;
+       }
+       priv = (vcui_view_keypad_priv_t *)vd->priv;
+
+       if (strlen(source) >= KEYPAD_ENTRY_DISP_DATA_SIZE) {
+               CALL_UI_DEBUG("strlen(source) >= DATA_BUF_SIZE(%d)",KEYPAD_ENTRY_DISP_DATA_SIZE);
+               return;
+       }
+
+       if (strcmp(source, "star") == 0) {
+               keypad_source = "*";
+       } else if (strcmp(source, "sharp") == 0) {
+               keypad_source = "#";
+       } else {
+               keypad_source = (char *)source;
+       }
+
+       _vcui_engine_interface_send_dtmf_number(keypad_source[0]);
+
+       if (strlen(priv->entry_disp_data) == KEYPAD_ENTRY_DISP_DATA_SIZE) {
+               sub_buffer_pointer = &priv->entry_disp_data[1];
+
+               snprintf(priv->entry_disp_data, sizeof(priv->entry_disp_data),
+                                "%s", sub_buffer_pointer);
+               CALL_UI_DEBUG("priv->entry_disp_data after change [%s]", priv->entry_disp_data);
+       }
+
+       priv->entry_disp_data[priv->data_len] = keypad_source[0];
+       if(priv->data_len < (KEYPAD_ENTRY_DISP_DATA_SIZE-1)) {
+               priv->data_len++;
+       }
+
+       snprintf(before_dest, sizeof(before_dest),
+                "<font_size=%d><color=#FFFFFF><shadow_color=#000000><style=outline_shadow>%s",
+                MAX_DIAL_NUMBER_FONT_SIZE, priv->entry_disp_data);
+
+       snprintf(entry_dest, sizeof(entry_dest),
+                "%s</style></shadow_color></color></font_size>",
+                before_dest);
+
+       CALL_UI_DEBUG("entry_dest [%s]", priv->entry_disp_data);
+       elm_entry_entry_set(priv->entry, entry_dest);
+       elm_entry_cursor_end_set(priv->entry);
+}
+
+static void __vcui_view_keypad_hide_btn_effect_done(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       CALL_UI_DEBUG("..");
+
+       _vcui_view_auto_change();
+}
+
+static void __vcui_view_keypad_hide_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)vd->priv;
+
+       edje_object_signal_emit(_EDJ(priv->contents), "HIDE", "KEYPADBTN");
+       edje_object_signal_callback_add(_EDJ(priv->contents), "DONE", "HIDEKEYPAD", __vcui_view_keypad_hide_btn_effect_done, data);
+}
+
+static void __vcui_view_keypad_end_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+
+       if (_vcui_doc_get_count_unhold() == 1) {
+               _vcui_engine_end_call();
+       } else if (_vcui_doc_get_count_unhold() > 1) {
+               _vcui_engine_end_active_calls();
+       } else if (_vcui_doc_get_count_hold() == 1) {
+               _vcui_engine_end_call();
+       } else if (_vcui_doc_get_count_hold() > 1) {
+               _vcui_engine_end_held_calls();
+       } else {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+
+}
+
+voice_call_view_data_t *_vcui_view_keypad_new(vcui_app_call_data_t *ad)
+{
+
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(vcui_view_keypad_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!!");
+       }
+
+       return &s_view;
+}
+
+static Evas_Object *__vcui_view_keypad_create_hide_button(void *data)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)vd->priv;
+       layout = priv->contents;
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_hide");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_hide", btn);
+       elm_object_style_set(btn, "text_only/style_keypad_hide_button");
+       elm_object_text_set(btn, _("IDS_CALL_BUTTON2_HIDE_KEYPAD"));
+       evas_object_smart_callback_add(btn, "clicked", __vcui_view_keypad_hide_btn_cb, vd);
+
+       return layout;
+}
+
+static Evas_Object *__vcui_view_keypad_create_end_call(void *data)
+{
+       Evas_Object *btn;
+       Evas_Object *layout;
+       Evas_Object *sw;
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)vd->priv;
+       layout = priv->contents;
+
+       sw = edje_object_part_swallow_get(_EDJ(layout), "btn_end");
+       if (sw) {
+               edje_object_part_unswallow(_EDJ(layout), sw);
+               evas_object_del(sw);
+       }
+
+       btn = elm_button_add(layout);
+       elm_object_part_content_set(layout, "btn_end", btn);
+       elm_object_style_set(btn, "text_only/style_keypad_end_button");
+       elm_object_text_set(btn, _("IDS_CALL_SK3_END_CALL"));
+       evas_object_smart_callback_add(btn, "clicked", __vcui_view_keypad_end_btn_cb, vd);
+
+       return layout;
+}
+
+static Evas_Object *__vcui_view_keypad_create_contents(void *data)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+
+       Evas_Object *eo;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_KEYPAD);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_keypad_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       Evas_Object *ly;
+
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static void __vcui_view_keypad_draw_keypad_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       int valid = 0;
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)vd->priv;
+
+       _vcui_show_wallpaper_image(priv->contents);
+
+       if (_vcui_doc_get_count_unhold() == 1) {
+               priv->now_data = _vcui_doc_get_last_status(CALL_UNHOLD);
+               if (NULL == priv->now_data) {
+                       CALL_UI_DEBUG("priv->now_data is NULL \n");
+                       return;
+               }
+               if (strlen((char *)priv->now_data->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", (char *)priv->now_data->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", (char *)priv->now_data->call_display);
+               }
+       } else if (_vcui_doc_get_count_unhold() > 1) {
+               priv->now_data = _vcui_doc_get_last_status(CALL_UNHOLD);
+               edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+       } else if (_vcui_doc_get_count_hold() == 1) {
+               priv->now_data = _vcui_doc_get_last_status(CALL_HOLD);
+               if (NULL == priv->now_data) {
+                       CALL_UI_DEBUG("priv->now_data is NULL \n");
+                       return;
+               }
+
+               if (strlen((char *)priv->now_data->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", (char *)priv->now_data->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", (char *)priv->now_data->call_display);
+               }
+       } else if (_vcui_doc_get_count_hold() > 1) {
+               priv->now_data = _vcui_doc_get_last_status(CALL_HOLD);
+               edje_object_part_text_set(_EDJ(priv->contents), "txt_call_name", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+       } else {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+
+       valid = _vcui_check_valid_eo(priv->contents, "KEYPADVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== KEYPADVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+
+       if (NULL == priv->now_data) {
+               CALL_UI_DEBUG("\n priv->now_data is NULL \n");
+               return;
+       }
+       _vcui_view_common_set_each_time(priv->now_data->start_time);
+
+       __vcui_view_keypad_create_hide_button(vd);
+       __vcui_view_keypad_create_end_call(vd);
+
+       edje_object_signal_emit(_EDJ(priv->contents), "SHOW", "KEYPADBTN");
+
+       evas_object_show(priv->contents);
+
+}
+
+static int _vcui_view_keypad_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("keypad view create!!");
+
+       vcui_app_call_data_t *ad = view_data->app_data;
+       vcui_view_keypad_priv_t *priv = view_data->priv;
+
+       if (!view_data->layout) {
+               /* Create Main Layout */
+               view_data->layout = __vcui_view_keypad_create_layout_main(ad->win_main);
+               if (view_data->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+
+               /* Create Contents */
+               priv->contents = __vcui_view_keypad_create_contents(view_data);
+               elm_object_part_content_set(view_data->layout, "elm.swallow.content", priv->contents);
+
+               priv->entry = __vcui_view_keypad_create_single_line_scrolled_entry(priv->contents);
+               memset(priv->entry_disp_data, 0x0, sizeof(priv->entry_disp_data));
+               priv->data_len = 0;
+
+               edje_object_signal_callback_add(_EDJ(priv->contents),
+                                                                               "pad_down", "*",
+                                                                               __vcui_view_keypad_on_keypad_down, 
+                                                                               view_data);
+
+               edje_object_part_swallow(_EDJ(priv->contents), "textblock/textarea", priv->entry);
+               evas_object_name_set(priv->contents, "KEYPADVIEW");
+               CALL_UI_DEBUG("[========== KEYPADVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+       }
+
+       _vcui_view_keypad_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int _vcui_view_keypad_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("keypad view update!!");
+
+       _vcui_view_keypad_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int _vcui_view_keypad_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("keypad view hide!!");
+       int valid = 0;
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)view_data->priv;
+
+       valid = _vcui_check_valid_eo(priv->contents, "KEYPADVIEW");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== KEYPADVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+       }
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int _vcui_view_keypad_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("keypad view show!!");
+
+       vcui_view_keypad_priv_t *priv = view_data->priv;
+
+       __vcui_view_keypad_draw_keypad_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+       elm_object_focus_set(priv->entry, EINA_TRUE);
+       return VC_NO_ERROR;
+}
+
+static int _vcui_view_keypad_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("keypad view destroy!!");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCALL_KEYPAD_VIEW];
+       vcui_view_keypad_priv_t *priv = (vcui_view_keypad_priv_t *)vd->priv;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCALL_KEYPAD_VIEW] = NULL;
+
+       _vcui_cache_flush();
+
+       return VC_NO_ERROR;
+}
+
+static Evas_Object *__vcui_view_keypad_create_single_line_scrolled_entry(void *content)
+{
+       Evas_Object *en;
+
+       if (content == NULL) {
+               CALL_UI_DEBUG("content is NULL!");
+               return NULL;
+       }
+
+       en = elm_entry_add(content);
+       elm_entry_scrollable_set(en, EINA_TRUE);
+
+       elm_entry_select_all(en);
+       elm_entry_scrollbar_policy_set(en, ELM_SCROLLER_POLICY_OFF,
+                                               ELM_SCROLLER_POLICY_AUTO);
+
+       elm_entry_bounce_set(en, EINA_FALSE, EINA_FALSE);
+       elm_entry_line_wrap_set(en, ELM_WRAP_WORD);
+       elm_entry_input_panel_enabled_set(en, EINA_FALSE);
+       elm_entry_single_line_set(en, EINA_TRUE);
+       elm_entry_cursor_end_set(en);
+       evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       evas_object_show(en);
+
+       return en;
+}
diff --git a/ui/vcui-view-keypad.h b/ui/vcui-view-keypad.h
new file mode 100755 (executable)
index 0000000..7cc4f03
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VCUI_VIEW_KEYPAD_
+#define _VCUI_VIEW_KEYPAD_
+
+#ifndef STRLEN
+#define STRLEN(str) (((str) == NULL) ? 0: strlen(str))
+#endif
+
+#define CURSOR_BEGIN   -1
+#define CURSOR_END             -2
+
+#define MAX_DIAL_NUMBER_FONT_SIZE              70
+#define KEYPAD_STR_DEFINE_OPEN_SIZE    73
+#define KEYPAD_STR_DEFINE_CLOSE_SIZE   43
+#define KEYPAD_ENTRY_DISP_DATA_SIZE    1024
+#define KEYPAD_ENTRY_SET_DATA_SIZE     (KEYPAD_STR_DEFINE_OPEN_SIZE + KEYPAD_STR_DEFINE_CLOSE_SIZE + KEYPAD_ENTRY_DISP_DATA_SIZE)
+
+typedef struct {
+       Evas_Object *contents;
+       Evas_Object *ic;
+       call_data_t *now_data;
+
+       Evas_Object *entry;
+       int data_len;
+       char entry_disp_data[KEYPAD_ENTRY_DISP_DATA_SIZE+1];
+} vcui_view_keypad_priv_t;
+
+#endif
+
+voice_call_view_data_t *_vcui_view_keypad_new(vcui_app_call_data_t *ad);
diff --git a/ui/vcui-view-layout-hd.h b/ui/vcui-view-layout-hd.h
new file mode 100755 (executable)
index 0000000..557ddf0
--- /dev/null
@@ -0,0 +1,754 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VCUI_VIEW_LAYOUT_HD__
+#define __VCUI_VIEW_LAYOUT_HD__
+
+#define COLOR_DEFAULT 0 0 0 255
+#define COLOR_BG_ALPHA 0 0 0 0
+#define COLOR_BG_FOR_HELD_CALL_DIM 0 0 0 150
+
+/*#define BTN_EDGE_W 9*/
+
+/*
+ * HD GUI Widget Dimensions
+ * In Portrait mode
+ */
+#define MAIN_SCREEN_W 720
+#define MAIN_SCREEN_H 1280
+
+#define INDICATOR_HEIGHT 50
+#define NAVIFRAME_TITLE_HEIGHT 100
+
+#define MAIN_NAVIFRAME_W MAIN_SCREEN_W
+#define MAIN_NAVIFRAME_H (MAIN_SCREEN_H-INDICATOR_HEIGHT-NAVIFRAME_TITLE_HEIGHT)
+#define NAVIFRAME_T_PAD 50
+
+#define QP_WIN_W MAIN_SCREEN_W
+#define QP_WIN_H 166   /*approx*/
+
+#define DIALING_STATUS_L_PAD 0
+#define DIALING_STATUS_WIDTH MAIN_SCREEN_W
+#define DIALING_STATUS_T_PAD 687
+#define        DIALING_STATUS_HEIGHT 52
+
+#define CALL_NAME_L_PAD 20
+#define CALL_NAME_WIDTH 680
+#define CALL_NAME_T_PAD 83
+#define        CALL_NAME_HEIGHT 80
+
+#define CALL_NUMBER_T_GAP 6
+
+#define CALL_NUMBER_L_PAD CALL_NAME_L_PAD
+#define CALL_NUMBER_WIDTH CALL_NAME_WIDTH
+#define CALL_NUMBER_T_PAD (CALL_NAME_T_PAD+CALL_NAME_HEIGHT+CALL_NUMBER_T_GAP)
+#define        CALL_NUMBER_HEIGHT 52
+
+#define CALLER_ID_L_PAD 208
+#define CALLER_ID_WIDTH 304
+#define CALLER_ID_T_PAD 268
+#define        CALLER_ID_HEIGHT 304
+
+#define BACKGROUND_CID_L_PAD 0
+#define BACKGROUND_CID_WIDTH MAIN_SCREEN_W
+#define BACKGROUND_CID_T_PAD 0
+#define BACKGROUND_CID_HEIGHT MAIN_SCREEN_H
+
+#define        MT_CALLING_NAME_BG_WIDTH MAIN_SCREEN_W
+#define        MT_CALLING_NAME_BG_HEIGHT 590
+
+#define        ACCEPT_BTN_L_PAD 40
+#define        ACCEPT_BTN_WIDTH 300
+#define        ACCEPT_BTN_T_PAD 992
+#define        ACCEPT_BTN_HEIGHT 112
+
+#define REJECT_BTN_L_GAP 40
+
+#define        REJECT_BTN_L_PAD (ACCEPT_BTN_L_PAD+ACCEPT_BTN_WIDTH+REJECT_BTN_L_GAP)
+#define        REJECT_BTN_WIDTH ACCEPT_BTN_WIDTH
+#define        REJECT_BTN_T_PAD ACCEPT_BTN_T_PAD
+#define        REJECT_BTN_HEIGHT ACCEPT_BTN_HEIGHT
+
+#define REJECT_W_MSG_BTN_T_GAP 40
+
+#define        REJECT_W_MSG_BTN_L_PAD ACCEPT_BTN_L_PAD
+#define        REJECT_W_MSG_BTN_WIDTH 640
+#define        REJECT_W_MSG_BTN_T_PAD (ACCEPT_BTN_T_PAD+ACCEPT_BTN_HEIGHT+REJECT_W_MSG_BTN_T_GAP)
+#define        REJECT_W_MSG_BTN_HEIGHT 90
+
+#define        INCALL_HOLD_BTN_L_PAD 40
+#define        INCALL_HOLD_BTN_WIDTH 108 /*approx*/
+#define        INCALL_HOLD_BTN_T_PAD 670 /*approx*/
+#define        INCALL_HOLD_BTN_HEIGHT 86 /*approx*/
+
+#define        INCALL_TIMER_L_PAD 40
+#define        INCALL_TIMER_WIDTH 640
+#define        INCALL_TIMER_T_PAD 687
+#define        INCALL_TIMER_HEIGHT 52
+
+#define INCALL_SHARE_BG_T_PAD 584 /*approx*/
+#define INCALL_SHARE_BG_HEIGHT 654 /*approx*/
+
+#define KEYPAD_TIMER_L_PAD 40
+#define KEYPAD_TIMER_WIDTH 640
+#define KEYPAD_TIMER_T_PAD 384
+#define KEYPAD_TIMER_HEIGHT 52
+
+#define KEYPAD_ENTRY_TXT_L_PAD KEYPAD_TIMER_L_PAD
+#define KEYPAD_ENTRY_TXT_WIDTH KEYPAD_TIMER_WIDTH
+#define KEYPAD_ENTRY_TXT_T_PAD 90
+#define KEYPAD_ENTRY_TXT_HEIGHT 114
+
+#define        KEYPAD_BTNS_T_PAD 461
+#define        KEYPAD_BTNS_WIDTH MAIN_SCREEN_W
+#define        KEYPAD_BTNS_HEIGHT 620
+
+#define KEYPAD_HIDE_BTN_L_PAD KEYPAD_TIMER_L_PAD
+#define KEYPAD_HIDE_BTN_WIDTH 300
+#define KEYPAD_HIDE_BTN_T_PAD 1140
+#define KEYPAD_HIDE_BTN_HEIGHT 112
+
+#define KEYPAD_BTN_GAP 40
+#define KEYPAD_END_BTN_L_PAD (KEYPAD_HIDE_BTN_L_PAD+KEYPAD_HIDE_BTN_WIDTH+KEYPAD_BTN_GAP)
+#define KEYPAD_END_BTN_WIDTH KEYPAD_HIDE_BTN_WIDTH
+
+#define        SPLIT_CID1_L_PAD 56
+#define SPLIT_CID1_WIDTH 304
+#define SPLIT_CID1_T_PAD 219
+#define SPLIT_CID1_HEIGHT 304
+
+#define        SPLIT_PAUSE_L_PAD (SPLIT_CID1_L_PAD+8)
+#define SPLIT_PAUSE_WIDTH 62
+#define SPLIT_PAUSE_HEIGHT 62
+#define SPLIT_PAUSE_T_PAD (SPLIT_CID1_T_PAD+SPLIT_CID1_HEIGHT-8-SPLIT_PAUSE_HEIGHT)
+
+#define        SPLIT_CID2_L_PAD 456
+#define SPLIT_CID2_WIDTH 208
+#define SPLIT_CID2_T_PAD 267
+#define SPLIT_CID2_HEIGHT 208
+
+#define        SPLIT_PLAY_L_PAD (SPLIT_CID2_L_PAD+12)
+#define SPLIT_PLAY_WIDTH 40
+#define SPLIT_PLAY_HEIGHT 40
+#define SPLIT_PLAY_T_PAD (SPLIT_CID2_T_PAD+SPLIT_CID2_HEIGHT-8-SPLIT_PLAY_HEIGHT)
+
+#define        SPLIT_NAME1_L_PAD 38
+#define SPLIT_NAME1_WIDTH 364
+#define SPLIT_NAME1_T_PAD 145
+#define SPLIT_NAME1_HEIGHT 58
+
+#define        SPLIT_NAME2_L_PAD (SPLIT_NAME1_L_PAD+SPLIT_NAME1_WIDTH+22)
+#define SPLIT_NAME2_WIDTH 258
+#define SPLIT_NAME2_T_PAD 217
+#define SPLIT_NAME2_HEIGHT 40
+
+#define SPLIT_TIMER_TXT_T_PAD 549
+#define SPLIT_TIMER_TXT_HEIGHT 46
+
+#define SPLIT_MORE_BTN_WIDTH 40
+#define SPLIT_MORE_BTN_L_PAD (SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define SPLIT_ONHOLD_TXT_W_ICON_WIDTH (SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define SPLIT_ONHOLD_TXT_T_PAD 492
+#define SPLIT_ONHOLD_TXT_HEIGHT 40
+
+#define        SPLIT_SWAP_CID1_L_PAD 70
+#define SPLIT_SWAP_CID1_WIDTH 208
+
+#define        SPLIT_SWAP_PLAY_L_PAD (SPLIT_SWAP_CID1_L_PAD+12)
+#define SPLIT_SWAP_PLAY_WIDTH 40
+
+#define        SPLIT_SWAP_CID2_L_PAD 336
+#define SPLIT_SWAP_CID2_WIDTH 304
+
+#define        SPLIT_SWAP_PAUSE_L_PAD (SPLIT_SWAP_CID2_L_PAD+8)
+#define SPLIT_SWAP_PAUSE_WIDTH 62
+
+#define        SPLIT_SWAP_NAME1_L_PAD 38
+#define SPLIT_SWAP_NAME1_WIDTH 258
+
+#define        SPLIT_SWAP_NAME2_L_PAD (SPLIT_SWAP_NAME1_L_PAD+SPLIT_SWAP_NAME1_WIDTH+22)
+#define SPLIT_SWAP_NAME2_WIDTH 364
+
+#define SPLIT_SWAP_MORE_BTN_WIDTH 60
+#define SPLIT_SWAP_MORE_BTN_L_PAD (SPLIT_SWAP_CID2_L_PAD+SPLIT_SWAP_CID2_WIDTH-SPLIT_SWAP_MORE_BTN_WIDTH)
+#define SPLIT_SWAP_MORE_BTN_T_PAD (SPLIT_TIMER_TXT_T_PAD-7)
+#define SPLIT_SWAP_MORE_BTN_HEIGHT 60
+#define SPLIT_TIMER_TXT_W_ICON_WIDTH (SPLIT_SWAP_CID2_WIDTH-SPLIT_SWAP_MORE_BTN_WIDTH)
+
+#define        CONF_LIST_T_PAD 182
+#define        CONF_LIST_HEIGHT 566
+
+#define        CONF_HOLD_WIDTH 110
+#define        CONF_HOLD_L_PAD (MAIN_SCREEN_W-40-CONF_HOLD_WIDTH)
+#define        CONF_HOLD_T_PAD 866
+#define        CONF_HOLD_HEIGHT 76
+
+#define        CONF_TIMER_T_PAD 878
+#define        CONF_TIMER_HEIGHT 52
+
+#define        CONF_CALL_BIG_END_T_PAD 1026
+
+#define        REJ_MSG_NEW_BTN_L_PAD 40 /*approx*/
+#define        REJ_MSG_NEW_BTN_WIDTH 640 /*approx*/
+#define        REJ_MSG_NEW_BTN_T_PAD 120 /*approx*/
+#define        REJ_MSG_NEW_BTN_HEIGHT 128 /*approx*/
+
+#define REJ_MSG_LIST_T_PAD 32 /*approx*/
+#define        REJ_MSG_LIST_HEIGHT 1096 /*approx*/
+
+#define SIX_BTN_COL1_L_PAD 40
+#define SIX_BTN_COL1_WIDTH 200
+#define SIX_BTN_COL2_L_PAD (SIX_BTN_COL1_L_PAD+SIX_BTN_COL1_WIDTH+20)
+#define SIX_BTN_COL3_L_PAD (SIX_BTN_COL2_L_PAD+SIX_BTN_COL1_WIDTH+20)
+#define SIX_BTN_ROW1_T_PAD 792
+#define SIX_BTN_ROW1_HEIGHT 140
+#define SIX_BTN_ROW2_T_PAD (SIX_BTN_ROW1_T_PAD+SIX_BTN_ROW1_HEIGHT+20)
+
+#define        CALL_BIG_END_L_PAD 40
+#define        CALL_BIG_END_WIDTH 640
+#define        CALL_BIG_END_T_PAD 1140
+#define        CALL_BIG_END_HEIGHT 112
+
+#define INCMG_CALL_BTN1_T_PAD 700
+#define INCMG_CALL_BTN_HEIGHT CALL_BIG_END_HEIGHT
+#define INCMG_CALL_BTN2_T_PAD 838
+#define INCMG_CALL_BTN3_T_PAD 976
+
+#define        VIDEO_BTN_POS1_L_PAD 40
+#define        VIDEO_BTN_POS1_WIDTH 300
+#define        VIDEO_BTN_POS1_T_PAD 864
+#define        VIDEO_BTN_POS1_HEIGHT 112
+#define        VIDEO_BTN_POS2_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        VIDEO_BTN_POS2_WIDTH VIDEO_BTN_POS1_WIDTH
+#define        VIDEO_BTN_POS2_T_PAD 1002
+#define        VIDEO_BTN_POS2_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define        VOICE_BTN_POS1_L_PAD (VIDEO_BTN_POS1_L_PAD+VIDEO_BTN_POS1_WIDTH+40)
+#define        VOICE_BTN_POS1_WIDTH VIDEO_BTN_POS1_WIDTH
+
+#define        MSG_BTN_POS1_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        MSG_BTN_POS1_WIDTH 640
+#define        MSG_BTN_POS1_T_PAD 1002
+#define        MSG_BTN_POS1_HEIGHT VIDEO_BTN_POS1_HEIGHT
+#define        MSG_BTN_POS2_T_PAD 1140
+#define        MSG_BTN_POS2_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define        CONTACT_BTN_POS1_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        CONTACT_BTN_POS1_WIDTH MSG_BTN_POS1_WIDTH
+#define        CONTACT_BTN_POS1_T_PAD 1140
+#define        CONTACT_BTN_POS1_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define QP_CID_L_PAD 15        /*approx*/
+#define QP_CID_WIDTH 123 /*approx*/
+#define QP_CID_T_PAD 18 /*approx*/
+#define QP_CID_HEIGHT 130 /*approx*/
+
+#define QP_END_BTN_L_PAD 153 /*approx*/
+#define QP_END_BTN_WIDTH 552 /*approx*/
+#define QP_END_BTN_T_PAD 80 /*approx*/
+#define QP_END_BTN_HEIGHT 64 /*approx*/
+
+#define QP_NAME_L_PAD 153 /*approx*/
+#define QP_NAME_WIDTH 372 /*approx*/
+#define QP_NAME_T_PAD 13 /*approx*/
+#define QP_NAME_HEIGHT 48 /*approx*/
+
+#define QP_TIMER_L_PAD 555 /*approx*/
+/*
+ * End of HD GUI Widget Dimensions
+ */
+
+
+/*
+ * Relative positions
+ * In Portrait mode
+ */
+/* Relative X & Y positions of widgets w.r.t. Full Screen */
+#define REL_W(x) ((x)/MAIN_SCREEN_W)
+#define REL_H(y) ((y)/MAIN_SCREEN_H)
+
+/* Relative X & Y positions of widgets w.r.t. Navi-frame layout */
+/*#define WL_NB_H 94*/
+#define REL_NAVIFRAME_W(x) ((x)/MAIN_NAVIFRAME_W)
+#define REL_NAVIFRAME_H(y) ((y)/MAIN_NAVIFRAME_H)
+
+/* Relative X & Y positions of widgets w.r.t. ACC/REJ ICON layout */
+#define REL_LOCK_W(x) ((x)/483) /*approx*/
+#define REL_LOCK_H(y) ((y)/198) /*approx*/
+/* Relative X & Y positions of widgets w.r.t. REJ-W-MSG ICON layout */
+#define REL_LOCK_MSG_W(x) ((x)/348)    /*approx*/
+#define REL_LOCK_MSG_H(y) ((y)/200) /*approx*/
+
+/* Relative X & Y positions of widgets w.r.t. Keypad Buttons layout */
+#define REL_KEYPAD_W(x) ((x)/KEYPAD_BTNS_WIDTH)
+#define REL_KEYPAD_H(y) ((y)/KEYPAD_BTNS_HEIGHT)
+/*
+ * End of Relative positions
+ */
+
+
+/*
+ * MO/Dialing view & MT/Incoming view
+ * In Portrait mode
+ */
+#define DIALLING_STATUS_L REL_W(DIALING_STATUS_L_PAD)
+#define DIALLING_STATUS_R REL_W(DIALING_STATUS_L_PAD+DIALING_STATUS_WIDTH)
+#define DIALLING_STATUS_T REL_H(DIALING_STATUS_T_PAD)
+#define DIALLING_STATUS_B REL_H(DIALING_STATUS_T_PAD+DIALING_STATUS_HEIGHT)
+
+/*
+#define DIALLING_MT_STATUS_L REL_W(123)
+#define DIALLING_MT_STATUS_R REL_W(357)
+#define DIALLING_MT_STATUS_T REL_H(375)
+#define DIALLING_MT_STATUS_B REL_H(407)
+*/
+
+#define DIALLING_NAME_L REL_W(CALL_NAME_L_PAD)
+#define DIALLING_NAME_R REL_W(CALL_NAME_L_PAD+CALL_NAME_WIDTH)
+#define DIALLING_NAME_T REL_H(CALL_NAME_T_PAD)
+#define DIALLING_NAME_B REL_H(CALL_NAME_T_PAD+CALL_NAME_HEIGHT)
+
+#define DIALLING_NUMBER_L REL_W(CALL_NUMBER_L_PAD)
+#define DIALLING_NUMBER_R REL_W(CALL_NUMBER_L_PAD+CALL_NUMBER_WIDTH)
+#define DIALLING_NUMBER_T REL_H(CALL_NUMBER_T_PAD)
+#define DIALLING_NUMBER_B REL_H(CALL_NUMBER_T_PAD+CALL_NUMBER_HEIGHT)
+
+#define DIALLING_CID_L REL_W(CALLER_ID_L_PAD)
+#define DIALLING_CID_R REL_W(CALLER_ID_L_PAD+CALLER_ID_WIDTH)
+#define DIALLING_CID_T REL_H(CALLER_ID_T_PAD)
+#define DIALLING_CID_B REL_H(CALLER_ID_T_PAD+CALLER_ID_HEIGHT)
+
+#define DIALLING_BACKGROUND_CID_L REL_W(BACKGROUND_CID_L_PAD)
+#define DIALLING_BACKGROUND_CID_R REL_W(BACKGROUND_CID_L_PAD+BACKGROUND_CID_WIDTH)
+#define DIALLING_BACKGROUND_CID_T REL_H(BACKGROUND_CID_T_PAD)
+#define DIALLING_BACKGROUND_CID_B REL_H(BACKGROUND_CID_T_PAD+BACKGROUND_CID_HEIGHT)
+
+#define MT_CALLING_BG_L REL_W(0)
+#define MT_CALLING_BG_R REL_W(0+MT_CALLING_NAME_BG_WIDTH)
+#define MT_CALLING_BG_T REL_H(0)
+#define MT_CALLING_BG_B REL_H(0+MT_CALLING_NAME_BG_HEIGHT)
+
+/* accept - MT view */
+#define DIALLING_MT_BTN1_L REL_W(ACCEPT_BTN_L_PAD)
+#define DIALLING_MT_BTN1_R REL_W(ACCEPT_BTN_L_PAD+ACCEPT_BTN_WIDTH)
+#define DIALLING_MT_BTN1_T REL_H(ACCEPT_BTN_T_PAD)
+#define DIALLING_MT_BTN1_B REL_H(ACCEPT_BTN_T_PAD+ACCEPT_BTN_HEIGHT)
+
+/* reject - MT view */
+#define DIALLING_MT_BTN2_L  REL_W(REJECT_BTN_L_PAD)
+#define DIALLING_MT_BTN2_R  REL_W(REJECT_BTN_L_PAD+REJECT_BTN_WIDTH)
+#define DIALLING_MT_BTN2_T  REL_H(REJECT_BTN_T_PAD)
+#define DIALLING_MT_BTN2_B  REL_H(REJECT_BTN_T_PAD+REJECT_BTN_HEIGHT)
+/*
+ * End of MO/Dialing view & MT/Incoming view
+ */
+
+
+/*
+ * MT LOCK View - check
+ * In Portrait mode
+ */
+#define INCOMING_LOCK_ACCEPT_BG_L REL_W(-273)
+#define INCOMING_LOCK_ACCEPT_BG_R REL_W(210)
+#define INCOMING_LOCK_ACCEPT_BG_T REL_H(945)
+#define INCOMING_LOCK_ACCEPT_BG_B REL_H(1144)
+
+#define INCOMING_LOCK_ACCEPT_ICON_L REL_LOCK_W(303)
+#define INCOMING_LOCK_ACCEPT_ICON_R REL_LOCK_W(408)
+#define INCOMING_LOCK_ACCEPT_ICON_T REL_LOCK_H(37)
+#define INCOMING_LOCK_ACCEPT_ICON_B REL_LOCK_H(149)
+
+#define INCOMING_LOCK_ACCEPT_TEXT_L REL_LOCK_W(45)
+#define INCOMING_LOCK_ACCEPT_TEXT_R REL_LOCK_W(273)
+#define INCOMING_LOCK_ACCEPT_TEXT_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_ACCEPT_TEXT_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_BG_L REL_W(510)
+#define INCOMING_LOCK_REJECT_BG_R REL_W(993)
+#define INCOMING_LOCK_REJECT_BG_T INCOMING_LOCK_ACCEPT_BG_T
+#define INCOMING_LOCK_REJECT_BG_B INCOMING_LOCK_ACCEPT_BG_B
+
+#define INCOMING_LOCK_REJECT_ICON_L REL_LOCK_W(75)
+#define INCOMING_LOCK_REJECT_ICON_R REL_LOCK_W(180)
+#define INCOMING_LOCK_REJECT_ICON_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_REJECT_ICON_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_TEXT_L REL_LOCK_W(195)
+#define INCOMING_LOCK_REJECT_TEXT_R REL_LOCK_W(423)
+#define INCOMING_LOCK_REJECT_TEXT_T INCOMING_LOCK_REJECT_ICON_T
+#define INCOMING_LOCK_REJECT_TEXT_B INCOMING_LOCK_REJECT_ICON_B
+/*
+ * End of MT LOCK View
+ */
+
+
+/*
+ * KEYPAD View
+ * In Portrait mode
+ */
+#define INCALL_DIALER_TIMER_L REL_W(KEYPAD_TIMER_L_PAD)
+#define INCALL_DIALER_TIMER_R REL_W(KEYPAD_TIMER_L_PAD+KEYPAD_TIMER_WIDTH)
+#define INCALL_DIALER_TIMER_T REL_H(KEYPAD_TIMER_T_PAD)
+#define INCALL_DIALER_TIMER_B REL_H(KEYPAD_TIMER_T_PAD+KEYPAD_TIMER_HEIGHT)
+
+#define INCALL_DIALER_NAME_L INCALL_DIALER_TIMER_L
+#define INCALL_DIALER_NAME_R INCALL_DIALER_TIMER_R
+#define INCALL_DIALER_NAME_T INCALL_DIALER_TIMER_T
+#define INCALL_DIALER_NAME_B INCALL_DIALER_TIMER_B
+
+/*
+#define DIALLING_KEYPAD_T_BF REL_H(319)
+#define DIALLING_KEYPAD_B_BF REL_H(710)
+*/
+
+#define DIALLING_KEYPAD_L REL_W(0)
+#define DIALLING_KEYPAD_R REL_W(MAIN_SCREEN_W)
+#define DIALLING_KEYPAD_T REL_H(KEYPAD_BTNS_T_PAD)
+#define DIALLING_KEYPAD_B REL_H(KEYPAD_BTNS_T_PAD+KEYPAD_BTNS_HEIGHT)
+
+#define DIALLING_ENTRY_TEXT_L REL_W(KEYPAD_ENTRY_TXT_L_PAD)
+#define DIALLING_ENTRY_TEXT_R REL_W(KEYPAD_ENTRY_TXT_L_PAD+KEYPAD_ENTRY_TXT_WIDTH)
+#define DIALLING_ENTRY_TEXT_T REL_H(KEYPAD_ENTRY_TXT_T_PAD)
+#define DIALLING_ENTRY_TEXT_B REL_H(KEYPAD_ENTRY_TXT_T_PAD+KEYPAD_ENTRY_TXT_HEIGHT)
+
+#define DIALER_BTN1_L REL_W(KEYPAD_HIDE_BTN_L_PAD)
+#define DIALER_BTN1_R REL_W(KEYPAD_HIDE_BTN_L_PAD+KEYPAD_HIDE_BTN_WIDTH)
+#define DIALER_BTN1_T REL_H(KEYPAD_HIDE_BTN_T_PAD)
+#define DIALER_BTN1_B REL_H(KEYPAD_HIDE_BTN_T_PAD+KEYPAD_HIDE_BTN_HEIGHT)
+
+#define DIALER_BTN2_L REL_W(KEYPAD_END_BTN_L_PAD)
+#define DIALER_BTN2_R REL_W(KEYPAD_END_BTN_L_PAD+KEYPAD_END_BTN_WIDTH)
+#define DIALER_BTN2_T DIALER_BTN1_T
+#define DIALER_BTN2_B DIALER_BTN1_B
+/*
+ * End of KEYPAD View
+ */
+
+
+/*
+ * INCALL View
+ * In Portrait mode
+ */
+#define INCALL_CID_L DIALLING_CID_L
+#define INCALL_CID_R DIALLING_CID_R
+#define INCALL_CID_T DIALLING_CID_T
+#define INCALL_CID_B DIALLING_CID_B
+
+/*
+#define INCALL_CID_DIM_T DIALLING_CID_T
+#define INCALL_CID_DIM_B DIALLING_CID_B
+#define INCALL_CID_DIM_L REL_W(145)
+#define INCALL_CID_DIM_R REL_W(334)
+*/
+
+#define INCALL_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_L
+#define INCALL_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_R
+#define INCALL_BACKGROUND_CID_T DIALLING_BACKGROUND_CID_T
+#define INCALL_BACKGROUND_CID_B DIALLING_BACKGROUND_CID_B
+
+#define INCALL_NAME_L DIALLING_NAME_L
+#define INCALL_NAME_R DIALLING_NAME_R
+#define INCALL_NAME_T DIALLING_NAME_T
+#define INCALL_NAME_B DIALLING_NAME_B
+
+#define INCALL_NUMBER_L DIALLING_NUMBER_L
+#define INCALL_NUMBER_R DIALLING_NUMBER_R
+#define INCALL_NUMBER_T DIALLING_NUMBER_T
+#define INCALL_NUMBER_B DIALLING_NUMBER_B
+
+#define INCALL_HOLD_L REL_W(INCALL_HOLD_BTN_L_PAD)
+#define INCALL_HOLD_R REL_W(INCALL_HOLD_BTN_L_PAD+INCALL_HOLD_BTN_WIDTH)
+#define INCALL_HOLD_T REL_H(INCALL_HOLD_BTN_T_PAD)
+#define INCALL_HOLD_B REL_H(INCALL_HOLD_BTN_T_PAD+INCALL_HOLD_BTN_HEIGHT)
+
+#define INCALL_TIMER_L REL_W(INCALL_TIMER_L_PAD)
+#define INCALL_TIMER_R REL_W(INCALL_TIMER_L_PAD+INCALL_TIMER_WIDTH)
+#define INCALL_TIMER_T REL_H(INCALL_TIMER_T_PAD)
+#define INCALL_TIMER_B REL_H(INCALL_TIMER_T_PAD+INCALL_TIMER_HEIGHT)
+
+#define INCALL_BACKGROUND_SHARE_L      REL_W(0)
+#define INCALL_BACKGROUND_SHARE_R      REL_W(MAIN_SCREEN_W)
+#define INCALL_BACKGROUND_SHARE_T      REL_H(INCALL_SHARE_BG_T_PAD)
+#define INCALL_BACKGROUND_SHARE_B      REL_H(INCALL_SHARE_BG_T_PAD+INCALL_SHARE_BG_HEIGHT)
+/*
+ * End of INCALL View
+ */
+
+
+/*
+ * MULTI-CALL SPLIT View
+ * In Portrait mode
+ */
+/* L[ACT] + R[HLD] */
+#define MULTICALL_SPLIT_BACKGROUND_CID_L INCALL_BACKGROUND_CID_L
+#define MULTICALL_SPLIT_BACKGROUND_CID_R INCALL_BACKGROUND_CID_R
+#define MULTICALL_SPLIT_BACKGROUND_CID_T INCALL_BACKGROUND_CID_T
+#define MULTICALL_SPLIT_BACKGROUND_CID_B INCALL_BACKGROUND_CID_B
+
+#define MULTICALL_SPLIT_CID_1_L REL_W(SPLIT_CID1_L_PAD)
+#define MULTICALL_SPLIT_CID_1_R REL_W(SPLIT_CID1_L_PAD+SPLIT_CID1_WIDTH)
+#define MULTICALL_SPLIT_CID_1_T REL_H(SPLIT_CID1_T_PAD)
+#define MULTICALL_SPLIT_CID_1_B REL_H(SPLIT_CID1_T_PAD+SPLIT_CID1_HEIGHT)
+
+#define MULTICALL_SPLIT_PAUSE_L REL_W(SPLIT_PAUSE_L_PAD)
+#define MULTICALL_SPLIT_PAUSE_R REL_W(SPLIT_PAUSE_L_PAD+SPLIT_PAUSE_WIDTH)
+#define MULTICALL_SPLIT_PAUSE_T REL_H(SPLIT_PAUSE_T_PAD)
+#define MULTICALL_SPLIT_PAUSE_B REL_H(SPLIT_PAUSE_T_PAD+SPLIT_PAUSE_HEIGHT)
+
+#define MULTICALL_SPLIT_CID_2_L REL_W(SPLIT_CID2_L_PAD)
+#define MULTICALL_SPLIT_CID_2_R REL_W(SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH)
+#define MULTICALL_SPLIT_CID_2_T REL_H(SPLIT_CID2_T_PAD)
+#define MULTICALL_SPLIT_CID_2_B REL_H(SPLIT_CID2_T_PAD+SPLIT_CID2_HEIGHT)
+
+#define MULTICALL_SPLIT_PLAY_L REL_W(SPLIT_PLAY_L_PAD)
+#define MULTICALL_SPLIT_PLAY_R REL_W(SPLIT_PLAY_L_PAD+SPLIT_PLAY_WIDTH)
+#define MULTICALL_SPLIT_PLAY_T REL_H(SPLIT_PLAY_T_PAD)
+#define MULTICALL_SPLIT_PLAY_B REL_H(SPLIT_PLAY_T_PAD+SPLIT_PLAY_HEIGHT)
+
+#define MULTICALL_SPLIT_NAME_1_L REL_W(SPLIT_NAME1_L_PAD)
+#define MULTICALL_SPLIT_NAME_1_R REL_W(SPLIT_NAME1_L_PAD+SPLIT_NAME1_WIDTH)
+#define MULTICALL_SPLIT_NAME_1_T REL_H(SPLIT_NAME1_T_PAD)
+#define MULTICALL_SPLIT_NAME_1_B REL_H(SPLIT_NAME1_T_PAD+SPLIT_NAME1_HEIGHT)
+
+#define MULTICALL_SPLIT_NAME_2_L REL_W(SPLIT_NAME2_L_PAD)
+#define MULTICALL_SPLIT_NAME_2_R REL_W(SPLIT_NAME2_L_PAD+SPLIT_NAME2_WIDTH)
+#define MULTICALL_SPLIT_NAME_2_T REL_H(SPLIT_NAME2_T_PAD)
+#define MULTICALL_SPLIT_NAME_2_B REL_H(SPLIT_NAME2_T_PAD+SPLIT_NAME2_HEIGHT)
+
+#define MULTICALL_SPLIT_TIMER_L MULTICALL_SPLIT_CID_1_L
+#define MULTICALL_SPLIT_TIMER_R MULTICALL_SPLIT_CID_1_R
+#define MULTICALL_SPLIT_TIMER_T REL_H(SPLIT_TIMER_TXT_T_PAD)
+#define MULTICALL_SPLIT_TIMER_B REL_H(SPLIT_TIMER_TXT_T_PAD+SPLIT_TIMER_TXT_HEIGHT)
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_L MULTICALL_SPLIT_CID_2_L
+#define MULTICALL_SPLIT_ON_HOLD_TXT_R MULTICALL_SPLIT_CID_2_R
+#define MULTICALL_SPLIT_ON_HOLD_TXT_T REL_H(SPLIT_ONHOLD_TXT_T_PAD)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_B REL_H(SPLIT_ONHOLD_TXT_T_PAD+SPLIT_ONHOLD_TXT_HEIGHT)
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_L MULTICALL_SPLIT_CID_2_L
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_R REL_W(SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+
+#define MULTICALL_SPLIT_MORE_ICON_L REL_W(SPLIT_MORE_BTN_L_PAD)
+#define MULTICALL_SPLIT_MORE_ICON_R REL_W(SPLIT_MORE_BTN_L_PAD+SPLIT_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_MORE_ICON_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_MORE_ICON_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+/* L[ACT] + R[HLD] */
+
+/* L[HLD] + R[ACT] */
+#define MULTICALL_SPLIT_SWAP_CID_1_L REL_W(SPLIT_SWAP_CID1_L_PAD)
+#define MULTICALL_SPLIT_SWAP_CID_1_R REL_W(SPLIT_SWAP_CID1_L_PAD+SPLIT_SWAP_CID1_WIDTH)
+#define MULTICALL_SPLIT_SWAP_CID_1_T MULTICALL_SPLIT_CID_2_T
+#define MULTICALL_SPLIT_SWAP_CID_1_B MULTICALL_SPLIT_CID_2_B
+
+#define MULTICALL_SPLIT_SWAP_PLAY_L REL_W(SPLIT_SWAP_PLAY_L_PAD)
+#define MULTICALL_SPLIT_SWAP_PLAY_R REL_W(SPLIT_SWAP_PLAY_L_PAD+SPLIT_SWAP_PLAY_WIDTH)
+#define MULTICALL_SPLIT_SWAP_PLAY_T MULTICALL_SPLIT_PLAY_T
+#define MULTICALL_SPLIT_SWAP_PLAY_B MULTICALL_SPLIT_PLAY_B
+
+#define MULTICALL_SPLIT_SWAP_CID_2_L REL_W(SPLIT_SWAP_CID2_L_PAD)
+#define MULTICALL_SPLIT_SWAP_CID_2_R REL_W(SPLIT_SWAP_CID2_L_PAD+SPLIT_SWAP_CID2_WIDTH)
+#define MULTICALL_SPLIT_SWAP_CID_2_T MULTICALL_SPLIT_CID_1_T
+#define MULTICALL_SPLIT_SWAP_CID_2_B MULTICALL_SPLIT_CID_1_B
+
+#define MULTICALL_SPLIT_SWAP_PAUSE_L REL_W(SPLIT_SWAP_PAUSE_L_PAD)
+#define MULTICALL_SPLIT_SWAP_PAUSE_R REL_W(SPLIT_SWAP_PAUSE_L_PAD+SPLIT_SWAP_PAUSE_WIDTH)
+#define MULTICALL_SPLIT_SWAP_PAUSE_T MULTICALL_SPLIT_PAUSE_T
+#define MULTICALL_SPLIT_SWAP_PAUSE_B MULTICALL_SPLIT_PAUSE_B
+
+#define MULTICALL_SPLIT_SWAP_NAME_1_L MULTICALL_SPLIT_NAME_1_L
+#define MULTICALL_SPLIT_SWAP_NAME_1_R REL_W(SPLIT_SWAP_NAME1_L_PAD+SPLIT_SWAP_NAME1_WIDTH)
+#define MULTICALL_SPLIT_SWAP_NAME_1_T MULTICALL_SPLIT_NAME_2_T
+#define MULTICALL_SPLIT_SWAP_NAME_1_B MULTICALL_SPLIT_NAME_2_B
+
+#define MULTICALL_SPLIT_SWAP_NAME_2_L REL_W(SPLIT_SWAP_NAME2_L_PAD)
+#define MULTICALL_SPLIT_SWAP_NAME_2_R REL_W(SPLIT_SWAP_NAME2_L_PAD+SPLIT_SWAP_NAME2_WIDTH)
+#define MULTICALL_SPLIT_SWAP_NAME_2_T MULTICALL_SPLIT_NAME_1_T
+#define MULTICALL_SPLIT_SWAP_NAME_2_B MULTICALL_SPLIT_NAME_1_B
+
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_L MULTICALL_SPLIT_SWAP_CID_1_L
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_R MULTICALL_SPLIT_SWAP_CID_1_R
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+
+#define MULTICALL_SPLIT_SWAP_TIMER_L MULTICALL_SPLIT_SWAP_CID_2_L
+#define MULTICALL_SPLIT_SWAP_TIMER_R MULTICALL_SPLIT_SWAP_CID_2_R
+#define MULTICALL_SPLIT_SWAP_TIMER_T MULTICALL_SPLIT_TIMER_T
+#define MULTICALL_SPLIT_SWAP_TIMER_B MULTICALL_SPLIT_TIMER_B
+
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_L MULTICALL_SPLIT_SWAP_CID_2_L
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_R REL_W(SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_T MULTICALL_SPLIT_TIMER_T
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_B MULTICALL_SPLIT_TIMER_B
+
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_L REL_W(SPLIT_SWAP_MORE_BTN_L_PAD)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_R REL_W(SPLIT_SWAP_MORE_BTN_L_PAD+SPLIT_SWAP_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_T REL_H(SPLIT_SWAP_MORE_BTN_T_PAD)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_B REL_H(SPLIT_SWAP_MORE_BTN_T_PAD+SPLIT_SWAP_MORE_BTN_HEIGHT)
+/* L[HLD] + R[ACT] */
+/*
+ * End of MULTI-CALL SPLIT View
+ */
+
+/*
+ * MULTI-CALL LIST View
+ * In Portrait mode
+ */
+#define MULTICALL_LIST_L REL_W(0)
+#define MULTICALL_LIST_R REL_W(MAIN_SCREEN_W)
+#define MULTICALL_LIST_T REL_H(CONF_LIST_T_PAD)
+#define MULTICALL_LIST_B REL_H(CONF_LIST_T_PAD+CONF_LIST_HEIGHT)
+
+#define MULTICALL_LIST_HOLD_L REL_W(CONF_HOLD_L_PAD)
+#define MULTICALL_LIST_HOLD_R REL_W(CONF_HOLD_L_PAD+CONF_HOLD_WIDTH)
+#define MULTICALL_LIST_HOLD_T REL_H(CONF_HOLD_T_PAD)
+#define MULTICALL_LIST_HOLD_B REL_H(CONF_HOLD_T_PAD+CONF_HOLD_HEIGHT)
+
+#define MULTICALL_LIST_TIMER_L REL_W(0)
+#define MULTICALL_LIST_TIMER_R REL_W(MAIN_SCREEN_W)
+#define MULTICALL_LIST_TIMER_T REL_H(CONF_TIMER_T_PAD)
+#define MULTICALL_LIST_TIMER_B REL_H(CONF_TIMER_T_PAD+CONF_TIMER_HEIGHT)
+
+#define MULTICALL_LIST_BIG_END_L REL_W(CALL_BIG_END_L_PAD)
+#define MULTICALL_LIST_BIG_END_R REL_W(CALL_BIG_END_L_PAD+CALL_BIG_END_WIDTH)
+#define MULTICALL_LIST_BIG_END_T REL_H(CONF_CALL_BIG_END_T_PAD)
+#define MULTICALL_LIST_BIG_END_B REL_H(CONF_CALL_BIG_END_T_PAD+CALL_BIG_END_HEIGHT)
+/*
+ * End of MULTI-CALL LIST View
+ */
+
+
+/*
+ * SIX Button Layout
+ * In Portrait mode
+ */
+#define SIX_BTN_1_L REL_W(SIX_BTN_COL1_L_PAD)
+#define SIX_BTN_1_R REL_W(SIX_BTN_COL1_L_PAD+SIX_BTN_COL1_WIDTH)
+#define SIX_BTN_2_L REL_W(SIX_BTN_COL2_L_PAD)
+#define SIX_BTN_2_R REL_W(SIX_BTN_COL2_L_PAD+SIX_BTN_COL1_WIDTH)
+#define SIX_BTN_3_L REL_W(SIX_BTN_COL3_L_PAD)
+#define SIX_BTN_3_R REL_W(SIX_BTN_COL3_L_PAD+SIX_BTN_COL1_WIDTH)
+
+#define SIX_BTN_1_T REL_H(SIX_BTN_ROW1_T_PAD)
+#define SIX_BTN_1_B REL_H(SIX_BTN_ROW1_T_PAD+SIX_BTN_ROW1_HEIGHT)
+#define SIX_BTN_2_T REL_H(SIX_BTN_ROW2_T_PAD)
+#define SIX_BTN_2_B REL_H(SIX_BTN_ROW2_T_PAD+SIX_BTN_ROW1_HEIGHT)
+
+#define SIX_BTN_BIG_END_L REL_W(CALL_BIG_END_L_PAD)
+#define SIX_BTN_BIG_END_R REL_W(CALL_BIG_END_L_PAD+CALL_BIG_END_WIDTH)
+#define SIX_BTN_BIG_END_T REL_H(CALL_BIG_END_T_PAD)
+#define SIX_BTN_BIG_END_B REL_H(CALL_BIG_END_T_PAD+CALL_BIG_END_HEIGHT)
+
+#define SIX_BTN_INCOMING_1_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_1_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_1_T REL_H(INCMG_CALL_BTN1_T_PAD)
+#define SIX_BTN_INCOMING_1_B REL_H(INCMG_CALL_BTN1_T_PAD+INCMG_CALL_BTN_HEIGHT)
+
+#define SIX_BTN_INCOMING_2_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_2_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_2_T REL_H(INCMG_CALL_BTN2_T_PAD)
+#define SIX_BTN_INCOMING_2_B REL_H(INCMG_CALL_BTN2_T_PAD+INCMG_CALL_BTN_HEIGHT)
+
+#define SIX_BTN_INCOMING_3_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_3_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_3_T REL_H(INCMG_CALL_BTN3_T_PAD)
+#define SIX_BTN_INCOMING_3_B REL_H(INCMG_CALL_BTN3_T_PAD+INCMG_CALL_BTN_HEIGHT)
+/*
+ * End of SIX Button Layout
+ */
+
+
+/*
+ * Navigation bar layout
+ */
+#define CALL_NAVIGATION_BAR_T REL_H(NAVIFRAME_T_PAD)
+#define CALL_NAVIGATION_BAR_B REL_H(MAIN_SCREEN_H)
+#define CALL_NAVIGATION_BAR_L REL_W(0)
+#define CALL_NAVIGATION_BAR_R REL_W(MAIN_SCREEN_W)
+/*
+ * End of Navigation bar layout
+ */
+
+
+/*
+ * END CALL View
+ * In Portrait mode
+ */
+#define        ENDSINGLECALL_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_L
+#define        ENDSINGLECALL_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_R
+#define        ENDSINGLECALL_BACKGROUND_CID_T DIALLING_BACKGROUND_CID_T
+#define        ENDSINGLECALL_BACKGROUND_CID_B DIALLING_BACKGROUND_CID_B
+
+#define ENDSINGLECALL_CID_L DIALLING_CID_L
+#define ENDSINGLECALL_CID_R DIALLING_CID_R
+#define ENDSINGLECALL_CID_T DIALLING_CID_T
+#define ENDSINGLECALL_CID_B DIALLING_CID_B
+
+#define ENDSINGLECALL_NAME_L DIALLING_NAME_L
+#define ENDSINGLECALL_NAME_R DIALLING_NAME_R
+#define ENDSINGLECALL_NAME_T DIALLING_NAME_T
+#define ENDSINGLECALL_NAME_B DIALLING_NAME_B
+
+#define ENDSINGLECALL_NUMBER_L DIALLING_NUMBER_L
+#define ENDSINGLECALL_NUMBER_R DIALLING_NUMBER_R
+#define ENDSINGLECALL_NUMBER_T DIALLING_NUMBER_T
+#define ENDSINGLECALL_NUMBER_B DIALLING_NUMBER_B
+
+#define ENDSINGLECALL_TIMER_L INCALL_TIMER_L
+#define ENDSINGLECALL_TIMER_R INCALL_TIMER_R
+#define ENDSINGLECALL_TIMER_T INCALL_TIMER_T
+#define ENDSINGLECALL_TIMER_B INCALL_TIMER_B
+
+#define        ENDSINGLECALL_VIDEO_BTN_L REL_W(VIDEO_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_VIDEO_BTN_R REL_W(VIDEO_BTN_POS1_L_PAD+VIDEO_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_VIDEO_BTN_T REL_H(VIDEO_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_VIDEO_BTN_B REL_H(VIDEO_BTN_POS1_T_PAD+VIDEO_BTN_POS1_HEIGHT)
+
+#define        ENDSINGLECALL_VIDEO2_BTN_L REL_W(VIDEO_BTN_POS2_L_PAD)
+#define        ENDSINGLECALL_VIDEO2_BTN_R REL_W(VIDEO_BTN_POS2_L_PAD+VIDEO_BTN_POS2_WIDTH)
+#define        ENDSINGLECALL_VIDEO2_BTN_T REL_H(VIDEO_BTN_POS2_T_PAD)
+#define        ENDSINGLECALL_VIDEO2_BTN_B REL_H(VIDEO_BTN_POS2_T_PAD+VIDEO_BTN_POS2_HEIGHT)
+
+#define        ENDSINGLECALL_VOICE_BTN_L REL_W(VOICE_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_VOICE_BTN_R REL_W(VOICE_BTN_POS1_L_PAD+VOICE_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_VOICE_BTN_T ENDSINGLECALL_VIDEO_BTN_T
+#define        ENDSINGLECALL_VOICE_BTN_B ENDSINGLECALL_VIDEO_BTN_B
+
+#define        ENDSINGLECALL_VOICE2_BTN_L ENDSINGLECALL_VOICE_BTN_L
+#define        ENDSINGLECALL_VOICE2_BTN_R ENDSINGLECALL_VOICE_BTN_R
+#define        ENDSINGLECALL_VOICE2_BTN_T ENDSINGLECALL_VIDEO2_BTN_T
+#define        ENDSINGLECALL_VOICE2_BTN_B ENDSINGLECALL_VIDEO2_BTN_B
+
+#define        ENDSINGLECALL_MSG_BTN_L REL_W(MSG_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_MSG_BTN_R REL_W(MSG_BTN_POS1_L_PAD+MSG_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_MSG_BTN_T REL_H(MSG_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_MSG_BTN_B REL_H(MSG_BTN_POS1_T_PAD+MSG_BTN_POS1_HEIGHT)
+
+#define        ENDSINGLECALL_MSG2_BTN_L ENDSINGLECALL_MSG_BTN_L
+#define        ENDSINGLECALL_MSG2_BTN_R ENDSINGLECALL_MSG_BTN_R
+#define        ENDSINGLECALL_MSG2_BTN_T REL_H(MSG_BTN_POS2_T_PAD)
+#define        ENDSINGLECALL_MSG2_BTN_B REL_H(MSG_BTN_POS2_T_PAD+MSG_BTN_POS2_HEIGHT)
+
+#define        ENDSINGLECALL_CONTACT_BTN_L REL_W(CONTACT_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_CONTACT_BTN_R REL_W(CONTACT_BTN_POS1_L_PAD+CONTACT_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_CONTACT_BTN_T REL_H(CONTACT_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_CONTACT_BTN_B REL_H(CONTACT_BTN_POS1_T_PAD+CONTACT_BTN_POS1_HEIGHT)
+/*
+ * End of END CALL View
+ */
+#endif                         /*__VCUI_VIEW_LAYOUT_HD__*/
diff --git a/ui/vcui-view-layout-wvga.h b/ui/vcui-view-layout-wvga.h
new file mode 100755 (executable)
index 0000000..558a903
--- /dev/null
@@ -0,0 +1,745 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VCUI_VIEW_LAYOUT_WVGA__
+#define __VCUI_VIEW_LAYOUT_WVGA__
+
+#define COLOR_DEFAULT 0 0 0 255
+#define COLOR_BG_ALPHA 0 0 0 0
+#define COLOR_BG_FOR_HELD_CALL_DIM 0 0 0 150
+
+/*#define BTN_EDGE_W 9*/
+
+/*
+ * WVGA GUI Widget Dimensions
+ * In Portrait mode
+ */
+#define MAIN_SCREEN_W 480
+#define MAIN_SCREEN_H 800
+
+#define INDICATOR_HEIGHT 40
+#define NAVIFRAME_TITLE_HEIGHT 75
+
+#define MAIN_NAVIFRAME_W MAIN_SCREEN_W
+#define MAIN_NAVIFRAME_H (MAIN_SCREEN_H-INDICATOR_HEIGHT-NAVIFRAME_TITLE_HEIGHT)
+#define NAVIFRAME_T_PAD 40
+
+#define QP_WIN_W MAIN_SCREEN_W
+#define QP_WIN_H 104
+
+#define DIALING_STATUS_L_PAD 0
+#define DIALING_STATUS_WIDTH MAIN_SCREEN_W
+#define DIALING_STATUS_T_PAD 428
+#define        DIALING_STATUS_HEIGHT 32
+
+#define CALL_NAME_L_PAD 12
+#define CALL_NAME_WIDTH 456
+#define CALL_NAME_T_PAD 52
+#define        CALL_NAME_HEIGHT 50
+
+#define CALL_NUMBER_T_GAP 4
+
+#define CALL_NUMBER_L_PAD CALL_NAME_L_PAD
+#define CALL_NUMBER_WIDTH CALL_NAME_WIDTH
+#define CALL_NUMBER_T_PAD (CALL_NAME_T_PAD+CALL_NAME_HEIGHT+CALL_NUMBER_T_GAP)
+#define        CALL_NUMBER_HEIGHT 32
+
+#define CALLER_ID_L_PAD 145
+#define CALLER_ID_WIDTH 190
+#define CALLER_ID_T_PAD 176
+#define        CALLER_ID_HEIGHT 190
+
+#define BACKGROUND_CID_L_PAD 0
+#define BACKGROUND_CID_WIDTH MAIN_SCREEN_W
+#define BACKGROUND_CID_T_PAD 0
+#define BACKGROUND_CID_HEIGHT MAIN_SCREEN_H
+
+#define        ACCEPT_BTN_L_PAD 26
+#define        ACCEPT_BTN_WIDTH 202
+#define        ACCEPT_BTN_T_PAD 620
+#define        ACCEPT_BTN_HEIGHT 70
+
+#define REJECT_BTN_L_GAP 24
+
+#define        REJECT_BTN_L_PAD (ACCEPT_BTN_L_PAD+ACCEPT_BTN_WIDTH+REJECT_BTN_L_GAP)
+#define        REJECT_BTN_WIDTH ACCEPT_BTN_WIDTH
+#define        REJECT_BTN_T_PAD ACCEPT_BTN_T_PAD
+#define        REJECT_BTN_HEIGHT ACCEPT_BTN_HEIGHT
+
+#define REJECT_W_MSG_BTN_T_GAP 25
+
+#define        REJECT_W_MSG_BTN_L_PAD ACCEPT_BTN_L_PAD
+#define        REJECT_W_MSG_BTN_WIDTH 428
+#define        REJECT_W_MSG_BTN_T_PAD (ACCEPT_BTN_T_PAD+ACCEPT_BTN_HEIGHT+REJECT_W_MSG_BTN_T_GAP)
+#define        REJECT_W_MSG_BTN_HEIGHT 56
+
+#define        INCALL_HOLD_BTN_L_PAD 26
+#define        INCALL_HOLD_BTN_WIDTH 73
+#define        INCALL_HOLD_BTN_T_PAD 417
+#define        INCALL_HOLD_BTN_HEIGHT 54
+
+#define        INCALL_TIMER_L_PAD 26
+#define        INCALL_TIMER_WIDTH 428
+#define        INCALL_TIMER_T_PAD 428
+#define        INCALL_TIMER_HEIGHT 32
+
+#define INCALL_SHARE_BG_T_PAD 365 /*approx*/
+#define INCALL_SHARE_BG_HEIGHT 774 /*approx*/
+
+#define KEYPAD_TIMER_L_PAD 26
+#define KEYPAD_TIMER_WIDTH 428
+#define KEYPAD_TIMER_T_PAD 240
+#define KEYPAD_TIMER_HEIGHT 32
+
+#define KEYPAD_ENTRY_TXT_L_PAD KEYPAD_TIMER_L_PAD
+#define KEYPAD_ENTRY_TXT_WIDTH KEYPAD_TIMER_WIDTH
+#define KEYPAD_ENTRY_TXT_T_PAD 57
+#define KEYPAD_ENTRY_TXT_HEIGHT 70
+
+#define        KEYPAD_BTNS_T_PAD 289
+#define        KEYPAD_BTNS_WIDTH MAIN_SCREEN_W
+#define        KEYPAD_BTNS_HEIGHT 391
+
+#define KEYPAD_HIDE_BTN_L_PAD KEYPAD_TIMER_L_PAD
+#define KEYPAD_HIDE_BTN_WIDTH 202
+#define KEYPAD_HIDE_BTN_T_PAD 712
+#define KEYPAD_HIDE_BTN_HEIGHT 70
+
+#define KEYPAD_BTN_GAP 13
+#define KEYPAD_END_BTN_L_PAD (KEYPAD_HIDE_BTN_L_PAD+KEYPAD_HIDE_BTN_WIDTH+KEYPAD_BTN_GAP)
+#define KEYPAD_END_BTN_WIDTH KEYPAD_HIDE_BTN_WIDTH
+
+#define        SPLIT_CID1_L_PAD 50
+#define SPLIT_CID1_WIDTH 190
+#define SPLIT_CID1_T_PAD 137
+#define SPLIT_CID1_HEIGHT 190
+
+#define        SPLIT_PAUSE_L_PAD (SPLIT_CID1_L_PAD+4)
+#define SPLIT_PAUSE_WIDTH 40
+#define SPLIT_PAUSE_HEIGHT 40
+#define SPLIT_PAUSE_T_PAD (SPLIT_CID1_T_PAD+SPLIT_CID1_HEIGHT-8-SPLIT_PAUSE_HEIGHT)
+
+#define        SPLIT_CID2_L_PAD 300
+#define SPLIT_CID2_WIDTH 130
+#define SPLIT_CID2_T_PAD 167
+#define SPLIT_CID2_HEIGHT 130
+
+#define        SPLIT_PLAY_L_PAD (SPLIT_CID2_L_PAD+8)
+#define SPLIT_PLAY_WIDTH 25
+#define SPLIT_PLAY_HEIGHT 25
+#define SPLIT_PLAY_T_PAD (SPLIT_CID2_T_PAD+SPLIT_CID2_HEIGHT-8-SPLIT_PLAY_HEIGHT)
+
+#define        SPLIT_NAME1_L_PAD 24
+#define SPLIT_NAME1_WIDTH 242
+#define SPLIT_NAME1_T_PAD 90
+#define SPLIT_NAME1_HEIGHT 36
+
+#define        SPLIT_NAME2_L_PAD (SPLIT_NAME1_L_PAD+SPLIT_NAME1_WIDTH+14)
+#define SPLIT_NAME2_WIDTH 170
+#define SPLIT_NAME2_T_PAD 136
+#define SPLIT_NAME2_HEIGHT 24
+
+#define SPLIT_TIMER_TXT_T_PAD 343
+#define SPLIT_TIMER_TXT_HEIGHT 28
+
+#define SPLIT_MORE_BTN_WIDTH 24
+#define SPLIT_MORE_BTN_L_PAD (SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define SPLIT_ONHOLD_TXT_W_ICON_WIDTH (SPLIT_CID2_WIDTH-SPLIT_MORE_BTN_WIDTH)
+#define SPLIT_ONHOLD_TXT_T_PAD 308
+#define SPLIT_ONHOLD_TXT_HEIGHT 24
+
+#define        SPLIT_SWAP_CID1_L_PAD 47
+#define SPLIT_SWAP_CID1_WIDTH 130
+
+#define        SPLIT_SWAP_PLAY_L_PAD (SPLIT_SWAP_CID1_L_PAD+8)
+#define SPLIT_SWAP_PLAY_WIDTH 25
+
+#define        SPLIT_SWAP_CID2_L_PAD 240
+#define SPLIT_SWAP_CID2_WIDTH 190
+
+#define        SPLIT_SWAP_PAUSE_L_PAD (SPLIT_SWAP_CID2_L_PAD+4)
+#define SPLIT_SWAP_PAUSE_WIDTH 40
+
+#define        SPLIT_SWAP_NAME1_L_PAD 30
+#define SPLIT_SWAP_NAME1_WIDTH 170
+
+#define        SPLIT_SWAP_NAME2_L_PAD (SPLIT_SWAP_NAME1_L_PAD+SPLIT_SWAP_NAME1_WIDTH+14)
+#define SPLIT_SWAP_NAME2_WIDTH 242
+
+#define SPLIT_SWAP_MORE_BTN_WIDTH 40
+#define SPLIT_SWAP_MORE_BTN_L_PAD (SPLIT_SWAP_CID2_L_PAD+SPLIT_SWAP_CID2_WIDTH-SPLIT_SWAP_MORE_BTN_WIDTH)
+#define SPLIT_SWAP_MORE_BTN_T_PAD (SPLIT_TIMER_TXT_T_PAD-6)
+#define SPLIT_SWAP_MORE_BTN_HEIGHT 40
+#define SPLIT_TIMER_TXT_W_ICON_WIDTH (SPLIT_SWAP_CID2_WIDTH-SPLIT_SWAP_MORE_BTN_WIDTH)
+
+#define        CONF_LIST_T_PAD 115
+#define        CONF_LIST_HEIGHT (70*5+1*5)     /*row-height(70) row-gap(1)*/
+
+#define        CONF_HOLD_WIDTH 45
+#define        CONF_HOLD_L_PAD (MAIN_SCREEN_W-26-CONF_HOLD_WIDTH)
+#define        CONF_HOLD_T_PAD 620
+#define        CONF_HOLD_HEIGHT 39
+
+#define        CONF_TIMER_T_PAD 620
+#define        CONF_TIMER_HEIGHT 52
+
+#define        REJ_MSG_NEW_BTN_L_PAD 26
+#define        REJ_MSG_NEW_BTN_WIDTH 428
+#define        REJ_MSG_NEW_BTN_T_PAD 715
+#define        REJ_MSG_NEW_BTN_HEIGHT 56
+
+#define REJ_MSG_LIST_T_PAD 20
+#define        REJ_MSG_LIST_HEIGHT 685
+
+#define SIX_BTN_COL1_L_PAD 26
+#define SIX_BTN_COL1_WIDTH 134
+#define SIX_BTN_COL2_L_PAD (SIX_BTN_COL1_L_PAD+SIX_BTN_COL1_WIDTH+13)
+#define SIX_BTN_COL3_L_PAD (SIX_BTN_COL2_L_PAD+SIX_BTN_COL1_WIDTH+13)
+#define SIX_BTN_ROW1_T_PAD 494
+#define SIX_BTN_ROW1_HEIGHT 88
+#define SIX_BTN_ROW2_T_PAD (SIX_BTN_ROW1_T_PAD+SIX_BTN_ROW1_HEIGHT+13)
+
+#define        CALL_BIG_END_L_PAD 26
+#define        CALL_BIG_END_WIDTH 428
+#define        CALL_BIG_END_T_PAD 712
+#define        CALL_BIG_END_HEIGHT 70
+
+#define INCMG_CALL_BTN1_T_PAD 438
+#define INCMG_CALL_BTN_HEIGHT CALL_BIG_END_HEIGHT
+#define INCMG_CALL_BTN2_T_PAD 524
+#define INCMG_CALL_BTN3_T_PAD 610
+
+#define        VIDEO_BTN_POS1_L_PAD 26
+#define        VIDEO_BTN_POS1_WIDTH 202
+#define        VIDEO_BTN_POS1_T_PAD 524
+#define        VIDEO_BTN_POS1_HEIGHT 70
+#define        VIDEO_BTN_POS2_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        VIDEO_BTN_POS2_WIDTH VIDEO_BTN_POS1_WIDTH
+#define        VIDEO_BTN_POS2_T_PAD 610
+#define        VIDEO_BTN_POS2_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define        VOICE_BTN_POS1_L_PAD (VIDEO_BTN_POS1_L_PAD+VIDEO_BTN_POS1_WIDTH+40)
+#define        VOICE_BTN_POS1_WIDTH VIDEO_BTN_POS1_WIDTH
+
+#define        MSG_BTN_POS1_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        MSG_BTN_POS1_WIDTH 428
+#define        MSG_BTN_POS1_T_PAD 610
+#define        MSG_BTN_POS1_HEIGHT VIDEO_BTN_POS1_HEIGHT
+#define        MSG_BTN_POS2_T_PAD 712
+#define        MSG_BTN_POS2_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define        CONTACT_BTN_POS1_L_PAD VIDEO_BTN_POS1_L_PAD
+#define        CONTACT_BTN_POS1_WIDTH MSG_BTN_POS1_WIDTH
+#define        CONTACT_BTN_POS1_T_PAD 712
+#define        CONTACT_BTN_POS1_HEIGHT VIDEO_BTN_POS1_HEIGHT
+
+#define QP_CID_L_PAD 10
+#define QP_CID_WIDTH 82
+#define QP_CID_T_PAD 11
+#define QP_CID_HEIGHT 82
+
+#define QP_END_BTN_L_PAD 102
+#define QP_END_BTN_WIDTH 368
+#define QP_END_BTN_T_PAD 50
+#define QP_END_BTN_HEIGHT 40
+
+#define QP_NAME_L_PAD 102
+#define QP_NAME_WIDTH 248
+#define QP_NAME_T_PAD 8
+#define QP_NAME_HEIGHT 30
+
+#define QP_TIMER_L_PAD 370
+/*
+ * End of WVGA GUI Widget Dimensions
+ */
+
+
+/*
+ * Relative positions
+ * In Portrait mode
+ */
+/* Relative X & Y positions of widgets w.r.t. Full Screen */
+#define REL_W(x) ((x)/MAIN_SCREEN_W)
+#define REL_H(y) ((y)/MAIN_SCREEN_H)
+
+/* Relative X & Y positions of widgets w.r.t. Navi-frame layout */
+/*#define WL_NB_H 94*/
+#define REL_NAVIFRAME_W(x) ((x)/MAIN_NAVIFRAME_W)
+#define REL_NAVIFRAME_H(y) ((y)/MAIN_NAVIFRAME_H)
+
+/* Relative X & Y positions of widgets w.r.t. ACC/REJ ICON layout */
+#define REL_LOCK_W(x) ((x)/483) /*approx*/
+#define REL_LOCK_H(y) ((y)/198) /*approx*/
+/* Relative X & Y positions of widgets w.r.t. REJ-W-MSG ICON layout */
+#define REL_LOCK_MSG_W(x) ((x)/348)    /*approx*/
+#define REL_LOCK_MSG_H(y) ((y)/200) /*approx*/
+
+/* Relative X & Y positions of widgets w.r.t. Keypad Buttons layout */
+#define REL_KEYPAD_W(x) ((x)/KEYPAD_BTNS_WIDTH)
+#define REL_KEYPAD_H(y) ((y)/KEYPAD_BTNS_HEIGHT)
+ /*
+ * End of Relative positions
+ */
+
+
+/*
+ * MO/Dialing view & MT/Incoming view
+ * In Portrait mode
+ */
+#define DIALLING_STATUS_L REL_W(DIALING_STATUS_L_PAD)
+#define DIALLING_STATUS_R REL_W(DIALING_STATUS_L_PAD+DIALING_STATUS_WIDTH)
+#define DIALLING_STATUS_T REL_H(DIALING_STATUS_T_PAD)
+#define DIALLING_STATUS_B REL_H(DIALING_STATUS_T_PAD+DIALING_STATUS_HEIGHT)
+
+/*
+#define DIALLING_MT_STATUS_L REL_W(123)
+#define DIALLING_MT_STATUS_R REL_W(357)
+#define DIALLING_MT_STATUS_T REL_H(375)
+#define DIALLING_MT_STATUS_B REL_H(407)
+*/
+
+#define DIALLING_NAME_L REL_W(CALL_NAME_L_PAD)
+#define DIALLING_NAME_R REL_W(CALL_NAME_L_PAD+CALL_NAME_WIDTH)
+#define DIALLING_NAME_T REL_H(CALL_NAME_T_PAD)
+#define DIALLING_NAME_B REL_H(CALL_NAME_T_PAD+CALL_NAME_HEIGHT)
+
+#define DIALLING_NUMBER_L REL_W(CALL_NUMBER_L_PAD)
+#define DIALLING_NUMBER_R REL_W(CALL_NUMBER_L_PAD+CALL_NUMBER_WIDTH)
+#define DIALLING_NUMBER_T REL_H(CALL_NUMBER_T_PAD)
+#define DIALLING_NUMBER_B REL_H(CALL_NUMBER_T_PAD+CALL_NUMBER_HEIGHT)
+
+#define DIALLING_CID_L REL_W(CALLER_ID_L_PAD)
+#define DIALLING_CID_R REL_W(CALLER_ID_L_PAD+CALLER_ID_WIDTH)
+#define DIALLING_CID_T REL_H(CALLER_ID_T_PAD)
+#define DIALLING_CID_B REL_H(CALLER_ID_T_PAD+CALLER_ID_HEIGHT)
+
+#define DIALLING_BACKGROUND_CID_L REL_W(BACKGROUND_CID_L_PAD)
+#define DIALLING_BACKGROUND_CID_R REL_W(BACKGROUND_CID_L_PAD+BACKGROUND_CID_WIDTH)
+#define DIALLING_BACKGROUND_CID_T REL_H(BACKGROUND_CID_T_PAD)
+#define DIALLING_BACKGROUND_CID_B REL_H(BACKGROUND_CID_T_PAD+BACKGROUND_CID_HEIGHT)
+
+/* accept - MT view */
+#define DIALLING_MT_BTN1_L REL_W(ACCEPT_BTN_L_PAD)
+#define DIALLING_MT_BTN1_R REL_W(ACCEPT_BTN_L_PAD+ACCEPT_BTN_WIDTH)
+#define DIALLING_MT_BTN1_T REL_H(ACCEPT_BTN_T_PAD)
+#define DIALLING_MT_BTN1_B REL_H(ACCEPT_BTN_T_PAD+ACCEPT_BTN_HEIGHT)
+
+/* reject - MT view */
+#define DIALLING_MT_BTN2_L  REL_W(REJECT_BTN_L_PAD)
+#define DIALLING_MT_BTN2_R  REL_W(REJECT_BTN_L_PAD+REJECT_BTN_WIDTH)
+#define DIALLING_MT_BTN2_T  REL_H(REJECT_BTN_T_PAD)
+#define DIALLING_MT_BTN2_B  REL_H(REJECT_BTN_T_PAD+REJECT_BTN_HEIGHT)
+/*
+ * End of MO/Dialing view & MT/Incoming view
+ */
+
+
+/*
+ * MT LOCK View
+ * In Portrait mode
+ */
+#define INCOMING_LOCK_ACCEPT_BG_L REL_W(-182)
+#define INCOMING_LOCK_ACCEPT_BG_R REL_W(140)
+#define INCOMING_LOCK_ACCEPT_BG_T REL_H(591)
+#define INCOMING_LOCK_ACCEPT_BG_B REL_H(715)
+
+#define INCOMING_LOCK_ACCEPT_ICON_L REL_LOCK_W(202)
+#define INCOMING_LOCK_ACCEPT_ICON_R REL_LOCK_W(272)
+#define INCOMING_LOCK_ACCEPT_ICON_T REL_LOCK_H(23)
+#define INCOMING_LOCK_ACCEPT_ICON_B REL_LOCK_H(93)
+
+#define INCOMING_LOCK_ACCEPT_TEXT_L REL_LOCK_W(30)
+#define INCOMING_LOCK_ACCEPT_TEXT_R REL_LOCK_W(182)
+#define INCOMING_LOCK_ACCEPT_TEXT_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_ACCEPT_TEXT_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_BG_L REL_W(340)
+#define INCOMING_LOCK_REJECT_BG_R REL_W(662)
+#define INCOMING_LOCK_REJECT_BG_T INCOMING_LOCK_ACCEPT_BG_T
+#define INCOMING_LOCK_REJECT_BG_B INCOMING_LOCK_ACCEPT_BG_B
+
+#define INCOMING_LOCK_REJECT_ICON_L REL_LOCK_W(50)
+#define INCOMING_LOCK_REJECT_ICON_R REL_LOCK_W(120)
+#define INCOMING_LOCK_REJECT_ICON_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_REJECT_ICON_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_TEXT_L REL_LOCK_W(130)
+#define INCOMING_LOCK_REJECT_TEXT_R REL_LOCK_W(282)
+#define INCOMING_LOCK_REJECT_TEXT_T INCOMING_LOCK_REJECT_ICON_T
+#define INCOMING_LOCK_REJECT_TEXT_B INCOMING_LOCK_REJECT_ICON_B
+/*
+ * End of MT LOCK View
+ */
+
+
+/*
+ * KEYPAD View
+ * In Portrait mode
+ */
+#define INCALL_DIALER_TIMER_L REL_W(KEYPAD_TIMER_L_PAD)
+#define INCALL_DIALER_TIMER_R REL_W(KEYPAD_TIMER_L_PAD+KEYPAD_TIMER_WIDTH)
+#define INCALL_DIALER_TIMER_T REL_H(KEYPAD_TIMER_T_PAD)
+#define INCALL_DIALER_TIMER_B REL_H(KEYPAD_TIMER_L_PAD+KEYPAD_TIMER_HEIGHT)
+
+#define INCALL_DIALER_NAME_L INCALL_DIALER_TIMER_L
+#define INCALL_DIALER_NAME_R INCALL_DIALER_TIMER_R
+#define INCALL_DIALER_NAME_T INCALL_DIALER_TIMER_T
+#define INCALL_DIALER_NAME_B INCALL_DIALER_TIMER_B
+
+/*
+#define DIALLING_KEYPAD_T_BF REL_H(319)
+#define DIALLING_KEYPAD_B_BF REL_H(710)
+*/
+
+#define DIALLING_KEYPAD_L REL_W(0)
+#define DIALLING_KEYPAD_R REL_W(MAIN_SCREEN_W)
+#define DIALLING_KEYPAD_T REL_H(KEYPAD_BTNS_T_PAD)
+#define DIALLING_KEYPAD_B REL_H(KEYPAD_BTNS_T_PAD+KEYPAD_BTNS_HEIGHT)
+
+#define DIALLING_ENTRY_TEXT_L REL_W(KEYPAD_ENTRY_TXT_L_PAD)
+#define DIALLING_ENTRY_TEXT_R REL_W(KEYPAD_ENTRY_TXT_L_PAD+KEYPAD_ENTRY_TXT_WIDTH)
+#define DIALLING_ENTRY_TEXT_T REL_H(KEYPAD_ENTRY_TXT_T_PAD)
+#define DIALLING_ENTRY_TEXT_B REL_H(KEYPAD_ENTRY_TXT_T_PAD+KEYPAD_ENTRY_TXT_HEIGHT)
+
+#define DIALER_BTN1_L REL_W(KEYPAD_HIDE_BTN_L_PAD)
+#define DIALER_BTN1_R REL_W(KEYPAD_HIDE_BTN_L_PAD+KEYPAD_HIDE_BTN_WIDTH)
+#define DIALER_BTN1_T REL_H(KEYPAD_HIDE_BTN_T_PAD)
+#define DIALER_BTN1_B REL_H(KEYPAD_HIDE_BTN_T_PAD+KEYPAD_HIDE_BTN_HEIGHT)
+
+#define DIALER_BTN2_L REL_W(KEYPAD_END_BTN_L_PAD)
+#define DIALER_BTN2_R REL_W(KEYPAD_END_BTN_L_PAD+KEYPAD_END_BTN_WIDTH)
+#define DIALER_BTN2_T DIALER_BTN1_T
+#define DIALER_BTN2_B DIALER_BTN1_B
+/*
+ * End of KEYPAD View
+ */
+
+
+/*
+ * INCALL View
+ * In Portrait mode
+ */
+#define INCALL_CID_L DIALLING_CID_L
+#define INCALL_CID_R DIALLING_CID_R
+#define INCALL_CID_T DIALLING_CID_T
+#define INCALL_CID_B DIALLING_CID_B
+
+/*
+#define INCALL_CID_DIM_T DIALLING_CID_T
+#define INCALL_CID_DIM_B DIALLING_CID_B
+#define INCALL_CID_DIM_L REL_W(145)
+#define INCALL_CID_DIM_R REL_W(334)
+*/
+
+#define INCALL_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_L
+#define INCALL_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_R
+#define INCALL_BACKGROUND_CID_T DIALLING_BACKGROUND_CID_T
+#define INCALL_BACKGROUND_CID_B DIALLING_BACKGROUND_CID_B
+
+#define INCALL_NAME_L DIALLING_NAME_L
+#define INCALL_NAME_R DIALLING_NAME_R
+#define INCALL_NAME_T DIALLING_NAME_T
+#define INCALL_NAME_B DIALLING_NAME_B
+
+#define INCALL_NUMBER_L DIALLING_NUMBER_L
+#define INCALL_NUMBER_R DIALLING_NUMBER_R
+#define INCALL_NUMBER_T DIALLING_NUMBER_T
+#define INCALL_NUMBER_B DIALLING_NUMBER_B
+
+#define INCALL_HOLD_L REL_W(INCALL_HOLD_BTN_L_PAD)
+#define INCALL_HOLD_R REL_W(INCALL_HOLD_BTN_L_PAD+INCALL_HOLD_BTN_WIDTH)
+#define INCALL_HOLD_T REL_H(INCALL_HOLD_BTN_T_PAD)
+#define INCALL_HOLD_B REL_H(INCALL_HOLD_BTN_T_PAD+INCALL_HOLD_BTN_HEIGHT)
+
+#define INCALL_TIMER_L REL_W(INCALL_TIMER_L_PAD)
+#define INCALL_TIMER_R REL_W(INCALL_TIMER_L_PAD+INCALL_TIMER_WIDTH)
+#define INCALL_TIMER_T REL_H(INCALL_TIMER_T_PAD)
+#define INCALL_TIMER_B REL_H(INCALL_TIMER_T_PAD+INCALL_TIMER_HEIGHT)
+
+#define INCALL_BACKGROUND_SHARE_L      REL_W(0)
+#define INCALL_BACKGROUND_SHARE_R      REL_W(MAIN_SCREEN_W)
+#define INCALL_BACKGROUND_SHARE_T      REL_H(INCALL_SHARE_BG_T_PAD)
+#define INCALL_BACKGROUND_SHARE_B      REL_H(INCALL_SHARE_BG_T_PAD+INCALL_SHARE_BG_HEIGHT)
+/*
+ * End of INCALL View
+ */
+
+
+/*
+ * MULTI-CALL SPLIT View
+ * In Portrait mode
+ */
+/* L[ACT] + R[HLD] */
+#define MULTICALL_SPLIT_BACKGROUND_CID_L INCALL_BACKGROUND_CID_L
+#define MULTICALL_SPLIT_BACKGROUND_CID_R INCALL_BACKGROUND_CID_R
+#define MULTICALL_SPLIT_BACKGROUND_CID_T INCALL_BACKGROUND_CID_T
+#define MULTICALL_SPLIT_BACKGROUND_CID_B INCALL_BACKGROUND_CID_B
+
+#define MULTICALL_SPLIT_CID_1_L REL_W(SPLIT_CID1_L_PAD)
+#define MULTICALL_SPLIT_CID_1_R REL_W(SPLIT_CID1_L_PAD+SPLIT_CID1_WIDTH)
+#define MULTICALL_SPLIT_CID_1_T REL_H(SPLIT_CID1_T_PAD)
+#define MULTICALL_SPLIT_CID_1_B REL_H(SPLIT_CID1_T_PAD+SPLIT_CID1_HEIGHT)
+
+#define MULTICALL_SPLIT_PAUSE_L REL_W(SPLIT_PAUSE_L_PAD)
+#define MULTICALL_SPLIT_PAUSE_R REL_W(SPLIT_PAUSE_L_PAD+SPLIT_PAUSE_WIDTH)
+#define MULTICALL_SPLIT_PAUSE_T REL_H(SPLIT_PAUSE_T_PAD)
+#define MULTICALL_SPLIT_PAUSE_B REL_H(SPLIT_PAUSE_T_PAD+SPLIT_PAUSE_HEIGHT)
+
+#define MULTICALL_SPLIT_CID_2_L REL_W(SPLIT_CID2_L_PAD)
+#define MULTICALL_SPLIT_CID_2_R REL_W(SPLIT_CID2_L_PAD+SPLIT_CID2_WIDTH)
+#define MULTICALL_SPLIT_CID_2_T REL_H(SPLIT_CID2_T_PAD)
+#define MULTICALL_SPLIT_CID_2_B REL_H(SPLIT_CID2_T_PAD+SPLIT_CID2_HEIGHT)
+
+#define MULTICALL_SPLIT_PLAY_L REL_W(SPLIT_PLAY_L_PAD)
+#define MULTICALL_SPLIT_PLAY_R REL_W(SPLIT_PLAY_L_PAD+SPLIT_PLAY_WIDTH)
+#define MULTICALL_SPLIT_PLAY_T REL_H(SPLIT_PLAY_T_PAD)
+#define MULTICALL_SPLIT_PLAY_B REL_H(SPLIT_PLAY_T_PAD+SPLIT_PLAY_HEIGHT)
+
+#define MULTICALL_SPLIT_NAME_1_L REL_W(SPLIT_NAME1_L_PAD)
+#define MULTICALL_SPLIT_NAME_1_R REL_W(SPLIT_NAME1_L_PAD+SPLIT_NAME1_WIDTH)
+#define MULTICALL_SPLIT_NAME_1_T REL_H(SPLIT_NAME1_T_PAD)
+#define MULTICALL_SPLIT_NAME_1_B REL_H(SPLIT_NAME1_T_PAD+SPLIT_NAME1_HEIGHT)
+
+#define MULTICALL_SPLIT_NAME_2_L REL_W(SPLIT_NAME2_L_PAD)
+#define MULTICALL_SPLIT_NAME_2_R REL_W(SPLIT_NAME2_L_PAD+SPLIT_NAME2_WIDTH)
+#define MULTICALL_SPLIT_NAME_2_T REL_H(SPLIT_NAME2_T_PAD)
+#define MULTICALL_SPLIT_NAME_2_B REL_H(SPLIT_NAME2_T_PAD+SPLIT_NAME2_HEIGHT)
+
+#define MULTICALL_SPLIT_TIMER_L MULTICALL_SPLIT_CID_1_L
+#define MULTICALL_SPLIT_TIMER_R MULTICALL_SPLIT_CID_1_R
+#define MULTICALL_SPLIT_TIMER_T REL_H(SPLIT_TIMER_TXT_T_PAD)
+#define MULTICALL_SPLIT_TIMER_B REL_H(SPLIT_TIMER_TXT_T_PAD+SPLIT_TIMER_TXT_HEIGHT)
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_L MULTICALL_SPLIT_CID_2_L
+#define MULTICALL_SPLIT_ON_HOLD_TXT_R MULTICALL_SPLIT_CID_2_R
+#define MULTICALL_SPLIT_ON_HOLD_TXT_T REL_H(SPLIT_ONHOLD_TXT_T_PAD)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_B REL_H(SPLIT_ONHOLD_TXT_T_PAD+SPLIT_ONHOLD_TXT_HEIGHT)
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_L MULTICALL_SPLIT_CID_2_L
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_R REL_W(SPLIT_ONHOLD_TXT_W_ICON_WIDTH)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+
+#define MULTICALL_SPLIT_MORE_ICON_L REL_W(SPLIT_MORE_BTN_L_PAD)
+#define MULTICALL_SPLIT_MORE_ICON_R REL_W(SPLIT_MORE_BTN_L_PAD+SPLIT_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_MORE_ICON_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_MORE_ICON_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+/* L[ACT] + R[HLD] */
+
+/* L[HLD] + R[ACT] */
+#define MULTICALL_SPLIT_SWAP_CID_1_L REL_W(SPLIT_SWAP_CID1_L_PAD)
+#define MULTICALL_SPLIT_SWAP_CID_1_R REL_W(SPLIT_SWAP_CID1_L_PAD+SPLIT_SWAP_CID1_WIDTH)
+#define MULTICALL_SPLIT_SWAP_CID_1_T MULTICALL_SPLIT_CID_2_T
+#define MULTICALL_SPLIT_SWAP_CID_1_B MULTICALL_SPLIT_CID_2_B
+
+#define MULTICALL_SPLIT_SWAP_PLAY_L REL_W(SPLIT_SWAP_PLAY_L_PAD)
+#define MULTICALL_SPLIT_SWAP_PLAY_R REL_W(SPLIT_SWAP_PLAY_L_PAD+SPLIT_SWAP_PLAY_WIDTH)
+#define MULTICALL_SPLIT_SWAP_PLAY_T MULTICALL_SPLIT_PLAY_T
+#define MULTICALL_SPLIT_SWAP_PLAY_B MULTICALL_SPLIT_PLAY_B
+
+#define MULTICALL_SPLIT_SWAP_CID_2_L REL_W(SPLIT_SWAP_CID2_L_PAD)
+#define MULTICALL_SPLIT_SWAP_CID_2_R REL_W(SPLIT_SWAP_CID2_L_PAD+SPLIT_SWAP_CID2_WIDTH)
+#define MULTICALL_SPLIT_SWAP_CID_2_T MULTICALL_SPLIT_CID_1_T
+#define MULTICALL_SPLIT_SWAP_CID_2_B MULTICALL_SPLIT_CID_1_B
+
+#define MULTICALL_SPLIT_SWAP_PAUSE_L REL_W(SPLIT_SWAP_PAUSE_L_PAD)
+#define MULTICALL_SPLIT_SWAP_PAUSE_R REL_W(SPLIT_SWAP_PAUSE_L_PAD+SPLIT_SWAP_PAUSE_WIDTH)
+#define MULTICALL_SPLIT_SWAP_PAUSE_T MULTICALL_SPLIT_PAUSE_T
+#define MULTICALL_SPLIT_SWAP_PAUSE_B MULTICALL_SPLIT_PAUSE_B
+
+#define MULTICALL_SPLIT_SWAP_NAME_1_L MULTICALL_SPLIT_NAME_1_L
+#define MULTICALL_SPLIT_SWAP_NAME_1_R REL_W(SPLIT_SWAP_NAME1_L_PAD+SPLIT_SWAP_NAME1_WIDTH)
+#define MULTICALL_SPLIT_SWAP_NAME_1_T MULTICALL_SPLIT_NAME_2_T
+#define MULTICALL_SPLIT_SWAP_NAME_1_B MULTICALL_SPLIT_NAME_2_B
+
+#define MULTICALL_SPLIT_SWAP_NAME_2_L REL_W(SPLIT_SWAP_NAME2_L_PAD)
+#define MULTICALL_SPLIT_SWAP_NAME_2_R REL_W(SPLIT_SWAP_NAME2_L_PAD+SPLIT_SWAP_NAME2_WIDTH)
+#define MULTICALL_SPLIT_SWAP_NAME_2_T MULTICALL_SPLIT_NAME_1_T
+#define MULTICALL_SPLIT_SWAP_NAME_2_B MULTICALL_SPLIT_NAME_1_B
+
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_L MULTICALL_SPLIT_SWAP_CID_1_L
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_R MULTICALL_SPLIT_SWAP_CID_1_R
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_T MULTICALL_SPLIT_ON_HOLD_TXT_T
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_B MULTICALL_SPLIT_ON_HOLD_TXT_B
+
+#define MULTICALL_SPLIT_SWAP_TIMER_L MULTICALL_SPLIT_SWAP_CID_2_L
+#define MULTICALL_SPLIT_SWAP_TIMER_R MULTICALL_SPLIT_SWAP_CID_2_R
+#define MULTICALL_SPLIT_SWAP_TIMER_T MULTICALL_SPLIT_TIMER_T
+#define MULTICALL_SPLIT_SWAP_TIMER_B MULTICALL_SPLIT_TIMER_B
+
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_L MULTICALL_SPLIT_SWAP_CID_2_L
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_R REL_W(SPLIT_TIMER_TXT_W_ICON_WIDTH)
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_T MULTICALL_SPLIT_TIMER_T
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_B MULTICALL_SPLIT_TIMER_B
+
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_L REL_W(SPLIT_SWAP_MORE_BTN_L_PAD)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_R REL_W(SPLIT_SWAP_MORE_BTN_L_PAD+SPLIT_SWAP_MORE_BTN_WIDTH)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_T REL_H(SPLIT_SWAP_MORE_BTN_T_PAD)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_B REL_H(SPLIT_SWAP_MORE_BTN_T_PAD+SPLIT_SWAP_MORE_BTN_HEIGHT)
+/* L[HLD] + R[ACT] */
+
+/*
+ * End of MULTI-CALL SPLIT View
+ */
+
+
+/*
+ * MULTI-CALL LIST View
+ * In Portrait mode
+ */
+#define MULTICALL_LIST_L REL_W(0)
+#define MULTICALL_LIST_R REL_W(MAIN_SCREEN_W)
+#define MULTICALL_LIST_T REL_H(CONF_LIST_T_PAD)
+#define MULTICALL_LIST_B REL_H(CONF_LIST_T_PAD+CONF_LIST_HEIGHT)
+
+#define MULTICALL_LIST_HOLD_L REL_W(CONF_HOLD_L_PAD)
+#define MULTICALL_LIST_HOLD_R REL_W(CONF_HOLD_L_PAD+CONF_HOLD_WIDTH)
+#define MULTICALL_LIST_HOLD_T REL_H(CONF_HOLD_T_PAD)
+#define MULTICALL_LIST_HOLD_B REL_H(CONF_HOLD_T_PAD+CONF_HOLD_HEIGHT)
+
+#define MULTICALL_LIST_TIMER_L REL_W(0)
+#define MULTICALL_LIST_TIMER_R REL_W(MAIN_SCREEN_W)
+#define MULTICALL_LIST_TIMER_T REL_H(CONF_TIMER_T_PAD)
+#define MULTICALL_LIST_TIMER_B REL_H(CONF_TIMER_T_PAD+CONF_TIMER_HEIGHT)
+
+#define MULTICALL_LIST_BIG_END_L REL_W(CALL_BIG_END_L_PAD)
+#define MULTICALL_LIST_BIG_END_R REL_W(CALL_BIG_END_L_PAD+CALL_BIG_END_WIDTH)
+#define MULTICALL_LIST_BIG_END_T REL_H(CALL_BIG_END_T_PAD)
+#define MULTICALL_LIST_BIG_END_B REL_H(CALL_BIG_END_T_PAD+CALL_BIG_END_HEIGHT)
+/*
+ * End of MULTI-CALL LIST View
+ */
+
+
+/*
+ * SIX Button Layout
+ * In Portrait mode
+ */
+#define SIX_BTN_1_L REL_W(SIX_BTN_COL1_L_PAD)
+#define SIX_BTN_1_R REL_W(SIX_BTN_COL1_L_PAD+SIX_BTN_COL1_WIDTH)
+#define SIX_BTN_2_L REL_W(SIX_BTN_COL2_L_PAD)
+#define SIX_BTN_2_R REL_W(SIX_BTN_COL2_L_PAD+SIX_BTN_COL1_WIDTH)
+#define SIX_BTN_3_L REL_W(SIX_BTN_COL3_L_PAD)
+#define SIX_BTN_3_R REL_W(SIX_BTN_COL3_L_PAD+SIX_BTN_COL1_WIDTH)
+
+#define SIX_BTN_1_T REL_H(SIX_BTN_ROW1_T_PAD)
+#define SIX_BTN_1_B REL_H(SIX_BTN_ROW1_T_PAD+SIX_BTN_ROW1_HEIGHT)
+#define SIX_BTN_2_T REL_H(SIX_BTN_ROW2_T_PAD)
+#define SIX_BTN_2_B REL_H(SIX_BTN_ROW2_T_PAD+SIX_BTN_ROW1_HEIGHT)
+
+#define SIX_BTN_BIG_END_L REL_W(CALL_BIG_END_L_PAD)
+#define SIX_BTN_BIG_END_R REL_W(CALL_BIG_END_L_PAD+CALL_BIG_END_WIDTH)
+#define SIX_BTN_BIG_END_T REL_H(CALL_BIG_END_T_PAD)
+#define SIX_BTN_BIG_END_B REL_H(CALL_BIG_END_T_PAD+CALL_BIG_END_HEIGHT)
+
+#define SIX_BTN_INCOMING_1_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_1_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_1_T REL_H(INCMG_CALL_BTN1_T_PAD)
+#define SIX_BTN_INCOMING_1_B REL_H(INCMG_CALL_BTN1_T_PAD+INCMG_CALL_BTN_HEIGHT)
+
+#define SIX_BTN_INCOMING_2_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_2_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_2_T REL_H(INCMG_CALL_BTN2_T_PAD)
+#define SIX_BTN_INCOMING_2_B REL_H(INCMG_CALL_BTN2_T_PAD+INCMG_CALL_BTN_HEIGHT)
+
+#define SIX_BTN_INCOMING_3_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_3_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_3_T REL_H(INCMG_CALL_BTN3_T_PAD)
+#define SIX_BTN_INCOMING_3_B REL_H(INCMG_CALL_BTN3_T_PAD+INCMG_CALL_BTN_HEIGHT)
+/*
+ * End of SIX Button Layout
+ */
+
+/*
+ * Navigation bar layout
+ */
+#define CALL_NAVIGATION_BAR_T REL_H(NAVIFRAME_T_PAD)
+#define CALL_NAVIGATION_BAR_B REL_H(MAIN_SCREEN_H)
+#define CALL_NAVIGATION_BAR_L REL_W(0)
+#define CALL_NAVIGATION_BAR_R REL_W(MAIN_SCREEN_W)
+/*
+ * End of Navigation bar layout
+ */
+
+
+/*
+ * END CALL View
+ * In Portrait mode
+ */
+#define        ENDSINGLECALL_BACKGROUND_CID_L DIALLING_BACKGROUND_CID_L
+#define        ENDSINGLECALL_BACKGROUND_CID_R DIALLING_BACKGROUND_CID_R
+#define        ENDSINGLECALL_BACKGROUND_CID_T DIALLING_BACKGROUND_CID_T
+#define        ENDSINGLECALL_BACKGROUND_CID_B DIALLING_BACKGROUND_CID_B
+
+#define ENDSINGLECALL_CID_L DIALLING_CID_L
+#define ENDSINGLECALL_CID_R DIALLING_CID_R
+#define ENDSINGLECALL_CID_T DIALLING_CID_T
+#define ENDSINGLECALL_CID_B DIALLING_CID_B
+
+#define ENDSINGLECALL_NAME_L DIALLING_NAME_L
+#define ENDSINGLECALL_NAME_R DIALLING_NAME_R
+#define ENDSINGLECALL_NAME_T DIALLING_NAME_T
+#define ENDSINGLECALL_NAME_B DIALLING_NAME_B
+
+#define ENDSINGLECALL_NUMBER_L DIALLING_NUMBER_L
+#define ENDSINGLECALL_NUMBER_R DIALLING_NUMBER_R
+#define ENDSINGLECALL_NUMBER_T DIALLING_NUMBER_T
+#define ENDSINGLECALL_NUMBER_B DIALLING_NUMBER_B
+
+#define ENDSINGLECALL_TIMER_L INCALL_TIMER_L
+#define ENDSINGLECALL_TIMER_R INCALL_TIMER_R
+#define ENDSINGLECALL_TIMER_T INCALL_TIMER_T
+#define ENDSINGLECALL_TIMER_B INCALL_TIMER_B
+
+#define        ENDSINGLECALL_VIDEO_BTN_L REL_W(VIDEO_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_VIDEO_BTN_R REL_W(VIDEO_BTN_POS1_L_PAD+VIDEO_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_VIDEO_BTN_T REL_H(VIDEO_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_VIDEO_BTN_B REL_H(VIDEO_BTN_POS1_T_PAD+VIDEO_BTN_POS1_HEIGHT)
+
+#define        ENDSINGLECALL_VIDEO2_BTN_L REL_W(VIDEO_BTN_POS2_L_PAD)
+#define        ENDSINGLECALL_VIDEO2_BTN_R REL_W(VIDEO_BTN_POS2_L_PAD+VIDEO_BTN_POS2_WIDTH)
+#define        ENDSINGLECALL_VIDEO2_BTN_T REL_H(VIDEO_BTN_POS2_T_PAD)
+#define        ENDSINGLECALL_VIDEO2_BTN_B REL_H(VIDEO_BTN_POS2_T_PAD+VIDEO_BTN_POS2_HEIGHT)
+
+#define        ENDSINGLECALL_VOICE_BTN_L REL_W(VOICE_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_VOICE_BTN_R REL_W(VOICE_BTN_POS1_L_PAD+VOICE_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_VOICE_BTN_T ENDSINGLECALL_VIDEO_BTN_T
+#define        ENDSINGLECALL_VOICE_BTN_B ENDSINGLECALL_VIDEO_BTN_B
+
+#define        ENDSINGLECALL_VOICE2_BTN_L ENDSINGLECALL_VOICE_BTN_L
+#define        ENDSINGLECALL_VOICE2_BTN_R ENDSINGLECALL_VOICE_BTN_R
+#define        ENDSINGLECALL_VOICE2_BTN_T ENDSINGLECALL_VIDEO2_BTN_T
+#define        ENDSINGLECALL_VOICE2_BTN_B ENDSINGLECALL_VIDEO2_BTN_B
+
+#define        ENDSINGLECALL_MSG_BTN_L REL_W(MSG_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_MSG_BTN_R REL_W(MSG_BTN_POS1_L_PAD+MSG_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_MSG_BTN_T REL_H(MSG_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_MSG_BTN_B REL_H(MSG_BTN_POS1_T_PAD+MSG_BTN_POS1_HEIGHT)
+
+#define        ENDSINGLECALL_MSG2_BTN_L ENDSINGLECALL_MSG_BTN_L
+#define        ENDSINGLECALL_MSG2_BTN_R ENDSINGLECALL_MSG_BTN_R
+#define        ENDSINGLECALL_MSG2_BTN_T REL_H(MSG_BTN_POS2_T_PAD)
+#define        ENDSINGLECALL_MSG2_BTN_B REL_H(MSG_BTN_POS2_T_PAD+MSG_BTN_POS2_HEIGHT)
+
+#define        ENDSINGLECALL_CONTACT_BTN_L REL_W(CONTACT_BTN_POS1_L_PAD)
+#define        ENDSINGLECALL_CONTACT_BTN_R REL_W(CONTACT_BTN_POS1_L_PAD+CONTACT_BTN_POS1_WIDTH)
+#define        ENDSINGLECALL_CONTACT_BTN_T REL_H(CONTACT_BTN_POS1_T_PAD)
+#define        ENDSINGLECALL_CONTACT_BTN_B REL_H(CONTACT_BTN_POS1_T_PAD+CONTACT_BTN_POS1_HEIGHT)
+/*
+ * End of END CALL View
+ */
+#endif                         /*__VCUI_VIEW_LAYOUT_WVGA__*/
diff --git a/ui/vcui-view-layout.h b/ui/vcui-view-layout.h
new file mode 100755 (executable)
index 0000000..b24e370
--- /dev/null
@@ -0,0 +1,592 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __VCUI_VIEW_LAYOUT__
+#define __VCUI_VIEW_LAYOUT__
+
+#define COLOR_DEFAULT 0 0 0 255
+#define COLOR_BG_ALPHA 0 0 0 0
+#define COLOR_BG_FOR_HELD_CALL_DIM 0 0 0 150
+
+/*#define BTN_EDGE_W 9*/
+
+/*List of the screen and widget dimensions as per GUI*/
+/*Portrait mode*/
+#define MAIN_SCREEN_W 480
+#define MAIN_SCREEN_H 800
+
+#define REL_W(x) (x / MAIN_SCREEN_W)
+#define REL_H(x) (x / MAIN_SCREEN_H)
+
+/* Window layout with nothing (only indicator) */
+/*
+#define WL_INDI_H 52
+#define MAIN_INDICATOR_W MAIN_SCREEN_W
+#define MAIN_INDICATOR_H 748
+#define REL_INDI_W(x) (x / MAIN_INDICATOR_W)
+#define REL_INDI_H(x) (x / MAIN_INDICATOR_H)
+*/
+
+/* Window layout with titlebar */
+/*
+#define WL_TB_H 92
+#define MAIN_TITLEBAR_W MAIN_SCREEN_W
+#define MAIN_TITLEBAR_H 702
+#define REL_TITLEBAR_W(x) (x / MAIN_TITLEBAR_W)
+#define REL_TITLEBAR_H(x) (x / MAIN_TITLEBAR_H)
+*/
+
+/* Window layout with navibar */
+/*#define WL_NB_H 94*/
+#define MAIN_NAVIBAR_W MAIN_SCREEN_W
+#define MAIN_NAVIBAR_H 706
+#define REL_NAVIBAR_W(x) (x / MAIN_NAVIBAR_W)
+#define REL_NAVIBAR_H(x) (x / MAIN_NAVIBAR_H)
+
+/* Main View (MO/MT view) */
+#define DIALLING_STATUS_L REL_W(12)
+#define DIALLING_STATUS_R REL_W(468)
+#define DIALLING_STATUS_T REL_H(428)
+#define DIALLING_STATUS_B REL_H(460)
+
+#define DIALLING_MT_STATUS_L REL_W(123)
+#define DIALLING_MT_STATUS_R REL_W(357)
+#define DIALLING_MT_STATUS_T REL_H(375)
+#define DIALLING_MT_STATUS_B REL_H(407)
+
+#define DIALLING_NAME_L REL_W(12)
+#define DIALLING_NAME_R REL_W(468)
+#define DIALLING_NAME_T REL_H(52)
+#define DIALLING_NAME_B REL_H(102)
+
+#define DIALLING_NUMBER_L DIALLING_NAME_L
+#define DIALLING_NUMBER_R DIALLING_NAME_R
+#define DIALLING_NUMBER_T REL_H(106)
+#define DIALLING_NUMBER_B REL_H(138)
+
+#define DIALLING_CID_L  REL_W(145)
+#define DIALLING_CID_R  REL_W(335)
+#define DIALLING_CID_T REL_H(145)
+#define DIALLING_CID_B REL_H(335)
+
+#define DIALLING_BACKGROUND_CID_L  REL_W(0)
+#define DIALLING_BACKGROUND_CID_R  REL_W(MAIN_SCREEN_W)
+#define DIALLING_BACKGROUND_CID_T REL_H(0)
+#define DIALLING_BACKGROUND_CID_B REL_H(MAIN_SCREEN_H)
+
+/* accept */
+#define DIALLING_MT_BTN1_L REL_W(26)
+#define DIALLING_MT_BTN1_R REL_W(228)
+#define DIALLING_MT_BTN1_T REL_H(620)
+#define DIALLING_MT_BTN1_B REL_H(690)
+
+/* reject */
+#define DIALLING_MT_BTN2_L  REL_W(252)
+#define DIALLING_MT_BTN2_R  REL_W(454)
+#define DIALLING_MT_BTN2_T  DIALLING_MT_BTN1_T
+#define DIALLING_MT_BTN2_B  DIALLING_MT_BTN1_B
+/* End of Main View (MO/MT view) */
+
+/* MT LOCK View */
+#define REL_LOCK_W(x) (x / 322)
+#define REL_LOCK_H(x) (x / 124)
+
+#define INCOMING_LOCK_ACCEPT_BG_L REL_W(-182)
+#define INCOMING_LOCK_ACCEPT_BG_R REL_W(140)
+#define INCOMING_LOCK_ACCEPT_BG_T REL_H(591)
+#define INCOMING_LOCK_ACCEPT_BG_B REL_H(715)
+
+#define INCOMING_LOCK_ACCEPT_ICON_L REL_LOCK_W(202)
+#define INCOMING_LOCK_ACCEPT_ICON_R REL_LOCK_W(272)
+#define INCOMING_LOCK_ACCEPT_ICON_T REL_LOCK_H(23)
+#define INCOMING_LOCK_ACCEPT_ICON_B REL_LOCK_H(93)
+
+#define INCOMING_LOCK_ACCEPT_TEXT_L REL_LOCK_W(30)
+#define INCOMING_LOCK_ACCEPT_TEXT_R REL_LOCK_W(182)
+#define INCOMING_LOCK_ACCEPT_TEXT_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_ACCEPT_TEXT_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_BG_L REL_W(340)
+#define INCOMING_LOCK_REJECT_BG_R REL_W(662)
+#define INCOMING_LOCK_REJECT_BG_T INCOMING_LOCK_ACCEPT_BG_T
+#define INCOMING_LOCK_REJECT_BG_B INCOMING_LOCK_ACCEPT_BG_B
+
+#define INCOMING_LOCK_REJECT_ICON_L REL_LOCK_W(50)
+#define INCOMING_LOCK_REJECT_ICON_R REL_LOCK_W(120)
+#define INCOMING_LOCK_REJECT_ICON_T INCOMING_LOCK_ACCEPT_ICON_T
+#define INCOMING_LOCK_REJECT_ICON_B INCOMING_LOCK_ACCEPT_ICON_B
+
+#define INCOMING_LOCK_REJECT_TEXT_L REL_LOCK_W(130)
+#define INCOMING_LOCK_REJECT_TEXT_R REL_LOCK_W(282)
+#define INCOMING_LOCK_REJECT_TEXT_T INCOMING_LOCK_REJECT_ICON_T
+#define INCOMING_LOCK_REJECT_TEXT_B INCOMING_LOCK_REJECT_ICON_B
+
+#define REL_LOCK_MSG_W(x) (x / 232)
+#define REL_LOCK_MSG_H(x) (x / 125)
+/* End of MT LOCK View */
+
+/* KEYPAD View */
+#define INCALL_DIALER_TIMER_T REL_H(241)
+#define INCALL_DIALER_TIMER_B REL_H(271)
+#define INCALL_DIALER_TIMER_L REL_W(300)
+#define INCALL_DIALER_TIMER_R REL_W(454)
+
+#define INCALL_DIALER_NAME_T INCALL_DIALER_TIMER_T
+#define INCALL_DIALER_NAME_B INCALL_DIALER_TIMER_B
+#define INCALL_DIALER_NAME_L REL_W(27)
+#define INCALL_DIALER_NAME_R REL_W(300)
+
+/*
+#define DIALLING_KEYPAD_T_BF REL_H(319)
+#define DIALLING_KEYPAD_B_BF REL_H(710)
+*/
+
+#define DIALLING_KEYPAD_T REL_H(289)
+#define DIALLING_KEYPAD_B REL_H(680)
+#define DIALLING_KEYPAD_L REL_W(0)
+#define DIALLING_KEYPAD_R REL_W(MAIN_SCREEN_W)
+#define KEYPAD_W MAIN_SCREEN_W
+#define KEYPAD_H 391
+
+#define DIALLING_ENTRY_TEXT_T REL_H(46)
+#define DIALLING_ENTRY_TEXT_B REL_H(186)
+#define DIALLING_ENTRY_TEXT_L REL_W(26)
+#define DIALLING_ENTRY_TEXT_R REL_W(454)
+#define REL_KEYPAD_W(x) ((x)/KEYPAD_W)
+#define REL_KEYPAD_H(y) ((y)/KEYPAD_H)
+
+#define DIALER_BTN1_T REL_H(712)
+#define DIALER_BTN1_B REL_H(782)
+#define DIALER_BTN1_L REL_W(27)
+#define DIALER_BTN1_R REL_W(229)
+
+#define DIALER_BTN2_T DIALER_BTN1_T
+#define DIALER_BTN2_B DIALER_BTN1_B
+#define DIALER_BTN2_L REL_W(252)
+#define DIALER_BTN2_R REL_W(454)
+/* End of KEYPAD View */
+
+/* INCALL View  : Use Windows Layout with nothing (only indicator) */
+/*Portrait view - START*/
+#define INCALL_CID_T DIALLING_CID_T
+#define INCALL_CID_B DIALLING_CID_B
+#define INCALL_CID_L DIALLING_CID_L
+#define INCALL_CID_R DIALLING_CID_R
+
+/*
+#define INCALL_CID_DIM_T DIALLING_CID_T
+#define INCALL_CID_DIM_B DIALLING_CID_B
+#define INCALL_CID_DIM_L REL_W(145)
+#define INCALL_CID_DIM_R REL_W(334)
+*/
+
+#define INCALL_BACKGROUND_CID_L  DIALLING_BACKGROUND_CID_L
+#define INCALL_BACKGROUND_CID_R  DIALLING_BACKGROUND_CID_R
+#define INCALL_BACKGROUND_CID_T DIALLING_BACKGROUND_CID_T
+#define INCALL_BACKGROUND_CID_B DIALLING_BACKGROUND_CID_B
+
+#define INCALL_NAME_T DIALLING_NAME_T
+#define INCALL_NAME_B DIALLING_NAME_B
+#define INCALL_NAME_L DIALLING_NAME_L
+#define INCALL_NAME_R DIALLING_NAME_R
+
+#define INCALL_NUMBER_T DIALLING_NUMBER_T
+#define INCALL_NUMBER_B DIALLING_NUMBER_B
+#define INCALL_NUMBER_L DIALLING_NUMBER_L
+#define INCALL_NUMBER_R DIALLING_NUMBER_R
+
+#define INCALL_HOLD_T REL_H(389)
+#define INCALL_HOLD_B REL_H(443)
+#define INCALL_HOLD_L REL_W(26)
+#define INCALL_HOLD_R REL_W(99)
+
+#define INCALL_TIMER_T REL_H(400)
+#define INCALL_TIMER_B REL_H(432)
+#define INCALL_TIMER_L REL_W(173)
+#define INCALL_TIMER_R REL_W(454)
+
+#define INCALL_BACKGROUND_SHARE_L      REL_W(0)
+#define INCALL_BACKGROUND_SHARE_R      REL_W(MAIN_SCREEN_W)
+#define INCALL_BACKGROUND_SHARE_T      REL_H(365)
+#define INCALL_BACKGROUND_SHARE_B      REL_H(774)
+/*Portrait view - END*/
+
+/* MULTICALL_SPLIT View  : Use Windows Layout with no indicator */
+/*portrait mode - START*/
+/*L[ACT] + R[HLD]*/
+#define MULTICALL_SPLIT_BACKGROUND_CID_L INCALL_BACKGROUND_CID_L
+#define MULTICALL_SPLIT_BACKGROUND_CID_R INCALL_BACKGROUND_CID_R
+#define MULTICALL_SPLIT_BACKGROUND_CID_T INCALL_BACKGROUND_CID_T
+#define MULTICALL_SPLIT_BACKGROUND_CID_B INCALL_BACKGROUND_CID_B
+
+#define MULTICALL_SPLIT_CID_1_T REL_H(136)
+#define MULTICALL_SPLIT_CID_1_B REL_H(326)
+#define MULTICALL_SPLIT_CID_1_L REL_W(50)
+#define MULTICALL_SPLIT_CID_1_R REL_W(240)
+
+#define MULTICALL_SPLIT_PAUSE_T REL_H(282)
+#define MULTICALL_SPLIT_PAUSE_B REL_H(322)
+#define MULTICALL_SPLIT_PAUSE_L REL_W(54)
+#define MULTICALL_SPLIT_PAUSE_R REL_W(94)
+
+#define MULTICALL_SPLIT_CID_2_T REL_H(169)
+#define MULTICALL_SPLIT_CID_2_B REL_H(299)
+#define MULTICALL_SPLIT_CID_2_L REL_W(305)
+#define MULTICALL_SPLIT_CID_2_R REL_W(435)
+
+#define MULTICALL_SPLIT_PLAY_T REL_H(266)
+#define MULTICALL_SPLIT_PLAY_B REL_H(291)
+#define MULTICALL_SPLIT_PLAY_L REL_W(313)
+#define MULTICALL_SPLIT_PLAY_R REL_W(338)
+
+#define MULTICALL_SPLIT_NAME_1_T REL_H(90)
+#define MULTICALL_SPLIT_NAME_1_B REL_H(126)
+#define MULTICALL_SPLIT_NAME_1_L REL_W(24)
+#define MULTICALL_SPLIT_NAME_1_R REL_W(266)
+
+#define MULTICALL_SPLIT_NAME_2_T REL_H(136)
+#define MULTICALL_SPLIT_NAME_2_B REL_H(160)
+#define MULTICALL_SPLIT_NAME_2_L REL_W(280)
+#define MULTICALL_SPLIT_NAME_2_R REL_W(450)
+
+/*
+#define MULTICALL_SPLIT_ACTIVE_ICON_T REL_H(343)
+#define MULTICALL_SPLIT_ACTIVE_ICON_B REL_H(371)
+#define MULTICALL_SPLIT_ACTIVE_ICON_L REL_W(97)
+#define MULTICALL_SPLIT_ACTIVE_ICON_R REL_W(118)
+*/
+
+#define MULTICALL_SPLIT_ACTIVE_TXT_T MULTICALL_SPLIT_ACTIVE_ICON_T
+#define MULTICALL_SPLIT_ACTIVE_TXT_B MULTICALL_SPLIT_ACTIVE_ICON_B
+#define MULTICALL_SPLIT_ACTIVE_TXT_L REL_W(120)
+#define MULTICALL_SPLIT_ACTIVE_TXT_R MULTICALL_SPLIT_CID_1_R
+
+#define MULTICALL_SPLIT_MORE_ICON_T REL_H(308)
+#define MULTICALL_SPLIT_MORE_ICON_B REL_H(332)
+#define MULTICALL_SPLIT_MORE_ICON_L REL_W(409)
+#define MULTICALL_SPLIT_MORE_ICON_R REL_W(433)
+
+/*
+#define MULTICALL_SPLIT_ON_HOLD_ICON_T REL_H(308)
+#define MULTICALL_SPLIT_ON_HOLD_ICON_B REL_H(332)
+#define MULTICALL_SPLIT_ON_HOLD_ICON_L REL_W(320)
+#define MULTICALL_SPLIT_ON_HOLD_ICON_R REL_W(341)
+*/
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_T REL_H(308)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_B REL_H(332)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_L REL_W(303)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_R REL_W(433)
+
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_T REL_H(308)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_B REL_H(332)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_L REL_W(303)
+#define MULTICALL_SPLIT_ON_HOLD_TXT_WITH_ICON_R REL_W(409)
+
+#define MULTICALL_SPLIT_TIMER_T REL_H(343)
+#define MULTICALL_SPLIT_TIMER_B REL_H(371)
+#define MULTICALL_SPLIT_TIMER_L REL_W(56)
+#define MULTICALL_SPLIT_TIMER_R REL_W(246)
+/*L[ACT] + R[HLD]*/
+
+/*L[HLD] + R[ACT]*/
+#define MULTICALL_SPLIT_SWAP_CID_1_T MULTICALL_SPLIT_CID_2_T
+#define MULTICALL_SPLIT_SWAP_CID_1_B MULTICALL_SPLIT_CID_2_B
+#define MULTICALL_SPLIT_SWAP_CID_1_L REL_W(49)
+#define MULTICALL_SPLIT_SWAP_CID_1_R REL_W(179)
+
+#define MULTICALL_SPLIT_SWAP_PLAY_T MULTICALL_SPLIT_PLAY_T
+#define MULTICALL_SPLIT_SWAP_PLAY_B MULTICALL_SPLIT_PLAY_B
+#define MULTICALL_SPLIT_SWAP_PLAY_L REL_W(57)
+#define MULTICALL_SPLIT_SWAP_PLAY_R REL_W(82)
+
+#define MULTICALL_SPLIT_SWAP_CID_2_T MULTICALL_SPLIT_CID_1_T
+#define MULTICALL_SPLIT_SWAP_CID_2_B MULTICALL_SPLIT_CID_1_B
+#define MULTICALL_SPLIT_SWAP_CID_2_L REL_W(244)
+#define MULTICALL_SPLIT_SWAP_CID_2_R REL_W(434)
+
+#define MULTICALL_SPLIT_SWAP_PAUSE_T MULTICALL_SPLIT_PAUSE_T
+#define MULTICALL_SPLIT_SWAP_PAUSE_B MULTICALL_SPLIT_PAUSE_B
+#define MULTICALL_SPLIT_SWAP_PAUSE_L REL_W(248)
+#define MULTICALL_SPLIT_SWAP_PAUSE_R REL_W(288)
+
+#define MULTICALL_SPLIT_SWAP_NAME_1_T MULTICALL_SPLIT_NAME_2_T
+#define MULTICALL_SPLIT_SWAP_NAME_1_B MULTICALL_SPLIT_NAME_2_B
+#define MULTICALL_SPLIT_SWAP_NAME_1_L MULTICALL_SPLIT_NAME_1_L
+#define MULTICALL_SPLIT_SWAP_NAME_1_R REL_W(194)
+
+#define MULTICALL_SPLIT_SWAP_NAME_2_T MULTICALL_SPLIT_NAME_1_T
+#define MULTICALL_SPLIT_SWAP_NAME_2_B MULTICALL_SPLIT_NAME_1_B
+#define MULTICALL_SPLIT_SWAP_NAME_2_L REL_W(208)
+#define MULTICALL_SPLIT_SWAP_NAME_2_R REL_W(450)
+
+/*
+#define MULTICALL_SPLIT_SWAP_ACTIVE_ICON_T MULTICALL_SPLIT_ACTIVE_ICON_T
+#define MULTICALL_SPLIT_SWAP_ACTIVE_ICON_B MULTICALL_SPLIT_ACTIVE_ICON_B
+#define MULTICALL_SPLIT_SWAP_ACTIVE_ICON_L REL_W(287)
+#define MULTICALL_SPLIT_SWAP_ACTIVE_ICON_R REL_W(308)
+*/
+
+#define MULTICALL_SPLIT_SWAP_ACTIVE_TXT_T MULTICALL_SPLIT_ACTIVE_ICON_T
+#define MULTICALL_SPLIT_SWAP_ACTIVE_TXT_B MULTICALL_SPLIT_ACTIVE_ICON_B
+#define MULTICALL_SPLIT_SWAP_ACTIVE_TXT_L REL_W(310)
+#define MULTICALL_SPLIT_SWAP_ACTIVE_TXT_R MULTICALL_SPLIT_SWAP_CID_2_R
+
+/*
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_ICON_T MULTICALL_SPLIT_ON_HOLD_ICON_T
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_ICON_B MULTICALL_SPLIT_ON_HOLD_ICON_B
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_ICON_L REL_W(67)
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_ICON_R REL_W(88)
+*/
+
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_T REL_H(308)
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_B REL_H(332)
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_L REL_W(50)
+#define MULTICALL_SPLIT_SWAP_ON_HOLD_TXT_R REL_W(180)
+
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_T REL_H(343)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_B REL_H(371)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_L REL_W(412)
+#define MULTICALL_SPLIT_SWAP_MORE_ICON_R REL_W(436)
+
+#define MULTICALL_SPLIT_SWAP_TIMER_T REL_H(343)
+#define MULTICALL_SPLIT_SWAP_TIMER_B REL_H(371)
+#define MULTICALL_SPLIT_SWAP_TIMER_L REL_W(246)
+#define MULTICALL_SPLIT_SWAP_TIMER_R REL_W(436)
+
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_T REL_H(343)
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_B REL_H(371)
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_L REL_W(246)
+#define MULTICALL_SPLIT_SWAP_TIMER_WITH_ICON_R REL_W(406)
+/*L[HLD] + R[ACT]*/
+/*portrait mode - END*/
+/* End of MULTICALL_SPLIT View  : Use Windows Layout with no indicator */
+
+/* MULTICALL_LIST View */
+/*
+#define MULTICALL_CID_T REL_TITLEBAR_H(8)
+#define MULTICALL_CID_B REL_TITLEBAR_H(428)
+#define MULTICALL_CID_L REL_TITLEBAR_W(15)
+#define MULTICALL_CID_R REL_TITLEBAR_W(468)
+
+#define MULTICALL_NAME_T REL_TITLEBAR_H(218)
+#define MULTICALL_NAME_B REL_TITLEBAR_H(268)
+
+#define MULTICALL_NUM_T REL_TITLEBAR_H(48)
+#define MULTICALL_NUM_B REL_TITLEBAR_H(88)
+*/
+
+#define MULTICALL_LIST_T REL_H(120)
+#define MULTICALL_LIST_B REL_H(475)
+#define MULTICALL_LIST_L REL_W(0)
+#define MULTICALL_LIST_R REL_W(MAIN_SCREEN_W)
+
+#define MULTICALL_LIST_HOLD_T REL_H(609)
+#define MULTICALL_LIST_HOLD_B REL_H(663)
+#define MULTICALL_LIST_HOLD_L REL_W(381)
+#define MULTICALL_LIST_HOLD_R REL_W(454)
+
+#define MULTICALL_LIST_TIMER_T REL_H(620)
+#define MULTICALL_LIST_TIMER_B REL_H(652)
+#define MULTICALL_LIST_TIMER_L REL_W(0)
+#define MULTICALL_LIST_TIMER_R REL_W(MAIN_SCREEN_W)
+
+#define MULTICALL_LIST_BIG_END_T REL_H(704)
+#define MULTICALL_LIST_BIG_END_B REL_H(774)
+#define MULTICALL_LIST_BIG_END_L REL_W(26)
+#define MULTICALL_LIST_BIG_END_R REL_W(454)
+/* End of MULTICALL_LIST View */
+
+/* Six button layout, Without Window Layout */
+#define SIX_BTN_1_L REL_W(26)
+#define SIX_BTN_1_R REL_W(160)
+#define SIX_BTN_2_L REL_W(173)
+#define SIX_BTN_2_R REL_W(307)
+#define SIX_BTN_3_L REL_W(320)
+#define SIX_BTN_3_R REL_W(454)
+
+#define SIX_BTN_1_T REL_H(494)
+#define SIX_BTN_1_B REL_H(582)
+#define SIX_BTN_2_T REL_H(595)
+#define SIX_BTN_2_B REL_H(683)
+
+#define SIX_BTN_BIG_END_L REL_W(26)
+#define SIX_BTN_BIG_END_R REL_W(454)
+#define SIX_BTN_BIG_END_T REL_H(712)
+#define SIX_BTN_BIG_END_B REL_H(782)
+
+#define SIX_BTN_INCOMING_1_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_1_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_1_T REL_H(438)
+#define SIX_BTN_INCOMING_1_B REL_H(508)
+
+#define SIX_BTN_INCOMING_2_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_2_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_2_T REL_H(524)
+#define SIX_BTN_INCOMING_2_B REL_H(594)
+
+#define SIX_BTN_INCOMING_3_L SIX_BTN_BIG_END_L
+#define SIX_BTN_INCOMING_3_R SIX_BTN_BIG_END_R
+#define SIX_BTN_INCOMING_3_T REL_H(610)
+#define SIX_BTN_INCOMING_3_B REL_H(680)
+/* Six Button Layout End */
+
+/* Six button layout, Window Layout : INDICATOR */
+/*
+#define INDI_SIX_BTN_1_L REL_INDI_W(26)
+#define INDI_SIX_BTN_1_R REL_INDI_W(160)
+#define INDI_SIX_BTN_2_L REL_INDI_W(173)
+#define INDI_SIX_BTN_2_R REL_INDI_W(307)
+#define INDI_SIX_BTN_3_L REL_INDI_W(320)
+#define INDI_SIX_BTN_3_R REL_INDI_W(454)
+
+#define INDI_SIX_BTN_1_T_BF REL_INDI_H(417)
+#define INDI_SIX_BTN_1_B_BF REL_INDI_H(505)
+#define INDI_SIX_BTN_2_T_BF REL_INDI_H(518)
+#define INDI_SIX_BTN_2_B_BF REL_INDI_H(606)
+
+#define INDI_SIX_BTN_1_T REL_INDI_H(467)
+#define INDI_SIX_BTN_1_B REL_INDI_H(555)
+#define INDI_SIX_BTN_2_T REL_INDI_H(568)
+#define INDI_SIX_BTN_2_B REL_INDI_H(656)
+
+#define INDI_SIX_BTN_BIG_END_L REL_INDI_W(26)
+#define INDI_SIX_BTN_BIG_END_R REL_INDI_W(454)
+
+#define INDI_SIX_BTN_BIG_END_T_BF REL_INDI_H(635)
+#define INDI_SIX_BTN_BIG_END_B_BF REL_INDI_H(705)
+
+#define INDI_SIX_BTN_BIG_END_T REL_INDI_H(685)
+#define INDI_SIX_BTN_BIG_END_B REL_INDI_H(755)
+
+#define INDI_SIX_BTN_INCOMING_1_L INDI_SIX_BTN_BIG_END_L
+#define INDI_SIX_BTN_INCOMING_1_R INDI_SIX_BTN_BIG_END_R
+#define INDI_SIX_BTN_INCOMING_1_T REL_INDI_H(411)
+#define INDI_SIX_BTN_INCOMING_1_B REL_INDI_H(481)
+
+#define INDI_SIX_BTN_INCOMING_2_L INDI_SIX_BTN_BIG_END_L
+#define INDI_SIX_BTN_INCOMING_2_R INDI_SIX_BTN_BIG_END_R
+#define INDI_SIX_BTN_INCOMING_2_T REL_INDI_H(497)
+#define INDI_SIX_BTN_INCOMING_2_B REL_INDI_H(567)
+
+#define INDI_SIX_BTN_INCOMING_3_L INDI_SIX_BTN_BIG_END_L
+#define INDI_SIX_BTN_INCOMING_3_R INDI_SIX_BTN_BIG_END_R
+#define INDI_SIX_BTN_INCOMING_3_T REL_INDI_H(583)
+#define INDI_SIX_BTN_INCOMING_3_B REL_INDI_H(653)
+*/
+/* Six Button Layout End */
+
+/* Six button layout, Window Layout : Titlebar */
+/*
+#define TITLEBAR_SIX_BTN_1_L REL_TITLEBAR_W(18)
+#define TITLEBAR_SIX_BTN_1_R REL_TITLEBAR_W(160)
+#define TITLEBAR_SIX_BTN_2_L REL_TITLEBAR_W(169)
+#define TITLEBAR_SIX_BTN_2_R REL_TITLEBAR_W(311)
+#define TITLEBAR_SIX_BTN_3_L REL_TITLEBAR_W(320)
+#define TITLEBAR_SIX_BTN_3_R REL_TITLEBAR_W(462)
+
+#define TITLEBAR_SIX_BTN_1_T REL_TITLEBAR_H(477)
+#define TITLEBAR_SIX_BTN_1_B REL_TITLEBAR_H(569)
+#define TITLEBAR_SIX_BTN_2_T REL_TITLEBAR_H(580)
+#define TITLEBAR_SIX_BTN_2_B REL_TITLEBAR_H(672)
+
+#define TITLEBAR_SIX_BTN_TXT_1_T REL_TITLEBAR_H(533)
+#define TITLEBAR_SIX_BTN_TXT_1_B REL_TITLEBAR_H(562)
+#define TITLEBAR_SIX_BTN_TXT_2_T REL_TITLEBAR_H(636)
+#define TITLEBAR_SIX_BTN_TXT_2_B REL_TITLEBAR_H(665)
+
+#define TITLEBAR_SIX_BTN_TXT_1_M1_T REL_TITLEBAR_H(580)
+#define TITLEBAR_SIX_BTN_TXT_1_M1_B REL_TITLEBAR_H(625)
+#define TITLEBAR_SIX_BTN_TXT_1_M2_T REL_TITLEBAR_H(627)
+#define TITLEBAR_SIX_BTN_TXT_1_M2_B REL_TITLEBAR_H(672)
+
+#define TITLEBAR_SIX_BTN_TXT_2_M1_T REL_TITLEBAR_H(477)
+#define TITLEBAR_SIX_BTN_TXT_2_M1_B REL_TITLEBAR_H(569)
+#define TITLEBAR_SIX_BTN_TXT_2_M2_T REL_TITLEBAR_H(580)
+#define TITLEBAR_SIX_BTN_TXT_2_M2_B REL_TITLEBAR_H(672)
+*/
+/* Six Button Layout End */
+
+/* Navigation bar layout */
+#define CALL_NAVIGATION_BAR_T  REL_H(40)
+#define CALL_NAVIGATION_BAR_B  REL_H(MAIN_SCREEN_H)
+#define CALL_NAVIGATION_BAR_L  REL_W(0)
+#define CALL_NAVIGATION_BAR_R  REL_W(MAIN_SCREEN_W)
+/* Navigation bar layout */
+
+/* End call layout */
+#define        ENDSINGLECALL_BACKGROUND_CID_L          DIALLING_BACKGROUND_CID_L
+#define        ENDSINGLECALL_BACKGROUND_CID_R          DIALLING_BACKGROUND_CID_R
+#define        ENDSINGLECALL_BACKGROUND_CID_T          DIALLING_BACKGROUND_CID_T
+#define        ENDSINGLECALL_BACKGROUND_CID_B          DIALLING_BACKGROUND_CID_B
+
+#define ENDSINGLECALL_CID_L                            REL_W(145)
+#define ENDSINGLECALL_CID_R                            REL_W(335)
+#define ENDSINGLECALL_CID_T                            REL_H(145)
+#define ENDSINGLECALL_CID_B                            REL_H(335)
+
+#define ENDSINGLECALL_NAME_L                           DIALLING_NAME_L
+#define ENDSINGLECALL_NAME_R                           DIALLING_NAME_R
+#define ENDSINGLECALL_NAME_T                           DIALLING_NAME_T
+#define ENDSINGLECALL_NAME_B                           DIALLING_NAME_B
+
+#define ENDSINGLECALL_NUMBER_L         DIALLING_NUMBER_L
+#define ENDSINGLECALL_NUMBER_R         DIALLING_NUMBER_R
+#define ENDSINGLECALL_NUMBER_T         DIALLING_NUMBER_T
+#define ENDSINGLECALL_NUMBER_B         DIALLING_NUMBER_B
+
+#define ENDSINGLECALL_TIMER_L                          REL_W(173)
+#define ENDSINGLECALL_TIMER_R                          REL_W(454)
+#define ENDSINGLECALL_TIMER_T                          REL_H(400)
+#define ENDSINGLECALL_TIMER_B                          REL_H(432)
+
+#define        ENDSINGLECALL_VIDEO_BTN_L                       REL_W(26)
+#define        ENDSINGLECALL_VIDEO_BTN_R                       REL_W(228)
+#define        ENDSINGLECALL_VIDEO_BTN_T                       REL_H(534)
+#define        ENDSINGLECALL_VIDEO_BTN_B                       REL_H(604)
+
+#define        ENDSINGLECALL_VIDEO2_BTN_L                      REL_W(26)
+#define        ENDSINGLECALL_VIDEO2_BTN_R                      REL_W(228)
+#define        ENDSINGLECALL_VIDEO2_BTN_T                      REL_H(620)
+#define        ENDSINGLECALL_VIDEO2_BTN_B                      REL_H(690)
+
+#define        ENDSINGLECALL_VOICE_BTN_L                       REL_W(252)
+#define        ENDSINGLECALL_VOICE_BTN_R                       REL_W(454)
+#define        ENDSINGLECALL_VOICE_BTN_T                       ENDSINGLECALL_VIDEO_BTN_T
+#define        ENDSINGLECALL_VOICE_BTN_B                       ENDSINGLECALL_VIDEO_BTN_B
+
+#define        ENDSINGLECALL_VOICE2_BTN_L                      REL_W(252)
+#define        ENDSINGLECALL_VOICE2_BTN_R                      REL_W(454)
+#define        ENDSINGLECALL_VOICE2_BTN_T                      ENDSINGLECALL_VIDEO2_BTN_T
+#define        ENDSINGLECALL_VOICE2_BTN_B                      ENDSINGLECALL_VIDEO2_BTN_B
+
+#define        ENDSINGLECALL_MSG_BTN_L                         REL_W(26)
+#define        ENDSINGLECALL_MSG_BTN_R                         REL_W(454)
+#define        ENDSINGLECALL_MSG_BTN_T                         REL_H(620)
+#define        ENDSINGLECALL_MSG_BTN_B                         REL_H(690)
+
+#define        ENDSINGLECALL_MSG2_BTN_L                        REL_W(26)
+#define        ENDSINGLECALL_MSG2_BTN_R                        REL_W(454)
+#define        ENDSINGLECALL_MSG2_BTN_T                        REL_H(706)
+#define        ENDSINGLECALL_MSG2_BTN_B                        REL_H(776)
+
+#define        ENDSINGLECALL_CONTACT_BTN_L                     REL_W(26)
+#define        ENDSINGLECALL_CONTACT_BTN_R                     REL_W(454)
+#define        ENDSINGLECALL_CONTACT_BTN_T                     REL_H(706)
+#define        ENDSINGLECALL_CONTACT_BTN_B                     REL_H(776)
+/* End call layout */
+ #endif                                /*__VCUI_VIEW_LAYOUT__*/
diff --git a/ui/vcui-view-multi-call-conf.c b/ui/vcui-view-multi-call-conf.c
new file mode 100755 (executable)
index 0000000..5b6c641
--- /dev/null
@@ -0,0 +1,241 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-common.h"
+#include "vcui-view-elements.h"
+#include "vcui-view-multi-call-conf.h"
+
+static int __vcui_view_multi_call_conf_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_multi_call_conf_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_multi_call_conf_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_conf_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_conf_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCALL_MULTICALL_CONF_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_multi_call_conf_oncreate,
+       .onUpdate = __vcui_view_multi_call_conf_onupdate,
+       .onHide = __vcui_view_multi_call_conf_onhide,
+       .onShow = __vcui_view_multi_call_conf_onshow,
+       .onDestroy = __vcui_view_multi_call_conf_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_multi_call_conf_new(vcui_app_call_data_t *ad)
+{
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(vcui_view_multi_call_conf_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!! ");
+       }
+
+       return &s_view;
+}
+
+static void __vcui_view_multi_call_conf_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+       char buf[DEF_BUF_LEN] = { 0, };
+       call_data_t *call_data = NULL;
+
+       priv->call_status = _vcui_doc_get_show_callstatus();
+       call_data = _vcui_doc_get_last_status(priv->call_status);
+       if (call_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+       priv->total_members = _vcui_doc_get_count_hold()+_vcui_doc_get_count_unhold();
+
+               /* call image */
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_default_image(priv->contents, vd->app_data->win_main, CONF_ICON);
+               if (priv->call_status == CALL_HOLD) {
+                       double scale_factor = 0.0;
+                       scale_factor = elm_config_scale_get();
+                       CALL_UI_DEBUG("scale_factor %f", scale_factor);
+
+                       if (scale_factor == 1.0) {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_HD", "CID_HD");
+                       } else {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_WVGA", "CID_WVGA");
+                       }
+               } else {
+                       edje_object_signal_emit(_EDJ(priv->contents), "HIDE_DIM", "CID");
+               }
+               evas_object_smart_callback_add(priv->ic, "clicked", _vcui_conf_img_cb, vd);
+
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+               snprintf(buf, DEF_BUF_LEN, "%d %s", priv->total_members, _("IDS_CALL_BODY_PEOPLE"));
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", buf);             /* in case of multicallconf, it is num of people */
+
+               _vcui_view_common_set_each_time(call_data->start_time);
+
+               _vcui_create_top_left_button(vd);
+               _vcui_create_top_right_button(vd);
+               _vcui_create_bottom_left_button(vd);
+               _vcui_create_bottom_middle_button(vd);
+               if ((_vcui_is_phonelock_status() == EINA_TRUE)&&(_vcui_is_idle_lock() == EINA_TRUE)) {
+                       _vcui_create_top_middle_button_disabled(vd);
+                       _vcui_create_bottom_right_button_disabled(vd);
+               } else {
+                       _vcui_create_top_middle_button(vd);
+                       _vcui_create_bottom_right_button(vd);
+               }
+               _vcui_create_button_bigend(vd);
+
+               ad->beffect_needed = EINA_FALSE;
+
+       evas_object_show(eo);
+}
+
+static Evas_Object *__vcui_view_multi_call_conf_create_contents(void *data, char *group)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+
+       Evas_Object *eo;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, group);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_multi_call_conf_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_multi_call_conf_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       voice_call_view_data_t *vd = view_data;
+       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *)vd->priv;
+
+       if (!vd->layout) {
+
+               /* Create Main Layout */
+               vd->layout = __vcui_view_multi_call_conf_create_layout_main(vd->app_data->win_main);
+               if (vd->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+               /* Create Contents */
+               priv->contents = __vcui_view_multi_call_conf_create_contents(vd, GRP_MULTICALL_CONF);
+               elm_object_part_content_set(vd->layout, "elm.swallow.content", priv->contents);
+
+               evas_object_name_set(priv->contents, "MULTIVIEWCONF");
+               CALL_UI_DEBUG("[========== MULTIVIEWCONF: priv->contents Addr : [%p] ==========]", priv->contents);
+       } else {
+               CALL_UI_DEBUG("[UI]ad->layout_multicallconf==NULL case ");
+               evas_object_show(vd->layout);
+       }
+
+       __vcui_view_multi_call_conf_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_conf_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("multicall-conf view update");
+
+       __vcui_view_multi_call_conf_onshow(view_data);
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_conf_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-conf view hide");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_conf_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-conf view show");
+
+       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *)view_data->priv;
+
+       __vcui_view_multi_call_conf_draw_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_conf_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-conf view destroy");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCALL_MULTICALL_CONF_VIEW];
+       vcui_view_multi_call_conf_priv_t *priv = (vcui_view_multi_call_conf_priv_t *)vd->priv;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCALL_MULTICALL_CONF_VIEW] = NULL;
+
+       _vcui_cache_flush();
+       CALL_UI_DEBUG("complete destroy multi view conf");
+
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-multi-call-conf.h b/ui/vcui-view-multi-call-conf.h
new file mode 100755 (executable)
index 0000000..65e05f1
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VCUI_VIEW_MULTI_CALL_CONF_
+#define _VCUI_VIEW_MULTI_CALL_CONF_
+
+typedef struct {
+       Evas_Object *contents;
+       Evas_Object *ic;
+       Evas_Object *record_btn;
+       vcui_app_call_status_t call_status;
+       int     total_members;
+} vcui_view_multi_call_conf_priv_t;
+
+voice_call_view_data_t *_vcui_view_multi_call_conf_new(vcui_app_call_data_t *ad);
+
+#endif /*_VCUI_VIEW_MULTI_CALL_CONF_*/
+
diff --git a/ui/vcui-view-multi-call-list.c b/ui/vcui-view-multi-call-list.c
new file mode 100755 (executable)
index 0000000..f0a5485
--- /dev/null
@@ -0,0 +1,412 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-elements.h"
+#include "vcui-view-multi-call-list.h"
+
+static Elm_Genlist_Item_Class *itc_call;
+
+static int __vcui_view_multi_call_list_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_multi_call_list_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_multi_call_list_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_list_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_list_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCALL_MULTICALL_LIST_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_multi_call_list_oncreate,
+       .onUpdate = __vcui_view_multi_call_list_onupdate,
+       .onHide = __vcui_view_multi_call_list_onhide,
+       .onShow = __vcui_view_multi_call_list_onshow,
+       .onDestroy = __vcui_view_multi_call_list_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_multi_call_list_new(vcui_app_call_data_t *ad)
+{
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(vcui_view_multi_call_list_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR ");
+       }
+
+       return &s_view;
+}
+
+static void __vcui_view_multi_call_list_small_end_call_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       call_data_t *call_data = data;
+       _vcui_engine_end_call_by_handle(call_data->call_handle);
+       call_data->bno_end_show = EINA_TRUE;
+
+       _vcui_view_popup_load_endcall_time(call_data);
+}
+
+static void __vcui_view_multi_call_list_split_call_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       call_data_t *call_data = data;
+       _vcui_engine_split_call(call_data->call_handle);
+}
+
+static void __vcui_view_multi_call_list_gl_sel_call(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+
+       Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+       elm_object_item_data_get(item);
+       elm_genlist_item_selected_set(item, 0);
+}
+
+static void __vcui_view_multi_call_list_gl_del_call(void *data, Evas_Object *obj)
+{
+
+       return;
+}
+
+static Eina_Bool __vcui_view_multi_call_list_gl_state_get_call(void *data, Evas_Object *obj, const char *part)
+{
+
+       return EINA_FALSE;
+}
+
+static Evas_Object *__vcui_view_multi_call_list_gl_content_get_call(void *data, Evas_Object *obj, const char *part)
+{
+       call_data_t *call_data = (call_data_t *)data;
+
+       Evas_Object *icon = NULL;
+       Evas_Object *btn = NULL;
+
+       if (strcmp(part, "elm.swallow.end") == 0) {
+               btn = elm_button_add(obj);
+               elm_object_style_set(btn, "style_call_smallbtn_red");
+               icon = elm_icon_add(obj);
+               elm_icon_file_set(icon, CONF_CALL_END_ICON, NULL);
+               evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+               elm_icon_resizable_set(icon, 1, 1);
+               elm_object_part_content_set(btn, "icon", icon);
+
+               evas_object_smart_callback_add(btn, "clicked", __vcui_view_multi_call_list_small_end_call_cb, call_data);
+               evas_object_propagate_events_set(btn, EINA_FALSE);
+
+               return btn;
+       } else if (strcmp(part, "elm.swallow.private") == 0) {
+               if (_vcui_doc_get_count_hold() > 0) {
+                       return NULL;
+               }
+               btn = elm_button_add(obj);
+               icon = elm_icon_add(obj);
+               elm_icon_file_set(icon, PRIVATE_ICON, NULL);
+               elm_object_style_set(btn, "icon_only/style_call_icon_only_private");
+
+               elm_icon_resizable_set(icon, 1, 1);
+               elm_object_part_content_set(btn, "icon", icon);
+
+               evas_object_smart_callback_add(btn, "clicked", __vcui_view_multi_call_list_split_call_cb, call_data);
+               evas_object_propagate_events_set(btn, EINA_FALSE);
+
+               return btn;
+       }
+
+       return NULL;
+}
+
+static char *__vcui_view_multi_call_list_gl_text_get_call(void *data, Evas_Object *obj, const char *part)
+{
+       char buf[DEF_BUF_LEN] = { 0, };
+       call_data_t *call_data = (call_data_t *)data;
+
+       if (strcmp(part, "elm.text") == 0) {
+               if (strlen((char *)call_data->call_display) == 0)
+                       snprintf(buf, sizeof(buf), "%s", call_data->call_num);
+               else
+                       snprintf(buf, sizeof(buf), "%s", call_data->call_display);
+       }
+
+       return strdup(buf);
+}
+
+static void __vcui_view_multi_call_list_genlist_init(void *data)
+{
+       itc_call->item_style = "multicall_list";
+       itc_call->func.text_get = __vcui_view_multi_call_list_gl_text_get_call;
+       itc_call->func.content_get = __vcui_view_multi_call_list_gl_content_get_call;
+       itc_call->func.state_get = __vcui_view_multi_call_list_gl_state_get_call;
+       itc_call->func.del = __vcui_view_multi_call_list_gl_del_call;
+}
+
+static void __vcui_view_multi_call_list_genlist_add(void *data)
+{
+       voice_call_view_data_t *vd = data;
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+       Evas_Object *genlist = NULL;
+
+       genlist = elm_genlist_add(priv->contents);
+       evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(genlist, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       elm_object_part_content_set(priv->contents, "swl_calllist", genlist);
+       priv->multibox_gl = genlist;
+}
+
+void __vcui_view_multi_call_list_genlist_item_append(void *data)
+{
+       CALL_UI_DEBUG("..");
+       voice_call_view_data_t *vd = data;
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+       Eina_List *list = NULL;
+
+       if (priv->multibox_gl) {
+               elm_genlist_clear(priv->multibox_gl);
+       }
+
+       if (priv->call_status == CALL_UNHOLD) {
+               list = _vcui_doc_get_unhold_caller();
+       } else {
+               list = _vcui_doc_get_hold_caller();
+       }
+       if (list == NULL) {
+               CALL_UI_DEBUG("error");
+               return;
+       }
+
+       Eina_List *l;
+       call_data_t *call_data;
+       EINA_LIST_FOREACH(list, l, call_data) {
+               elm_genlist_item_append(priv->multibox_gl, itc_call, (void *)call_data, NULL, ELM_GENLIST_ITEM_NONE, __vcui_view_multi_call_list_gl_sel_call, data);
+       }
+       eina_list_free(list);
+}
+
+static void __vcui_view_multi_call_list_back_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_view_auto_change();
+}
+
+static void __vcui_view_multi_call_list_draw_screen(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       vcui_app_call_data_t *ad = vd->app_data;
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+       call_data_t *call_data;
+
+       priv->total_members = _vcui_doc_get_count_hold()+_vcui_doc_get_count_unhold();
+       priv->call_status = _vcui_doc_get_show_callstatus();
+       call_data = _vcui_doc_get_last_status(priv->call_status);
+       if (call_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+       _vcui_view_common_set_each_time(call_data->start_time);
+
+               _vcui_show_wallpaper_image(priv->contents);
+
+               __vcui_view_multi_call_list_genlist_item_append(vd);
+
+               _vcui_create_conf_list_button_hold(vd);
+               _vcui_create_button_bigend(vd);
+       evas_object_show(priv->contents);
+}
+
+static Evas_Object *__vcui_view_multi_call_list_create_contents(void *data, char *group)
+{
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       Evas_Object *eo;
+
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->layout, EDJ_NAME, group);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static void __vcui_view_multi_call_list_create_navigationframe_layout(voice_call_view_data_t *vd)
+{
+       Evas_Object *navi_ly;
+       Evas_Object *btn1;
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+
+       navi_ly = _vcui_load_edj(priv->navi_frame, EDJ_NAME, "navigation_view");
+       if (navi_ly == NULL)
+               return;
+       CALL_UI_DEBUG("navi_layout created...");
+
+       /* Load default button */
+       btn1 = elm_button_add(priv->navi_frame);
+       elm_object_style_set(btn1, "vcui_naviframe_new_backbutton/default");
+       evas_object_smart_callback_add(btn1, "clicked", __vcui_view_multi_call_list_back_cb, vd);
+
+       elm_naviframe_item_push(priv->navi_frame, _("IDS_CALL_OPT_CONFERENCE_CALL"), btn1, NULL, navi_ly, "vcui_naviframe_new_item_1line");
+}
+
+static Evas_Object *__vcui_view_multi_call_list_create_navigation_layout(Evas_Object *parent)
+{
+       Evas_Object *navi_frame;
+
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       navi_frame = elm_naviframe_add(parent);
+       elm_object_style_set(navi_frame, "vcui_naviframe_new/default");
+
+       return navi_frame;
+}
+
+static Evas_Object *__vcui_view_multi_call_list_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_multi_call_list_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("multicall-list view create");
+
+       voice_call_view_data_t *vd = view_data;
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+
+       itc_call = elm_genlist_item_class_new();
+
+       if (!vd->layout) {
+               vd->layout = __vcui_view_multi_call_list_create_layout_main(vd->app_data->win_main);
+               if (vd->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+               priv->contents = __vcui_view_multi_call_list_create_contents(vd, GRP_MULTICALL);
+               elm_object_part_content_set(vd->layout, "elm.swallow.content", priv->contents);
+
+               priv->navi_frame = __vcui_view_multi_call_list_create_navigation_layout(vd->layout);
+               elm_object_part_content_set(priv->contents, "navigation_bar", priv->navi_frame);
+
+               __vcui_view_multi_call_list_create_navigationframe_layout(vd);
+
+               evas_object_name_set(priv->contents, "MULTIVIEWLIST");
+               CALL_UI_DEBUG("[========== MULTIVIEWLIST: priv->contents Addr : [%p] ==========]", priv->contents);
+
+               __vcui_view_multi_call_list_genlist_add(vd);
+               __vcui_view_multi_call_list_genlist_init(vd);
+       } else {
+               CALL_UI_DEBUG("[UI]ad->layout_multicall != NULL case ");
+               evas_object_show(vd->layout);
+       }
+
+       __vcui_view_multi_call_list_onshow(view_data);
+
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_list_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("multicall-list view update");
+
+       __vcui_view_multi_call_list_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_list_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-list view hide");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_list_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-list view show");
+
+       __vcui_view_multi_call_list_draw_screen(view_data);
+
+       evas_object_hide(view_data->layout);
+       evas_object_show(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_list_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multicall-list view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCALL_MULTICALL_LIST_VIEW];
+       vcui_view_multi_call_list_priv_t *priv = (vcui_view_multi_call_list_priv_t *)vd->priv;
+
+       if (itc_call)
+               elm_genlist_item_class_free(itc_call);
+
+       if (priv != NULL) {
+               if (priv->multibox_gl != NULL) {
+                       elm_genlist_clear(priv->multibox_gl);
+                       evas_object_del(priv->multibox_gl);
+                       priv->multibox_gl = NULL;
+               }
+
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCALL_MULTICALL_LIST_VIEW] = NULL;
+
+       _vcui_cache_flush();
+       CALL_UI_DEBUG("complete destroy multi view list");
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-multi-call-list.h b/ui/vcui-view-multi-call-list.h
new file mode 100755 (executable)
index 0000000..1561a93
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VCUI_VIEW_MULTI_CALL_LIST_
+#define _VCUI_VIEW_MULTI_CALL_LIST_
+
+typedef struct {
+       Evas_Object *navi_frame;
+       Evas_Object *contents;
+
+       Evas_Object *ic;
+
+       Evas_Object *record_btn;
+
+       vcui_app_call_status_t call_status;
+
+       Evas_Object *multibox_gl;
+
+       int     total_members;
+} vcui_view_multi_call_list_priv_t;
+
+#endif
+
+voice_call_view_data_t *_vcui_view_multi_call_list_new(vcui_app_call_data_t *ad);
diff --git a/ui/vcui-view-multi-call-split.c b/ui/vcui-view-multi-call-split.c
new file mode 100755 (executable)
index 0000000..653fa7d
--- /dev/null
@@ -0,0 +1,402 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-elements.h"
+#include "vcui-view-multi-call-split.h"
+
+static int __vcui_view_multi_call_split_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vcui_view_multi_call_split_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vcui_view_multi_call_split_onhide(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_split_onshow(voice_call_view_data_t *view_data);
+static int __vcui_view_multi_call_split_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCALL_MULTICALL_SPLIT_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vcui_view_multi_call_split_oncreate,
+       .onUpdate = __vcui_view_multi_call_split_onupdate,
+       .onHide = __vcui_view_multi_call_split_onhide,
+       .onShow = __vcui_view_multi_call_split_onshow,
+       .onDestroy = __vcui_view_multi_call_split_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vcui_view_multi_call_split_new(vcui_app_call_data_t *ad)
+{
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(incall_multi_view_split_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!!");
+       }
+
+       return &s_view;
+}
+
+static void __vcui_more_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       _vcui_view_change(VIEW_INCALL_MULTICALL_LIST_VIEW, 0, 0, 0);
+}
+
+static void __vcui_view_multi_call_split_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *)vd->priv;
+
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       Evas_Object *sw1;
+       Evas_Object *sw2;
+       Evas_Object *sw3;
+       Evas_Object *sw4;
+       Evas_Object *play_ic;
+       Evas_Object *pause_ic;
+       Evas_Object *more_ic;
+
+       priv->now_data_hold = _vcui_doc_get_last_status(CALL_HOLD);
+       priv->now_data_unhold = _vcui_doc_get_last_status(CALL_UNHOLD);
+
+       if ((priv->now_data_hold == NULL) || (priv->now_data_unhold == NULL)) {
+               CALL_UI_DEBUG("call data is null");
+               return;
+       }
+
+       sw1 = edje_object_part_swallow_get(_EDJ(eo), "swl_cid_1");
+       if (sw1) {
+               edje_object_part_unswallow(_EDJ(eo), sw1);
+               evas_object_del(sw1);
+       }
+       sw2 = edje_object_part_swallow_get(_EDJ(eo), "swl_cid_2");
+       if (sw2) {
+               edje_object_part_unswallow(_EDJ(eo), sw2);
+               evas_object_del(sw2);
+       }
+       sw3 = edje_object_part_swallow_get(_EDJ(eo), "txt_call_name_1");
+       if (sw3) {
+               edje_object_part_unswallow(_EDJ(eo), sw3);
+               evas_object_del(sw3);
+       }
+       sw4 = edje_object_part_swallow_get(_EDJ(eo), "txt_call_name_2");
+       if (sw4) {
+               edje_object_part_unswallow(_EDJ(eo), sw4);
+               evas_object_del(sw4);
+       }
+       play_ic = edje_object_part_swallow_get(_EDJ(eo), "swl_play");
+       if (play_ic) {
+               edje_object_part_unswallow(_EDJ(eo), play_ic);
+               evas_object_del(play_ic);
+       }
+       pause_ic = edje_object_part_swallow_get(_EDJ(eo), "swl_pause");
+       if (pause_ic) {
+               edje_object_part_unswallow(_EDJ(eo), pause_ic);
+               evas_object_del(pause_ic);
+       }
+       more_ic = edje_object_part_swallow_get(_EDJ(eo), "swl_more");
+       if (more_ic) {
+               edje_object_part_unswallow(_EDJ(eo), more_ic);
+               evas_object_del(more_ic);
+       }
+
+       priv->ic_incall = elm_icon_add(vd->app_data->win_main);
+       elm_object_part_content_set(eo, "swl_cid_1", priv->ic_incall);
+
+       priv->ic_onhold = elm_icon_add(vd->app_data->win_main);
+       elm_object_part_content_set(eo, "swl_cid_2", priv->ic_onhold);
+
+       play_ic = elm_icon_add(vd->app_data->win_main);
+       elm_object_part_content_set(eo, "swl_play", play_ic);
+       pause_ic = elm_icon_add(vd->app_data->win_main);
+       elm_object_part_content_set(eo, "swl_pause", pause_ic);
+       more_ic = elm_icon_add(vd->app_data->win_main);
+       elm_object_part_content_set(eo, "swl_more", more_ic);
+
+       CALL_UI_DEBUG("priv->now_data_unhold->call_num:[%s]", priv->now_data_unhold->call_num);
+       CALL_UI_DEBUG("priv->now_data_hold->call_num:[%s]", priv->now_data_hold->call_num);
+       CALL_UI_DEBUG("priv->now_data_unhold->call_file_path:[%s]", priv->now_data_unhold->call_file_path);
+       CALL_UI_DEBUG("priv->now_data_hold->call_file_path:[%s]", priv->now_data_hold->call_file_path);
+
+       _vcui_show_wallpaper_image(priv->contents);
+       if (_vcui_doc_get_count_unhold() == 1 && _vcui_doc_get_count_hold() == 1) {
+               /* in call */
+               elm_icon_file_set(priv->ic_incall, (char *)priv->now_data_unhold->call_file_path, NULL);
+
+               if (strlen((char *)priv->now_data_unhold->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_1", (char *)priv->now_data_unhold->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_1", (char *)priv->now_data_unhold->call_display);
+               }
+
+               /* on hold */
+               elm_icon_file_set(priv->ic_onhold, (char *)priv->now_data_hold->call_file_path, NULL);
+
+               if (strlen((char *)priv->now_data_hold->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_2", (char *)priv->now_data_hold->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_2", (char *)priv->now_data_hold->call_display);
+               }
+
+               /* on hold callback */
+               if (priv->ic_onhold) {
+                       evas_object_smart_callback_del(priv->ic_onhold, "clicked", _vcui_swap_btn_cb);
+               }
+               evas_object_smart_callback_add(priv->ic_onhold, "clicked", _vcui_swap_btn_cb, vd);
+       } else if (_vcui_doc_get_count_unhold() == 1 && _vcui_doc_get_count_hold() > 1) {
+               /* in call */
+               elm_icon_file_set(priv->ic_incall, (char *)priv->now_data_unhold->call_file_path, NULL);
+
+               if (strlen((char *)priv->now_data_unhold->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_1", (char *)priv->now_data_unhold->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_1", (char *)priv->now_data_unhold->call_display);
+               }
+
+               /* on hold */
+               elm_icon_file_set(priv->ic_onhold, CONF_ICON, NULL);
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name_2", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+
+               /* on hold callback */
+               if (priv->ic_onhold) {
+                       evas_object_smart_callback_del(priv->ic_onhold, "clicked", _vcui_swap_btn_cb);
+               }
+               evas_object_smart_callback_add(priv->ic_onhold, "clicked", _vcui_swap_btn_cb, vd);
+       } else if (_vcui_doc_get_count_unhold() > 1 && _vcui_doc_get_count_hold() == 1) {
+               /* in call */
+               elm_icon_file_set(priv->ic_incall, CONF_ICON, NULL);
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name_1", _("IDS_CALL_OPT_CONFERENCE_CALL"));
+
+               /* on hold */
+               elm_icon_file_set(priv->ic_onhold, (char *)priv->now_data_hold->call_file_path, NULL);
+
+               if (strlen((char *)priv->now_data_hold->call_display) == 0) {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_2", (char *)priv->now_data_hold->call_num);
+               } else {
+                       edje_object_part_text_set(_EDJ(eo), "txt_call_name_2", (char *)priv->now_data_hold->call_display);
+               }
+
+               /* on hold callback */
+               if (priv->ic_onhold) {
+                       evas_object_smart_callback_del(priv->ic_onhold, "clicked", _vcui_swap_btn_cb);
+               }
+               evas_object_smart_callback_add(priv->ic_onhold, "clicked", _vcui_swap_btn_cb, vd);
+
+               /* enter conf list view */
+               if (priv->ic_incall) {
+                       evas_object_smart_callback_del(priv->ic_incall, "clicked", _vcui_conf_img_cb);
+               }
+               evas_object_smart_callback_add(priv->ic_incall, "clicked", _vcui_conf_img_cb, vd);
+       } else {
+               CALL_UI_DEBUG("[=========== ERROR : Invalid Status!!! ============]");
+               return;
+       }
+
+       elm_icon_file_set(play_ic, PLAY_ICON, NULL);
+       elm_icon_file_set(pause_ic, PAUSE_ICON, NULL);
+
+       elm_icon_file_set(more_ic, MORE_ICON, NULL);
+       evas_object_smart_callback_add(more_ic, "clicked", __vcui_more_btn_cb, vd);
+
+       _vcui_view_common_set_each_time(priv->now_data_unhold->start_time);
+
+       edje_object_part_text_set(_EDJ(eo), "txt_onhold", _("IDS_CALL_BODY_ON_HOLD_ABB"));
+
+       if ((_vcui_doc_get_count_unhold() == 5 && _vcui_doc_get_count_hold() == 1) || (_vcui_doc_get_count_unhold() == 1 && _vcui_doc_get_count_hold() == 5)) {
+               _vcui_create_top_right_button_disabled(vd);
+       } else {
+               _vcui_create_top_right_button(vd);
+       }
+
+       _vcui_create_top_left_button(vd);
+       _vcui_create_bottom_left_button(vd);
+       _vcui_create_bottom_middle_button(vd);
+       if ((_vcui_is_phonelock_status() == EINA_TRUE)&&(_vcui_is_idle_lock() == EINA_TRUE)) {
+               _vcui_create_top_middle_button_disabled(vd);
+               _vcui_create_bottom_right_button_disabled(vd);
+       } else {
+               _vcui_create_top_middle_button(vd);
+               _vcui_create_bottom_right_button(vd);
+       }
+       _vcui_create_button_bigend(vd);
+
+       ad->beffect_needed = EINA_FALSE;
+
+       evas_object_show(eo);
+}
+
+static Evas_Object *__vcui_view_multi_call_split_create_contents(void *data, char *group)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+
+       Evas_Object *eo = NULL;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, group);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vcui_view_multi_call_split_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vcui_view_multi_call_split_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("multi-split view create");
+
+       voice_call_view_data_t *vd = view_data;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       if (!vd->layout) {
+               vd->layout = __vcui_view_multi_call_split_create_layout_main(vd->app_data->win_main);
+               if (vd->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+       } else {
+               CALL_UI_DEBUG("[UI]ad->layout_incall==NULL case ");
+               evas_object_show(vd->layout);
+       }
+
+       __vcui_view_multi_call_split_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_split_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("multi-split view update");
+
+       __vcui_view_multi_call_split_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_split_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multi-split view hide");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_split_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multi-split view show");
+
+       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *)view_data->priv;
+       vcui_app_call_data_t *ad = view_data->app_data;
+
+       if (priv->contents) {
+               evas_object_del(priv->contents);
+               priv->contents = NULL;
+       }
+
+       CALL_UI_DEBUG("bswapped(%d)",ad->bswapped);
+       if (ad->bswapped == 1) {
+               priv->contents = __vcui_view_multi_call_split_create_contents(view_data, GRP_MULTICALL_SPLIT2);
+       } else {
+               priv->contents = __vcui_view_multi_call_split_create_contents(view_data, GRP_MULTICALL_SPLIT);
+       }
+       elm_object_part_content_set(view_data->layout, "elm.swallow.content", priv->contents);
+       evas_object_name_set(priv->contents, "MULTIVIEWSPLIT");
+       CALL_UI_DEBUG("[========== MULTIVIEWSPLIT: priv->contents Addr : [%p] ==========]", priv->contents);
+
+       __vcui_view_multi_call_split_draw_screen(priv->contents, view_data);
+
+       evas_object_hide(view_data->layout);
+
+       double scale_factor = 0.0;
+       if (ad->bswapped == 1) {
+               edje_object_signal_emit(_EDJ(priv->contents), "set-portrait", "incall-split2-view");
+               if (_vcui_doc_get_count_unhold() > 1 && _vcui_doc_get_count_hold() == 1) {
+                       CALL_UI_DEBUG("show-more-portrait mode signal emit");
+                       edje_object_signal_emit(_EDJ(priv->contents), "show-more-portrait", "incall-split2-conf-call");
+               }
+       }
+       else {
+               edje_object_signal_emit(_EDJ(priv->contents), "set-portrait", "incall-split1-view");
+               if (_vcui_doc_get_count_hold() > 1 && _vcui_doc_get_count_unhold() == 1) {
+                       CALL_UI_DEBUG("show-more-portrait mode signal emit");
+                       edje_object_signal_emit(_EDJ(priv->contents), "show-more-portrait", "incall-split1-conf-call");
+               }
+       }
+
+       scale_factor = elm_config_scale_get();
+       CALL_UI_DEBUG("scale_factor %f", scale_factor);
+       if (scale_factor == 1.0) {
+               edje_object_signal_emit(_EDJ(priv->contents), "show-swl-dim-hd", "cid-hd");
+       } else {
+               edje_object_signal_emit(_EDJ(priv->contents), "show-swl-dim-wvga", "cid-wvga");
+       }
+       evas_object_show(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vcui_view_multi_call_split_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("multi-split view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCALL_MULTICALL_SPLIT_VIEW];
+
+       incall_multi_view_split_priv_t *priv = (incall_multi_view_split_priv_t *)vd->priv;
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+       ad->view_st[VIEW_INCALL_MULTICALL_SPLIT_VIEW] = NULL;
+
+       _vcui_cache_flush();
+
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-multi-call-split.h b/ui/vcui-view-multi-call-split.h
new file mode 100755 (executable)
index 0000000..39b2750
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_UI_INCALL_MULTI_VIEW_SPLIT_
+#define _VOICE_CALL_UI_INCALL_MULTI_VIEW_SPLIT_
+
+typedef struct {
+       Evas_Object *contents;
+
+       Evas_Object *ic_incall;
+       Evas_Object *ic_onhold;
+
+       Evas_Object *record_btn;
+
+       call_data_t *now_data_hold;
+       call_data_t *now_data_unhold;
+
+} incall_multi_view_split_priv_t;
+
+voice_call_view_data_t *_vcui_view_multi_call_split_new(vcui_app_call_data_t *ad);
+#endif
+
diff --git a/ui/vcui-view-popup.c b/ui/vcui-view-popup.c
new file mode 100755 (executable)
index 0000000..fe663b9
--- /dev/null
@@ -0,0 +1,899 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-engine-interface.h"
+#include "vcui-view-popup.h"
+#include "vcui-view-multi-call-split.h"
+#include "vcui-view-multi-call-conf.h"
+#include "vcui-view-multi-call-list.h"
+#include "vcui-view-single-call.h"
+#include "vcui-view-common.h"
+ #define VCONFKEY_BT_HEADSET_NAME "memory/bluetooth/sco_headset_name"
+
+#define TICKER_TIMEOUT 2
+static void __vcui_view_popup_response_cb_vol_voice(void *data, Evas_Object *obj, void *event_info);
+
+static void __vcui_view_popup_win_del(void *data)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       CALL_UI_DEBUG("delete the popup main_win - if created...");
+       if (ad->popup_mw != NULL) {
+               CALL_UI_DEBUG("main_win is NOT null");
+               evas_object_del(ad->popup_mw);
+               ad->popup_mw = NULL;
+       }
+}
+
+void _vcui_view_popup_unload(Evas_Object *popup_eo)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (popup_eo) {
+               evas_object_hide(popup_eo);
+               evas_object_del(popup_eo);
+               popup_eo = NULL;
+       }
+
+       __vcui_view_popup_win_del(ad);
+       _vcui_cache_flush();
+
+       return;
+}
+
+static void __vcui_view_popup_response_cb_terminate(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->popup_eo) {
+               CALL_UI_DEBUG("popup eo delete.");
+               evas_object_hide(ad->popup_eo);
+               evas_object_del(ad->popup_eo);
+               ad->popup_eo = NULL;
+       }
+       _vcui_cache_flush();
+       __vcui_view_popup_win_del(ad);
+
+       _vcui_view_common_call_terminate_or_view_change();
+
+       return;
+}
+
+static void __vcui_view_popup_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->popup_eo) {
+               CALL_UI_DEBUG("popup eo delete.");
+               evas_object_hide(ad->popup_eo);
+               evas_object_del(ad->popup_eo);
+               ad->popup_eo = NULL;
+       }
+       _vcui_cache_flush();
+       __vcui_view_popup_win_del(ad);
+       return;
+}
+
+/* create a separate main window for the popups with a high priority   */
+/* this window will always be displayed on top, even on a lock screen  */
+static Evas_Object *__vcui_view_popup_create_win(vcui_app_call_data_t *ad, const char *name)
+{
+       CALL_UI_DEBUG("..");
+       Ecore_X_Window xwin;
+       Evas_Object *eo;
+       int w, h;
+
+       CALL_UI_DEBUG("create the popup main_win...");
+       eo = elm_win_add(NULL, name, ELM_WIN_DIALOG_BASIC);
+       if (eo) {
+               elm_win_alpha_set(eo, EINA_TRUE);
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               elm_win_raise(eo);
+               ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
+               evas_object_resize(eo, w, h);
+
+               /* Set the popup window type as LEVEL-HIGH so it is always displayed on top */
+               CALL_UI_DEBUG("...Set HIGH priority...");
+               xwin = elm_win_xwindow_get(eo);
+               ecore_x_netwm_window_type_set(xwin, ECORE_X_WINDOW_TYPE_NOTIFICATION);
+               utilx_set_system_notification_level(ecore_x_display_get(), xwin, UTILX_NOTIFICATION_LEVEL_HIGH);
+
+               evas_object_show(eo);
+       }
+
+       return eo;
+}
+
+void _vcui_view_popup_load(char *popup_msg, double time_out, int bterminate)
+{
+       CALL_UI_DEBUG("msg:[%s], bterminate:[%d]", popup_msg, bterminate);
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (popup_msg == NULL) {
+               return;
+       }
+
+       _vcui_view_popup_unload(ad->popup_eo);
+
+#ifdef CALL_MW
+       if (ad->bwin_top) {
+               CALL_UI_DEBUG("parent window TOP");
+               ad->popup_eo = elm_popup_add(ad->win_main);
+               _vcui_show_main_ui_set_flag();
+       } else
+#endif
+       {
+               ad->popup_mw = __vcui_view_popup_create_win(ad, "base");
+               ad->popup_eo = elm_popup_add(ad->popup_mw);
+       }
+       evas_object_size_hint_weight_set(ad->popup_eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_text_set(ad->popup_eo, popup_msg);
+       elm_popup_timeout_set(ad->popup_eo, time_out);
+       if (bterminate == 0) {
+               evas_object_smart_callback_add(ad->popup_eo, "timeout", __vcui_view_popup_response_cb, ad);
+       } else {
+               evas_object_smart_callback_add(ad->popup_eo, "timeout", __vcui_view_popup_response_cb_terminate, ad);
+       }
+       evas_object_show(ad->popup_eo);
+}
+
+void _vcui_view_popup_replace(char *popup_msg, double time_out, int bterminate)
+{
+       CALL_UI_DEBUG("msg:[%s], bterminate:[%d]", popup_msg, bterminate);
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (ad->popup_eo == NULL) {
+               _vcui_view_popup_load(popup_msg, time_out, bterminate);
+       } else {
+               if (popup_msg == NULL) {
+                       return;
+               }
+
+               if (ad->view_top != -1) {
+#ifdef CALL_MW
+                       _vcui_raise_main_win();
+#else
+                       if (ad->popup_mw != NULL)
+                               elm_win_activate(ad->popup_mw);
+#endif
+               }
+
+               elm_object_text_set(ad->popup_eo, popup_msg);
+               elm_popup_timeout_set(ad->popup_eo, time_out);
+               if (bterminate == 0) {
+                       evas_object_smart_callback_add(ad->popup_eo, "timeout", __vcui_view_popup_response_cb, ad);
+               } else {
+                       evas_object_smart_callback_add(ad->popup_eo, "timeout", __vcui_view_popup_response_cb_terminate, ad);
+               }
+               evas_object_show(ad->popup_eo);
+       }
+}
+
+void _vcui_view_popup_load_reject_call(char *name, char *number, int end_app)
+{
+       CALL_UI_DEBUG("..");
+       char msg[DEF_BUF_LEN_LONG] = { 0, };
+
+       if (strlen(name) == 0) {
+               snprintf(msg, sizeof(msg), "%s<br>%s", number, _("IDS_CALL_POP_REJECTED"));
+       } else if (strlen(number) == 0) {
+               snprintf(msg, sizeof(msg), "%s<br>%s", name, _("IDS_CALL_POP_REJECTED"));
+       } else {
+               snprintf(msg, sizeof(msg), "%s<br>%s<br>%s", name, number, _("IDS_CALL_POP_REJECTED"));
+       }
+
+       _vcui_view_popup_load(msg, POPUP_TIMEOUT_LONG, end_app);
+
+}
+
+void _vcui_view_popup_load_endcall_time(call_data_t *cd)
+{
+       unsigned long sec = 0;
+       unsigned long min = 0;
+       unsigned long hr = 0;
+       unsigned long call_duration_in_sec = _vcui_get_diff_now(cd->start_time);
+       char buf[DEF_BUF_LEN] = { 0, };
+       char msg[DEF_BUF_LEN_LONG] = { 0, };
+
+       sec = call_duration_in_sec % 60;
+       min = (call_duration_in_sec / 60) % 60;
+       hr = call_duration_in_sec / 3600;
+       snprintf(buf, sizeof(buf), "%c%c:%c%c:%c%c", (int)((hr / 10) + '0'), (int)((hr % 10) + '0'), (int)((min / 10) + '0'), (int)((min % 10) + '0'), (int)((sec / 10) + '0'), (int)((sec % 10) + '0'));
+
+       snprintf(msg, sizeof(msg), "%s<br>%s<br>%s", cd->call_display, cd->call_num, buf);
+
+       _vcui_view_popup_load(msg, POPUP_TIMEOUT_SHORT, EINA_FALSE);
+}
+
+void _vcui_view_popup_load_redial(void)
+{
+       _vcui_view_popup_load(_("IDS_CALL_POP_REDIALLING"), POPUP_TIMEOUT_NORMAL, EINA_FALSE);
+}
+
+static Eina_Bool __vcui_view_popup_timer_cb_vol_ringtone(void *data)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       ad->vol_ringtone_popup_del_timer = NULL;
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void __vcui_view_popup_vol_update_icon(int volume_level)
+{
+       CALL_UI_DEBUG("...");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       Evas_Object *icon = NULL;
+
+       icon = edje_object_part_swallow_get(_EDJ(ad->popup_vol_ly), "volume_icon");
+       if (icon) {
+               edje_object_part_unswallow(_EDJ(ad->popup_vol_ly), icon);
+               evas_object_del(icon);
+       }
+
+       icon = elm_icon_add(ad->popup_vol_ly);
+       evas_object_size_hint_aspect_set(icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
+       elm_icon_resizable_set(icon, 0, 0);
+       elm_object_part_content_set(ad->popup_vol_ly, "volume_icon", icon);
+       if (volume_level == 0)
+               elm_icon_file_set(icon, VOLUME_MUTE_ICON, NULL);
+       else
+               elm_icon_file_set(icon, VOLUME_ICON, NULL);
+}
+
+static void __vcui_view_popup_vol_ringtone_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+       double value;
+
+       value = elm_slider_value_get(obj);
+       if (value > RINGTONE_MAX)
+               value = RINGTONE_MAX;
+       else if (value < RINGTONE_MIN)
+               value = RINGTONE_MIN;
+
+       ad->ringtone_val = (int)value;
+
+       _vcui_engine_set_volume_level(VCUI_VOL_RING, ad->ringtone_val);
+
+       elm_slider_value_set(obj, ad->ringtone_val);
+       if (ad->vol_ringtone_popup_del_timer) {
+               ecore_timer_del(ad->vol_ringtone_popup_del_timer);
+               ad->vol_ringtone_popup_del_timer = NULL;
+       }
+
+       CALL_UI_DEBUG("ad->ringtone_val %d...", ad->ringtone_val);
+       __vcui_view_popup_vol_update_icon(ad->ringtone_val);
+       ad->vol_ringtone_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_ringtone, ad);
+}
+
+static void __vcui_view_popup_response_cb_vol_ringtone(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->vol_ringtone_popup_eo) {
+               CALL_UI_DEBUG("vol_ringtone_popup_eo delete.");
+               evas_object_del(ad->vol_ringtone_popup_eo);
+               ad->vol_ringtone_popup_eo = NULL;
+       }
+
+       ad->vol_longpress_cnt = 0;
+
+       if (ad->volup_key_longpress_timer) {
+               ecore_timer_del(ad->volup_key_longpress_timer);
+               ad->volup_key_longpress_timer = NULL;
+       }
+
+       if (ad->voldown_key_longpress_timer) {
+               ecore_timer_del(ad->voldown_key_longpress_timer);
+               ad->voldown_key_longpress_timer = NULL;
+       }
+
+       _vcui_cache_flush();
+       __vcui_view_popup_win_del(ad);
+       return;
+}
+
+void _vcui_view_popup_vol_ringtone(int vol_level)
+{
+       CALL_UI_DEBUG("vol_level(%d)", vol_level);
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       Evas_Object *popup = NULL;
+       Evas_Object *slider = NULL;
+       Evas_Object *icon = NULL;
+
+       if (ad->vol_ringtone_popup_eo) {
+               __vcui_view_popup_vol_update_icon(vol_level);
+               elm_slider_value_set(ad->vol_ringtone_slider_eo, vol_level);
+               if (ad->vol_ringtone_popup_del_timer) {
+                       ecore_timer_del(ad->vol_ringtone_popup_del_timer);
+                       ad->vol_ringtone_popup_del_timer = NULL;
+               }
+               ad->vol_ringtone_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_ringtone, ad);
+       } else {
+#ifdef CALL_MW
+               popup = elm_popup_add(ad->win_main);
+#else
+               ad->popup_mw = __vcui_view_popup_create_win(ad, "base");
+               ad->vol_ringtone_popup_eo = popup = elm_popup_add(ad->popup_mw);
+#endif
+               evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_object_part_text_set(popup, "title,text", dgettext("sys_string", "IDS_COM_BODY_RINGTONE"));
+
+               ad->popup_vol_ly = _vcui_load_edj(popup, EDJ_NAME, "volume");
+               if (ad->popup_vol_ly == NULL) {
+                       if (ad->vol_ringtone_popup_eo) {
+                               CALL_UI_DEBUG("vol_ringtone_popup_eo delete.");
+                               evas_object_del(ad->vol_ringtone_popup_eo);
+                               ad->vol_ringtone_popup_eo = NULL;
+                       }
+                       __vcui_view_popup_win_del(ad);
+                       return;
+               }
+               elm_object_content_set(popup, ad->popup_vol_ly);
+               __vcui_view_popup_vol_update_icon(vol_level);
+
+               slider = elm_slider_add(popup);
+               elm_slider_horizontal_set(slider, EINA_TRUE);
+               elm_slider_indicator_show_set(slider, EINA_TRUE);
+               elm_slider_indicator_format_set(slider, "%.0f");
+               elm_object_part_content_set(ad->popup_vol_ly, "volume_slider", slider);
+               elm_slider_min_max_set(slider, 0, 15);
+               elm_slider_value_set(slider, vol_level);
+               evas_object_smart_callback_add(slider, "changed", __vcui_view_popup_vol_ringtone_changed_cb, ad);
+               ad->vol_ringtone_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_ringtone, ad);
+               evas_object_smart_callback_add(popup, "timeout", __vcui_view_popup_response_cb_vol_ringtone, ad);
+
+               ad->vol_ringtone_slider_eo = slider;
+               evas_object_show(popup);
+       }
+
+}
+
+static Eina_Bool __vcui_view_popup_timer_cb_vol_voice(void *data)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       __vcui_view_popup_response_cb_vol_voice(ad, ad->vol_voice_popup_eo, NULL);
+       ad->vol_voice_popup_del_timer = NULL;
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void __vcui_view_popup_vol_voice_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+       double value;
+
+       value = elm_slider_value_get(obj);
+       if (value > VOICE_VOL_MAX)
+               value = VOICE_VOL_MAX;
+       else if (value < VOICE_VOL_MIN)
+               value = VOICE_VOL_MIN;
+       ad->voice_vol_val = (int)value;
+
+       _vcui_engine_set_volume_level(VCUI_VOL_VOICE, ad->voice_vol_val);
+
+       elm_slider_value_set(obj, ad->voice_vol_val);
+       if (ad->vol_voice_popup_del_timer) {
+               ecore_timer_del(ad->vol_voice_popup_del_timer);
+               ad->vol_voice_popup_del_timer = NULL;
+       }
+       ad->vol_voice_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_voice, ad);
+}
+
+static void __vcui_view_popup_response_cb_vol_voice(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->vol_voice_popup_eo) {
+               CALL_UI_DEBUG("vol_voice_popup_eo delete.");
+               evas_object_del(ad->vol_voice_popup_eo);
+               ad->vol_voice_popup_eo = NULL;
+       }
+
+       ad->vol_longpress_cnt = 0;
+
+       if (ad->volup_key_longpress_timer) {
+               ecore_timer_del(ad->volup_key_longpress_timer);
+               ad->volup_key_longpress_timer = NULL;
+       }
+
+       if (ad->voldown_key_longpress_timer) {
+               ecore_timer_del(ad->voldown_key_longpress_timer);
+               ad->voldown_key_longpress_timer = NULL;
+       }
+
+       _vcui_cache_flush();
+       __vcui_view_popup_win_del(ad);
+       return;
+}
+
+void _vcui_view_popup_vol_voice(int vol_level)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       Evas_Object *popup = NULL;
+       Evas_Object *slider = NULL;
+       Evas_Object *icon = NULL;
+
+       if (ad->vol_voice_popup_eo) {
+               elm_slider_value_set(ad->vol_voice_slider_eo, vol_level);
+               if (ad->vol_voice_popup_del_timer) {
+                       ecore_timer_del(ad->vol_voice_popup_del_timer);
+                       ad->vol_voice_popup_del_timer = NULL;
+               }
+               ad->vol_voice_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_voice, ad);
+       } else {
+#ifdef CALL_MW
+               popup = elm_popup_add(ad->win_main);
+#else
+               ad->popup_mw = __vcui_view_popup_create_win(ad, "base");
+               popup = elm_popup_add(ad->popup_mw);
+#endif
+               evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_object_part_text_set(popup, "title,text", _("IDS_CALL_BODY_CALL"));
+
+               ad->popup_vol_ly = _vcui_load_edj(popup, EDJ_NAME, "volume");
+               if (ad->popup_vol_ly == NULL) {
+                       if (popup) {
+                               CALL_UI_DEBUG("popup delete.");
+                               evas_object_del(popup);
+                               popup = NULL;
+                       }
+                       __vcui_view_popup_win_del(ad);
+                       return;
+               }
+               elm_object_content_set(popup, ad->popup_vol_ly);
+               __vcui_view_popup_vol_update_icon(vol_level);
+
+               slider = elm_slider_add(ad->popup_vol_ly);
+               elm_slider_horizontal_set(slider, EINA_TRUE);
+               elm_slider_indicator_show_set(slider, EINA_TRUE);
+               elm_slider_indicator_format_set(slider, "%.0f");
+               elm_object_part_content_set(ad->popup_vol_ly, "volume_slider", slider);
+               elm_slider_min_max_set(slider, 0, 7);
+               elm_slider_value_set(slider, vol_level);
+               evas_object_smart_callback_add(slider, "changed", __vcui_view_popup_vol_voice_changed_cb, ad);
+               ad->vol_voice_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_voice, ad);
+               evas_object_smart_callback_add(popup, "block,clicked", __vcui_view_popup_response_cb_vol_voice, ad);
+
+               ad->vol_voice_slider_eo = slider;
+               ad->vol_voice_popup_eo = popup;
+               evas_object_show(popup);
+       }
+}
+
+static Eina_Bool __vcui_view_popup_timer_cb_vol_bt(void *data)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       ad->vol_bt_popup_del_timer = NULL;
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void __vcui_view_popup_vol_bt_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+       double value;
+
+       value = elm_slider_value_get(obj);
+       if (value > BT_VOL_MAX)
+               value = BT_VOL_MAX;
+       else if (value < BT_VOL_MIN)
+               value = BT_VOL_MIN;
+
+       ad->bt_vol_val = (int)value;
+
+       _vcui_engine_set_volume_level(VCUI_VOL_HEADSET, ad->bt_vol_val);
+
+       elm_slider_value_set(obj, ad->bt_vol_val);
+       if (ad->vol_bt_popup_del_timer) {
+               ecore_timer_del(ad->vol_bt_popup_del_timer);
+               ad->vol_bt_popup_del_timer = NULL;
+       }
+       ad->vol_bt_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_bt, ad);
+}
+
+static void __vcui_view_popup_response_cb_vol_bt(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->vol_bt_popup_eo) {
+               CALL_UI_DEBUG("vol_bt_popup_eo delete.");
+               evas_object_del(ad->vol_bt_popup_eo);
+               ad->vol_bt_popup_eo = NULL;
+               __vcui_view_popup_win_del(ad);
+       }
+
+       ad->vol_longpress_cnt = 0;
+
+       if (ad->volup_key_longpress_timer) {
+               ecore_timer_del(ad->volup_key_longpress_timer);
+               ad->volup_key_longpress_timer = NULL;
+       }
+
+       if (ad->voldown_key_longpress_timer) {
+               ecore_timer_del(ad->voldown_key_longpress_timer);
+               ad->voldown_key_longpress_timer = NULL;
+       }
+
+       _vcui_cache_flush();
+       return;
+}
+
+void _vcui_view_popup_vol_bt(int vol_level)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       Evas_Object *popup = NULL;
+       Evas_Object *slider = NULL;
+       Evas_Object *icon = NULL;
+
+       if (ad->vol_bt_popup_eo) {
+               elm_slider_value_set(ad->vol_bt_slider_eo, vol_level);
+               if (ad->vol_bt_popup_del_timer) {
+                       ecore_timer_del(ad->vol_bt_popup_del_timer);
+                       ad->vol_bt_popup_del_timer = NULL;
+               }
+               ad->vol_bt_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_bt, ad);
+       } else {
+#ifdef CALL_MW
+               popup = elm_popup_add(ad->win_main);
+#else
+               ad->popup_mw = __vcui_view_popup_create_win(ad, "base");
+               popup = elm_popup_add(ad->popup_mw);
+#endif
+               evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+               elm_object_part_text_set(popup, "title,text", _("IDS_CALL_BUTTON_HEADSET"));
+
+               ad->popup_vol_ly = _vcui_load_edj(popup, EDJ_NAME, "volume");
+               if (ad->popup_vol_ly == NULL) {
+                       if (popup) {
+                               CALL_UI_DEBUG("popup delete.");
+                               evas_object_del(popup);
+                               popup = NULL;
+                       }
+                       __vcui_view_popup_win_del(ad);
+                       return;
+               }
+               elm_object_content_set(popup, ad->popup_vol_ly);
+               __vcui_view_popup_vol_update_icon(vol_level);
+
+               slider = elm_slider_add(popup);
+               elm_slider_horizontal_set(slider, EINA_TRUE);
+               elm_slider_indicator_show_set(slider, EINA_TRUE);
+               elm_slider_indicator_format_set(slider, "%.0f");
+               elm_object_part_content_set(ad->popup_vol_ly, "volume_slider", slider);
+               elm_slider_min_max_set(slider, 0, 15);
+               elm_slider_value_set(slider, vol_level);
+               evas_object_smart_callback_add(slider, "changed", __vcui_view_popup_vol_bt_changed_cb, ad);
+               ad->vol_bt_popup_del_timer = ecore_timer_add(POPUP_TIMEOUT_SHORT, __vcui_view_popup_timer_cb_vol_bt, ad);
+               evas_object_smart_callback_add(popup, "timeout", __vcui_view_popup_response_cb_vol_bt, ad);
+
+               ad->vol_bt_slider_eo = slider;
+               ad->vol_bt_popup_eo = popup;
+               evas_object_show(popup);
+       }
+
+}
+
+static Eina_Bool __vcui_view_popup_response_cb_delay(void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       _vcui_view_popup_load((char *)data, POPUP_TIMEOUT_SHORT, EINA_FALSE);
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       ecore_timer_del(ad->popup_delay);
+       ad->popup_delay = NULL;
+
+       CALL_UI_DEBUG("delay popup work");
+       return EINA_FALSE;
+}
+
+void _vcui_view_popup_load_with_delay(char *popup_msg, double delay_time)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       ad->popup_delay = ecore_timer_add(delay_time, __vcui_view_popup_response_cb_delay, popup_msg);
+       CALL_UI_DEBUG("delay popup");
+}
+
+void _vcui_view_popup_unload_progress(vcui_app_call_data_t *ad)
+{
+       CALL_UI_DEBUG("..");
+
+       if (ad->popup_progress_eo) {
+               evas_object_hide(ad->popup_progress_eo);
+               evas_object_del(ad->popup_progress_eo);
+               ad->popup_progress_eo = NULL;
+       }
+       __vcui_view_popup_win_del(ad);
+
+       _vcui_cache_flush();
+
+       return;
+}
+
+static void __vcui_view_popup_progressbar_set_label(char *status_string)
+{
+       CALL_UI_DEBUG("..");
+       Evas_Object *label;
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       CALL_UI_DEBUG("popup_progress_set_label ...\n");
+
+       label = (Evas_Object *)evas_object_data_get(ad->popup_progress_eo, "progress_label");
+       elm_object_text_set(label, status_string);
+}
+
+static void __vcui_view_popup_progressbar_response_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       CALL_UI_DEBUG("__vcui_view_popup_progressbar_response_cb callback=%d\n", (int)event_info);
+
+       if (ad->popup_progress_eo) {
+               evas_object_del(ad->popup_progress_eo);
+               ad->popup_progress_eo = NULL;
+       }
+
+       evas_object_del(obj);
+       __vcui_view_popup_win_del(ad);
+}
+
+void _vcui_view_popup_load_progress(char *display_string)
+{
+       CALL_UI_DEBUG("..");
+       Evas_Object *progressbar_eo;
+       Evas_Object *box, *label;
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       if (NULL != ad->popup_progress_eo) {
+               __vcui_view_popup_progressbar_set_label(display_string);
+               return;
+       }
+#ifdef CALL_MW
+       ad->popup_progress_eo = elm_popup_add(ad->win_main);
+#else
+       ad->popup_mw = __vcui_view_popup_create_win(ad, "base");
+       ad->popup_progress_eo = elm_popup_add(ad->popup_mw);
+#endif
+
+       label = elm_label_add(ad->popup_progress_eo);
+       elm_object_text_set(label, display_string);
+       evas_object_show(label);
+       box = elm_box_add(ad->popup_progress_eo);
+       progressbar_eo = elm_progressbar_add(ad->popup_progress_eo);
+       elm_object_style_set(progressbar_eo, "list_progress");
+       elm_progressbar_pulse(progressbar_eo, EINA_TRUE);
+       evas_object_size_hint_align_set(progressbar_eo, EVAS_HINT_FILL, 0.5);
+       evas_object_size_hint_weight_set(progressbar_eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_progressbar_pulse(progressbar_eo, EINA_TRUE);
+       evas_object_show(progressbar_eo);
+       elm_box_pack_end(box, label);
+       elm_box_pack_end(box, progressbar_eo);
+       evas_object_show(box);
+       elm_object_content_set(ad->popup_progress_eo, box);
+       evas_object_smart_callback_add(ad->popup_progress_eo, "timeout", __vcui_view_popup_progressbar_response_cb, NULL);
+       evas_object_show(ad->popup_progress_eo);
+
+       evas_object_data_set(ad->popup_progress_eo, "progress_label", (void *)label);
+}
+
+void _vcui_view_popup_load_sending_dtmf(char *status_string, char *dtmf_num)
+{
+       CALL_UI_DEBUG("..");
+       char msg[DEF_BUF_LEN_LONG] = { 0, };
+
+       snprintf(msg, DEF_BUF_LEN_LONG, "%s<br>%s", status_string, dtmf_num);
+
+       _vcui_view_popup_load_progress(msg);
+}
+
+static void __vcui_view_popup_snd_path_bt_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_HEADSET);
+
+       _vcui_engine_change_sound_path(VCUI_AUDIO_HEADSET);
+
+       ad->speaker_status = EINA_FALSE;
+       ad->headset_status = EINA_TRUE;
+}
+
+static void __vcui_view_popup_snd_path_earjack_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_EARJACK);
+
+       _vcui_engine_change_sound_path(VCUI_AUDIO_EARJACK);
+
+       ad->speaker_status = EINA_FALSE;
+       ad->headset_status = EINA_FALSE;
+}
+
+static void __vcui_view_popup_snd_path_speaker_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       elm_radio_value_set(ad->ctxpopup_radio_group_eo, VCUI_SND_PATH_SPEAKER);
+
+       _vcui_engine_change_sound_path(VCUI_AUDIO_SPEAKER);
+
+       ad->speaker_status = EINA_TRUE;
+       ad->headset_status = EINA_FALSE;
+}
+
+static void __vcui_view_popup_hide_snd_path_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *)data;
+
+       if (ad->ctxpopup_eo) {
+               evas_object_del(ad->ctxpopup_eo);
+               ad->ctxpopup_eo = NULL;
+       }
+}
+
+static void __vcui_view_popup_move_snd_path(Evas_Object *ctxpopup, Evas_Object *win, Evas_Coord touch_x, Evas_Coord touch_y)
+{
+       evas_object_move(ctxpopup, touch_x, touch_y);
+}
+
+void _vcui_view_popup_load_snd_path()
+{
+       CALL_UI_DEBUG("..");
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+       int bearjack_status = EINA_FALSE;
+
+       Evas_Object *ctxpopup = NULL;
+       Evas_Object *radio = NULL;
+       Evas_Object *group = NULL;
+
+       int status = -1;
+       char *bt_name = NULL;
+       int snd_path;
+
+       /* get bt name */
+       bt_name = vconf_get_str(VCONFKEY_BT_HEADSET_NAME);
+       if (!bt_name) {
+               bt_name = _("IDS_CALL_BUTTON_HEADSET");
+       }
+
+       /* check earjack status */
+       if (!vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &status)) {
+               if (status != VCONFKEY_SYSMAN_EARJACK_REMOVED) {
+                       bearjack_status = EINA_TRUE;
+               }
+       }
+
+       if (ad->ctxpopup_eo) {
+               evas_object_del(ad->ctxpopup_eo);
+               ad->ctxpopup_eo = NULL;
+       }
+
+       ctxpopup = elm_ctxpopup_add(ad->win_main);
+
+       evas_object_smart_callback_add(ctxpopup, "dismissed", __vcui_view_popup_hide_snd_path_cb, ad);
+
+       __vcui_view_popup_move_snd_path(ctxpopup, ad->win_main, ad->touch_x, ad->touch_y);
+
+       /* bt headset */
+       group = radio = elm_radio_add(ctxpopup);
+       elm_radio_state_value_set(radio, VCUI_SND_PATH_HEADSET);
+       evas_object_data_set(radio, "idx", (void *)(VCUI_SND_PATH_HEADSET));
+       evas_object_show(radio);
+       elm_ctxpopup_item_append(ctxpopup, bt_name, radio, __vcui_view_popup_snd_path_bt_cb, ad);
+
+       /* earjack or receiver */
+       radio = elm_radio_add(ctxpopup);
+       elm_radio_state_value_set(radio, VCUI_SND_PATH_EARJACK);
+       elm_radio_group_add(radio, group);
+       evas_object_data_set(radio, "idx", (void *)(VCUI_SND_PATH_EARJACK));
+       evas_object_show(radio);
+       if (bearjack_status) {
+               elm_ctxpopup_item_append(ctxpopup, _("IDS_CALL_BUTTON_HEADPHONES"), radio, __vcui_view_popup_snd_path_earjack_cb, ad);
+       } else {
+               elm_ctxpopup_item_append(ctxpopup, _("IDS_CALL_BUTTON_RECEIVER"), radio, __vcui_view_popup_snd_path_earjack_cb, ad);
+       }
+
+       /* speaker */
+       radio = elm_radio_add(ctxpopup);
+       elm_radio_state_value_set(radio, VCUI_SND_PATH_SPEAKER);
+       elm_radio_group_add(radio, group);
+       evas_object_data_set(radio, "idx", (void *)(VCUI_SND_PATH_SPEAKER));
+       evas_object_show(radio);
+       elm_ctxpopup_item_append(ctxpopup, _("IDS_CALL_BUTTON_SPEAKER"), radio, __vcui_view_popup_snd_path_speaker_cb, ad);
+       /* current sound path set */
+       snd_path = _vcui_engine_get_sound_path();
+       switch (snd_path) {
+       case VCUI_AUDIO_SPEAKER:
+               {
+                       elm_radio_value_set(group, VCUI_SND_PATH_SPEAKER);
+               }
+               break;
+       case VCUI_AUDIO_HEADSET:
+               {
+                       elm_radio_value_set(group, VCUI_SND_PATH_HEADSET);
+               }
+               break;
+       case VCUI_AUDIO_EARJACK:
+       case VCUI_AUDIO_RECEIVER:
+               {
+                       elm_radio_value_set(group, VCUI_SND_PATH_EARJACK);
+               }
+               break;
+       default:
+               CALL_UI_DEBUG("ERROR - wrong type:[%d]", snd_path);
+               return;
+               break;
+       }
+
+       evas_object_show(ctxpopup);
+
+       ad->ctxpopup_eo = ctxpopup;
+       ad->ctxpopup_radio_group_eo = group;
+}
+
+#if 0
+static Eina_Bool __vcui_view_ticker_response_cb(void *data)
+{
+       vcui_app_call_data_t *ad = (vcui_app_call_data_t *) data;
+       CALL_UI_DEBUG("..");
+
+       if (ad->ticker_tm) {
+               ecore_timer_del(ad->ticker_tm);
+               ad->ticker_tm = NULL;
+       }
+
+       /* to be implemented */
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+void _vcui_view_create_ticker_noti(char *ticker_msg)
+{
+       Evas_Object *ticker_noti = NULL;
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       CALL_UI_DEBUG("load_ticker_noti_at_bottom enter \n");
+
+       ticker_noti = elm_tickernoti_add (NULL);
+       elm_object_style_set(ticker_noti, "info");
+       elm_object_text_set(ticker_noti, ticker_msg);
+       elm_tickernoti_orient_set(ticker_noti, ELM_TICKERNOTI_ORIENT_BOTTOM);
+       if (ad->ticker_tm) {
+               ecore_timer_del(ad->ticker_tm);
+               ad->ticker_tm = NULL;
+       }
+       ad->ticker_tm = ecore_timer_add(TICKER_TIMEOUT, __vcui_view_ticker_response_cb, ad);
+       evas_object_show(ticker_noti);
+
+       CALL_UI_DEBUG("load_ticker_noti_at_bottom over \n");
+}
+#endif
diff --git a/ui/vcui-view-popup.h b/ui/vcui-view-popup.h
new file mode 100755 (executable)
index 0000000..a912006
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VOICE_CALL_UI_POPUP_VIEW_
+#define _VOICE_CALL_UI_POPUP_VIEW_
+
+void _vcui_view_popup_unload(Evas_Object *popup_eo);
+void _vcui_view_popup_load(char *popup_msg, double time_out, int bterminate);
+void _vcui_view_popup_replace(char *popup_msg, double time_out, int bterminate);
+
+void _vcui_view_popup_vol_ringtone(int vol_level);
+void _vcui_view_popup_vol_voice(int vol_level);
+void _vcui_view_popup_vol_bt(int vol_level);
+
+void _vcui_view_popup_load_reject_call(char *name, char *number, int end_app);
+void _vcui_view_popup_load_endcall_time(call_data_t *cd);
+void _vcui_view_popup_load_redial(void);
+
+void _vcui_view_popup_load_with_delay(char *popup_msg, double delay_time);
+
+void _vcui_view_popup_load_sending_dtmf(char *status_string, char *dtmf_num);
+void _vcui_view_popup_unload_progress(vcui_app_call_data_t *ad);
+void _vcui_view_popup_load_progress(char *display_string);
+
+void _vcui_view_popup_load_snd_path(void);
+
+void _vcui_view_create_ticker_noti(char *ticker_msg);
+
+#endif
diff --git a/ui/vcui-view-single-call.c b/ui/vcui-view-single-call.c
new file mode 100755 (executable)
index 0000000..f9c7e23
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include "vcui-application.h"
+#include "vcui-view-common.h"
+#include "vcui-view-single-call.h"
+#include "vcui-view-elements.h"
+static int __vc_ui_view_single_call_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3);
+static int __vc_ui_view_single_call_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2);
+static int __vc_ui_view_single_call_onhide(voice_call_view_data_t *view_data);
+static int __vc_ui_view_single_call_onshow(voice_call_view_data_t *view_data);
+static int __vc_ui_view_single_call_ondestroy(voice_call_view_data_t *view_data);
+
+static voice_call_view_data_t s_view = {
+       .type = VIEW_INCALL_ONECALL_VIEW,
+       .app_data = NULL,
+       .layout = NULL,
+       .onCreate = __vc_ui_view_single_call_oncreate,
+       .onUpdate = __vc_ui_view_single_call_onupdate,
+       .onHide = __vc_ui_view_single_call_onhide,
+       .onShow = __vc_ui_view_single_call_onshow,
+       .onDestroy = __vc_ui_view_single_call_ondestroy,
+       .priv = NULL,
+};
+
+voice_call_view_data_t *_vc_ui_view_single_call_new(vcui_app_call_data_t *ad)
+{
+       s_view.app_data = ad;
+       s_view.priv = calloc(1, sizeof(incall_one_view_priv_t));
+
+       if (!s_view.priv) {
+               CALL_UI_DEBUG("ERROR!!!!!!!!!!!");
+       }
+
+       return &s_view;
+}
+
+static void __vc_ui_view_single_call_draw_screen(Evas_Object *eo, void *data)
+{
+       CALL_UI_DEBUG("..");
+
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       incall_one_view_priv_t *priv = (incall_one_view_priv_t *)vd->priv;
+       vcui_app_call_data_t *ad = vd->app_data;
+
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("Now Data is NULL");
+               return;
+       }
+
+       /* ============ Check valid Evas Object ============= */
+       int valid = 0;
+       CALL_UI_KPI("_vcui_check_valid_eo ONEVIEW start");
+       valid = _vcui_check_valid_eo(priv->contents, "ONEVIEW");
+       CALL_UI_KPI("_vcui_check_valid_eo ONEVIEW done");
+       if (valid == -1) {
+               CALL_UI_DEBUG("[========== ONEVIEW : Invalid Evas Object, priv->contents : %p ==========]", priv->contents);
+               return;
+       }
+       /* ============ Check valid Evas Object ============= */
+
+       /* call image */
+       if (strcmp((char *)priv->now_data->call_file_path, NOIMG_ICON) == 0) {
+               _vcui_show_wallpaper_image(priv->contents);
+       } else {
+               CALL_UI_DEBUG("some image case!!");
+               _vcui_show_wallpaper_image(priv->contents);
+               priv->ic = _vcui_show_contact_image(priv->contents, vd->app_data->win_main, priv->now_data->call_file_path);
+               if (priv->now_data->caller_status == CALL_HOLD) {
+                       double scale_factor = 0.0;
+                       scale_factor = elm_config_scale_get();
+                       CALL_UI_DEBUG("scale_factor %f", scale_factor);
+
+                       if (scale_factor == 1.0) {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_HD", "CID_HD");
+                       } else {
+                               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_DIM_WVGA", "CID_WVGA");
+                       }
+               } else {
+                       edje_object_signal_emit(_EDJ(priv->contents), "HIDE_DIM", "CID");
+               }
+       }
+
+       /* call name (if nothing, call number) */
+       CALL_UI_KPI("edje_object_part_text_set start");
+       if (strlen((char *)priv->now_data->call_display) == 0) {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_num);
+       } else {
+               edje_object_part_text_set(_EDJ(eo), "txt_call_name", (char *)priv->now_data->call_display);
+               edje_object_part_text_set(_EDJ(eo), "txt_contact_phone_type", (char *)priv->now_data->call_num);
+       }
+       CALL_UI_KPI("edje_object_part_text_set done");
+
+       CALL_UI_KPI("_vcui_view_common_set_each_time start");
+       _vcui_view_common_set_each_time(priv->now_data->start_time);
+       CALL_UI_KPI("_vcui_view_common_set_each_time done");
+
+       CALL_UI_KPI("_vcui_create_top_left_button start");
+       _vcui_create_top_left_button(vd);
+       CALL_UI_KPI("_vcui_create_top_left_button done");
+
+       CALL_UI_KPI("_vcui_create_top_right_button start");
+       _vcui_create_top_right_button(vd);
+       CALL_UI_KPI("_vcui_create_top_right_button done");
+
+       CALL_UI_KPI("_vcui_create_bottom_left_button start");
+       _vcui_create_bottom_left_button(vd);
+       CALL_UI_KPI("_vcui_create_bottom_left_button done");
+
+       CALL_UI_KPI("_vcui_create_bottom_middle_button start");
+       _vcui_create_bottom_middle_button(vd);
+       CALL_UI_KPI("_vcui_create_bottom_middle_button done");
+
+       if ((_vcui_is_phonelock_status() == EINA_TRUE)&&(_vcui_is_idle_lock() == EINA_TRUE)) {
+               CALL_UI_KPI("_vcui_create_top_middle_button start");
+               _vcui_create_top_middle_button_disabled(vd);
+               CALL_UI_KPI("_vcui_create_top_middle_button done");
+
+               CALL_UI_KPI("_vcui_create_bottom_right_button start");
+               _vcui_create_bottom_right_button_disabled(vd);
+               CALL_UI_KPI("_vcui_create_bottom_right_button done");
+       } else {
+               CALL_UI_KPI("_vcui_create_top_middle_button start");
+               _vcui_create_top_middle_button(vd);
+               CALL_UI_KPI("_vcui_create_top_middle_button done");
+
+               _vcui_create_bottom_right_button(vd);
+       }
+
+       CALL_UI_KPI("_vcui_create_button_bigend start");
+       _vcui_create_button_bigend(vd);
+       CALL_UI_KPI("_vcui_create_button_bigend done");
+
+       CALL_UI_KPI("edje_object_signal_emit effect start");
+       if (ad->beffect_needed == EINA_TRUE) {
+               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_EFFECT", "ALLBTN");
+               ad->beffect_needed = EINA_FALSE;
+       } else {
+               edje_object_signal_emit(_EDJ(priv->contents), "SHOW_NO_EFFECT", "ALLBTN");
+       }
+       CALL_UI_KPI("edje_object_signal_emit effect done");
+
+       CALL_UI_KPI("evas_object_show start");
+       evas_object_show(eo);
+       CALL_UI_KPI("evas_object_show done");
+}
+
+static Evas_Object *__vc_ui_view_single_call_create_contents(void *data)
+{
+       if (data == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+       voice_call_view_data_t *vd = (voice_call_view_data_t *)data;
+       Evas_Object *eo = NULL;
+
+       /* load edje */
+       eo = _vcui_load_edj(vd->app_data->win_main, EDJ_NAME, GRP_INCALL);
+       if (eo == NULL)
+               return NULL;
+
+       return eo;
+}
+
+static Evas_Object *__vc_ui_view_single_call_create_layout_main(Evas_Object *parent)
+{
+       if (parent == NULL) {
+               CALL_UI_DEBUG("ERROR");
+               return NULL;
+       }
+
+       Evas_Object *ly;
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed elm_layout_add.");
+
+       elm_layout_theme_set(ly, "standard", "window", "integration");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,indicator", "elm");
+       edje_object_signal_emit(_EDJ(ly), "elm,state,show,content", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+static int __vc_ui_view_single_call_oncreate(voice_call_view_data_t *view_data, int param1, void *param2, void *param3)
+{
+       CALL_UI_DEBUG("incall view create");
+       voice_call_view_data_t *vd = view_data;
+       incall_one_view_priv_t *priv = (incall_one_view_priv_t *)vd->priv;
+
+       priv->now_data = _vcui_doc_get_first();
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return VC_ERROR;
+       }
+
+       if (!vd->layout) {
+
+               CALL_UI_KPI("__vc_ui_view_single_call_create_layout_main start");
+               vd->layout = __vc_ui_view_single_call_create_layout_main(vd->app_data->win_main);
+               CALL_UI_KPI("__vc_ui_view_single_call_create_layout_main done");
+               if (vd->layout == NULL) {
+                       CALL_UI_DEBUG("ERROR");
+                       return VC_ERROR;
+               }
+
+               CALL_UI_KPI("__vc_ui_view_single_call_create_contents start");
+               priv->contents = __vc_ui_view_single_call_create_contents(vd);
+               elm_object_part_content_set(vd->layout, "elm.swallow.content", priv->contents);
+               CALL_UI_KPI("__vc_ui_view_single_call_create_contents done");
+
+               CALL_UI_KPI("evas_object_name_set start");
+               evas_object_name_set(priv->contents, "ONEVIEW");
+               CALL_UI_KPI("evas_object_name_set done");
+               CALL_UI_DEBUG("[========== ONEVIEW: priv->contents Addr : [%p] ==========]", priv->contents);
+
+       } else {
+               CALL_UI_DEBUG("[UI]ad->layout_incall==NULL case ");
+               evas_object_show(vd->layout);
+       }
+
+       __vc_ui_view_single_call_onshow(view_data);
+       return VC_NO_ERROR;
+}
+
+static int __vc_ui_view_single_call_onupdate(voice_call_view_data_t *view_data, void *update_data1, void *update_data2)
+{
+       CALL_UI_DEBUG("incall view update");
+
+       __vc_ui_view_single_call_onshow(view_data);
+
+       return VC_NO_ERROR;
+}
+
+static int __vc_ui_view_single_call_onhide(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incall view hide");
+
+       evas_object_hide(view_data->layout);
+       return VC_NO_ERROR;
+}
+
+static int __vc_ui_view_single_call_onshow(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incall view show");
+       CALL_UI_KPI("__vc_ui_view_single_call_onshow start");
+       incall_one_view_priv_t *priv = (incall_one_view_priv_t *)view_data->priv;
+
+       priv->now_data = _vcui_doc_get_first();
+       if (priv->now_data == NULL) {
+               CALL_UI_DEBUG("call data is null");
+               return VC_ERROR;
+       }
+       CALL_UI_KPI("__vc_ui_view_single_call_draw_screen start");
+       __vc_ui_view_single_call_draw_screen(priv->contents, view_data);
+       CALL_UI_KPI("__vc_ui_view_single_call_draw_screen done");
+
+
+       CALL_UI_KPI("incall-one-view hide start");
+       evas_object_hide(view_data->layout);
+       CALL_UI_KPI("incall-one-view hide done");
+       CALL_UI_KPI("incall-one-view show start");
+       evas_object_show(view_data->layout);
+       CALL_UI_KPI("incall-one-view show done");
+       CALL_UI_KPI("__vc_ui_view_single_call_onshow done");
+       return VC_NO_ERROR;
+}
+
+static int __vc_ui_view_single_call_ondestroy(voice_call_view_data_t *view_data)
+{
+       CALL_UI_DEBUG("incall view destroy");
+
+       vcui_app_call_data_t *ad = _vcui_get_app_data();
+
+       voice_call_view_data_t *vd = ad->view_st[VIEW_INCALL_ONECALL_VIEW];
+       incall_one_view_priv_t *priv = (incall_one_view_priv_t *)vd->priv;
+
+       if (priv != NULL) {
+               if (priv->contents) {
+                       evas_object_del(priv->contents);
+                       priv->contents = NULL;
+               }
+
+               free(priv);
+               priv = NULL;
+       }
+
+       if (vd->layout != NULL) {
+               evas_object_hide(vd->layout);
+               evas_object_del(vd->layout);
+               vd->layout = NULL;
+       }
+
+       ad->view_st[VIEW_INCALL_ONECALL_VIEW] = NULL;
+
+       _vcui_cache_flush();
+       CALL_UI_DEBUG("complete destroy one view");
+       return VC_NO_ERROR;
+}
diff --git a/ui/vcui-view-single-call.h b/ui/vcui-view-single-call.h
new file mode 100755 (executable)
index 0000000..e5aced4
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.tizenopensource.org/license
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _VCUI_VIEW_SINGLE_CALL_
+#define _VCUI_VIEW_SINGLE_CALL_
+        
+typedef struct {
+       Evas_Object *contents;
+       Evas_Object *ic;
+       Evas_Object *record_btn;
+       call_data_t *now_data;
+} incall_one_view_priv_t;
+
+voice_call_view_data_t *_vc_ui_view_single_call_new(vcui_app_call_data_t *ad);
+#endif