Git init
authorKibum Kim <kb0929.kim@samsung.com>
Fri, 6 Jan 2012 15:48:44 +0000 (00:48 +0900)
committerKibum Kim <kb0929.kim@samsung.com>
Fri, 6 Jan 2012 15:48:44 +0000 (00:48 +0900)
492 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0644]
TC/making_new_tet_scen.py [new file with mode: 0755]
TC/telephony_TC/CFG/cfg_util.c [new file with mode: 0644]
TC/telephony_TC/CFG/cfg_util.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_akey.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_akey.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.h [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.c [new file with mode: 0644]
TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.h [new file with mode: 0644]
TC/telephony_TC/Makefile [new file with mode: 0644]
TC/telephony_TC/call/README [new file with mode: 0644]
TC/telephony_TC/call/call_common.h [new file with mode: 0644]
TC/telephony_TC/call/unit/makefile [new file with mode: 0644]
TC/telephony_TC/call/unit/tapi_callback.c [new file with mode: 0644]
TC/telephony_TC/call/unit/tapi_callback.h [new file with mode: 0644]
TC/telephony_TC/call/unit/tslist [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tapi_check_status.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tapi_check_status.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_answer_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_answer_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_deflect_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_deflect_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_flash.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_flash.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_mo.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exe_call_mo.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_act_line.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_act_line.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_duration.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_duration.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_status.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_status.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_time.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_get_call_time.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_hold_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_hold_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_join_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_join_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all_active.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all_active.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all_held.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_release_call_all_held.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_retrieve_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_retrieve_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_set_call_act_line.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_set_call_act_line.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_split_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_split_call.h [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_swap_call.c [new file with mode: 0644]
TC/telephony_TC/call/unit/uts_tel_swap_call.h [new file with mode: 0644]
TC/telephony_TC/common/unit/makefile [new file with mode: 0644]
TC/telephony_TC/common/unit/tapi_common.h [new file with mode: 0644]
TC/telephony_TC/common/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/common/unit/tslist [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_check_service_ready.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_check_service_ready.h [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_deinit.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_deinit.h [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_deregister_event.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_deregister_event.h [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_init.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_init.h [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_register_event.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_register_event.h [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_request_tunnel.c [new file with mode: 0644]
TC/telephony_TC/common/unit/uts_tel_request_tunnel.h [new file with mode: 0644]
TC/telephony_TC/gprs/unit/gprs_common.c [new file with mode: 0644]
TC/telephony_TC/gprs/unit/gprs_common.h [new file with mode: 0644]
TC/telephony_TC/gprs/unit/makefile [new file with mode: 0644]
TC/telephony_TC/gprs/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/gprs/unit/tet_scen [new file with mode: 0644]
TC/telephony_TC/gprs/unit/tslist [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.c [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.h [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.c [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.h [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.c [new file with mode: 0644]
TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/async_util.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/async_util.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/makefile [new file with mode: 0644]
TC/telephony_TC/misc/unit/misc_callback_util.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/misc_callback_util.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/tslist [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.h [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.c [new file with mode: 0644]
TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.h [new file with mode: 0644]
TC/telephony_TC/network/README [new file with mode: 0644]
TC/telephony_TC/network/unit/makefile [new file with mode: 0644]
TC/telephony_TC/network/unit/tel_tapi_nw_common.c [new file with mode: 0644]
TC/telephony_TC/network/unit/tel_tapi_nw_common.h [new file with mode: 0644]
TC/telephony_TC/network/unit/tslist [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_band.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_band.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_mode.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_mode.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_roaming.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_roaming.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_search_network.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_search_network.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_select_network_automatic.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_select_network_automatic.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_select_network_manual.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_select_network_manual.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_band.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_band.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_mode.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_mode.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_roaming.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_roaming.h [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.c [new file with mode: 0644]
TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.h [new file with mode: 0644]
TC/telephony_TC/power/unit/makefile [new file with mode: 0644]
TC/telephony_TC/power/unit/power_common.c [new file with mode: 0644]
TC/telephony_TC/power/unit/power_common.h [new file with mode: 0644]
TC/telephony_TC/power/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/power/unit/tslist [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.c [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.h [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.c [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.h [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.c [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.h [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tel_process_power_command.c [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tel_process_power_command.h [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tel_set_flight_mode.c [new file with mode: 0644]
TC/telephony_TC/power/unit/uts_tel_set_flight_mode.h [new file with mode: 0644]
TC/telephony_TC/power/uts_tapi_power_phone_on_off.c [new file with mode: 0644]
TC/telephony_TC/power/uts_tapi_power_phone_on_off.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/makefile [new file with mode: 0644]
TC/telephony_TC/sat/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/tslist [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_download_sat_event.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_download_sat_event.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.h [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.c [new file with mode: 0644]
TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.h [new file with mode: 0644]
TC/telephony_TC/sim/README [new file with mode: 0644]
TC/telephony_TC/sim/sim_common.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/async_util.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/async_util.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/log [new file with mode: 0644]
TC/telephony_TC/sim/unit/makefile [new file with mode: 0644]
TC/telephony_TC/sim/unit/sim_pw.txt [new file with mode: 0644]
TC/telephony_TC/sim/unit/tet_tapi_util.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/tslist [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_language.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_language.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_type.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_get_sim_type.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sim_access.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sim_access.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_set_sim_language.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_set_sim_language.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.h [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.c [new file with mode: 0644]
TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.h [new file with mode: 0644]
TC/telephony_TC/sms/README [new file with mode: 0644]
TC/telephony_TC/sms/sms_common.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/async_util.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/async_util.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/error [new file with mode: 0644]
TC/telephony_TC/sms/unit/makefile [new file with mode: 0644]
TC/telephony_TC/sms/unit/sms_callback_util.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/sms_callback_util.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/sms_util.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/sms_util.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/tet_tapi_util_new.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/tslist [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_count.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_count.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.h [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.c [new file with mode: 0644]
TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/async_util.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/async_util.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/makefile [new file with mode: 0644]
TC/telephony_TC/sound/unit/sound_callback_util.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/sound_callback_util.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/tet_macro.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/tslist [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_path.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_path.h [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.c [new file with mode: 0644]
TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.h [new file with mode: 0644]
TC/telephony_TC/ss/README [new file with mode: 0644]
TC/telephony_TC/ss/ss_common.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/makefile [new file with mode: 0644]
TC/telephony_TC/ss/unit/tet_tapi_util.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/tet_tapi_util.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/tslist [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.h [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.c [new file with mode: 0644]
TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.h [new file with mode: 0644]
TC/telephony_TC/tet_scen [new file with mode: 0644]
TC/telephony_TC/tetbuild.cfg [new file with mode: 0644]
TC/telephony_TC/tetclean.cfg [new file with mode: 0644]
TC/telephony_TC/tetexec.cfg [new file with mode: 0644]
TC/tet_scen [new file with mode: 0644]
TC/tslist.txt [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/libslp-tapi-0.install.in [new file with mode: 0644]
debian/libslp-tapi-dev.install.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
image/SLP_TelephonyFW_PG_image001.png [new file with mode: 0755]
image/SLP_TelephonyFW_PG_image002.png [new file with mode: 0755]
image/SLP_TelephonyFW_PG_image003.png [new file with mode: 0755]
image/SLP_TelephonyFW_PG_image004.png [new file with mode: 0755]
include/SLP_TelephonyFW_PG.h [new file with mode: 0644]
include/common/TapiCommon.h [new file with mode: 0644]
include/common/TapiEvent.h [new file with mode: 0644]
include/common/TapiUtility.h [new file with mode: 0644]
include/common/TelCall.h [new file with mode: 0644]
include/common/TelData.h [new file with mode: 0644]
include/common/TelDefines.h [new file with mode: 0644]
include/common/TelDisplay.h [new file with mode: 0644]
include/common/TelErr.h [new file with mode: 0644]
include/common/TelMisc.h [new file with mode: 0644]
include/common/TelNetText.h [new file with mode: 0644]
include/common/TelNetwork.h [new file with mode: 0644]
include/common/TelPower.h [new file with mode: 0644]
include/common/TelSat.h [new file with mode: 0644]
include/common/TelSatEnvelope.h [new file with mode: 0644]
include/common/TelSatObj.h [new file with mode: 0644]
include/common/TelSatProactvCmd.h [new file with mode: 0644]
include/common/TelSim.h [new file with mode: 0644]
include/common/TelSs.h [new file with mode: 0644]
include/common/TelUtility.h [new file with mode: 0644]
include/common/tel_cs_conn.h [new file with mode: 0644]
include/porting/tel_marshaler.h [new file with mode: 0644]
include/tapi/.gitignore [new file with mode: 0644]
include/tapi/ITapiCall.h [new file with mode: 0644]
include/tapi/ITapiCfg.h [new file with mode: 0644]
include/tapi/ITapiData.h [new file with mode: 0644]
include/tapi/ITapiGps.h [new file with mode: 0644]
include/tapi/ITapiMisc.h [new file with mode: 0644]
include/tapi/ITapiNetText.h [new file with mode: 0644]
include/tapi/ITapiNetwork.h [new file with mode: 0644]
include/tapi/ITapiOmadm.h [new file with mode: 0644]
include/tapi/ITapiPS.h [new file with mode: 0644]
include/tapi/ITapiPower.h [new file with mode: 0644]
include/tapi/ITapiProductivity.h [new file with mode: 0644]
include/tapi/ITapiSat.h [new file with mode: 0644]
include/tapi/ITapiSim.h [new file with mode: 0644]
include/tapi/ITapiSound.h [new file with mode: 0644]
include/tapi/ITapiSs.h [new file with mode: 0644]
include/tapi/tapi_proxy.h [new file with mode: 0644]
include/tapi/tapi_proxy_internal.h [new file with mode: 0644]
packaging/libslp-tapi.spec [new file with mode: 0644]
src/common_tapi_lib.c [new file with mode: 0644]
src/common_tapi_lib_internal.c [new file with mode: 0644]
src/porting/tel_marshaler.c [new file with mode: 0644]
src/tapi-lib.xml [new file with mode: 0644]
src/tapi_proxy_call.c [new file with mode: 0644]
src/tapi_proxy_cfg.c [new file with mode: 0644]
src/tapi_proxy_common.c [new file with mode: 0644]
src/tapi_proxy_data.c [new file with mode: 0644]
src/tapi_proxy_gprs.c [new file with mode: 0644]
src/tapi_proxy_gps.c [new file with mode: 0644]
src/tapi_proxy_misc.c [new file with mode: 0644]
src/tapi_proxy_nettext.c [new file with mode: 0644]
src/tapi_proxy_network.c [new file with mode: 0644]
src/tapi_proxy_omadm.c [new file with mode: 0644]
src/tapi_proxy_power.c [new file with mode: 0644]
src/tapi_proxy_productivity.c [new file with mode: 0644]
src/tapi_proxy_sat.c [new file with mode: 0644]
src/tapi_proxy_sim.c [new file with mode: 0644]
src/tapi_proxy_sound.c [new file with mode: 0644]
src/tapi_proxy_ss.c [new file with mode: 0644]
src/test_apps/Makefile [new file with mode: 0644]
src/test_apps/tapi_call_test.c [new file with mode: 0644]
src/test_apps/tapi_cdma_data_test.c [new file with mode: 0644]
src/test_apps/tapi_cfg_test.c [new file with mode: 0644]
src/test_apps/tapi_gps_test.c [new file with mode: 0644]
src/test_apps/tapi_misc_test.c [new file with mode: 0644]
src/test_apps/tapi_nw_test.c [new file with mode: 0644]
src/test_apps/tapi_power_test.c [new file with mode: 0644]
src/test_apps/tapi_ps_test.c [new file with mode: 0644]
src/test_apps/tapi_sat_test.c [new file with mode: 0644]
src/test_apps/tapi_sim_test.c [new file with mode: 0644]
src/test_apps/tapi_sms_test.c [new file with mode: 0644]
src/test_apps/tapi_sms_test.h [new file with mode: 0644]
src/test_apps/tapi_sms_util.c [new file with mode: 0644]
src/test_apps/tapi_sms_util.h [new file with mode: 0644]
src/test_apps/tapi_sound_test.c [new file with mode: 0644]
src/test_apps/tapi_ss_test.c [new file with mode: 0644]
src/test_apps/tapi_svc_test.c [new file with mode: 0644]
src/test_apps/tapi_test_app.c [new file with mode: 0644]
src/test_apps/tapi_test_utility.h [new file with mode: 0644]
tapi.pc.in [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..b9eed62
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,5 @@
+Jongman Park <jman.park@samsung.com>
+Danny Jeongseok Seo <s.seo@samsung.com>
+Kyeongchul Kim <kyeongchul.kim@samsung.com>
+Youngman Park <youngman.park@samsung.com>
+Inho Oh <inho48.oh@samsung.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..39f73c5
--- /dev/null
@@ -0,0 +1,178 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
+PROJECT(SLP-tapi C)
+SET(VERSION 0.0)
+
+
+### Global setting ###
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+
+MACRO(GET_TARGET_PROPERTY_WITH_DEFAULT _variable _target _property _default_value)
+       GET_TARGET_PROPERTY (${_variable} ${_target} ${_property})
+       IF (${_variable} MATCHES NOTFOUND)
+               SET (${_variable} ${_default_value})
+       ENDIF (${_variable} MATCHES NOTFOUND)
+ENDMACRO (GET_TARGET_PROPERTY_WITH_DEFAULT)
+
+MACRO(CREATE_LIBTOOL_FILE _target _install_DIR)
+       GET_TARGET_PROPERTY(_target_location ${_target} LOCATION)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_static_lib ${_target} STATIC_LIB "")
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dependency_libs ${_target} LT_DEPENDENCY_LIBS "")
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_current ${_target} LT_VERSION_CURRENT 0)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_age ${_target} LT_VERSION_AGE 0)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_revision ${_target} LT_VERSION_REVISION 0)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_installed ${_target} LT_INSTALLED yes)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK yes)
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlopen ${_target} LT_DLOPEN "")
+       GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlpreopen ${_target} LT_DLPREOPEN "")
+       GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE)
+       GET_FILENAME_COMPONENT(_soname ${_target_location} NAME)
+       SET(_laname2 ${_laname}.la)
+       SET(_laname ${PROJECT_BINARY_DIR}/${_laname}.la)
+       FILE(WRITE ${_laname} "# ${_laname2} - a libtool library file\n")
+       FILE(APPEND ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n")
+       FILE(APPEND ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" )
+       FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n")
+       FILE(APPEND ${_laname} "dlname='${_soname}'\n\n")
+       FILE(APPEND ${_laname} "# Names of this library.\n")
+       FILE(APPEND ${_laname} "library_names='${_soname}.${_target_current}.${_target_age}.${_target_revision} ${_soname}.${_target_current} ${_soname}'\n\n")
+       FILE(APPEND ${_laname} "# The name of the static archive.\n")
+       FILE(APPEND ${_laname} "old_library='${_target_static_lib}'\n\n")
+       FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n")
+       FILE(APPEND ${_laname} "dependency_libs='${_target_dependency_libs}'\n\n")
+       FILE(APPEND ${_laname} "# Names of additional weak libraries provided by this library\n")
+       FILE(APPEND ${_laname} "weak_library_names=\n\n")
+       FILE(APPEND ${_laname} "# Version information for ${_laname2}.\n")
+       FILE(APPEND ${_laname} "current=${_target_current}\n")
+       FILE(APPEND ${_laname} "age=${_target_age}\n")
+       FILE(APPEND ${_laname} "revision=${_target_revision}\n\n")
+       FILE(APPEND ${_laname} "# Is this an already installed library?\n")
+       FILE(APPEND ${_laname} "installed=${_target_installed}\n\n")
+       FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\n")
+       FILE(APPEND ${_laname} "shouldnotlink=${_target_shouldnotlink}\n\n")
+       FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\n")
+       FILE(APPEND ${_laname} "dlopen='${_target_dlopen}'\n")
+       FILE(APPEND ${_laname} "dlpreopen='${_target_dlpreopen}'\n\n")
+       FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n")
+       FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}${_install_DIR}'\n")
+       INSTALL( FILES ${_laname} DESTINATION ${CMAKE_INSTALL_PREFIX}${_install_DIR})
+ENDMACRO(CREATE_LIBTOOL_FILE)
+
+
+# Build type : Release
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF()
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+
+# Set required packages
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED vconf glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 dlog security-server)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+
+# Compiler flags
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/common
+               ${CMAKE_SOURCE_DIR}/include/tapi
+               ${CMAKE_SOURCE_DIR}/include/porting)
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wl,-zdefs" )
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+SET(CMAKE_SKIP_BUILD_RPATH true)
+
+
+# Get uname value to set 'TARGET' definition
+# TODO: Is this needed?
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       ADD_DEFINITIONS("-D_TELEPHONY_ARM_ONEDRAM")
+       ADD_DEFINITIONS("-D_ARM_TOUCH -DFEATURE_GPS_XTRA")
+       MESSAGE("add -DTARGET")
+ELSE()
+       ADD_DEFINITIONS("-D_SIMUL_TOUCH -DFEATURE_GPS_XTRA")
+ENDIF()
+
+
+ADD_DEFINITIONS("-D_CP_INFINEON_")
+#ADD_DEFINITIONS("-D_CP_QUALCOMM_")
+
+ADD_DEFINITIONS("-D_MACHINE_AQUILA_")
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+
+ADD_DEFINITIONS("-DTELEPHONY_TIMER")
+ADD_DEFINITIONS("-DFEATURE_TELEPHONY_GPS")
+ADD_DEFINITIONS("-D_TAPI_DEBUG_ON_DEBUG_VIEWER_")
+ADD_DEFINITIONS("-DLARGE_ICON")
+ADD_DEFINITIONS(" -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" ")
+
+
+# Linker flags
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+
+### Build ###
+SET(SRCS
+               src/tapi_proxy_common.c
+               src/tapi_proxy_network.c
+               src/tapi_proxy_sim.c
+               src/tapi_proxy_ss.c
+               src/tapi_proxy_call.c
+               src/tapi_proxy_nettext.c
+               src/tapi_proxy_sat.c
+               src/common_tapi_lib.c
+               src/tapi_proxy_sound.c
+               src/tapi_proxy_gprs.c
+               src/porting/tel_marshaler.c
+               src/common_tapi_lib_internal.c
+               src/tapi_proxy_cfg.c
+               src/tapi_proxy_productivity.c
+               src/tapi_proxy_power.c
+               src/tapi_proxy_gps.c
+               src/tapi_proxy_omadm.c
+               src/tapi_proxy_misc.c
+               src/tapi_proxy_data.c
+   )
+
+ADD_CUSTOM_TARGET(tapi-lib-proxy.h
+               COMMAND dbus-binding-tool --prefix= --mode=glib-client --output=${CMAKE_CURRENT_SOURCE_DIR}/include/tapi/tapi-lib-proxy.h ${CMAKE_CURRENT_SOURCE_DIR}/src/tapi-lib.xml)
+
+#ADD_LIBRARY(SLP-tapi_STATIC STATIC ${SRCS})
+#TARGET_LINK_LIBRARIES(SLP-tapi_STATIC ${pkgs_LDFLAGS})
+#SET_TARGET_PROPERTIES(SLP-tapi_STATIC PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME SLP-tapi)
+#ADD_DEPENDENCIES(SLP-tapi_STATIC tapi-lib-proxy.h)
+
+ADD_LIBRARY(SLP-tapi_SHARED SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(SLP-tapi_SHARED ${pkgs_LDFLAGS})
+SET_TARGET_PROPERTIES(SLP-tapi_SHARED PROPERTIES VERSION 0.0.0 SOVERSION 0 OUTPUT_NAME SLP-tapi)
+CREATE_LIBTOOL_FILE(SLP-tapi_SHARED /lib)
+
+ADD_DEPENDENCIES(SLP-tapi_SHARED tapi-lib-proxy.h)
+
+# pkgconfig file
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+CONFIGURE_FILE(tapi.pc.in tapi.pc @ONLY)
+
+
+### Install ###
+#INSTALL(TARGETS SLP-tapi_STATIC SLP-tapi_SHARED DESTINATION lib)
+#INSTALL(TARGETS SLP-tapi_STATIC SLP-tapi_SHARED DESTINATION lib COMPONENT Development)
+#INSTALL(TARGETS SLP-tapi DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(TARGETS SLP-tapi_SHARED DESTINATION lib COMPONENT Runtime)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/common DESTINATION include/telephony)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/tapi DESTINATION include/telephony)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tapi.pc DESTINATION lib/pkgconfig)
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..9c13a9b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+\r
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0\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
diff --git a/TC/making_new_tet_scen.py b/TC/making_new_tet_scen.py
new file mode 100755 (executable)
index 0000000..6c5b845
--- /dev/null
@@ -0,0 +1,69 @@
+#!/usr/bin/python
+
+#############################################
+# tet_scen  auto generator
+#
+# ** argv[1] = TC root
+#############################################
+
+import sys,string,os
+
+
+write_file = open("tet_scen", 'w')
+
+#
+# making new tet_scen
+#
+def making_tet_scen (filename):
+       #tmp_list = filename.strip().split('/')
+       n_filename = filename.replace(' ', '\\ ')
+       #print n_filename
+       #new_path = "/"+ sys.argv[1] +"/"+n_filename[2:-6]
+       new_path = "/"+n_filename[:-6]
+       #print new_path
+       file = open(filename, 'r')
+       lines = file.readlines()
+       for line in lines:
+               if len(line.strip()) > 1:
+                       list = line.strip().split('/')
+                       #print new_path + list[-1]
+                       write_file.write("\t"+new_path+list[-1]+"\n")
+
+#
+# usage()
+#
+def usage():
+       print(" ")
+       print("./making_new_tet_scen.py tc_root")
+       print("Put the Test Case's root directory.")
+       print("Do not include '/' at the end")
+       print(" ")
+
+#
+# main()
+#
+def main():
+       if len(sys.argv) < 2:
+               usage()
+               sys.exit(0)
+               
+       os.system('find '+ sys.argv[1] +' -name "tslist" > tslist.txt')
+       
+       #write_file = open("tetscen", w)
+       write_file.write("# auto generated tet_scen\n")
+       write_file.write("all\n")
+       write_file.write("\t\"Starting Full Test Suite\"\n")
+       
+       for file in open("tslist.txt", 'r'):
+               #print file.strip()
+               making_tet_scen(file.strip())
+                       
+       write_file.write("\t\"Completed Full Test Suite\"\n")
+       write_file.write("# EOF\n")
+       write_file.close()
+       print(" ")
+       print("==============================")
+       print("New tet_scen file is made~~~~")
+       print("==============================")
+       print(" ")
+main()
diff --git a/TC/telephony_TC/CFG/cfg_util.c b/TC/telephony_TC/CFG/cfg_util.c
new file mode 100644 (file)
index 0000000..a5fb7f3
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "cfg_util.h"
+
+static unsigned int subscription_id[7];
+GMainLoop *main_loop = NULL;
+
+void  app_cfg_callback (TelTapiEvent_t * TapiEvent)
+{
+
+       TelTapiEventClass_t     eventClass;
+       TelTapiEventType_t      eventType;
+       int                             requestId;
+       int                             status;
+       void                    *EventData = NULL;
+
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = TapiEvent->pData;
+
+       printf("\nClass:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if( EventData==NULL)
+       {
+               printf("\n******  EventData is NULL.........   ******\n");
+       }
+
+       switch(eventClass)
+       {
+                       case TAPI_EVENT_CLASS_CFG:
+                               switch(eventType)
+                               {
+                                       case TAPI_EVENT_CFG_GET_A_KEY_CNF :
+                                               printf("***  TAPI_EVENT_CFG_GET_A_KEY_CNF received : %x ****\n", eventType);
+                                               break;
+
+                                       case TAPI_EVENT_CFG_VERIFY_A_KEY_CNF:
+                                               printf("*** TAPI_EVENT_CFG_VERIFY_A_KEY_CNF received  : %x ****\n", eventType);
+                                               break;
+
+                                       case TAPI_EVENT_CFG_GET_MSL_INFO_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_MSL_INFO_CNF received : %x ****\n", eventType);
+                                               break;
+
+                                       case TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF received : %x ****\n", eventType);
+                                               break;
+
+                                       case TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF:
+                                               printf("***  TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF received : %x ****\n", eventType);
+                                               break;
+
+                                       case TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF received : %x ****\n", eventType);
+                                               break;
+                                       case TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF:
+                                               printf("***  TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF received : %x ****\n", eventType);
+                                               break;
+                                        case TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF received : %x ****\n", eventType);
+                                               break;
+                                         case TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF:
+                                               printf("***  TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF received : %x ****\n", eventType);
+                                               break;
+                                         case TAPI_EVENT_CFG_GET_SIO_MODE_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_SIO_MODE_CNF received : %x ****\n", eventType);
+                                               break;
+                                          case         TAPI_EVENT_CFG_SET_SIO_MODE_CNF:
+                                               printf("***  TAPI_EVENT_CFG_SET_SIO_MODE_CNF received : %x ****\n", eventType);
+                                               break;
+                                         case  TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF:
+                                               printf("***  TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF received : %x ****\n", eventType);
+                                               break;
+                                         case  TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF:
+                                               printf("*** TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF received : %x ****\n", eventType);
+                                               break;
+                                         case  TAPI_EVENT_CFG_SET_TTY_MODE_CNF:
+                                               printf("***     TAPI_EVENT_CFG_SET_TTY_MODE_CNF received : %x ****\n", eventType);
+                                               break;
+                                        
+                                        case   TAPI_EVENT_CFG_GET_TTY_MODE_CNF:
+                                               printf("***     TAPI_EVENT_CFG_GET_TTY_MODE_CNF received : %x ****\n", eventType);
+                                               break;
+                                       default:
+                                               printf("***  Default Event  %x ****\n", eventType);
+                                               break;
+
+                               }
+
+                               break;
+
+                       default:
+                               printf("*** Other TAPI EVENT received : class : %x ****\n", eventClass);
+                               break;
+       }
+
+}
+
+
+int gmain_loop_for_tapi_events(int delay)
+{
+       main_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add (delay, TimeOutFun, NULL);
+       g_main_loop_run (main_loop);
+
+       return 0;
+}
+
+void print_all_subsciption_ids()
+{
+       int i=0;
+       for(i=0;i<7;i++)
+       {
+               printf("\n subscription_id[%d] has value %d \n",i,subscription_id[i]);
+       }
+}
+
+
+TapiResult_t register_all_events()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_register_event(TAPI_EVENT_CFG_GET_A_KEY_CNF, &subscription_id[0], app_cfg_callback);
+
+       api_err = tel_register_event(TAPI_EVENT_CFG_VERIFY_A_KEY_CNF, &subscription_id[1], app_cfg_callback);
+       api_err = tel_register_event(TAPI_EVENT_CFG_GET_MSL_INFO_CNF, &subscription_id[2], app_cfg_callback);
+       api_err = tel_register_event(TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF, &subscription_id[3],app_cfg_callback);
+       api_err = tel_register_event(TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF, &subscription_id[4], app_cfg_callback);
+       api_err = tel_register_event(TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF, &subscription_id[5], app_cfg_callback);
+       api_err = tel_register_event(TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF, &subscription_id[6], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF, &subscription_id[7], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF, &subscription_id[8], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_GET_SIO_MODE_CNF, &subscription_id[9], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_SET_SIO_MODE_CNF, &subscription_id[10], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF, &subscription_id[11], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF, &subscription_id[12], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_SET_TTY_MODE_CNF, &subscription_id[13], app_cfg_callback);
+        api_err = tel_register_event(TAPI_EVENT_CFG_GET_TTY_MODE_CNF, &subscription_id[14], app_cfg_callback);
+
+       print_all_subsciption_ids();
+       return 0;
+}
+
+
+ TapiResult_t deregister_all()
+{
+  int i ;
+        for(i=0 ;i<=14; i++)
+        {
+       tel_deregister_event(subscription_id[i]);
+        }
+       
+       return 0;
+
+}
+
+
diff --git a/TC/telephony_TC/CFG/cfg_util.h b/TC/telephony_TC/CFG/cfg_util.h
new file mode 100644 (file)
index 0000000..767dfb4
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _CFG_UTIL_H_
+#define _CFG_UTIL_H_
+
+
+#include <stdlib.h>
+#include <signal.h>
+#include <errno.h>
+#include "string.h"
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <glib.h>
+#include <pthread.h>
+#include <stdio.h>
+#include <ITapiCfg.h>
+
+
+#include <ITapiSound.h>
+#include <tet_api.h>
+#include "tet_macro.h"
+#include <gconf/gconf-client.h>
+#include <ITapiCall.h>
+#include <TapiCommon.h>
+#include <tapi_err.h>
+#include "async_util.h"
+
+
+
+#define TIME_DELAY 5000
+
+//extern void  app_sound_callback (TelTapiEvent_t * TapiEvent);
+
+extern TapiResult_t register_all_events();
+extern  TapiResult_t deregister_all();
+void print_all_subsciption_ids();
+extern int gmain_loop_for_tapi_events(int delay);
+extern gboolean TimeOutFun (void *data);
+void  app_cfg_callback (TelTapiEvent_t * TapiEvent);
+
+#endif //_CFG_UTIL_H_
diff --git a/TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.c b/TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.c
new file mode 100644 (file)
index 0000000..c892987
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_set_cfg_default_configuration
+* @brief Unit test cases for tel_set_cfg_default_configuration()
+* @par Test function Prototype:
+*      TapiResult_t   tel_set_cfg_default_configuration( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_set_cfg_default_configuration.c
+* @brief       This is a suite of unit test cases to test tel_set_cfg_default_configuration() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_set_cfg_default_configuration.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_cfg_default_configuration_000, 1},
+       {utc_tel_set_cfg_default_configuration_001, 2},
+        {utc_tel_set_cfg_default_configuration_002, 3},
+        {utc_tel_set_cfg_default_configuration_003, 4},
+        {utc_tel_set_cfg_default_configuration_004, 5},
+        {utc_tel_set_cfg_default_configuration_005, 6},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_set_cfg_default_configuration_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration(TAPI_CFG_DEFAULT_FULL);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_set_cfg_default_configuration_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration(TAPI_CFG_DEFAULT_FACTORY);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_default_configuration_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration( TAPI_CFG_DEFAULT_SERVICE);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_002 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_002 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_default_configuration_003()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration( TAPI_CFG_DEFAULT_SERVICE);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_003 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_003 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_default_configuration_004()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration( TAPI_CFG_DEFAULT_MODE_MAX);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_004 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_004 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+void utc_tel_set_cfg_default_configuration_005()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_set_cfg_default_configuration(-1);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_default_configuration_004 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_default_configuration_004 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.h b/TC/telephony_TC/CFG/uts_tel_cfg_default_configuration.h
new file mode 100644 (file)
index 0000000..bb1c130
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_set_cfg_default_configuration.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TAPI_CFG_GET_TTY_MODE_H_
+#define _UTS_TAPI_CFG_GET_TTY_MODE_H_
+
+       static void utc_tel_set_cfg_default_configuration_000();
+       static void utc_tel_set_cfg_default_configuration_001();
+        static void utc_tel_set_cfg_default_configuration_002();
+        static void utc_tel_set_cfg_default_configuration_003();
+        static void utc_tel_set_cfg_default_configuration_004();
+        static void utc_tel_set_cfg_default_configuration_005();
+       
+
+#endif //_UTS_TAPI_CFG_GET_TTY_MODE_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_akey.c b/TC/telephony_TC/CFG/uts_tel_get_cfg_akey.c
new file mode 100644 (file)
index 0000000..8fc9101
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_get_cfg_akey
+* @brief Unit test cases for tel_get_cfg_akey()
+* @par Test function Prototype:
+*      TapiResult_t   tel_get_cfg_akey( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_get_cfg_akey.c
+* @brief       This is a suite of unit test cases to test tel_get_cfg_akey() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_get_cfg_akey.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_cfg_akey_000, 1},
+       {utc_tel_get_cfg_akey_001, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_get_cfg_akey_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tel_set_cfg_default_configuration(TAPI_CFG_DEFAULT_FULL);
+        ret_status = tel_get_cfg_akey();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_akey_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_akey_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_get_cfg_akey_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_get_cfg_akey();
+        ret_status = tel_get_cfg_akey();
+        ret_status = tel_get_cfg_akey();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_akey_001 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_akey_001 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_akey.h b/TC/telephony_TC/CFG/uts_tel_get_cfg_akey.h
new file mode 100644 (file)
index 0000000..2382d13
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_set_cfg_default_configuration.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TAPI_CFG_GET_TTY_MODE_H_
+#define _UTS_TAPI_CFG_GET_TTY_MODE_H_
+
+       static void utc_tel_get_cfg_akey_000();
+       static void utc_tel_get_cfg_akey_001();
+       
+       
+
+#endif //_UTS_TAPI_CFG_GET_TTY_MODE_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.c b/TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.c
new file mode 100644 (file)
index 0000000..56ae4b3
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_get_cfg_hidden_menu_access
+* @brief Unit test cases for tel_get_cfg_hidden_menu_access()
+* @par Test function Prototype:
+*      TapiResult_t   tel_get_cfg_hidden_menu_access() 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_get_cfg_hidden_menu_access.c
+* @brief       This is a suite of unit test cases to test tel_get_cfg_hidden_menu_access() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_get_cfg_hidden_menu_access.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_cfg_hidden_menu_access_000, 1},
+       {utc_tel_get_cfg_hidden_menu_access_001, 2},
+        {utc_tel_get_cfg_hidden_menu_access_002, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_get_cfg_hidden_menu_access_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        
+        tel_set_cfg_hidden_menu_access(TAPI_CFG_HIDDEN_MENU_ENABLE);
+        ret_status = tel_get_cfg_hidden_menu_access();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_hidden_menu_access_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_hidden_menu_access_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_get_cfg_hidden_menu_access_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_hidden_menu_access(TAPI_CFG_HIDDEN_MENU_DISABLE);
+        ret_status = tel_get_cfg_hidden_menu_access();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_hidden_menu_access_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_hidden_menu_access_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_hidden_menu_access_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+      
+        tel_set_cfg_hidden_menu_access(-1);
+        ret_status = tel_get_cfg_hidden_menu_access();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_hidden_menu_access_002 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_hidden_menu_access_002 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.h b/TC/telephony_TC/CFG/uts_tel_get_cfg_hidden_menu_access.h
new file mode 100644 (file)
index 0000000..eaea1a4
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_get_cfg_vocoder_option.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TEL_GET_CFG_HIDDEN_MENU_ACCESS_H_
+#define _UTS_TEL_GET_CFG_HIDDEN_MENU_ACCESS_H_
+
+       static void utc_tel_get_cfg_hidden_menu_access_000();
+       static void utc_tel_get_cfg_hidden_menu_access_001();
+        static void utc_tel_get_cfg_hidden_menu_access_002();
+        
+       
+
+#endif //_UTS_TEL_GET_CFG_HIDDEN_MENU_ACCESS_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.c b/TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.c
new file mode 100644 (file)
index 0000000..a988594
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_get_cfg_msl_info
+* @brief Unit test cases for tel_get_cfg_msl_info()
+* @par Test function Prototype:
+*      TapiResult_t   tel_get_cfg_msl_info( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_get_cfg_msl_info.c
+* @brief       This is a suite of unit test cases to test tel_get_cfg_msl_info() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_get_cfg_msl_info.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_cfg_msl_info_000, 1},
+       {utc_tel_get_cfg_msl_info_001, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_get_cfg_msl_info_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tel_set_cfg_default_configuration(TAPI_CFG_DEFAULT_FULL);
+        ret_status = tel_get_cfg_msl_info();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_msl_info_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_msl_info_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_get_cfg_msl_info_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_get_cfg_msl_info();
+        ret_status = tel_get_cfg_msl_info();
+        ret_status = tel_get_cfg_msl_info();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_msl_info_001 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_msl_info_001 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.h b/TC/telephony_TC/CFG/uts_tel_get_cfg_msl_info.h
new file mode 100644 (file)
index 0000000..2626e1d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_get_cfg_msl_info.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TAPI_GET_CFG_TMSL_INFO_H_
+#define _UTS_TAPI_GET_CFG_TMSL_INFO_H_
+
+       static void utc_tel_get_cfg_msl_info_000();
+       static void utc_tel_get_cfg_msl_info_001();
+       
+       
+
+#endif //_UTS_TAPI_GET_CFG_TMSL_INFO_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.c b/TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.c
new file mode 100644 (file)
index 0000000..cfeefe8
--- /dev/null
@@ -0,0 +1,422 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_set_TTY_MODE tel_get_cfg_serving_carrier
+* @brief Unit test cases for tel_get_cfg_serving_carrier()
+* @par Test function Prototype:
+*      TapiResult_t   tel_get_cfg_serving_carrier( int *pRequestID) 
+* @par Test function description:
+* It requests to set tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_set_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_get_cfg_serving_carrier.c
+* @brief       This is a suite of unit test cases to test tel_get_cfg_serving_carrier() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_get_cfg_serving_carrier.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_cfg_serving_carrier_000, 1},
+       {utc_tel_get_cfg_serving_carrier_001, 2},
+        {utc_tel_get_cfg_serving_carrier_002, 3},
+        {utc_tel_get_cfg_serving_carrier_003, 4},
+        {utc_tel_get_cfg_serving_carrier_004, 5},
+        {utc_tel_get_cfg_serving_carrier_005, 6},
+        {utc_tel_get_cfg_serving_carrier_006, 7},
+        {utc_tel_get_cfg_serving_carrier_007, 8},
+        {utc_tel_get_cfg_serving_carrier_008, 9},
+        {utc_tel_get_cfg_serving_carrier_009, 10},
+        {utc_tel_get_cfg_serving_carrier_010, 11},
+        {utc_tel_get_cfg_serving_carrier_011, 12},
+        {utc_tel_get_cfg_serving_carrier_012, 13},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_get_cfg_serving_carrier_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(TAPI_CFG_CARRIER_TEST);
+        ret_status = tel_get_cfg_serving_carrier();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_get_cfg_serving_carrier_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SKT);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(TAPI_CFG_CARRIER_KTF);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_002 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_002 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_003()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_LGT);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_003 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_003 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_004()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_VERIZON);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_004 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_004 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_005()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SPRINT);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_005 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_005 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_006()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_ALLTEL);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_006 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_006 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_007()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(  TAPI_CFG_CARRIER_TELUS);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_007 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_007 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_008()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(TAPI_CFG_CARRIER_BMC);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_008 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_008 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_009()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_ALIANT);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_009 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_009 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_010()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SASKTEL);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_010 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_010 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_011()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(  TAPI_CFG_CARRIER_MTS);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_011 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_011 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_serving_carrier_012()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_serving_carrier(-1);
+        ret_status = tel_get_cfg_serving_carrier();
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_serving_carrier_012 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_serving_carrier_012 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.h b/TC/telephony_TC/CFG/uts_tel_get_cfg_serving_carrier.h
new file mode 100644 (file)
index 0000000..83ac180
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_get_cfg_serving_carrier.h
+* @brief    This is the implementaion file for the test case of setting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TEL_GET_CFG_SERVING_CARRIER_H_
+#define _UTS_TEL_GET_CFG_SERVING_CARRIER_H_
+
+       static void utc_tel_get_cfg_serving_carrier_000();
+       static void utc_tel_get_cfg_serving_carrier_001();
+        static void utc_tel_get_cfg_serving_carrier_002();
+        static void utc_tel_get_cfg_serving_carrier_003();
+        static void utc_tel_get_cfg_serving_carrier_004();
+        static void utc_tel_get_cfg_serving_carrier_005();
+        static void utc_tel_get_cfg_serving_carrier_006();
+        static void utc_tel_get_cfg_serving_carrier_007();
+        static void utc_tel_get_cfg_serving_carrier_008();
+        static void utc_tel_get_cfg_serving_carrier_009();
+        static void utc_tel_get_cfg_serving_carrier_010();
+        static void utc_tel_get_cfg_serving_carrier_011();
+        static void utc_tel_get_cfg_serving_carrier_012();
+       
+       
+
+#endif //_UTS_TEL_GET_CFG_SERVING_CARRIER_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.c b/TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.c
new file mode 100644 (file)
index 0000000..7e8f744
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_get_cfg_vocoder_option
+* @brief Unit test cases for tel_get_cfg_vocoder_option()
+* @par Test function Prototype:
+*      TapiResult_t   tel_get_cfg_vocoder_option( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_get_cfg_vocoder_option.c
+* @brief       This is a suite of unit test cases to test tel_get_cfg_vocoder_option() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_get_cfg_vocoder_option.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_cfg_vocoder_option_000, 1},
+       {utc_tel_get_cfg_vocoder_option_001, 2},
+        {utc_tel_get_cfg_vocoder_option_002, 3},
+        {utc_tel_get_cfg_vocoder_option_003, 4},
+        {utc_tel_get_cfg_vocoder_option_004, 5},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_get_cfg_vocoder_option_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_DEFAULT);
+        ret_status = tel_get_cfg_vocoder_option();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_vocoder_option_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_vocoder_option_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_get_cfg_vocoder_option_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_EVRC);
+        ret_status = tel_get_cfg_vocoder_option();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_vocoder_option_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_vocoder_option_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_vocoder_option_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_13K);
+        ret_status = tel_get_cfg_vocoder_option();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_vocoder_option_002 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_vocoder_option_002 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_vocoder_option_003()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_8K);
+        ret_status = tel_get_cfg_vocoder_option();
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_vocoder_option_003 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_vocoder_option_003 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_get_cfg_vocoder_option_004()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        tel_set_cfg_vocoder_option( -1);
+        ret_status = tel_get_cfg_vocoder_option(); 
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_get_cfg_vocoder_option_004 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_get_cfg_vocoder_option_004 has passed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.h b/TC/telephony_TC/CFG/uts_tel_get_cfg_vocoder_option.h
new file mode 100644 (file)
index 0000000..6645d61
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_get_cfg_vocoder_option.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TAPI_GET_CFG_TMSL_INFO_H_
+#define _UTS_TAPI_GET_CFG_TMSL_INFO_H_
+
+       static void utc_tel_get_cfg_vocoder_option_000();
+       static void utc_tel_get_cfg_vocoder_option_001();
+        static void utc_tel_get_cfg_vocoder_option_002();
+        static void utc_tel_get_cfg_vocoder_option_003();
+        static void utc_tel_get_cfg_vocoder_option_004();
+       
+       
+
+#endif //_UTS_TAPI_GET_CFG_TMSL_INFO_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.c b/TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.c
new file mode 100644 (file)
index 0000000..6471897
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_set_cfg_hidden_menu_access
+* @brief Unit test cases for tel_set_cfg_hidden_menu_access()
+* @par Test function Prototype:
+*      TapiResult_t   tel_set_cfg_hidden_menu_access( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_set_cfg_hidden_menu_access.c
+* @brief       This is a suite of unit test cases to test tel_set_cfg_hidden_menu_access() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_set_cfg_hidden_menu_access.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_cfg_hidden_menu_access_000, 1},
+       {utc_tel_set_cfg_hidden_menu_access_001, 2},
+        {utc_tel_set_cfg_hidden_menu_access_002, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_set_cfg_hidden_menu_access_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        
+        ret_status = tel_set_cfg_hidden_menu_access(TAPI_CFG_HIDDEN_MENU_ENABLE);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_hidden_menu_access_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_hidden_menu_access_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_set_cfg_hidden_menu_access_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_hidden_menu_access(TAPI_CFG_HIDDEN_MENU_DISABLE);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_hidden_menu_access_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_hidden_menu_access_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_hidden_menu_access_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+      
+        ret_status = tel_set_cfg_hidden_menu_access(-1);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_hidden_menu_access_002 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_hidden_menu_access_002 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.h b/TC/telephony_TC/CFG/uts_tel_set_cfg_hidden_menu_access.h
new file mode 100644 (file)
index 0000000..bd2231b
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_get_cfg_vocoder_option.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TEL_SET_CFG_HIDDEN_MENU_ACCESS_H_
+#define _UTS_TEL_SET_CFG_HIDDEN_MENU_ACCESS_H_
+
+       static void utc_tel_set_cfg_hidden_menu_access_000();
+       static void utc_tel_set_cfg_hidden_menu_access_001();
+        static void utc_tel_set_cfg_hidden_menu_access_002();
+        
+       
+
+#endif //_UTS_TEL_SET_CFG_HIDDEN_MENU_ACCESS_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.c b/TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.c
new file mode 100644 (file)
index 0000000..e31f268
--- /dev/null
@@ -0,0 +1,409 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_set_TTY_MODE tel_set_cfg_serving_carrier
+* @brief Unit test cases for tel_set_cfg_serving_carrier()
+* @par Test function Prototype:
+*      TapiResult_t   tel_set_cfg_serving_carrier( int *pRequestID) 
+* @par Test function description:
+* It requests to set tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_set_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_set_cfg_serving_carrier.c
+* @brief       This is a suite of unit test cases to test tel_set_cfg_serving_carrier() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_set_cfg_serving_carrier.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_cfg_serving_carrier_000, 1},
+       {utc_tel_set_cfg_serving_carrier_001, 2},
+        {utc_tel_set_cfg_serving_carrier_002, 3},
+        {utc_tel_set_cfg_serving_carrier_003, 4},
+        {utc_tel_set_cfg_serving_carrier_004, 5},
+        {utc_tel_set_cfg_serving_carrier_005, 6},
+        {utc_tel_set_cfg_serving_carrier_006, 7},
+        {utc_tel_set_cfg_serving_carrier_007, 8},
+        {utc_tel_set_cfg_serving_carrier_008, 9},
+        {utc_tel_set_cfg_serving_carrier_009, 10},
+        {utc_tel_set_cfg_serving_carrier_010, 11},
+        {utc_tel_set_cfg_serving_carrier_011, 12},
+        {utc_tel_set_cfg_serving_carrier_012, 13},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_set_cfg_serving_carrier_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = ret_status = tel_set_cfg_serving_carrier(  TAPI_CFG_CARRIER_TEST);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_set_cfg_serving_carrier_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SKT);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier(TAPI_CFG_CARRIER_KTF);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_002 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_002 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_003()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_LGT);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_003 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_003 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_004()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_VERIZON);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_004 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_004 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_005()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SPRINT);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_005 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_005 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_006()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_ALLTEL);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_006 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_006 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_007()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier(  TAPI_CFG_CARRIER_TELUS);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_007 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_007 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_008()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier(TAPI_CFG_CARRIER_BMC);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_008 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_008 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_009()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_ALIANT);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_009 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_009 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_010()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier( TAPI_CFG_CARRIER_SASKTEL);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_010 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_010 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_011()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier(  TAPI_CFG_CARRIER_MTS);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_011 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_011 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_serving_carrier_012()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_serving_carrier(-1);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_serving_carrier_012 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_serving_carrier_012 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.h b/TC/telephony_TC/CFG/uts_tel_set_cfg_serving_carrier.h
new file mode 100644 (file)
index 0000000..67e8f85
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_set_cfg_serving_carrier.h
+* @brief    This is the implementaion file for the test case of setting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TEL_SET_CFG_SERVING_CARRIER_H_
+#define _UTS_TEL_SET_CFG_SERVING_CARRIER_H_
+
+       static void utc_tel_set_cfg_serving_carrier_000();
+       static void utc_tel_set_cfg_serving_carrier_001();
+        static void utc_tel_set_cfg_serving_carrier_002();
+        static void utc_tel_set_cfg_serving_carrier_003();
+        static void utc_tel_set_cfg_serving_carrier_004();
+        static void utc_tel_set_cfg_serving_carrier_005();
+        static void utc_tel_set_cfg_serving_carrier_006();
+        static void utc_tel_set_cfg_serving_carrier_007();
+        static void utc_tel_set_cfg_serving_carrier_008();
+        static void utc_tel_set_cfg_serving_carrier_009();
+        static void utc_tel_set_cfg_serving_carrier_010();
+        static void utc_tel_set_cfg_serving_carrier_011();
+        static void utc_tel_set_cfg_serving_carrier_012();
+       
+       
+
+#endif //_UTS_TEL_SET_CFG_SERVING_CARRIER_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.c b/TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.c
new file mode 100644 (file)
index 0000000..fe13b34
--- /dev/null
@@ -0,0 +1,225 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_set_TTY_MODE tel_set_cfg_vocoder_option
+* @brief Unit test cases for tel_set_cfg_vocoder_option()
+* @par Test function Prototype:
+*      TapiResult_t   tel_set_cfg_vocoder_option( int *pRequestID) 
+* @par Test function description:
+* It requests to set tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_set_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_set_cfg_vocoder_option.c
+* @brief       This is a suite of unit test cases to test tel_set_cfg_vocoder_option() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_set_cfg_vocoder_option.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_cfg_vocoder_option_000, 1},
+       {utc_tel_set_cfg_vocoder_option_001, 2},
+        {utc_tel_set_cfg_vocoder_option_002, 3},
+        {utc_tel_set_cfg_vocoder_option_003, 4},
+        {utc_tel_set_cfg_vocoder_option_004, 5},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_set_cfg_vocoder_option_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = ret_status = tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_DEFAULT);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_vocoder_option_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_vocoder_option_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_set_cfg_vocoder_option_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_EVRC);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_vocoder_option_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_vocoder_option_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_vocoder_option_002()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_13K);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_vocoder_option_002 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_vocoder_option_002 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_vocoder_option_003()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_vocoder_option( TAPI_CFG_VOC_OPTION_8K);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_vocoder_option_003 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_vocoder_option_003 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+void utc_tel_set_cfg_vocoder_option_004()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+        ret_status = tel_set_cfg_vocoder_option( -1);
+         
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_set_cfg_vocoder_option_004 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_cfg_vocoder_option_004 has passed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.h b/TC/telephony_TC/CFG/uts_tel_set_cfg_vocoder_option.h
new file mode 100644 (file)
index 0000000..b7f57cb
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_set_cfg_vocoder_option.h
+* @brief    This is the implementaion file for the test case of setting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TEL_SET_CFG_VOCODER_OPTION_H_
+#define _UTS_TEL_SET_CFG_VOCODER_OPTION_H_
+
+       static void utc_tel_set_cfg_vocoder_option_000();
+       static void utc_tel_set_cfg_vocoder_option_001();
+        static void utc_tel_set_cfg_vocoder_option_002();
+        static void utc_tel_set_cfg_vocoder_option_003();
+        static void utc_tel_set_cfg_vocoder_option_004();
+       
+       
+
+#endif //_UTS_TEL_SET_CFG_VOCODER_OPTION_H_
+
diff --git a/TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.c b/TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.c
new file mode 100644 (file)
index 0000000..5352a4b
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup TELEPHONY_API TelephonyAPI
+* @addtogroup CONFIG Configuration
+*/
+
+/**
+* @ingroup  CONFIG Configuration
+* @addtogroup UTS_CONFIG Unit
+*/
+
+/**
+* @ingroup  UTS_CONFIG
+* @addtogroup UTS_TAPI_CFG_GET_TTY_MODE tel_verify_cfg_akey
+* @brief Unit test cases for tel_verify_cfg_akey()
+* @par Test function Prototype:
+*      TapiResult_t   tel_verify_cfg_akey( int *pRequestID) 
+* @par Test function description:
+* It requests to get tty(text telephone) mode.(CDMA only)       
+* @par Important Notes:
+*      None
+* @param [out] pRequestId 
+* - Unique identifier for a particular request.
+* - request_id value can be any value from 0 to 255 if the API is returned successfully
+* - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message
+* The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully. 
+* - Refer TapiResult_t for failure and error code 
+* @{
+*/
+
+/**
+* @file        uts_tel_verify_cfg_akey.c
+* @brief       This is a suite of unit test cases to test tel_verify_cfg_akey() API function
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+
+
+#include "uts_tel_verify_cfg_akey.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_verify_cfg_akey_000, 1},
+       {utc_tel_verify_cfg_akey_001, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for 
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+          printf("TelTapiInit() Failed \n")
+         }
+          register_all_events();
+               
+       return;                                         
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+}
+
+
+
+void utc_tel_verify_cfg_akey_000()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+        char *key = "PHONE" ;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tel_set_cfg_default_configuration(TAPI_CFG_DEFAULT_FULL);
+        ret_status = tel_verify_cfg_akey(key);
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_verify_cfg_akey_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_verify_cfg_akey_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+}
+
+
+
+void utc_tel_verify_cfg_akey_001()
+{
+       
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       ret_status = tel_verify_cfg_akey(NULL);
+        
+        gmain_loop_for_tapi_events(TIME_DELAY);
+
+       if(ret_status  == TAPI_API_SUCCESS)
+        {\r
+        tet_infoline("utc_tel_verify_cfg_akey_001 has failed\n");
+         tet_result(TET_FAIL);
+         }
+          else
+          {
+           tet_infoline("utc_tel_verify_cfg_akey_001 has passed\n");
+           tet_result(TET_PASS);
+           }
+}
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.h b/TC/telephony_TC/CFG/uts_tel_verify_cfg_akey.h
new file mode 100644 (file)
index 0000000..987d756
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file     uts_tel_verify_cfg_akey.h
+* @brief    This is the implementaion file for the test case of getting tty mode
+* @author      Gautam Nand Sinha  (gnand.sinha@samsung.com)
+* @version     Initial Creation V0.1
+* @date        2009.12.16
+*/
+
+#include <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include "cfg_util.h"
+                        
+#include "TapiCommon.h" 
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#ifndef _UTS_TAPI_CFG_GET_TTY_MODE_H_
+#define _UTS_TAPI_CFG_GET_TTY_MODE_H_
+
+       static void utc_tel_verify_cfg_akey_000();
+       static void utc_tel_verify_cfg_akey_001();
+       
+       
+
+#endif //_UTS_TAPI_CFG_GET_TTY_MODE_H_
+
diff --git a/TC/telephony_TC/Makefile b/TC/telephony_TC/Makefile
new file mode 100644 (file)
index 0000000..11f69dc
--- /dev/null
@@ -0,0 +1,12 @@
+SUBDIRS = common/unit call/unit gprs/unit network/unit power/unit sat/unit sim/unit sms/unit sound/unit ss/unit
+
+.PHONY: subdirs $(SUBDIRS)
+
+subdirs: $(SUBDIRS)
+
+$(SUBDIRS):
+       $(MAKE) -C $@
+
+clean :
+       -for d in $(SUBDIRS); do (cd $$d; $(MAKE) clean ); done
+
diff --git a/TC/telephony_TC/call/README b/TC/telephony_TC/call/README
new file mode 100644 (file)
index 0000000..075a6f3
--- /dev/null
@@ -0,0 +1,82 @@
+=================================================================================
+*                                    README                                     *
+=================================================================================
+
+1. The EMAIL Test Script directory (TestCases) includes:
+
+       call/
+               |-- README                                         ; This file
+               `-- Unit                                           ; contains Unit TCs
+                   |-- makefile
+                   |-- tslist
+                   `-- Unit test case source codes
+       2 directories, 44 files
+       
+
+2. The $(TEST_ROOT) directory must includes following files:
+
+       /$(TEST_ROOT)
+               |-- tet_scen
+               |-- tetbuild.cfg
+               |-- tetclean.cfg
+               `-- tetexec.cfg
+
+=================================================================================
+*                                Preconditions                                  *
+---------------------------------------------------------------------------------
+|  Before Testing Call Module, you should check the following conditions        |
+=================================================================================
+
+1. Prepare Three valid SIM cards .
+
+2. One target phone and two other phones are required to create MO/MT Call.Two extra phones are required for SWAP, HOLD, CONFERENCE and SPLIT etc functioality.
+
+3. Call waiting must be enabled if not then enable it manually.
+
+4. Modify the mobile number
+       - call_common.h [LINE 40]
+       - Followings are the macro for mobile number customized as per the country.
+               // Mobile numbers
+
+                 #define MOB_NUM1     "+919999146715"   //Used for MO call creation. Change the number according to your country.
+                 #define MOB_NUM2     "+919810971703"   //Used to divert a call to specified number. Change the number according to your country.
+                 #define DTMF_STRING  "12345"        // User can change as per their choice    
+
+5. During execution continuously watch the log file at Putty or whatever terminal used for target logging and as per the log instruction, user has to provide
+   the MT call or disconnect the call.
+
+         e,g.: log will be printed in the following fashion:
+
+
+              /****************************************/ 
+              Give a MT Call within 20 secs 
+             /****************************************/
+
+              If user sees this kind of log in putty or used terminal, user has to give a MT call within the specified time [e.g. 20 secs].
+            
+             /****************************************/ 
+             As call is answered disconnect the call
+            /****************************************/
+
+            If user see this kind of log in putty or used terminal , user has to disconnect after the call is received[ Not through target but through end user phone]
+
+            /****************************************/
+            disconnect the call
+           /****************************************/
+
+          If user see this kind of log in putty or used terminal , user has to disconnect in MO & MT scenario\92s[ Not through target but through end user phone]
+
+=================================================================================
+*                                  Change log                                   *
+=================================================================================
+1. 18-Dec-2008
+       - Initial draft.
+2. 10-Oct-2010
+       - Revised
+       
+=================================================================================
+*                                      NOTE                                     *
+=================================================================================
+1. In order to ensure successful working of the Test Scripts, please ensure that all of the IPKG files are installed normally.
+2. Testing Call Module can be executed under target system environment (not simulator).
+
diff --git a/TC/telephony_TC/call/call_common.h b/TC/telephony_TC/call/call_common.h
new file mode 100644 (file)
index 0000000..1e89f3c
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TET_TAPI_UTIL_NEW_
+#define _TET_TAPI_UTIL_NEW_
+
+#include <TelUtility.h>
+#include <TelErr.h>
+#include "TapiCommon.h"
+
+
+#define TIME_DELAY0 3000
+#define TIME_DELAY1 20000
+#define TIME_DELAY2 30000
+#define TIME_DELAY3 30000
+
+#define INVALID_CALL_HANDLE 0
+#define VALID_CALL_HANDLE      1
+
+#define MOB_NUM1 "01012345678"   //Used for MO call creation.Change the number according to your country.
+#define MOB_NUM2 "01098765432"   //Used to divert a call to specified number.Change the number according to your country.
+
+#define DTMF_STRING "12345"  // User can change as per their choice
+
+#define LOCAL_MOB_NUM     "01012345678"
+
+
+#define        MAX_NUMBER_SIZE         16
+#define TEST_INVALID_VALUE_1   -1
+#define TEST_INVALID_VALUE_2   5
+
+// TET_Error Code string return macro
+typedef struct {
+       TapiResult_t err;
+       char * string;
+}TAPI_Error_String;
+
+//#define TAPI_ERROR_MAX TAPI_API_MISC_OUTPARAM_NULL+1
+#define TAPI_ERROR_MAX 200 
+
+TAPI_Error_String g_TAPI_ErrorString[TAPI_ERROR_MAX] = {
+
+       /* #################### COMMON START ################ */
+       {TAPI_API_SUCCESS,              "TAPI_API_SUCCESS : No Error occured"},
+       {TAPI_API_INVALID_INPUT,        "TAPI_API_INVALID_INPUT : Input values are not correct in TAPI Library"},
+       {TAPI_API_INVALID_PTR,          "TAPI_API_INVALID_PTR : Invalid pointer"},
+       {TAPI_API_NOT_SUPPORTED,        "TAPI_API_NOT_SUPPORTED: The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network"},
+       {TAPI_API_DEPRICATED,           "TAPI_API_DEPRICATED : This API is deprecated and will be so in future also"},
+       {TAPI_API_SYSTEM_OUT_OF_MEM,    "TAPI_API_SYSTEM_OUT_OF_MEM : Out of memory"},
+       {TAPI_API_SYSTEM_RPC_LINK_DOWN, "TAPI_API_SYSTEM_RPC_LINK_DOWN : RPC link down"},
+       {TAPI_API_MODEM_POWERED_OFF,    "TAPI_API_MODEM_POWERED_OFF : The Modem is powered off"},
+       {TAPI_API_SERVICE_NOT_READY,    "TAPI_API_SERVICE_NOT_READY : Phone was powered on, but yet to receive the power up completed notification"},
+       {TAPI_API_SERVER_FAILURE ,      "TAPI_API_SERVER_FAILURE : error occurred in Telephony server"},
+       {TAPI_API_OEM_PLUGIN_FAILURE ,  "TAPI_API_OEM_PLUGIN_FAILURE  : Plug-in layer failure"},
+       {TAPI_API_TRANSPORT_LAYER_FAILURE, "TAPI_API_TRANSPORT_LAYER_FAILURE"},
+
+       {TAPI_API_INVALID_CALL_HANDLE,  "TAPI_API_INVALID_CALL_HANDLE : Invalid call handle"},
+       {TAPI_API_INVALID_CALL_STATE,   "TAPI_API_INVALID_CALL_STATE : Invalid call state- Newly added. Need to raise a CR for this"},
+
+       {TAPI_API_INVALID_DATA_LEN,     "TAPI_API_INVALID_DATA_LEN : Invalid data length"},
+       {TAPI_API_SIM_NOT_FOUND,        "TAPI_API_SIM_NOT_FOUND : Sim is not present / removed "},
+       {TAPI_API_SIM_BUSY,             "TAPI_API_SIM_BUSY : SIM is busy"},
+       {TAPI_API_SIM_INVALID_CARD_TYPE, "TAPI_API_SIM_INVALID_CARD_TYPE : Sim card is unknown "},
+       {TAPI_API_SIM_CARD_PERMANENT_ERROR, "TAPI_API_SIM_CARD_PERMANENT_ERROR : SIM error/blocked state"},
+       {TAPI_API_SIM_NOT_INITIALIZED,  "TAPI_API_SIM_NOT_INITIALIZED : SIM has not initialized yet (waiting for PIN verifcation, etc)"},
+       {TAPI_API_REQUEST_MAX_IN_PROGRESS, "TAPI_API_REQUEST_MAX_IN_PROGRESS : Maximum number of API Request for the same service are already in progress "},
+       {TAPI_API_OFFLINE_MODE_ERROR,   "TAPI_API_OFFLINE_MODE_ERROR : OEM Telephony Provider is in Offline mode"},
+       {TAPI_EVENT_CLASS_UNKNOWN,      "TAPI_EVENT_CLASS_UNKNOWN : Event class specified is not present in Event Class list"},
+       {TAPI_EVENT_UNKNOWN,            "TAPI_EVENT_UNKNOWN : Event specified is not present in TAPI Unsolicited Event list"},
+       {TAPI_REGISTRATION_OP_FAILED,   "TAPI_REGISTRATION_OP_FAILED : Callback Registration/De-registration failed"},
+       {TAPI_NETTEXT_SCADDRESS_NOT_SET, "TAPI_NETTEXT_SCADDRESS_NOT_SET"},
+       {TAPI_API_OPERATION_FAILED,     "TAPI_API_OPERATION_FAILED"},
+       {TAPI_API_INVALID_OPERATION,    "TAPI_API_INVALID_OPERATION"},
+
+       /*    Samsung Specif   */
+    {TAPI_API_SYSTEM_RPC_LINK_NOT_EST, "TAPI_API_SYSTEM_RPC_LINK_NOT_EST"},
+       {TAPI_API_API_NOT_SUPPORTED,    "TAPI_API_API_NOT_SUPPORTED"},
+       {TAPI_API_SERVER_LAYER_FAILURE, "TAPI_API_SERVER_LAYER_FAILURE"},
+
+       /*        CALL        */
+       {TAPI_API_INVALID_CALL_ID,      "TAPI_API_INVALID_CALL_ID"},
+       {TAPI_API_CALL_CTXT_OVERFLOW,   "TAPI_API_CALL_CTXT_OVERFLOW"},
+       {TAPI_API_COULD_NOT_GET_CALL_CTXT, "TAPI_API_COULD_NOT_GET_CALL_CTXT"},
+       {TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT, "TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT"},
+       {TAPI_API_COULD_NOT_DESTROY_CTXT,  "TAPI_API_COULD_NOT_DESTROY_CTXT"},
+       {TAPI_API_INVALID_LINE_ID,      "TAPI_API_INVALID_LINE_ID"},
+
+       /*      POWER   */
+//     {TAPI_API_MODEM_ALREADY_ON,  "TAPI_API_MODEM_ALREADY_ON"},
+//     {TAPI_API_MODEM_ALREADY_OFF, "TAPI_API_MODEM_ALREADY_OFF"},
+
+       /* NETTEXT */
+       {TAPI_API_NETTEXT_DEVICE_NOT_READY,     "TAPI_API_NETTEXT_DEVICE_NOT_READY"},
+       {TAPI_API_NETTEXT_SCADDR_NOT_SET,       "TAPI_API_NETTEXT_SCADDR_NOT_SET"},
+       {TAPI_API_NETTEXT_INVALID_DATA_LEN,     "TAPI_API_NETTEXT_INVALID_DATA_LEN"},
+
+       /* SIM  */
+       //{TAPI_API_SIM_DEV_CTX_NULL,           "TAPI_API_SIM_DEV_CTX_NULL"},
+       //{TAPI_API_SIM_SIM_NOT_FOUND,          "TAPI_API_SIM_SIM_NOT_FOUND"},
+       {TAPI_API_SIM_SIM_SESSION_FULL,         "TAPI_API_SIM_SIM_SESSION_FULL"},
+       //{TAPI_API_SIM_INVALID_APP_ID,         "TAPI_API_SIM_INVALID_APP_ID"},
+       {TAPI_API_SIM_INVALID_SESSION,          "TAPI_API_SIM_INVALID_SESSION"},
+       {TAPI_API_SIM_FILE_TYPE_WRONG,          "TAPI_API_SIM_FILE_TYPE_WRONG"},
+       {TAPI_API_SIM_FILE_ENCODE_FAIL,         "TAPI_API_SIM_FILE_ENCODE_FAIL"},
+       {TAPI_API_SIM_FILE_DECODE_FAIL,         "TAPI_API_SIM_FILE_DECODE_FAIL"},
+       {TAPI_API_SIM_FILE_INVALID_ENCODE_LEN,  "TAPI_API_SIM_FILE_INVALID_ENCODE_LEN"},
+       {TAPI_API_SIM_INVALID_RECORD_NUM,       "TAPI_API_SIM_INVALID_RECORD_NUM"},
+       {TAPI_API_SIM_CASE_NOT_HANDLED,         "TAPI_API_SIM_CASE_NOT_HANDLED"},
+       {TAPI_API_SIM_OEM_UNKNOWN_SIM_CARD,     "TAPI_API_SIM_OEM_UNKNOWN_SIM_CARD"},
+       {TAPI_API_SIM_SEC_UKNOWN_PIN_TYPE,      "TAPI_API_SIM_SEC_UKNOWN_PIN_TYPE"},
+       {TAPI_API_SIM_SEC_INVALID_PIN_TYPE,     "TAPI_API_SIM_SEC_INVALID_PIN_TYPE"},
+       {TAPI_API_SIM_PB_INVALID_STORAGE_TYPE,  "TAPI_API_SIM_PB_INVALID_STORAGE_TYPE"},
+
+       {TAPI_API_SAT_COMMAND_TYPE_MISMATCH,    "TAPI_API_SAT_COMMAND_TYPE_MISMATCH"},
+
+       /* Network */
+       {TAPI_API_NETWORK_INVALID_CTXT,         "TAPI_API_NETWORK_INVALID_CTXT"},
+
+       /*Misc */
+       {TAPI_API_MISC_RETURN_NULL,             "TAPI_API_MISC_RETURN_NULL"},
+       {TAPI_API_MISC_VALIDITY_ERROR,          "TAPI_API_MISC_VALIDITY_ERROR"},
+       {TAPI_API_MISC_INPUTPARM_ERROR,         "TAPI_API_MISC_INPUTPARM_ERROR"},
+       {TAPI_API_MISC_OUTPARAM_NULL,           "TAPI_API_MISC_OUTPARAM_NULL"},
+};
+
+//#define TET_ERROR_TO_STRING(err) g_TAPI_ErrorString[(err)].string
+static const char* TET_ERROR_TO_STRING(TapiResult_t err_code)
+{
+       int index;
+       for( index=0; g_TAPI_ErrorString[index].err != TAPI_ERROR_MAX ; index++)
+       {
+               if (g_TAPI_ErrorString[index].err == err_code || g_TAPI_ErrorString[index].err == TAPI_ERROR_MAX)
+                       return g_TAPI_ErrorString[index].string;
+       }
+       return NULL;
+}
+
+// TET_CHECK Macro : TAPI api return value test macro. If it is not TAPI_API_SUCCESS, tet_retult(TET_FAIL) is called
+#define TET_CHECK(x1, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+#define TET_CHECK2(x1,x2, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2))) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+#define TET_CHECK3(x1,x2,x3, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2) || err == (x3))) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+
+#endif //_TET_TAPI_UTIL_
diff --git a/TC/telephony_TC/call/unit/makefile b/TC/telephony_TC/call/unit/makefile
new file mode 100644 (file)
index 0000000..b775530
--- /dev/null
@@ -0,0 +1,133 @@
+CC=gcc -Wall
+
+TS1  = uts_tel_exe_call_mo
+TS2  = uts_tel_answer_call
+TS3  = uts_tel_release_call
+TS4  = uts_tel_release_call_all
+TS5  = uts_tel_retrieve_call
+TS6  = uts_tel_hold_call
+TS7  = uts_tel_swap_call
+TS8  = uts_tel_join_call
+TS9  = uts_tel_split_call
+TS10  = uts_tel_exe_call_explicit_transfer
+TS11  = uts_tel_get_call_act_line
+TS12  = uts_tel_set_call_act_line
+TS13  = uts_tel_get_call_conf_list
+TS14  = uts_tel_get_call_status
+TS15  = uts_tel_get_call_duration
+TS16  = uts_tel_send_call_dtmf
+TS17  = uts_tel_release_call_all_active
+TS18  = uts_tel_release_call_all_held
+//TS19  = uts_tapi_check_status
+TS20  = uts_tel_exit_call_emergency_mode
+TS21  = uts_tel_exe_call_flash
+TS22  = uts_tel_get_call_privacy_mode
+TS23  = uts_tel_set_call_privacy_mode
+TS24  = uts_tel_get_call_time
+TS25  = uts_tel_activate_call_ccbs
+TS26  = uts_tel_deflect_call
+
+LB1  = tapi_callback
+
+LIBS =$(LB1).o
+LIBS += `pkg-config --libs  gconf-2.0 dbus-1 dbus-glib-1 glib-2.0 gthread-2.0 tapi` 
+
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+
+INCS =  -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS += -I$(TET_ROOT)/inc/tet3 
+INCS += -I..
+
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+all : $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS20)   $(TS21)   $(TS22) $(TS23) $(TS24) $(TS25) $(TS26)  
+
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12)  $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS20)   $(TS21)   $(TS22) $(TS23) $(TS24) $(TS25) $(TS26)  
+
+
+$(LB1): $(LB1).c
+       $(CC) -c $(LB1).c
+
+$(TS1): $(TS1).c $(LB1)
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS)
+
+$(TS2): $(TS2).c $(LB1)
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS)
+
+$(TS3): $(TS3).c $(LB1)
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS)
+
+$(TS4): $(TS4).c $(LB1)
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS)
+
+$(TS5): $(TS5).c $(LB1)
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS)
+
+$(TS6): $(TS6).c $(LB1)
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS)
+
+$(TS7): $(TS7).c $(LB1)
+       $(CC) -o $(TS7) $(TS7).c  $(LDFLAGS)
+
+$(TS8): $(TS8).c $(LB1)
+       $(CC) -o $(TS8) $(TS8).c  $(LDFLAGS)
+
+$(TS9): $(TS9).c $(LB1)
+       $(CC) -o $(TS9) $(TS9).c  $(LDFLAGS)
+
+$(TS10): $(TS10).c $(LB1)
+       $(CC) -o $(TS10) $(TS10).c  $(LDFLAGS)
+
+$(TS11): $(TS11).c $(LB1)
+       $(CC) -o $(TS11) $(TS11).c  $(LDFLAGS)
+
+$(TS12): $(TS12).c $(LB1)
+       $(CC) -o $(TS12) $(TS12).c  $(LDFLAGS)
+
+$(TS13): $(TS13).c $(LB1)
+       $(CC) -o $(TS13) $(TS13).c  $(LDFLAGS)
+
+
+$(TS14): $(TS14).c $(LB1)
+       $(CC) -o $(TS14) $(TS14).c  $(LDFLAGS)
+
+$(TS15): $(TS15).c $(LB1)
+       $(CC) -o $(TS15) $(TS15).c  $(LDFLAGS)
+
+$(TS16): $(TS16).c $(LB1)
+       $(CC) -o $(TS16) $(TS16).c  $(LDFLAGS)
+
+$(TS17): $(TS17).c $(LB1)
+       $(CC) -o $(TS17) $(TS17).c  $(LDFLAGS)
+
+$(TS18): $(TS18).c $(LB1)
+       $(CC) -o $(TS18) $(TS18).c  $(LDFLAGS)
+
+#$(TS19): $(TS19).c $(LB1)
+#      $(CC) -o $(TS19) $(TS19).c  $(LDFLAGS)
+
+$(TS20): $(TS20).c $(LB1)
+       $(CC) -o $(TS20) $(TS20).c  $(LDFLAGS)
+
+$(TS21): $(TS21).c $(LB1)
+       $(CC) -o $(TS21) $(TS21).c  $(LDFLAGS)
+
+$(TS22): $(TS22).c $(LB1)
+       $(CC) -o $(TS22) $(TS22).c  $(LDFLAGS)
+
+$(TS23): $(TS23).c $(LB1)
+       $(CC) -o $(TS23) $(TS23).c  $(LDFLAGS)
+
+$(TS24): $(TS24).c $(LB1)
+       $(CC) -o $(TS24) $(TS24).c  $(LDFLAGS)
+
+$(TS25): $(TS25).c $(LB1)
+       $(CC) -o $(TS25) $(TS25).c  $(LDFLAGS)
+
+$(TS26): $(TS26).c $(LB1)
+       $(CC) -o $(TS26) $(TS26).c  $(LDFLAGS)
diff --git a/TC/telephony_TC/call/unit/tapi_callback.c b/TC/telephony_TC/call/unit/tapi_callback.c
new file mode 100644 (file)
index 0000000..8c04955
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tapi_callback.h"
+
+GMainLoop *main_loop = NULL;
+TS_UINT g_CallHandle = -1;
+TS_BOOL call_status = FALSE;
+/***** TESTING FOR VALID SET OF INPTS*****/
+
+TS_UINT conf_call_handle=-1 ;
+static unsigned int subscription_id[32]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+int expected_event;
+
+void  app_callback  (TelTapiEvent_t * TapiEvent)
+{
+
+       int     eventClass;
+       int     eventType;
+       int                     requestId;
+       int                     status;
+       void                    *EventData = NULL;
+
+       TS_UINT callHandle;
+
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = TapiEvent->pData;
+
+       CALL_TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId,                               status );
+       if( EventData==NULL)
+       {
+               CALL_TEST_DEBUG("******  EventData is NULL.........   ******\n");
+       }
+
+       switch(eventClass)
+       {
+               case TAPI_EVENT_CLASS_CALL_VOICE:
+               case TAPI_EVENT_CLASS_CALL_DATA:
+               {
+
+                       switch(eventType)
+                       {
+
+                               case  TAPI_EVENT_CALL_SETUP_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_SETUP_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+
+                               case TAPI_EVENT_CALL_ALERT_IND:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_ALERT_IND. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_INCOM_IND:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       g_CallHandle = callHandle;
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_INCOM_IND. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_ANSWER_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_ANSWER_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_WAITING_IND:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_WAITING_IND. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_CONNECTED_IND:
+
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_CONNECTED_IND. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_CONNECTING_IND:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_CONNECTING_IND. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_RETRIEVE_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_RETRIEVE_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_HOLD_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_HOLD_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_SETUPCONFERENCE_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       conf_call_handle = callHandle;
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_SETUPCONFERENCE_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_SPLITCONFERENCE_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_SPLITCONFERENCE_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_TRANSFER_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_TRANSFER_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_SEND_DTMF_CNF: // no data.
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_SEND_DTMF_CNF. \n");
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_RELEASE_CNF. callHandle:[%d]\n",callHandle);
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_ALL_CNF: // no data.
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_RELEASE_ALL_CNF. \n");
+                                       break;
+
+                               case TAPI_EVENT_CALL_END_IND:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_END_IND. callHandle:[%d]\n",callHandle);
+                                       call_status = TRUE;
+                                       break;
+
+                               case TAPI_EVENT_CALL_SET_LINEID_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_SET_LINEID_CNF. callHandle:[%d]\n",callHandle);
+                                       call_status = TRUE;
+                                       break;
+
+                               case TAPI_EVENT_CALL_GET_LINEID_CNF:
+                                       memcpy(&callHandle, EventData, sizeof(TS_UINT));
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_GET_LINEID_CNF. callHandle:[%d]\n",callHandle);
+                                       call_status = TRUE;
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF:
+                                       CALL_TEST_DEBUG(" === TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF\n");
+                                       call_status = TRUE;
+                                       break;
+
+                               default:
+                                       CALL_TEST_DEBUG(" === VOICE EVENT CLASS. but UNKNOWN EVENT TYPE:[%d] \n", eventType);
+                                       call_status = FALSE;
+                                       break;
+
+                       }
+                        break;
+               }
+               default:
+                       CALL_TEST_DEBUG(" UNKNOWN EVENT CLASS:[%d] \n", eventClass);
+                       break;
+
+       }
+       if(eventType == expected_event)
+               g_main_loop_quit(main_loop);
+}
+
+gboolean
+TimeOutFun (void *data)
+{
+       g_main_loop_quit (main_loop);
+       printf ("Exit from this callback\n");
+       call_status = FALSE;
+       return FALSE;
+
+
+}
+
+int gmain_loop_for_tapi_events(int delay)
+{
+
+       main_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add (delay, TimeOutFun, NULL);
+       g_main_loop_run (main_loop);
+
+       return 0;
+
+
+}
+
+
+
+
+
+void print_all_subsciption_ids()
+{
+       int i=0;
+       for(i=0;i<27;i++)
+       {
+               printf("\n subscription_id[%d] has value %d \n",i,subscription_id[i]);
+       }
+}
+
+TapiResult_t register_all_events()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_register_event(TAPI_EVENT_CALL_SETUP_CNF, &subscription_id[0], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_ALERT_IND, &subscription_id[1], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_CONNECTING_IND, &subscription_id[2], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_CONNECTED_IND, &subscription_id[3], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_INCOM_IND, &subscription_id[4], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_ANSWER_CNF, &subscription_id[5], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_RETRIEVE_CNF, &subscription_id[6], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_RETRIEVE_IND, &subscription_id[7], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_HOLD_IND, &subscription_id[8], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_HOLD_CNF, &subscription_id[9], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_TRANSFER_CNF, &subscription_id[10], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_TRANSFER_IND, &subscription_id[11], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SETUPCONFERENCE_CNF, &subscription_id[12], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SETUPCONFERENCE_IND, &subscription_id[13], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SPLITCONFERENCE_CNF, &subscription_id[14], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SEND_DTMF_CNF, &subscription_id[15], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_WAITING_IND, &subscription_id[16], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_FORWARD_IND, &subscription_id[17], (TelAppCallback)&app_callback,NULL);
+       //api_err = tel_register_event(TAPI_EVENT_CALL_USERINFO_IND, &subscription_id[18], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_RELEASE_CNF, &subscription_id[19], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_RELEASE_ALL_CNF, &subscription_id[20], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF, &subscription_id[21], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_END_IND, &subscription_id[22], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_GET_LINEID_CNF, &subscription_id[23], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SET_LINEID_CNF, &subscription_id[24], (TelAppCallback)&app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_CALL_SWAP_CNF, &subscription_id[25], (TelAppCallback)&app_callback,NULL);
+       /* For multiparty call */
+       api_err = tel_register_event(TAPI_EVENT_SS_WAITING_CNF, &subscription_id[26], (TelAppCallback)&app_callback,NULL);
+
+       /* For multiparty call */
+       api_err = tel_register_event(TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF, &subscription_id[27], (TelAppCallback)&app_callback,NULL);
+
+//     api_err = tel_register_event(TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF, &subscription_id[28], (TelAppCallback)&app_callback,NULL);
+
+       api_err = tel_register_event(TAPI_EVENT_CALL_FLASHINFO_CNF, &subscription_id[28], (TelAppCallback)&app_callback,NULL);
+
+//     api_err = tel_register_event(TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF, &subscription_id[30], (TelAppCallback)&app_callback,NULL);
+
+//     api_err = tel_register_event(TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF, &subscription_id[31], (TelAppCallback)&app_callback,NULL);
+
+
+//     print_all_subsciption_ids();
+       return api_err;
+}
+
+
+ TapiResult_t deregister_all()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_deregister_event(subscription_id[0]);
+       api_err = tel_deregister_event(subscription_id[1]);
+       api_err = tel_deregister_event(subscription_id[2]);
+       api_err = tel_deregister_event(subscription_id[3]);
+       api_err = tel_deregister_event(subscription_id[4]);
+       api_err = tel_deregister_event(subscription_id[5]);
+       api_err = tel_deregister_event(subscription_id[6]);
+       api_err = tel_deregister_event(subscription_id[7]);
+       api_err = tel_deregister_event(subscription_id[8]);
+       api_err = tel_deregister_event(subscription_id[9]);
+       api_err = tel_deregister_event(subscription_id[10]);
+       api_err = tel_deregister_event(subscription_id[11]);
+       api_err = tel_deregister_event(subscription_id[12]);
+       api_err = tel_deregister_event(subscription_id[13]);
+       api_err = tel_deregister_event(subscription_id[14]);
+       api_err = tel_deregister_event(subscription_id[15]);
+       api_err = tel_deregister_event(subscription_id[16]);
+       api_err = tel_deregister_event(subscription_id[17]);
+       api_err = tel_deregister_event(subscription_id[18]);
+       api_err = tel_deregister_event(subscription_id[19]);
+       api_err = tel_deregister_event(subscription_id[20]);
+       api_err = tel_deregister_event(subscription_id[21]);
+       api_err = tel_deregister_event(subscription_id[22]);
+       api_err = tel_deregister_event(subscription_id[23]);
+       api_err = tel_deregister_event(subscription_id[24]);
+       api_err = tel_deregister_event(subscription_id[25]);
+       api_err = tel_deregister_event(subscription_id[26]);
+       api_err = tel_deregister_event(subscription_id[27]);
+//     api_err = tel_deregister_event(subscription_id[28]);
+       api_err = tel_deregister_event(subscription_id[28]);
+///    api_err = tel_deregister_event(subscription_id[30]);
+//     api_err = tel_deregister_event(subscription_id[31]);
+
+       return api_err;
+
+}
+
diff --git a/TC/telephony_TC/call/unit/tapi_callback.h b/TC/telephony_TC/call/unit/tapi_callback.h
new file mode 100644 (file)
index 0000000..021b7c6
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TAPI_COMMON_H_
+#define   __UTS_TAPI_COMMON_H_
+
+/*  Includes */
+
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <glib-2.0/glib.h>
+#include <pthread.h>
+#include <stdio.h>
+
+#include <ITapiCall.h>
+#include <TapiCommon.h>
+
+
+
+#define CALL_TEST_DEBUG(fmt, args...)  \
+       printf("[%s %s:%d]\n" fmt "\n",__FILE__, __FUNCTION__,  __LINE__, ##args); 
+
+extern int gmain_loop_for_tapi_events(int delay);
+
+extern void  app_callback  (TelTapiEvent_t * TapiEvent);
+extern gboolean TimeOutFun (void *data);
+
+
+extern TapiResult_t register_all_events();
+
+extern TapiResult_t deregister_all();
+
+void print_all_subsciption_ids();
+
+
+#endif
diff --git a/TC/telephony_TC/call/unit/tslist b/TC/telephony_TC/call/unit/tslist
new file mode 100644 (file)
index 0000000..1c6d5c4
--- /dev/null
@@ -0,0 +1,22 @@
+/call/unit/uts_tel_get_call_time
+#//call/unit/uts_tel_exe_call_flash
+#//call/unit/uts_tel_exit_call_emergency_mode
+#//call/unit/uts_tel_get_call_privacy_mode
+#//call/unit/uts_tel_set_call_privacy_mode
+#//call/unit/uts_tel_answer_call
+/call/unit/uts_tel_exe_call_mo
+/call/unit/uts_tel_release_call
+/call/unit/uts_tel_release_call_all
+/call/unit/uts_tel_release_call_all_active
+/call/unit/uts_tel_hold_call
+/call/unit/uts_tel_retrieve_call
+/call/unit/uts_tel_swap_call
+/call/unit/uts_tel_send_call_dtmf
+/call/unit/uts_tel_join_call
+/call/unit/uts_tel_split_call
+/call/unit/uts_tel_get_call_act_line
+#//call/unit/uts_tel_exe_call_explicit_transfer
+/call/unit/uts_tel_get_call_status
+/call/unit/uts_tel_get_call_duration
+/call/unit/uts_tel_get_call_conf_list
+/call/unit/uts_tel_set_call_act_line
diff --git a/TC/telephony_TC/call/unit/uts_tapi_check_status.c b/TC/telephony_TC/call/unit/uts_tapi_check_status.c
new file mode 100644 (file)
index 0000000..b363c54
--- /dev/null
@@ -0,0 +1,126 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <TapiCommon.h>
+#include "uts_tapi_check_status.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  tapi_api_err_t tel_exe_call_mo(tel_exe_call_mo_info_t const * const ptr_call_setup_info,
+*              tapi_call_handle *ptr_call_handle);
+*/
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests tapi_common_check_status() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_CHECK_STATUS_01
+ * @param [out] status 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tapi_check_status_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TS_BOOL * status;
+       ret_status = tapi_common_check_status(&status);
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tapi_check_status_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+/**
+ * @brief This tests tapi_common_check_status() API in abnormal conditions 
+ * @par ID:
+ * UTC_TAPI_CHECK_STATUS_02
+ * @param [out] status 
+ * @return TAPI_API_FAILURE
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tapi_check_status_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       
+       ret_status = tapi_common_check_status(NULL);
+       
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }
+       printf("utc_tapi_check_status_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tapi_check_status.h b/TC/telephony_TC/call/unit/uts_tapi_check_status.h
new file mode 100644 (file)
index 0000000..3a77f2b
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TAPI_CHECK_STATUS_H_
+#define   __UTS_TAPI_CHECK_STATUS_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+//#include <ITapi_common.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tapi_check_status_01(void);
+       static void utc_tapi_check_status_02(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_check_status_01, 1},
+       {utc_tapi_check_status_02, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.c b/TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.c
new file mode 100644 (file)
index 0000000..bdb2519
--- /dev/null
@@ -0,0 +1,266 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  CALL\r
+*/\r
+\r
+/**\r
+* @ingroup     CALL\r
+* @addtogroup  UTS_TEL_ACTIVE_CALL_CCBS Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_ACTIVE_CALL_CCBS Unit\r
+* @addtogroup  UTS_TEL_ACTIVE_CALL_CCBS_ Uts_Tel_Active_Call_Ccbs\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_activate_call_ccbs.c\r
+* @brief This is a suit of unit test cases to test tel_activate_call_ccbs() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+#include "uts_tel_activate_call_ccbs.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*    TapiResult_t      tel_activate_call_ccbs(unsigned int call_handle, int *pRequestID)
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+/**
+ * @brief This tests tel_activate_call_ccbs() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_01
+ * @param [in] CallHandle = callhandle
+ * @param [out] pCallStatus = &CallStatus
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_activate_call_ccbs_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_activate_call_ccbs (call_handle,&RequestId);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status == TAPI_API_SUCCESS)
+        { 
+        tet_printf("utc_tel_activate_call_ccbs_01 has passed and Data in ret_status is %d\n", ret_status);
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          tet_printf("utc_tel_activate_call_ccbs_01 has failed and Data in ret_status is %d\n", ret_status);
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+/**
+ * @brief This tests tel_activate_call_ccbs() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_02
+ * @param [in] CallHandle = callhandle
+ * @param [out] pCallStatus = NULL
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_activate_call_ccbs_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_activate_call_ccbs (call_handle,NULL);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status != TAPI_API_SUCCESS)
+        { 
+        tet_printf("utc_tel_activate_call_ccbs_02 has passed and Data in ret_status is %d\n", ret_status);
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          tet_printf("utc_tel_activate_call_ccbs_02 has failed and Data in ret_status is %d\n", ret_status);
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+
+/**
+ * @brief This tests tel_activate_call_ccbs() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_03
+ * @param [in] CallHandle = -1
+ * @param [out] pCallStatus = NULL
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_activate_call_ccbs_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_activate_call_ccbs (-1,NULL);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status != TAPI_API_SUCCESS)
+        { 
+        tet_printf("utc_tel_activate_call_ccbs_03 has passed and Data in ret_status is %d\n", ret_status);
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          tet_printf("utc_tel_activate_call_ccbs_03 has failed and Data in ret_status is %d\n", ret_status);
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.h b/TC/telephony_TC/call/unit/uts_tel_activate_call_ccbs.h
new file mode 100644 (file)
index 0000000..725fa77
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  CALL\r
+*/\r
+\r
+/**\r
+* @ingroup     CALL\r
+* @addtogroup  UTS_TEL_ACTIVE_CALL_CCBS Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_ACTIVE_CALL_CCBS Unit\r
+* @addtogroup  UTS_TEL_ACTIVE_CALL_CCBS_ Uts_Tel_Active_Call_Ccbs\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_activate_call_ccbs.h\r
+* @brief This is a suit of unit test cases to test tel_activate_call_ccbs() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+#ifndef        __UTS_TEL_ACTIVE_CALL_CCBS_H_
+#define   __UTS_TEL_ACTIVE_CALL_CCBS_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   el_deflect_call(unsigned int call_handle, const TelCallDeflectDstInfo_t *info, int *pRequestID)
+* @brief  This API is used to test to get the call information.
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_activate_call_ccbs_01(void);
+
+       static void utc_tel_activate_call_ccbs_02(void);
+
+       static void utc_tel_activate_call_ccbs_03(void);
+
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_activate_call_ccbs_01, 1},
+       {utc_tel_activate_call_ccbs_02, 2},
+       {utc_tel_activate_call_ccbs_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_answer_call.c b/TC/telephony_TC/call/unit/uts_tel_answer_call.c
new file mode 100644 (file)
index 0000000..ae8ccd1
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_answer_call.h"
+
+/* Initialize TCM data structures */
+
+/*
+*  tapi_api_err_t tel_exe_call_mo(tel_exe_call_mo_info_t const * const ptr_call_setup_info,
+*              tapi_call_handle *ptr_call_handle);
+*/
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests tel_answer_call() API in normal conditions MO call.
+ * @par ID:
+ * UTC_TEL_ANSWER_CALL_01
+ * @param [in] CallHandle = g_CallHandle
+ * @param [in] AnsType = TEL_ANSWER_CALL_ACCEPT
+ * @param [out] pRequestId = &RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_answer_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       CALL_TEST_DEBUG("\n /**************************************** Give a MT Call within 20 secs ****************************/\n");
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       ret_status = tel_answer_call(g_CallHandle, TAPI_CALL_ANSWER_ACCEPT, &RequestId);
+       g_CallHandle = -1;
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_ANSWER_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       printf("utc_tel_answer_call_01 pass");
+       tet_result(TET_PASS);
+       tel_release_call_all(&RequestId);
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_answer_call() API in normal conditions in MT call.
+ * @par ID:
+ * UTC_TEL_ANSWER_CALL_02
+ * @param [in] CallHandle = g_CallHandle
+ * @param [in] AnsType = TAPI_CALL_ANSWER_REJECT
+ * @param [out] pRequestId = &RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_answer_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       CALL_TEST_DEBUG("\n /**************************************** Give a MT Call within 20 secs /****************************/\n");
+
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       ret_status = tel_answer_call(g_CallHandle, TAPI_CALL_ANSWER_REJECT, &RequestId);
+       g_CallHandle = -1;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       expected_event = TAPI_EVENT_CALL_ANSWER_CNF;
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       printf("utc_tel_answer_call_02 pass");
+       tel_release_call_all(&RequestId);
+       tet_result(TET_PASS);
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_answer_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_ANSWER_CALL_03
+ * @param [in] CallHandle = g_CallHandle
+ * @param [in] AnsType = TEL_ANSWER_CALL_ACCEPT
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_answer_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_answer_call(g_CallHandle, TAPI_CALL_ANSWER_ACCEPT, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_answer_call_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_answer_call.h b/TC/telephony_TC/call/unit/uts_tel_answer_call.h
new file mode 100644 (file)
index 0000000..bed1bc4
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_ANSWER_CALL_H_
+#define   __UTS_TEL_ANSWER_SETUP_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_answer_call_01(void);
+
+       static void utc_tel_answer_call_02(void);
+
+       static void utc_tel_answer_call_03(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_answer_call_01, 1},
+       {utc_tel_answer_call_02, 2},
+       {utc_tel_answer_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
diff --git a/TC/telephony_TC/call/unit/uts_tel_deflect_call.c b/TC/telephony_TC/call/unit/uts_tel_deflect_call.c
new file mode 100644 (file)
index 0000000..8c0add1
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  CALL\r
+*/\r
+\r
+/**\r
+* @ingroup     CALL\r
+* @addtogroup  UTS_TEL_DEFLECT_CALL Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_DEFLECT_CALL Unit\r
+* @addtogroup  UTS_TEL_DEFLECT_CALL_ Uts_Tel_Deflect_Call\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_deflect_call.c\r
+* @brief This is a suit of unit test cases to test tel_deflect_call() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+#include "uts_tel_deflect_call.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*    TapiResult_t      tel_deflect_call(unsigned int call_handle, const TelCallDeflectDstInfo_t *info, int *pRequestID)
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+/**
+ * @brief This tests tel_deflect_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_01
+ * @param [in] CallHandle = callhandle
+ * @param [out] info = &info
+ * @param [out] pCallStatus = &CallStatus
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_deflect_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_deflect_call (call_handle,&info,&RequestId);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status == TAPI_API_SUCCESS)
+        { 
+        printf("utc_tel_deflect_call_01 pass\n");
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          printf("utc_tel_deflect_call_01 pass\n");
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+/**
+ * @brief This tests tel_deflect_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_02
+ * @param [in] CallHandle = callhandle
+ * @param [out] info = NULL
+ * @param [out] pCallStatus = &CallStatus
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_deflect_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_deflect_call (call_handle,NULL,&RequestId);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status != TAPI_API_SUCCESS)
+        { 
+        printf("utc_tel_deflect_call_02 pass\n");
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          printf("utc_tel_deflect_call_02 pass\n");
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+
+/**
+ * @brief This tests tel_deflect_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DEFLECT_CALL_03
+ * @param [in] CallHandle = callhandle
+ * @param [out] info = NULL
+ * @param [out] pCallStatus = NULL
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_deflect_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+        TelCallDeflectDstInfo_t info;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_deflect_call (call_handle,NULL,NULL);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       
+        if(ret_status != TAPI_API_SUCCESS)
+        { 
+        printf("utc_tel_deflect_call_03 pass\n");
+        tet_result(TET_PASS);
+        }
+         else
+          { 
+          printf("utc_tel_deflect_call_03 pass\n");
+          tet_result(TET_FAIL);
+           }
+         
+
+       
+}
+
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_deflect_call.h b/TC/telephony_TC/call/unit/uts_tel_deflect_call.h
new file mode 100644 (file)
index 0000000..73e71bf
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  CALL\r
+*/\r
+\r
+/**\r
+* @ingroup     CALL\r
+* @addtogroup  UTS_TEL_DEFLECT_CALL Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_DEFLECT_CALL Unit\r
+* @addtogroup  UTS_TEL_DEFLECT_CALL_ Uts_Tel_Deflect_Call\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_deflect_call.h\r
+* @brief This is a suit of unit test cases to test tel_deflect_call() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+
+#ifndef        __TS_TEL_DEFLECT_CALL_H_
+#define   __TS_TEL_DEFLECT_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   el_deflect_call(unsigned int call_handle, const TelCallDeflectDstInfo_t *info, int *pRequestID)
+* @brief  This API is used to test to get the call information.
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_deflect_call_01(void);
+
+       static void utc_tel_deflect_call_02(void);
+
+       static void utc_tel_deflect_call_03(void);
+
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_deflect_call_01, 1},
+       {utc_tel_deflect_call_02, 2},
+       {utc_tel_deflect_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.c b/TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.c
new file mode 100644 (file)
index 0000000..015f98f
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_exe_call_explicit_transfer.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  tel_exe_call_explicit_transfer  ( unsigned int  CallHandle, int *pRequestId );
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+
+    int  RequestId = -1;
+
+    tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+
+    gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       deregister_all();
+
+       tel_deinit();
+}
+
+
+/**
+ * @brief This tests tel_exe_call_explicit_transfer() API in normal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_EXPLICIT_TRANSFER_01
+ * @param [in] CallHandle = call_handle1
+ * @param [out] pRequestId = &RequestId
+ * @return TAPI_API_SUCCESS
+*/
+void utc_tel_exe_call_explicit_transfer_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these memebers
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these memebers
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       //expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("EXPLICIT TRANSFER %s\n",setup_call_info_02.szNumber);
+       ret_status = tel_exe_call_explicit_transfer(call_handle_02 ,&RequestId);
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       expected_event = TAPI_EVENT_CALL_TRANSFER_CNF;
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS\n");
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       printf("utc_tel_exe_call_explicit_transfer_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_exe_call_explicit_transfer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_EXPLICIT_TRANSFER_02
+ * @param [in] CallHandle = call_handle2
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_exe_call_explicit_transfer_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_exe_call_explicit_transfer(INVALID_CALL_HANDLE,&RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+
+       printf("utc_tel_exe_call_explicit_transfer_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_exe_call_explicit_transfer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_EXPLICIT_TRANSFER_04
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_exe_call_explicit_transfer_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_exe_call_explicit_transfer(VALID_CALL_HANDLE,NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_exe_call_explicit_transfer_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.h b/TC/telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer.h
new file mode 100644 (file)
index 0000000..4ee6d6a
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TAPI_TRANSFER_CALL_H_
+#define   __UTS_TAPI_TRANSFER_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+
+       static void utc_tel_exe_call_explicit_transfer_01(void);
+
+       static void utc_tel_exe_call_explicit_transfer_02(void);
+
+       static void utc_tel_exe_call_explicit_transfer_03(void);
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_exe_call_explicit_transfer_01, 1},
+       {utc_tel_exe_call_explicit_transfer_02, 2},
+       {utc_tel_exe_call_explicit_transfer_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_flash.c b/TC/telephony_TC/call/unit/uts_tel_exe_call_flash.c
new file mode 100644 (file)
index 0000000..d41e0b5
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_exe_call_flash.h"
+#include <stdlib.h>
+#define NUMBER_SIZE 11
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  tapi_api_err_t tel_exe_call_mo(tel_exe_call_mo_info_t const * const ptr_call_setup_info,
+*              tapi_call_handle *ptr_call_handle);
+*/
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests tel_exe_call_flash() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_CHECK_STATUS_01
+ * @param [out] 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_exe_call_flash_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       char pDialNumber[NUMBER_SIZE];
+       strcpy(pDialNumber, "9886541875");
+               int pRequestID;
+       ret_status = tel_exe_call_flash_info ( pDialNumber, &pRequestID);
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               printf("uts_tapi_flash_inof_01 failed %d, number %s\n",ret_status,pDialNumber);
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tapi_check_status_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ *  * @brief This tests tel_exe_call_flash() API in abnormal conditions
+ *   * @par ID:
+ *    * UTC_TAPI_CHECK_STATUS_01
+ *     * @param [out] 
+ *      * @return TAPI_API_FAILURE
+ *      */
+
+/***** TESTING FOR INVALID SET OF INPUTS*****/
+
+
+void utc_tel_exe_call_flash_02()
+{
+   CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+   TapiResult_t  ret_status ;
+   int *pRequestID;
+   ret_status = tel_exe_call_flash_info ( NULL, pRequestID);
+   if(ret_status ==TAPI_API_SUCCESS)
+   {
+       tet_result(TET_FAIL);
+   } 
+   printf("utc_tapi_check_status_02 pass");
+   tet_result(TET_PASS);
+
+  return;
+}
+
+
+/**
+ *  * @brief This tests tel_exe_call_flash() API in abnormal conditions
+ *   * @par ID:
+ *    * UTC_TAPI_CHECK_STATUS_01
+ *     * @param [out] 
+ *      * @return TAPI_API_FAILURE
+ *      */
+
+void utc_tel_exe_call_flash_03()
+{
+   CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+   TapiResult_t  ret_status ;
+       char const *const pDialNumber={"919811507939"};
+   ret_status = tel_exe_call_flash_info (pDialNumber, NULL);
+   if(ret_status ==TAPI_API_SUCCESS)
+   {
+       tet_result(TET_FAIL);
+   } 
+   printf("utc_tapi_check_status_03 pass");
+   tet_result(TET_PASS);
+
+  return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_flash.h b/TC/telephony_TC/call/unit/uts_tel_exe_call_flash.h
new file mode 100644 (file)
index 0000000..3132bdb
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_EXE_CALL_FLASH_H_
+#define   __UTS_TEL_EXE_CALL_FLASH_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+#include <TapiCommon.h>
+#include <ITapiCall.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_exe_call_flash_01(void);
+       static void utc_tel_exe_call_flash_02(void);
+       static void utc_tel_exe_call_flash_03(void);
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_exe_call_flash_01, 1},
+       {utc_tel_exe_call_flash_02, 2},
+       {utc_tel_exe_call_flash_03, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_mo.c b/TC/telephony_TC/call/unit/uts_tel_exe_call_mo.c
new file mode 100644 (file)
index 0000000..217b740
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_exe_call_mo.h"
+#include "TelCall.h"
+/* Initialize TCM data structures */
+
+/*
+* TapiResult_t    tel_exe_call_mo (const TelCallSetupParams_t* pParams,unsigned int  * pCallHandle, int * );
+
+*/
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+       
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+/**
+ * @brief This tests tel_exe_call_mo() API in normal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_MO_01
+ * @param [in] pParams = &setup_call_info
+ * @param [out] pCallHandle = &active_call_handle
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_exe_call_mo_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int active_call_handle = -1;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = {0};
+       strncpy(normal, MOB_NUM1, 16);
+
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info.szNumber, normal,16);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+       CALL_TEST_DEBUG("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;               //preet: TelCallSetupParams_t dont have these members
+        //setup_call_info.pCugInfo = NULL;
+       //setup_call_info.pUusInfo = NULL;
+       ret_status =  tel_exe_call_mo(&setup_call_info, &active_call_handle, &RequestId);
+
+       tet_printf ("setup_call_handle_01 = %d\t request_id_01 =%d\n", active_call_handle,RequestId);
+       CALL_TEST_DEBUG ("setup_call_handle_01 = %d\t request_id_01 =%d\n", active_call_handle,RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       tet_infoline("utc_tel_exe_call_mo_01 pass");
+       tet_result(TET_PASS);
+       CALL_TEST_DEBUG("i am out of 1st test case \n");
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       printf("utc_tel_exe_call_mo_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_exe_call_mo() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_MO_02
+ * @param [in] pParams = NULL
+ * @param [out] pCallHandle = &call_handle
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_exe_call_mo_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle;
+       int  RequestId = -1;
+
+       ret_status =  tel_exe_call_mo(NULL, &call_handle, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_printf ("setup_call_handle_02 = %d\t request_id_02 =%d\n", call_handle,RequestId);
+
+       printf("utc_tel_exe_call_mo_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_exe_call_mo() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_MO_03
+ * @param [in] pParams = &setup_call_info
+ * @param [out] pCallHandle = NULL
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_exe_call_mo_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, sizeof(normal));
+       ret_status =  tel_exe_call_mo(&setup_call_info, NULL, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_printf (" request_id_03 =%d\n",RequestId);
+
+       printf("utc_tel_exe_call_mo_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_exe_call_mo() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_EXE_CALL_MO_04
+ * @param [in] pParams = &setup_call_info
+ * @param [out] pCallHandle = &active_call_handle
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_exe_call_mo_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = INVALID_CALL_HANDLE;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, sizeof(normal));
+       ret_status =  tel_exe_call_mo(&setup_call_info, &call_handle, NULL);
+
+       tet_printf ("setup_call_handle_04 = %d\t request_id_04 =%d\n", call_handle,RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_exe_call_mo_04 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_exe_call_mo.h b/TC/telephony_TC/call/unit/uts_tel_exe_call_mo.h
new file mode 100644 (file)
index 0000000..f2a7e7e
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_EXE_CALL_MO_H_
+#define __UTS_TEL_EXE_CALL_MO_H_
+
+/*  Includes */
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+static void utc_tel_exe_call_mo_01(void);
+static void utc_tel_exe_call_mo_02(void);
+static void utc_tel_exe_call_mo_03(void);
+static void utc_tel_exe_call_mo_04(void);
+
+static void startup();
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_exe_call_mo_01, 1},
+       {utc_tel_exe_call_mo_02, 2},
+       {utc_tel_exe_call_mo_03, 3},
+       {utc_tel_exe_call_mo_04, 4},
+       {NULL, 0}
+};
+
+#endif
+
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.c b/TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.c
new file mode 100644 (file)
index 0000000..d8e057e
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <TapiCommon.h>
+#include "uts_tel_exit_call_emergency_mode.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  tapi_api_err_t tel_exe_call_mo(tel_exe_call_mo_info_t const * const ptr_call_setup_info,
+*              tapi_call_handle *ptr_call_handle);
+*/
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests tel_exit_call_emergency_mode() API in normal conditions
+ * @par ID:
+ * UTC_TEL_EXIT_CALL_EMERGENCY_MODE
+ * @param [out] 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_exit_call_emergency_mode_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int *pRequestID;
+       ret_status =tel_exit_call_emergency_mode(&pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_exit_call_emergency_mode_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+
+}
+/**
+ * @brief This tests tel_exit_call_emergency_mode() API in normal conditions
+ * @par ID:
+ * UTC_TEL_EXIT_CALL_EMERGENCY_MODE
+ * @param [out] 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_exit_call_emergency_mode_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       ret_status =tel_exit_call_emergency_mode(NULL); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_exit_call_emergency_mode_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.h b/TC/telephony_TC/call/unit/uts_tel_exit_call_emergency_mode.h
new file mode 100644 (file)
index 0000000..314d94b
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_EXIT_CALL_EMERGENCY_MODE_H_
+#define   __UTS_TEL_EXIT_CALL_EMERGENCY_MODE_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+#include <ITapiCall.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_exit_call_emergency_mode_01(void);
+       static void utc_tel_exit_call_emergency_mode_02(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_exit_call_emergency_mode_01, 1},
+       {utc_tel_exit_call_emergency_mode_02, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_act_line.c b/TC/telephony_TC/call/unit/uts_tel_get_call_act_line.c
new file mode 100644 (file)
index 0000000..0d6c514
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_get_call_act_line.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*   TapiResult_t tel_get_call_act_line (TelCallActiveLine_t* ptr_active_line  ,int *pRequestId);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+/**
+ * @brief This tests tel_get_call_act_line() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_ACT_LINE_01
+ * @param [in] ptr_active_line = &active_line
+ * @param [out] pRequestId = &RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_call_act_line_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       printf ("Get Active Line With Valid Out Param.");
+
+       ret_status = tel_get_call_act_line(&RequestId);
+
+       if (ret_status >= 0)
+       {
+               TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+               printf("utc_tel_get_call_act_line_01 pass\n");
+               tet_result(TET_PASS);
+       }
+       return;
+}
+
+/***** TESTING FOR INVALID SET OF INPUTS*****/
+
+/**
+ * @brief This tests tel_get_call_act_line() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_ACT_LINE_02
+ * @param [in] ptr_active_line = NULL
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_call_act_line_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_get_call_act_line(NULL);
+
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_get_call_act_line_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_act_line.h b/TC/telephony_TC/call/unit/uts_tel_get_call_act_line.h
new file mode 100644 (file)
index 0000000..62e63ab
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_ACT_LINE_H_
+#define   __UTS_TEL_GET_CALL_ACT_LINE_H_
+
+/*  Includes */
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_get_call_act_line_01(void);
+
+       static void utc_tel_get_call_act_line_02(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_act_line_01, 1},
+       {utc_tel_get_call_act_line_02, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.c b/TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.c
new file mode 100644 (file)
index 0000000..fb33f73
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_get_call_conf_list.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*    TapiResult_t      tel_get_call_conf_list ( unsigned int  CallHandle,unsigned int * pCallList, int *pNoOfCalls );                                                                          pCallList, int *pNoOfCalls );
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+unsigned int CallList[3] = {0};
+static int NoOfCalls = -1;
+extern int expected_event;
+
+//extern tapi_call_handle conf_call_handle;    //preet: conf_call_handle is nowhere used
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CallList[0] = CallList[1] = CallList[2] = -1;
+       NoOfCalls = -1;
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+
+/**
+ * @brief This tests tel_get_call_conf_list() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_CONF_LIST_01
+ * @param [in] CallHandle = callhandle[1]
+ * @param [out] pCallList = CallList //array
+ * @param [out] pNoOfCalls = &NoOfCalls
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_call_conf_list_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("JOIN TWO CALLS\n");
+       ret_status = tel_join_call (call_handle_02, call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUPCONFERENCE_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("GET CONFERENCE LIST\n");
+       ret_status = tel_get_call_conf_list (call_handle_02, CallList, &NoOfCalls);
+       tet_printf ("call_id1 =%d\n call_id2=%d\n call_id3=%d\n NoOfCalls=%d\n", CallList[0], CallList[1], CallList[2], NoOfCalls);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS\n");
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_conf_list() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_CONF_LIST_02
+ * @param [in] CallHandle = callhandle[1]
+ * @param [out] pCallList = CallList //array
+ * @param [out] pNoOfCalls = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_call_conf_list_02()
+{
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_get_call_conf_list (VALID_CALL_HANDLE, CallList, NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_get_call_conf_list_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_conf_list() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_CONF_LIST_03
+ * @param [in] CallHandle = callhandle[1]
+ * @param [out] pCallList = NULL
+ * @param [out] pNoOfCalls = &NoOfCalls
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_call_conf_list_03()
+{
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_get_call_conf_list (VALID_CALL_HANDLE, NULL, &NoOfCalls);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_get_call_conf_list_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_conf_list() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_CONF_LIST_04
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pCallList = CallList //array
+ * @param [out] pNoOfCalls = &NoOfCalls
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_get_call_conf_list_04()
+{
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_get_call_conf_list (INVALID_CALL_HANDLE, CallList, &NoOfCalls);
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+       printf("utc_tel_get_call_conf_list_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.h b/TC/telephony_TC/call/unit/uts_tel_get_call_conf_list.h
new file mode 100644 (file)
index 0000000..bd14c88
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_CONF_LIST_H_
+#define   __UTS_TEL_GET_CALL_CONF_LIST_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+
+
+/**
+* @test   This test case tests   TapiResult_t  tel_get_call_conf_list ( unsigned int  CallHandle,unsigned int *        *                                                                               pCallList, int *pNoOfCalls );
+* @brief  This API is used to establish conference call
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_get_call_conf_list_01(void);
+
+       static void utc_tel_get_call_conf_list_02(void);
+
+       static void utc_tel_get_call_conf_list_03(void);
+
+       static void utc_tel_get_call_conf_list_04(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_conf_list_01, 1},
+       {utc_tel_get_call_conf_list_02, 2},
+       {utc_tel_get_call_conf_list_03, 3},
+       {utc_tel_get_call_conf_list_04, 4},
+
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_duration.c b/TC/telephony_TC/call/unit/uts_tel_get_call_duration.c
new file mode 100644 (file)
index 0000000..4d6855b
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_get_call_duration.h"
+
+/*
+*    TapiResult_t      tel_get_call_duration  ( unsigned int  CallHandle, unsigned int * pDurationInSecs);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+
+/**
+ * @brief This tests tel_get_call_duration() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_DURATION_01
+ * @param [in] CallHandle = callhandle
+ * @param [out] pDurationInSecs = &DurationInSecs
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_call_duration_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+
+       unsigned int DurationInSecs;
+
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       CALL_TEST_DEBUG("MAKE A MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       tet_printf ("call_handle = %d\n",call_handle_01);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+
+       ret_status  = tel_get_call_duration (call_handle_01, &DurationInSecs);
+
+       tet_printf ("Call_duration =%d \n", DurationInSecs);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       printf("utc_tel_get_call_duration_01 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_get_call_duration() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_DURATION_02
+ * @param [in] CallHandle = callhandle
+ * @param [out] pDurationInSecs = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_call_duration_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status  = tel_get_call_duration (VALID_CALL_HANDLE, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_get_call_duration_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_get_call_duration() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_DURATION_03
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pDurationInSecs = &DurationInSecs
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_get_call_duration_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int DurationInSecs = -1;
+
+       ret_status  = tel_get_call_duration (INVALID_CALL_HANDLE, &DurationInSecs);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+       printf("utc_tel_get_call_duration_03\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_duration.h b/TC/telephony_TC/call/unit/uts_tel_get_call_duration.h
new file mode 100644 (file)
index 0000000..c417e36
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_DURATION_H_
+#define   __UTS_TEL_GET_CALL_DURATION_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   tel_get_call_duration  ( unsigned int  CallHandle, unsigned int *                                                                               pDurationInSecs);
+* @brief  This API is used to test to get the call information.
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_get_call_duration_01(void);
+
+       static void utc_tel_get_call_duration_02(void);
+
+       static void utc_tel_get_call_duration_03(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_duration_01, 1},
+       {utc_tel_get_call_duration_02, 2},
+       {utc_tel_get_call_duration_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.c b/TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.c
new file mode 100644 (file)
index 0000000..2eac1c1
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <TelCall.h>
+#include "uts_tel_get_call_privacy_mode.h"
+
+/* Initialize TCM data structures */
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests () API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_PRIVACY_MODE_01
+ * @param [out] 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_get_call_privacy_mode_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallPrivacyType_t PrivacyType;
+               int *pRequestID;
+               PrivacyType =  TAPI_CALL_PRIVACY_TYPE_MS;       
+       ret_status =tel_get_call_privacy_mode (PrivacyType, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_privacy_mode_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallPrivacyType_t PrivacyType;
+               int *pRequestID;
+               PrivacyType = TAPI_CALL_PRIVACY_TYPE_BS ;       
+       ret_status =tel_get_call_privacy_mode (PrivacyType, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_privacy_mode_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallPrivacyType_t PrivacyType;
+               int *pRequestID;
+               PrivacyType =  TAPI_CALL_PRIVACY_TYPE_CURRENT;  
+       ret_status =tel_get_call_privacy_mode (PrivacyType, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_privacy_mode_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+               int *pRequestID;
+       ret_status =tel_get_call_privacy_mode (-1, pRequestID); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_04 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_privacy_mode_05()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+               int *pRequestID;
+       ret_status =tel_get_call_privacy_mode (4, pRequestID); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_04 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_privacy_mode_06()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallPrivacyType_t PrivacyType;
+               PrivacyType =  TAPI_CALL_PRIVACY_TYPE_CURRENT;  
+       ret_status =tel_get_call_privacy_mode (PrivacyType, NULL); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_05 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.h b/TC/telephony_TC/call/unit/uts_tel_get_call_privacy_mode.h
new file mode 100644 (file)
index 0000000..02043b3
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_PRIVACY_MODE_H_
+#define   __UTS_TEL_GET_CALL_PRIVACY_MODE_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+#include <ITapiCall.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_get_call_privacy_mode_01(void);
+       static void utc_tel_get_call_privacy_mode_02(void);
+       static void utc_tel_get_call_privacy_mode_03(void);
+       static void utc_tel_get_call_privacy_mode_04(void);
+       static void utc_tel_get_call_privacy_mode_05(void);
+       static void utc_tel_get_call_privacy_mode_06(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_privacy_mode_01, 1},
+       {utc_tel_get_call_privacy_mode_02, 2},
+       {utc_tel_get_call_privacy_mode_03, 3},
+       {utc_tel_get_call_privacy_mode_04, 4},
+       {utc_tel_get_call_privacy_mode_05, 5},
+       {utc_tel_get_call_privacy_mode_06, 6},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_status.c b/TC/telephony_TC/call/unit/uts_tel_get_call_status.c
new file mode 100644 (file)
index 0000000..ffb3902
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_get_call_status.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*    TapiResult_t      tel_get_call_status ( unsigned int  CallHandle, TelCallStatus_t * pCallStatus);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+/**
+ * @brief This tests tel_get_call_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_STATUS_01
+ * @param [in] CallHandle = callhandle
+ * @param [out] pCallStatus = &CallStatus
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_call_status_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       TS_UINT call_handle;
+       TelCallStatus_t CallStatus;
+       TelCallSetupParams_t setup_call_info;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+       ret_status=tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+       tet_printf ("call_handle = %d\n",call_handle);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       RequestId = -1;
+       tet_printf ("call_handle = %d\n",call_handle);
+       ret_status  = tel_get_call_status (call_handle, &CallStatus);
+
+       tet_printf ("bMoCall = %d \n pNumber = %s\n CallType = %d\n allActiveState=%d\n CallState =%d\n bConferenceState =%d\n", CallStatus.bMoCall, CallStatus.pNumber, CallStatus.CallType, CallStatus.CallActiveState, CallStatus.CallState, CallStatus.bConferenceState);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       printf("utc_tel_get_call_status_01 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_STATUS_02
+ * @param [in] CallHandle = callhandle
+ * @param [out] pCallStatus = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_call_status_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status  = tel_get_call_status (VALID_CALL_HANDLE, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_get_call_status_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_STATUS_03
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pCallStatus = &CallStatus
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+void utc_tel_get_call_status_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallStatus_t CallStatus;
+
+       ret_status  = tel_get_call_status (INVALID_CALL_HANDLE, &CallStatus);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+       printf("utc_tel_get_call_status_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_call_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_STATUS_04
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pCallStatus = NULL
+ * @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_call_status_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status  = tel_get_call_status (INVALID_CALL_HANDLE, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_get_call_status_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_status.h b/TC/telephony_TC/call/unit/uts_tel_get_call_status.h
new file mode 100644 (file)
index 0000000..9af698e
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_STATUS_H_
+#define   __UTS_TEL_GET_CALL_STATUS_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   tel_get_call_status ( unsigned int  CallHandle,
+                                                                       TelCallStatus_t *pCallStatus);
+* @brief  This API is used to test to get the call information.
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_get_call_status_01(void);
+
+       static void utc_tel_get_call_status_02(void);
+
+       static void utc_tel_get_call_status_03(void);
+
+       static void utc_tel_get_call_status_04(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_status_01, 1},
+       {utc_tel_get_call_status_02, 2},
+       {utc_tel_get_call_status_03, 3},
+       {utc_tel_get_call_status_04, 4},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_time.c b/TC/telephony_TC/call/unit/uts_tel_get_call_time.c
new file mode 100644 (file)
index 0000000..9ced768
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <TapiCommon.h>
+#include "uts_tel_get_call_time.h"
+
+/* Initialize TCM data structures */
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests () API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_TIME_01
+ * @param [out] status 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_get_call_time_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TS_WORD req_mask = 1;
+               int *pRequestID;
+       ret_status = tel_get_call_time (req_mask, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_time_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_get_call_time_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TS_WORD req_mask = 1;
+       ret_status = tel_get_call_time (req_mask, NULL); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_time_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_get_call_time.h b/TC/telephony_TC/call/unit/uts_tel_get_call_time.h
new file mode 100644 (file)
index 0000000..9e7b052
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_GET_CALL_TIME_H_
+#define   __UTS_TEL_GET_CALL_TIME_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+#include <ITapiCall.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_get_call_time_01(void);
+       static void utc_tel_get_call_time_02(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_call_time_01, 1},
+       {utc_tel_get_call_time_02, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_hold_call.c b/TC/telephony_TC/call/unit/uts_tel_hold_call.c
new file mode 100644 (file)
index 0000000..b46bb82
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_hold_call.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  TapiResult_t        tel_hold_call ( unsigned int  CallHandle, int *pRequestId);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+
+
+/**
+ * @brief This tests tel_hold_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_HOLD_CALL_01
+ * @param [in] CallHandle = g_hold_callhandle[1]
+ * @param [out] pRequestId = &RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_hold_call_01()
+{
+       CALL_TEST_DEBUG("################     TEST START    ################");
+       TapiResult_t  ret_status ;
+       unsigned int active_call_handle = -1;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;       //preet: TelCallSetupParams_t dont have these memebers
+       //setup_call_info.pCugInfo = NULL;
+       //setup_call_info.pUusInfo = NULL;
+
+       CALL_TEST_DEBUG("MAKE A MO CALL TO %s",setup_call_info.szNumber);
+
+       ret_status =  tel_exe_call_mo(&setup_call_info, &active_call_handle , &RequestId);
+       //ret_status = tel_answer_call(g_CallHandle, TEL_ANSWER_CALL_ACCEPT, &RequestId);
+         //      g_CallHandle = -1;
+       //              TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       //                      expected_event = TAPI_EVENT_CALL_ANSWER_CNF;
+       //                              gmain_loop_for_tapi_events(TIME_DELAY1);
+                               
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUP_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL");
+
+       ret_status = tel_hold_call (active_call_handle , &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS");
+
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       tet_result(TET_PASS);
+
+       return;
+
+}
+
+/**
+ * @brief This tests tel_hold_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_HOLD_CALL_02
+ * @param [in] CallHandle = 1
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_hold_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       TS_UINT call_handle = VALID_CALL_HANDLE;
+
+       ret_status = tel_hold_call ( call_handle, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_infoline("utc_tel_hold_call_02");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_hold_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_HOLD_CALL_03
+ * @param [in] CallHandle = call_handle
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_hold_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = INVALID_CALL_HANDLE;
+       int  RequestId = -1;
+
+       ret_status = tel_hold_call (call_handle, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+
+       tet_infoline("utc_tel_hold_call_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_hold_call.h b/TC/telephony_TC/call/unit/uts_tel_hold_call.h
new file mode 100644 (file)
index 0000000..7cfec54
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_HOLD_CALL_H_
+#define   __UTS_TEL_HOLD_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   tel_hold_call ( unsigned int  CallHandle, int *pRequestId);
+* @brief  This API is used to test MT call
+* @return  tapi_api_err_t
+*/
+
+
+
+       static void utc_tel_hold_call_01(void);
+
+       static void utc_tel_hold_call_02(void);
+
+       static void utc_tel_hold_call_03(void);
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_hold_call_01, 1},
+       {utc_tel_hold_call_02, 2},
+       {utc_tel_hold_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_join_call.c b/TC/telephony_TC/call/unit/uts_tel_join_call.c
new file mode 100644 (file)
index 0000000..aee59b3
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_join_call.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*    TapiResult_t      tel_join_call ( unsigned int  CallHandle1,  unsigned int  CallHandle2, int * pRequestId);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+}
+
+static void cleanup()
+{
+       int  RequestId = -1;
+
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY0);
+
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+/**
+ * @brief This tests tel_join_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_JOIN_CALL_01
+ * @param [in] CallHandle1 = callhandle[1]
+ * @param [in] CallHandle2 = callhandle[0]
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_join_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t dont have these members
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t dont have these member
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       //expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("JOIN TWO CALLS\n");
+
+       ret_status = tel_join_call (call_handle_02, call_handle_01, &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUPCONFERENCE_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS\n");
+
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       printf("utc_tel_join_call_01 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_join_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_JOIN_CALL_02
+ * @param [in] CallHandle1 = INVALID_CALL_HANDLE
+ * @param [in] CallHandle2 = VALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_join_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_join_call (INVALID_CALL_HANDLE, VALID_CALL_HANDLE, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+
+       printf("utc_tel_join_call_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_join_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_JOIN_CALL_04
+ * @param [in] CallHandle1 = VALID_CALL_HANDLE
+ * @param [in] CallHandle2 = VALID_CALL_HANDLE+1
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_join_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_join_call (VALID_CALL_HANDLE, VALID_CALL_HANDLE+1, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_join_call_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_join_call.h b/TC/telephony_TC/call/unit/uts_tel_join_call.h
new file mode 100644 (file)
index 0000000..deb278d
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_JOIN_CALL_H_
+#define   __UTS_TEL_JOIN_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+
+       static void utc_tel_join_call_01(void);
+
+       static void utc_tel_join_call_02(void);
+
+       static void utc_tel_join_call_03(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_join_call_01, 1},
+       {utc_tel_join_call_02, 2},
+       {utc_tel_join_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call.c b/TC/telephony_TC/call/unit/uts_tel_release_call.c
new file mode 100644 (file)
index 0000000..94f0da7
--- /dev/null
@@ -0,0 +1,185 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <ITapiSs.h>
+
+#include "uts_tel_release_call.h"
+
+
+extern TS_UINT g_CallHandle;
+
+/* Initialize TCM data structures */
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+       g_CallHandle = -1;
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+       g_CallHandle = -1;
+
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+TapiResult_t   tel_release_call ( unsigned int  CallHandle, int *pRequestId);
+*/
+
+
+/**
+ * @brief This tests tel_release_call() API in normal conditions (MO CALL)
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_01
+ * @param [in] CallHandle = active_call_handle
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+
+void utc_tel_release_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int active_call_handle = 0;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;       //preet: TelCallSetupParams_t dont ahve these members
+       //setup_call_info.pCugInfo = NULL;
+       //setup_call_info.pUusInfo = NULL;
+
+       CALL_TEST_DEBUG("MAKE A MO CALL TO %s",setup_call_info.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info, &g_CallHandle, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUP_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RELEASE A CALL %s\n",setup_call_info.szNumber);
+       ret_status = tel_release_call (g_CallHandle,&RequestId );
+
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       tet_infoline("utc_tel_release_call_01");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_release_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_02
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_release_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = -1;//INVALID_CALL_HANDLE;
+       int  RequestId = -1;
+
+       ret_status = tel_release_call (call_handle ,&RequestId);
+
+       printf ("utc_tel_release_call_02  RequestId = %d\n", RequestId);
+
+       TET_CHECK(TAPI_API_COULD_NOT_GET_CALL_CTXT, ret_status);
+
+       tet_infoline("utc_tel_release_call_02");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_release_call() API in abnormal conditions (MT CALL)
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_03
+ * @param [in] CallHandle = g_CallHandle
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+
+void utc_tel_release_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle;
+
+       ret_status = tel_release_call (call_handle,NULL );
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_infoline("utc_tel_release_call_03");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call.h b/TC/telephony_TC/call/unit/uts_tel_release_call.h
new file mode 100644 (file)
index 0000000..f0d314a
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_RELEASE_CALL_H_
+#define   __UTS_TEL_RELEASE_CALL_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+
+/**
+* @test   This test case tests  TapiResult_t   tel_release_call ( unsigned int  CallHandle, int *pRequestId);
+                               TapiResult_t    tel_release_callAll (int *pRequestId);
+* @brief  This API is used to test MT call
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_release_call_01(void);
+
+       static void utc_tel_release_call_02(void);
+
+       static void utc_tel_release_call_03(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_release_call_01, 1},
+       {utc_tel_release_call_02, 2},
+       {utc_tel_release_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all.c b/TC/telephony_TC/call/unit/uts_tel_release_call_all.c
new file mode 100644 (file)
index 0000000..08bf39f
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+
+#include "uts_tel_release_call_all.h"
+
+/* Initialize TCM data structures */
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{      
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests tel_release_call_all() API in normal conditions (MO call)
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_ALL_01
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_release_call_all_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet
+       //setup_call_info_01.pCugInfo = NULL;   
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUP_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+                        
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUP_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       
+       CALL_TEST_DEBUG("RELEASE ALL ACTIVE CALL\n");
+       ret_status =  tel_release_call_all(&RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_release_call_all() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_ALL_02
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_release_call_all_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_release_call_all (NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_infoline("utc_tel_release_call_func_03");
+       tet_result(TET_PASS);
+
+       return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all.h b/TC/telephony_TC/call/unit/uts_tel_release_call_all.h
new file mode 100644 (file)
index 0000000..eb3574c
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_RELEASE_CALL_ALL_H_
+#define  __UTS_TEL_RELEASE_CALL_ALL_H_ 
+
+/*  Includes */
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests         TapiResult_t    tel_release_call_all (int *pRequestId);
+* @brief  This API is used to test MT call
+* @return  tapi_api_err_t
+*/
+
+
+//     static void utc_tel_release_call_all_01(void);
+
+       static void utc_tel_release_call_all_01(void);
+
+       static void utc_tel_release_call_all_02(void);
+
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_release_call_all_01, 1},
+       {utc_tel_release_call_all_02, 2},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all_active.c b/TC/telephony_TC/call/unit/uts_tel_release_call_all_active.c
new file mode 100644 (file)
index 0000000..3705fa1
--- /dev/null
@@ -0,0 +1,182 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_release_call_all_active.h"
+
+
+/* Initialize TCM data structures */
+
+
+
+
+
+/*
+*  TapiResult_t        tel_release_call_all_active(int *pRequestID);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       int  RequestId = -1;
+
+       tel_release_call_all(&RequestId);
+       gmain_loop_for_tapi_events(TIME_DELAY0);
+
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+/**
+ * @brief This tests tel_release_call_active_all() API in normal conditions
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_ALL_ACTIVe_01
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_release_call_all_active_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these members
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these members
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RELEASE ALL ACTIVE CALL\n");
+       ret_status =  tel_release_call_all_active(&RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       TelCallStatus_t call_status;
+
+       CALL_TEST_DEBUG("GET CALL STATUS\n");
+       ret_status = tel_get_call_status (call_handle_01, &call_status);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       CALL_TEST_DEBUG("Active State :%d\n",call_status.CallActiveState);
+       CALL_TEST_DEBUG("Call State    :%d\n",call_status.CallState);
+       CALL_TEST_DEBUG("call Type :%d\n",call_status.CallType);
+       CALL_TEST_DEBUG("call Number :%s\n",call_status.pNumber);
+
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_release_call_all_active() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_RELEASE_CALL_ALL_ACTIVe_02
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+
+void utc_tel_release_call_all_active_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_release_call_all_active(NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       tet_infoline("utc_tel_release_call_all_active_02");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all_active.h b/TC/telephony_TC/call/unit/uts_tel_release_call_all_active.h
new file mode 100644 (file)
index 0000000..2117dc5
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_RELEASE_CALL_ALL_ACTIVE_H_
+#define   __UTS_TEL_RELEASE_CALL_ALL_ACTIVE_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests   TapiResult_t  tel_release_call_all_active(int *pRequestID);
+* @brief  This API is used to release all active call.
+* @return  TapiResult_t
+*/
+
+
+
+/**
+* @test                This test case tests
+* API          This test case tests TapiResult_t       tel_release_call_all_active(int *pRequestID);
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    pRequestID = valid pointer ,
+* @return      TAPI_API_SUCCESS
+
+*/
+
+       static void utc_tel_release_call_all_active_01(void);
+
+
+/**
+* @test                This test case tests
+* API          This test case tests TapiResult_t       tel_release_call_all_active(int *pRequestID);
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    pRequestID = NULL ,
+* @return      TAPI_API_INVALID_PTR
+
+*/
+
+       static void utc_tel_release_call_all_active_02(void);
+
+
+\r\r     static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+               {utc_tel_release_call_all_active_01, 1},
+               {utc_tel_release_call_all_active_02, 2},
+               {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all_held.c b/TC/telephony_TC/call/unit/uts_tel_release_call_all_held.c
new file mode 100644 (file)
index 0000000..ccdc03b
--- /dev/null
@@ -0,0 +1,169 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+#include "uts_tel_release_call_all_held.h"\r
+\r
+\r
+\r
+/* Initialize TCM data structures */\r
+\r
+\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+extern int expected_event;\r
+\r
+static void startup()\r
+{\r
+       TapiResult_t  ret_status ;\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       ret_status = tel_init();\r
+\r
+       if(ret_status != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed ret_status = %d \n",ret_status);\r
+       }\r
+\r
+\r
+       register_all_events();\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephpny service  %d\n",bStatus);\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+\r
+       tel_deinit();\r
+}\r
+\r
+\r
+/**\r
+TapiResult_t   tel_release_call_all_held (int *pRequestId);\r
+*/\r
+\r
+\r
+/**\r
+ * @brief This tests tel_release_call_all_held() API in normal conditions (MO call)\r
+ * @par ID:\r
+ * UTC_TEL_RELEASE_CALL_ALL_01\r
+ * @param [out] pRequestId = &RequestId\r
+* @return TAPI_API_SUCCESS\r
+*/\r
+void utc_tel_release_call_all_held_01()\r
+{\r
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");\r
+       TapiResult_t  ret_status ;\r
+       unsigned int call_handle_01 = -1;\r
+       unsigned int call_handle_02 = -1;\r
+       TelCallSetupParams_t setup_call_info_01;\r
+       TelCallSetupParams_t setup_call_info_02;\r
+       int  RequestId = -1;\r
+       char normal1[16] = MOB_NUM1;\r
+       char normal2[16] = MOB_NUM2;\r
+\r
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));\r
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;\r
+       strncpy(setup_call_info_01.szNumber, normal1, 13);\r
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);\r
+\r
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet\r
+       //setup_call_info_01.pCugInfo = NULL;\r
+       //setup_call_info_01.pUusInfo = NULL;\r
+\r
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));\r
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;\r
+       strncpy(setup_call_info_02.szNumber, normal2, 13);\r
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);\r
+\r
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet\r
+       //setup_call_info_02.pCugInfo = NULL;\r
+       //setup_call_info_02.pUusInfo = NULL;\r
+\r
+\r
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);\r
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);\r
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;\r
+       gmain_loop_for_tapi_events(TIME_DELAY1);\r
+\r
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");\r
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);\r
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;\r
+       gmain_loop_for_tapi_events(TIME_DELAY1);\r
+\r
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);\r
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);\r
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;\r
+       gmain_loop_for_tapi_events(TIME_DELAY1);\r
+\r
+\r
+       CALL_TEST_DEBUG("RELEASE ALL HELD CALLS\n");\r
+       ret_status =  tel_release_call_all_held(&RequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);\r
+       expected_event = TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF;\r
+       gmain_loop_for_tapi_events(TIME_DELAY1);\r
+\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests tel_release_call_all() API in abnormal conditions\r
+ * @par ID:\r
+ * UTC_TEL_RELEASE_CALL_ALL_02\r
+ * @param [out] pRequestId = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+\r
+void utc_tel_release_call_all_held_02()\r
+{\r
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");\r
+       TapiResult_t  ret_status ;\r
+\r
+       ret_status = tel_release_call_all_held (NULL);\r
+\r
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);\r
+\r
+       tet_infoline("utc_tel_release_call_all_held_func_02");\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/call/unit/uts_tel_release_call_all_held.h b/TC/telephony_TC/call/unit/uts_tel_release_call_all_held.h
new file mode 100644 (file)
index 0000000..59a22b8
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#ifndef        __UTS_TEL_RELEASE_CALL_ALL_CALL_H_\r
+#define   __UTS_TEL_RELEASE_CALL_ALL_CALL_H_\r
+\r
+/*  Includes */\r
+\r
+#include "tapi_callback.h"\r
+#include <tet_api.h>\r
+#include "call_common.h"\r
+\r
+extern TS_UINT g_CallHandle;\r
+extern TS_BOOL call_status;\r
+\r
+\r
+\r
+/**\r
+* @test   This test case tests         TapiResult_t    tel_release_call_all (int *pRequestId);\r
+* @brief  This API is used to test MT call\r
+* @return  tapi_api_err_t\r
+*/\r
+\r
+\r
+//     static void utc_tel_release_call_all_01(void);\r
+\r
+       static void utc_tel_release_call_all_held_01(void);\r
+\r
+       static void utc_tel_release_call_all_held_02(void);\r
+\r
+\r
+\r
+       static void startup();\r
+\r
+       static void cleanup();\r
+\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+//     {utc_tel_release_call_all_01, 1},\r
+       {utc_tel_release_call_all_held_01, 1},\r
+       {utc_tel_release_call_all_held_02, 2},\r
+       {NULL, 0}\r
+       };\r
+\r
+#endif\r
+\r
+/**\r
+ * @}\r
+ */\r
+\r
diff --git a/TC/telephony_TC/call/unit/uts_tel_retrieve_call.c b/TC/telephony_TC/call/unit/uts_tel_retrieve_call.c
new file mode 100644 (file)
index 0000000..b590728
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_retrieve_call.h"
+
+
+/* Initialize TCM data structures */
+
+/*
+*  TapiResult_t        tel_retrieve_call ( unsigned int  CallHandle, int *pRequestId) ;
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+       int  RequestId = -1;
+
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       deregister_all();
+
+       tel_deinit();
+}
+
+
+/**
+ * @brief This tests tel_retrieve_call() API in normal conditions
+ * @par ID: UTC_TEL_RETRIEVE_CALL_01
+ * @param [in] CallHandle = g_retreive_handle[0]
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+
+void utc_tel_retrieve_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int active_call_handle = 0;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info.szNumber, normal, 13);
+       tet_printf("called number = %s\n", setup_call_info.szNumber);
+
+       //setup_call_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;       //preet
+       //setup_call_info.pCugInfo = NULL;
+       //setup_call_info.pUusInfo = NULL;
+
+       CALL_TEST_DEBUG("MAKE A MO CALL TO %s",setup_call_info.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info, &active_call_handle, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL");
+       ret_status = tel_hold_call (active_call_handle , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("RETRIEVE THE HELD CALL");
+       ret_status = tel_retrieve_call (active_call_handle ,&RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_RETRIEVE_CNF;
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS");
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       printf("utc_tel_retrieve_call_01 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+
+}
+
+/**
+ * @brief This tests tel_retrieve_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_RETRIEVE_CALL_02
+ * @param [in] CallHandle = g_retreive_handle[1]
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_retrieve_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       unsigned int call_handle = VALID_CALL_HANDLE;
+
+       ret_status = tel_retrieve_call (call_handle , NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       RequestId = -1;
+
+       printf("utc_tel_retrieve_call_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+
+}
+
+/**
+ * @brief This tests tel_retrieve_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_RETRIEVE_CALL_03
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_retrieve_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = INVALID_CALL_HANDLE;
+       int  RequestId = -1;
+
+       ret_status = tel_retrieve_call (call_handle, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+
+       printf("utc_tel_retrieve_call_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_retrieve_call.h b/TC/telephony_TC/call/unit/uts_tel_retrieve_call.h
new file mode 100644 (file)
index 0000000..68b8c6b
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_RETRIEVE_CALL_H_
+#define   __UTS_TEL_RETRIEVE_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+/**
+* @test   This test case tests  TapiResult_t   tel_retrieve_call ( unsigned int  CallHandle, int *pRequestId) ;
+* @brief  This API is used to test MT call
+* @return  tapi_api_err_t
+*/
+
+
+       static void utc_tel_retrieve_call_01(void);
+
+       static void utc_tel_retrieve_call_02(void);
+
+       static void utc_tel_retrieve_call_03(void);
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_retrieve_call_01, 1},
+       {utc_tel_retrieve_call_02, 2},
+       {utc_tel_retrieve_call_03, 3},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.c b/TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.c
new file mode 100644 (file)
index 0000000..cad4e75
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include<unistd.h>
+
+#include "uts_tel_send_call_dtmf.h"
+
+
+
+/* Initialize TCM data structures */
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+}
+
+static void cleanup()
+{
+       int RequestId;
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+*   TapiResult_t       tel_send_call_dtmf (const char * pDtmfString, int *pRequestId);
+*/
+
+
+/**
+ * @brief This tests tel_send_call_dtmf () API in normal condition (MO call)
+ * @par ID:
+ * UTC_TEL_SEND_CALL_DTMF_01
+ * @param [in] pDtmfString = DTMF_STRING
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_send_call_dtmf_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = INVALID_CALL_HANDLE;
+       TelCallSetupParams_t setup_call_info;
+       int  RequestId = -1;
+       char normal[16] = MOB_NUM1;
+
+       memset(&setup_call_info, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info.CallType = TAPI_CALL_TYPE_VOICE;   //VOICE CALL
+       strncpy(setup_call_info.szNumber, normal, sizeof(normal));
+       ret_status =  tel_exe_call_mo(&setup_call_info, &call_handle, &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       ret_status = tel_send_call_dtmf(DTMF_STRING , &RequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       expected_event = TAPI_EVENT_CALL_SEND_DTMF_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       printf("utc_tel_send_call_dtmf_func_01 pass");
+       tet_result(TET_PASS);
+
+       tel_release_call_all(&RequestId);
+
+       expected_event = TAPI_EVENT_CALL_END_IND;
+    gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_send_call_dtmf () API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_CALL_DTMF_03
+ * @param [in] pDtmfString = DTMF_STRING
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_send_call_dtmf_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_send_call_dtmf (DTMF_STRING , NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_send_call_dtmf_func_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_send_call_dtmf () API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_CALL_DTMF_04
+ * @param [in] pDtmfString = NULL
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_send_call_dtmf_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       int  RequestId = -1;
+       ret_status = tel_send_call_dtmf (NULL , &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_send_call_dtmf_func_04 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.h b/TC/telephony_TC/call/unit/uts_tel_send_call_dtmf.h
new file mode 100644 (file)
index 0000000..8e1c95e
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_SEND_CALL_DTMF_H_
+#define   __UTS_TEL_SEND_CALL_DTMF_H_
+
+/*  Includes */
+
+#include <tet_api.h>
+#include "call_common.h"
+#include <ITapiCall.h>
+#include "tapi_callback.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_send_call_dtmf_01(void);
+
+       static void utc_tel_send_call_dtmf_03(void);
+
+       static void utc_tel_send_call_dtmf_04(void);
+
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_call_dtmf_01, 1},
+       {utc_tel_send_call_dtmf_03, 3},
+       {utc_tel_send_call_dtmf_04, 4},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_set_call_act_line.c b/TC/telephony_TC/call/unit/uts_tel_set_call_act_line.c
new file mode 100644 (file)
index 0000000..5d816d3
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_set_call_act_line.h"
+
+
+/* Initialize TCM data structures */
+
+
+/*
+*   TapiResult_t tel_set_call_act_line (TelCallActiveLine_t active_line  ,int *pRequestId);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1 ,&RequestId);
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+/**
+ * @brief This tests tel_set_call_act_line() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_CALL_ACT_LINE_01
+ * @param [in] CallHandle = TAPI_CALL_ACTIVE_LINE1
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+
+void utc_tel_set_call_act_line_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1 ,&RequestId);
+
+       expected_event = TAPI_EVENT_CALL_SET_LINEID_CNF;
+       if (ret_status >= 0)
+       {
+               TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+               expected_event = TAPI_EVENT_CALL_SET_LINEID_CNF;
+               printf("utc_tel_set_call_act_line_01 pass\n");
+               tet_result(TET_PASS);
+       }
+       return;
+}
+
+
+/**
+ * @brief This tests tel_set_call_act_line() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_CALL_ACT_LINE_02
+ * @param [in] CallHandle = TAPI_CALL_ACTIVE_LINE2
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_set_call_act_line_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE2 ,&RequestId);
+
+       expected_event = TAPI_EVENT_CALL_SET_LINEID_CNF;
+       if (ret_status >= 0)
+       {
+               TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+               expected_event = TAPI_EVENT_CALL_SET_LINEID_CNF;
+               printf("utc_tel_set_call_act_line_02 pass\n");
+               tet_result(TET_PASS);
+       }
+       return;
+}
+
+/**
+ * @brief This tests tel_set_call_act_line() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_CALL_ACT_LINE_03
+ * @param [in] CallHandle = TAPI_CALL_ACTIVE_LINE2+1
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_call_act_line_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE2+1 ,&RequestId);
+
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_status);
+
+       printf("utc_tel_set_call_act_line_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_call_act_line() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_CALL_ACT_LINE_04
+ * @param [in] CallHandle = TAPI_CALL_ACTIVE_LINE1-1
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_call_act_line_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1-1 ,&RequestId);
+
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_status);
+
+       printf("utc_tel_set_call_act_line_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_call_act_line() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_CALL_ACT_LINE_05
+ * @param [in] CallHandle = TAPI_CALL_ACTIVE_LINE1-1
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_call_act_line_05()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_set_call_act_line(TAPI_CALL_ACTIVE_LINE1 ,NULL);
+
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_set_call_act_line_05 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+
+
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_set_call_act_line.h b/TC/telephony_TC/call/unit/uts_tel_set_call_act_line.h
new file mode 100644 (file)
index 0000000..32f569a
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_SET_CALL_ACT_LINE_H_
+#define   __UTS_TEL_SET_CALL_ACT_LINE_H_
+
+/*  Includes */
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_set_call_act_line_01(void);
+
+       static void utc_tel_set_call_act_line_02(void);
+
+       static void utc_tel_set_call_act_line_03(void);
+
+       static void utc_tel_set_call_act_line_04(void);
+
+       static void utc_tel_set_call_act_line_05(void);
+
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_call_act_line_01, 1},
+       {utc_tel_set_call_act_line_02, 2},
+       {utc_tel_set_call_act_line_03, 3},
+       {utc_tel_set_call_act_line_04, 4},
+       {utc_tel_set_call_act_line_05, 5},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.c b/TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.c
new file mode 100644 (file)
index 0000000..39f448e
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <TelCall.h>
+#include "uts_tel_set_call_privacy_mode.h"
+
+/* Initialize TCM data structures */
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       deregister_all();
+
+       tel_deinit();
+}
+
+/**
+ * @brief This tests () API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_CALL_PRIVACY_MODE_01
+ * @param [out] 
+ * @return TAPI_API_SUCCESS
+*/
+
+/***** TESTING FOR VALID SET OF INPUTS*****/
+
+void utc_tel_set_call_privacy_mode_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  TAPI_CALL_PRIVACY_TYPE_MS;   
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_STANDARD ;     
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_01 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  TAPI_CALL_PRIVACY_TYPE_MS;   
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_02 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  TAPI_CALL_PRIVACY_TYPE_BS;   
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_STANDARD ;     
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_03 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+void utc_tel_set_call_privacy_mode_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  TAPI_CALL_PRIVACY_TYPE_BS;   
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_04 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_05()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  TAPI_CALL_PRIVACY_TYPE_CURRENT;      
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_STANDARD ;     
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_05 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_06()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType = TAPI_CALL_PRIVACY_TYPE_CURRENT ;      
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status !=TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_06 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_07()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  -1;  
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_07 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_08()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType =  4;   
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       printf("\nReturn Code is :%d\n",ret_status);
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_08 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_09()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType = TAPI_CALL_PRIVACY_TYPE_CURRENT ;      
+               PrivacyInfo.PrivacyMode = -1;   
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_09 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_10()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               int *pRequestID;
+               PrivacyInfo.PrivacyType = TAPI_CALL_PRIVACY_TYPE_CURRENT ;      
+               PrivacyInfo.PrivacyMode = 2;    
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, &pRequestID); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_10 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_set_call_privacy_mode_11()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       TelCallVoicePrivacyInfo_t PrivacyInfo ;
+               PrivacyInfo.PrivacyType = TAPI_CALL_PRIVACY_TYPE_CURRENT ;      
+               PrivacyInfo.PrivacyMode = TAPI_CALL_PRIVACY_MODE_ENHANCED;      
+       ret_status =tel_set_call_privacy_mode (PrivacyInfo, NULL); 
+       if(ret_status ==TAPI_API_SUCCESS)
+       {
+               tet_result(TET_FAIL);
+       }       
+       printf("utc_tel_get_call_privacy_mode_11 pass");
+       tet_result(TET_PASS);
+
+       return;
+}
diff --git a/TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.h b/TC/telephony_TC/call/unit/uts_tel_set_call_privacy_mode.h
new file mode 100644 (file)
index 0000000..26366d1
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_SET_CALL_PRIVACY_MODE_H_
+#define   __UTS_TEL_SET_CALL_PRIVACY_MODE_H_
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+#include <ITapiCall.h>
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+       static void utc_tel_set_call_privacy_mode_01(void);
+       static void utc_tel_set_call_privacy_mode_02(void);
+       static void utc_tel_set_call_privacy_mode_03(void);
+       static void utc_tel_set_call_privacy_mode_04(void);
+       static void utc_tel_set_call_privacy_mode_05(void);
+       static void utc_tel_set_call_privacy_mode_06(void);
+       static void utc_tel_set_call_privacy_mode_07(void);
+       static void utc_tel_set_call_privacy_mode_08(void);
+       static void utc_tel_set_call_privacy_mode_09(void);
+       static void utc_tel_set_call_privacy_mode_10(void);
+       static void utc_tel_set_call_privacy_mode_11(void);
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_call_privacy_mode_01, 1},
+       {utc_tel_set_call_privacy_mode_02, 2},
+       {utc_tel_set_call_privacy_mode_03, 3},
+       {utc_tel_set_call_privacy_mode_04, 4},
+       {utc_tel_set_call_privacy_mode_05, 5},
+       {utc_tel_set_call_privacy_mode_06, 6},
+       {utc_tel_set_call_privacy_mode_07, 7},
+       {utc_tel_set_call_privacy_mode_08, 8},
+       {utc_tel_set_call_privacy_mode_09, 9},
+       {utc_tel_set_call_privacy_mode_10, 10},
+       {utc_tel_set_call_privacy_mode_11, 11},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_split_call.c b/TC/telephony_TC/call/unit/uts_tel_split_call.c
new file mode 100644 (file)
index 0000000..e9f25c5
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_split_call.h"
+
+
+/* Initialize TCM data structures */
+
+
+/*
+*  TapiResult_t        tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+
+/**
+ * @brief This tests tel_split_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SPLIT_CALL_01
+ * @param [in] CallHandle = callhandle[0]
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_split_call_01()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t dont have these memebers
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t dont have these memebers
+       //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       //expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("JOIN TWO CALLS\n");
+       ret_status = tel_join_call (call_handle_02, call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SETUPCONFERENCE_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       CALL_TEST_DEBUG("SPLIT THE CONFERENCE\n");
+       ret_status = tel_split_call(call_handle_01, &RequestId);
+       expected_event = TAPI_EVENT_CALL_SPLITCONFERENCE_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+       printf ("utc_tel_split_call_01 RequestId = %d\n", RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS\n");
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       printf("utc_tel_split_call_01 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_split_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SPLIT_CALL_02
+ * @param [in] CallHandle = callhandle[0]
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_split_call_02()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_split_call(VALID_CALL_HANDLE, NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_split_call_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_split_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SPLIT_CALL_03
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+
+void utc_tel_split_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+
+       ret_status = tel_split_call(INVALID_CALL_HANDLE, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+
+       printf("utc_tel_split_call_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_split_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SPLIT_CALL_04
+ * @param [in] CallHandle = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_split_call_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+
+       ret_status = tel_split_call(VALID_CALL_HANDLE, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+
+       printf("utc_tel_split_call_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_split_call.h b/TC/telephony_TC/call/unit/uts_tel_split_call.h
new file mode 100644 (file)
index 0000000..96c2f64
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_SPLIT_CALL_H_
+#define   __UTS_TEL_SPLIT_CALL_H_
+
+/*  Includes */
+
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+/**
+* @test   This test case tests     TapiResult_t        tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+* @brief  This API is used to split a call from conference
+* @return  tapi_api_err_t
+*/
+
+
+
+/**
+* @test                This test case tests
+* API          This test case tests  TapiResult_t      tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    call_handle = valid value ,
+* @param[out]  pRequestId,
+* @return      TAPI_API_SUCCESS
+
+*/
+
+       static void utc_tel_split_call_01(void);
+
+/**
+* @test                This test case tests
+* API          This test case tests   TapiResult_t     tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    call_handle = Invalid value ,
+* @param[out]  pRequestId,
+* @return      TAPI_API_INVALID_INPUT
+
+*/
+
+       static void utc_tel_split_call_02(void);
+
+
+/**
+* @test                This test case tests
+* API          This test case tests   TapiResult_t     tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    call_handle = valid value ,
+* @param[out]  NULL,
+* @return      TAPI_API_INVALID_INPUT
+
+*/
+
+       static void utc_tel_split_call_03(void);
+
+/**
+* @test                This test case tests
+* API          This test case tests   TapiResult_t     tel_split_call ( unsigned int  CallHandle, int * pRequestId );
+* @brief        launch  application with valid input, outparameter . @n
+* @pre
+* @param[in]    call_handle = Invalid value ,
+* @param[out]  NULL,
+* @return      TAPI_API_INVALID_INPUT
+
+*/
+
+       static void utc_tel_split_call_04(void);
+
+
+\r\r     static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_split_call_01, 1},
+       {utc_tel_split_call_02, 2},
+       {utc_tel_split_call_03, 3},
+       {utc_tel_split_call_04, 4},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/call/unit/uts_tel_swap_call.c b/TC/telephony_TC/call/unit/uts_tel_swap_call.c
new file mode 100644 (file)
index 0000000..ec84bac
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tel_swap_call.h"
+#include "ITapiSs.h"
+
+
+/* Initialize TCM data structures */
+
+
+/*
+*  TapiResult_t tel_swap_call( unsigned int active_call, unsigned int held_call  ,int *pRequestId);
+*/
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed ret_status = %d \n",ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephpny service  %d\n",bStatus);
+
+       TelSsWaitingInfo_t waitInfo;
+
+       int request_id=0;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+       expected_event = TAPI_EVENT_SS_WAITING_CNF;
+       printf("call waiting\n");
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+
+       g_CallHandle = -1;
+}
+
+static void cleanup()
+{
+       int  RequestId = -1;
+
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY1);
+
+       deregister_all();
+
+       tel_deinit();
+
+}
+
+
+/**
+ * @brief This tests tel_swap_call() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SWAP_CALL_01
+ * @param [in] active_call = callhandle[1]
+ * @param [in] held_call = callhandle[0]
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_SUCCESS
+*/
+// Sunghyuk Lee
+void utc_tel_swap_call_01()
+{
+       CALL_TEST_DEBUG("\n################     TEST START    ################\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle_01 = -1;
+       unsigned int call_handle_02 = -1;
+       TelCallSetupParams_t setup_call_info_01;
+       TelCallSetupParams_t setup_call_info_02;
+       int  RequestId = -1;
+       char normal1[16] = MOB_NUM1;
+       char normal2[16] = MOB_NUM2;
+
+       memset(&setup_call_info_01, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_01.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_01.szNumber, normal1, 13);
+       tet_printf("called number = %s\n", setup_call_info_01.szNumber);
+
+       //setup_call_info_01.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these memebers
+       //setup_call_info_01.pCugInfo = NULL;
+       //setup_call_info_01.pUusInfo = NULL;
+
+       memset(&setup_call_info_02, 0, sizeof(TelCallSetupParams_t));
+       setup_call_info_02.CallType = TAPI_CALL_TYPE_VOICE;
+       strncpy(setup_call_info_02.szNumber, normal2, 13);
+       tet_printf("called number = %s\n", setup_call_info_02.szNumber);
+
+       //setup_call_info_02.IdentityMode = TAPI_CALL_IDENTITY_SHOW;    //preet: TelCallSetupParams_t donot have these memebers
+               //setup_call_info_02.pCugInfo = NULL;
+       //setup_call_info_02.pUusInfo = NULL;
+
+
+       CALL_TEST_DEBUG("MAKE A 1ST MO CALL TO %s\n",setup_call_info_01.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_01, &call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       CALL_TEST_DEBUG("HOLD THE ACTIVE CALL\n");
+       ret_status = tel_hold_call (call_handle_01 , &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+//     expected_event = TAPI_EVENT_CALL_HOLD_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       CALL_TEST_DEBUG("MAKE 2ND MO CALL TO %s\n",setup_call_info_02.szNumber);
+       ret_status =  tel_exe_call_mo(&setup_call_info_02, &call_handle_02, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_CONNECTED_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       CALL_TEST_DEBUG("SWAP TWO CALLS\n");
+       ret_status = tel_swap_call (call_handle_02, call_handle_01, &RequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_status);
+       expected_event = TAPI_EVENT_CALL_SWAP_CNF;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       CALL_TEST_DEBUG("RELEASE ALL CALLS\n");
+       tel_release_call_all(&RequestId);
+       expected_event = TAPI_EVENT_CALL_END_IND;
+       gmain_loop_for_tapi_events(TIME_DELAY2);
+
+       tet_result(TET_PASS);
+
+       return;
+
+}
+
+
+/**
+ * @brief This tests tel_swap_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SWAP_CALL_02
+ * @param [in] active_call = INVALID_CALL_HANDLE
+ * @param [in] held_call = VALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestId
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_swap_call_02()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       unsigned int call_handle = VALID_CALL_HANDLE;
+
+       ret_status = tel_swap_call (INVALID_CALL_HANDLE, call_handle, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+       printf("utc_tel_swap_call_02 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_swap_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SWAP_CALL_03
+ * @param [in] active_call = VALID_CALL_HANDLE
+ * @param [in] held_call = INVALID_CALL_HANDLE
+ * @param [out] pRequestId = &RequestIdd
+* @return TAPI_API_INVALID_CALL_HANDLE
+*/
+
+void utc_tel_swap_call_03()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       int  RequestId = -1;
+       unsigned int call_handle = VALID_CALL_HANDLE;
+
+       ret_status = tel_swap_call (call_handle, INVALID_CALL_HANDLE, &RequestId);
+
+       TET_CHECK(TAPI_API_INVALID_CALL_HANDLE, ret_status);
+       printf("utc_tel_swap_call_03 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_swap_call() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SWAP_CALL_04
+ * @param [in] active_call = VALID_CALL_HANDLE
+ * @param [in] held_call = VALID_CALL_HANDLE
+ * @param [out] pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_swap_call_04()
+{
+       CALL_TEST_DEBUG("\n########     TEST START    ###########\n");
+       TapiResult_t  ret_status ;
+       unsigned int call_handle = VALID_CALL_HANDLE;
+
+       ret_status = tel_swap_call (call_handle, call_handle, NULL);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_status);
+       printf("utc_tel_swap_call_04 pass\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/call/unit/uts_tel_swap_call.h b/TC/telephony_TC/call/unit/uts_tel_swap_call.h
new file mode 100644 (file)
index 0000000..72bb349
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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        __UTS_TEL_SWAP_CALL_H_
+#define   __UTS_TEL_SWAP_CALL_H_
+
+/*  Includes */
+
+#include "tapi_callback.h"
+#include <tet_api.h>
+#include "call_common.h"
+
+extern TS_UINT g_CallHandle;
+extern TS_BOOL call_status;
+
+
+
+       static void utc_tel_swap_call_01(void);
+
+       static void utc_tel_swap_call_02(void);
+
+       static void utc_tel_swap_call_03(void);
+
+       static void utc_tel_swap_call_04(void);
+
+
+       static void startup();
+
+       static void cleanup();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_swap_call_01, 1},
+       {utc_tel_swap_call_02, 2},
+       {utc_tel_swap_call_03, 3},
+       {utc_tel_swap_call_04, 4},
+       {NULL, 0}
+       };
+
+#endif
+
+/**
+ * @}
+ */
diff --git a/TC/telephony_TC/common/unit/makefile b/TC/telephony_TC/common/unit/makefile
new file mode 100644 (file)
index 0000000..f255d69
--- /dev/null
@@ -0,0 +1,78 @@
+CC=gcc -Wall
+CXX=g++ -Wall
+
+#LB1 = async_util
+LB1 = 
+TS1 = uts_tel_check_service_ready
+TS2 = uts_tel_deinit
+#TS3 = uts_tel_deinit_ecore_loop
+TS3 = 
+TS4 = uts_tel_register_event
+#TS5 = uts_tel_deregister_event_at_ecore_loop
+TS5 = 
+#TS6 = uts_tel_init_ecore_loop
+TS6 = 
+TS7 = uts_tel_request_tunnel
+TS8 = uts_tel_init
+TS9 = uts_tel_deregister_event
+#TS10 = uts_tel_register_event_at_ecore_loop
+TS10 = 
+
+LIBS  = `pkg-config --libs  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi ` 
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+
+INCS  =  -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi `
+INCS  += -I$(TET_ROOT)/inc/tet3 
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+CFLAGS = $(INCS) -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DWITHOUT_APP_MGR 
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+
+all :  $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) 
+      
+
+      
+clean :
+       rm -rf *~ *.o tet_lock tet_captured 
+       rm -rf $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6)  $(TS7) $(TS8) $(TS9) $(TS10)
+
+
+$(LB1): $(LB1).c
+       $(CC) -c $(LB1).c
+
+$(TS1): $(TS1).c $(LB1)
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS)
+
+$(TS2): $(TS2).c $(LB1)
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS)
+
+$(TS3): $(TS3).c $(LB1)
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS)
+
+$(TS4): $(TS4).c $(LB1)
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS)
+
+$(TS5): $(TS5).c $(LB1)
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS)
+
+$(TS6): $(TS6).c $(LB1)
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS)
+
+$(TS7): $(TS7).c $(LB1)
+       $(CC) -o $(TS7) $(TS7).c  $(LDFLAGS)
+
+$(TS8): $(TS8).c $(LB1)
+       $(CC) -o $(TS8) $(TS8).c  $(LDFLAGS)
+
+$(TS9): $(TS9).c $(LB1)
+       $(CC) -o $(TS9) $(TS9).c  $(LDFLAGS)
+
+$(TS10): $(TS10).c $(LB1)
+       $(CC) -o $(TS10) $(TS10).c  $(LDFLAGS)
+
diff --git a/TC/telephony_TC/common/unit/tapi_common.h b/TC/telephony_TC/common/unit/tapi_common.h
new file mode 100644 (file)
index 0000000..b8e6491
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 UTS_TAPI_COMMON_H
+#define UTS_TAPI_COMMON_H
+
+#include <stdio.h>
+#include <glib.h>
+
+GMainLoop *main_loop = NULL;
+
+#define TIME_DELAY 5000
+
+gboolean
+TimeOutFun (void *data)
+{
+       g_main_loop_quit (main_loop);
+       printf ("Exit from this callback\n");
+       return FALSE;
+}
+
+int gmain_loop_for_tapi_events(int delay)
+{
+
+       main_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add (delay, TimeOutFun, NULL);
+       g_main_loop_run (main_loop);
+
+       return 0;
+}
+#endif
diff --git a/TC/telephony_TC/common/unit/tet_macro.h b/TC/telephony_TC/common/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..17c574c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TET_MACRO_H
+#define TET_MACRO_H
+
+//#define true TET_PASS 
+//#define false TET_FAIL
+//#define printf tet_printf 
+
+//#define MT_FAIL(x) tet_result(TET_FAIL)
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+
+////modified by Aakash Manik aakash.manik@samsung.com on 08_04_08
+
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);} 
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+
+////modified by Aakash Manik aakash.manik@samsung.com on 08_04_08
+
+#endif
+
diff --git a/TC/telephony_TC/common/unit/tslist b/TC/telephony_TC/common/unit/tslist
new file mode 100644 (file)
index 0000000..0615e56
--- /dev/null
@@ -0,0 +1,6 @@
+/common/unit/uts_tel_check_service_ready
+/common/unit/uts_tel_deinit
+/common/unit/uts_tel_register_event
+/common/unit/uts_tel_init
+/common/unit/uts_tel_deregister_event
+/common/unit/uts_tel_request_tunnel
diff --git a/TC/telephony_TC/common/unit/uts_tel_check_service_ready.c b/TC/telephony_TC/common/unit/uts_tel_check_service_ready.c
new file mode 100644 (file)
index 0000000..ecde3ac
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include "tapi_common.h"\r
+#include "tet_macro.h"\r
+#include "uts_tel_check_service_ready.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_check_service_ready_01, 1},\r
+       {utc_tel_check_service_ready_02, 2},\r
+       {NULL, 0}\r
+};\r
+#if 0\r
+/*\r
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////\r
+*/\r
+// Prototype : User must add function body\r
+gboolean g_timeout_callback (void *data);\r
+\r
+// GMainLoop global handler\r
+GMainLoop *nw_context_loop = NULL;\r
+\r
+void G_MAIN_LOOP_CLOSE()\r
+{\r
+    g_main_loop_quit(nw_context_loop);\r
+}\r
+\r
+int G_MAIN_LOOP_RUN(int sec)\r
+{\r
+       //GMainLoop *mainloop;\r
+       nw_context_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);\r
+       g_main_loop_run (nw_context_loop);\r
+\r
+       return 0;\r
+}\r
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////\r
+#endif\r
+\r
+/*\r
+  User Defined Handler\r
+*/\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_imsi Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_imsi Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+void utc_tel_check_service_ready_01()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int bstatus;\r
+\r
+       returnStatus = tel_check_service_ready(&bstatus);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_result(TET_PASS);\r
+               tet_printf("utc_tel_check_service_ready_01 success\n");\r
+       }\r
+       else\r
+       {\r
+               tet_result(TET_FAIL);   \r
+               tet_printf("utc_tel_check_service_ready_01 failed\n");\r
+       }\r
+}\r
+\r
+\r
+\r
+void utc_tel_check_service_ready_02()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       \r
+       returnStatus = tel_check_service_ready(NULL);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_result(TET_FAIL);\r
+               tet_printf("utc_tel_check_service_ready_02 failed\n");\r
+       }\r
+       tet_result(TET_PASS);\r
+//returnStatus = tel_deinit(); //Deinitializin already deinitialized tapi\r
+}\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_check_service_ready.h b/TC/telephony_TC/common/unit/uts_tel_check_service_ready.h
new file mode 100644 (file)
index 0000000..595a3ce
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+\r
+#ifndef  _UTC_TAPI_DEINIT_EVENT_\r
+#define  _UTC_TAPI_DEINIT_EVENT_\r
+\r
+\r
+void utc_tel_check_service_ready_01();\r
+void utc_tel_check_service_ready_02();\r
+\r
+static void startup();\r
+\r
+static void cleanup();\r
+\r
+\r
+\r
+\r
+\r
+#endif  //_UTC_TAPI_DEINIT_EVENT_\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_deinit.c b/TC/telephony_TC/common/unit/uts_tel_deinit.c
new file mode 100644 (file)
index 0000000..3d7fdfc
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include "tapi_common.h"\r
+#include "tet_macro.h"\r
+#include "uts_tel_deinit.h"\r
+#include <glib.h>\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tapi_deinit_01, 1},\r
+       {NULL, 0}\r
+};\r
+\r
+static void startup()\r
+{\r
+}\r
+\r
+static void cleanup()\r
+{\r
+}\r
+\r
+void utc_tapi_deinit_01()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       if(tel_init() == TAPI_API_SUCCESS){\r
+               returnStatus = tel_deinit();\r
+       }\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus ,TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_printf("utc_tapi_deinit_01 pass\n");\r
+}\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_deinit.h b/TC/telephony_TC/common/unit/uts_tel_deinit.h
new file mode 100644 (file)
index 0000000..034318d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+\r
+#ifndef  _UTC_TAPI_DEINIT_EVENT_\r
+#define  _UTC_TAPI_DEINIT_EVENT_\r
+\r
+\r
+void utc_tapi_deinit_01();\r
+\r
+static void startup();\r
+\r
+static void cleanup();\r
+\r
+#endif  //_UTC_TAPI_DEINIT_EVENT_\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_deregister_event.c b/TC/telephony_TC/common/unit/uts_tel_deregister_event.c
new file mode 100644 (file)
index 0000000..884c2a1
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>\r
+#include <TapiCommon.h>\r
+#include "tapi_common.h"\r
+#include "tet_macro.h"\r
+#include "uts_tel_deregister_event.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_deregister_event_01, 1},\r
+       {utc_tel_deregister_event_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/*\r
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////\r
+*/\r
+// Prototype : User must add function body\r
+gboolean g_timeout_callback (void *data);\r
+\r
+// GMainLoop global handler\r
+GMainLoop *nw_context_loop = NULL;\r
+\r
+void G_MAIN_LOOP_CLOSE()\r
+{\r
+    g_main_loop_quit(nw_context_loop);\r
+}\r
+\r
+int G_MAIN_LOOP_RUN(int sec)\r
+{\r
+       nw_context_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);\r
+       g_main_loop_run (nw_context_loop);\r
+\r
+       return 0;\r
+}\r
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////\r
+\r
+\r
+/*\r
+  User Defined Handler\r
+*/\r
+// Global variable for user data\r
+static int gAsyncResult; //user defined data : Async callback is called or not\r
+\r
+// G_MAIN Utility : time out callback function\r
+gboolean g_timeout_callback (void *data)\r
+{\r
+       gAsyncResult = FALSE;\r
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");\r
+       G_MAIN_LOOP_CLOSE();\r
+       return FALSE;\r
+}\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static int gStartupSuccess = FALSE;\r
+static unsigned int subscription_id = 0;\r
+\r
+\r
+int register_app_callback(TelTapiEvent_t *Event)\r
+{\r
+               tet_printf("utc_tapi_register_event_01  - call back called\n");\r
+               return TRUE;\r
+}\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tapi_update_deregister_event Test Start\n");\r
+\r
+       if ( tel_init() == TAPI_API_SUCCESS)\r
+       {\r
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_CLASS_DATA,&subscription_id,(TelAppCallback)register_app_callback,NULL))\r
+                       gStartupSuccess = TRUE;\r
+               else\r
+                       tet_infoline("startup fail. tel_register_event() failed");\r
+       } else {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tapi_update_deregister_event Test Finished\n");\r
+tel_deinit();\r
+\r
+    return;\r
+}\r
+\r
+\r
+\r
+void utc_tel_deregister_event_01()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_deregister_event(subscription_id);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus,TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_printf("utc_tapi_deregister_event_01 pass\n");\r
+\r
+}\r
+\r
+\r
+void utc_tel_deregister_event_02()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_deregister_event(NULL);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus,TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               tet_printf("utc_tapi_deregister_event_02 pass\n");\r
+\r
+}\r
+\r
+\r
+\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_deregister_event.h b/TC/telephony_TC/common/unit/uts_tel_deregister_event.h
new file mode 100644 (file)
index 0000000..991bfc4
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+\r
+#ifndef  _UTC_TAPI_DEREGISTER_EVENT_\r
+#define  _UTC_TAPI_DEREGISTER_EVENT_\r
+\r
+\r
+void utc_tel_deregister_event_01();\r
+void utc_tel_deregister_event_02();\r
+\r
+static void startup();\r
+\r
+static void cleanup();\r
+\r
+\r
+#endif  //_UTC_TAPI_DEREGISTER_EVENT_\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_init.c b/TC/telephony_TC/common/unit/uts_tel_init.c
new file mode 100644 (file)
index 0000000..c76ff43
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#include <tet_api.h>\r
+#include <TapiCommon.h>\r
+#include "tet_macro.h"\r
+#include "uts_tel_init.h"\r
+#include "tapi_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_init_01, 1},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+\r
+static void startup()\r
+{\r
+}\r
+\r
+static void cleanup()\r
+{\r
+}\r
+\r
+void utc_tel_init_01()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_init();\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus,TAPI_API_SUCCESS);\r
+       if(returnStatus==TAPI_API_SUCCESS)\r
+               tet_printf("utc_tapi_init_01 pass\n");\r
+       returnStatus = tel_deinit();\r
+\r
+}\r
+\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_init.h b/TC/telephony_TC/common/unit/uts_tel_init.h
new file mode 100644 (file)
index 0000000..c6421c3
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef  _UTC_TAPI_INIT_EVENT_\r
+#define  _UTC_TAPI_INIT_EVENT_\r
+\r
+void utc_tel_init_01();\r
+\r
+static void startup();\r
+\r
+static void cleanup();\r
+\r
+#endif  //_UTC_TAPI_INIT_EVENT_\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_register_event.c b/TC/telephony_TC/common/unit/uts_tel_register_event.c
new file mode 100644 (file)
index 0000000..375d568
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include "tapi_common.h"\r
+#include "tet_macro.h"\r
+#include "uts_tel_register_event.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tapi_register_event_01, 1},\r
+//     {utc_tapi_register_event_02, 2},\r
+//     {utc_tapi_register_event_03, 3},\r
+       {utc_tapi_register_event_04, 4},\r
+       {utc_tapi_register_event_05, 5},\r
+       {NULL, 0}\r
+};\r
+\r
+/*\r
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////\r
+*/\r
+// Prototype : User must add function body\r
+gboolean g_timeout_callback (void *data);\r
+\r
+// GMainLoop global handler\r
+GMainLoop *nw_context_loop = NULL;\r
+\r
+void G_MAIN_LOOP_CLOSE()\r
+{\r
+    g_main_loop_quit(nw_context_loop);\r
+}\r
+\r
+int G_MAIN_LOOP_RUN(int sec)\r
+{\r
+       nw_context_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);\r
+       g_main_loop_run (nw_context_loop);\r
+\r
+       return 0;\r
+}\r
+\r
+// Global variable for user data\r
+static int gAsyncResult; //user defined data : Async callback is called or not\r
+\r
+// G_MAIN Utility : time out callback function\r
+gboolean g_timeout_callback (void *data)\r
+{\r
+       gAsyncResult = FALSE;\r
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");\r
+       G_MAIN_LOOP_CLOSE();\r
+       return FALSE;\r
+}\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static int gStartupSuccess = FALSE;\r
+static unsigned int subscription_id = 0;\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tapi_register_event Test Start\n");\r
+\r
+       if ( tel_init() == TAPI_API_SUCCESS)\r
+       {\r
+\r
+               gStartupSuccess = TRUE;\r
+\r
+       } else {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tapi_update_register_event Test Finished\n");\r
+\r
+    if (gStartupSuccess == TRUE)\r
+       {\r
+               tel_deregister_event(subscription_id);\r
+       }\r
+       tel_deinit();\r
+\r
+    return;\r
+}\r
+\r
+int register_app_callback(TelTapiEvent_t *Event)\r
+{\r
+               tet_printf("utc_tapi_register_event_01  - call back called\n");\r
+               return TRUE;\r
+}\r
+\r
+\r
+\r
+void utc_tapi_register_event_01()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_register_event(TAPI_EVENT_CLASS_DATA,&subscription_id,(TelAppCallback)register_app_callback,NULL);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus , TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_printf("utc_tapi_register_event_01 pass\n");\r
+\r
+}\r
+\r
+/*\r
+void utc_tapi_register_event_02()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_register_event(TAPI_EVENT_CALL_SETUP_CNF - 1,&subscription_id,(TelAppCallback)register_app_callback,NULL);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK_EQUAL(returnStatus,TAPI_EVENT_CLASS_UNKNOWN);\r
+       if(returnStatus == TAPI_EVENT_CLASS_UNKNOWN)\r
+               printf("utc_tapi_register_event_02 pass\n");\r
+\r
+}\r
+\r
+\r
+void utc_tapi_register_event_03()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_register_event((int)NULL,&subscription_id,(TelAppCallback)register_app_callback,NULL);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_result(TET_FAIL);\r
+       \r
+       tet_result(TET_PASS);\r
+       printf("utc_tapi_register_event_03 pass\n");\r
+\r
+}\r
+*/\r
+void utc_tapi_register_event_04()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_register_event(TAPI_EVENT_CALL_SETUP_CNF,NULL,(TelAppCallback)register_app_callback,NULL);\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_result(TET_FAIL);\r
+       \r
+       tet_result(TET_PASS);\r
+       tet_printf("utc_tapi_register_event_04 pass\n");\r
+\r
+}\r
+\r
+void utc_tapi_register_event_05()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+\r
+       returnStatus = tel_register_event(TAPI_EVENT_CALL_SETUP_CNF ,&subscription_id,(TelAppCallback)NULL,NULL);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               tet_result(TET_FAIL);\r
+       \r
+       tet_result(TET_PASS);\r
+       tet_printf("utc_tapi_register_event_05 pass\n");\r
+\r
+}\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_register_event.h b/TC/telephony_TC/common/unit/uts_tel_register_event.h
new file mode 100644 (file)
index 0000000..d1442f6
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+\r
+#ifndef  _UTC_TAPI_REGISTER_EVENT_\r
+#define  _UTC_TAPI_REGISTER_EVENT_\r
+\r
+extern TS_UINT g_CallHandle;\r
+\r
+void utc_tapi_register_event_01();\r
+\r
+void utc_tapi_register_event_02();\r
+void utc_tapi_register_event_03();\r
+void utc_tapi_register_event_04();\r
+void utc_tapi_register_event_05();\r
+\r
+static void startup();\r
+\r
+static void cleanup();\r
+\r
+\r
+#endif  //_UTC_TAPI_REGISTER_EVENT_\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_request_tunnel.c b/TC/telephony_TC/common/unit/uts_tel_request_tunnel.c
new file mode 100644 (file)
index 0000000..232b215
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <tet_api.h>\r
+#include <TapiCommon.h>\r
+#include "tet_macro.h"\r
+#include "uts_tel_request_tunnel.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tapi_request_tunnel_01, 1},\r
+       {utc_tapi_request_tunnel_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static void startup()\r
+{\r
\r
+}\r
+\r
+static void cleanup()\r
+{\r
+\r
+}\r
+\r
+void utc_tapi_request_tunnel_01()\r
+{\r
+\r
+       int  ret = TAPI_API_SUCCESS;\r
+       int req_id;\r
+\r
+       ret = tel_request_tunnel(NULL, &req_id);\r
+\r
+       tet_printf ("tel_request_tunnel return=%d\n", ret);\r
+\r
+       TET_CHECK_NOT_EQUAL(ret , TAPI_API_SUCCESS);\r
+}\r
+\r
+\r
+void utc_tapi_request_tunnel_02()\r
+{\r
+       int  ret = TAPI_API_SUCCESS;\r
+       int req_id;\r
+       TelTunnelInfo_t tunnel_info;\r
+\r
+       ret = tel_request_tunnel(&tunnel_info, NULL);\r
+\r
+       tet_printf ("tel_request_tunnel return=%d\n", ret);\r
+\r
+       TET_CHECK_NOT_EQUAL(ret , TAPI_API_SUCCESS);\r
+\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/common/unit/uts_tel_request_tunnel.h b/TC/telephony_TC/common/unit/uts_tel_request_tunnel.h
new file mode 100644 (file)
index 0000000..3de3efd
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+\r
+#ifndef  _UTC_TAPI_REQUEST_TUNNEL_\r
+#define  _UTC_TAPI_REQUEST_TUNNEL_\r
+\r
+void utc_tapi_request_tunnel_01();\r
+void utc_tapi_request_tunnel_02();\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+\r
+#endif  //_UTC_TAPI_REGISTER_EVENT_\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/gprs/unit/gprs_common.c b/TC/telephony_TC/gprs/unit/gprs_common.c
new file mode 100644 (file)
index 0000000..c03ddc7
--- /dev/null
@@ -0,0 +1,194 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "gprs_common.h"
+
+GMainLoop *nw_context_loop = NULL;
+
+static unsigned int subscription_id[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+int expected_event;
+bool async_response = false;
+
+void G_MAIN_LOOP_CLOSE()
+{
+       g_main_loop_quit(nw_context_loop);
+}
+
+gboolean g_timeout_callback(void * data)
+{
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_timeout_add_seconds(sec, g_timeout_callback, NULL);
+       g_main_loop_run(nw_context_loop);
+
+       return 0;
+}
+
+//static int  ps_app_callback (int group, int action, void* data, int length)
+void ps_app_callback(TelTapiEvent_t *TapiEvent)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = TapiEvent->pData;
+
+       printf("- expected event=0x%x received event=0x%x\n", expected_event, eventType);
+       if (eventType == expected_event) {
+               async_response = true;
+               g_main_loop_quit(nw_context_loop);
+       }
+
+       return;
+
+}
+
+void print_all_subsciption_ids()
+{
+       int i = 0;
+       for (i = 0; i < 16; i++) {
+               printf("subscription_id[%02d] has value %d \n", i, subscription_id[i]);
+       }
+}
+
+TapiResult_t register_all_events()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_register_event(TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI, &subscription_id[0], (TelAppCallback) &ps_app_callback, NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_CALL_STATISTICS, &subscription_id[1], (TelAppCallback) &ps_app_callback, NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_CALL_STATUS_RSP, &subscription_id[2], (TelAppCallback)&ps_app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_ERROR_IND, &subscription_id[4], (TelAppCallback) &ps_app_callback, NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_HSDPA_STATUS_NOTI, &subscription_id[5], (TelAppCallback) &ps_app_callback, NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_NETWORK_STATUS_RSP, &subscription_id[6], (TelAppCallback)&ps_app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO, &subscription_id[7], (TelAppCallback) &ps_app_callback, NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_PDP_ACT_RSP, &subscription_id[8], (TelAppCallback) &ps_app_callback, NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_PDP_ADDRESS_RSP, &subscription_id[9], (TelAppCallback)&ps_app_callback,NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_PDP_CONTEXTINFO_RSP, &subscription_id[10], (TelAppCallback)&ps_app_callback,NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_PDP_DEACT_IND, &subscription_id[11], (TelAppCallback)&ps_app_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_PS_PDP_DEACT_RSP, &subscription_id[12], (TelAppCallback) &ps_app_callback, NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_QOS_3G_PROFILE_RSP, &subscription_id[13], (TelAppCallback)&ps_app_callback,NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_QOS_PROFILE_RSP, &subscription_id[14], (TelAppCallback)&ps_app_callback,NULL);
+       //api_err = tel_register_event(TAPI_EVENT_PS_STATUS, &subscription_id[15], (TelAppCallback)&ps_app_callback,NULL);
+
+       print_all_subsciption_ids();
+       return api_err;
+}
+
+TapiResult_t deregister_all()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_deregister_event(subscription_id[0]);
+       api_err = tel_deregister_event(subscription_id[1]);
+       //api_err = tel_deregister_event(subscription_id[2]);
+       api_err = tel_deregister_event(subscription_id[4]);
+       api_err = tel_deregister_event(subscription_id[5]);
+       //api_err = tel_deregister_event(subscription_id[6]);
+       api_err = tel_deregister_event(subscription_id[7]);
+       api_err = tel_deregister_event(subscription_id[8]);
+       //api_err = tel_deregister_event(subscription_id[9]);
+       //api_err = tel_deregister_event(subscription_id[10]);
+       //api_err = tel_deregister_event(subscription_id[11]);
+       api_err = tel_deregister_event(subscription_id[12]);
+       //api_err = tel_deregister_event(subscription_id[13]);
+       //api_err = tel_deregister_event(subscription_id[14]);
+       //api_err = tel_deregister_event(subscription_id[15]);
+
+       return api_err;
+
+}
+
+TapiResult_t temp_gprs_session_activate()
+{
+       TapiResult_t ret_status;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       TEST_DEBUG("- Temp gprs activation starts\n");
+
+       memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+
+       start_req.cont_id = CONTEXT_ID;
+       strncpy(start_req.pdp_info.apn, APN_ADDRESS, TAPI_PDP_APN_LEN_MAX);
+
+       ret_status = tel_activate_gprs_pdp(&start_req, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       if (TAPI_API_SUCCESS == ret_status) {
+               printf("- temp gprs mode Started successfully \n");
+       }
+       else {
+               printf("- temp gprs mode not started \n");
+       }
+
+       expected_event = TAPI_EVENT_PS_PDP_ACT_RSP;
+
+       G_MAIN_LOOP_RUN(10);
+
+       TEST_DEBUG("- Temp gprs activation ends\n");
+
+       return ret_status;
+}
+
+TapiResult_t temp_gprs_session_deactivate(int contId)
+{
+       TapiResult_t ret_status;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id = 0;
+
+       TEST_DEBUG("- Temp gprs deactivation starts\n");
+
+       memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+
+       end_req.cont_id = contId;
+
+       ret_status = tel_deactivate_gprs_pdp(&end_req, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       if (TAPI_API_SUCCESS == ret_status) {
+               printf("- temp gprs mode ended successfully\n");
+       }
+       else {
+               printf("- temp gprs mode not ended \n");
+       }
+
+       expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+
+       G_MAIN_LOOP_RUN(10);
+
+       TEST_DEBUG("- Temp gprs deactivation ends\n");
+
+       return ret_status;
+}
+
diff --git a/TC/telephony_TC/gprs/unit/gprs_common.h b/TC/telephony_TC/gprs/unit/gprs_common.h
new file mode 100644 (file)
index 0000000..68ed369
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _GPRS_COMMON_H_
+#define _GPRS_COMMON_H_
+
+#include <stdlib.h>
+#include <signal.h>
+#include <errno.h>
+#include "string.h"
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <glib.h>
+#include <pthread.h>
+#include <stdio.h>
+#include "ITapiPS.h"
+#include <tet_api.h>
+#include "tet_macro.h"
+#include <gconf/gconf-client.h>
+#include <TapiCommon.h>
+
+#define APN_ADDRESS "web.vodafone.de"
+#define CONTEXT_ID     1
+
+#define APN_ADDRESS_2 "web.vodafone.de"
+#define CONTEXT_ID_2   2
+
+
+#define TLOG_HEADER(fmt, args...) printf("\e[1;7m<%s:%4d> " fmt "\e[0m\n", __FILE__, __LINE__, ##args);
+#define TLOG_INFO(fmt, args...)   printf("<%s:%4d> " fmt "\n", __FILE__, __LINE__, ##args);
+
+#define TIME_DELAY 5000
+#define TEST_DEBUG(fmt, args...)       \
+       printf("[%s %s:%d]\n" fmt "\n",__FILE__, __FUNCTION__,  __LINE__, ##args); 
+
+#ifndef false
+       #define false 0
+#endif
+#ifndef true
+       #define true  !0
+#endif
+#ifndef bool    
+       #define bool  char
+#endif
+
+extern void  ps_app_callback  (TelTapiEvent_t *TapiEvent);
+extern TapiResult_t register_all_events();
+extern TapiResult_t deregister_all();
+extern void G_MAIN_LOOP_CLOSE();
+extern int G_MAIN_LOOP_RUN(int);
+
+
+extern TapiResult_t temp_gprs_session_deactivate();
+extern TapiResult_t temp_gprs_session_activate();
+
+#define TET_CHECK_TEMP(x1, y...) \
+       do { \
+               TapiResult_t err = y;\
+               if (err != (x1)) \
+               { \
+                       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,y); \
+                       printf("- FAIL. [line %d] Expected Result: %d  Actual Result: %d\n",__LINE__, x1,y); \
+                       tet_result(TET_FAIL); \
+                       return;\
+               } \
+       } while(0)
+
+
+#endif  //_GPRS_COMMON_H_
diff --git a/TC/telephony_TC/gprs/unit/makefile b/TC/telephony_TC/gprs/unit/makefile
new file mode 100644 (file)
index 0000000..68ddeed
--- /dev/null
@@ -0,0 +1,39 @@
+CC=gcc -Wall
+
+LB1  =  gprs_common
+TS1  =  uts_tel_activate_gprs_pdp
+TS2  =  uts_tel_control_gprs_btdun_pin
+TS3  =  uts_tel_deactivate_gprs_pdp
+
+LIBS =$(LB1).o
+LIBS += `pkg-config --libs  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+
+INCS  =  -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS  += -I$(TET_ROOT)/inc/tet3
+
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+all : $(LB1) $(TS1) $(TS2) $(TS3)
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(LB1) $(TS1) $(TS2) $(TS3)
+
+$(LB1): $(LB1).c
+       $(CC) -c $(LB1).c
+
+$(TS1): $(TS1).c $(LB1)
+       $(CC) -o $(TS1) $(TS1).c $(LDFLAGS)
+
+$(TS2): $(TS2).c $(LB1)
+       $(CC) -o $(TS2) $(TS2).c $(LDFLAGS)
+
+$(TS3): $(TS3).c $(LB1)
+       $(CC) -o $(TS3) $(TS3).c $(LDFLAGS)
diff --git a/TC/telephony_TC/gprs/unit/tet_macro.h b/TC/telephony_TC/gprs/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..17c574c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TET_MACRO_H
+#define TET_MACRO_H
+
+//#define true TET_PASS 
+//#define false TET_FAIL
+//#define printf tet_printf 
+
+//#define MT_FAIL(x) tet_result(TET_FAIL)
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+
+////modified by Aakash Manik aakash.manik@samsung.com on 08_04_08
+
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);} 
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+
+////modified by Aakash Manik aakash.manik@samsung.com on 08_04_08
+
+#endif
+
diff --git a/TC/telephony_TC/gprs/unit/tet_scen b/TC/telephony_TC/gprs/unit/tet_scen
new file mode 100644 (file)
index 0000000..a2c9d59
--- /dev/null
@@ -0,0 +1,11 @@
+
+all
+       "Starting Full Test Suite"
+
+       /gprs/unit/uts_tapi_gprs_start
+       /gprs/unit/uts_tapi_gprs_pdp_deactivation_set
+       /gprs/unit/uts_tapi_gprs_pdp_btdunpincontrol_get
+
+       "Completed Full Test Suite"
+
+# EOF
diff --git a/TC/telephony_TC/gprs/unit/tslist b/TC/telephony_TC/gprs/unit/tslist
new file mode 100644 (file)
index 0000000..a670f3d
--- /dev/null
@@ -0,0 +1,3 @@
+/gprs/unit/uts_tel_activate_gprs_pdp
+/gprs/unit/uts_tel_control_gprs_btdun_pin
+/gprs/unit/uts_tel_deactivate_gprs_pdp
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.c b/TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.c
new file mode 100644 (file)
index 0000000..a4b9af7
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+
+//add includes
+
+
+#include "uts_tel_activate_gprs_pdp.h"
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TLOG_HEADER("STARTUP");
+
+       TapiResult_t ret_status;
+
+       ret_status = tel_init();
+       if (ret_status != TAPI_API_SUCCESS)     
+       {       
+               printf("TelTapiInit() Failed ret_status = %d \n", ret_status);
+       }
+
+       register_all_events();
+
+       tel_register_app_name("org.samsung.test");
+
+       TLOG_INFO(" - GPRS active session deactivate");
+
+       ret_status = temp_gprs_session_deactivate(CONTEXT_ID);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               TLOG_INFO("- GPRS active session ended successfully");
+       }
+       else
+       {
+               TLOG_INFO("- GPRS active session not ended");
+       }
+}
+
+static void cleanup()
+{
+       TLOG_HEADER("CLEANUP");
+
+       TapiResult_t  ret_status;
+
+       deregister_all();
+
+       ret_status = tel_deinit();
+       if (ret_status != TAPI_API_SUCCESS)     
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n", ret_status);        
+       }
+}
+
+
+#if 0
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_START_00
+ * @param [in]  *net_start_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_start_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_activate_gprs_pdp_00()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+       TLOG_INFO(" - setting the valid gprs mode");
+
+       TapiResult_t ret_status ;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       async_response = false;//initialize
+
+       memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+       start_req.cont_id = CONTEXT_ID;
+       strncpy(start_req.pdp_info.apn , APN_ADDRESS, TAPI_PDP_APN_LEN_MAX);
+
+       ret_status = tel_activate_gprs_pdp(&start_req, &request_id);
+       if (TAPI_API_SUCCESS == ret_status)
+       {
+               TLOG_INFO(" - GPRS mode started successfully");
+       }
+       else
+       {
+               TLOG_INFO(" - GPRS mode not started");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+       tet_infoline("utc_tel_activate_gprs_pdp_00 pass");
+
+       expected_event = TAPI_EVENT_PS_PDP_ACT_RSP;
+       TLOG_INFO(" - expected_event is TAPI_EVENT_PS_PDP_ACT_RSP(%d)", expected_event);
+       TLOG_INFO(" - ... waiting ... ");
+
+       G_MAIN_LOOP_RUN(80);
+       TET_CHECK_TEMP(true, async_response);   
+       tet_result(TET_PASS);
+
+       ret_status = temp_gprs_session_deactivate(CONTEXT_ID);
+       if(TAPI_API_SUCCESS == ret_status)
+       {
+               TLOG_INFO(" - GPRS active session ended succesfully");
+       }
+       else
+       {
+               TLOG_INFO(" - GPRS active session not ended");
+       }
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+#endif
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_START_01
+ * @param [in]  *net_start_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_start_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_activate_gprs_pdp_00()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+       TLOG_INFO(" - setting the invalid(net_start_req_info) gprs mode");
+
+       TapiResult_t ret_status ;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       async_response = false;//initialize
+
+       memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+       start_req.cont_id = CONTEXT_ID;
+       strncpy(start_req.pdp_info.apn , APN_ADDRESS, TAPI_PDP_APN_LEN_MAX);
+
+       ret_status = tel_activate_gprs_pdp(NULL, &request_id);
+       if(TAPI_API_INVALID_PTR == ret_status)
+       {
+               TLOG_INFO(" - GPRS mode start api invalid NULL case pass");
+       }
+       else
+       {
+               TLOG_INFO(" - GPRS mode NULL check failed");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+       tet_infoline("utc_tel_activate_gprs_pdp_01 pass");
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_START_02
+ * @param [in]  *net_start_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_start_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_activate_gprs_pdp_01()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+       TLOG_INFO(" - setting the invalid(pRequestID) gprs mode");
+
+       TapiResult_t ret_status ;
+       tapi_ps_net_start_req_t start_req;
+       //int request_id=0;
+       async_response = false;//initialize
+
+       memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+
+       start_req.cont_id = CONTEXT_ID;
+       strncpy(start_req.pdp_info.apn , APN_ADDRESS, TAPI_PDP_APN_LEN_MAX);
+
+       ret_status = tel_activate_gprs_pdp(&start_req, NULL);
+       if (TAPI_API_INVALID_PTR == ret_status)
+       {
+               TLOG_INFO(" - GPRS mode started api invalid NULL case pass");
+       }
+       else
+       {
+               TLOG_INFO(" - GPRS mode NULL check failed");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+       tet_infoline("utc_tel_activate_gprs_pdp_02 pass");
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/*
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_START_03
+ * @param [in]  *net_start_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_start_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_activate_gprs_pdp_02()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+       TLOG_INFO(" - setting the invalid(auth_type) gprs mode");
+
+       TapiResult_t ret_status;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       async_response = false;//initialize
+
+       memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+       start_req.cont_id = CONTEXT_ID;
+       strncpy(start_req.pdp_info.apn , APN_ADDRESS, TAPI_PDP_APN_LEN_MAX);
+       start_req.pdp_info.auth_type = TAPI_PDP_AUTH_NONE - 1;
+
+       ret_status = tel_activate_gprs_pdp(&start_req, &request_id);
+       if (TAPI_API_INVALID_INPUT == ret_status)
+       {
+               TLOG_INFO(" - GPRS mode start api invalid input cass pass");
+       }
+       else
+       {
+               TLOG_INFO(" - GPRS mode invalid enum check failed");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_activate_gprs_pdp_03 pass");
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/** @} */
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.h b/TC/telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp.h
new file mode 100644 (file)
index 0000000..2322fe6
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "gprs_common.h"
+
+#ifndef  _UTC_TAPI_GPRS_START_
+#define  _UTC_TAPI_GPRS_START_
+
+void utc_tel_activate_gprs_pdp_00();
+void utc_tel_activate_gprs_pdp_01();
+void utc_tel_activate_gprs_pdp_02();
+
+static void startup();
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_activate_gprs_pdp_00, 1},
+       {utc_tel_activate_gprs_pdp_01, 2},
+       {utc_tel_activate_gprs_pdp_02, 3},
+       {NULL, 0}
+       };
+
+#endif  //_UTC_TAPI_GPRS_START_
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.c b/TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.c
new file mode 100644 (file)
index 0000000..7151802
--- /dev/null
@@ -0,0 +1,400 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+//add includes
+
+
+#include "uts_tel_control_gprs_btdun_pin.h"
+
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t ret_status;
+
+       ret_status = tel_init();
+
+       if (ret_status != TAPI_API_SUCCESS) {
+               printf("TelTapiInit() Failed ret_status = %d \n", ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+}
+
+static void cleanup()
+{
+       TapiResult_t ret_status;
+
+       deregister_all();
+       ret_status = tel_deinit();
+
+       if (ret_status != TAPI_API_SUCCESS) {
+               printf("TelTapiDeInit() Failed ret_status = %d \n", ret_status);
+       }
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_00
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_00()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_00 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       /* NORMAL CASE */
+       bt_control.signal = GPRS_DATA_SIGNAL_DTR;
+       bt_control.status = GPRS_SIGNAL_STATUS_OFF;
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_00 pass");
+       expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       printf("- The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n", expected_event);
+
+       G_MAIN_LOOP_RUN(10);
+       TET_CHECK_TEMP(true, async_response);
+       tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_00 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_01
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_01()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_01 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       /* NORMAL CASE */
+       bt_control.signal = GPRS_DATA_SIGNAL_RTS;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_01 pass");
+       expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       printf("- The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n", expected_event);
+
+       G_MAIN_LOOP_RUN(10);
+       TET_CHECK_TEMP(true, async_response);
+       tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_01 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_02
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_02()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_02 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       /* BAD CASE - GPRS_DATA_SIGNAL_RI not allowed */
+       bt_control.signal = GPRS_DATA_SIGNAL_RI;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_02 pass");
+       expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       printf("- The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n", expected_event);
+
+       G_MAIN_LOOP_RUN(10);
+       TET_CHECK_TEMP(false, async_response);
+       tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_02 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_03
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_03()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_03 START    ###########");
+
+       TapiResult_t ret_status;
+       //int request_id=0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       bt_control.signal = GPRS_DATA_SIGNAL_RI;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       printf("- gprs btdunpincontrol null case check\n");
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, NULL);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_03 pass");
+       //expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       //printf("The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_03 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_04
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_04()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_04 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       bt_control.signal = GPRS_SIGNAL_DCD - 1;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       printf("- gprs btdunpincontrol invalid input case check\n");
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_04 pass");
+       //expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       //printf("The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_04 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_05
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_05()
+{
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_05 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       bt_control.signal = GPRS_SIGNAL_DCD;
+       bt_control.status = GPRS_SIGNAL_STATUS_OFF - 1;
+
+       printf("- gprs btdunpincontrol invalid input case check\n");
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_05 pass");
+       //expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       //printf("The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_05 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_06
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_06()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_06 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       bt_control.signal = GPRS_DATA_SIGNAL_RI + 1;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       printf("- gprs btdunpincontrol invalid input case check\n");
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_06 pass");
+       //expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       //printf("The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_06 ENDS    ###########\n");
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_07
+ * @param [in]  pincontrol
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  pincontrol
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */
+void utc_tel_control_gprs_btdun_pin_07()
+{
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_07 START    ###########");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+       async_response = false;//initialize
+
+       memset(&bt_control, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+       bt_control.signal = 0x03;
+       bt_control.status = GPRS_SIGNAL_STATUS_ON;
+
+       printf("- gprs btdunpincontrol invalid input case check\n");
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id);
+
+       printf("- return value = %d\n", ret_status);
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_control_gprs_btdun_pin_07 pass");
+       //expected_event = TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI;
+       //printf("The expected_event is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+
+       TEST_DEBUG("########     TEST utc_tel_control_gprs_btdun_pin_07 ENDS    ###########\n");
+}
+
+/** @} */
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.h b/TC/telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin.h
new file mode 100644 (file)
index 0000000..c31dac8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "gprs_common.h"
+
+#ifndef  _UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_
+#define  _UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_
+
+void utc_tel_control_gprs_btdun_pin_00();
+
+void utc_tel_control_gprs_btdun_pin_01();
+
+void utc_tel_control_gprs_btdun_pin_02();
+
+void utc_tel_control_gprs_btdun_pin_03();
+
+void utc_tel_control_gprs_btdun_pin_04();
+
+void utc_tel_control_gprs_btdun_pin_05();
+
+void utc_tel_control_gprs_btdun_pin_06();
+
+void utc_tel_control_gprs_btdun_pin_07();
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_control_gprs_btdun_pin_00, 1},
+       {utc_tel_control_gprs_btdun_pin_01, 2},
+       {utc_tel_control_gprs_btdun_pin_02, 3},
+       {utc_tel_control_gprs_btdun_pin_03, 4},
+       {utc_tel_control_gprs_btdun_pin_04, 5},
+       {utc_tel_control_gprs_btdun_pin_05, 6},
+       {utc_tel_control_gprs_btdun_pin_06, 7},
+       {utc_tel_control_gprs_btdun_pin_07, 8},
+       {NULL, 0}
+};
+
+
+
+#endif  //_UTC_TAPI_GPRS_PDP_BTDUNPINCONTROL_GET_
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.c b/TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.c
new file mode 100644 (file)
index 0000000..f2e4148
--- /dev/null
@@ -0,0 +1,320 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+
+
+//add includes
+
+
+#include "uts_tel_deactivate_gprs_pdp.h"
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TLOG_HEADER("STARTUP");
+
+       TapiResult_t ret_status;
+
+       ret_status = tel_init();
+       if (ret_status != TAPI_API_SUCCESS)     
+       {       
+               printf("TelTapiInit() Failed ret_status = %d\n", ret_status);   
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+}
+
+static void cleanup()
+{
+       TLOG_HEADER("CLEANUP");
+
+       TapiResult_t ret_status ;
+
+       deregister_all();       
+
+       ret_status = tel_deinit();
+       if (ret_status != TAPI_API_SUCCESS)     
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n", ret_status);
+       }
+}
+
+
+#if 0
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_00
+ * @param [in]  *net_stop_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_stop_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+*/     
+void utc_tel_deactivate_gprs_pdp_01()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+
+       TapiResult_t ret_status ;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id = 0;
+
+       async_response = false;//initialize
+
+       if (TAPI_API_SUCCESS == temp_gprs_session_activate())
+       {
+               TLOG_INFO(" - temp gprs mode started succesfully");
+
+               memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+               end_req.cont_id = CONTEXT_ID;
+
+               ret_status = tel_deactivate_gprs_pdp(&end_req, &request_id);
+               if (TAPI_API_SUCCESS == ret_status)
+               {
+                       TLOG_INFO(" - gprs activate session ended succesfully");
+               }
+               else
+               {
+                       TLOG_INFO(" - gprs active session not ended");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tel_deactivate_gprs_pdp_00 pass");
+               expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+
+               TLOG_INFO(" - The expected_event is TAPI_EVENT_PS_PDP_DEACT_RSP(%d)\n", expected_event);
+
+               G_MAIN_LOOP_RUN(80);
+               TET_CHECK_TEMP(true, async_response);   
+               tet_result(TET_PASS);
+       }
+       else
+       {
+               TLOG_INFO(" - temp gprs mode not started");
+       }
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+#endif
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_01
+ * @param [in]  *net_stop_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_stop_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_deactivate_gprs_pdp_01()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+       TLOG_INFO(" - temp gprs session end api NULL case");
+
+       TapiResult_t ret_status;
+       int request_id = 0;
+
+       async_response = false;//initialize
+
+       ret_status = tel_deactivate_gprs_pdp(NULL, &request_id);
+       if (TAPI_API_INVALID_PTR == ret_status)
+       {
+               printf("/n/******************  gprs end api null case pass **************************\\n");
+       }
+       else
+       {
+               printf("/n/******************  gprs end api null case failed  **************************\\n");
+       }
+
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+       tet_infoline("utc_tel_deactivate_gprs_pdp_01 pass");
+       //expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+       //printf("The expected_event is TAPI_EVENT_PS_PDP_DEACT_RSP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response); 
+       //tet_result(TET_PASS);
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_02
+ * @param [in]  *net_stop_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_stop_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_deactivate_gprs_pdp_02()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+
+       TapiResult_t  ret_status ;
+       tapi_ps_net_stop_req_t end_req;
+
+       async_response = false;//initialize
+
+
+       printf("/n/****************** temp  gprs session end api Null case **************************\\n");
+
+       end_req.cont_id = CONTEXT_ID;
+
+       ret_status = tel_deactivate_gprs_pdp(&end_req, NULL);
+       if (TAPI_API_INVALID_PTR == ret_status)
+       {
+               printf("/n/******************  gprs end api null case pass **************************\\n");
+       }
+       else
+       {
+               printf("/n/******************  gprs end api null case failed  **************************\\n");
+       }
+
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+       tet_infoline("utc_tel_deactivate_gprs_pdp_02 pass");
+       //expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+       //printf("The expected_event is TAPI_EVENT_PS_PDP_DEACT_RSP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response); 
+       //tet_result(TET_PASS);
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_04
+ * @param [in]  *net_stop_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_stop_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_deactivate_gprs_pdp_03()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+
+       TapiResult_t  ret_status ;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id=0;
+
+       async_response = false;//initialize
+
+
+       printf("/n/****************** temp  gprs session end api invalid enum case **************************\\n");
+
+       end_req.cont_id = CONTEXT_ID;
+       end_req.pdp_info.auth_type = TAPI_PDP_AUTH_MAX; 
+
+       ret_status = tel_deactivate_gprs_pdp(&end_req,&request_id);
+       if (TAPI_API_INVALID_INPUT == ret_status)
+       {
+               printf("/n/******************  gprs end api invalid enum case pass **************************\\n");
+       }
+       else
+       {
+               printf("/n/******************  gprs end api invalid enum case failed  **************************\\n");
+       }
+
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_deactivate_gprs_pdp_04 pass");
+       //expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+       //printf("The expected_event is TAPI_EVENT_PS_PDP_DEACT_RSP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response); 
+       //tet_result(TET_PASS);
+
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_05
+ * @param [in]  *net_stop_req_info
+ * @param [in]  pRequestID
+ * @code       
+ * @endcode
+ * @param [out]  *net_stop_req_info
+ * @param [out]  pRequestID
+ * @return TapiResult_t
+ */    
+void utc_tel_deactivate_gprs_pdp_04()
+{
+       TLOG_HEADER("TEST START [%s]", __FUNCTION__);
+
+       TapiResult_t  ret_status ;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id=0;
+
+       async_response = false;//initialize
+
+
+       printf("/n/****************** temp  gprs session not started to check api **************************\\n");
+
+       end_req.cont_id = CONTEXT_ID;
+       end_req.pdp_info.auth_type = TAPI_PDP_AUTH_NONE-1;      
+
+       ret_status = tel_deactivate_gprs_pdp(&end_req, &request_id);
+       if (TAPI_API_SUCCESS != ret_status)
+       {
+               printf("/n/******************  gprs end api invalid server case pass **************************\\n");
+       }
+       else
+       {
+               printf("/n/******************  gprs end api invalid server case failed  **************************\\n");
+       }
+
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+       tet_infoline("utc_tel_deactivate_gprs_pdp_05 pass");
+       //expected_event = TAPI_EVENT_PS_PDP_DEACT_RSP;
+       //printf("The expected_event is TAPI_EVENT_PS_PDP_DEACT_RSP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response); 
+       //tet_result(TET_PASS);
+
+
+       TLOG_HEADER("TEST END [%s]\n", __FUNCTION__);
+}
+/** @} */
diff --git a/TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.h b/TC/telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp.h
new file mode 100644 (file)
index 0000000..c4119e0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "gprs_common.h"
+
+#ifndef  _UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_
+#define  _UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_
+
+void utc_tel_deactivate_gprs_pdp_01();
+void utc_tel_deactivate_gprs_pdp_02();
+void utc_tel_deactivate_gprs_pdp_03();
+void utc_tel_deactivate_gprs_pdp_04();
+
+static void startup();
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_deactivate_gprs_pdp_01, 1},
+       {utc_tel_deactivate_gprs_pdp_02, 2},
+       {utc_tel_deactivate_gprs_pdp_03, 3},
+       {utc_tel_deactivate_gprs_pdp_04, 4},
+       {NULL, 0}
+       };
+
+#endif  //_UTC_TAPI_GPRS_PDP_DEACTIVATION_SET_
diff --git a/TC/telephony_TC/misc/unit/async_util.c b/TC/telephony_TC/misc/unit/async_util.c
new file mode 100644 (file)
index 0000000..2e2c519
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "misc_callback_util.h"
+#include "async_util.h"
+
+static void G_MAIN_TIMER_HANDLER(int sgi);
+
+// Global variable for G_MAIN system
+static int gEventHandle=0;
+static GMainLoop * context_loop = NULL;
+static EvtAlarmCb gpAlarm_Handler = NULL;
+static unsigned int gSubscription_id;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(context_loop);
+}
+
+void G_MAIN_TIMER_HANDLER(int sgi)
+{
+    if (gpAlarm_Handler)
+       gpAlarm_Handler(sgi);
+    else
+    {
+       fprintf(stderr, "SIGALRM received. But user handler not registered. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+    }
+}
+
+void G_MAIN_LOOP_RUN(int sec)
+{
+    (void) signal(SIGALRM, G_MAIN_TIMER_HANDLER);
+    alarm(sec);
+    context_loop = g_main_loop_new(NULL, FALSE);
+    g_main_loop_run(context_loop);
+    alarm(0);
+}
diff --git a/TC/telephony_TC/misc/unit/async_util.h b/TC/telephony_TC/misc/unit/async_util.h
new file mode 100644 (file)
index 0000000..7927b72
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _ASYNC_UTIL_H_
+#define _ASYNC_UTIL_H_
+
+#include "TapiEvent.h"
+
+
+typedef void (*EvtAlarmCb) (int sgi);
+TS_BOOL gAsyncResult;
+
+void G_MAIN_LOOP_RUN(int sec);
+void G_MAIN_LOOP_CLOSE();
+
+#endif  //_ASYNC_UTIL_H_
diff --git a/TC/telephony_TC/misc/unit/makefile b/TC/telephony_TC/misc/unit/makefile
new file mode 100644 (file)
index 0000000..09e4d66
--- /dev/null
@@ -0,0 +1,42 @@
+CC=gcc -Wall
+
+TS1  =  uts_tapi_misc_NAM_info_get
+TS2  =  uts_tapi_misc_NAM_info_set
+TS3  =  uts_tapi_misc_me_serial_num_get
+TS4  =  uts_tapi_misc_timezone_getinfo
+TS5  =  uts_tapi_misc_timezone_setinfo
+
+LIBS  = `pkg-config --libs  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+       
+INCS  =  -I. `pkg-config --cflags  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS  += -I$(TET_ROOT)/inc/tet3 
+
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER 
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+all : $(TS1)  $(TS2) $(TS3) $(TS4) $(TS5)
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(TS1)  $(TS2) $(TS3) $(TS4) $(TS5) 
+
+$(TS1): $(TS1).c
+       $(CC) -o $(TS1) $(TS1).c misc_callback_util.c  $(LDFLAGS)
+$(TS2): $(TS2).c
+       $(CC) -o $(TS2) $(TS2).c misc_callback_util.c  $(LDFLAGS)
+
+$(TS3): $(TS3).c
+       $(CC) -o $(TS3) $(TS3).c misc_callback_util.c  $(LDFLAGS)
+
+$(TS4): $(TS4).c
+       $(CC) -o $(TS4) $(TS4).c misc_callback_util.c  $(LDFLAGS)
+
+$(TS5): $(TS5).c
+       $(CC) -o $(TS5) $(TS5).c misc_callback_util.c  $(LDFLAGS)
+
diff --git a/TC/telephony_TC/misc/unit/misc_callback_util.c b/TC/telephony_TC/misc/unit/misc_callback_util.c
new file mode 100644 (file)
index 0000000..c9231ca
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "misc_callback_util.h"\r
+\r
+\r
+static unsigned int subscription_id[6]={0,0,0,0,0,0};\r
+\r
+/**\r
+* @file     misc_callback_util.c\r
+* @brief     This is the implementation file for misc callback utility APIs\r
+* @version   [09-03-04] Initial Creation V0.1\r
+*/\r
+\r
+\r
+GMainLoop *main_loop = NULL;\r
+\r
+void  misc_Callback (TelTapiEvent_t * TapiEvent)\r
+{\r
+\r
+       int                     eventClass;\r
+       int                     eventType;\r
+       int                             requestId;\r
+       int                             status;\r
+       void                    *EventData = NULL;\r
+\r
+       eventClass = TapiEvent->EventClass;\r
+       eventType = TapiEvent->EventType;\r
+       requestId = TapiEvent->RequestId;\r
+       status = TapiEvent->Status;\r
+       EventData = TapiEvent->pData;\r
+\r
+       printf("\nClass:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );\r
+\r
+       if( EventData==NULL)\r
+       {\r
+               printf("\n******  EventData is NULL.........   ******\n");\r
+       }\r
+\r
+       switch(eventClass)\r
+       {\r
+                       case TAPI_EVENT_CLASS_MISC:\r
+                               switch(eventType)\r
+                               {\r
+                                       case TAPI_EVENT_MISC_NITZ_GETCNF :\r
+                                               printf("***  TAPI_EVENT_MISC_NITZ_GETCNF received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       case TAPI_EVENT_MISC_NITZ_NOTIFY :\r
+                                               printf("***  TAPI_EVENT_MISC_NITZ_NOTIFY received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       case TAPI_EVENT_MISC_NITZ_IND :\r
+                                               printf("***  TAPI_EVENT_MISC_NITZ_IND received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       default:\r
+                                               printf("*** MISC Default Event  %x ****\n", eventType);\r
+                                               break;\r
+\r
+                               }\r
+\r
+                               break;\r
+\r
+                       default:\r
+                               printf("*** Other TAPI EVENT received : class : %x ****\n", eventClass);\r
+                               break;\r
+       }\r
+\r
+}\r
+\r
+\r
+gboolean\r
+TimeOutFun (void *data)\r
+{\r
+       g_main_loop_quit (main_loop);\r
+       printf ("Exit from this callback\n");\r
+       return FALSE;\r
+}\r
+\r
+int gmain_loop_for_tapi_events(int delay)\r
+{\r
+       main_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add (delay, TimeOutFun, NULL);\r
+       g_main_loop_run (main_loop);\r
+\r
+       return 0;\r
+}\r
+\r
+void print_all_subsciption_ids()\r
+{\r
+       int i=0;\r
+       for(i=0;i<3;i++)\r
+       {\r
+               printf("\n subscription_id[%d] has value %d \n",i,subscription_id[i]);\r
+       }\r
+}\r
+\r
+TapiResult_t register_all_events()\r
+{\r
+       TapiResult_t api_err = TAPI_API_SUCCESS;\r
+\r
+       api_err = tel_register_event(TAPI_EVENT_MISC_NITZ_GETCNF, &subscription_id[0], (TelAppCallback)misc_Callback, NULL);\r
+       api_err = tel_register_event(TAPI_EVENT_MISC_NITZ_NOTIFY, &subscription_id[1], (TelAppCallback)misc_Callback, NULL);\r
+       api_err = tel_register_event(TAPI_EVENT_MISC_NITZ_IND, &subscription_id[2], (TelAppCallback)misc_Callback, NULL);\r
+       print_all_subsciption_ids();\r
+\r      return 0;
+}\r
+\r
+\r
+ TapiResult_t deregister_all()\r
+{\r
+       tel_deregister_event(subscription_id[0]);\r
+       tel_deregister_event(subscription_id[1]);\r
+       tel_deregister_event(subscription_id[2]);\r
+       return 0;
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/misc/unit/misc_callback_util.h b/TC/telephony_TC/misc/unit/misc_callback_util.h
new file mode 100644 (file)
index 0000000..bf6a6b4
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#ifndef _MISC_CALLBACK_UTIL_H_\r
+#define _MISC_CALLBACK_UTIL_H_\r
+\r
+#include <stdlib.h>\r
+#include <signal.h>\r
+#include <errno.h>\r
+#include "string.h"\r
+#include "assert.h"\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <fcntl.h>\r
+#include <unistd.h>\r
+#include <glib.h>\r
+#include <pthread.h>\r
+#include <stdio.h>\r
+
+#include <ITapiMisc.h>
+#include "tet_api.h"
+#include "tet_macro.h"
+#include <ITapiCall.h>
+#include <TapiCommon.h>
+#include <TapiEvent.h>
+#include <TelErr.h>
+#include "async_util.h"
+
+extern void  misc_Callback (TelTapiEvent_t * TapiEvent);
+extern TapiResult_t register_all_events();
+extern  TapiResult_t deregister_all();
+void print_all_subsciption_ids();
+void misc_Callback(TelTapiEvent_t *TapiEvent);
+
+extern int gmain_loop_for_tapi_events(int delay);
+extern gboolean TimeOutFun (void *data);
+
+#endif //_MISC_CALLBACK_UTIL_H_
diff --git a/TC/telephony_TC/misc/unit/tet_macro.h b/TC/telephony_TC/misc/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..89744c0
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef TET_MACRO_H\r
+#define TET_MACRO_H\r
+\r
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)\r
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)\r
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)\r
+\r
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);}\r
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}\r
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}\r
+\r
+#endif\r
+\r
diff --git a/TC/telephony_TC/misc/unit/tslist b/TC/telephony_TC/misc/unit/tslist
new file mode 100644 (file)
index 0000000..2c10bec
--- /dev/null
@@ -0,0 +1,5 @@
+/misc/unit/uts_tapi_misc_NAM_info_set
+/misc/unit/uts_tapi_misc_NAM_info_get
+/misc/unit/uts_tapi_misc_me_serial_num_get
+/misc/unit/uts_tapi_misc_timezone_getinfo
+
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.c b/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.c
new file mode 100644 (file)
index 0000000..31d6b0d
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tapi_misc_NAM_info_get.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup)() = startup;\r
+void (*tet_cleanup)() = cleanup;\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+static void startup() {\r
+       gStartupSuccess = tel_init();\r
+       if (gStartupSuccess != TAPI_API_SUCCESS) {\r
+               printf("TelTapiInit() Failed gStartupSuccess = %d \n", gStartupSuccess);\r
+       }\r
+       register_all_events();\r
+}\r
+\r
+static void cleanup() {\r
+       if (gStartupSuccess == TAPI_API_SUCCESS) {\r
+               //               G_MAIN_CLOSE();\r
+       }\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  timezone_valid\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  timezone_valid\r
+ * @return TapiResult_t\r
+ */\r
+\r
+void utc_tapi_misc_NAM_info_get_001() {\r
+\r
+       TapiResult_t returnStatus;\r
+       TS_WORD nam_info_mask = 0x0008;// Auto NAM\r
+       TelMiscNamIndex_t nam_index = TAPI_MISC_NAM_1;\r
+       int case_result = 1;\r
+\r
+       gmain_loop_for_tapi_events(10000);\r
+       returnStatus = tel_get_misc_nam_info(nam_info_mask, nam_index);\r
+       // G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(10000);\r
+\r
+       printf("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS)\r
+               ;\r
+\r
+       if (returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tapi_misc_NAM_info_get_001 request successful\n");\r
+       else\r
+               case_result = 0;\r
+\r
+       //expected_event = TAPI_EVENT_MISC_GET_NAM_INFO_CNF;\r
+       gmain_loop_for_tapi_events(100);\r
+\r
+       if (case_result)\r
+               tet_result(TET_PASS);\r
+\r
+       printf("\n\n\n\n\n########     TEST utc_tapi_misc_NAM_info_get_001 ENDS    ###########\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  timezone_valid\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  timezone_valid\r
+ * @return TapiResult_t\r
+ */\r
+\r
+void utc_tapi_misc_NAM_info_get_002() {\r
+\r
+       TapiResult_t returnStatus;\r
+       TS_WORD nam_info_mask = -1;\r
+       TelMiscNamIndex_t nam_index = TAPI_MISC_NAM_1;\r
+       int case_result = 1;\r
+\r
+       gmain_loop_for_tapi_events(5000);\r
+       returnStatus = tel_get_misc_nam_info(NULL, nam_index);\r
+       // G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf("The return value is %d\n", returnStatus);\r
+       //printf ("The pRequestId value is %d\n",flag);\r
+\r
+       if (returnStatus == TAPI_API_SUCCESS) {\r
+               tet_result(TET_FAIL);\r
+               tet_printf("utc_tapi_misc_Nam_info_get_002 failed\n");\r
+       }\r
+       tet_result(TET_PASS);\r
+\r
+       printf("\n\n\n\n\n########     TEST utc_tapi_misc_NAM_info_get_002 ENDS    ###########\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  timezone_valid\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  timezone_valid\r
+ * @return TapiResult_t\r
+ */\r
+\r
+void utc_tapi_misc_NAM_info_get_003() {\r
+\r
+       TapiResult_t returnStatus;\r
+       TS_WORD nam_info_mask = 0x0008;// Auto NAM\r
+       int nam_index = -1;\r
+       int case_result = 1;\r
+\r
+       gmain_loop_for_tapi_events(5000);\r
+       returnStatus = tel_get_misc_nam_info(nam_info_mask, nam_index);\r
+       // G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf("The return value is %d\n", returnStatus);\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT)\r
+               ;\r
+\r
+       if (returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tapi_misc_NAM_info_get_003 request successful\n");\r
+       else\r
+               case_result = 0;\r
+\r
+       if (case_result)\r
+               tet_result(TET_PASS);\r
+\r
+       printf("\n\n\n\n\n########     TEST utc_tapi_misc_NAM_info_get_003 ENDS    ###########\n");\r
+}\r
+/** @} */\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.h b/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_get.h
new file mode 100644 (file)
index 0000000..e159e42
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "misc_callback_util.h"
+
+#ifndef  _UTC_TAPI_MISC_NAM_INFO_GET_
+#define  _UTC_TAPI_MISC_NAM_INFO_GET_
+
+
+void utc_tapi_misc_NAM_info_get_001();
+void utc_tapi_misc_NAM_info_get_002();
+void utc_tapi_misc_NAM_info_get_003();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_misc_NAM_info_get_001, 1},
+       {utc_tapi_misc_NAM_info_get_002, 2},
+       {utc_tapi_misc_NAM_info_get_003, 2},
+       {NULL, 0}
+};
+
+
+
+#endif //_UTC_TAPI_MISC_NAM_INFO_GET_
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.c b/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.c
new file mode 100644 (file)
index 0000000..b8c65e7
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tapi_misc_NAM_info_set.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup)() = startup;\r
+void (*tet_cleanup)() = cleanup;\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+ initialize and finalize test module */\r
+\r
+static void startup() {\r
+       gStartupSuccess = tel_init();\r
+       if (gStartupSuccess != TAPI_API_SUCCESS) {\r
+               printf("TelTapiInit() Failed gStartupSuccess = %d \n", gStartupSuccess);\r
+       }\r
+       register_all_events();\r
+}\r
+\r
+static void cleanup() {\r
+       if (gStartupSuccess == TAPI_API_SUCCESS) {\r
+               //               G_MAIN_CLOSE();\r
+       }\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  *timezone_info\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  *timezone_info\r
+ * @return TapiResult_t\r
+ */\r
+\r
+void utc_tapi_misc_NAM_info_set_001() {\r
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;\r
+       TelMiscNamInfo_t *nam_info = { 0, };\r
+       /*\r
+        nam_info->nam_info_mask = ;\r
+        nam_info->nam_total = ;\r
+        nam_info->nam_current_index = ;\r
+        nam_info->nam_req_index = ;\r
+        nam_info->nam_auto = ;\r
+        memcpy (,&nam_info->nam_mcc,TAPI_MISC_MCC_LEN_MAX);\r
+        memcpy (,&nam_info->nam_mnc,TAPI_MISC_MCC_LEN_MAX);\r
+        memcpy (,&nam_info->nam_min,TAPI_MISC_MIN_LEN_MAX);\r
+        memcpy (,&nam_info->nam_mdn,TAPI_MISC_MDN_LEN_MAX);\r
+        memcpy (,&nam_info->nam_name,TAPI_MISC_NAME_LEN_MAX);\r
+        */\r
+       gmain_loop_for_tapi_events(10000);\r
+       returnStatus = tel_set_misc_nam_info(&nam_info);\r
+\r
+       //G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(10000);\r
+       printf("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS)\r
+               ;\r
+\r
+       if (returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tapi_misc_NAM_info_set_001 pass\n");\r
+\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  *timezone_info\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  *timezone_info\r
+ * @return TapiResult_t\r
+ */\r
+void utc_tapi_misc_NAM_info_set_002() {\r
+\r
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;\r
+       TelMiscNamInfo_t *nam_info = { 0, };\r
+\r
+       gmain_loop_for_tapi_events(10000);\r
+       returnStatus = tel_set_misc_nam_info(NULL);\r
+       //G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(10000);\r
+       printf("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR)\r
+               ;\r
+       if (returnStatus == TAPI_API_INVALID_PTR)\r
+               printf("utc_tapi_misc_NAM_info_set_002 pass\n");\r
+\r
+}\r
+/** @} */\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.h b/TC/telephony_TC/misc/unit/uts_tapi_misc_NAM_info_set.h
new file mode 100644 (file)
index 0000000..2800f3f
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @file
+* @brief       This is a suite of unit test cases to test Telephony misc API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation
+* @date        2009.03.04
+*/
+
+#include "misc_callback_util.h"
+
+#ifndef  _UTC_TAPI_MISC_NAM_INFO_SET_
+#define  _UTC_TAPI_MISC_NAM_INFO_SET_
+
+void utc_tapi_misc_NAM_info_set_001();
+void utc_tapi_misc_NAM_info_set_002();
+
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_misc_NAM_info_set_001, 1},
+       {utc_tapi_misc_NAM_info_set_002, 2},
+       {NULL, 0}
+};
+
+#endif // _UTC_TAPI_MISC_NAM_INFO_SET_
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.c b/TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.c
new file mode 100644 (file)
index 0000000..888baad
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+void utc_tapi_misc_me_serial_num_get_001() {\r
+\r
+       int returnStatus;\r
+       TelMiscSNIndexType_t index_type = TAPI_MISC_ME_MEID;\r
+       TelMiscSNInformation sn_info;\r
+       int case_result = 1;\r
+\r
+       gmain_loop_for_tapi_events(10000);\r
+       returnStatus = tel_get_misc_me_sn(index_type, &sn_info);\r
+       // G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(10000);\r
+\r
+       printf("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+\r
+       if (returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tapi_misc_me_serial_num_get_001 request successful\n");\r
+       else\r
+               case_result = 0;\r
+\r
+       expected_event = TAPI_EVENT_MISC_SERIAL_NUMBER_IND;\r
+       gmain_loop_for_tapi_events(10000);\r
+\r
+       if (case_result)\r
+               tet_result(TET_PASS);\r
+\r
+       printf("\n\n\n\n\n########     TEST utc_tapi_misc_me_serial_num_get_001 ENDS    ###########\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ * @param [in]  timezone_valid\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  timezone_valid\r
+ * @return int\r
+ */\r
+\r
+void utc_tapi_misc_me_serial_num_get_002() {\r
+\r
+       int returnStatus;\r
+       int index_type = -1;\r
+       int case_result = 1;\r
+       TelMiscSNInformation sn_info;\r
+\r
+       gmain_loop_for_tapi_events(5000);\r
+       returnStatus = tel_get_misc_me_sn(index_type, &sn_info);\r
+       // G_MAIN_LOOP_RUN(5);\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf("The return value is %d\n", returnStatus);\r
+\r
+       if (returnStatus == TAPI_API_SUCCESS) {\r
+               tet_result(TET_FAIL);\r
+               printf("\nTEST utc_tapi_misc_me_serial_num_get_002 Failed    \n");\r
+       }\r
+\r
+       tet_result(TET_PASS);\r
+\r
+       printf("\n\n\n\n\n########     TEST utc_tapi_misc_me_serial_num_get_002 ENDS    ###########\n");\r
+}\r
+/** @} */\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.h b/TC/telephony_TC/misc/unit/uts_tapi_misc_me_serial_num_get.h
new file mode 100644 (file)
index 0000000..565187b
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "misc_callback_util.h"
+
+#ifndef  _UTC_TAPI_MISC_ME_SERIAL_NUM_GET_
+#define  _UTC_TAPI_MISC_ME_SERIAL_NUM_GET_
+
+
+void utc_tapi_misc_me_serial_num_get_001();
+void utc_tapi_misc_me_serial_num_get_002();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_misc_me_serial_num_get_001, 1},
+       {utc_tapi_misc_me_serial_num_get_002, 2},
+       {NULL, 0}
+};
+
+
+
+#endif //_UTC_TAPI_MISC_ME_SERIAL_NUM_GET_
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.c b/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.c
new file mode 100644 (file)
index 0000000..432beed
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tapi_misc_timezone_getinfo.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tapi_misc_timezone_getinfo_001, 1},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static int gStartupSuccess;\r
+\r
+void alarm_received(int sgi)\r
+{\r
+       gAsyncResult = FALSE;\r
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");\r
+//     G_MAIN_LOOP_CLOSE();\r
+}\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       if (gStartupSuccess == TAPI_API_SUCCESS)\r
+               {\r
+               //       G_MAIN_CLOSE();\r
+               }\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TAPI_MISC_TIMEZONE_GETINFO_001\r
+ * @param [in]  *timezone_info\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  *timezone_info\r
+ * @return int\r
+*/\r
+\r
+\r
+void utc_tapi_misc_timezone_getinfo_001()\r
+{\r
+\r
+       int  returnStatus = TAPI_API_SUCCESS;\r
+       gmain_loop_for_tapi_events(5000);\r
+       returnStatus = tel_get_misc_timezone_info();\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tapi_misc_timezone_getinfo_001 pass\n");\r
+\r
+\r
+}\r
+\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.h b/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_getinfo.h
new file mode 100644 (file)
index 0000000..7f3be9f
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#ifndef  _UTC_TAPI_MISC_TIMEZONE_GETINFO_\r
+#define  _UTC_TAPI_MISC_TIMEZONE_GETINFO_\r
+\r
+#include "misc_callback_util.h"\r
+\r
+void utc_tapi_misc_timezone_getinfo_001();\r
+\r
+#endif // _UTC_TAPI_MISC_TIMEZONE_GETINFO_\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.c b/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.c
new file mode 100644 (file)
index 0000000..fdab033
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tapi_misc_timezone_setinfo.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tapi_misc_timezone_setinfo_001, 1},\r
+       {utc_tapi_misc_timezone_setinfo_002, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+void alarm_received(int sgi)\r
+{\r
+       gAsyncResult = FALSE;\r
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");\r
+//     G_MAIN_LOOP_CLOSE();\r
+}\r
+\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+\r
+       gStartupSuccess =  TelTapiInit();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("TelTapiInit() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+       register_all_events();\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       if (gStartupSuccess == TAPI_API_SUCCESS)\r
+               {\r
+               //       G_MAIN_CLOSE();\r
+               }\r
+       deregister_all();\r
+       TelTapiDeInit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TAPI_MISC_TIMEZONE_SETINFO_001\r
+ * @param [in]  *timezone_info\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  *timezone_info\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tapi_misc_timezone_setinfo_001()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_misc_time_zone_info_type timezone_info = {0,};\r
+       timezone_info.daylight_valid=1;\r
+       timezone_info.year=10;\r
+       timezone_info.month=1;\r
+       timezone_info.day=1;\r
+       timezone_info.hour=1;\r
+       timezone_info.minute=1;\r
+       timezone_info.second=1;\r
+       timezone_info.time_zone=36;\r
+       timezone_info.time_zone_valid=TAPI_MISC_NITZ_RTC_BKUP_PHONE;\r
+       timezone_info.daylight_adjust=TAPI_MISC_NITZ_NOADJUST;\r
+       timezone_info.day_of_week =TAPI_MISC_NITZ_DOW_FRI;\r
+       \r
+       gmain_loop_for_tapi_events(5000);\r
+       returnStatus = tapi_misc_timezone_setinfo(&timezone_info);\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tapi_misc_timezone_setinfo_001 pass\n");\r
+\r
+\r
+}\r
+\r
+\r
+\r
+void utc_tapi_misc_timezone_setinfo_002()\r
+{\r
+\r
+       TapiResult_t  returnStatus = 1;\r
+       TelTapiDeInit();\r
+       gmain_loop_for_tapi_events(5000);\r
+       //De-initializing Tapi for invalid test case\r
+       returnStatus = tapi_misc_timezone_setinfo(NULL);\r
+       gmain_loop_for_tapi_events(5000);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_result(TET_FAIL);\r
+       }\r
+       tet_result(TET_PASS);\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.h b/TC/telephony_TC/misc/unit/uts_tapi_misc_timezone_setinfo.h
new file mode 100644 (file)
index 0000000..c69e210
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "misc_callback_util.h"\r
+\r
+#ifndef  _UTC_TAPI_MISC_TIMEZONE_SETINFO_\r
+#define  _UTC_TAPI_MISC_TIMEZONE_SETINFO_\r
+\r
+void utc_tapi_misc_timezone_setinfo_001();\r
+void utc_tapi_misc_timezone_setinfo_002();\r
+\r
+#endif // _UTC_TAPI_MISC_TIMEZONE_SETINFO_\r
diff --git a/TC/telephony_TC/network/README b/TC/telephony_TC/network/README
new file mode 100644 (file)
index 0000000..803feff
--- /dev/null
@@ -0,0 +1,91 @@
+=================================================================================
+*                                    README                                     *
+=================================================================================
+
+1. The Telephony Network Test Script directory (TestCases) includes:
+
+       Telephony-framework/network/
+               |-- README                                    ; This file
+               `-- Unit                                      ; contains Unit TCs
+                   |-- makefile
+                   |-- tslist
+                   `-- Unit test case source codes
+       2 directories, 58 files
+       
+
+2. The $(TEST_ROOT) directory must includes following files:
+
+       /$(TEST_ROOT)
+               |-- _export_tet_host.sh
+               |-- _export_tet_target.sh
+               |-- build-target.sh
+               |-- exec-target.sh
+               |-- tet_code
+               |-- tet_scen
+               |-- tetbuild.cfg
+               |-- tetclean.cfg
+               |-- tetexec.cfg
+               |-- telephony-framework
+               `-- ...(elipsis)
+
+=================================================================================
+*                                Preconditions                                  *
+---------------------------------------------------------------------------------
+|  Before Testing Email Module, you should check the following conditions       |
+=================================================================================
+
+1. Prepare a vaild SIM card that supports GPRS.
+
+
+       
+=================================================================================
+*                                   Build                                       *
+=================================================================================
+       1) Place the Email Test Case package (TestCases) under $(TEST_ROOT)/telephony-framework.
+       
+       2) Host computer must have two type of TETware .
+               . A TETware built with 'arm-linux-gcc' for target testing
+               . A TETware built with 'gcc' for simulator testing
+               
+       3) Change directory to $(TEST_ROOT) folder.
+       
+       4) Modify the environment variable settings in "_export_tet_host.sh" file.
+               # TET_INSTALL_DIR=/home/share/tet3.7a                   ; specify your TETware path
+               # TET_TAR_PATH=/tetware-target
+               # TET_SIMULATOR_PATH=/tetware-simulator
+               
+       5) Make sure that all the header files, libraries and binaries are stored under LD_LIBRARY_PATH and PKG_CONFIG_PATH.
+       
+                               
+       6) Build.
+               # ./build-tar-host
+
+=================================================================================
+*                                    Execute                                    *
+=================================================================================
+       1) Mount NFS shares.
+       
+       2) Change directory to $(TEST_ROOT) folder.
+       
+       3) EModify the environment variable settings in "_export_tet_target.sh" file.
+               # TET_INSTALL_DIR=/mnt/nfs/tet3.7a              ; specify your TETware path
+               # TET_TAR_PATH=/tetware-target
+               
+       4) Make sure that all the header files, libraries and binaries are stored under LD_LIBRARY_PATH and PKG_CONFIG_PATH.
+       
+       5) Execute. It takes maximum 1 minute.
+               # ./exec-tar-target
+
+=================================================================================
+*                                  Change log                                   *
+=================================================================================
+1. 18-Dec-2008
+       - Initial draft.
+       
+=================================================================================
+*                                      NOTE                                     *
+=================================================================================
+1. In order to ensure successful working of the Test Scripts, please ensure that all of the IPKG files are installed normally.
+2. Testing Email Module can be executed under target system environment (not simulator).
+
+
diff --git a/TC/telephony_TC/network/unit/makefile b/TC/telephony_TC/network/unit/makefile
new file mode 100644 (file)
index 0000000..2fa3cbf
--- /dev/null
@@ -0,0 +1,84 @@
+CC=gcc -Wall
+
+COMM = tel_tapi_nw_common
+TS1 = uts_tel_get_network_band
+TS2 = uts_tel_get_network_hybrid_in_cdma
+TS3 = uts_tel_get_network_preferred_plmn
+TS4 = uts_tel_get_network_roaming
+TS5 = uts_tel_get_network_selection_mode
+TS6 = uts_tel_get_network_service_domain
+TS7 = uts_tel_search_network
+TS8 =  uts_tel_set_network_band
+TS10 = uts_tel_set_network_hybrid_in_cdma
+TS11 = uts_tel_set_network_preferred_plmn
+TS13 = uts_tel_set_network_roaming
+TS14 = uts_tel_set_network_service_domain
+TS15 = uts_tel_select_network_automatic
+TS16 = uts_tel_set_network_mode
+TS17 = uts_tel_get_network_mode
+TS18 = uts_tel_select_network_manual
+
+LIBS  = `pkg-config --libs  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+       
+INCS  =  -I. `pkg-config --cflags  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS  += -I$(TET_ROOT)/inc/tet3
+INCS  += -I../include
+
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+all : $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS10) $(TS11) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18)
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS10) $(TS11) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18)
+
+$(TS1): $(TS1).c
+       $(CC) -o $(TS1) tel_tapi_nw_common.c $(TS1).c  $(LDFLAGS)
+
+$(TS2): $(TS2).c
+       $(CC) -o $(TS2) tel_tapi_nw_common.c $(TS2).c  $(LDFLAGS)
+
+$(TS3): $(TS3).c
+       $(CC) -o $(TS3) tel_tapi_nw_common.c $(TS3).c  $(LDFLAGS)
+
+$(TS4): $(TS4).c
+       $(CC) -o $(TS4) tel_tapi_nw_common.c $(TS4).c  $(LDFLAGS)
+
+$(TS5): $(TS5).c
+       $(CC) -o $(TS5) tel_tapi_nw_common.c $(TS5).c  $(LDFLAGS)
+
+$(TS6): $(TS6).c
+       $(CC) -o $(TS6) tel_tapi_nw_common.c $(TS6).c  $(LDFLAGS)
+
+$(TS7): $(TS7).c
+       $(CC) -o $(TS7) tel_tapi_nw_common.c $(TS7).c  $(LDFLAGS)
+
+$(TS8): $(TS8).c
+       $(CC) -o $(TS8) tel_tapi_nw_common.c $(TS8).c  $(LDFLAGS)
+
+$(TS10): $(TS10).c
+       $(CC) -o $(TS10) tel_tapi_nw_common.c $(TS10).c  $(LDFLAGS)
+
+$(TS11): $(TS11).c
+       $(CC) -o $(TS11) tel_tapi_nw_common.c $(TS11).c  $(LDFLAGS)
+
+$(TS13): $(TS13).c
+       $(CC) -o $(TS13) tel_tapi_nw_common.c $(TS13).c  $(LDFLAGS)
+
+$(TS14): $(TS14).c
+       $(CC) -o $(TS14) tel_tapi_nw_common.c $(TS14).c  $(LDFLAGS)
+$(TS15): $(TS15).c
+       $(CC) -o $(TS15) tel_tapi_nw_common.c $(TS15).c  $(LDFLAGS)
+
+$(TS16): $(TS16).c
+       $(CC) -o $(TS16) tel_tapi_nw_common.c $(TS16).c  $(LDFLAGS)
+
+$(TS17): $(TS17).c
+       $(CC) -o $(TS17) tel_tapi_nw_common.c $(TS17).c  $(LDFLAGS)
+
+$(TS18): $(TS18).c
+       $(CC) -o $(TS18) tel_tapi_nw_common.c $(TS18).c  $(LDFLAGS)
diff --git a/TC/telephony_TC/network/unit/tel_tapi_nw_common.c b/TC/telephony_TC/network/unit/tel_tapi_nw_common.c
new file mode 100644 (file)
index 0000000..f74e8fb
--- /dev/null
@@ -0,0 +1,537 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "tel_tapi_nw_common.h"
+
+TelNetworkList_t gNetworkList = { 0, };
+GMainLoop *mainloop;
+
+void GetNetworkInfoCB(void *data)
+{
+       TelNetworkInfo_t tNetworkInfo;
+       memcpy(&tNetworkInfo, data, sizeof(TelNetworkInfo_t));
+
+       printf("GetNetworkInfoCB() : PLMN is %ld\n", tNetworkInfo.SysId.SysId);
+       printf("GetNetworkInfoCB() : PLMN is %s\n", tNetworkInfo.SysId.szSystemName);
+
+       if (tNetworkInfo.SysId.bPlmnForbidden == TRUE) {
+               printf("GetNetworkInfoCB(): Network Forbidden\n");
+       }
+
+       if (tNetworkInfo.SysId.bHome == TRUE) {
+               printf("GetNetworkInfoCB(): Home Network \n");
+       }
+
+       if (tNetworkInfo.bRoaming == TRUE) {
+               printf("GetNetworkInfoCB(): Roaming Network \n");
+       }
+
+       /*SystemType*/
+       switch (tNetworkInfo.SysId.SystemType) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_UMTS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_GPRS\n");
+                       break;
+
+               default:
+                       printf("SystemType: Other than GSM,GPRS,UMTS System type \n");
+                       break;
+       }
+
+       /*ServiceType*/
+       switch (tNetworkInfo.SysId.ServiceType) {
+               case TAPI_NETWORK_SERVICE_TYPE_COMBINED:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_COMBINED\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_CS:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_CS\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_PS:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_PS\n");
+                       break;
+
+               default:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_NO_SVE\n");
+                       break;
+       }
+
+       /*NetworkMode*/
+       switch (tNetworkInfo.SysId.NetworkMode) {
+               case TAPI_NETWORK_MODE_AUTOMATIC:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_AUTOMATIC\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_GSM:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_CDMA:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_CDMA\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_EMERGENCY:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_WCDMA:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_WCDMA\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_WLAN:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_WLAN\n");
+                       break;
+
+               default:
+                       printf("NetworkMode: UnKnown\n");
+                       break;
+       }
+
+       /*service level */
+       switch (tNetworkInfo.ServiceLevel) {
+               case TAPI_NETWORK_SERVICE_LEVEL_NO:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_NO\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_FULL:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_FULL\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_SEARCH:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_SEARCH\n");
+                       break;
+
+               default:
+                       printf("ServiceLevel: Unknown value\n");
+                       break;
+       }
+}
+
+void SearchNetworkCB(void *data)
+{
+       TelNetworkList_t tmpNetworkList;
+       int idx = 0;
+
+       memcpy(&tmpNetworkList, data, sizeof(TelNetworkList_t));
+       memcpy(&gNetworkList, data, sizeof(TelNetworkList_t));
+
+       printf("[PHONE CLIENT] ReceiveNetworkList() - entryCount:[%d]\n", tmpNetworkList.NumOfNwAvailable);
+
+       for (idx = 0; idx < tmpNetworkList.NumOfNwAvailable; idx++) {
+               printf("[PHONE CLIENT] NetworkList.systemList[idx].SysId =>%ld\n", tmpNetworkList.SystemList[idx].SysId);
+       }
+
+       if (tmpNetworkList.SystemList[0].ServiceType == TAPI_NETWORK_SERVICE_TYPE_COMBINED) {
+               printf("TAPI_NETWORK_SERVICE_TYPE_COMBINED\n");
+       }
+       else if (tmpNetworkList.SystemList[0].ServiceType == TAPI_NETWORK_SERVICE_TYPE_CS) {
+               printf("TAPI_NETWORK_SERVICE_TYPE_CS\n");
+       }
+       else if (tmpNetworkList.SystemList[0].ServiceType == TAPI_NETWORK_SERVICE_TYPE_PS) {
+               printf("TAPI_NETWORK_SERVICE_TYPE_PS\n");
+       }
+}
+
+void SelectNetworkCB(void *data)
+{
+       TelNetworkInfo_t tNetworkInfo;
+       memcpy(&tNetworkInfo, data, sizeof(TelNetworkInfo_t));
+
+       printf("SelectNetworkCB() : PLMN is %ld\n", tNetworkInfo.SysId.SysId);
+
+       if (tNetworkInfo.SysId.bPlmnForbidden == TRUE) {
+               printf("SelectNetworkCB(): Network Forbidden\n");
+       }
+
+       if (tNetworkInfo.SysId.bHome == TRUE) {
+               printf("SelectNetworkCB(): Home Network \n");
+       }
+
+       if (tNetworkInfo.bRoaming == TRUE) {
+               printf("SelectNetworkCB(): Roaming Network \n");
+       }
+
+
+       /*SystemType*/
+       switch (tNetworkInfo.SysId.SystemType) {
+               case TAPI_NETWORK_SYSTEM_GSM:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_UMTS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS:
+                       printf("SystemType: TAPI_NETWORK_SYSTEM_GPRS\n");
+                       break;
+
+               default:
+                       printf("SystemType: Other than GSM,GPRS,UMTS System type \n");
+                       break;
+       }
+
+
+       /*ServiceType*/
+       switch (tNetworkInfo.SysId.ServiceType) {
+               case TAPI_NETWORK_SERVICE_TYPE_COMBINED:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_COMBINED\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_CS:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_CS\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_PS:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_PS\n");
+                       break;
+
+               default:
+                       printf("ServiceType: TAPI_NETWORK_SERVICE_TYPE_NO_SVE\n");
+                       break;
+       }
+
+
+       /*NetworkMode*/
+       switch (tNetworkInfo.SysId.NetworkMode) {
+               case TAPI_NETWORK_MODE_AUTOMATIC:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_AUTOMATIC\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_GSM:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_CDMA:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_CDMA\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_EMERGENCY:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_WCDMA:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_WCDMA\n");
+                       break;
+
+               case TAPI_NETWORK_MODE_WLAN:
+                       printf("NetworkMode: TAPI_NETWORK_MODE_WLAN\n");
+                       break;
+
+               default:
+                       printf("NetworkMode: UnKnown\n");
+                       break;
+       }
+
+       /*service level */
+       switch (tNetworkInfo.ServiceLevel) {
+               case TAPI_NETWORK_SERVICE_LEVEL_NO:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_NO\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_FULL:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_FULL\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_SEARCH:
+                       printf("ServiceLevel: TAPI_NETWORK_SERVICE_LEVEL_SEARCH\n");
+                       break;
+
+               default:
+                       printf("ServiceLevel: Unknown value\n");
+                       break;
+       }
+}
+
+
+void GetSelectionModeCB(void *data)
+{
+       TelNetworkSelectionMode_t tSelectionMode;
+       memcpy(&tSelectionMode, data, sizeof(TelNetworkSelectionMode_t));
+
+       if (tSelectionMode == TAPI_NETWORK_SELECTIONMODE_AUTOMATIC) {
+               printf("GetSelectionModeCB(): TAPI_NETWORK_SELECTIONMODE_AUTOMATIC\n");
+       }
+       else if (tSelectionMode == TAPI_NETWORK_SELECTIONMODE_MANUAL) {
+               printf("GetSelectionModeCB(): TAPI_NETWORK_SELECTIONMODE_MANUAL\n");
+       }
+       else {
+               printf("GetSelectionModeCB()???");
+       }
+}
+
+int tapi_callback(const TelTapiEvent_t *tapievent, void *data)
+{
+       int tmp;
+       int i = 0;
+       TelNetworkRadioInfo_t radioInfo;
+
+       tmp = tapievent->RequestId;
+
+       //tapievent->RequestId =  tapievent->Status;
+       //tapievent->Status = tapievent->EventType;
+       //tapievent->EventType = tmp;
+       tet_printf("\n Inside tapi_callback \n");
+       tet_printf("Request iD is %d\n", tapievent->RequestId);
+       tet_printf("Status  is %d\n", tapievent->Status);
+       tet_printf("Event type  is %d\n", tapievent->EventType);
+
+       if (tapievent->EventClass != TAPI_EVENT_CLASS_NETWORK) {
+               return FALSE;
+       }
+
+       switch (tapievent->EventType) {
+               case TAPI_EVENT_NETWORK_RADIO_INFO_IND:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_RADIO_INFO_IND $$$$$$ \n");
+
+                       memcpy(&radioInfo, tapievent->pData, sizeof(TelNetworkRadioInfo_t));
+
+                       printf("\n Radio InfoRssiBar:[%d] \n", radioInfo.RssiBar);
+                       printf("\n Radio InfoRxLevel:[%d] \n", radioInfo.RxLevel);
+                       printf("\n Radio InfoRxQuality:[%d] \n", radioInfo.RxQuality);
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_CHANGE_IND:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_CHANGE_IND $$$$$$ \n");
+
+                       if (tapievent->pData != NULL)
+                               SelectNetworkCB(tapievent->pData);
+                       else
+                               printf("Event Data is NULL\n");
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL)
+                               GetSelectionModeCB(tapievent->pData);
+                       else
+                               printf("Event Data is NULL\n");
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_SETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWMODE_CNF $$$$$$ \n");
+                       break;
+
+               case TAPI_EVENT_NETWORK_SETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWBAND_CNF $$$$$$ \n");
+                       break;
+
+               case TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF $$$$$$ \n");
+                       break;
+
+               case TAPI_EVENT_NETWORK_SEARCH_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SEARCH_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkList_t networlist;
+                               memcpy(&networlist, tapievent->pData, sizeof(TelNetworkList_t));
+                               //memcpy(&gNetworkList, 0, sizeof(TelNetworkList_t));
+                               memcpy(&gNetworkList, tapievent->pData, sizeof(TelNetworkList_t));
+                               printf("\n Network Count:[%d] \n", networlist.NumOfNwAvailable);
+                               for (i = 0; i < networlist.NumOfNwAvailable; i++) {
+                                       printf("Network Name:[%ld] \n", networlist.SystemList[i].SysId);
+                                       printf("Network Name:[%c] \n", networlist.SystemList[i].szSystemName[0]);
+                                       printf("System Type:[%d] \n", networlist.SystemList[i].SystemType);
+                                       printf("Service Type:[%d] \n", networlist.SystemList[i].ServiceType);
+                                       printf("Home PLMN:[%d] \n", networlist.SystemList[i].bHome);
+                                       printf("Forbidden PLMN:[%d] \n", networlist.SystemList[i].bPlmnForbidden);
+                               }
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_SELECT_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL)
+                               GetNetworkInfoCB(tapievent->pData);
+                       else
+                               printf("Event Data is NULL\n");
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkPrefferedPlmnList_t preff_plmn_list;
+                               memcpy(&preff_plmn_list, tapievent->pData, sizeof(TelNetworkPrefferedPlmnList_t));
+                               unsigned char plmn_count;
+                               unsigned char counter;
+                               plmn_count = preff_plmn_list.NumOfPreffPlmns;
+                               counter = 0;
+                               while (counter < plmn_count) {
+                                       printf(" INDEX:[%d]\n", preff_plmn_list.PreffPlmnRecord[counter].Index);
+                                       printf(" PLMN ID:[%s]\n", preff_plmn_list.PreffPlmnRecord[counter].Plmn);
+                                       printf(" SYSTEM TYPE:[%d]\n", preff_plmn_list.PreffPlmnRecord[counter].SystemType);
+                                       printf("\n");
+                                       counter++;
+                               }
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_GETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETNWBAND_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkBand_t band_type;
+                               memcpy(&band_type, tapievent->pData, sizeof(TelNetworkBand_t));
+                               printf("\n BAND TYPE:[%d] \n", band_type);
+                               if (band_type == TAPI_NETWORK_BAND_TYPE_GSM)
+                                       printf("\n$$$$$$ TAPI_NETWORK_BAND_TYPE_GSM $$$$$$ \n");
+
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkServiceDomain_t service_type;
+                               memcpy(&service_type, tapievent->pData, sizeof(TelNetworkServiceDomain_t));
+                               printf("\n SERVICE DOMAIN:[%d] \n", service_type);
+
+                               if (service_type == TAPI_NETWORK_SERVICE_DOMAIN_PS)
+                                       printf("\n$$$$$$TAPI_NETWORK_SERVICE_DOMAIN_PS$$$$$$ \n");
+                               else if (service_type == TAPI_NETWORK_SERVICE_DOMAIN_CS)
+                                       printf("\n$$$$$$TAPI_NETWORK_SERVICE_DOMAIN_CS$$$$$$ \n");
+                               else if (service_type == TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC)
+                                       printf("\n$$$$$$ TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC$$$$$$ \n");
+                               else if (service_type == TAPI_NETWORK_SERVICE_DOMAIN_COMBINED)
+                                       printf("\n$$$$$$ TAPI_NETWORK_SERVICE_DOMAIN_COMBINED \n");
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_GETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETNWMODE_CNF $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkMode_t network_mode;
+                               memcpy(&network_mode, tapievent->pData, sizeof(TelNetworkMode_t));
+                               printf("\n NETWORK MODE:[%d] \n", network_mode);
+                               if (network_mode == TAPI_NETWORK_MODE_AUTOMATIC)
+                                       printf("\n$$$$$$ TAPI_NETWORK_MODE_AUTOMATIC $$$$$$ \n");
+                               else if (network_mode == TAPI_NETWORK_MODE_GSM)
+                                       printf("\n$$$$$$ TAPI_NETWORK_MODE_GSM $$$$$$ \n");
+                               else if (network_mode == TAPI_NETWORK_MODE_WCDMA)
+                                       printf("\n$$$$$$ TAPI_NETWORK_MODE_WCDMA $$$$$$ \n");
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_LOCANDCELLINFO $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkLocationCellInfo_t network_loc_cell_info;
+                               memcpy(&network_loc_cell_info, tapievent->pData, sizeof(TelNetworkLocationCellInfo_t));
+                               printf("\n LAC:[%d] \n", network_loc_cell_info.LocationAreaCode);
+                               printf("\n CID:[%ld] \n", network_loc_cell_info.CellId);
+                       }
+                       else {
+                               printf("Event Data is NULL\n");
+                       }
+
+                       break;
+
+               case TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETPREFPLMN_CNF $$$$$$ \n");
+                       break;
+
+               case TAPI_EVENT_NETWORK_SPN_INFO:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SPN_INFO $$$$$$ \n");
+
+                       if (tapievent->pData != NULL) {
+                               TelNetworkSpnMccMncInfo_t short_network_name;
+                               int ret_val = 0;
+                               char short_net_name[20];
+
+                               memcpy(&short_network_name, tapievent->pData, sizeof(TelNetworkSpnMccMncInfo_t));
+                               fprintf(stderr, "SERVICE PROVIDER NAME ####     [%s]     ####\n", short_network_name.short_network_name);
+                               fprintf(stderr, "MCC ####       [%d] ####       MNC #### [%d]\n", short_network_name.mcc, short_network_name.mnc);
+
+                               printf("ret val from status to get network name=%d", ret_val);
+                               printf("NETWORK NAME FORM STATUS = %s \n", short_net_name);
+                       }
+                       break;
+
+               default:
+                       printf("\n$$$$$$ UNKNOWN Event has Received $$$$$$ \n");
+                       break;
+       }
+
+       return TRUE;
+}
+
+gboolean TimeOutFunc(void *data)
+{
+       g_main_loop_quit(mainloop);
+       printf("out of loop\n");
+       return FALSE;
+}
+
+int gmain_loop_for_tapi_events()
+{
+       mainloop = g_main_loop_new(NULL, FALSE);
+       g_timeout_add(3000, TimeOutFunc, NULL);
+       g_main_loop_run(mainloop);
+       printf("receive_tapi_event:finish\n");
+       return 0;
+}
diff --git a/TC/telephony_TC/network/unit/tel_tapi_nw_common.h b/TC/telephony_TC/network/unit/tel_tapi_nw_common.h
new file mode 100644 (file)
index 0000000..c38f9b3
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <TelNetwork.h>
+#include <glib.h>
+
+#define TET_CHECK(x1, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+        { \
+                tet_printf("%s[%d] : test fail. error code =%d ",__FILE__,__LINE__, err); \
+                tet_result(TET_FAIL); \
+                return;\
+        } \
+ }
+
+extern void GetNetworkInfoCB(void *);
+extern void SearchNetworkCB(void *);
+extern void SelectNetworkCB(void *);
+extern void GetSelectionModeCB(void *);
+extern int gmain_loop_for_tapi_events(void);
+extern int tapi_callback(const TelTapiEvent_t *tapievent, void *data);
+
diff --git a/TC/telephony_TC/network/unit/tslist b/TC/telephony_TC/network/unit/tslist
new file mode 100644 (file)
index 0000000..402583d
--- /dev/null
@@ -0,0 +1,11 @@
+/network/unit/uts_tel_get_network_band
+/network/unit/uts_tel_get_network_preferred_plmn
+/network/unit/uts_tel_get_network_selection_mode
+/network/unit/uts_tel_get_network_service_domain
+/network/unit/uts_tel_search_network
+/network/unit/uts_tel_set_network_band
+/network/unit/uts_tel_set_network_service_domain
+/network/unit/uts_tel_get_network_mode
+/network/unit/uts_tel_select_network_automatic
+/network/unit/uts_tel_select_network_manual
+/network/unit/uts_tel_set_network_mode
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_band.c b/TC/telephony_TC/network/unit/uts_tel_get_network_band.c
new file mode 100644 (file)
index 0000000..34a76ef
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_band.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_get_network_band_01, 1 }, { utc_tel_get_network_band_02, 2 }, { NULL, 0 } };
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       int api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_get_network_band, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GETNWBAND_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_band, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_band_01
+ * @code
+
+               BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+               Band = TAPI_NETWORK_BAND_TYPE_ANY;
+               ret_val = tel_get_network_band(BandMode, Band, &pRequestId);
+               ret_val = tel_get_network_band(&pRequestId);
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_get_network_band_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_ANY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_band_01 Test\n");
+       /*Setting the network Band*/
+       ret_val = tel_get_network_band(&pRequestId);
+       /*************************/
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_band_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_band() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_band_02
+ * @code
+
+               pRequestId = NULL;
+               ret_val = tel_get_network_band(&pRequestId);
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_network_band_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int *pRequestId;
+
+       pRequestId = NULL;
+
+       tet_infoline("utc_tel_get_network_band_02 Test\n");
+
+       ret_val = tel_get_network_band(pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_band_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_band.h b/TC/telephony_TC/network/unit/uts_tel_get_network_band.h
new file mode 100644 (file)
index 0000000..69f646f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_get_network_band_01();\r
+static void utc_tel_get_network_band_02();\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.c b/TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.c
new file mode 100644 (file)
index 0000000..7f73ab0
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_hybrid_in_cdma.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_hybrid_in_cdma_01, 1},
+       {utc_tel_get_network_hybrid_in_cdma_02, 2},
+       {utc_tel_get_network_hybrid_in_cdma_03, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+void callback(TelTapiEvent_t *event)
+{
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)
+               return;
+
+       if (event->EventType == TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF) {
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF $$$$$$ \n");
+       }
+}
+
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_tapi_nw_set_network_mode_func, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_tapi_nw_set_network_mode_func, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions
+ * @par ID:
+ * utc_tel_tapi_nw_set_network_mode_func_01
+ * @param [in] NwMode
+ * @code
+
+               NwMode = TAPI_NETWORK_MODE_EMERGENCY;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_network_hybrid_in_cdma_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       ///TelNetworkMode_t NwMode;
+       int pRequestId;
+
+       //NwMode = TAPI_NETWORK_MODE_EMERGENCY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_01 Test\n");
+
+       ret_val = tel_get_network_hybrid_in_cdma(&pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions
+ * @par ID:
+ * utc_tel_tapi_nw_set_network_mode_func_02
+ * @param [in] NwMode
+ * @code
+
+               NwMode = TAPI_NETWORK_MODE_AUTOMATIC;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_hybrid_in_cdma_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkMode_t NwMode;
+       int pRequestId;
+
+       NwMode = TAPI_NETWORK_MODE_AUTOMATIC;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_02 Test\n");
+
+       ret_val = tel_get_network_hybrid_in_cdma(&pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions
+ * @par ID:
+ * utc_tel_tapi_nw_set_network_mode_func_03
+ * @param [in] NwMode
+ * @code
+
+ NwMode = TAPI_NETWORK_MODE_CDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_get_network_hybrid_in_cdma_03()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       //pRequestId = NULL;
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_03 Test\n");
+
+       ret_val = tel_get_network_hybrid_in_cdma(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_hybrid_in_cdma_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.h b/TC/telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma.h
new file mode 100644 (file)
index 0000000..4ce5d3b
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+static void utc_tel_get_network_hybrid_in_cdma_01(void);\r
+static void utc_tel_get_network_hybrid_in_cdma_02(void);\r
+static void utc_tel_get_network_hybrid_in_cdma_03(void);\r
+\r
+/** @} */\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_mode.c b/TC/telephony_TC/network/unit/uts_tel_get_network_mode.c
new file mode 100644 (file)
index 0000000..89563b7
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_mode.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_mode_01, 1},
+       {utc_tel_get_network_mode_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       int api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_get_network_mode, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GETNWMODE_CNF, &subscription_id1, (TelAppCallback) tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_mode, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_mode() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_mode_01
+ * @code
+
+               NwMode = TAPI_NETWORK_MODE_EMERGENCY;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_mode_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_mode_01 Test\n");
+       /*Setting of Network Mode*/
+       /*************************/
+       ret_val = tel_get_network_mode(&pRequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_mode_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_mode() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_mode_02
+ * @code
+
+               pRequestId = NULL;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_network_mode_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_get_network_mode_02 Test\n");
+
+       ret_val = tel_get_network_mode(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_mode_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_mode.h b/TC/telephony_TC/network/unit/uts_tel_get_network_mode.h
new file mode 100644 (file)
index 0000000..2c93772
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_get_network_mode_01();\r
+static void utc_tel_get_network_mode_02();\r
+\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.c b/TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.c
new file mode 100644 (file)
index 0000000..1cef006
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_preferred_plmn.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_preferred_plmn_01, 1},
+       {utc_tel_get_network_preferred_plmn_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       int api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_get_network_preferred_plmn, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_preferred_plmn, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_preferred_plmn_01
+ * @code
+
+               Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+               PreffPlmnInfo.Index = 23;
+               memcpy(PreffPlmnInfo.Plmn,"VF",2);
+               PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_preferred_plmn_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "VF", 2);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_preferred_plmn_01 Test\n");
+
+       /*Setting of Preferred PLMN*/
+       ret_val = tel_get_network_preferred_plmn(&pRequestId);
+       /***************************/
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_preferred_plmn_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_preferred_plmn() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_preferred_plmn_02
+ * @code
+
+ pRequestId = NULL;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_network_preferred_plmn_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_get_network_preferred_plmn_02 Test\n");
+
+       ret_val = tel_get_network_preferred_plmn(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_preferred_plmn_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.h b/TC/telephony_TC/network/unit/uts_tel_get_network_preferred_plmn.h
new file mode 100644 (file)
index 0000000..272653d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_get_network_preferred_plmn_01();\r
+static void utc_tel_get_network_preferred_plmn_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_roaming.c b/TC/telephony_TC/network/unit/uts_tel_get_network_roaming.c
new file mode 100644 (file)
index 0000000..93290b9
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_roaming.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_roaming_01, 1},
+       {utc_tel_get_network_roaming_02, 2},
+       {NULL, 0}
+};
+
+void callback(TelTapiEvent_t *event)
+{
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)
+               return;
+
+       if (event->EventType == TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF) {
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF $$$$$$ \n");
+       }
+
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_tapi_nw_get_network_mode_func, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_roaming, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_roaming() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_roaming_01
+ * @code
+
+               RoamingMode = TAPI_NETWORK_MODE_EMERGENCY;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_roaming_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId;
+
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_roaming_01 Test\n");
+       /*Setting of roaming Mode*/
+       ret_val = tel_get_network_roaming(&pRequestId);
+       /*************************/
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_roaming_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_roaming() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_roaming_02
+ * @code
+
+               pRequestId = NULL;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_network_roaming_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_get_network_roaming_02 Test\n");
+
+       ret_val = tel_get_network_roaming(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_roaming_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_roaming.h b/TC/telephony_TC/network/unit/uts_tel_get_network_roaming.h
new file mode 100644 (file)
index 0000000..527f07a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+static void utc_tel_get_network_roaming_01();\r
+static void utc_tel_get_network_roaming_02();\r
+\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.c b/TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.c
new file mode 100644 (file)
index 0000000..04d508a
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_selection_mode.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_selection_mode_01, 1},
+       {utc_tel_get_network_selection_mode_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_get_network_selection_mode, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_selection_mode, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_selection_mode() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_selection_mode_01
+ * @code
+
+               pRequestId = -1;
+               NwSelectionMode = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC;
+               ret_val = TelTapiNwSetSelectionMode(NwSelectionMode, &pRequestId);
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_selection_mode_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_selection_mode_01 Test\n");
+
+       printf("Value of ret-val while setting the value ==== %d\n", ret_val);
+
+       /***************************/
+       ret_val = tel_get_network_selection_mode(&pRequestId);
+       printf("Value of ret-val while getting the value ==== %d\n", ret_val);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_selection_mode_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_selection_mode() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_selection_mode_02
+ * @code
+
+               pRequestId = NULL;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_network_selection_mode_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_get_network_selection_mode_02 Test\n");
+
+       ret_val = tel_get_network_selection_mode(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_selection_mode_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.h b/TC/telephony_TC/network/unit/uts_tel_get_network_selection_mode.h
new file mode 100644 (file)
index 0000000..24649d1
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_get_network_selection_mode_01();\r
+static void utc_tel_get_network_selection_mode_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.c b/TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.c
new file mode 100644 (file)
index 0000000..a8e5e55
--- /dev/null
@@ -0,0 +1,140 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_get_network_service_domain.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_network_service_domain_01, 1},
+       {utc_tel_get_network_service_domain_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_get_network_service_domain, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_network_service_domain, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_get_network_service_domain() API in normal conditions
+ * @par ID:
+ * utc_tel_get_network_service_domain_01
+ * @code
+
+               pRequestId = -1;
+               ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_COMBINED;
+               ret_val = tel_get_network_service_domain(ServiceDomain, &pRequestId);
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_get_network_service_domain_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_get_network_service_domain_01 Test\n");
+
+       /*Setting of Service Domain*/
+       /***************************/
+       ret_val = tel_get_network_service_domain(&pRequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_get_network_service_domain_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_network_service_domain() API in abnormal conditions
+ * @par ID:
+ * utc_tel_get_network_service_domain_02
+ * @code
+
+               pRequestId = NULL;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_network_service_domain_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_get_network_service_domain_02 Test\n");
+
+       ret_val = tel_get_network_service_domain(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_get_network_service_domain_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.h b/TC/telephony_TC/network/unit/uts_tel_get_network_service_domain.h
new file mode 100644 (file)
index 0000000..0bb361b
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_get_network_service_domain_01();\r
+static void utc_tel_get_network_service_domain_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_search_network.c b/TC/telephony_TC/network/unit/uts_tel_search_network.c
new file mode 100644 (file)
index 0000000..fae2bed
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_search_network.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_search_network_01, 1},
+       {utc_tel_search_network_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_search_network, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SEARCH_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_search_network, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_search_network() API in normal conditions
+ * @par ID:
+ * utc_tel_search_network_01
+ * @code
+
+               pRequestId = -1;
+               ret_val = tel_search_network(&pRequestId);
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_search_network_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_search_network_01 Test\n");
+
+       ret_val = tel_search_network(&pRequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_search_network_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_search_network() API in abnormal conditions
+ * @par ID:
+ * utc_tel_search_network_02
+ * @code
+
+               pRequestId = NULL;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_search_network_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_search_network_02 Test\n");
+
+       ret_val = tel_search_network(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_search_network_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_search_network.h b/TC/telephony_TC/network/unit/uts_tel_search_network.h
new file mode 100644 (file)
index 0000000..7e3b5c0
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_search_network_01();\r
+static void utc_tel_search_network_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_select_network_automatic.c b/TC/telephony_TC/network/unit/uts_tel_select_network_automatic.c
new file mode 100644 (file)
index 0000000..42a5d7a
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "uts_tel_select_network_automatic.h"
+#include "tel_tapi_nw_common.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_select_network_automatic_01, 1},
+       {utc_tel_select_network_automatic_02, 2},
+       {NULL, 0}
+};
+
+void callback(TelTapiEvent_t *event)
+{
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)
+               return;
+
+       if (event->EventType == TAPI_EVENT_NETWORK_SELECT_CNF) {
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$ \n");
+       }
+
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       int api_err = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_select_network_automatic, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SELECT_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_select_network_automatic, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_select_network_automatic() API in normal conditions
+ * @par ID:
+ * utc_tel_select_network_automatic_01
+ * @code
+
+               pSystemId -> SystemType = TAPI_NETWORK_SYSTEM_GSM;
+               pSystemId -> ServiceType = TAPI_NETWORK_SERVICE_TYPE_COMBINED;
+               pSystemId -> SysIdFormat = TAPI_NETWORK_SYSID_FORMAT_PLMN;
+               pSystemId -> NetworkMode = TAPI_NETWORK_MODE_AUTOMATIC;
+               pSystemId -> SysId = 12345;
+               pSystemId -> bPlmnForbidden = FALSE;
+               pSystemId -> bHome = TRUE;
+               pSystemId -> bEquivalentPlmn = TRUE;
+               pSystemId -> bNetworkIdentityAvail = TRUE;
+               pSystemId -> bNetworkTimeAvail = TRUE;
+               pSystemId -> bNetworkTimeZoneAvail = TRUE;
+               pSystemId -> bNetworkDlsAvail = TRUE;
+               memcpy(pSystemId -> szSystemName, "XO", 2);
+               memcpy(pSystemId -> szSpn, "Vodafone", 9);
+               pSystemId -> NetworkTimeZone.Year = 1970;
+               pSystemId -> NetworkTimeZone.Month = 01;
+               pSystemId -> NetworkTimeZone.Day = 01;
+               pSystemId -> NetworkTimeZone.Hour = 01;
+               pSystemId -> NetworkTimeZone.Minute = 01;
+               pSystemId -> NetworkTimeZone.Second = 01;
+               pSystemId -> NetworkTimeZone.DaylightSave = TAPI_NETWORK_DLS_ADJ_NO_ADJUSTMENT;
+               pSystemId -> bMncIncludesPcsDigit = TRUE;
+               ret_val = TelTapiNwSelectNetwork(pSystemId, &pRequestId);
+               ret_val = tel_select_network_automatic(&pRequestId);
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_select_network_automatic_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_select_network_automatic_01 Test\n");
+       /* Selection of Network done*/
+       /*************************/
+       ret_val = tel_select_network_automatic(&pRequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_select_network_automatic_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_select_network_automatic() API in abnormal conditions
+ * @par ID:
+ * utc_tel_select_network_automatic_02
+ * @code
+
+               pRequestId = NULL;
+               ret_val = tel_select_network_automatic(&pRequestId);
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_select_network_automatic_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_select_network_automatic_02 Test\n");
+
+       ret_val = tel_select_network_automatic(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_select_network_automatic_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_select_network_automatic.h b/TC/telephony_TC/network/unit/uts_tel_select_network_automatic.h
new file mode 100644 (file)
index 0000000..1e8a100
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_select_network_automatic_01();\r
+static void utc_tel_select_network_automatic_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_select_network_manual.c b/TC/telephony_TC/network/unit/uts_tel_select_network_manual.c
new file mode 100644 (file)
index 0000000..897bbf6
--- /dev/null
@@ -0,0 +1,187 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "uts_tel_select_network_manual.h"
+#include "tel_tapi_nw_common.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_select_network_manual_01, 1},
+       {utc_tel_select_network_manual_02, 2},
+       {NULL, 0}
+};
+
+void callback(TelTapiEvent_t *event)
+{
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)
+               return;
+
+       if (event->EventType == TAPI_EVENT_NETWORK_SELECT_CNF) {
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$ \n");
+       }
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       tet_infoline("utc_tel_select_network_manual, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SELECT_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_select_network_manual, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_select_network_manual() API in normal conditions
+ * @par ID:
+ * utc_tel_select_network_manual_01
+ * @code
+
+               pSystemId -> SystemType = TAPI_NETWORK_SYSTEM_GSM;
+               pSystemId -> ServiceType = TAPI_NETWORK_SERVICE_TYPE_COMBINED;
+               pSystemId -> SysIdFormat = TAPI_NETWORK_SYSID_FORMAT_PLMN;
+               pSystemId -> NetworkMode = TAPI_NETWORK_MODE_AUTOMATIC;
+               pSystemId -> SysId = 12345;
+               pSystemId -> bPlmnForbidden = FALSE;
+               pSystemId -> bHome = TRUE;
+               pSystemId -> bEquivalentPlmn = TRUE;
+               pSystemId -> bNetworkIdentityAvail = TRUE;
+               pSystemId -> bNetworkTimeAvail = TRUE;
+               pSystemId -> bNetworkTimeZoneAvail = TRUE;
+               pSystemId -> bNetworkDlsAvail = TRUE;
+               memcpy(pSystemId -> szSystemName, "XO", 2);
+               memcpy(pSystemId -> szSpn, "Vodafone", 9);
+               pSystemId -> NetworkTimeZone.Year = 1970;
+               pSystemId -> NetworkTimeZone.Month = 01;
+               pSystemId -> NetworkTimeZone.Day = 01;
+               pSystemId -> NetworkTimeZone.Hour = 01;
+               pSystemId -> NetworkTimeZone.Minute = 01;
+               pSystemId -> NetworkTimeZone.Second = 01;
+               pSystemId -> NetworkTimeZone.DaylightSave = TAPI_NETWORK_DLS_ADJ_NO_ADJUSTMENT;
+               pSystemId -> bMncIncludesPcsDigit = TRUE;
+               ret_val = tel_select_network_manual(pSystemId, &pRequestId);
+               ret_val = tel_select_network_manual(&pRequestId);
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_select_network_manual_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+       unsigned int Plmn = 40405;
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_select_network_manual_01 Test\n");
+       /* Selection of Network done*/
+       /*************************/
+       ret_val = tel_select_network_manual(Plmn, &pRequestId);
+
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_select_network_manual_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_select_network_manual() API in abnormal conditions
+ * @par ID:
+ * utc_tel_select_network_manual_02
+ * @code
+
+               pRequestId = NULL;
+               ret_val = tel_select_network_manual(&pRequestId);
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_select_network_manual_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       unsigned int Plmn = 1;
+
+       tet_infoline("utc_tel_select_network_manual_02 Test\n");
+
+       ret_val = tel_select_network_manual(Plmn, NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_select_network_manual_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+void utc_tel_select_network_manual_03()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       unsigned int Plmn = -1;
+
+       tet_infoline("utc_tel_select_network_manual_02 Test\n");
+
+       ret_val = tel_select_network_manual(Plmn, NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_select_network_manual_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_select_network_manual.h b/TC/telephony_TC/network/unit/uts_tel_select_network_manual.h
new file mode 100644 (file)
index 0000000..da4160b
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_select_network_manual_01();\r
+static void utc_tel_select_network_manual_02();\r
+\r
+/** @} */\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_band.c b/TC/telephony_TC/network/unit/uts_tel_set_network_band.c
new file mode 100644 (file)
index 0000000..ae24ee8
--- /dev/null
@@ -0,0 +1,1303 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_set_network_band.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_network_band_01, 1},
+       {utc_tel_set_network_band_02, 2},
+       {utc_tel_set_network_band_03, 3},
+       {utc_tel_set_network_band_04, 4},
+       {utc_tel_set_network_band_05, 5},
+       {utc_tel_set_network_band_06, 6},
+       {utc_tel_set_network_band_07, 7},
+       {utc_tel_set_network_band_08, 8},
+       {utc_tel_set_network_band_09, 9},
+       {utc_tel_set_network_band_10, 10},
+       {utc_tel_set_network_band_11, 11},
+       {utc_tel_set_network_band_12, 12},
+       {utc_tel_set_network_band_13, 13},
+       {utc_tel_set_network_band_14, 14},
+       {utc_tel_set_network_band_15, 15},
+       {utc_tel_set_network_band_16, 16},
+       {utc_tel_set_network_band_17, 17},
+       {utc_tel_set_network_band_18, 18},
+       {utc_tel_set_network_band_19, 19},
+       {utc_tel_set_network_band_20, 20},
+       {utc_tel_set_network_band_21, 21},
+       {utc_tel_set_network_band_22, 22},
+       {utc_tel_set_network_band_23, 23},
+       {utc_tel_set_network_band_24, 24},
+       {utc_tel_set_network_band_25, 25},
+       {utc_tel_set_network_band_26, 26},
+       {utc_tel_set_network_band_27, 27},
+       {utc_tel_set_network_band_28, 28},
+       {utc_tel_set_network_band_29, 29},
+       {utc_tel_set_network_band_30, 30},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_set_network_band, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SETNWBAND_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_set_network_band, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_01
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+               BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+               Band = TAPI_NETWORK_BAND_TYPE_ANY;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_set_network_band_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_ANY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_01 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_02
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int *pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+       pRequestId = NULL;
+
+       tet_infoline("utc_tel_set_network_band_02 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_03
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_03()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_03 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_04
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_04()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_04 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_04 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_05
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_05()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int *pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM;
+       pRequestId = NULL;
+
+       tet_infoline("utc_tel_set_network_band_05 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_05 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_06
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_06()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_06 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_06 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_07
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_07()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_07 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_07 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_08
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_08()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_08 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_08 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_09
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_09()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_09 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_09 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_10
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ Band = -1;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_10()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       Band = -1;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_10 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_10 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_11
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_ANY;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_11()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_ANY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_11 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_11 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_12
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_12()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int *pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+       pRequestId = NULL;
+
+       tet_infoline("utc_tel_set_network_band_12 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_12 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_13
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_13()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_13 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_13 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_14
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_14()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_14 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_14 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_15
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_15()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int *pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM;
+       pRequestId = NULL;
+
+       tet_infoline("utc_tel_set_network_band_15 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_15 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_16
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_16()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_16 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_16 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_17
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_17()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_17 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_17 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_18
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_18()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_18 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_18 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_band_19
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_19()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_19 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_19 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_20
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+ Band = -1;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_20()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = TAPI_NETWORK_BAND_MODE_ONLY;
+       Band = -1;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_20 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_20 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_21
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_ANY;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_21()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_ANY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_21 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_21 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_22
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_band_22()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM850;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_22 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_22 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_23
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_23()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_23 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_23 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_24
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_24()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_24 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_24 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_25
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_25()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_GSM;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_25 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_25 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_26
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_26()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_26 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_26 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_27
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_27()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA850;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_27 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_27 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_28
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_28()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_28 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_28 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when one of the argument is invalid
+ * @par ID:
+ * utc_tel_set_network_band_29
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_29()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = TAPI_NETWORK_BAND_TYPE_WCDMA2100;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_29 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_29 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_band() API when both the arguments are invalid
+ * @par ID:
+ * utc_tel_set_network_band_30
+ * @param [in] BandMode
+ * @param [in] Band
+ * @code
+
+ BandMode = -1;
+ Band = -1;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_band_30()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkBandPreferred_t BandMode;
+       TelNetworkBand_t Band;
+       int pRequestId;
+
+       BandMode = -1;
+       Band = -1;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_band_30 Test\n");
+
+       ret_val = tel_set_network_band(BandMode, Band, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_band_30 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_band.h b/TC/telephony_TC/network/unit/uts_tel_set_network_band.h
new file mode 100644 (file)
index 0000000..9cbf6f3
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+static void startup();\r
+static void cleanup();\r
+static void utc_tel_set_network_band_01(void);\r
+static void utc_tel_set_network_band_02(void);\r
+static void utc_tel_set_network_band_03(void);\r
+static void utc_tel_set_network_band_04(void);\r
+static void utc_tel_set_network_band_05(void);\r
+static void utc_tel_set_network_band_06(void);\r
+static void utc_tel_set_network_band_07(void);\r
+static void utc_tel_set_network_band_08(void);\r
+static void utc_tel_set_network_band_09(void);\r
+static void utc_tel_set_network_band_10(void);\r
+static void utc_tel_set_network_band_11(void);\r
+static void utc_tel_set_network_band_12(void);\r
+static void utc_tel_set_network_band_13(void);\r
+static void utc_tel_set_network_band_14(void);\r
+static void utc_tel_set_network_band_15(void);\r
+static void utc_tel_set_network_band_16(void);\r
+static void utc_tel_set_network_band_17(void);\r
+static void utc_tel_set_network_band_18(void);\r
+static void utc_tel_set_network_band_19(void);\r
+static void utc_tel_set_network_band_20(void);\r
+static void utc_tel_set_network_band_21(void);\r
+static void utc_tel_set_network_band_22(void);\r
+static void utc_tel_set_network_band_23(void);\r
+static void utc_tel_set_network_band_24(void);\r
+static void utc_tel_set_network_band_25(void);\r
+static void utc_tel_set_network_band_26(void);\r
+static void utc_tel_set_network_band_27(void);\r
+static void utc_tel_set_network_band_28(void);\r
+static void utc_tel_set_network_band_29(void);\r
+static void utc_tel_set_network_band_30(void);\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.c b/TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.c
new file mode 100644 (file)
index 0000000..c78f9e3
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <tet_api.h>\r
+#include <ITapiNetwork.h>\r
+\r
+#include "tel_tapi_nw_common.h"\r
+#include "uts_tel_set_network_hybrid_in_cdma.h"\r
+\r
+TS_UINT subscription_id = 0, subscription_id1 = 0;\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_network_hybrid_in_cdma_01, 1},\r
+       {utc_tel_set_network_hybrid_in_cdma_02, 2},\r
+       {utc_tel_set_network_hybrid_in_cdma_03, 3},\r
+       {utc_tel_set_network_hybrid_in_cdma_04, 4},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+void callback(TelTapiEvent_t *event)\r
+{\r
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)\r
+               return;\r
+\r
+       if (event->EventType == TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF) {\r
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF $$$$$$ \n");\r
+       }\r
+}\r
+\r
+static void startup()\r
+{\r
+       int api_err = TAPI_API_SUCCESS;\r
+       tet_infoline("utc_tel_tapi_nw_set_network_mode_func, Test Start\n");\r
+\r
+       api_err = tel_init();\r
+       if (api_err != TAPI_API_SUCCESS) {\r
+               printf("tel_init Failed api_err = %d \n", api_err);\r
+       }\r
+\r
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);\r
+       if (api_err != TAPI_API_SUCCESS) {\r
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);\r
+       }\r
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);\r
+\r
+       tel_register_app_name("org.samsung.test");\r
+       return;\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("utc_tel_tapi_nw_set_network_mode_func, Test Finished\n");\r
+       tel_deregister_event(subscription_id1);\r
+       tel_deinit();\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+\r
+/**\r
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions\r
+ * @par ID:\r
+ * utc_tel_tapi_nw_set_network_mode_func_01\r
+ * @param [in] NwMode\r
+ * @code\r
+\r
+               NwMode = TAPI_NETWORK_MODE_EMERGENCY;\r
+               pRequestId = -1;\r
+\r
+* @endcode\r
+* @param [out] pRequestId\r
+* @return TAPI_API_INVALID_INPUT\r
+*/\r
+void utc_tel_set_network_hybrid_in_cdma_01()\r
+{\r
+       TapiResult_t ret_val = TAPI_API_SUCCESS;\r
+\r
+       int pRequestId = -1;\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_01 Test\n");\r
+\r
+       ret_val = tel_set_network_hybrid_in_cdma(TAPI_NETWORK_CDMA_HYBRID, &pRequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_01 is passed\n");\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions\r
+ * @par ID:\r
+ * utc_tel_tapi_nw_set_network_mode_func_02\r
+ * @param [in] NwMode\r
+ * @code\r
+\r
+ NwMode = TAPI_NETWORK_MODE_AUTOMATIC;\r
+ pRequestId = -1;\r
+\r
+ * @endcode\r
+ * @param [out] pRequestId\r
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+ */\r
+\r
+void utc_tel_set_network_hybrid_in_cdma_02()\r
+{\r
+       TapiResult_t ret_val = TAPI_API_SUCCESS;\r
+\r
+       TelNetworkMode_t NwMode;\r
+       int pRequestId;\r
+\r
+       NwMode = TAPI_NETWORK_MODE_AUTOMATIC;\r
+       pRequestId = -1;\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_02 Test\n");\r
+\r
+       ret_val = tel_set_network_hybrid_in_cdma(TAPI_NETWORK_CDMA_EVDO_ONLY, &pRequestId);\r
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_02 is passed\n");\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions\r
+ * @par ID:\r
+ * utc_tel_tapi_nw_set_network_mode_func_03\r
+ * @param [in] NwMode\r
+ * @code\r
+\r
+ NwMode = TAPI_NETWORK_MODE_CDMA;\r
+ pRequestId = -1;\r
+\r
+ * @endcode\r
+ * @param [out] pRequestId\r
+ * @return TAPI_API_INVALID_INPUT\r
+ */\r
+\r
+void utc_tel_set_network_hybrid_in_cdma_03()\r
+{\r
+       TapiResult_t ret_val = TAPI_API_SUCCESS;\r
+       int pRequestId;\r
+       pRequestId = -1;\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_03 Test\n");\r
+\r
+       ret_val = tel_set_network_hybrid_in_cdma(TAPI_NETWORK_CDMA_EVDO_ONLY + 1, &pRequestId);\r
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_03 is passed\n");\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+/**\r
+ * @brief This tests TelTapiNwSetNetworkMode() API in normal conditions\r
+ * @par ID:\r
+ * utc_tel_tapi_nw_set_network_mode_func_04\r
+ * @param [in] NwMode\r
+ * @code\r
+\r
+ NwMode = TAPI_NETWORK_MODE_GSM;\r
+ pRequestId = -1;\r
+\r
+ * @endcode\r
+ * @param [out] pRequestId\r
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+ */\r
+\r
+void utc_tel_set_network_hybrid_in_cdma_04()\r
+{\r
+       TapiResult_t ret_val = TAPI_API_SUCCESS;\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_04 Test\n");\r
+\r
+       ret_val = tel_set_network_hybrid_in_cdma(TAPI_NETWORK_CDMA_HYBRID, NULL);\r
+\r
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);\r
+\r
+       tet_infoline("utc_tel_set_network_hybrid_in_cdma_04 is passed\n");\r
+       tet_result(TET_PASS);\r
+\r
+       return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.h b/TC/telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma.h
new file mode 100644 (file)
index 0000000..ffaebf0
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_set_network_hybrid_in_cdma_01(void);\r
+static void utc_tel_set_network_hybrid_in_cdma_02(void);\r
+static void utc_tel_set_network_hybrid_in_cdma_03(void);\r
+static void utc_tel_set_network_hybrid_in_cdma_04(void);\r
+\r
+\r
+/** @} */\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_mode.c b/TC/telephony_TC/network/unit/uts_tel_set_network_mode.c
new file mode 100644 (file)
index 0000000..bdc0f67
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_set_network_mode.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_network_mode_01, 1},
+       {utc_tel_set_network_mode_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_set_network_mode, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SETNWMODE_CNF, &subscription_id1, (TelAppCallback) tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_set_network_mode, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_set_network_mode() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_mode_01
+ * @param [in] NwMode
+ * @code
+
+               NwMode = TAPI_NETWORK_MODE_EMERGENCY;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_set_network_mode_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkMode_t NwMode;
+       int pRequestId;
+
+       NwMode = TAPI_NETWORK_MODE_EMERGENCY;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_mode_01 Test\n");
+
+       ret_val = tel_set_network_mode(NwMode, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_mode_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_mode() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_mode_02
+ * @param [in] NwMode
+ * @code
+
+ NwMode = TAPI_NETWORK_MODE_AUTOMATIC;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+
+void utc_tel_set_network_mode_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkMode_t NwMode;
+       int pRequestId;
+
+       NwMode = TAPI_NETWORK_MODE_AUTOMATIC;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_mode_02 Test\n");
+
+       ret_val = tel_set_network_mode(NwMode, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_mode_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_mode.h b/TC/telephony_TC/network/unit/uts_tel_set_network_mode.h
new file mode 100644 (file)
index 0000000..4bb969d
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_set_network_mode_01(void);\r
+static void utc_tel_set_network_mode_02(void);\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.c b/TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.c
new file mode 100644 (file)
index 0000000..76486e2
--- /dev/null
@@ -0,0 +1,1843 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_set_network_preferred_plmn.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_network_preferred_plmn_01, 1},
+       //{utc_tel_set_network_preferred_plmn_02, 2},
+       //{utc_tel_set_network_preferred_plmn_03, 3},
+       {utc_tel_set_network_preferred_plmn_04, 4},
+       {utc_tel_set_network_preferred_plmn_05, 3},
+       {utc_tel_set_network_preferred_plmn_06, 6},
+       {utc_tel_set_network_preferred_plmn_07, 7},
+       {utc_tel_set_network_preferred_plmn_08, 8},
+       {utc_tel_set_network_preferred_plmn_09, 9},
+       {utc_tel_set_network_preferred_plmn_10, 10},
+       {utc_tel_set_network_preferred_plmn_11, 11},
+       //{utc_tel_set_network_preferred_plmn_12, 12},
+       //{utc_tel_set_network_preferred_plmn_13, 13},
+       {utc_tel_set_network_preferred_plmn_14, 14},
+       {utc_tel_set_network_preferred_plmn_15, 15},
+       {utc_tel_set_network_preferred_plmn_16, 16},
+       {utc_tel_set_network_preferred_plmn_17, 17},
+       {utc_tel_set_network_preferred_plmn_18, 18},
+       {utc_tel_set_network_preferred_plmn_19, 19},
+       {utc_tel_set_network_preferred_plmn_20, 20},
+       {utc_tel_set_network_preferred_plmn_21, 21},
+       //{utc_tel_set_network_preferred_plmn_22, 22},
+       //{utc_tel_set_network_preferred_plmn_23, 23},
+       {utc_tel_set_network_preferred_plmn_24, 24},
+       {utc_tel_set_network_preferred_plmn_25, 25},
+       {utc_tel_set_network_preferred_plmn_26, 26},
+       {utc_tel_set_network_preferred_plmn_27, 27},
+       {utc_tel_set_network_preferred_plmn_28, 28},
+       {utc_tel_set_network_preferred_plmn_29, 29},
+       {utc_tel_set_network_preferred_plmn_30, 30},
+       {utc_tel_set_network_preferred_plmn_31, 31},
+       //{utc_tel_set_network_preferred_plmn_32, 32},
+       //{utc_tel_set_network_preferred_plmn_33, 33},
+       {utc_tel_set_network_preferred_plmn_34, 34},
+       {utc_tel_set_network_preferred_plmn_35, 35},
+       {utc_tel_set_network_preferred_plmn_36, 36},
+       {utc_tel_set_network_preferred_plmn_37, 37},
+       {utc_tel_set_network_preferred_plmn_38, 38},
+       {utc_tel_set_network_preferred_plmn_39, 39},
+       {utc_tel_set_network_preferred_plmn_40, 40},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       int api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_set_network_preferred_plmn, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF, &subscription_id1, (TelAppCallback) tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_set_network_preferred_plmn, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API for invalid inputs
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_01
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+               Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+               PreffPlmnInfo.Index = 244;
+               memcpy(PreffPlmnInfo.Plmn,"40411",5);
+               PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_set_network_preferred_plmn_01()
+{
+       int ret_val = TAPI_API_SUCCESS;
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 244;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV; /*Test for invalid value*/
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_01 Test\n");
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_01 is passed\n");
+       tet_result(TET_PASS);
+       return;
+}
+
+#if 0
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_02
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 245;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_02()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 245;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_02 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_03
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 246;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_03()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 246;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_03 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+#endif
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_04
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 247;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_04()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 247;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_04 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_04 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_05
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 248;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_05()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 248;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_05 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_05 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_06
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 249;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_06()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 249;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_06 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_06 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_07
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 250;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_07()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 250;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_07 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_07 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_08
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 251;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_08()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 251;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_08 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_08 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_09
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 252;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_09()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 252;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_09 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_09 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_10
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ PreffPlmnInfo.Index = 253;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_10()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       PreffPlmnInfo.Index = 253;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_10 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_10 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid inputs
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_11
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 244;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_11()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 244;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV; /*Test for invalid value*/
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_11 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_11 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_12
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+               Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+               PreffPlmnInfo.Index = 245;
+               memcpy(PreffPlmnInfo.Plmn,"40411",5);
+               PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_INVALID_INPUT
+ */
+#if 0
+void utc_tel_set_network_preferred_plmn_12()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 245;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_12 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_12 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_13
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 246;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_13()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 246;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_13 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_13 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+#endif
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_14
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 247;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_14()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 247;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_14 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_14 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_15
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 248;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_15()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 248;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_15 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_15 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_16
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 249;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_16()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 249;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_16 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_16 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_17
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 250;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_17()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 250;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_17 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_17 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_18
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 251;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_18()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 251;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_18 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_18 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_19
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 252;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_19()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 252;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_19 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_19 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_20
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+ PreffPlmnInfo.Index = 253;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_20()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_EDIT;
+       PreffPlmnInfo.Index = 253;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_20 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_20 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid inputs
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_21
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 244;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_21()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 244;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV; /*Test for invalid value*/
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_21 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_21 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+#if 0
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_22
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 245;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_22()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 245;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_22 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_22 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_23
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 246;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_23()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 246;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_23 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_23 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+#endif
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_24
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 247;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_24()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 247;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_24 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_24 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_25
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 248;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_25()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 248;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_25 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_25 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_26
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 249;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_26()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 249;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_26 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_26 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_26
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 250;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_27()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 250;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_27 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_27 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_28
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 251;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_28()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 251;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_28 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_28 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_29
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 252;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_preferred_plmn_29()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 252;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_29 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_29 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_30
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+ PreffPlmnInfo.Index = 253;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_30()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = TAPI_NETWORK_PREF_PLMN_DELETE;
+       PreffPlmnInfo.Index = 253;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_30 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_30 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_31
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_31()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_NO_SRV;/*Invalid input*/
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_31 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_31 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+#if 0
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_32
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_32()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_CDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_32 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_32 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_33
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+
+void utc_tel_set_network_preferred_plmn_33()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn,"40411",5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_TDMA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_33 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_33 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+#endif
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_34
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_34()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_34 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_34 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_35
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_35()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_35 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_35 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_36
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_36()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_EGPRS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_36 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_36 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_37
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_37()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_PCS1900;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_37 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_37 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_38
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_38()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_38 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_38 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_39
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_39()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM_AND_UMTS;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_39 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_39 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_preferred_plmn() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_preferred_plmn_40
+ * @param [in] Operation
+ * @param [in] PreffPlmnInfo
+ * @code
+
+ Operation = -1;
+ PreffPlmnInfo.Index = 23;
+ memcpy(PreffPlmnInfo.Plmn,"40411",5);
+ PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_preferred_plmn_40()
+{
+       int ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkPrefferedPlmnOp_t Operation;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       int pRequestId;
+
+       Operation = -1;/*invalid input*/
+       PreffPlmnInfo.Index = 23;/*Some value between 0 and 255*/
+       memcpy(PreffPlmnInfo.Plmn, "40411", 5);
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_HSDPA;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_40 Test\n");
+
+       ret_val = tel_set_network_preferred_plmn(Operation, &PreffPlmnInfo, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_preferred_plmn_40 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.h b/TC/telephony_TC/network/unit/uts_tel_set_network_preferred_plmn.h
new file mode 100644 (file)
index 0000000..4f017bf
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_set_network_preferred_plmn_01(void);\r
+//static void utc_tel_set_network_preferred_plmn_02(void);\r
+//static void utc_tel_set_network_preferred_plmn_03(void);\r
+static void utc_tel_set_network_preferred_plmn_04(void);\r
+static void utc_tel_set_network_preferred_plmn_05(void);\r
+static void utc_tel_set_network_preferred_plmn_06(void);\r
+static void utc_tel_set_network_preferred_plmn_07(void);\r
+static void utc_tel_set_network_preferred_plmn_08(void);\r
+static void utc_tel_set_network_preferred_plmn_09(void);\r
+static void utc_tel_set_network_preferred_plmn_10(void);\r
+static void utc_tel_set_network_preferred_plmn_11(void);\r
+//static void utc_tel_set_network_preferred_plmn_12(void);\r
+//static void utc_tel_set_network_preferred_plmn_13(void);\r
+static void utc_tel_set_network_preferred_plmn_14(void);\r
+static void utc_tel_set_network_preferred_plmn_15(void);\r
+static void utc_tel_set_network_preferred_plmn_16(void);\r
+static void utc_tel_set_network_preferred_plmn_17(void);\r
+static void utc_tel_set_network_preferred_plmn_18(void);\r
+static void utc_tel_set_network_preferred_plmn_19(void);\r
+static void utc_tel_set_network_preferred_plmn_20(void);\r
+static void utc_tel_set_network_preferred_plmn_21(void);\r
+//static void utc_tel_set_network_preferred_plmn_22(void);\r
+//static void utc_tel_set_network_preferred_plmn_23(void);\r
+static void utc_tel_set_network_preferred_plmn_24(void);\r
+static void utc_tel_set_network_preferred_plmn_25(void);\r
+static void utc_tel_set_network_preferred_plmn_26(void);\r
+static void utc_tel_set_network_preferred_plmn_27(void);\r
+static void utc_tel_set_network_preferred_plmn_28(void);\r
+static void utc_tel_set_network_preferred_plmn_29(void);\r
+static void utc_tel_set_network_preferred_plmn_30(void);\r
+static void utc_tel_set_network_preferred_plmn_31(void);\r
+//static void utc_tel_set_network_preferred_plmn_32(void);\r
+//static void utc_tel_set_network_preferred_plmn_33(void);\r
+static void utc_tel_set_network_preferred_plmn_34(void);\r
+static void utc_tel_set_network_preferred_plmn_35(void);\r
+static void utc_tel_set_network_preferred_plmn_36(void);\r
+static void utc_tel_set_network_preferred_plmn_37(void);\r
+static void utc_tel_set_network_preferred_plmn_38(void);\r
+static void utc_tel_set_network_preferred_plmn_39(void);\r
+static void utc_tel_set_network_preferred_plmn_40(void);\r
+\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_roaming.c b/TC/telephony_TC/network/unit/uts_tel_set_network_roaming.c
new file mode 100644 (file)
index 0000000..41a09f1
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_set_network_roaming.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_network_roaming_01, 1},
+       {utc_tel_set_network_roaming_02, 2},
+       {utc_tel_set_network_roaming_03, 3},
+       {utc_tel_set_network_roaming_04, 4},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+void callback(TelTapiEvent_t *event)
+{
+       if (event->EventClass != TAPI_EVENT_CLASS_NETWORK)
+               return;
+
+       if (event->EventType == TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF) {
+               printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF $$$$$$ \n");
+       }
+
+}
+
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_set_network_roaming, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF, &subscription_id1, (TelAppCallback) &callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_set_network_roaming, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+ Unit Test Case functions
+ */
+
+/**
+ * @brief This tests tel_set_network_roaming() API in normal conditions
+ * @par ID:
+ * utc_tel_tapi_nw_set_network_mode_func_01
+ * @param [in] NwMode
+ * @code
+
+ RoamingMode = TAPI_NETWORK_MODE_EMERGENCY;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_roaming_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkRoamingMode_t RoamingMode;
+       int pRequestId;
+
+       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC;
+       RoamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_roaming_01 Test\n");
+
+       ret_val = tel_set_network_roaming(&RoamingMode, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_roaming_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_roaming() API in normal conditions
+ * @par ID:
+ * utc_tel_tapi_nw_set_network_mode_func_02
+ * @param [in] NwMode
+ * @code
+
+ //RoamingMode = TAPI_NETWORK_MODE_AUTOMATIC;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_roaming_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkRoamingMode_t RoamingMode;
+       int pRequestId;
+
+       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A;
+       RoamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_roaming_02 Test\n");
+
+       ret_val = tel_set_network_roaming(&RoamingMode, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_roaming_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_roaming() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_roaming_03
+ * @param [in] NwMode
+ * @code
+
+ //NwMode = TAPI_NETWORK_MODE_CDMA;
+ pRequestId = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_network_roaming_03()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkRoamingMode_t RoamingMode;
+       int pRequestId;
+
+       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY;
+       RoamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_NONE + 1;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_roaming_03 Test\n");
+
+       ret_val = tel_set_network_roaming(&RoamingMode, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_tapi_nw_set_network_mode_func_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_roaming() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_roaming_04
+ * @param [in] NwMode
+ * @code
+
+               //RoamingMode = TAPI_NETWORK_MODE_GSM;
+               pRequestId = -1;
+
+* @endcode
+* @param [out] pRequestId
+* @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+*/
+void utc_tel_set_network_roaming_04()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkRoamingMode_t RoamingMode;
+       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY;
+       RoamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+
+       //RoamingMode = TAPI_NETWORK_MODE_GSM;
+
+       tet_infoline("utc_tel_set_network_roaming_04 Test\n");
+
+       ret_val = tel_set_network_roaming(&RoamingMode, NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, ret_val);
+       if (ret_val == TAPI_API_INVALID_PTR) {
+               tet_infoline("utc_tel_set_network_roaming_04 is passed\n");
+               tet_result(TET_PASS);
+       }
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_roaming.h b/TC/telephony_TC/network/unit/uts_tel_set_network_roaming.h
new file mode 100644 (file)
index 0000000..3f349a7
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+static void utc_tel_set_network_roaming_01(void);\r
+static void utc_tel_set_network_roaming_02(void);\r
+static void utc_tel_set_network_roaming_03(void);\r
+static void utc_tel_set_network_roaming_04(void);\r
+\r
+\r
+\r
+/** @} */\r
+\r
+\r
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.c b/TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.c
new file mode 100644 (file)
index 0000000..05f4fd7
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiNetwork.h>
+
+#include "tel_tapi_nw_common.h"
+#include "uts_tel_set_network_service_domain.h"
+
+TS_UINT subscription_id = 0, subscription_id1 = 0;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_network_service_domain_01, 1},
+       {utc_tel_set_network_service_domain_02, 2},
+       {utc_tel_set_network_service_domain_03, 3},
+       {utc_tel_set_network_service_domain_04, 4},
+       {utc_tel_set_network_service_domain_05, 5},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       tet_infoline("utc_tel_set_network_service_domain, Test Start\n");
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("tel_init Failed api_err = %d \n", api_err);
+       }
+
+       api_err = tel_register_event(TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF, &subscription_id1, tapi_callback, NULL);
+       if (api_err != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed api_err = %d \n", api_err);
+       }
+       printf("after TapiCommonRegisterEvent sub id is %d api_err is %d\n", subscription_id1, api_err);
+
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_set_network_service_domain, Test Finished\n");
+       tel_deregister_event(subscription_id1);
+       tel_deinit();
+       return;
+}
+
+
+/*
+ Unit Test Case functions
+ */
+
+/**
+ * @brief This tests tel_set_network_service_domain() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_service_domain_01
+ * @param [in] ServiceDomain
+ * @code
+
+ pRequestId = -1;
+ ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_COMBINED;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_service_domain_01()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkServiceDomain_t ServiceDomain;
+       int pRequestId;
+       pRequestId = -1;
+       ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_COMBINED;
+
+       tet_infoline("utc_tel_set_network_service_domain_01 Test\n");
+
+       ret_val = tel_set_network_service_domain(ServiceDomain, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_service_domain_01 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_service_domain() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_service_domain_02
+ * @param [in] ServiceDomain
+ * @code
+
+ pRequestId = -1;
+ ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_PS;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_service_domain_02()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkServiceDomain_t ServiceDomain;
+       int pRequestId;
+       pRequestId = -1;
+       ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_PS;
+
+       tet_infoline("utc_tel_set_network_service_domain_02 Test\n");
+
+       ret_val = tel_set_network_service_domain(ServiceDomain, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_service_domain_02 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_service_domain() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_service_domain_03
+ * @param [in] ServiceDomain
+ * @code
+
+ pRequestId = -1;
+ ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_CS;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_service_domain_03()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkServiceDomain_t ServiceDomain;
+       int pRequestId;
+       pRequestId = -1;
+       ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_CS;
+
+       tet_infoline("utc_tel_set_network_service_domain_03 Test\n");
+
+       ret_val = tel_set_network_service_domain(ServiceDomain, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_service_domain_03 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_service_domain() API in normal conditions
+ * @par ID:
+ * utc_tel_set_network_service_domain_04
+ * @param [in] ServiceDomain
+ * @code
+
+ pRequestId = -1;
+ ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_service_domain_04()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkServiceDomain_t ServiceDomain;
+       int pRequestId;
+       pRequestId = -1;
+       ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+
+       tet_infoline("utc_tel_set_network_service_domain_04 Test\n");
+
+       ret_val = tel_set_network_service_domain(ServiceDomain, &pRequestId);
+       TET_CHECK(TAPI_API_SUCCESS, ret_val);
+
+       tet_infoline("utc_tel_set_network_service_domain_04 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_network_service_domain() API with invalid input
+ * @par ID:
+ * utc_tel_set_network_service_domain_05
+ * @param [in] ServiceDomain
+ * @code
+
+ pRequestId = -1;
+ ServiceDomain = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+ */
+void utc_tel_set_network_service_domain_05()
+{
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       TelNetworkServiceDomain_t ServiceDomain;
+       ServiceDomain = -1;
+       int pRequestId;
+       pRequestId = -1;
+
+       tet_infoline("utc_tel_set_network_service_domain_05 Test\n");
+
+       ret_val = tel_set_network_service_domain(ServiceDomain, &pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, ret_val);
+
+       tet_infoline("utc_tel_set_network_service_domain_05 is passed\n");
+       tet_result(TET_PASS);
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.h b/TC/telephony_TC/network/unit/uts_tel_set_network_service_domain.h
new file mode 100644 (file)
index 0000000..345833d
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+static void utc_tel_set_network_service_domain_01(void);\r
+static void utc_tel_set_network_service_domain_02(void);\r
+static void utc_tel_set_network_service_domain_03(void);\r
+static void utc_tel_set_network_service_domain_04(void);\r
+static void utc_tel_set_network_service_domain_05(void);\r
+\r
+\r
+/** @} */\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/power/unit/makefile b/TC/telephony_TC/power/unit/makefile
new file mode 100644 (file)
index 0000000..4265475
--- /dev/null
@@ -0,0 +1,54 @@
+CC=gcc -Wall
+
+LB1  =  power_common
+TS1  =  uts_tel_process_power_command
+TS2  =  uts_tel_set_flight_mode
+TS3  =  uts_tapi_power_reboot_modem
+TS4  =  
+TS5  =   
+TS6  =  
+TS7  =  
+
+LIBS =$(LB1).o
+LIBS += `pkg-config --libs  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi` 
+LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s
+
+INCS  += -I$(TET_ROOT)/inc/tet3 
+INCS  +=  -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+CFLAGS = $(INCS) -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DWITHOUT_APP_MGR 
+CFLAGS += -D_TETWARE_MODE_ -D_XO_TELEPHONY_INTEGRATION_
+CFLAGS += -DXO20_EVENT_DELIVERY_MODIFICATION
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+
+all : $(LB1)  $(TS1)  $(TS2) $(TS3)  $(TS4)  $(TS5)  $(TS6) $(TS7)
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(LB1)  $(TS1)  $(TS2) $(TS3)  $(TS4)  $(TS5)  $(TS6) $(TS7)
+
+$(LB1): $(LB1).c
+       $(CC) -c $(LB1).c
+
+
+$(TS1): $(TS1).c $(LB1)
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS)
+$(TS2): $(TS2).c $(LB1)
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS)
+$(TS3): $(TS3).c $(LB1)
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS)
+$(TS4): $(TS4).c $(LB1)
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS)
+$(TS5): $(TS5).c $(LB1)
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS)
+$(TS6): $(TS6).c $(LB1)
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS)
+$(TS7): $(TS7).c $(LB1)
+       $(CC) -o $(TS7) $(TS7).c  $(LDFLAGS)
+
diff --git a/TC/telephony_TC/power/unit/power_common.c b/TC/telephony_TC/power/unit/power_common.c
new file mode 100644 (file)
index 0000000..abb7301
--- /dev/null
@@ -0,0 +1,229 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "power_common.h"
+#include <TapiCommon.h>
+#define TIME_DELAY 5000
+GMainLoop *g_main_loop = NULL;
+
+static unsigned int subscription_id[5]={0,0,0,0,0};
+int expected_event;
+bool async_response = false;
+
+
+void G_MAIN_LOOP_CLOSE()
+{
+       g_main_loop_quit(g_main_loop);
+}
+
+gboolean g_timeout_callback(void * data)
+{
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       g_main_loop = g_main_loop_new(NULL, FALSE);
+       g_timeout_add_seconds(sec, g_timeout_callback, NULL);
+       g_main_loop_run(g_main_loop);
+
+       return 0;
+}
+
+void print_events(int event) {
+
+       printf("\n event in prnt_events function %d\n", event);
+
+       switch (event) {
+       case TAPI_EVENT_NETTEXT_GET_COUNT_CNF: /**<     This event is returned in response to Get Number of messages stored in SIM*/
+       case TAPI_EVENT_NETTEXT_SENTSTATUS_CNF: /**<    This event is returned in response to SMS  message sent*/
+       case TAPI_EVENT_NETTEXT_GET_PARAM_CNF: /**<     This event is returned in response to NetText Get parameters*/
+       case TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF: /**< This confirmation event is a returned indicating the delete message e status*/
+       case TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF: /**<   This confirmation event is a returned indicating the Save SMS into SIM status*/
+       case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF: /**<   This event is returned as a confirmation for SET nettext APIs*/
+       case TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF: /**< This event is returned with Get CB configuration details*/
+       case TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF: /**< This event is returned as a response to get preferred bearer used for SMS Transport*/
+       case TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF:/**<        This event is returned in response to send delivery report*/
+       case TAPI_EVENT_NETTEXT_INCOM_IND: /**< This is an unsolicited Incoming SMS Event*/
+       case TAPI_EVENT_NETTEXT_CB_INCOM_IND: /**<      This is an unsolicited Incoming cell broadcast message*/
+       case TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND: /**< This event is an unsolicited event indicating SIM memory status */
+       case TAPI_EVENT_NETTEXT_DEVICE_READY_IND: /**< Device Ready indication */
+       case TAPI_EVENT_NETTEXT_PARAM_COUNT_IND: /**< Param count indication */
+               /* Events related on Network Messages  */
+       case TAPI_EVENT_NETWORK_GETNWBAND_CNF: //=  TAPI_EVENT_CLASS_NETWORK<<8:                /**<0x0300:     This event indicates the Network Band has been identified and returned*/
+       case TAPI_EVENT_NETWORK_SETNWBAND_CNF: /**<     This event indicates the Network Band has been set*/
+       case TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF: /**<      This event confirms the request to get the service domain */
+       case TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF: /**<      This event confirms the request to set the service domain */
+       case TAPI_EVENT_NETWORK_CANCELMANUALSELECTION_CNF: /**< This event is returned on cancellation of manual network selection from network list*/
+       case TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF: /**<    This event is returned on cancellation of manual network search*/
+       case TAPI_EVENT_NETWORK_GETNWORDER_CNF: /**<    This event is returned on getting network order*/
+       case TAPI_EVENT_NETWORK_SETNWORDER_CNF: /**<    This event is returned on setting network order*/
+       case TAPI_EVENT_NETWORK_GETNWMODE_CNF:/**<      This event is returned on getting network mode*/
+       case TAPI_EVENT_NETWORK_SETNWMODE_CNF: /**<     This event is returned on setting network mode*/
+       case TAPI_EVENT_NETWORK_SELECT_CNF: /**<        This confirmation event is returned when user manually selected a network from list for Network selection */
+       case TAPI_EVENT_NETWORK_SEARCH_CNF: /**<        This event is returned as confirmation for manual Network search with the available network list*/
+       case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF: /**<      This event is returned on getting network selection mode*/
+       case TAPI_EVENT_SS_BARRING_CNF: //=  TAPI_EVENT_CLASS_SS<<8:   /**<0x0400:      This confirmation event is sent when Barring activation/deactivation is requested*/
+       case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF: /**< This event is returned as Barring password change confirmation*/
+       case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF: /**<        This event is returned  as Barring status query confirmation*/
+       case TAPI_EVENT_SS_FORWARD_CNF: /**<    This event is returned as confirmation for Forward Activation/Deactivation/Registration/Erasure */
+       case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF: /**<        This event is returned as confirmation for Forward Status query confirmation*/
+       case TAPI_EVENT_SS_WAITING_CNF: /**<    This event is returned as confirmation for Call waiting activation/deactivation*/
+       case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF: /**<        This event is returned as Call waiting status query confirmation*/
+       case TAPI_EVENT_SS_USSD_CNF: /**<       This event is returned as USSD send confirmation*/
+       case TAPI_EVENT_SS_USSD_IND: /**<       This is an unsolicited USSD indication*/
+       case TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF: /**<    This event is indicated to the Application for CLI service interrogation*/
+       case TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY: /**<    This event is indicated to the Application when tapi receives Release complete message notification for any SS transactions*/
+       case TAPI_EVENT_SS_AOC_RSP: /**<This event is used to send the aoc information */
+       case TAPI_EVENT_SS_SET_AOC_CNF: /**<This event is used to send the confirmation for setting aoc values */
+       case TAPI_EVENT_SS_BARRING_TYPE_IND: /**<This event is used to send the barring type while making an MO call */
+       {
+               printf("here sound starts");
+               break;
+       }
+#if 0
+               case TAPI_EVENT_SOUND_VOLUMECTRL_RSP ://=  TAPI_EVENT_CLASS_SOUND<<8:         /**<     */
+               case TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP: /**<     */
+               case TAPI_EVENT_SOUND_ERROR_IND: /**<     */
+               case TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI: /**<     */
+               case TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI: /**<     */
+               case TAPI_EVENT_SOUND_MICMUTECTRL_RSP: /**<     */
+               case TAPI_EVENT_SOUND_MICGAINCTRL_RSP: /**<     */
+#endif
+               /*SAT events*/
+#if 0
+               case TAPI_IMEI_CMLAIND ://=  TAPI_EVENT_CLASS_IMEI<<8:          /**<0x0E00:*/
+               {
+                       printf("here TAPI_IMEI_CMLAIND starts");
+                       break;
+               }
+               case TAPI_IMEI_COMPAREITEM: /**<     */
+               {
+                       printf("here TAPI_IMEI_COMPAREITEM starts");
+                       break;
+               }
+#endif
+#if 0
+               case TAPI_GPS_EVENT_START_SESSION_RESP: //=  TAPI_EVENT_CLASS_GPS<<8:           /**<0x0F00:     Start session response event type.              */
+               case TAPI_GPS_EVENT_OPTION_SET_RESP: /**<       GPS option set response  event type.            */
+#if 0 //remove_telephony_dpram_read
+               case TAPI_GPS_EVENT_NMEA_DATA_IND: /**< NMEA Data indication event type.                */
+#endif
+               case TAPI_GPS_EVENT_CLOSE_SESSION_RESP: /**<    Close session response event type */
+
+               case TAPI_GPS_EVENT_XTRA_ENABLE_SET_RESP: /**<     */
+               case TAPI_GPS_EVENT_XTRA_AUTODL_ENABLE_SET_RESP: /**<     */
+               case TAPI_GPS_EVENT_XTRA_CLIENT_INIT_DL_RESP: /**<     */
+               case TAPI_GPS_EVENT_XTRA_SET_TIME_INFO_RESP: /**<     */
+               case TAPI_GPS_EVENT_XTRA_QUERY_DATA_VALIDITY_RESP: /**<     */
+
+               case TAPI_GPS_EVENT_AGPS_SSL_SET_RESP: /**<     */
+               case TAPI_GPS_EVENT_AGPS_BEARER_SET_RESP: /**<     */
+
+               case TAPI_GPS_EVENT_XTRA_TIME_NOTI: /**<        XTRA Time info notification event type.         */
+               case TAPI_GPS_EVENT_XTRA_DOWNLOAD_NOTI: /**<    XTRA  download data notification event type.            */
+               case TAPI_GPS_EVENT_XTRA_DATA_VALIDITY_NOTI: /**<       XTRA  DATA Validity notification.               */
+               case TAPI_GPS_EVENT_XTRA_QUERY_DATA_VALIDITY_NOTI: /**< XTRA  DATA Validity notification for the Query.         */
+               case TAPI_GPS_EVENT_XTRA_DATA_INJECTION_NOTI: /**<      XTRA  DATA Status injection notification.               */
+
+               case TAPI_GPS_EVENT_AGPS_PDP_CONNECTION_IND: /**<       .               */
+
+               case TAPI_GPS_EVENT_AGPS_SSL_GET_RESPONSE: /**<     */
+
+               case TAPI_GPS_EVENT_DEVSTATE_NOTI: /**< Device state notification event type .          */
+               case TAPI_GPS_EVENT_DEVSTATE_RESP: /**< Device state response type.             */
+               case TAPI_GPS_EVENT_VERIFICATION_IND: /**<      Verification indication event type.             */
+               case TAPI_GPS_EVENT_SUPL_NOTI: /**<     SUPL Notification event type .          */
+#endif
+
+               /*      All please add your events if any: above this one       */
+       case TAPI_EVENT_TYPE_MAX:/**< Event Max */
+       {
+               printf("here max starts");
+               break;
+       }
+
+       default: {
+               printf("\n in the default case of print_events \n");
+               break;
+       }
+       }
+}
+
+void power_app_callback(TelTapiEvent_t *TapiEvent) {
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = TapiEvent->pData;
+       printf(" app _callback is called \n");
+
+       print_events((int) eventType);
+       printf("\n event came in power_callback [%d] \n", eventType);
+       printf("\n expected event is  in callback [%d] \n", expected_event);
+
+       switch (eventClass) {
+       default:
+               TEST_DEBUG("##Undefined Power Event received")
+               ;
+               break;
+       }
+
+       if (eventType == expected_event) {
+               g_main_loop_quit(g_main_loop);
+               async_response = true;
+       }
+       return;
+}
+
+void print_all_subsciption_ids() {
+       int i = 0;
+       for (i = 0; i < 2; i++) {
+               printf("\n subscription_id[%d] has value %d \n", i, subscription_id[i]);
+       }
+}
+
+TapiResult_t register_all_events() {
+       TapiResult_t api_err = -1;
+
+       api_err = tel_register_event(TAPI_EVENT_POWER_FLIGHT_MODE_RESP,
+                       &subscription_id[0], (TelAppCallback) &power_app_callback, NULL);
+       api_err = tel_register_event(TAPI_EVENT_POWER_PHONE_OFF,
+                       &subscription_id[1], (TelAppCallback) &power_app_callback, NULL);
+
+       print_all_subsciption_ids();
+       return api_err;
+}
+
+TapiResult_t deregister_all() {
+       TapiResult_t api_err = -1;
+
+       api_err = tel_deregister_event(subscription_id[0]);
+       api_err = tel_deregister_event(subscription_id[1]);
+       return api_err;
+
+}
diff --git a/TC/telephony_TC/power/unit/power_common.h b/TC/telephony_TC/power/unit/power_common.h
new file mode 100644 (file)
index 0000000..ecbb8dc
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _POWER_COMMON_H_
+#define _POWER_COMMON_H_
+
+#include <stdlib.h>
+#include <signal.h>
+#include <errno.h>
+#include "string.h"
+#include "assert.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <glib.h>
+#include <pthread.h>
+#include <stdio.h>
+
+#include <TapiEvent.h>
+#include <ITapiPower.h>
+#include <TelPower.h>
+#include <tet_api.h>
+#include "tet_macro.h"
+#include <TapiCommon.h>
+
+#define TIME_DELAY 5000
+#define TEST_DEBUG(fmt, args...)       \
+       printf("[%s %s:%d]\n" fmt "\n",__FILE__, __FUNCTION__,  __LINE__, ##args); 
+
+
+#ifndef false
+       #define false 0
+#endif
+#ifndef true
+       #define true  !0
+#endif
+#ifndef bool    
+       #define bool  char
+#endif
+
+extern void  power_app_callback  (TelTapiEvent_t *TapiEvent);
+void print_events(int event);
+extern TapiResult_t register_all_events();
+extern TapiResult_t deregister_all();
+extern void G_MAIN_LOOP_CLOSE();
+extern int G_MAIN_LOOP_RUN(int);
+
+
+#define TET_CHECK_TEMP(x1, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,y); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+
+
+#endif  //_POWER_COMMON_H_
diff --git a/TC/telephony_TC/power/unit/tet_macro.h b/TC/telephony_TC/power/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..9c5909e
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TET_MACRO_H
+#define TET_MACRO_H
+
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);} 
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+
+#endif
diff --git a/TC/telephony_TC/power/unit/tslist b/TC/telephony_TC/power/unit/tslist
new file mode 100644 (file)
index 0000000..2a67ad5
--- /dev/null
@@ -0,0 +1,8 @@
+#/power/unit/uts_tel_process_power_command
+#/power/unit/uts_tapi_power_get_phone_power_status
+/power/unit/uts_tel_set_flight_mode
+/power/unit/uts_tapi_power_reboot_modem
+#/power/unit/uts_tapi_display_get_icon_info
+#/power/unit/uts_tapi_power_battery_compansation_set
+#/power/unit/uts_tapi_power_charger_indication_set
+
diff --git a/TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.c b/TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.c
new file mode 100644 (file)
index 0000000..7e6c0b6
--- /dev/null
@@ -0,0 +1,321 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "uts_tapi_display_get_icon_info.h"
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_display_get_icon_info_00, 1},
+       {utc_tapi_display_get_icon_info_01, 2},
+       {utc_tapi_display_get_icon_info_02, 3},
+       {utc_tapi_display_get_icon_info_03, 4},
+       {utc_tapi_display_get_icon_info_04, 5},
+       {NULL, 0}
+       };
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)      
+               {       
+                       printf("TelTapiInit() Failed ret_status = %d \n",ret_status);   
+               }
+
+       register_all_events();
+
+       tel_register_app_name("org.samsung.test");
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+
+       deregister_all();       
+       ret_status = tel_deinit();
+
+       
+       if(ret_status != TAPI_API_SUCCESS)      
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n",ret_status); 
+       }
+}
+
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: utc_tapi_display_get_icon_info_00
+ * @param [in]  tapi_display_get_icon_req_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_display_get_icon_info_00()
+{
+
+
+               TEST_DEBUG("\n TEST utc_tapi_display_get_icon_info_00 \n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tapi_display_get_icon_info(TAPI_DISPLAY_GET_ICON_RSSI);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  get icon  info api successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get icon  info api   case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_display_get_icon_info_00 pass");
+               expected_event = TAPI_EVENT_DISPLAY_ICON_INFO_IND;
+               printf("The expected_event is TAPI_EVENT_DISPLAY_ICON_INFO_IND(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_00 ENDS    ###########\n");
+
+
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: utc_tapi_display_get_icon_info_01
+ * @param [in]  tapi_display_get_icon_req_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_display_get_icon_info_01()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_01 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tapi_display_get_icon_info(TAPI_DISPLAY_GET_ICON_ACT);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  get icon  info api successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get icon  info api   case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_display_get_icon_info_01 pass");
+               expected_event = TAPI_EVENT_DISPLAY_ICON_INFO_IND;
+               printf("The expected_event is TAPI_EVENT_DISPLAY_ICON_INFO_IND(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_01 ENDS    ###########\n");
+
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: utc_tapi_display_get_icon_info_02
+ * @param [in]  tapi_display_get_icon_req_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_display_get_icon_info_02()
+{
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_02 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tapi_display_get_icon_info(TAPI_DISPLAY_GET_ICON_ALL);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  get icon  info api successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get icon  info api   case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_display_get_icon_info_02 pass");
+               expected_event = TAPI_EVENT_DISPLAY_ICON_INFO_IND;
+               printf("The expected_event is TAPI_EVENT_DISPLAY_ICON_INFO_IND(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_02 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: utc_tapi_display_get_icon_info_03
+ * @param [in]  tapi_display_get_icon_req_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_display_get_icon_info_03()
+{
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_03 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tapi_display_get_icon_info(TAPI_DISPLAY_GET_ICON_RSSI - 1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  get icon  info api invalid input case successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get icon  info api invalid input case failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tapi_display_get_icon_info_03 pass");
+expected_event = TAPI_EVENT_DISPLAY_ICON_INFO_IND;
+printf("The expected_event is TAPI_EVENT_DISPLAY_ICON_INFO_IND(%d)\n",expected_event);
+
+G_MAIN_LOOP_RUN(10);
+tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_03 ENDS    ###########\n");
+
+
+}
+
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: utc_tapi_display_get_icon_info_04
+ * @param [in]  tapi_display_get_icon_req_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_display_get_icon_info_04()
+{
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_04 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tapi_display_get_icon_info(TAPI_DISPLAY_GET_ICON_ALL + 1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  get icon  info api invalid input case successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get icon  info api invalid input case failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tapi_display_get_icon_info_04 pass");
+       expected_event = TAPI_EVENT_DISPLAY_ICON_INFO_IND;
+       printf("The expected_event is TAPI_EVENT_DISPLAY_ICON_INFO_IND(%d)\n",expected_event);
+
+G_MAIN_LOOP_RUN(10);
+       tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_display_get_icon_info_04 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.h b/TC/telephony_TC/power/unit/uts_tapi_display_get_icon_info.h
new file mode 100644 (file)
index 0000000..e067040
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+
+
+/**
+* @file    uts_tapi_display_get_icon_info.h
+* @brief       This is a suite of unit test cases to test Telephony Power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+#include "power_common.h"
+
+
+#ifndef  _UTC_TAPI_POWER_DISPLAY_GET_INFO_
+#define  _UTC_TAPI_POWER_DISPLAY_GET_INFO_
+
+
+void utc_tapi_display_get_icon_info_00();
+
+void utc_tapi_display_get_icon_info_01();
+
+void utc_tapi_display_get_icon_info_02();
+
+void utc_tapi_display_get_icon_info_03();
+
+void utc_tapi_display_get_icon_info_04();
+
+static void startup();
+
+static void cleanup();
+
+
+
+
+#endif  //_UTC_TAPI_POWER_DISPLAY_GET_INFO_
diff --git a/TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.c b/TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.c
new file mode 100644 (file)
index 0000000..c8a70b2
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/** 
+* @ingroup Telephony_API TelephonyAPI
+* @addtogroup POWER power
+*/
+
+/**
+* @ingroup  POWER power
+* @addtogroup UTS_POWER Unit
+*/
+
+/**
+* @ingroup  UTS_POWER Unit
+* @addtogroup UTS_TAPI_POWER_GET_PHONE_POWER_STATUS tapi_power_get_phone_power_status
+* @{
+*/
+
+
+
+/**
+* @file    tapi_power_get_phone_power_status.c
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+//add includes
+
+
+#include "uts_tapi_power_get_phone_power_status.h"
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern TelTapiEventType_t expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+
+
+       ret_status = TelTapiInit();
+
+       if(ret_status != TAPI_API_SUCCESS)      
+               {       
+                       printf("TelTapiInit() Failed ret_status = %d \n",ret_status);   
+               }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+
+       deregister_all();       
+       ret_status = TelTapiDeInit();
+
+       
+       if(ret_status != TAPI_API_SUCCESS)      
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n",ret_status); 
+       }
+}
+
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_GET_PHONE_POWER_STATUS_00
+ * @param [out]  tapi_power_phone_power_status_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_get_phone_power_status_00()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_get_phone_power_status_00 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               tapi_power_phone_power_status_t status = 0; 
+       
+               ret_status = tapi_power_get_phone_power_status(&status);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  get power mode api successfully **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get power mode api  not started **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_power_get_phone_power_status_00 pass");
+               expected_event = TAPI_EVENT_POWER_BATT_STAT_IND;
+               printf("The expected_event is TAPI_EVENT_POWER_BATT_STAT_IND(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+       //      TET_CHECK_TEMP(true, async_response);   
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_get_phone_power_status_00 ENDS    ###########\n");
+
+
+
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_GET_PHONE_POWER_STATUS_01
+ * @param [out]  tapi_power_phone_power_status_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_get_phone_power_status_01()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_get_phone_power_status_01 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               tapi_power_phone_power_status_t status = 0; 
+       
+               ret_status = tapi_power_get_phone_power_status(NULL);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_PTR == ret_status)
+               {
+                       printf("/n/******************  get power mode api null case successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************    get power mode api  null case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_PTR, ret_status);
+               tet_infoline("utc_tapi_power_get_phone_power_status_01 pass");
+       //      expected_event = TAPI_EVENT_POWER_BATT_STAT_IND;
+       //      printf("The expected_event is TAPI_EVENT_POWER_BATT_STAT_IND(%d)\n",expected_event);
+
+               //G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               //tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_get_phone_power_status_01 ENDS    ###########\n");
+
+
+}
+
+
+
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.h b/TC/telephony_TC/power/unit/uts_tapi_power_get_phone_power_status.h
new file mode 100644 (file)
index 0000000..9ed556d
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @file    uts_tapi_power_get_phone_power_status.h
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+#include "power_common.h"
+#include <TapiCommon.h>
+
+#ifndef  _UTC_TAPI_POWER_STATUS_
+#define  _UTC_TAPI_POWER_STATUS_
+
+
+
+void utc_tapi_power_get_phone_power_status_00();
+
+void utc_tapi_power_get_phone_power_status_01();
+
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_power_get_phone_power_status_00, 1},
+       {utc_tapi_power_get_phone_power_status_01, 2},
+       {NULL, 0}
+       };
+
+
+
+#endif  //_UTC_TAPI_POWER_STATUS_
diff --git a/TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.c b/TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.c
new file mode 100644 (file)
index 0000000..85fec1f
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/** 
+* @ingroup Telephony_API TelephonyAPI
+* @addtogroup POWER power
+*/
+
+/**
+* @ingroup  POWER power
+* @addtogroup UTS_POWER Unit
+*/
+
+/**
+* @ingroup  UTS_POWER Unit
+* @addtogroup UTS_TAPI_POWER_FLIGHT_MODE tapi_power_flight_mode
+* @{
+*/
+
+
+
+//add includes
+
+
+#include "uts_tapi_power_reboot_modem.h"
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)      
+               {       
+                       printf("TelTapiInit() Failed ret_status = %d \n",ret_status);   
+               }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+
+       deregister_all();       
+       ret_status = tel_deinit();
+
+       
+       if(ret_status != TAPI_API_SUCCESS)      
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n",ret_status); 
+       }
+}
+
+
+
+
+void utc_tapi_power_reboot_modem_01()
+{
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_reboot_modem_01 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               
+               ret_status = tel_reset_modem();
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  reboot modem api successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   reboot modem api  case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_power_reboot_modem pass");
+
+               G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_reboot_modem 01 ENDS    ###########\n");
+
+
+}
+
+void utc_tapi_power_reboot_modem_02()
+{
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_reboot_modem_02 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+               tel_init();     
+       //Calling rebooting of Modem after DeInitializing of Tapi       
+               ret_status = tel_reset_modem();
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS != ret_status)
+               {
+                       printf("/n/******************  reboot modem invalid api successful **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   reboot modem api  case  failed **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_power_reboot_modem pass");
+
+               G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_reboot_modem 01 ENDS    ###########\n");
+
+
+}
diff --git a/TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.h b/TC/telephony_TC/power/unit/uts_tapi_power_reboot_modem.h
new file mode 100644 (file)
index 0000000..8d4af3b
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "power_common.h"
+
+
+#ifndef  _UTC_TAPI_POWER_REBOOT_MODEM_
+#define  _UTC_TAPI_POWER_REBOOT_MODEM_
+
+
+void utc_tapi_power_reboot_modem_01();
+void utc_tapi_power_reboot_modem_02();
+
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_power_reboot_modem_01, 1},
+       {utc_tapi_power_reboot_modem_02, 2},
+       {NULL, 0}
+       };
+
+
+
+#endif  //_UTC_TAPI_POWER_FLIGHT_MODE_
diff --git a/TC/telephony_TC/power/unit/uts_tel_process_power_command.c b/TC/telephony_TC/power/unit/uts_tel_process_power_command.c
new file mode 100644 (file)
index 0000000..a7ce88d
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/** 
+* @ingroup Telephony_API TelephonyAPI
+* @addtogroup POWER power
+*/
+
+/**
+* @ingroup  POWER power
+* @addtogroup UTS_POWER Unit
+*/
+
+/**
+* @ingroup  UTS_POWER Unit
+* @addtogroup UTS_tel_process_power_command tel_process_power_command
+* @{
+*/
+
+
+
+/**
+* @file    uts_tel_process_power_command.c
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+//add includes
+
+
+#include "uts_tel_process_power_command.h"
+
+#include "/usr/include/telephony/sec-ext/tapi/include/ITapiPower.h"
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+
+
+       ret_status = tel_init();
+
+       if(ret_status != TAPI_API_SUCCESS)      
+               {       
+                       printf("TelTapiInit() Failed ret_status = %d \n",ret_status);   
+               }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+
+       deregister_all();       
+       ret_status = tel_deinit();
+
+       
+       if(ret_status != TAPI_API_SUCCESS)      
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n",ret_status); 
+       }
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_tel_process_power_command_00
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tel_process_power_command_00()
+{
+
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_00 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tel_process_power_command(TAPI_PHONE_POWER_OFF);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  power on off mode Started successfully **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode not started **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tel_process_power_command_00 pass");
+               expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_00 ENDS    ###########\n");
+
+
+
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_tel_process_power_command_01
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tel_process_power_command_01()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_01 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+               tel_process_power_command(TAPI_PHONE_POWER_OFF);
+               sleep(5);
+               ret_status = tel_process_power_command(TAPI_PHONE_POWER_ON);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status  ||  TAPI_API_MODEM_ALREADY_ON == ret_status)
+               {
+                       printf("/n/******************  power on off mode Started successfully **************************\\n");
+                       tet_result(TET_PASS);
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode not started **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tel_process_power_command_01 pass");
+               expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+               printf("\n\n value of asyn_response %d",async_response);
+
+               G_MAIN_LOOP_RUN(10);
+       //      TET_CHECK_TEMP(true, async_response);   
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_01 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_tel_process_power_command_02
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tel_process_power_command_02()
+{
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_02 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tel_process_power_command(TAPI_PHONE_POWER_OFF -1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  power on off mode invalid input pass **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode  invalid input case failed  **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tel_process_power_command_02 pass");
+               //expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               //printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               //G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               //tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_02 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_tel_process_power_command_03
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tel_process_power_command_03()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_03 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tel_process_power_command(TAPI_PHONE_POWER_ON +1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  power on off mode invalid input pass **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode  invalid input case failed  **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tel_process_power_command_03 pass");
+               //expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               //printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               //G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               //tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_process_power_command_03 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/power/unit/uts_tel_process_power_command.h b/TC/telephony_TC/power/unit/uts_tel_process_power_command.h
new file mode 100644 (file)
index 0000000..c581f1d
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @file    uts_tel_process_power_command.h
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+#include "power_common.h"
+
+
+#ifndef  _UTC_TAPI_POWER_ONOFF_
+#define  _UTC_TAPI_POWER_ONOFF_
+
+
+
+void utc_tel_process_power_command_00();
+
+
+
+void utc_tel_process_power_command_01();
+
+
+
+void utc_tel_process_power_command_02();
+
+
+
+void utc_tel_process_power_command_03();
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_process_power_command_00, 1},
+       {utc_tel_process_power_command_01, 2},
+       {utc_tel_process_power_command_02, 3},
+       {utc_tel_process_power_command_03, 4},
+       {NULL, 0}
+       };
+
+
+
+#endif  //_UTC_TAPI_POWER_ONOFF_
diff --git a/TC/telephony_TC/power/unit/uts_tel_set_flight_mode.c b/TC/telephony_TC/power/unit/uts_tel_set_flight_mode.c
new file mode 100644 (file)
index 0000000..f04aff0
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/** 
+ * @ingroup Telephony_API TelephonyAPI
+ * @addtogroup POWER power
+ */
+
+/**
+ * @ingroup  POWER power
+ * @addtogroup UTS_POWER Unit
+ */
+
+/**
+ * @ingroup  UTS_POWER Unit
+ * @addtogroup UTS_TAPI_POWER_FLIGHT_MODE tel_set_flight_mode
+ * @{
+ */
+
+/**
+ * @file    uts_tel_set_flight_mode.c
+ * @brief      This is a suite of unit test cases to test Telephony power API function
+ * @author     Sagar Aggarwal  (a.sagar@samsung.com)
+ * @version    Initial Creation
+ * @date               [2009-05-13]
+ */
+
+#include "uts_tel_set_flight_mode.h"
+#include "ITapiPower.h"
+
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+
+extern int expected_event;
+extern bool async_response;
+
+static void startup() {
+       TapiResult_t ret_status;
+
+       ret_status = tel_init();
+
+       if (ret_status != TAPI_API_SUCCESS) {
+               printf("TelTapiInit() Failed ret_status = %d \n", ret_status);
+       }
+
+       register_all_events();
+       tel_register_app_name("org.samsung.test");
+
+}
+
+static void cleanup() {
+       TapiResult_t ret_status;
+
+       deregister_all();
+       ret_status = tel_deinit();
+
+       if (ret_status != TAPI_API_SUCCESS) {
+               printf("TelTapiDeInit() Failed ret_status = %d \n", ret_status);
+       }
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_FLIGHT_MODE_00
+ * @param [in]  tel_set_flight_mode_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+ */
+
+void utc_tel_set_flight_mode_00() {
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_00 START    ###########\n");
+
+       TapiResult_t ret_status;
+
+       async_response = false;//initialize
+
+       ret_status = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_ENTER);
+
+       printf("/n return value = %d\n", ret_status);
+
+       if (TAPI_API_SUCCESS == ret_status) {
+               printf(
+                               "/n/******************  set flight mode api successful **************************\\n");
+       } else {
+               printf(
+                               "/n/******************     set flight mode api  case  failed **************************\\n");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status)
+               ;
+       tet_infoline("utc_tel_set_flight_mode_00 pass");
+       expected_event = TAPI_EVENT_POWER_FLIGHT_MODE_RESP;
+       printf("The expected_event is TAPI_EVENT_POWER_FLIGHT_MODE_RESP(%d)\n",
+                       expected_event);
+
+       printf("\n\n value of asyn_response %d", async_response);
+       G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       tet_result(TET_PASS);
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_00 ENDS    ###########\n");
+
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_FLIGHT_MODE_01
+ * @param [in]  tel_set_flight_mode_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+ */
+
+void utc_tel_set_flight_mode_01() {
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_01 START    ###########\n");
+
+       TapiResult_t ret_status;
+
+       async_response = false;//initialize
+
+       ret_status = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_LEAVE);
+
+       printf("/n return value = %d\n", ret_status);
+
+       if (TAPI_API_SUCCESS == ret_status) {
+               printf(
+                               "/n/******************  set flight mode api successful **************************\\n");
+       } else {
+               printf(
+                               "/n/******************     set flight mode api  case  failed **************************\\n");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status)
+               ;
+       tet_infoline("utc_tel_set_flight_mode_01 pass");
+       expected_event = TAPI_EVENT_POWER_FLIGHT_MODE_RESP;
+       printf("The expected_event is TAPI_EVENT_POWER_FLIGHT_MODE_RESP(%d)\n",
+                       expected_event);
+
+       printf("\n\n value of asyn_response %d", async_response);
+       G_MAIN_LOOP_RUN(10);
+       //      TET_CHECK_TEMP(true, async_response);   
+       tet_result(TET_PASS);
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_01 ENDS    ###########\n");
+
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_FLIGHT_MODE_02
+ * @param [in]  tel_set_flight_mode_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+ */
+
+void utc_tel_set_flight_mode_02() {
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_02 START    ###########\n");
+
+       TapiResult_t ret_status;
+
+       async_response = false;//initialize
+
+       ret_status = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_MAX);
+
+       printf("/n return value = %d\n", ret_status);
+
+       if (TAPI_API_INVALID_INPUT == ret_status) {
+               printf(
+                               "/n/******************  set flight mode api invalid input case successful **************************\\n");
+       } else {
+               printf(
+                               "/n/******************     set flight mode api  invalid input case  failed **************************\\n");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status)
+               ;
+       tet_infoline("utc_tel_set_flight_mode_02 pass");
+       //expected_event = TAPI_EVENT_POWER_FLIGHT_MODE_RESP;
+       //printf("The expected_event is TAPI_EVENT_POWER_FLIGHT_MODE_RESP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_02 ENDS    ###########\n");
+
+}
+
+/**
+ * @brief This tests 
+ * @par ID: UTC_TAPI_POWER_FLIGHT_MODE_03
+ * @param [in]  tel_set_flight_mode_type_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+ */
+
+void utc_tel_set_flight_mode_03() {
+
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_03 START    ###########\n");
+
+       TapiResult_t ret_status;
+
+       async_response = false;//initialize
+
+       ret_status = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_ENTER - 1);
+
+       printf("/n return value = %d\n", ret_status);
+
+       if (TAPI_API_INVALID_INPUT == ret_status) {
+               printf(
+                               "/n/******************  set flight mode api invalid input case successful **************************\\n");
+       } else {
+               printf(
+                               "/n/******************     set flight mode api  invalid input case  failed **************************\\n");
+       }
+
+       TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status)
+               ;
+       tet_infoline("utc_tel_set_flight_mode_03 pass");
+       //expected_event = TAPI_EVENT_POWER_FLIGHT_MODE_RESP;
+       //printf("The expected_event is TAPI_EVENT_POWER_FLIGHT_MODE_RESP(%d)\n",expected_event);
+
+       //G_MAIN_LOOP_RUN(10);
+       //TET_CHECK_TEMP(true, async_response);
+       //tet_result(TET_PASS);
+       TEST_DEBUG("\n\n\n\n\n########     TEST utc_tel_set_flight_mode_03 ENDS    ###########\n");
+
+}
+
+/** @} */
diff --git a/TC/telephony_TC/power/unit/uts_tel_set_flight_mode.h b/TC/telephony_TC/power/unit/uts_tel_set_flight_mode.h
new file mode 100644 (file)
index 0000000..27e9061
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file    uts_tel_set_flight_mode.h
+* @brief       This is a suite of unit test cases to test Telephony Power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+#include "power_common.h"
+
+
+#ifndef  _UTC_TEL_SET_FLIGHT_MODE_
+#define  _UTC_TEL_SET_FLIGHT_MODE_
+
+
+void utc_tel_set_flight_mode_00();
+
+void utc_tel_set_flight_mode_01();
+
+void utc_tel_set_flight_mode_02();
+
+void utc_tel_set_flight_mode_03();
+
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_flight_mode_00, 1},
+       {utc_tel_set_flight_mode_01, 2},
+       {utc_tel_set_flight_mode_02, 3},
+       {utc_tel_set_flight_mode_03, 4},
+       {NULL, 0}
+       };
+
+
+
+#endif  //_UTC_tel_set_FLIGHT_MODE_
diff --git a/TC/telephony_TC/power/uts_tapi_power_phone_on_off.c b/TC/telephony_TC/power/uts_tapi_power_phone_on_off.c
new file mode 100644 (file)
index 0000000..02ecd4b
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/** 
+* @ingroup Telephony_API TelephonyAPI
+* @addtogroup POWER power
+*/
+
+/**
+* @ingroup  POWER power
+* @addtogroup UTS_POWER Unit
+*/
+
+/**
+* @ingroup  UTS_POWER Unit
+* @addtogroup UTS_TAPI_POWER_PHONE_ON_OFF tapi_power_phone_on_off
+* @{
+*/
+
+
+
+/**
+* @file    uts_tapi_power_phone_on_off.c
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+//add includes
+
+
+#include "uts_tapi_power_phone_on_off.h"
+
+
+
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+extern TelTapiEventType_t expected_event;
+extern bool async_response;
+
+static void startup()
+{
+       TapiResult_t  ret_status ;
+
+
+       ret_status = TelTapiInit();
+
+       if(ret_status != TAPI_API_SUCCESS)      
+               {       
+                       printf("TelTapiInit() Failed ret_status = %d \n",ret_status);   
+               }
+
+       register_all_events();
+
+}
+
+static void cleanup()
+{
+       TapiResult_t  ret_status ;
+
+       deregister_all();       
+       ret_status = TelTapiDeInit();
+
+       
+       if(ret_status != TAPI_API_SUCCESS)      
+       {       
+               printf("TelTapiDeInit() Failed ret_status = %d \n",ret_status); 
+       }
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_TAPI_POWER_PHONE_ON_OFF_00
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_phone_on_off_00()
+{
+
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_00 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tapi_power_phone_on_off(TAPI_PHONE_POWER_OFF);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status)
+               {
+                       printf("/n/******************  power on off mode Started successfully **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode not started **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_power_phone_on_off_00 pass");
+               expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               printf("\n\n value of asyn_response %d",async_response);
+               G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_00 ENDS    ###########\n");
+
+
+
+}
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_TAPI_POWER_PHONE_ON_OFF_01
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_phone_on_off_01()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_01 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+               tapi_power_phone_on_off(TAPI_PHONE_POWER_OFF);
+               sleep(5);
+               ret_status = tapi_power_phone_on_off(TAPI_PHONE_POWER_ON);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_SUCCESS == ret_status  ||  TAPI_API_MODEM_ALREADY_ON == ret_status)
+               {
+                       printf("/n/******************  power on off mode Started successfully **************************\\n");
+                       tet_result(TET_PASS);
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode not started **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_SUCCESS, ret_status);
+               tet_infoline("utc_tapi_power_phone_on_off_01 pass");
+               expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+               printf("\n\n value of asyn_response %d",async_response);
+
+               G_MAIN_LOOP_RUN(10);
+       //      TET_CHECK_TEMP(true, async_response);   
+               tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_01 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_TAPI_POWER_PHONE_ON_OFF_02
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_phone_on_off_02()
+{
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_02 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tapi_power_phone_on_off(TAPI_PHONE_POWER_OFF -1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  power on off mode invalid input pass **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode  invalid input case failed  **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tapi_power_phone_on_off_02 pass");
+               //expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               //printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               //G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               //tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_02 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+/**
+ * @brief This tests 
+ * @par ID: UTS_TAPI_POWER_PHONE_ON_OFF_03
+ * @param [in]  tapi_power_phone_cmd_t
+ * @code       
+ * @endcode
+ * @return TapiResult_t
+*/     
+
+
+void utc_tapi_power_phone_on_off_03()
+{
+
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_03 START    ###########\n");
+               
+               TapiResult_t  ret_status ;
+
+               async_response = false;//initialize
+
+       
+               ret_status = tapi_power_phone_on_off(TAPI_PHONE_POWER_ON +1);
+               
+               printf("/n return value = %d\n",ret_status);
+               
+               if(TAPI_API_INVALID_INPUT == ret_status)
+               {
+                       printf("/n/******************  power on off mode invalid input pass **************************\\n");
+               }
+               else
+               {
+                       printf("/n/******************   power on off  mode  invalid input case failed  **************************\\n");
+               }
+
+               TET_CHECK_EQUAL(TAPI_API_INVALID_INPUT, ret_status);
+               tet_infoline("utc_tapi_power_phone_on_off_03 pass");
+               //expected_event = TAPI_EVENT_POWER_PHONE_OFF;
+               //printf("The expected_event is TAPI_EVENT_POWER_PHONE_OFF(%d)\n",expected_event);
+
+               //G_MAIN_LOOP_RUN(10);
+               //TET_CHECK_TEMP(true, async_response); 
+               //tet_result(TET_PASS);
+
+               TEST_DEBUG("\n\n\n\n\n########     TEST utc_tapi_power_phone_on_off_03 ENDS    ###########\n");
+
+
+
+}
+
+
+
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/power/uts_tapi_power_phone_on_off.h b/TC/telephony_TC/power/uts_tapi_power_phone_on_off.h
new file mode 100644 (file)
index 0000000..a283ca6
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @file    uts_tapi_power_phone_on_off.h
+* @brief       This is a suite of unit test cases to test Telephony power API function
+* @author      Sagar Aggarwal  (a.sagar@samsung.com)
+* @version     Initial Creation 
+* @date                [2009-05-13]
+*/
+
+
+
+#include "power_common.h"
+
+
+#ifndef  _UTC_TAPI_POWER_ONOFF_
+#define  _UTC_TAPI_POWER_ONOFF_
+
+
+
+void utc_tapi_power_phone_on_off_00();
+
+
+
+void utc_tapi_power_phone_on_off_01();
+
+
+
+void utc_tapi_power_phone_on_off_02();
+
+
+
+void utc_tapi_power_phone_on_off_03();
+
+static void startup();
+
+static void cleanup();
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tapi_power_phone_on_off_00, 1},
+       {utc_tapi_power_phone_on_off_01, 2},
+       {utc_tapi_power_phone_on_off_02, 3},
+       {utc_tapi_power_phone_on_off_03, 4},
+       {NULL, 0}
+       };
+
+
+
+#endif  //_UTC_TAPI_POWER_ONOFF_
diff --git a/TC/telephony_TC/sat/unit/makefile b/TC/telephony_TC/sat/unit/makefile
new file mode 100644 (file)
index 0000000..e184de5
--- /dev/null
@@ -0,0 +1,67 @@
+CC=gcc -Wall\r
+\r
+LB1 = async_util\r
+LB2 = tet_tapi_util \r
+TS1 = uts_tel_download_sat_event\r
+TS2 = uts_tel_get_sat_main_menu_info\r
+TS3 = uts_tel_select_sat_menu\r
+TS4 = uts_tel_send_sat_app_exec_result\r
+TS5 = uts_tel_send_sat_ui_user_confirm\r
+TS6 = uts_tel_send_ui_display_status\r
+\r
+LIBS  = `pkg-config --libs  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi ` \r
+LIBS +=$(TET_ROOT)/lib/tet3/tcm_s.o\r
+LIBS +=-L$(TET_ROOT)/lib/tet3 -ltcm_s\r
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi_s\r
+\r
+INCS  =  -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`\r
+INCS  += -I$(TET_ROOT)/inc/tet3\r
+\r
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER\r
+CC +=$(CFLAGS)\r
+LDFLAGS = $(LIBS)\r
+\r
+#ifeq ($(ARCH),target)\r
+#CC += -g -mabi=aapcs-linux\r
+#endif\r
+\r
+all : $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) \r
+\r
+clean :\r
+       rm -rf *~ *.o target i386 tet_lock tet_captured *.pyc *.log .scon*\r
+       rm -rf *~ *.o $(TS1)\r
+       rm -rf *~ *.o $(TS2)\r
+       rm -rf *~ *.o $(TS3)\r
+       rm -rf *~ *.o $(TS4)\r
+       rm -rf *~ *.o $(TS5)\r
+       rm -rf *~ *.o $(TS6)\r
+\r
+\r
+\r
+$(LB1): $(LB1).c\r
+       $(CC) -c $(LB1).c  \r
+\r
+$(LB2): $(LB2).c\r
+       $(CC) -c $(LB2).c  \r
+\r
+$(TS1): $(TS1).c\r
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS)\r
+\r
+$(TS2): $(TS2).c\r
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS)\r
+\r
+$(TS3): $(TS3).c\r
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS)\r
+\r
+$(TS4): $(TS4).c\r
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS)\r
+\r
+$(TS5): $(TS5).c\r
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS)\r
+\r
+$(TS6): $(TS6).c\r
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS)\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/sat/unit/tet_macro.h b/TC/telephony_TC/sat/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..b386b3e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TET_MACRO_H
+#define TET_MACRO_H
+
+
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+
+
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+
+
+#endif
+
diff --git a/TC/telephony_TC/sat/unit/tslist b/TC/telephony_TC/sat/unit/tslist
new file mode 100644 (file)
index 0000000..19abfcf
--- /dev/null
@@ -0,0 +1,7 @@
+/sat/unit/uts_tel_download_sat_event
+/sat/unit/uts_tel_get_sat_main_menu_info
+/sat/unit/uts_tel_select_sat_menu
+/sat/unit/uts_tel_send_sat_app_exec_result
+/sat/unit/uts_tel_send_sat_ui_user_confirm
+/sat/unit/uts_tel_send_ui_display_status
+
diff --git a/TC/telephony_TC/sat/unit/uts_tel_download_sat_event.c b/TC/telephony_TC/sat/unit/uts_tel_download_sat_event.c
new file mode 100644 (file)
index 0000000..b4ffc7c
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+#include "uts_tel_download_sat_event.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_download_sat_event_01, 1},\r
+       {utc_tel_download_sat_event_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_download_sat_event Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_download_sat_event Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests BOOL sat_engine_get_main_menu_title(sat_engine_main_menu_title_t* main_menu_title);\r
+ * @brief              This function is called by passing main_menu_title = NULL\r
+ * @return             TAPI_API_INVALID_PTR\r
+ * @param[out] main_menu_title\r
+ */\r
+void utc_tel_download_sat_event_01()\r
+{\r
+       int reqId=-1;\r
+       int ret_status;\r
+\r
+       /* Calling tel_download_sat_event API */\r
+       ret_status = tel_download_sat_event(NULL,&reqId);\r
+\r
+       tet_printf("ret_status[%d]\n",ret_status);\r
+\r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+       if(ret_status == TAPI_API_INVALID_PTR)\r
+               tet_printf("utc_tel_download_sat_event_01 pass\n");\r
+       return;\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests BOOL sat_engine_get_main_menu_title(sat_engine_main_menu_title_t* main_menu_title);\r
+ * @brief              This function is called by passing NULL request ID\r
+ * @return             TAPI_API_INVALID_PTR\r
+ * @param[out] main_menu_title\r
+ */\r
+void utc_tel_download_sat_event_02()\r
+{\r
+       TelSatEventDownloadReqInfo_t  sat_event_info;\r
+       int reqId=-1;\r
+\r
+       /* Test SAT Event Download Envelope Command - Invalid input (NULL pointer) Handling */\r
+\r
+       int ret_status;\r
+\r
+       sat_event_info.eventDownloadType=5;//Idle Screen Available Event\r
+       sat_event_info.u.bIdleScreenAvailable==TRUE;\r
+\r
+       /* Calling tel_download_sat_event API */\r
+       ret_status = tel_download_sat_event(&sat_event_info,NULL);\r
+\r
+       tet_printf("ret_status[%d]\n",ret_status);\r
+       \r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+       if(ret_status == TAPI_API_INVALID_PTR)\r
+               tet_printf("utc_tel_download_sat_event_02 pass\n");\r
+       return;\r
+}\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_download_sat_event.h b/TC/telephony_TC/sat/unit/uts_tel_download_sat_event.h
new file mode 100644 (file)
index 0000000..a85ae6d
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_DOWNLOAD_SAT_EVENT_H_\r
+#define _UTS_TEL_DOWNLOAD_SAT_EVENT_H_\r
+\r
+void utc_tel_download_sat_event_01();\r
+void utc_tel_download_sat_event_02();\r
+\r
+#endif\r
+/** @} */\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.c b/TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.c
new file mode 100644 (file)
index 0000000..fa3c87d
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+\r
+#include "uts_tel_get_sat_main_menu_info.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sat_main_menu_info_01, 1},\r
+       {utc_tel_get_sat_main_menu_info_02, 2},         \r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_get_sat_main_menu_info Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_get_sat_main_menu_info Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+void utc_tel_get_sat_main_menu_info_01()\r
+{\r
+\r
+    int ret_status=TAPI_API_SUCCESS;\r
+       tet_printf("Get SAT Main MenuInfo 01\n");\r
+     \r
+       /* Calling TelTapiSatGetMainMenuInfo API */\r
+       ret_status = tel_get_sat_main_menu_info (NULL);\r
+       tet_printf("The Return Status of TelTapiSatGetMainMenuInfo 01() is: %d\n", ret_status);\r
+\r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+       if(ret_status == TAPI_API_INVALID_PTR)\r
+               tet_printf("utc_tel_get_sat_main_menu_info_01 pass\n");\r
+       return;\r
+}\r
+\r
+void utc_tel_get_sat_main_menu_info_02()\r
+{\r
+\r
+    int ret_status=TAPI_API_SUCCESS;\r
+       tet_printf("Get SAT Main MenuInfo 02\n");\r
+\r
+       TelSatSetupMenuInfo_t main_menu ={0,};\r
+     \r
+       /* Calling TelTapiSatGetMainMenuInfo API */\r
+       ret_status = tel_get_sat_main_menu_info (&main_menu);\r
+       tet_printf("The Return Status of tel_get_sat_main_menu_info 02() is: %d\n", ret_status);\r
+\r
+       TET_CHECK(ret_status == TAPI_API_SUCCESS);\r
+       if(ret_status == TAPI_API_SUCCESS)\r
+               tet_printf("utc_tel_get_sat_main_menu_info_02 pass\n");\r
+       return;\r
+}\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.h b/TC/telephony_TC/sat/unit/uts_tel_get_sat_main_menu_info.h
new file mode 100644 (file)
index 0000000..7b6dd3e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_GET_SAT_MAIN_MENU_INFO_H_\r
+#define _UTS_TEL_GET_SAT_MAIN_MENU_INFO_H_\r
+\r
+void utc_tel_get_sat_main_menu_info_01();\r
+void utc_tel_get_sat_main_menu_info_02();\r
+\r
+#endif\r
+/** @} */\r
+\r
+\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.c b/TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.c
new file mode 100644 (file)
index 0000000..6a75191
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+\r
+#include "uts_tel_select_sat_menu.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_select_sat_menu_01, 1},\r
+       {utc_tel_select_sat_menu_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("tel_select_sat_menu Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("tel_select_sat_menu Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests BOOLuts_tapi_sat_menu_selection_envelope(sat_engine_main_menu_title_t* main_menu_title);\r
+ * @brief              This function sends the UI display status to sat engine for specific command.\r
+ * @return             TRUE.\r
+ * @param[out] main_menu_title\r
+ */\r
+void utc_tel_select_sat_menu_01()\r
+{\r
+       /* Test SAT Menu Selection Envelope Command - Successful case */\r
+\r
+       int ret_status = TAPI_API_SUCCESS;\r
+       int reqId = -1;\r
+\r
+       /* Calling tel_select_sat_menu API */\r
+       ret_status = tel_select_sat_menu(NULL,&reqId);\r
+       \r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests BOOLuts_tapi_sat_menu_selection_envelope(sat_engine_main_menu_title_t* main_menu_title);\r
+ * @brief              This function is called by passing main_menu_title = NULL\r
+ * @return             FALSE\r
+ * @param[out] main_menu_title\r
+ */\r
+void utc_tel_select_sat_menu_02()\r
+{\r
+       TelSatMenuSelectionReqInfo_t menu_selection_info;\r
+\r
+       menu_selection_info.itemIdentifier =1;\r
+       int ret_status = TAPI_API_SUCCESS;\r
+\r
+       /* Calling tel_select_sat_menu API */\r
+       ret_status = tel_select_sat_menu(&menu_selection_info,NULL);\r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+}\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.h b/TC/telephony_TC/sat/unit/uts_tel_select_sat_menu.h
new file mode 100644 (file)
index 0000000..895851d
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_SELECT_SAT_MENU_H_\r
+#define _UTS_TEL_SELECT_SAT_MENU_H_\r
+\r
+static void utc_tel_select_sat_menu_01();\r
+static void utc_tel_select_sat_menu_02();\r
+\r
+#endif\r
+/** @} */\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.c b/TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.c
new file mode 100644 (file)
index 0000000..93dc608
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+\r
+#include "uts_tel_send_sat_app_exec_result.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_send_sat_app_exec_result_01, 1},\r
+       {utc_tel_send_sat_app_exec_result_02, 2},               \r
+       {NULL, 0}\r
+};\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_send_sat_app_exec_result Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_send_sat_app_exec_result Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests BOOL sat_engine_get_main_menu_title(sat_engine_main_menu_title_t* main_menu_title);\r
+ * @brief              This function sends the UI display status to sat engine for specific command.\r
+ * @return             TRUE.\r
+ * @param[out] main_menu_title\r
+ */\r
+void utc_tel_send_sat_app_exec_result_01()\r
+{\r
+       int ret_status=TAPI_API_SUCCESS;\r
+\r
+       ret_status = tel_send_sat_app_exec_result  (NULL);\r
+\r
+       tet_printf("tel_send_sat_app_exec_result return=%d\n", ret_status);\r
+       \r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+       return;\r
+}\r
+\r
+void utc_tel_send_sat_app_exec_result_02()\r
+{\r
+       int ret_status=TAPI_API_SUCCESS;\r
+       TelSatAppsRetInfo_t appRetInfo ={0,};\r
+\r
+       appRetInfo.commandType = TAPI_SAT_CMD_TYPE_SEND_DATA;\r
+       appRetInfo.commandId = 0;\r
+\r
+       ret_status = tel_send_sat_app_exec_result(&appRetInfo);\r
+\r
+       tet_printf("tel_send_sat_app_exec_result return=%d\n", ret_status);\r
+       \r
+       TET_CHECK(ret_status == TAPI_API_SERVER_FAILURE);\r
+       return;\r
+}\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.h b/TC/telephony_TC/sat/unit/uts_tel_send_sat_app_exec_result.h
new file mode 100644 (file)
index 0000000..296f845
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_SEND_SAT_APP_EXEC_RESULT_H_\r
+#define _UTS_TEL_SEND_SAT_APP_EXEC_RESULT_H_\r
+\r
+static void utc_tel_send_sat_app_exec_result_01();\r
+static void utc_tel_send_sat_app_exec_result_02();\r
+\r
+#endif\r
+/** @} */\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.c b/TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.c
new file mode 100644 (file)
index 0000000..470805a
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>\r
+#include <stdio.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+\r
+#include "uts_tel_send_sat_ui_user_confirm.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_send_sat_ui_user_confirm_01, 1},\r
+       {utc_tel_send_sat_ui_user_confirm_02, 2},               \r
+       {NULL, 0}\r
+};\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_send_sat_ui_user_confirm Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_send_sat_ui_user_confirm Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+void utc_tel_send_sat_ui_user_confirm_01()\r
+{\r
+       TapiResult_t ret_status = TAPI_API_SUCCESS;\r
+\r
+       ret_status = tel_send_sat_ui_user_confirm (NULL);\r
+\r
+       tet_printf("utc_tel_send_sat_ui_user_confirm_01 return=%d\n", ret_status);\r
+       TET_CHECK(ret_status == TAPI_API_INVALID_PTR);\r
+       return;\r
+}\r
+\r
+void utc_tel_send_sat_ui_user_confirm_02()\r
+{\r
+       TapiResult_t ret_status = TAPI_API_SUCCESS;\r
+       TelSatUiUserConfirmInfo_t userConfirmData = {0,};\r
+\r
+       userConfirmData.dataLen = -1;\r
+\r
+       ret_status = tel_send_sat_ui_user_confirm(&userConfirmData);\r
+\r
+       tet_printf("utc_tel_send_sat_ui_user_confirm_02 return=%d\n", ret_status);\r
+       TET_CHECK(ret_status == TAPI_API_INVALID_INPUT);\r
+       return;\r
+}\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.h b/TC/telephony_TC/sat/unit/uts_tel_send_sat_ui_user_confirm.h
new file mode 100644 (file)
index 0000000..4541ae7
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_SEND_SAT_UI_USER_CONFIRM_H_\r
+#define _UTS_TEL_SEND_SAT_UI_USER_CONFIRM_H_\r
+\r
+void utc_tel_send_sat_ui_user_confirm_01();\r
+void utc_tel_send_sat_ui_user_confirm_02();\r
+\r
+#endif\r
+/** @} */\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.c b/TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.c
new file mode 100644 (file)
index 0000000..edc5d27
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSat.h>\r
+#include "tet_macro.h"\r
+\r
+#include "uts_tel_send_ui_display_status.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+/* Initialize TCM data structures */\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_send_ui_display_status_01, 1},\r
+       {utc_tel_send_ui_display_status_02, 2},\r
+       {utc_tel_send_ui_display_status_03, 3},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_send_ui_display_status Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_send_ui_display_status Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}\r
+\r
+\r
+/**\r
+ * @test               This case tests TapiResult_t TelTapiSatSendUiDisplayStatus(int command_id, sat_engine_ui_display_status status);\r
+ * @brief              This function is called by passing invalid command_id = -1\r
+ * @return             False\r
+ * @param[in]  command_id = -1\r
+ * @param[in]  status = TAPI_SAT_DISPLAY_SUCCESS\r
+ */\r
+void utc_tel_send_ui_display_status_01()\r
+{\r
+       int ret_val= TAPI_API_SUCCESS;\r
+\r
+       ret_val = tel_send_ui_display_status(-1,TAPI_SAT_DISPLAY_SUCCESS);\r
+\r
+       TET_CHECK(ret_val == TAPI_API_SAT_INVALID_COMMAND_ID);\r
+}\r
+\r
+ /**\r
+  * @test              This case tests TapiResult_t TelTapiSatSendUiDisplayStatus(int command_id, sat_engine_ui_display_status status);\r
+  * @brief             This function is called by passing sinvalid status = -1\r
+  * @return            False\r
+  * @param[in] command_id = 1\r
+  * @param[in] status = -1\r
+ */\r
+void utc_tel_send_ui_display_status_02()\r
+{\r
+       int  ret_val = TAPI_API_SUCCESS;\r
+\r
+       ret_val = tel_send_ui_display_status(1,TAPI_SAT_DISPLAY_SUCCESS-1);\r
+\r
+       TET_CHECK(ret_val == TAPI_API_INVALID_INPUT);\r
+}\r
+\r
+ /**\r
+  * @test              This case tests TapiResult_t TelTapiSatSendUiDisplayStatus(int command_id, sat_engine_ui_display_status status);\r
+  * @brief             This function is called by invalid status = 2\r
+  * @return            False\r
+  * @param[in] command_id = 1\r
+  * @param[in] status = 3\r
+ */\r
+void utc_tel_send_ui_display_status_03()\r
+{\r
+        int  ret_val = TAPI_API_SUCCESS;\r
+\r
+       ret_val = tel_send_ui_display_status(1,TAPI_SAT_DISPLAY_FAIL+1);\r
+\r
+       TET_CHECK(ret_val == TAPI_API_INVALID_INPUT);\r
+}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.h b/TC/telephony_TC/sat/unit/uts_tel_send_ui_display_status.h
new file mode 100644 (file)
index 0000000..1ba2228
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _UTS_TEL_SEND_UI_DISPLAY_STATUS_H_\r
+#define _UTS_TEL_SEND_UI_DISPLAY_STATUS_H_\r
+\r
+void utc_tel_send_ui_display_status_01();\r
+void utc_tel_send_ui_display_status_02();\r
+void utc_tel_send_ui_display_status_03();\r
+\r
+#endif\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/README b/TC/telephony_TC/sim/README
new file mode 100644 (file)
index 0000000..c82abd8
--- /dev/null
@@ -0,0 +1,60 @@
+=================================================================================
+*                                    README                                     *
+=================================================================================
+
+1. The sim Test Script directory (TestCases) includes:
+
+               sim/
+               |-- README                                         ; This file
+               `-- unit                                           ; contains Unit TCs
+                       |-- makefile
+                       |-- tslist
+                       `-- Unit test case source codes
+
+2. The $(TEST_ROOT) directory must includes following files:
+
+       /$(TEST_ROOT)
+               |-- tet_scen
+               |-- tetbuild.cfg
+               |-- tetclean.cfg
+               |-- tetexec.cfg
+               `-- ...(elipsis)
+
+=================================================================================
+*                                Preconditions                                  *
+---------------------------------------------------------------------------------
+|  Before Testing telephony-framework/sim Module,                           |      
+|  you should check the following conditions                                    |
+=================================================================================
+
+1. Ready for test 3G sim
+
+2. Check PIN1 code, PIN2 code, PUK1 code, PUK2 code of test sim
+
+3. Update uts header files
+       1) Open sim_common.h
+       2) Modify below macro to your test SIM information
+               PIN1_NORMAL , PIN1_NORMAL : PIN1 code of test sim
+               PIN2_NORMAL , PIN2_NORMAL : PIN2 code of test sim
+               PUK1_CODE : PUK1 code of test sim
+               PUK2_CODE : PUK2 code of test sim
+
+5. Before running tests, SIM card is inserted to tested phone
+       
+=================================================================================
+*                                  Change log                                   *
+=================================================================================
+1. 18-Dec-2008
+       - Initial draft.
+2. 18-Dec-2008
+       - Precondition Update
+3. 6-Oct-2010
+       - Precondition Update
+       
+=================================================================================
+*                                      NOTE                                     *
+=================================================================================
+1. In order to ensure successful working of the Test Scripts, please ensure that all of the IPKG files are installed normally.
+2. Testing SIM Module can be executed under target system environment (not simulator).
+
+
diff --git a/TC/telephony_TC/sim/sim_common.h b/TC/telephony_TC/sim/sim_common.h
new file mode 100644 (file)
index 0000000..9129bd6
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _SIM_COMMON_H
+#define _SIM_COMMON_H
+
+#include <stdio.h>
+#include <glib.h>
+
+#define SIM_INFO "sim_pw.txt"
+
+#define PIN1_INVALID "999"
+#define PIN2_INVALID "999"
+
+typedef struct {
+       char pin1[5];
+       char pin2[5];
+       char puk1[9];
+       char puk2[9];
+       char wpin1[5];
+       char wpin2[5];
+       char wpuk1[9];
+       char wpuk2[9];
+}sim_info_t;
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/async_util.c b/TC/telephony_TC/sim/unit/async_util.c
new file mode 100644 (file)
index 0000000..c447858
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sim_common.h>
+
+sim_info_t g_si;
+
+int sim_pin_info_setup()
+{
+       FILE * p_file;
+       int f_size;
+       char* p_buf;
+       char* p_str = NULL;
+       size_t result;
+               
+       p_file = fopen("sim_pw.txt","r");
+       if(p_file == NULL)
+               printf("file not found\n");
+       
+       fseek(p_file, 0, SEEK_END);
+       f_size = ftell(p_file);
+       rewind(p_file);
+       
+       //printf("file size[%d]\n",f_size);
+               
+       p_buf = (char*)malloc(sizeof(char)*f_size);
+       if(p_buf == NULL)
+               printf("file is empty or malloc failed\n");
+       
+       result = fread(p_buf,1,f_size,p_file);
+       if(result != f_size)
+               printf("file read error\n");
+       
+       memset(&p_buf[f_size-1],'\0',1);
+               
+       //      printf("file info=%s\n",p_buf);
+       
+       p_str = strstr(p_buf, "pin1:");  
+       if(p_str)sscanf(p_str+5, "%4s", &g_si.pin1[0]); 
+               
+       p_str = strstr(p_buf, "pin2:");  
+       if(p_str)sscanf(p_str+5, "%4s", &g_si.pin2[0]); 
+       
+       p_str = strstr(p_buf, "puk1:");  
+       if(p_str)sscanf(p_str+5, "%8s", &g_si.puk1[0]); 
+       
+       p_str = strstr(p_buf, "puk2:");  
+       if(p_str)sscanf(p_str+5, "%8s", &g_si.puk2[0]); 
+       
+       p_str = strstr(p_buf, "wpin1:");  
+       if(p_str)sscanf(p_str+6, "%4s", &g_si.wpin1[0]); 
+       
+       p_str = strstr(p_buf, "wpin2:");  
+       if(p_str)sscanf(p_str+6, "%4s", &g_si.wpin2[0]); 
+       
+       p_str = strstr(p_buf, "wpuk1:");  
+       if(p_str)sscanf(p_str+6, "%8s", &g_si.wpuk1[0]); 
+       
+       p_str = strstr(p_buf, "wpuk2:");  
+       if(p_str)sscanf(p_str+6, "%8s", &g_si.wpuk2[0]); 
+       
+       g_si.pin1[4]='\0';
+       g_si.pin2[4]='\0';
+       g_si.puk1[8]='\0';
+       g_si.puk2[8]='\0';
+       g_si.wpin1[4]='\0';
+       g_si.wpin2[4]='\0';
+       g_si.wpuk1[8]='\0';
+       g_si.wpuk2[8]='\0';
+               
+       printf("pin1[%s]\n",g_si.pin1);
+       printf("pin2[%s]\n",g_si.pin2);
+       printf("puk1[%s]\n",g_si.puk1);
+       printf("puk2[%s]\n",g_si.puk2);
+       printf("wpin1[%s]\n",g_si.wpin1);
+       printf("wpin2[%s]\n",g_si.wpin2);
+       printf("wpuk1[%s]\n",g_si.wpuk1);
+       printf("wpuk2[%s]\n",g_si.wpuk2);
+       
+       fclose(p_file);
+       free(p_buf);
+       return 0;       
+}
+
diff --git a/TC/telephony_TC/sim/unit/async_util.h b/TC/telephony_TC/sim/unit/async_util.h
new file mode 100644 (file)
index 0000000..f081336
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _ASYNC_UTIL_H_
+#define _ASYNC_UTIL_H_
+
+int sim_pin_info_setup();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/log b/TC/telephony_TC/sim/unit/log
new file mode 100644 (file)
index 0000000..652b3ef
--- /dev/null
@@ -0,0 +1,83 @@
+uts_tapi_get_file_info.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_FILE_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_get_file_info.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_get_lock_info.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_LOCKTYPE_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_get_lock_info.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_read_sim_file.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_READ_FILE_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_read_sim_file.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_sim_disable_lock.c:           if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_DISABLE_SIMLOCK_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_sim_disable_lock.c:                   tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_sim_enable_lock.c:            if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_SIMLOCK_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_sim_enable_lock.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_sim_getlock_personalization_status.c:         if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_STATUS_PERSONALIZATION_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_sim_getlock_personalization_status.c:                 tet_infoline("startup fail. tel_register_event() failed");
+uts_tapi_update_sim_file.c:            if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_UPDATE_FILE_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tapi_update_sim_file.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_change_sim_pins.c:             //tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             //tel_register_event(TAPI_EVENT_SIM_CHANGE_PINS_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             //tel_register_event(TAPI_EVENT_SIM_VERIFY_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             //tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             tel_register_event(TAPI_EVENT_SIM_CHANGE_PINS_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             tel_register_event(TAPI_EVENT_SIM_VERIFY_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_change_sim_pins.c:             tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback);
+uts_tel_delete_sim_pb_record.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_DELETE_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_delete_sim_pb_record.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_disable_sim_fdn.c:             if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_disable_sim_fdn.c:                     tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_disable_sim_security.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_disable_sim_security.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_enable_sim_fdn.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_enable_sim_fdn.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_enable_sim_security.c:         //if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_PIN_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_enable_sim_security.c:         if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_enable_sim_security.c:                 tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_indicator_info.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_INDICATION_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_indicator_info.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_init_info.c:           if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_MAILBOX_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_init_info.c:                   tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_language.c:            //if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_LOCKTYPE_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_language.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_mailbox_info.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_MAILBOX_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_mailbox_info.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_pb_3g_meta_info.c:             if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_pb_3g_meta_info.c:                     tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_pb_count.c:            if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_pb_count.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_pb_init_info.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_MAILBOX_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_pb_init_info.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_get_sim_pb_meta_info.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_get_sim_pb_meta_info.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_lock_sim_personalization.c:            if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_PERS_CNF, &subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_lock_sim_personalization.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_read_sim_pb_record.c:          if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_ACCESS_READ_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_read_sim_pb_record.c:                  tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_cardreader_status.c:           if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_cardreader_status.c:                   tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_connection.c:          if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_connection.c:                  tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_connection_status.c:           if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_connection_status.c:                   tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_power_operation.c:             if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_power_operation.c:                     tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_transfer_apdu.c:               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_transfer_apdu.c:                       tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_transfer_atr.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_transfer_atr.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sap_transport_protocol.c:          if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sap_transport_protocol.c:                  tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sim_access.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_MAILBOX_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sim_access.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_req_sim_isim_authentication.c:         if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_req_sim_isim_authentication.c:                 tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_set_sim_indicator_info.c:              if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_INDICATION_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_set_sim_indicator_info.c:                      tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_set_sim_language.c:            if ( (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_LANGUAGE_CNF,&subscription_id,(TelAppCallback)sim_app_callback, NULL) ) || (TAPI_API_SUCCESS == tel_register_event(TAPI_SIM_PIN_OPERATION_SUCCESS,&subscription_id,(TelAppCallback)sim_app_callback, NULL) ) )
+uts_tel_set_sim_language.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_set_sim_mailbox_info.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_MAILBOX_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_set_sim_mailbox_info.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_update_sim_pb_record.c:                if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_UPDATE_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_update_sim_pb_record.c:                        tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_verifiy_sim_pins.c:            if ( (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_VERIFY_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback) ) || (TAPI_API_SUCCESS == tel_register_event(TAPI_SIM_PIN_OPERATION_SUCCESS,&subscription_id,(TelAppCallback)sim_app_callback) ) )
+uts_tel_verifiy_sim_pins.c:                    tet_infoline("startup fail. tel_register_event() failed");
+uts_tel_verify_sim_puks.c:             if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_VERIFY_PUK_CNF,&subscription_id,(TelAppCallback)sim_app_callback) )
+uts_tel_verify_sim_puks.c:                     tet_infoline("startup fail. tel_register_event() failed");
diff --git a/TC/telephony_TC/sim/unit/makefile b/TC/telephony_TC/sim/unit/makefile
new file mode 100644 (file)
index 0000000..5d51641
--- /dev/null
@@ -0,0 +1,206 @@
+CC=gcc -Wall
+
+LB1 = async_util
+TS1 = uts_tel_get_sim_type
+TS2 = uts_tel_get_sim_init_info
+TS3 = uts_tel_get_sim_ecc
+TS4 = uts_tel_get_sim_imsi
+TS5 = uts_tel_get_sim_language
+TS6 = uts_tel_set_sim_language
+TS7 = uts_tel_req_sim_access
+TS8 = uts_tel_verify_sim_puks
+TS9 = uts_tel_verifiy_sim_pins
+TS10 = uts_tel_change_sim_pins
+TS11 = uts_tel_disable_sim_security
+TS12 = uts_tel_disable_sim_fdn
+TS13 = uts_tel_enable_sim_security
+TS14 = uts_tel_enable_sim_fdn
+TS15 = uts_tel_get_sim_fdn_status
+TS16 = uts_tel_get_sim_security_status
+TS17 = uts_tel_get_sim_personalization_status
+TS18 = uts_tel_disable_sim_personalization
+TS19 = uts_tel_enable_sim_personalization
+TS20 = uts_tel_get_sim_mailbox_info
+TS21 = uts_tel_get_sim_callforwarding_info
+TS22 = uts_tel_get_sim_messagewaiting_info
+TS23 = uts_tel_get_sim_cphs_info
+TS24 = uts_tel_get_sim_msisdn
+TS25 = uts_tel_get_sim_pb_init_info
+TS26 = uts_tel_get_sim_pb_meta_info
+TS27 = uts_tel_get_sim_pb_3g_meta_info
+TS28 = uts_tel_get_sim_pb_count
+TS29 = uts_tel_read_sim_pb_record
+TS30 = uts_tel_update_sim_pb_record
+TS31 = uts_tel_delete_sim_pb_record
+TS32 = uts_tel_req_sim_isim_authentication
+TS33 = #uts_tel_req_sap_connection
+TS34 = #uts_tel_req_sap_connection_status
+TS35 = #uts_tel_req_sap_transfer_atr
+TS36 = #uts_tel_req_sap_transfer_apdu
+TS37 = #uts_tel_req_sap_transport_protocol
+TS38 = #uts_tel_req_sap_power_operation
+TS39 = #uts_tel_req_sap_cardreader_status
+TS40 =
+TS41 =
+TS42 =
+
+LIBS  = `pkg-config --libs  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi ` 
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+
+INCS = -I. `pkg-config --cflags  gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi `
+INCS += -I$(TET_ROOT)/inc/tet3 
+INCS += -I../
+
+CFLAGS = $(INCS) -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DWITHOUT_APP_MGR 
+CFLAGS += -D_TETWARE_MODE_ 
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+all :  $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) \
+       $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS19) $(TS20) \
+       $(TS21) $(TS22) $(TS23) $(TS24) $(TS25) $(TS26) $(TS27) $(TS28) $(TS29) $(TS30) \
+       $(TS31) $(TS32) $(TS33) $(TS34) $(TS35) $(TS36) $(TS37) $(TS38) $(TS39) $(TS40) $(TS41) $(TS42)
+      
+      
+clean :
+       rm -rf *~ *.o target i386 tet_lock tet_captured *.pyc *.log .scon*
+       rm -rf $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10)
+       rm -rf $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) $(TS19) $(TS20)
+       rm -rf $(TS21) $(TS22) $(TS23) $(TS24) $(TS25) $(TS26) $(TS27) $(TS28) $(TS29) $(TS30)
+       rm -rf $(TS31) $(TS32) $(TS33) $(TS34) $(TS35) $(TS36) $(TS37) $(TS38) $(TS39) $(TS40) $(TS41) $(TS42)
+
+
+$(LB1): $(LB1).c
+       $(CC) -c $(LB1).c
+
+$(TS1): $(TS1).c $(LB1)
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS) $(LB1).o
+
+$(TS2): $(TS2).c $(LB1)
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS) $(LB1).o
+
+$(TS3): $(TS3).c $(LB1)
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS) $(LB1).o
+
+$(TS4): $(TS4).c $(LB1)
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS) $(LB1).o
+
+$(TS5): $(TS5).c $(LB1)
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS) $(LB1).o
+
+$(TS6): $(TS6).c $(LB1)
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS) $(LB1).o
+
+$(TS7): $(TS7).c $(LB1)
+       $(CC) -o $(TS7) $(TS7).c  $(LDFLAGS) $(LB1).o
+
+$(TS8): $(TS8).c $(LB1)
+       $(CC) -o $(TS8) $(TS8).c  $(LDFLAGS) $(LB1).o
+
+$(TS9): $(TS9).c $(LB1)
+       $(CC) -o $(TS9) $(TS9).c  $(LDFLAGS) $(LB1).o
+
+$(TS10): $(TS10).c $(LB1)
+       $(CC) -o $(TS10) $(TS10).c  $(LDFLAGS) $(LB1).o
+
+$(TS11): $(TS11).c $(LB1)
+       $(CC) -o $(TS11) $(TS11).c  $(LDFLAGS) $(LB1).o
+
+$(TS12): $(TS12).c $(LB1)
+       $(CC) -o $(TS12) $(TS12).c  $(LDFLAGS) $(LB1).o
+
+$(TS13): $(TS13).c $(LB1)
+       $(CC) -o $(TS13) $(TS13).c  $(LDFLAGS) $(LB1).o
+
+$(TS14): $(TS14).c $(LB1)
+       $(CC) -o $(TS14) $(TS14).c  $(LDFLAGS) $(LB1).o
+
+$(TS15): $(TS15).c $(LB1)
+       $(CC) -o $(TS15) $(TS15).c  $(LDFLAGS) $(LB1).o
+
+$(TS16): $(TS16).c $(LB1)
+       $(CC) -o $(TS16) $(TS16).c  $(LDFLAGS) $(LB1).o
+
+$(TS17): $(TS17).c $(LB1)
+       $(CC) -o $(TS17) $(TS17).c  $(LDFLAGS) $(LB1).o
+
+$(TS18): $(TS18).c $(LB1)
+       $(CC) -o $(TS18) $(TS18).c  $(LDFLAGS) $(LB1).o
+
+$(TS19): $(TS19).c $(LB1)
+       $(CC) -o $(TS19) $(TS19).c  $(LDFLAGS) $(LB1).o
+
+$(TS20): $(TS20).c $(LB1)
+       $(CC) -o $(TS20) $(TS20).c  $(LDFLAGS) $(LB1).o
+
+$(TS21): $(TS21).c $(LB1)
+       $(CC) -o $(TS21) $(TS21).c  $(LDFLAGS) $(LB1).o
+
+$(TS22): $(TS22).c $(LB1)
+       $(CC) -o $(TS22) $(TS22).c  $(LDFLAGS) $(LB1).o
+
+$(TS23): $(TS23).c $(LB1)
+       $(CC) -o $(TS23) $(TS23).c  $(LDFLAGS) $(LB1).o
+
+$(TS24): $(TS24).c $(LB1)
+       $(CC) -o $(TS24) $(TS24).c  $(LDFLAGS) $(LB1).o
+
+$(TS25): $(TS25).c $(LB1)
+       $(CC) -o $(TS25) $(TS25).c  $(LDFLAGS) $(LB1).o
+
+$(TS26): $(TS26).c $(LB1)
+       $(CC) -o $(TS26) $(TS26).c  $(LDFLAGS) $(LB1).o
+
+$(TS27): $(TS27).c $(LB1)
+       $(CC) -o $(TS27) $(TS27).c  $(LDFLAGS) $(LB1).o
+
+$(TS28): $(TS28).c $(LB1)
+       $(CC) -o $(TS28) $(TS28).c  $(LDFLAGS) $(LB1).o
+
+$(TS29): $(TS29).c $(LB1)
+       $(CC) -o $(TS29) $(TS29).c  $(LDFLAGS) $(LB1).o
+
+$(TS30): $(TS30).c $(LB1)
+       $(CC) -o $(TS30) $(TS30).c  $(LDFLAGS) $(LB1).o
+
+$(TS31): $(TS31).c $(LB1)
+       $(CC) -o $(TS31) $(TS31).c  $(LDFLAGS) $(LB1).o 
+
+$(TS32): $(TS32).c $(LB1)
+       $(CC) -o $(TS32) $(TS32).c  $(LDFLAGS) $(LB1).o
+
+$(TS33): $(TS33).c $(LB1)
+       $(CC) -o $(TS33) $(TS33).c  $(LDFLAGS) $(LB1).o
+
+$(TS34): $(TS34).c $(LB1)
+       $(CC) -o $(TS34) $(TS34).c  $(LDFLAGS) $(LB1).o
+
+$(TS35): $(TS35).c $(LB1)
+       $(CC) -o $(TS35) $(TS35).c  $(LDFLAGS) $(LB1).o
+
+$(TS36): $(TS36).c $(LB1)
+       $(CC) -o $(TS36) $(TS36).c  $(LDFLAGS) $(LB1).o
+
+$(TS37): $(TS37).c $(LB1)
+       $(CC) -o $(TS37) $(TS37).c  $(LDFLAGS) $(LB1).o
+
+$(TS38): $(TS38).c $(LB1)
+       $(CC) -o $(TS38) $(TS38).c  $(LDFLAGS) $(LB1).o
+
+$(TS39): $(TS39).c $(LB1)
+       $(CC) -o $(TS39) $(TS39).c  $(LDFLAGS) $(LB1).o
+
+$(TS40): $(TS40).c $(LB1)
+       $(CC) -o $(TS40) $(TS40).c  $(LDFLAGS) $(LB1).o
+
+$(TS41): $(TS41).c $(LB1)
+       $(CC) -o $(TS41) $(TS41).c  $(LDFLAGS) $(LB1).o
+
+$(TS42): $(TS42).c $(LB1)
+       $(CC) -o $(TS42) $(TS42).c  $(LDFLAGS) $(LB1).o
+
diff --git a/TC/telephony_TC/sim/unit/sim_pw.txt b/TC/telephony_TC/sim/unit/sim_pw.txt
new file mode 100644 (file)
index 0000000..b7a16a1
--- /dev/null
@@ -0,0 +1,8 @@
+pin1:1111
+pin2:2222
+puk1:11111111
+puk2:22222222
+wpin1:5555
+wpin2:6666
+wpuk1:77777777
+wpuk2:88888888
diff --git a/TC/telephony_TC/sim/unit/tet_tapi_util.h b/TC/telephony_TC/sim/unit/tet_tapi_util.h
new file mode 100644 (file)
index 0000000..73156c5
--- /dev/null
@@ -0,0 +1,327 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TET_TAPI_UTIL_
+#define _TET_TAPI_UTIL_
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <TelUtility.h>
+
+#ifndef UINT16
+typedef int UINT16;
+#endif
+
+#ifndef BOOL
+#define BOOL int
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#include <TapiCommon.h>
+
+// TET_Error Code string return macro
+typedef struct {
+       TapiResult_t _err_;
+       char * string;
+}TAPI_Error_String;
+
+#define TAPI_ERROR_MAX TAPI_API_MISC_OUTPARAM_NULL+1
+
+
+TAPI_Error_String g_TAPI_ErrorString[200] = {
+
+       /* #################### COMMON START ################ */
+       {TAPI_API_SUCCESS,              "TAPI_API_SUCCESS : No Error occured"},
+       {TAPI_API_INVALID_INPUT,        "TAPI_API_INVALID_INPUT : Input values are not correct in TAPI Library"},
+       {TAPI_API_INVALID_PTR,          "TAPI_API_INVALID_PTR : Invalid pointer"},
+       {TAPI_API_NOT_SUPPORTED,        "TAPI_API_NOT_SUPPORTED: The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network"},
+       {TAPI_API_DEPRICATED,           "TAPI_API_DEPRICATED : This API is deprecated and will be so in future also"},
+       {TAPI_API_SYSTEM_OUT_OF_MEM,    "TAPI_API_SYSTEM_OUT_OF_MEM : Out of memory"},
+       {TAPI_API_SYSTEM_RPC_LINK_DOWN, "TAPI_API_SYSTEM_RPC_LINK_DOWN : RPC link down"},
+       {TAPI_API_MODEM_POWERED_OFF,    "TAPI_API_MODEM_POWERED_OFF : The Modem is powered off"},
+       {TAPI_API_SERVICE_NOT_READY,    "TAPI_API_SERVICE_NOT_READY : Phone was powered on, but yet to receive the power up completed notification"},
+       {TAPI_API_SERVER_FAILURE ,      "TAPI_API_SERVER_FAILURE : error occurred in Telephony server"},
+       {TAPI_API_OEM_PLUGIN_FAILURE ,  "TAPI_API_OEM_PLUGIN_FAILURE  : Plug-in layer failure"},
+       {TAPI_API_TRANSPORT_LAYER_FAILURE, "TAPI_API_TRANSPORT_LAYER_FAILURE"},
+
+       {TAPI_API_INVALID_CALL_HANDLE,  "TAPI_API_INVALID_CALL_HANDLE : Invalid call handle"},
+       {TAPI_API_INVALID_CALL_STATE,   "TAPI_API_INVALID_CALL_STATE : Invalid call state- Newly added. Need to raise a CR for this"},
+
+       {TAPI_API_INVALID_DATA_LEN,     "TAPI_API_INVALID_DATA_LEN : Invalid data length"},
+       {TAPI_API_SIM_NOT_FOUND,        "TAPI_API_SIM_NOT_FOUND : Sim is not present / removed "},
+       {TAPI_API_SIM_BUSY,             "TAPI_API_SIM_BUSY : SIM is busy"},
+       {TAPI_API_SIM_INVALID_CARD_TYPE, "TAPI_API_SIM_INVALID_CARD_TYPE : Sim card is unknown "},
+       {TAPI_API_SIM_CARD_PERMANENT_ERROR, "TAPI_API_SIM_CARD_PERMANENT_ERROR : SIM error/blocked state"},
+       {TAPI_API_SIM_NOT_INITIALIZED,  "TAPI_API_SIM_NOT_INITIALIZED : SIM has not initialized yet (waiting for PIN verifcation, etc)"},
+       {TAPI_API_REQUEST_MAX_IN_PROGRESS, "TAPI_API_REQUEST_MAX_IN_PROGRESS : Maximum number of API Request for the same service are already in progress "},
+       {TAPI_API_OFFLINE_MODE_ERROR,   "TAPI_API_OFFLINE_MODE_ERROR : OEM Telephony Provider is in Offline mode"},
+       {TAPI_EVENT_CLASS_UNKNOWN,      "TAPI_EVENT_CLASS_UNKNOWN : Event class specified is not present in Event Class list"},
+       {TAPI_EVENT_UNKNOWN,            "TAPI_EVENT_UNKNOWN : Event specified is not present in TAPI Unsolicited Event list"},
+       {TAPI_REGISTRATION_OP_FAILED,   "TAPI_REGISTRATION_OP_FAILED : Callback Registration/De-registration failed"},
+       {TAPI_NETTEXT_SCADDRESS_NOT_SET, "TAPI_NETTEXT_SCADDRESS_NOT_SET"},
+       {TAPI_API_OPERATION_FAILED,     "TAPI_API_OPERATION_FAILED"},
+       {TAPI_API_INVALID_OPERATION,    "TAPI_API_INVALID_OPERATION"},
+
+       /* ############## XOCEAN ##################### */
+       {TAPI_API_SYSTEM_RPC_LINK_NOT_EST, "TAPI_API_SYSTEM_RPC_LINK_NOT_EST"},
+       {TAPI_API_API_NOT_SUPPORTED,    "TAPI_API_API_NOT_SUPPORTED"},
+       {TAPI_API_SERVER_LAYER_FAILURE, "TAPI_API_SERVER_LAYER_FAILURE"},
+
+       /* ################### CAL #############################*/
+       {TAPI_API_INVALID_CALL_ID,      "TAPI_API_INVALID_CALL_ID"},
+       {TAPI_API_CALL_CTXT_OVERFLOW,   "TAPI_API_CALL_CTXT_OVERFLOW"},
+       {TAPI_API_COULD_NOT_GET_CALL_CTXT, "TAPI_API_COULD_NOT_GET_CALL_CTXT"},
+       {TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT, "TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT"},
+       {TAPI_API_COULD_NOT_DESTROY_CTXT,  "TAPI_API_COULD_NOT_DESTROY_CTXT"},
+       {TAPI_API_INVALID_LINE_ID,      "TAPI_API_INVALID_LINE_ID"},
+
+       /*      POWER   */
+       //{TAPI_API_MODEM_ALREADY_ON,  "TAPI_API_MODEM_ALREADY_ON"},
+       //{TAPI_API_MODEM_ALREADY_OFF, "TAPI_API_MODEM_ALREADY_OFF"},
+
+       /* NETTEXT */
+       {TAPI_API_NETTEXT_DEVICE_NOT_READY,     "TAPI_API_NETTEXT_DEVICE_NOT_READY"},
+       {TAPI_API_NETTEXT_SCADDR_NOT_SET,       "TAPI_API_NETTEXT_SCADDR_NOT_SET"},
+       {TAPI_API_NETTEXT_INVALID_DATA_LEN,     "TAPI_API_NETTEXT_INVALID_DATA_LEN"},
+
+#if 0
+       /* SIM  */
+       {TAPI_API_SIM_DEV_CTX_NULL,             "TAPI_API_SIM_DEV_CTX_NULL"},
+       {TAPI_API_SIM_NOT_FOUND,                "TAPI_API_SIM_SIM_NOT_FOUND"},
+       //{TAPI_API_SIM_SIM_NOT_FOUND,          "TAPI_API_SIM_SIM_NOT_FOUND"},
+       {TAPI_API_SIM_SIM_SESSION_FULL,         "TAPI_API_SIM_SIM_SESSION_FULL"},
+       {TAPI_API_SIM_INVALID_APP_ID,           "TAPI_API_SIM_INVALID_APP_ID"},
+       {TAPI_API_SIM_INVALID_SESSION,          "TAPI_API_SIM_INVALID_SESSION"},
+       {TAPI_API_SIM_FILE_TYPE_WRONG,          "TAPI_API_SIM_FILE_TYPE_WRONG"},
+       {TAPI_API_SIM_FILE_ENCODE_FAIL,         "TAPI_API_SIM_FILE_ENCODE_FAIL"},
+       {TAPI_API_SIM_FILE_DECODE_FAIL,         "TAPI_API_SIM_FILE_DECODE_FAIL"},
+       {TAPI_API_SIM_FILE_INVALID_ENCODE_LEN,  "TAPI_API_SIM_FILE_INVALID_ENCODE_LEN"},
+       {TAPI_API_SIM_INVALID_RECORD_NUM,       "TAPI_API_SIM_INVALID_RECORD_NUM"},
+       {TAPI_API_SIM_CASE_NOT_HANDLED,         "TAPI_API_SIM_CASE_NOT_HANDLED"},
+       {TAPI_API_SIM_OEM_UNKNOWN_SIM_CARD,     "TAPI_API_SIM_OEM_UNKNOWN_SIM_CARD"},
+       {TAPI_API_SIM_SEC_UKNOWN_PIN_TYPE,      "TAPI_API_SIM_SEC_UKNOWN_PIN_TYPE"},
+       {TAPI_API_SIM_SEC_INVALID_PIN_TYPE,     "TAPI_API_SIM_SEC_INVALID_PIN_TYPE"},
+       {TAPI_API_SIM_PB_INVALID_STORAGE_TYPE,  "TAPI_API_SIM_PB_INVALID_STORAGE_TYPE"},
+#endif
+       /* Network */
+       {TAPI_API_NETWORK_INVALID_CTXT,         "TAPI_API_NETWORK_INVALID_CTXT"},
+
+       /*Misc */
+       {TAPI_API_MISC_RETURN_NULL,             "TAPI_API_MISC_RETURN_NULL"},
+       {TAPI_API_MISC_VALIDITY_ERROR,          "TAPI_API_MISC_VALIDITY_ERROR"},
+       {TAPI_API_MISC_INPUTPARM_ERROR,         "TAPI_API_MISC_INPUTPARM_ERROR"},
+       {TAPI_API_MISC_OUTPARAM_NULL,           "TAPI_API_MISC_OUTPARAM_NULL"},
+};
+
+
+
+//#define TET_ERROR_TO_STRING(_err_) g_TAPI_ErrorString[(_err_)].string
+static char * nondefined_err = "Non defined error code";
+static const char* TET_ERROR_TO_STRING(TapiResult_t err_code)
+{
+       int index;
+       for( index=0; g_TAPI_ErrorString[index]._err_ != TAPI_ERROR_MAX ; index++)
+       {
+               if (g_TAPI_ErrorString[index]._err_ == err_code || g_TAPI_ErrorString[index]._err_ == TAPI_ERROR_MAX)
+                       return g_TAPI_ErrorString[index].string;
+       }
+       return nondefined_err;
+}
+
+
+// TET_STAMP ******************************************************************************
+#define TET_STAMP_START(log) \
+do {\
+       tet_printf("[*]%s[%d] %s() : %s", __FILE__,__LINE__,__FUNCTION__,log);\
+} while(0)
+
+#define TET_STAMP_PASS() \
+do {\
+       tet_printf("[*]%s[%d] %s() : pass",__FILE__,__LINE__,__FUNCTION__);\
+       tet_result(TET_PASS);\
+} while(0)
+
+#define TET_STAMP_FAIL() \
+do {\
+       tet_printf("[*]%s[%d] %s() : fail",__FILE__,__LINE__,__FUNCTION__);\
+       tet_result(TET_FAIL);\
+} while(0)
+
+#define TET_STAMP(result) \
+do {\
+       tet_printf("[*]%s[%d] %s() TET_STAMP(%d)",__FILE__,__LINE__,__FUNCTION__,result); \
+       tet_result(result);\
+} while(0)
+
+// TET_RESULT Function *********************************************************************
+#define TET_RESULT_EQUAL(result,x1,x2) \
+do { \
+   if ((x1) == (x2)) \
+       { \
+          tet_printf("[*]%s[%d] %s() : %d and %d is equal",__FILE__,__LINE__,__FUNCTION__, x1,x2); \
+          tet_result(result); \
+          if(result==TET_PASS || result==TET_FAIL || result == TET_UNTESTED) return;\
+       } \
+ } while(0)
+
+#define TET_RESULT_EQUAL_GOTO(result,label,x1,x2) \
+do { \
+   if ((x1) == (x2)) \
+       { \
+          tet_printf("[*]%s[%d] %s() : %d and %d is equal",__FILE__,__LINE__,__FUNCTION__, x1,x2); \
+          tet_result(result); \
+          goto label;\
+       } \
+ } while(0)
+
+#define TET_RESULT_NOT_EQUAL(result,x1,x2) \
+do { \
+   if ((x1) != (x2)) \
+       { \
+          tet_printf("[*]%s[%d] %s() : %d and %d is not equal",__FILE__,__LINE__,__FUNCTION__, x1,x2); \
+          tet_result(result); \
+          if(result==TET_PASS || result==TET_FAIL || result == TET_UNTESTED) return;\
+       } \
+ } while(0)
+
+
+#define TET_RESULT_NOT_EQUAL_GOTO(result,label,x1,x2) \
+do { \
+   if ((x1) != (x2)) \
+       { \
+          tet_printf("[*]%s[%d] %s() : %d and %d is not equal",__FILE__,__LINE__,__FUNCTION__, x1,x2); \
+          tet_result(result); \
+          goto label;\
+       } \
+ } while(0)
+
+
+// TET_CHECK Macro : TAPI api return value test macro. If it is not TAPI_API_SUCCESS, tet_retult(TET_FAIL) is called
+#define TET_CHECK(x1, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (_err_ != (x1)) \
+       { \
+               tet_printf("[*]%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+
+
+#define TET_PRECONDITION(x1, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (_err_ != (x1)) \
+       { \
+               tet_printf("[*]%s[%d] %s : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_UNTESTED); \
+               return;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION2(x1, x2, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if ( !(_err_ == (x1) || _err_ == (x2))) \
+       { \
+               tet_printf("[*]%s[%d] %s : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_UNTESTED); \
+               return;\
+       } \
+ } while(0)
+
+
+#define TET_CHECK_GOTO(x1,label, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (_err_ != (x1)) \
+       { \
+               tet_printf("[*]%s[%d] %s() : test fail. error code =%x [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_FAIL); \
+               goto label;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION_GOTO(x1,label, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (_err_ != (x1)) \
+       { \
+               tet_printf("[*]%s[%d] %s() : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_UNTESTED); \
+               goto label;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION2_GOTO(x1,x2,label, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if ( !(_err_ == (x1)||_err_ == (x2))) \
+       { \
+               tet_printf("[*]%s[%d] %s() : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_UNTESTED); \
+               goto label;\
+       } \
+ } while(0)
+
+
+#define TET_CHECK2(x1,x2, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (!(_err_ == (x1) || _err_ == (x2))) \
+       { \
+               tet_printf("[*]%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+
+#define TET_CHECK2_GOTO(x1,x2, label, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (!(_err_ == (x1) || _err_ == (x2))) \
+       { \
+               tet_printf("[*]%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_FAIL); \
+               goto label;\
+       } \
+   else tet_printf("[*]%s[%d] %s() : test success. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+ } while(0)
+
+
+#define TET_CHECK3(x1,x2,x3, y...) \
+do { \
+   TapiResult_t _err_ = y;\
+   if (!(_err_ == (x1) || _err_ == (x2) || _err_ == (x3))) \
+       { \
+               tet_printf("[*]%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, _err_, TET_ERROR_TO_STRING(_err_) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+#endif //_TET_TAPI_UTIL_
diff --git a/TC/telephony_TC/sim/unit/tslist b/TC/telephony_TC/sim/unit/tslist
new file mode 100644 (file)
index 0000000..6e805b4
--- /dev/null
@@ -0,0 +1,32 @@
+/sim/unit/uts_tel_get_sim_type
+/sim/unit/uts_tel_get_sim_init_info
+/sim/unit/uts_tel_get_sim_ecc
+/sim/unit/uts_tel_get_sim_imsi
+/sim/unit/uts_tel_get_sim_language
+/sim/unit/uts_tel_set_sim_language
+/sim/unit/uts_tel_req_sim_access
+/sim/unit/uts_tel_verify_sim_puks
+/sim/unit/uts_tel_verifiy_sim_pins
+/sim/unit/uts_tel_change_sim_pins
+/sim/unit/uts_tel_disable_sim_security
+/sim/unit/uts_tel_disable_sim_fdn
+/sim/unit/uts_tel_enable_sim_security
+/sim/unit/uts_tel_enable_sim_fdn
+/sim/unit/uts_tel_get_sim_fdn_status
+/sim/unit/uts_tel_get_sim_security_status
+/sim/unit/uts_tel_get_sim_personalization_status
+/sim/unit/uts_tel_disable_sim_personalization
+/sim/unit/uts_tel_enable_sim_personalization
+/sim/unit/uts_tel_get_sim_mailbox_info
+/sim/unit/uts_tel_get_sim_callforwarding_info
+/sim/unit/uts_tel_get_sim_messagewaiting_info
+/sim/unit/uts_tel_get_sim_cphs_info
+/sim/unit/uts_tel_get_sim_msisdn
+/sim/unit/uts_tel_get_sim_pb_init_info
+/sim/unit/uts_tel_get_sim_pb_meta_info
+/sim/unit/uts_tel_get_sim_pb_3g_meta_info
+/sim/unit/uts_tel_get_sim_pb_count
+/sim/unit/uts_tel_read_sim_pb_record
+/sim/unit/uts_tel_update_sim_pb_record
+/sim/unit/uts_tel_delete_sim_pb_record
+/sim/unit/uts_tel_req_sim_isim_authentication
diff --git a/TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.c b/TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.c
new file mode 100644 (file)
index 0000000..f242c23
--- /dev/null
@@ -0,0 +1,700 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_CHANGE_PIN tel_change_sim_pins
+*
+* @brief Unit test code for tel_change_sim_pins()
+* @par Test function Prototype:
+*      TapiResult_t tel_change_sim_pins        (TelSimPinType_t PinType , const char *pOldPinData, const char *pNewPinData, int *pRequestId);
+* @par Test function description:
+*      This function changes PIN code based on the pin type passed along with old pin data and new pin data.
+* @par Important Notes:
+*      Based on Pin status (PIN/UPIN/PUK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND is published to Applications
+* @param [in]
+*      PinType  Pin type information.
+* @code
+typedef enum
+{
+    TAPI_SIM_PTYPE_PIN1        = 0x00,         // PIN 1
+    TAPI_SIM_PTYPE_PIN2        = 0x01,         // PIN 2
+    TAPI_SIM_PTYPE_PUK1        = 0x02,         // Puk 1
+    TAPI_SIM_PTYPE_PUK2        = 0x03,         // Puk 2
+    TAPI_SIM_PTYPE_UPIN        = 0x04,         // Universal PIN
+    TAPI_SIM_PTYPE_ADM = 0x05          // Administrator
+} TelSimPinType_t;
+* @endcode
+* @param [in]
+*      pOldPinData  Old pin code, entered by the user. (Null terminated string)
+* @param [in]
+*      pNewPinData  New pin code, entered by the user. (Null terminated string)
+* @param [out] pRequestId
+* \n  Unique identifier for a particular request.
+* \n  Request_id value can be any value from 0 to 255 if the API is returned successfully
+* \n  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_PIN_CNF
+*      - TAPI_EVENT_SIM_ENABLE_PIN_CNF
+*      - TAPI_EVENT_SIM_CHANGE_PIN_CNF
+*      - TAPI_EVENT_SIM_UNBLOCK_PIN_CNF
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_change_sim_pins.c
+* @brief       Test for the tel_change_sim_pins() API that is used to change pin1 code
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_change_sim_pins.h"
+#include "sim_common.h"
+#include "async_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_change_sim_pins_01, 1},
+       {utc_tel_change_sim_pins_02, 2},
+       {utc_tel_change_sim_pins_03, 3},
+       {utc_tel_change_sim_pins_04, 4},
+       {utc_tel_change_sim_pins_05, 5},
+       {utc_tel_change_sim_pins_06, 6},
+       {utc_tel_change_sim_pins_07, 7},
+       {utc_tel_change_sim_pins_08, 8},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+       return 0;
+}
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_pin_process_for_condition(TelSimPinType_t wish_pin, TelSimPinStatus_t wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimPinStatus_t pin_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       
+       tet_printf("pin[%d]:0-pin1, 1-pin2, wish_condition[%d]: 0-dis, 1- enabled, 2-blocked(puk)",wish_pin, wish_condition);
+
+       tapiRet = tel_get_sim_security_status(wish_pin,&pin_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_security_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(pin_status == TAPI_SIM_PIN_STATUS_DISABLED )
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_DISABLED");
+       }
+       else if(pin_status == TAPI_SIM_PIN_STATUS_ENABLED)
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_ENABLED");
+       }
+       else
+       {
+               tet_printf("current pin status is unhandled status[%d]",pin_status );
+               return -1;
+       }
+
+       if(pin_status == wish_condition )
+       {
+               tet_printf("current pin status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current pin status is different with wished condition");    
+               sec_data.type = wish_pin;
+
+               if(wish_pin == TAPI_SIM_PTYPE_PIN1 )
+               {
+                       sec_data.pw_len = strlen(g_si.pin1);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+               }
+               else if(wish_pin == TAPI_SIM_PTYPE_PIN2)
+               {
+                       sec_data.pw_len = strlen(g_si.pin2);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin2,sec_data.pw_len);
+               }
+
+               gAsyncResult = FALSE;
+               
+               if(wish_condition == TAPI_SIM_PIN_STATUS_DISABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_DISABLED)");
+
+                       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+               }
+               else if(wish_condition == TAPI_SIM_PIN_STATUS_ENABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_ENABLED)");               
+                       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+               
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling pin for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       G_MAIN_LOOP_RUN(3);
+               }
+
+               if(gAsyncResult == TRUE)
+                       return 0;
+               else
+                       return -1;
+       }
+
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    switch(sim_event->EventType)
+    {
+           case TAPI_EVENT_SIM_ENABLE_SEC_CNF: //preet: changed TAPI_EVENT_SIM_ENABLE_PIN_CNF to TAPI_EVENT_SIM_ENABLE_SEC_CNF
+        {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Enable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                gAsyncResult = TRUE;
+            else
+                gAsyncResult = FALSE;
+        }
+        break;
+
+           case TAPI_EVENT_SIM_DISABLE_SEC_CNF:        ////preet: changed TAPI_EVENT_SIM_DISABLE_PIN_CNF to TAPI_EVENT_SIM_DISABLE_SEC_CNF
+        {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_DISABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                  gAsyncResult = TRUE;
+            else
+                gAsyncResult = FALSE;
+        }
+        break;
+
+           case TAPI_EVENT_SIM_CHANGE_PINS_CNF:        //preet: changed TAPI_EVENT_SIM_CHANGE_PIN_CNF to TAPI_EVENT_SIM_CHANGE_PINS_CNF:
+       {
+            tet_printf("\n[GOT THE EVENT]*****TAPI_EVENT_SIM_CHANGE_PINS_CNF:******\n");
+            tet_printf("SIM Change PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+        }
+        break;
+
+        default:
+        {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM APP]Undhandled event type [0x%x]\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+
+static void startup()
+{
+    // describe code if you need...
+    tet_infoline("utc_tel_change_sim_pins Test Start\n");
+
+       sim_pin_info_setup();
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_CHANGE_PINS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_VERIFY_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+        tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       tel_register_app_name("org.samsung.test");
+
+    return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_change_sim_pins Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_change_sim_pins() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_01
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = NULL
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_change_sim_pins_01()
+{
+    TET_STAMP_START("tel_change_sim_pins(),Null parameter check 1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TelSimSecPw_t pNewPinData;
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pNewPinData.pw = (unsigned char*)g_si.pin1;
+    pNewPinData.pw_len = strlen(g_si.pin1);
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_change_sim_pins(NULL, &pNewPinData, &pRequestId));
+    TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_change_sim_pins() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_02
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = PIN1_NORMAL
+* @param [in] *pNewPinData = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_change_sim_pins_02()
+{
+    TET_STAMP_START("tel_change_sim_pins(),Null parameter check 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TelSimSecPw_t pOldPinData;
+    pOldPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pOldPinData.pw = (unsigned char*)g_si.pin1;
+    pOldPinData.pw_len = strlen(g_si.pin1);
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_change_sim_pins(&pOldPinData,NULL,&pRequestId));
+    TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_change_sim_pins() API : Negative condition(Third parameter is Null)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_03
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = PIN1_NORMAL
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_change_sim_pins_03()
+{
+    TET_STAMP_START("tel_change_sim_pins(), Null parameter check3");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimSecPw_t pOldPinData;
+    TelSimSecPw_t pNewPinData;
+
+    pOldPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pOldPinData.pw_len = strlen(g_si.pin1);
+       pOldPinData.pw = (unsigned char*)malloc(pOldPinData.pw_len);
+       memcpy(pOldPinData.pw,g_si.pin1,pOldPinData.pw_len);
+       
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pNewPinData.pw_len = strlen(g_si.pin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.pin1,pNewPinData.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_change_sim_pins(&pOldPinData, &pNewPinData,NULL));
+    TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_change_sim_pins() API : Low boundary test
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_04
+* @param [in] PinType = (TelSimPinType_t)TAPI_SIM_PTYPE_PIN1-1;//<-- Invalid pintype
+* @param [in] *pOldPinData = PIN1_NORMAL
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_change_sim_pins_04()
+{
+    TET_STAMP_START("invalid pin type 1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TelSimSecPw_t pOldPinData;
+    TelSimSecPw_t pNewPinData;
+       
+    pOldPinData.type = TAPI_SIM_PTYPE_PIN1 -1; //INVALID PINTYPE
+    pOldPinData.pw_len = strlen(g_si.pin1);
+       pOldPinData.pw = (unsigned char*)malloc(pOldPinData.pw_len);
+       memcpy(pOldPinData.pw,g_si.pin1,pOldPinData.pw_len);
+       
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1 -1; //INVALID PINTYPE
+    pNewPinData.pw_len = strlen(g_si.pin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.pin1,pNewPinData.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT, tel_change_sim_pins (&pOldPinData, &pNewPinData,&pRequestId));
+    TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_change_sim_pins() API : Invalid pin type 
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_05
+* @param [in] PinType = (TelSimPinType_t)TAPI_SIM_PTYPE_SIM+1;//<-- Invalid pintype
+* @param [in] *pOldPinData = PIN2_NORMAL
+* @param [in] *pNewPinData = PIN2_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_change_sim_pins_05()
+{
+    TET_STAMP_START("Invalid pin type ");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TelSimSecPw_t pOldPinData;
+    TelSimSecPw_t pNewPinData;
+       
+    pOldPinData.type = TAPI_SIM_PTYPE_SIM +1; //INVALID PINTYPE
+    pOldPinData.pw_len = strlen(g_si.pin1);
+       pOldPinData.pw = (unsigned char*)malloc(pOldPinData.pw_len);
+       memcpy(pOldPinData.pw,g_si.pin1,pOldPinData.pw_len);
+       
+    pNewPinData.type = TAPI_SIM_PTYPE_SIM +1; //INVALID PINTYPE
+    pNewPinData.pw_len = strlen(g_si.pin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.pin1,pNewPinData.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT,tel_change_sim_pins (&pOldPinData, &pNewPinData,&pRequestId));
+    TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_change_sim_pins() API : Positive condition(Change Pin1 coce)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_06
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = PIN1_NORMAL
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_CHANGE_PIN_CNF (TAPI_SIM_PIN_OPERATION_SUCCESS)
+*/
+void utc_tel_change_sim_pins_06()
+{
+    TET_STAMP_START("Change pin1 code successfully : Before test, you set correct PIN1_NORMAL value on 'tet_tapi_util.h'");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int tapiRet = TAPI_API_SUCCESS;
+       int pRequestId=0;
+
+       // Step 1 : enable pin
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_ENABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+    // Step 2 : now change chv
+    tet_printf("Step 2 : now change chv");
+    TelSimSecPw_t pOldPinData;
+    TelSimSecPw_t pNewPinData;
+    pOldPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pOldPinData.pw_len = strlen(g_si.pin1);
+       pOldPinData.pw = (unsigned char*)malloc(pOldPinData.pw_len);
+       memcpy(pOldPinData.pw,g_si.pin1,pOldPinData.pw_len);
+
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pNewPinData.pw_len = strlen(g_si.pin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.pin1,pNewPinData.pw_len);
+
+       tapiRet = tel_change_sim_pins(&pOldPinData, &pNewPinData,&pRequestId);
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_API_SUCCESS,tapiRet);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+       TET_STAMP_PASS();
+       
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable pin");
+       
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       return;
+}
+
+
+/**
+* @brief tel_change_sim_pins() API : Negative condition(Incorrect pin code)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_07
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = PIN1_INCORRECT
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_CHANGE_PIN_CNF (TAPI_SIM_PIN_INCORRECT_PASSWORD)
+*/
+void utc_tel_change_sim_pins_07()
+{
+    TET_STAMP_START("Change pin1 code Fail : Before test, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int tapiRet = TAPI_API_SUCCESS;
+       int pRequestId=0;
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_ENABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+     // Step 2 : now change chv
+    tet_printf("Step 2 : now change chv");
+    TelSimSecPw_t pInvalidPinData;
+    TelSimSecPw_t pNewPinData;
+    pInvalidPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pInvalidPinData.pw_len = strlen(g_si.wpin1);
+       pInvalidPinData.pw = (unsigned char*)malloc(pInvalidPinData.pw_len);
+       memcpy(pInvalidPinData.pw,g_si.wpin1,pInvalidPinData.pw_len);
+
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pNewPinData.pw_len = strlen(g_si.wpin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.wpin1,pNewPinData.pw_len);
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_change_sim_pins(&pInvalidPinData, &pNewPinData,&pRequestId);
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_API_SUCCESS,tapiRet);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+
+    TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+    TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_INCORRECT_PASSWORD, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+    TET_STAMP_PASS();
+
+exit:
+       // Step 3 : make default condition
+    tet_printf("Step 3 : disable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       return;
+}
+
+
+/**
+* @brief tel_change_sim_pins() API : Negative condition(Disable pin and try to change pin1 code)
+* @par ID: UTC_TEL_CHANGE_SIM_PINS_08
+* @pre
+*      If PIN Enable, try to diable PIN. \n
+*      (At the test function 'utc_tel_change_sim_pins_08()' check and disable PIN1 function is coded)
+* @param [in] PinType = TAPI_SIM_PTYPE_PIN1
+* @param [in] *pOldPinData = PIN1_NORMAL
+* @param [in] *pNewPinData = PIN1_CHANGED
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_OPERATION
+*/
+void utc_tel_change_sim_pins_08()
+{
+    TET_STAMP_START("Disable pin and try to change");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId=0;
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;         
+       }
+
+    // Step 2 : now change chv
+    tet_printf("Step 2 : now change chv");
+    TelSimSecPw_t pOldPinData;
+    TelSimSecPw_t pNewPinData;
+    pOldPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pOldPinData.pw_len = strlen(g_si.pin1);
+       pOldPinData.pw = (unsigned char*)malloc(pOldPinData.pw_len);
+       memcpy(pOldPinData.pw,g_si.pin1,pOldPinData.pw_len);
+
+    pNewPinData.type = TAPI_SIM_PTYPE_PIN1;
+    pNewPinData.pw_len = strlen(g_si.pin1);
+       pNewPinData.pw = (unsigned char*)malloc(pNewPinData.pw_len);
+       memcpy(pNewPinData.pw,g_si.pin1,pNewPinData.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_OPERATION,tel_change_sim_pins(&pOldPinData, &pNewPinData,&pRequestId));
+    TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.h b/TC/telephony_TC/sim/unit/uts_tel_change_sim_pins.h
new file mode 100644 (file)
index 0000000..4df7873
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_CHANGE_SIM_PINS_H_
+#define _UTS_TEL_CHANGE_SIM_PINS_H_
+
+       static void utc_tel_change_sim_pins_01();
+       static void utc_tel_change_sim_pins_02();
+       static void utc_tel_change_sim_pins_03();
+       static void utc_tel_change_sim_pins_04();
+       static void utc_tel_change_sim_pins_05();
+       static void utc_tel_change_sim_pins_06();
+       static void utc_tel_change_sim_pins_07();
+       static void utc_tel_change_sim_pins_08();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.c b/TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.c
new file mode 100644 (file)
index 0000000..fc416e8
--- /dev/null
@@ -0,0 +1,463 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PB_DELETE_RECORD tel_delete_sim_pb_record
+*
+* @brief Unit test code for tel_delete_sim_pb_record()
+* @par Test function Prototype:
+*      TapiResult_t tel_delete_sim_pb_record(TelSimPbFileType_t StorageFileType, unsigned short RecordIndex, int* pRequestId);
+* @par Test function description:
+*      This API is used to delete a SIM phone book record.
+* @par Important Notes:
+*      The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+* @param [in] StorageFileType    Different storage types to be selected in SIM.
+* @param [in]  RecordIndex  Index of the record to be deleted.
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+* @pre
+*      - Phonebook supported SIM used for test
+*      - SIM Phonebook data backup is required(After test, some phonebook record is deleted)
+* @post
+*      - Restore SIM phonebook data
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_delete_sim_pb_record.c
+* @brief       Test for the tel_delete_sim_pb_record() API that is used to access for delete a SIM phonebook record
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_delete_sim_pb_record.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_delete_sim_pb_record_01, 1},
+       {utc_tel_delete_sim_pb_record_02, 2},
+       {utc_tel_delete_sim_pb_record_03, 3},
+       {utc_tel_delete_sim_pb_record_04, 4},
+       {utc_tel_delete_sim_pb_record_05, 5},
+       {utc_tel_delete_sim_pb_record_06, 6},
+       {utc_tel_delete_sim_pb_record_07, 7},
+       {utc_tel_delete_sim_pb_record_08, 8},
+       {NULL, 0}
+};
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+       case TAPI_EVENT_SIM_PB_ACCESS_READ_CNF:
+       {
+                tet_printf("[SIM APP]*****************TAPI_EVENT_SIM_PB_ACCESS_READ_CNF***************************");
+                tet_printf("[SIM APP]SIM PB access read event status = [%x]", sim_event->Status);
+
+                TelSimPbRecordData_t *sim_acces_info = (TelSimPbRecordData_t*)sim_event->pData;
+                tet_printf("[SIM APP]storaget type is [%x]",sim_acces_info->StorageFileType);
+                tet_printf(" SIM phone book access error [%d]", sim_event->Status);
+                tet_printf("********************************************");
+                gAsyncResult = TRUE;
+                bReceived = TRUE;
+        }
+        break;
+
+        case TAPI_EVENT_SIM_PB_DELETE_CNF:
+        {
+                tet_printf("[SIM APP]*****************TAPI_EVENT_SIM_PB_DELETE_CNF***************************");
+                tet_printf("SIM Delete PB event status = [%x]", sim_event->Status);
+
+               // TelSimPbUpdateResp_t *pDeleteResp = (TelSimPbUpdateResp_t*)sim_event->pData;
+               // tet_printf(" Storage File Type [%d]", pDeleteResp->PbStorageInfo.StorageFileType);
+               // tet_printf(" Storage File Index [%d]",  pDeleteResp->PbIndex);
+                tet_printf("*******************************************");
+                gAsyncResult = TRUE;
+                bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("Info : TAPI_EVENT_SIM_PB_DELETE_CNF = %d", TAPI_EVENT_SIM_PB_DELETE_CNF);
+            tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_read_sim_pb_record Test Start");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_DELETE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_read_sim_pb_record Finished");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_delete_sim_pb_record() API : Negative condition(Low boundary test)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_01
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_delete_sim_pb_record_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 1");
+       TelSimPbFileType_t StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+       unsigned short Index=1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_delete_sim_pb_record() API : Negative condition(Upper boundary test)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_02
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_delete_sim_pb_record_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 2");
+       TelSimPbFileType_t StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+       unsigned short Index=1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Negative condition(NULL parameter)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_03
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [in] Index = 1
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_delete_sim_pb_record_03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 3");
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       unsigned short Index=1;
+
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_delete_sim_pb_record(StorageFileType,Index,NULL));   //<-------------------- Invalid value
+       TET_STAMP_PASS();
+       return; 
+}
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Positive condition(Delete for a Phonebook FDN record)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_04
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*/
+void utc_tel_delete_sim_pb_record_04()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_FDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+       TapiResult_t ret;
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_FDN;
+    unsigned short Index = 1;
+    int pRequestId=0;
+
+       gAsyncResult =FALSE;
+
+    ret = tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId);
+       
+       G_MAIN_LOOP_RUN(2);
+       
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Positive condition(Delete for a Phonebook LDN record)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_05
+* @param [in] StorageFileType = TAPI_SIM_PB_LDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*/
+void utc_tel_delete_sim_pb_record_05()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_LDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_LDN;
+    unsigned short Index = 1;
+    int pRequestId=0;
+       TapiResult_t ret;
+
+       gAsyncResult =FALSE;
+       
+       ret = tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId);
+               
+       G_MAIN_LOOP_RUN(2);
+               
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Positive condition(Delete for a Phonebook MSISDN record)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_06
+* @param [in] StorageFileType = TAPI_SIM_PB_MSISDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*/
+void utc_tel_delete_sim_pb_record_06()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_MSISDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_MSISDN;
+       unsigned short Index = 1;
+       int pRequestId=0;
+       TapiResult_t ret;
+       
+       gAsyncResult =FALSE;
+               
+       ret = tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId);
+                       
+       G_MAIN_LOOP_RUN(2);
+                       
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Positive condition(Delete for a Phonebook ADN record)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_07
+* @param [in] StorageFileType = TAPI_SIM_PB_ADN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*/
+void utc_tel_delete_sim_pb_record_07()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_ADN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_ADN;
+       unsigned short Index = 1;
+       int pRequestId=0;
+       TapiResult_t ret;
+       
+       gAsyncResult =FALSE;
+               
+       ret = tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId);
+                       
+       G_MAIN_LOOP_RUN(2);
+                       
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_delete_sim_pb_record() API : Positive condition(Delete for a Phonebook SDN record)
+* @par ID: UTC_TEL_DELETE_SIM_PB_RECORD_08
+* @param [in] StorageFileType = TAPI_SIM_PB_SDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_DELETE_CNF
+*/
+void utc_tel_delete_sim_pb_record_08()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_SDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_SDN;
+       unsigned short Index = 1;
+       int pRequestId=0;
+       TapiResult_t ret;
+       
+       gAsyncResult =FALSE;
+               
+       ret = tel_delete_sim_pb_record(StorageFileType,Index,&pRequestId);
+                       
+       G_MAIN_LOOP_RUN(2);
+                       
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.h b/TC/telephony_TC/sim/unit/uts_tel_delete_sim_pb_record.h
new file mode 100644 (file)
index 0000000..3f09769
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_DELETE_SIM_PB_RECORD_H_
+#define _UTS_TEL_DELETE_SIM_PB_RECORD_H_
+
+       static void utc_tel_delete_sim_pb_record_01 ();
+       static void utc_tel_delete_sim_pb_record_02 ();
+       static void utc_tel_delete_sim_pb_record_03 ();
+       static void utc_tel_delete_sim_pb_record_04 ();
+       static void utc_tel_delete_sim_pb_record_05 ();
+       static void utc_tel_delete_sim_pb_record_06 ();
+       static void utc_tel_delete_sim_pb_record_07 ();
+       static void utc_tel_delete_sim_pb_record_08 ();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.c b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.c
new file mode 100644 (file)
index 0000000..53d5937
--- /dev/null
@@ -0,0 +1,460 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_DISABLE_FDN tel_disable_sim_fdn
+*
+* @brief Unit test code for tel_disable_sim_fdn()
+* @par Test function Prototype:
+*       TapiResult_t   tel_disable_sim_fdn     (const char* pPinData, int *pRequestId);
+* @par Test function description:
+*      This function is used to disable FDN mode
+* @par Important Notes:
+ * An unsolicited event TAPI_EVENT_SIM_FDN_STATUS_IND is notified to indicate
+ * whenever FDN status is changed(disabled/enabled)
+* @param [in] pPinData
+*   User entered PIN2 data. (NULL terminated string)
+* @param [out] pRequestId
+*   - Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_FDN_CNF
+*      - TAPI_EVENT_SIM_ENABLE_FDN_CNF
+*      - TAPI_EVENT_SIM_FDN_STATUS_IND
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_disable_sim_fdn.c
+* @brief       Test for the tel_disable_sim_fdn() API that is used to disable FDN mode
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_disable_sim_fdn.h"
+#include "sim_common.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_disable_sim_fdn_01, 1},
+       {utc_tel_disable_sim_fdn_02, 2},
+       {utc_tel_disable_sim_fdn_03, 3},
+       {utc_tel_disable_sim_fdn_04, 4},
+
+       {NULL, 0}
+};
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_fdn_process_for_condition(int wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       int fdn_status = 0; //dis(0)/enable(1)
+       int pin2_len = 0;
+       char* pin2 = NULL;
+       
+       tet_printf("wish_condition[%d]: 0-dis, 1- enabled",wish_condition);
+
+       tapiRet = tel_get_sim_fdn_status(&fdn_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_fdn_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(fdn_status == 0 )
+       {
+               tet_printf("current fdn status is disable");
+       }
+       else if(fdn_status == 1)
+       {
+               tet_printf("current fdn status is enable");
+       }
+       else
+       {
+               tet_printf("current fdn status is unhandled status[%d]",fdn_status );
+               return -1;
+       }
+
+       if(fdn_status == wish_condition )
+       {
+               tet_printf("current fdn status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current fdn status is different with wished condition");
+               
+               pin2_len = strlen(g_si.pin2);
+               pin2 = (char*)malloc(pin2_len);
+               memcpy(pin2,g_si.pin2,pin2_len);
+
+               gAsyncResult = FALSE;
+                       
+               if(wish_condition == 0)
+               {
+                       tet_printf("make fdn status with wished condition - disable");
+
+                       tapiRet = tel_disable_sim_fdn((const unsigned char*)pin2,&pin2_len,&pRequestId);
+               }
+               else if(wish_condition == 1)
+               {
+                       tet_printf("make fdn status with wished condition - enable");           
+                       tapiRet = tel_enable_sim_fdn((const unsigned char*)pin2,&pin2_len,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+                       
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling fdn for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       tet_printf("after pre/post condition tc api - wait start");             
+                       G_MAIN_LOOP_RUN(2);
+                       tet_printf("after pre/post condition tc api - wait stop");      
+               }
+
+               if(gAsyncResult == TRUE)
+                       return 0;
+               else
+                       return -1;
+       }
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+        case TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF:
+        {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF (%d) ***************************\n", TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF);
+            tet_printf("SIM Enable FDN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        case TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF:
+        {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF (%d) ***************************\n", TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF);
+            tet_printf("SIM Disable FDN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+               default:
+               {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+static void startup()
+{
+    tet_infoline("utc_tel_disable_sim_fdn Test Start\n");
+
+       sim_pin_info_setup();
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+        tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+        tel_register_event(TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+
+               gStartupSuccess = TRUE;
+
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_disable_sim_fdn Test Finished\n");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_disable_sim_fdn() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_DISABLE_SIM_FDN_01
+* @param [in] *pPinData = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_fdn_01()
+{
+    TET_STAMP_START("NULL parameter test 1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+    int len = 0;
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_disable_sim_fdn(NULL,&len, &pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_disable_sim_fdn() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_DISABLE_SIM_FDN_02
+* @param [in] *pPinData = PIN1_NORMAL
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_fdn_02()
+{
+    TET_STAMP_START("NULL parameter test 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pin2_len = strlen(g_si.pin2);
+       char* pPinData = (char*)malloc(pin2_len);
+       memcpy(pPinData, g_si.pin2, pin2_len);
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_disable_sim_fdn((const unsigned char*)pPinData, &pin2_len, NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+void utc_tel_disable_sim_fdn_03()
+{
+    TET_STAMP_START("PIN2_INCORRECT test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int tapiRet = TAPI_API_SUCCESS;
+    int pRequestId = 0;
+    int pin2_len = 0;
+    char* pPinData = NULL;
+       
+    tet_printf("Step 1 : enable fdn");
+       if( 0 != sim_fdn_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       tet_printf("Step 2 : disable fdn with incorrect pin2");
+       pPinData = (char*)malloc(pin2_len);
+       pin2_len = strlen(g_si.wpin2);
+       memcpy(pPinData, g_si.wpin2, pin2_len);
+
+       gAsyncResult = FALSE;
+
+    tapiRet = tel_disable_sim_fdn((const unsigned char*)pPinData, &pin2_len, &pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+       tet_printf("after real tc api - wait start");
+       
+       G_MAIN_LOOP_RUN(2);
+       
+       tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_INCORRECT_PASSWORD, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+       TET_STAMP_PASS();
+       
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable fdn");
+       
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       gAsyncResult = FALSE;
+       return;
+}
+
+void utc_tel_disable_sim_fdn_04()
+{
+    TET_STAMP_START("PIN2_CORRECT test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int tapiRet = TAPI_API_SUCCESS;
+    int pRequestId = 0;
+    int pin2_len = 0;
+    char* pPinData = NULL;
+       
+    tet_printf("Step 1 : enable fdn");
+       if( 0 != sim_fdn_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       tet_printf("Step 2 : disable fdn with correct pin2");
+       pPinData = (char*)malloc(pin2_len);
+       pin2_len = strlen(g_si.pin2);
+       memcpy(pPinData, g_si.pin2, pin2_len);
+
+       gAsyncResult = FALSE;
+
+    tapiRet = tel_disable_sim_fdn((const unsigned char*)pPinData, &pin2_len, &pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+       tet_printf("after real tc api - wait start");
+       
+       G_MAIN_LOOP_RUN(2);
+       
+       tet_printf("after real tc api - wait stop");
+
+
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+       TET_STAMP_PASS();
+       
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable fdn");
+       
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       gAsyncResult = FALSE;
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.h b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_fdn.h
new file mode 100644 (file)
index 0000000..8c7a061
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_FDN_DISABLE_H_
+#define _UTS_TAPI_FDN_DISABLE_H_
+
+       static void utc_tel_disable_sim_fdn_01 ();
+       static void utc_tel_disable_sim_fdn_02 ();
+       static void utc_tel_disable_sim_fdn_03 ();
+       static void utc_tel_disable_sim_fdn_04 ();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.c b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.c
new file mode 100644 (file)
index 0000000..efe8ccd
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TEL_DISABLE_PERSONALISATION tel_disable_sim_personalization\r
+*\r
+* @brief Unit test code for tel_disable_sim_personalization()\r
+* @par Test function Prototype:\r
+*       int tel_disable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id)\r
+* @par Test function description:\r
+*      This API is used to disable the network personalisation feature.\r
+* @par Important Notes:\r
+*      None\r
+* @param [in] TelSimPersPw_t\r
+*      The information required to disable network personalisation.\r
+*      @code\r
+       typedef struct\r
+       {\r
+                       TelSimPersType_t        type;\r
+                       unsigned char*  pw;\r
+                       unsigned int            pw_len;\r
+       } TelSimPersPw_t;\r
+*      @endcode\r
+* @param [out] pRequestId   Unique identifier for a particular request.\r
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully\r
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.\r
+* @par Async Response Message:\r
+* The event associated is TAPI_EVENT_SIM_DISABLE_PERS_CNF\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (TapiResult_t)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_disable_sim_personalization.c\r
+* @brief\r
+       Test for the tel_disable_sim_personalization() API that is used to disable the network personalisation feature \n\r
+       Test for the tel_enable_sim_personalization() API that is used to enable the network personalisation feature\r
+* @author      \r
+* @version     Initial Creation V0.1\r
+* @date                2010.10.05\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+#include "uts_tel_disable_sim_personalization.h"\r
+\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_disable_sim_personalization01, 1},\r
+       {utc_tel_disable_sim_personalization02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/*\r
+  User Defined Handler\r
+*/\r
+// Global variable for user data\r
+static BOOL gAsyncResult; //user defined data : Async callback is called or not\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static BOOL gStartupSuccess = FALSE;\r
+static unsigned int subscription_id = 0;\r
+\r
+\r
+/*\r
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////\r
+*/\r
+// Prototype : User must add function body\r
+gboolean g_timeout_callback (void *data);\r
+\r
+// GMainLoop global handler\r
+GMainLoop *sim_loop = NULL;\r
+\r
+void G_MAIN_LOOP_CLOSE()\r
+{\r
+    g_main_loop_quit(sim_loop);\r
+}\r
+\r
+int G_MAIN_LOOP_RUN(int sec)\r
+{\r
+       sim_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);\r
+       g_main_loop_run (sim_loop);\r
+\r
+       return 0;\r
+}\r
+\r
+gboolean g_timeout_callback (void *data)\r
+{\r
+       gAsyncResult = FALSE;\r
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");\r
+       G_MAIN_LOOP_CLOSE();\r
+       return FALSE;\r
+}\r
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////\r
+\r
+\r
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)\r
+{\r
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");\r
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);\r
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);\r
+\r
+    gAsyncResult = FALSE;\r
+    BOOL bReceived = FALSE;\r
+\r
+    switch(sim_event->EventType)\r
+    {\r
+               case TAPI_EVENT_SIM_DISABLE_PERS_CNF:\r
+               {\r
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_DISABLE_PERS_CNF******\n");\r
+                       tet_printf("[SIM]SIM personalization status event status  = [0x%x]\n", sim_event->Status);\r
+                       bReceived = TRUE;\r
+                       gAsyncResult = TRUE;\r
+               }\r
+               break;\r
+\r
+        default:\r
+        {\r
+                       bReceived = TRUE;\r
+                       gAsyncResult = FALSE;\r
+                       tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);\r
+                       tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);\r
+               }\r
+               break;\r
+    }//end switch\r
+\r
+    if (bReceived == TRUE)\r
+      G_MAIN_LOOP_CLOSE();\r
+\r
+    return 0;\r
+}\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_disable_sim_personalization_status Test Start\n");\r
+\r
+       if ( tel_init() == TAPI_API_SUCCESS)\r
+       {\r
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_DISABLE_PERS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )\r
+                       gStartupSuccess = TRUE;\r
+               else\r
+                       tet_infoline("startup fail. tel_register_event() failed");\r
+       } else {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+\r
+        tel_register_app_name("org.samsung.test");\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_disable_sim_personalization_status Test Finished\n");\r
+\r
+    if (gStartupSuccess == TRUE)\r
+       {\r
+               tel_deregister_event(subscription_id);\r
+       }\r
+       tel_deinit();\r
+    return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+void utc_tel_disable_sim_personalization01()\r
+{\r
+       TET_STAMP_START("utc_tel_disable_sim_personalization01 -TAPI_API_INVALID_PTR");\r
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_disable_sim_personalization (NULL, NULL));\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+\r
+void utc_tel_disable_sim_personalization02()\r
+{\r
+       TET_STAMP_START("utc_tel_disable_sim_personalization02 ");\r
+       int pRequestId=0;\r
+       TelSimPersPw_t lock_pers = {0,};\r
+       lock_pers.type = TAPI_SIM_PERS_NET;\r
+       lock_pers.pw_len =      8;\r
+       lock_pers.pw = (unsigned char*)malloc(8);\r
+       memcpy(lock_pers.pw,"00000000",8);\r
+\r
+       gAsyncResult = FALSE;\r
+                                       \r
+       TET_CHECK(TAPI_API_SUCCESS,tel_disable_sim_personalization(&lock_pers, &pRequestId));\r
+                                                               \r
+       G_MAIN_LOOP_RUN(2);\r
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return\r
+       TET_STAMP_PASS();\r
+       return;\r
+\r
+}\r
+\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.h b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_personalization.h
new file mode 100644 (file)
index 0000000..a15f2f1
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+#ifndef _UTS_TEL_DISABLE_SIM_PERSONALIZATION_H_\r
+#define _UTS_TEL_DISABLE_SIM_PERSONALIZATION_H_\r
+       static void utc_tel_disable_sim_personalization01();\r
+       static void utc_tel_disable_sim_personalization02();\r
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.c b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.c
new file mode 100644 (file)
index 0000000..c64d8cb
--- /dev/null
@@ -0,0 +1,549 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_DISABLE_PIN tel_disable_sim_security
+*
+* @brief Unit test code for tel_disable_sim_security()
+* @par Test function Prototype:
+*      TapiResult_t tel_disable_sim_security   (const TelSimPinData_t* pPinData, int *pRequestId);
+* @par Test function description:
+*      This function disables the PIN based on the Pin type and pin data passed from Application.
+* @par Important Notes:
+*   For PIN2, disabling applies only for 3G USIMs and when PIN2 in NOT mapped to CHV2 of GSM application.
+*      Based on Pin status (PIN/UPIN/PUK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
+*      is published to Applications.
+* @param [in] pPinData
+*      #TelSimPinData_t type of user entered Pin disable data and pin type
+* @code
+typedef struct
+{
+    TelSimPinType_t    PinType;        // Pin type
+    char               szPinCode[TAPI_SIM_PIN_LENGTH+1]; //PIN code
+} TelSimPinData_t;
+
+typedef enum
+{
+    TAPI_SIM_PTYPE_PIN1        = 0x00,         // PIN 1
+    TAPI_SIM_PTYPE_PIN2        = 0x01,         // PIN 2
+    TAPI_SIM_PTYPE_PUK1        = 0x02,         // Puk 1
+    TAPI_SIM_PTYPE_PUK2        = 0x03,         // Puk 2
+    TAPI_SIM_PTYPE_UPIN        = 0x04,         // Universal PIN
+    TAPI_SIM_PTYPE_ADM = 0x05          // Administrator
+} TelSimPinType_t;
+* @endcode
+* @param [out] pRequestId
+*   - Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_PIN_CNF
+*      - TAPI_EVENT_SIM_ENABLE_PIN_CNF
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_disable_sim_security.c
+* @brief       Test for the tel_disable_sim_security() API that is used to disable PIN
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_disable_sim_security.h"
+#include "sim_common.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_disable_sim_security_01, 1},
+       {utc_tel_disable_sim_security_02, 2},
+       {utc_tel_disable_sim_security_03, 3},
+       {utc_tel_disable_sim_security_04, 4},
+       {utc_tel_disable_sim_security_05, 5},
+       {utc_tel_disable_sim_security_06, 6},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_pin_process_for_condition(TelSimPinType_t wish_pin, TelSimPinStatus_t wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimPinStatus_t pin_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       
+       tet_printf("pin[%d]:0-pin1, 1-pin2, wish_condition[%d]: 0-dis, 1- enabled, 2-blocked(puk)",wish_pin, wish_condition);
+
+       tapiRet = tel_get_sim_security_status(wish_pin,&pin_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_security_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(pin_status == TAPI_SIM_PIN_STATUS_DISABLED )
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_DISABLED");
+       }
+       else if(pin_status == TAPI_SIM_PIN_STATUS_ENABLED)
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_ENABLED");
+       }
+       else
+       {
+               tet_printf("current pin status is unhandled status[%d]",pin_status );
+               return -1;
+       }
+
+       if(pin_status == wish_condition )
+       {
+               tet_printf("current pin status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current pin status is different with wished condition");    
+               sec_data.type = wish_pin;
+
+               if(wish_pin == TAPI_SIM_PTYPE_PIN1 )
+               {
+                       sec_data.pw_len = strlen(g_si.pin1);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+               }
+               else if(wish_pin == TAPI_SIM_PTYPE_PIN2)
+               {
+                       sec_data.pw_len = strlen(g_si.pin2);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin2,sec_data.pw_len);
+               }
+
+               gAsyncResult = FALSE;
+               
+               if(wish_condition == TAPI_SIM_PIN_STATUS_DISABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_DISABLED)");
+
+                       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+               }
+               else if(wish_condition == TAPI_SIM_PIN_STATUS_ENABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_ENABLED)");               
+                       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+               
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling pin for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       G_MAIN_LOOP_RUN(3);
+               }
+
+               if(gAsyncResult == TRUE)
+                       return 0;
+               else
+                       return -1;
+       }
+
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    switch(sim_event->EventType)
+    {
+        case TAPI_EVENT_SIM_ENABLE_SEC_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Enable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+        }
+        break;
+
+        case TAPI_EVENT_SIM_DISABLE_SEC_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_DISABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+        }
+        break;
+
+        default:
+        {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM]Undhandled event type [%d]\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+
+static void startup()
+{
+       tet_infoline("utc_tel_disable_sim_security Test Start\n");
+
+       sim_pin_info_setup();
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+        tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+
+               gStartupSuccess = TRUE;
+
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_disable_sim_security Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_disable_sim_security() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_01
+* @param [in] &pPinData = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_security_01()
+{
+    TET_STAMP_START("NULL parameter test 1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_disable_sim_security(NULL,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_disable_sim_security() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_02
+* @param [in] &pPinData.szPinCode = PIN1_NORMAL
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_security_02()
+{
+    TET_STAMP_START("NULL parameter test 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);  
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_disable_sim_security(&sec_data,NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_disable_sim_security() API : Low boundary test
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_03
+* @param [in] &pPinData.PinType = TAPI_SIM_PTYPE_PIN1-1; //<---- Invalid value
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_disable_sim_security_03()
+{
+    TET_STAMP_START("Invalid Input test 1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId = 0;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1 -1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT, tel_disable_sim_security(&sec_data,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_disable_sim_security() API : Upper boundary test
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_04
+* @param [in] &pPinData.PinType = TAPI_SIM_PTYPE_ADM+1; //<---- Invalid value
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_disable_sim_security_04()
+{
+    TET_STAMP_START("Invalid Input test 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId = 0;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1 +1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT, tel_disable_sim_security(&sec_data,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+
+/**
+* @brief tel_disable_sim_security() API : Invalid parameter(PIN1_INCORRECT)
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_05
+* @param [in] &pPinData.szPinCode = PIN1_INCORRECT; //<---- Invalid value
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_PIN_CNF (TAPI_SIM_PIN_INCORRECT_PASSWORD)
+*/
+void utc_tel_disable_sim_security_05()
+{
+    TET_STAMP_START("PIN1_INCORRECT test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_ENABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       // Step 2 : disable pin
+    tet_printf("Step 2 : disable pin");
+       int pRequestId = 0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.wpin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.wpin1,sec_data.pw_len);
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_SIM_PIN_INCORRECT_PASSWORD, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+    TET_STAMP_PASS();
+    tet_printf("finish case"); 
+       return;
+}
+
+
+/**
+* @brief tel_disable_sim_security() API : Normal operation
+* @par ID: UTC_TEL_DIsABLE_SIM_SECURITY_06
+* @param [in] &pPinData
+       pPinData.szPinCode = PIN1_NORMAL
+       pPinData.PinType=TAPI_SIM_PTYPE_PIN1
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_PIN_CNF (TAPI_SIM_PIN_OPERATION_SUCCESS)
+*/
+void utc_tel_disable_sim_security_06()
+{
+    TET_STAMP_START("PIN1_NORMAL test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_ENABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       // Step 2 : disable pin
+    tet_printf("Step 2 : disable pin");
+       int pRequestId = 0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+    TET_STAMP_PASS();
+    tet_printf("finish case"); 
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.h b/TC/telephony_TC/sim/unit/uts_tel_disable_sim_security.h
new file mode 100644 (file)
index 0000000..9516d0f
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_DIsABLE_SIM_SECURITY_H_
+#define _UTS_TEL_DIsABLE_SIM_SECURITY_H_
+
+       static void utc_tel_disable_sim_security_01();
+       static void utc_tel_disable_sim_security_02();
+       static void utc_tel_disable_sim_security_03();
+       static void utc_tel_disable_sim_security_04();
+       static void utc_tel_disable_sim_security_05();
+       static void utc_tel_disable_sim_security_06();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.c b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.c
new file mode 100644 (file)
index 0000000..04a340d
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_ENABLE_FDN tel_enable_sim_fdn
+*
+* @brief Unit test code for tel_enable_sim_fdn()
+* @par Test function Prototype:
+*      TapiResult_t tel_enable_sim_fdn(const char* pPinData, int *pRequestId);
+* @par Test function description:
+*      This function enables the FDN Mode
+* @par Important Notes:
+*      An unsolicited event TAPI_EVENT_SIM_FDN_STATUS_IND is notified to indicate
+*      whenever FDN status is changed(disabled/enabled)
+* @param [in] pPinData
+*      User entered PIN2 data. (NULL terminated string)
+* @param [out] pRequestId
+*   - Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure. * @par Async Response Message:
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_FDN_CNF
+*      - TAPI_EVENT_SIM_ENABLE_FDN_CNF
+*      - TAPI_EVENT_SIM_STATUS_IND
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_enable_sim_fdn.c
+* @brief       Test for the tel_enable_sim_fdn() API that is used to enable FDN mode
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_enable_sim_fdn.h"
+#include "sim_common.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_enable_sim_fdn_01, 1},
+       {utc_tel_enable_sim_fdn_02, 2},
+       {utc_tel_enable_sim_fdn_03, 3},
+       {utc_tel_enable_sim_fdn_04, 4},
+
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_fdn_process_for_condition(int wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       int fdn_status = 0; //dis(0)/enable(1)
+       int pin2_len = 0;
+       char* pin2 = NULL;
+       
+       tet_printf("wish_condition[%d]: 0-dis, 1- enabled",wish_condition);
+
+       tapiRet = tel_get_sim_fdn_status(&fdn_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_fdn_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(fdn_status == 0 )
+       {
+               tet_printf("current fdn status is disable");
+       }
+       else if(fdn_status == 1)
+       {
+               tet_printf("current fdn status is enable");
+       }
+       else
+       {
+               tet_printf("current fdn status is unhandled status[%d]",fdn_status );
+               return -1;
+       }
+
+       if(fdn_status == wish_condition )
+       {
+               tet_printf("current fdn status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current fdn status is different with wished condition");
+
+               pin2_len = strlen(g_si.pin2);
+               pin2 = (char*)malloc(pin2_len);
+               memcpy(pin2,g_si.pin2,pin2_len);
+
+               gAsyncResult = FALSE;
+                       
+               if(wish_condition == 0)
+               {
+                       tapiRet = tel_disable_sim_fdn((const unsigned char*)pin2,&pin2_len,&pRequestId);
+               }
+               else if(wish_condition == 1)
+               {
+                       tapiRet = tel_enable_sim_fdn((const unsigned char*)pin2,&pin2_len,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+                       
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling fdn for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       G_MAIN_LOOP_RUN(2);
+               }
+
+               if(gAsyncResult == TRUE)
+                       return 0;
+               else
+                       return -1;
+       }
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+        case TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF (%d) ***************************\n", TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF);
+            tet_printf("SIM Enable FDN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        case TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF (%d) ***************************\n", TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF);
+            tet_printf("SIM Disable FDN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_enable_sim_fdn Test Start\n");
+
+       sim_pin_info_setup();
+
+       if (tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               gStartupSuccess = TRUE;
+
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_enable_sim_fdn Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_enable_sim_fdn() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_FDN_01
+* @param [in] *pPinData = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_fdn_01()
+{
+       TET_STAMP_START("NULL parameter test 1");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+       
+       int pRequestId=0;
+       int len = 0;
+       
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_enable_sim_fdn(NULL,&len, &pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+       
+/**
+* @brief tel_enable_sim_fdn() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_FDN_02
+* @param [in] *pPinData = PIN1_NORMAL
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_fdn_02()
+{
+       TET_STAMP_START("NULL parameter test 2");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+       
+       int pin2_len = strlen(g_si.pin2);
+       char* pPinData = (char*)malloc(pin2_len);
+       memcpy(pPinData, g_si.pin2, pin2_len);
+
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_enable_sim_fdn((const unsigned char*)pPinData, &pin2_len, NULL));
+       TET_STAMP_PASS();
+       return;
+}
+
+       
+void utc_tel_enable_sim_fdn_03()
+{
+       TET_STAMP_START("PIN2_INCORRECT test");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+       
+       int tapiRet = TAPI_API_SUCCESS;
+       int pRequestId = 0;
+       int pin2_len = 0;
+       char* pPinData = NULL;
+               
+       tet_printf("Step 1 : disable fdn");
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+       
+       tet_printf("Step 2 : enable fdn with incorrect pin2");
+       pPinData = (char*)malloc(pin2_len);
+       pin2_len = strlen(g_si.wpin2);
+       memcpy(pPinData, g_si.wpin2, pin2_len);
+       
+       gAsyncResult = FALSE;
+       
+       tapiRet = tel_enable_sim_fdn((const unsigned char*)pPinData, &pin2_len, &pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+       
+       tet_printf("after real tc api - wait start");
+       
+       G_MAIN_LOOP_RUN(2);
+       
+       tet_printf("after real tc api - wait stop");
+
+       
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_INCORRECT_PASSWORD, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+       TET_STAMP_PASS();
+               
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable fdn");
+               
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       return;
+}
+
+       
+void utc_tel_enable_sim_fdn_04()
+{
+       TET_STAMP_START("PIN2_CORRECT test");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+       
+       int tapiRet = TAPI_API_SUCCESS;
+       int pRequestId = 0;
+       int pin2_len = 0;
+       char* pPinData = NULL;
+               
+       tet_printf("Step 1 : disable fdn");
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+       
+       tet_printf("Step 2 : enable fdn with correct pin2");
+       pPinData = (char*)malloc(pin2_len);
+       pin2_len = strlen(g_si.pin2);
+       memcpy(pPinData, g_si.pin2, pin2_len);
+
+       gAsyncResult = FALSE;
+       
+       tapiRet = tel_enable_sim_fdn((const unsigned char*)pPinData, &pin2_len, &pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+       
+       tet_printf("after real tc api - wait start");
+       
+       G_MAIN_LOOP_RUN(2);
+       
+       tet_printf("after real tc api - wait stop");
+
+       
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+       TET_STAMP_PASS();
+               
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable fdn");
+               
+       if( 0 != sim_fdn_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.h b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_fdn.h
new file mode 100644 (file)
index 0000000..37e04ea
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_enable_sim_fdn_H_
+#define _uts_tel_enable_sim_fdn_H_
+
+       static void utc_tel_enable_sim_fdn_01();
+       static void utc_tel_enable_sim_fdn_02();
+       static void utc_tel_enable_sim_fdn_03();
+       static void utc_tel_enable_sim_fdn_04();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.c b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.c
new file mode 100644 (file)
index 0000000..3d82a12
--- /dev/null
@@ -0,0 +1,245 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TEL_ENABLE_PERSONALISATION tel_enable_sim_personalization\r
+*\r
+* @brief Unit test code for tel_enable_sim_personalization()\r
+* @par Test function Prototype:\r
+*       int tel_enable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id)\r
+* @par Test function description:\r
+*      This API is used to enable the network personalisation feature.\r
+* @par Important Notes:\r
+*      None\r
+* @param [in] TelSimPersPw_t\r
+*      The information required to enable network personalisation.\r
+*      @code\r
+       typedef struct\r
+       {\r
+                       TelSimPersType_t        type;\r
+                       unsigned char*  pw;\r
+                       unsigned int            pw_len;\r
+       } TelSimPersPw_t;\r
+*      @endcode\r
+* @param [out] pRequestId   Unique identifier for a particular request.\r
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully\r
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.\r
+* @par Async Response Message:\r
+* The event associated is TAPI_EVENT_SIM_ENABLE_PERS_CNF\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (TapiResult_t)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_enable_sim_personalization.c\r
+* @brief\r
+       Test for the tel_disable_sim_personalization() API that is used to disable the network personalisation feature \n\r
+       Test for the tel_enable_sim_personalization() API that is used to enable the network personalisation feature\r
+* @author      \r
+* @version     Initial Creation V0.1\r
+* @date                2010.10.05\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+#include "uts_tel_enable_sim_personalization.h"\r
+\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_enable_sim_personalization01, 1},\r
+       {utc_tel_enable_sim_personalization02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/*\r
+  User Defined Handler\r
+*/\r
+// Global variable for user data\r
+static BOOL gAsyncResult; //user defined data : Async callback is called or not\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static BOOL gStartupSuccess = FALSE;\r
+static unsigned int subscription_id = 0;\r
+\r
+\r
+/*\r
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////\r
+*/\r
+// Prototype : User must add function body\r
+gboolean g_timeout_callback (void *data);\r
+\r
+// GMainLoop global handler\r
+GMainLoop *sim_loop = NULL;\r
+\r
+void G_MAIN_LOOP_CLOSE()\r
+{\r
+    g_main_loop_quit(sim_loop);\r
+}\r
+\r
+int G_MAIN_LOOP_RUN(int sec)\r
+{\r
+       sim_loop = g_main_loop_new (NULL, FALSE);\r
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);\r
+       g_main_loop_run (sim_loop);\r
+\r
+       return 0;\r
+}\r
+\r
+gboolean g_timeout_callback (void *data)\r
+{\r
+       gAsyncResult = FALSE;\r
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");\r
+       G_MAIN_LOOP_CLOSE();\r
+       return FALSE;\r
+}\r
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////\r
+\r
+\r
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)\r
+{\r
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");\r
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);\r
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);\r
+\r
+    gAsyncResult = FALSE;\r
+    BOOL bReceived = FALSE;\r
+\r
+    switch(sim_event->EventType)\r
+    {\r
+               case TAPI_EVENT_SIM_ENABLE_PERS_CNF:\r
+               {\r
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_ENABLE_PERS_CNF******\n");\r
+                       tet_printf("[SIM]SIM personalization status event status  = [0x%x]\n", sim_event->Status);\r
+                       bReceived = TRUE;\r
+                       gAsyncResult = TRUE;\r
+               }\r
+               break;\r
+\r
+        default:\r
+        {\r
+                       bReceived = TRUE;\r
+                       gAsyncResult = FALSE;\r
+                       tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);\r
+                       tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);\r
+               }\r
+               break;\r
+    }//end switch\r
+\r
+    if (bReceived == TRUE)\r
+      G_MAIN_LOOP_CLOSE();\r
+\r
+    return 0;\r
+}\r
+\r
+\r
+static void startup()\r
+{\r
+    tet_infoline("utc_tel_enable_sim_personalization_status Test Start\n");\r
+\r
+       if ( tel_init() == TAPI_API_SUCCESS)\r
+       {\r
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_PERS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )\r
+                       gStartupSuccess = TRUE;\r
+               else\r
+                       tet_infoline("startup fail. tel_register_event() failed");\r
+       } else {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+\r
+        tel_register_app_name("org.samsung.test");\r
+    return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+    tet_infoline("utc_tel_enable_sim_personalization_status Test Finished\n");\r
+\r
+    if (gStartupSuccess == TRUE)\r
+       {\r
+               tel_deregister_event(subscription_id);\r
+       }\r
+       tel_deinit();\r
+    return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+void utc_tel_enable_sim_personalization01()\r
+{\r
+       TET_STAMP_START("utc_tel_enable_sim_personalization01 -TAPI_API_INVALID_PTR ");\r
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_enable_sim_personalization (NULL, NULL));\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+\r
+void utc_tel_enable_sim_personalization02()\r
+{\r
+       TET_STAMP_START("utc_tel_enable_sim_personalization02 ");\r
+       int pRequestId=0;\r
+\r
+       TelSimPersPw_t lock_pers = {0,};\r
+       lock_pers.type = TAPI_SIM_PERS_NET;\r
+       lock_pers.pw_len =      15;\r
+       lock_pers.pw = (unsigned char*)malloc(15);\r
+       memcpy(lock_pers.pw,"000000000000000",15);\r
+\r
+       gAsyncResult = FALSE;\r
+                                       \r
+       TET_CHECK(TAPI_API_SUCCESS,tel_enable_sim_personalization(&lock_pers, &pRequestId));\r
+                                                               \r
+       G_MAIN_LOOP_RUN(2);\r
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.h b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_personalization.h
new file mode 100644 (file)
index 0000000..a9be66f
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+\r
+#ifndef _UTS_TEL_ENABLE_SIM_PERSONALIZATION_H_\r
+#define _UTS_TEL_ENABLE_SIM_PERSONALIZATION_H_\r
+       static void utc_tel_enable_sim_personalization01();\r
+       static void utc_tel_enable_sim_personalization02();\r
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.c b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.c
new file mode 100644 (file)
index 0000000..860c4ee
--- /dev/null
@@ -0,0 +1,568 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_ENABLE_PIN tel_enable_sim_security
+*
+* @brief Unit test code for tel_enable_sim_security()
+* @par Test function Prototype:
+*      TapiResult_t tel_enable_sim_security  (const TelSimPinData_t* pPinData, int *pRequestId);
+* @par Test function description:
+*      This function enables the PIN based on the Pin type and pin data passed from the Application.
+* @par Important Notes:
+*   For PIN2, disabling applies only for 3G USIMs and when PIN2 in NOT mapped to CHV2 of GSM application.
+*      Based on Pin status (PIN/UPIN/PUK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
+*      is published to Applications.
+* @param [in] pPinData
+*      #TelSimPinData_t type of user entered Pin disable data and pin type
+* @code
+typedef struct
+{
+    TelSimPinType_t    PinType;        // Pin type
+    char               szPinCode[TAPI_SIM_PIN_LENGTH+1]; //PIN code
+} TelSimPinData_t;
+
+typedef enum
+{
+    TAPI_SIM_PTYPE_PIN1        = 0x00,         // PIN 1
+    TAPI_SIM_PTYPE_PIN2        = 0x01,         // PIN 2
+    TAPI_SIM_PTYPE_PUK1        = 0x02,         // Puk 1
+    TAPI_SIM_PTYPE_PUK2        = 0x03,         // Puk 2
+    TAPI_SIM_PTYPE_UPIN        = 0x04,         // Universal PIN
+    TAPI_SIM_PTYPE_ADM = 0x05          // Administrator
+} TelSimPinType_t;
+* @endcode
+* @param [out] pRequestId
+*   - Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure. * @par Async Response Message:
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_DISABLE_SEC_CNF
+*      - TAPI_EVENT_SIM_ENABLE_SEC_CNF
+*      - TAPI_EVENT_SIM_STATUS_IND
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_enable_sim_security.c
+* @brief       Test for the tel_enable_sim_security() API that is used to enable chv(Card Hoder value : PIN number)
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_enable_sim_security.h"
+#include "sim_common.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_enable_sim_security_01, 1},
+       {utc_tel_enable_sim_security_02, 2},
+       {utc_tel_enable_sim_security_03, 3},
+       {utc_tel_enable_sim_security_04, 4},
+       {utc_tel_enable_sim_security_05, 5},
+       {utc_tel_enable_sim_security_06, 6},
+
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_pin_process_for_condition(TelSimPinType_t wish_pin, TelSimPinStatus_t wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimPinStatus_t pin_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       
+       tet_printf("pin[%d]:0-pin1, 1-pin2, wish_condition[%d]: 0-dis, 1- enabled, 2-blocked(puk)",wish_pin, wish_condition);
+
+       tapiRet = tel_get_sim_security_status(wish_pin,&pin_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_security_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(pin_status == TAPI_SIM_PIN_STATUS_DISABLED )
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_DISABLED");
+       }
+       else if(pin_status == TAPI_SIM_PIN_STATUS_ENABLED)
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_ENABLED");
+       }
+       else
+       {
+               tet_printf("current pin status is unhandled status[%d]",pin_status );
+               return -1;
+       }
+
+       if(pin_status == wish_condition )
+       {
+               tet_printf("current pin status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current pin status is different with wished condition");    
+               sec_data.type = wish_pin;
+
+               if(wish_pin == TAPI_SIM_PTYPE_PIN1 )
+               {
+                       sec_data.pw_len = strlen(g_si.pin1);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+               }
+               else if(wish_pin == TAPI_SIM_PTYPE_PIN2)
+               {
+                       sec_data.pw_len = strlen(g_si.pin2);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin2,sec_data.pw_len);
+               }
+
+               gAsyncResult = FALSE;
+               
+               if(wish_condition == TAPI_SIM_PIN_STATUS_DISABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_DISABLED)");
+
+                       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+               }
+               else if(wish_condition == TAPI_SIM_PIN_STATUS_ENABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_ENABLED)");               
+                       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+               
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling pin for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       G_MAIN_LOOP_RUN(3);
+               }
+
+               if(gAsyncResult == TRUE)
+                       return 0;
+               else
+                       return -1;
+       }
+
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+        case TAPI_EVENT_SIM_ENABLE_SEC_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF (%d) ***************************\n", TAPI_EVENT_SIM_ENABLE_SEC_CNF);
+            tet_printf("SIM Enable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        case TAPI_EVENT_SIM_DISABLE_SEC_CNF:
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_DISABLE_SEC_CNF (%d) ***************************\n", TAPI_EVENT_SIM_DISABLE_SEC_CNF);
+            tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_enable_sim_security Test Start\n");
+
+       sim_pin_info_setup();
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+        tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+
+               gStartupSuccess = TRUE;
+
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       tel_register_app_name("org.samsung.test");
+    tet_printf("Test precondition : Before test, you must PIN Lock Disabled!");
+
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_enable_sim_security Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_enable_sim_security() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_01
+* @param [out] &pPindata
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_security_01()
+{
+    TET_STAMP_START("Invalid pointer test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_PTR,tel_enable_sim_security(&sec_data,NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_enable_sim_security() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_02
+* @param [out] &pPindata = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_security_02()
+{
+    TET_STAMP_START("Invalid pointer test 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TET_CHECK(TAPI_API_INVALID_PTR,tel_enable_sim_security(NULL,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_enable_sim_security() API : Lower boundary test(Invalid pin type)
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_03
+* @param [out] &pPindata.PinType = TAPI_SIM_PTYPE_PIN1-1;//<---------Invalid
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_enable_sim_security_03()
+{
+    TET_STAMP_START("Invalid Input - Lower boundary");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId = 0;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1 -1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT,tel_enable_sim_security(&sec_data,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_enable_sim_security() API : Upper boundary test(Invalid pin type)
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_04
+* @param [out] &pPindata.PinType = TAPI_SIM_PTYPE_ADM+1;//<---------Invalid
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_enable_sim_security_04()
+{
+    TET_STAMP_START("Invalid Input 2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId = 0;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_SIM +1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    TET_CHECK(TAPI_API_INVALID_INPUT,tel_enable_sim_security(&sec_data,&pRequestId));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_enable_sim_security() API : Invalid parameter
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_05
+* @param [out] &pPindata.szPinCode = PIN1_INCORRECT;
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_ENABLE_PIN_CNF (TAPI_SIM_PIN_INCORRECT_PASSWORD)
+*/
+void utc_tel_enable_sim_security_05()
+{
+    TET_STAMP_START("Incorrect password test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : disable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       // Step 2 : enable pin
+    tet_printf("Step 2 : enable pin");
+       int pRequestId = 0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.wpin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.wpin1,sec_data.pw_len);
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_SIM_PIN_INCORRECT_PASSWORD, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+    TET_STAMP_PASS();
+    tet_printf("finish case"); 
+       return;
+
+}
+
+
+/**
+* @brief tel_enable_sim_security() API : Positive condition
+* @par ID: UTC_TEL_ENABLE_SIM_SECURITY_05
+* @param [out] &pPindata.szPinCode = PIN1_NORMAL;
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPinInfo_t. \n
+* (Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_ENABLE_PIN_CNF (TAPI_SIM_PIN_OPERATION_SUCCESS)
+*/
+void utc_tel_enable_sim_security_06()
+{
+    TET_STAMP_START("Normal operation test");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : disable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       // Step 2 : enable pin
+    tet_printf("Step 2 : enable pin");
+       int pRequestId = 0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;
+       sec_data.pw_len = strlen(g_si.pin1);
+       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+
+    TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+    TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+    TET_RESULT_EQUAL_GOTO(TET_PASS,exit,TAPI_SIM_PIN_OPERATION_SUCCESS, gSimEventStatus); // If gSimEventStatus != TAPI_SIM_PIN_INCORRECT_PASSWORD, then TET_FAIL and return
+
+exit:
+       // Step 3 : make default condition
+    tet_printf("Step 3 : disable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+       }
+    tet_printf("finish case");         
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.h b/TC/telephony_TC/sim/unit/uts_tel_enable_sim_security.h
new file mode 100644 (file)
index 0000000..94b31e9
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_enable_sim_security_H_
+#define _uts_tel_enable_sim_security_H_
+
+       static void utc_tel_enable_sim_security_01();
+       static void utc_tel_enable_sim_security_02();
+       static void utc_tel_enable_sim_security_03();
+       static void utc_tel_enable_sim_security_04();
+       static void utc_tel_enable_sim_security_05();
+       static void utc_tel_enable_sim_security_06();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.c
new file mode 100644 (file)
index 0000000..dc2d0f5
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TAPI_SIM_GET_CALLFORWARDING_INFO tel_get_sim_callforwarding_info\r
+*\r
+* @brief Unit test code for tel_get_sim_callforwarding_info()\r
+* @par Test function Prototype:\r
+*      int tel_get_sim_callforwarding_info(TelSimCallForwarding_s *cf);\r
+* @par Test function description:\r
+*      This function is used to get callforwarding indication Information\r
+* @par Important Notes:\r
+*      None\r
+* @param [out] cf This parameter returns the callforwarding indication information\r
+* @code\r
+* typedef struct\r
+* {\r
+*      int b_cphs; // current data is from CPHS SIM or not\r
+*      union{\r
+*              TelSimCphsCallForwardingFlagInfo_t cphs_cf;     // information from CPHS SIM\r
+*              TelSimCallForwardingIndicationStatus_t cf;      // information from 3GPP SIM\r
+*      }cf_data_u;\r
+* }TelSimCallForwarding_s;\r
+* @endcode\r
+* @par Async Response Message:\r
+*      None\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (int)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_get_sim_callforwarding_info.c\r
+* @brief       Test for the tel_get_sim_callforwarding_info() API that is used to get callforwarding indication information\r
+* @author\r
+* @version     Initial Creation V0.1\r
+* @date                2011.08.29\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include "tet_tapi_util.h"\r
+#include "uts_tel_get_sim_callforwarding_info.h"\r
+#include "sim_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sim_callforwarding_info_01, 1},\r
+       {utc_tel_get_sim_callforwarding_info_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_callforwarding_info Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_callforwarding_info Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+/**\r
+* @brief tel_get_sim_callforwarding_info() API : Positive condition(Get callforwarding Information)\r
+* @par ID: UTC_TEL_GET_SIM_CALLFORWARDING_INFO_01\r
+* @param [out] &cf\r
+* @return TAPI_API_SUCCESS\r
+* @par Expected Result:\r
+*  - call forwarding information\r
+*/\r
+void utc_tel_get_sim_callforwarding_info_01()\r
+{\r
+    TET_STAMP_START("Normal operation");\r
+    TelSimCallForwarding_s cf;\r
+\r
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_callforwarding_info(&cf));\r
+\r
+       if( cf.b_cphs == 0 || cf.b_cphs == 1)\r
+       {\r
+               tet_printf("b_cphs[%d]",cf.b_cphs);\r
+               TET_STAMP_PASS();\r
+               return;\r
+       }\r
+       else\r
+       {\r
+               TET_STAMP_FAIL();\r
+               return;\r
+       }\r
+       return;\r
+}\r
+\r
+/**\r
+* @brief tel_get_sim_callforwarding_info() API : Negative condition(Null Parameter test)\r
+* @par ID: UTC_TEL_GET_SIM_CALLFORWARDING_INFO_02\r
+* @param [out] &cf = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+void utc_tel_get_sim_callforwarding_info_02()\r
+{\r
+    TET_STAMP_START("null pointer operation");\r
+    TelSimCallForwarding_s cf;\r
+\r
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_callforwarding_info(NULL));\r
+    TET_STAMP_PASS();\r
+    return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info.h
new file mode 100644 (file)
index 0000000..4337ca6
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_CALLFORWADING_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_CALLFORWADING_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_CALLFORWADING_INFO_ Uts_tel_get_sim_callforwarding_info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_callforwarding_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_callforwarding_info() API function\r
+* @author\r
+* @version Initial Creation Version 0.1\r
+* @date 2011.08.29\r
+*/\r
+\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include <string.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+\r
+#ifndef _UTS_TEL_GET_SIM_CALLFORWADING_INFO_H_\r
+#define _UTS_TEL_GET_SIM_CALLFORWADING_INFO_H_\r
+       static void utc_tel_get_sim_callforwarding_info_01 ();\r
+       static void utc_tel_get_sim_callforwarding_info_02 ();\r
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.c
new file mode 100644 (file)
index 0000000..f73d975
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TAPI_SIM_GET_CPHS_INFO tel_get_sim_cphs_info\r
+*\r
+* @brief Unit test code for tel_get_sim_cphs_info()\r
+* @par Test function Prototype:\r
+*      int tel_get_sim_cphs_info(TelSimCphsLocalInfo_t *cphs);\r
+* @par Test function description:\r
+*      This function is used to get CPHS specific Information\r
+* @par Important Notes:\r
+*      None\r
+* @param [out] cphs This parameter returns the CPHS specific information\r
+* @code\r
+* typedef struct\r
+* {\r
+*      int b_used; // used or not\r
+*      TelSimCphsInfo_t cphsinfo;      // cphs information\r
+*      TelSimCphsCustomerServiceProfileInfo_t csp;     // customer service profile\r
+*      TelSimCphsInformationNum_t infn;        // information numbers\r
+*      TelSimCphsOperatorName_t opname;        // operator name\r
+*      TelSimCphsOperatorShortName_t opshortform;      //operator short form\r
+*      TelSimDynamicFlagsInfo_t dflagsinfo; // Dynamic flags\r
+*      TelSimDynamic2FlagsInfo_t d2flagsinfo; // Dynamic2 flags\r
+* }TelSimCphsLocalInfo_t;\r
+* @endcode\r
+* @par Async Response Message:\r
+*      None\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (int)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_get_sim_cphs_info.c\r
+* @brief       Test for the tel_get_sim_cphs_info() API that is used to get CPHS specific information\r
+* @author\r
+* @version     Initial Creation V0.1\r
+* @date                2011.08.29\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include "tet_tapi_util.h"\r
+#include "uts_tel_get_sim_cphs_info.h"\r
+#include "sim_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sim_cphs_info_01, 1},\r
+       {utc_tel_get_sim_cphs_info_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_cphs_info Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_cphs_info Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+/**\r
+* @brief tel_get_sim_cphs_info() API : Positive condition(Get CPHS specific Information)\r
+* @par ID: UTC_TEL_GET_SIM_CPHS_INFO_01\r
+* @param [out] &cphs\r
+* @return TAPI_API_SUCCESS\r
+* @par Expected Result:\r
+*  - CPHS information\r
+*/\r
+void utc_tel_get_sim_cphs_info_01()\r
+{\r
+    TET_STAMP_START("Normal operation");\r
+    TelSimCphsLocalInfo_t cphs;\r
+\r
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_cphs_info(&cphs));\r
+\r
+       if( cphs.b_used == 0 || cphs.b_used == 1)\r
+       {\r
+               tet_printf("b_used[%d]",cphs.b_used);\r
+               TET_STAMP_PASS();\r
+               return;\r
+       }\r
+       else\r
+       {\r
+               TET_STAMP_FAIL();\r
+               return;\r
+       }\r
+       return;\r
+}\r
+\r
+/**\r
+* @brief tel_get_sim_cphs_info() API : Negative condition(Null Parameter test)\r
+* @par ID: UTC_TEL_GET_SIM_CPHS_INFO_02\r
+* @param [out] &cphs = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+void utc_tel_get_sim_cphs_info_02()\r
+{\r
+    TET_STAMP_START("null pointer operation");\r
+    TelSimCphsLocalInfo_t cphs;\r
+\r
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_cphs_info(NULL));\r
+    TET_STAMP_PASS();\r
+    return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_cphs_info.h
new file mode 100644 (file)
index 0000000..b561f7a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_CPHS_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_CPHS_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_CPHS_INFO Uts_tel_get_sim_cphs_info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_cphs_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_cphs_info() API function\r
+* @author\r
+* @version Initial Creation Version 0.1\r
+* @date 2011.08.29\r
+*/\r
+\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include <string.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+\r
+#ifndef _UTS_TEL_GET_SIM_CPHS_INFO_H_\r
+#define _UTS_TEL_GET_SIM_CPHS_INFO_H_\r
+       static void utc_tel_get_sim_cphs_info_01 ();\r
+       static void utc_tel_get_sim_cphs_info_02 ();\r
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.c
new file mode 100644 (file)
index 0000000..e626ba1
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_ECC_INFO tel_get_sim_ecc
+*
+* @brief Unit test code for tel_get_sim_ecc()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_ecc(TelSimEccData_t* pSimEccInfo, int *pCount);
+* @par Test function description:
+*      This function is a synchronous API used to get ECC data.
+* @par Important Notes:
+*      None
+* @param [out] pSimEccInfo
+*      This parameter returns the SIM emergency call code information like ecc length, service type etc.
+* @param [out] pCount
+*      Specifies number of ECC records.
+* @par Async Response Message:
+*      None
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_ecc.c
+* @brief       Test for the tel_get_sim_ecc() API that is used to get ecc info(Card type)
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_ecc.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_ecc_01, 1},
+       {utc_tel_get_sim_ecc_02, 2},
+       {utc_tel_get_sim_ecc_03, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("uts_tel_get_sim_ecc Test Start\n");
+        tel_register_app_name("org.samsung.test");
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("uts_tel_get_sim_ecc Test Finished\n");
+       return;
+}
+
+/**
+* @brief tel_get_sim_ecc() API : Normal opertion
+* @par ID: UTC_TEL_GET_SIM_ECC_01
+* @param [out] &ecc_info
+* @param [out] &ecc_rec_count
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_get_sim_ecc_01()
+{
+       TET_STAMP_START("Normal test");
+       int  ecc_rec_count = 0;
+       TelSimEccData_t  ecc_info;
+       memset(&ecc_info, 0, sizeof(ecc_info));
+
+       TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_ecc(&ecc_info, &ecc_rec_count));
+
+       tet_printf("EEC count [%d]\n",ecc_rec_count);
+
+       int i;
+       for (i=0 ; i<ecc_rec_count ; i++)
+       {
+               tet_printf("[UeccInfo %d] [bUsed = %d] [szEccAlphaIdentifier = 0x%x",
+               i, ecc_info.UeccInfo[i].bUsed, ecc_info.UeccInfo[i].szEccAlphaIdentifier);
+       }
+
+  /*
+        tet_printf("ECC1 [%s]\n",ecc_info.EccInfo.szEcc1);
+        tet_printf("ECC2 [%s]\n",ecc_info.EccInfo.szEcc2);
+        tet_printf("ECC3 [%s]\n",ecc_info.EccInfo.szEcc3);
+        tet_printf("ECC4 [%s]\n",ecc_info.EccInfo.szEcc4);
+        tet_printf("ECC5 [%s]\n",ecc_info.EccInfo.szEcc5);
+*/
+        TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_ecc() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_GET_SIM_ECC_02
+* @param [out] &ecc_info = NULL
+* @param [out] &ecc_rec_count
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_ecc_02()
+{
+    int ecc_rec_count = 0;
+    TET_STAMP_START("GET ECC INFO WITH NULL OUT PARAM");
+
+    /* Calling TAPI GET ECC INFORMATION API */
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_ecc(NULL, &ecc_rec_count));
+
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_get_sim_ecc() API : Negative condition(Second parameter is Null)
+* @par ID: UTC_TEL_GET_SIM_ECC_03
+* @param [out] &ecc_info
+* @param [out] &ecc_rec_count = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_ecc_03()
+{
+    TelSimEccData_t  ecc_info;
+    memset(&ecc_info, 0, sizeof(ecc_info));
+
+    TET_STAMP_START("GET ECC INFO WITH NULL OUT PARAM");
+
+    /* Calling TAPI GET ECC INFORMATION API */
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_ecc(&ecc_info,NULL));
+
+    TET_STAMP_PASS();
+    return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_ecc.h
new file mode 100644 (file)
index 0000000..4e1e1ee
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_ecc_H_
+#define _uts_tel_get_sim_ecc_H_
+
+       static void utc_tel_get_sim_ecc_01();
+       static void utc_tel_get_sim_ecc_02();
+       static void utc_tel_get_sim_ecc_03();
+
+#endif
+
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.c
new file mode 100644 (file)
index 0000000..b87ef15
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_FDN_STATUS tel_get_sim_fdn_status
+*
+* @brief Unit test code for tel_get_sim_fdn_status()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_fdn_status(BOOL *pFdnStatus);
+* @par Test function description:
+*      This function is a synchronous API gets the current FDN status.
+* @par Important Notes:
+*      None
+* @param [out] pFdnStatus
+*   This parameter returns the current fdn status whether enabled or disabled.
+* @par Async Response Message:
+*      None
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_fdn_status.c
+* @brief       Test for the tel_get_sim_fdn_status() API that is used to get fdn status
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_fdn_status.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_fdn_status_01, 1},
+       {utc_tel_get_sim_fdn_status_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("utc_tel_get_sim_fdn_status Test Start\n");
+       if (tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_sim_fdn_status Test Finished\n");
+       if (tel_deinit() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_deinit() failed");
+       }
+       return;
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_fdn_status() API : Positive condition(Get FDN Status)
+* @par ID: UTC_TEL_GET_SIM_FDN_STATUS_01
+* @param [out] &fdn_status
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_get_sim_fdn_status_01()
+{
+    BOOL fdn_status = 0;
+
+    TET_STAMP_START("all valid input parameter test");
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_fdn_status(&fdn_status));
+    tet_printf(" FDN status is %d", fdn_status);
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_get_sim_fdn_status() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_GET_SIM_FDN_STATUS_02
+* @param [out] &fdn_status = NULL
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_get_sim_fdn_status_02()
+{
+    TET_STAMP_START("NULL parameter test");
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_fdn_status(NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_fdn_status.h
new file mode 100644 (file)
index 0000000..31fb1b2
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_fdn_status_h_
+#define _uts_tel_get_sim_fdn_status_h_
+
+       static void utc_tel_get_sim_fdn_status_01();
+       static void utc_tel_get_sim_fdn_status_02();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.c
new file mode 100644 (file)
index 0000000..6943b75
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_IMSI_INFO tel_get_sim_imsi
+*
+* @brief Unit test code for tel_get_sim_imsi()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_imsi(TelSimImsiInfo_t* pSimImsiInfo);
+* @par Test function description:
+*      This function is used to get ISMI Information
+* @par Important Notes:
+*      None
+* @param [out] pSimImsiInfo This parameter returns the IMSI information
+* @code
+typedef struct
+{
+       BOOL    bValid;                 // Valid(ACTIVATE) IMSI (TRUE) or Deactivated (FALSE)
+       char    szMcc[TAPI_SIM_MCC_CODE_LEN+1]; // mobile country code
+       char    szMnc[TAPI_SIM_MNC_CODE_LEN+1]; // mobile network code
+       char    szMsin[TAPI_SIM_MSIN_CODE_LEN+1]; // mobile station identification number
+} TelSimImsiInfo_t;
+* @endcode
+* @par Async Response Message:
+*      None
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_imsi.c
+* @brief       Test for the tel_get_sim_imsi() API that is used to get imsi information
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_imsi.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_imsi_01, 1},
+       {utc_tel_get_sim_imsi_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("uts_tel_get_sim_imsi Test Start\n");
+       if (tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("uts_tel_get_sim_imsi Test Finished\n");
+       if (tel_deinit() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_deinit() failed");
+       }
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_get_sim_imsi() API : Positive condition(Get IMSI Information)
+* @par ID: UTC_TEL_GET_SIM_IMSI_01
+* @param [out] &sim_imsi_info
+* @return TAPI_API_SUCCESS
+* @par Expected Result:
+*  - sim_imsi_info.szMcc != NULL // mobile country code is returned
+*  - sim_imsi_info.szMnc != NULL // mobile network code is returned
+*  - sim_imsi_info.szMsin != NULL // mobile station identification number is returned
+*/
+void utc_tel_get_sim_imsi_01()
+{
+    TET_STAMP_START("Normal operation");
+    TelSimImsiInfo_t sim_imsi_info;
+
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_imsi(&sim_imsi_info));
+
+       if( sim_imsi_info.szMcc != NULL
+               && sim_imsi_info.szMnc != NULL
+               && sim_imsi_info.szMsin != NULL)
+       {
+               tet_printf("[SIM APP] IMSI [mcc,mnc,msin]= ");
+               tet_printf(" [%s]",sim_imsi_info.szMcc);
+               tet_printf(" [%s]",sim_imsi_info.szMnc);
+               tet_printf(" [%s]",sim_imsi_info.szMsin);
+               TET_STAMP_PASS();
+               return;
+       }
+       else
+       {
+               tet_printf("[SIM APP] IMSI error [mcc,mnc,msin]=[%x,%x,%x]\n",
+                                       sim_imsi_info.szMcc, sim_imsi_info.szMnc,
+                                       sim_imsi_info.szMsin);
+               TET_STAMP_FAIL();
+               return;
+       }
+       return;
+}
+
+/**
+* @brief tel_get_sim_imsi() API : Negative condition(Null Parameter test)
+* @par ID: UTC_TEL_GET_SIM_IMSI_02
+* @param [out] &sim_imsi_info = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_imsi_02()
+{
+    TET_STAMP_START("null pointer operation");
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_imsi(NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_imsi.h
new file mode 100644 (file)
index 0000000..a5fcec8
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_imsi_H_
+#define _uts_tel_get_sim_imsi_H_
+
+       static void utc_tel_get_sim_imsi_01();
+       static void utc_tel_get_sim_imsi_02();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.c
new file mode 100644 (file)
index 0000000..b7ed5d4
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_INIT_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_INIT_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_INIT_INFO_ Uts_Tel_Get_Sim_Init_Info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_init_info.c\r
+* @brief This is a suit of unit test cases to test tel_get_sim_init_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+
+#include "uts_tel_get_sim_init_info.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_init_info_01, 1},
+       {utc_tel_get_sim_init_info_02, 2},
+       {NULL, 0}\r
+};
+
+
+
+static void startup()\r
+{
+    tet_infoline("utc_tel_get_sim_init_info Test Start\n");\r
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {
+               tet_infoline("startup fail. tel_init() failed");\r
+       }
+    return;\r
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_get_sim_init_info Test Finished\n");\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}
+\r
+
+void utc_tel_get_sim_init_info_01()
+{
+       TET_STAMP_START("utc_tel_get_sim_init_info_01");\r
+\r
+    int changed=0,err;\r
+    TelSimCardStatus_t sim_status = 0x00 ;
+    err = tel_get_sim_init_info(&sim_status,&changed);
+       if(err == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_get_sim_init_info_01 has passed and the data in err-->%d", err);\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_get_sim_init_info_01 has failed and the data in err-->%d", err);\r
+               tet_result(TET_FAIL);\r
+       }\r
+       return;\r
+}\r
+
+
+void utc_tel_get_sim_init_info_02()
+{
+       TET_STAMP_START("utc_tel_get_sim_init_info_02");\r
+\r
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_get_sim_init_info(NULL,NULL));\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_init_info.h
new file mode 100644 (file)
index 0000000..9c52dbb
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_INIT_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_INIT_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_INIT_INFO_ Uts_Tel_Set_Sim_Mailbox_Info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_init_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_init_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_mailbox_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_mailbox_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+#include <string.h>
+\r
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+
+#ifndef _UTS_TEL_GET_SIM_INIT_INFO_H_
+#define _UTS_TEL_GET_SIM_INIT_INFO_H_
+       static void utc_tel_get_sim_init_info_01 ();\r
+       static void utc_tel_get_sim_init_info_02 ();
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_language.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_language.c
new file mode 100644 (file)
index 0000000..b650789
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_LANGUAGE_PREF_INFO tel_get_sim_language
+*
+* @brief Unit test code for tel_get_sim_language()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_language(TelSimLanguageInfo_t* pSimLpInfo);
+* @par Test function description:
+*      This API is used to get the language preference information.
+* @par Important Notes:
+*      None
+* \param [out] pSimLpInfo                      
+*      This parameter returns the language preference information.
+* @par Async Response Message:
+*      None
+* @pre
+*      None
+* @post
+*      None
+* @return
+ * \return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tapi_sim_get_sim_language_pref_info.c
+* @brief       Test for the tel_get_sim_language() API that is used to get Lock information
+* @author      
+* @version     Initial Creation V0.1
+* @date                2009.12.17
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_language.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_language_01, 1},
+       {utc_tel_get_sim_language_02, 2},
+       {NULL, 0}
+};
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("tel_get_sim_language Test Start\n");
+       if (tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("tel_get_sim_language Test Finished\n");
+       if (tel_deinit() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_deinit() failed");
+       }
+       return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_language() API : Positive condition
+* @par ID: UTC_TEL_GET_SIM_LANGUAGE_01
+* @param [out] pSimLpInfo = valid parameter
+* @return TAPI_API_SUCCESS
+*/
+void utc_tel_get_sim_language_01()
+{
+       TET_STAMP_START("Normal operation");
+       TelSimLanguageInfo_t simLpInfo;
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_language(&simLpInfo));
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief TelTapiSimGetLockInfo() API : Negative condition(NULL)
+* @par ID: UTC_TEL_GET_SIM_LANGUAGE_02
+* @param [out] pRequestId = NULL
+* @return 
+*/
+void utc_tel_get_sim_language_02()
+{
+       TET_STAMP_START("Null parameter test");
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_language(NULL));
+       TET_STAMP_PASS();
+}
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_language.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_language.h
new file mode 100644 (file)
index 0000000..86ef21e
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SIM_GET_LANGUAGE_PREF_INFO_
+#define _UTS_TAPI_SIM_GET_LANGUAGE_PREF_INFO_
+
+       static void utc_tel_get_sim_language_01();
+       static void utc_tel_get_sim_language_02();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.c
new file mode 100644 (file)
index 0000000..8a003d7
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TAPI_SIM_GET_MAILBOX_INFO tel_get_sim_mailbox_info\r
+*\r
+* @brief Unit test code for tel_get_sim_mailbox_info()\r
+* @par Test function Prototype:\r
+*      int tel_get_sim_mailbox_info(TelSimMailboxNumbers_s *mbox);\r
+* @par Test function description:\r
+*      This function is used to get mailbox number Information\r
+* @par Important Notes:\r
+*      None\r
+* @param [out] mbox This parameter returns the mailbox information\r
+* @code\r
+* typedef struct\r
+* {\r
+*      int b_cphs; // current data is from CPHS SIM or not\r
+*      TelSimDialingNumberInfo_t voice_line1; // voice line1 mailbox number\r
+*      TelSimDialingNumberInfo_t voice_line2; // voice line2 mailbox number (only available in CPHS)\r
+*      TelSimDialingNumberInfo_t video; // video mailbox number\r
+*      TelSimDialingNumberInfo_t fax; // fax mailbox number\r
+*      TelSimDialingNumberInfo_t email; // email mailbox number\r
+* }TelSimMailboxNumbers_s;\r
+* @endcode\r
+* @par Async Response Message:\r
+*      None\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (int)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_get_sim_mailbox_info.c\r
+* @brief       Test for the tel_get_sim_mailbox_info() API that is used to get mailbox information\r
+* @author\r
+* @version     Initial Creation V0.1\r
+* @date                2011.08.29\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include "tet_tapi_util.h"\r
+#include "uts_tel_get_sim_mailbox_info.h"\r
+#include "sim_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sim_mailbox_info_01, 1},\r
+       {utc_tel_get_sim_mailbox_info_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_mailbox_info Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_mailbox_info Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+/**\r
+* @brief tel_get_sim_mailbox_info() API : Positive condition(Get mailbox Information)\r
+* @par ID: UTC_TEL_GET_SIM_MAILBOX_INFO_01\r
+* @param [out] &mailbox\r
+* @return TAPI_API_SUCCESS\r
+* @par Expected Result:\r
+*  - mailbox number\r
+*/\r
+void utc_tel_get_sim_mailbox_info_01()\r
+{\r
+    TET_STAMP_START("Normal operation");\r
+    TelSimMailboxNumbers_s mailbox;\r
+\r
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_mailbox_info(&mailbox));\r
+\r
+       if( mailbox.b_cphs == 0 || mailbox.b_cphs == 1)\r
+       {\r
+               tet_printf("b_cphs[%d]",mailbox.b_cphs);\r
+               TET_STAMP_PASS();\r
+               return;\r
+       }\r
+       else\r
+       {\r
+               TET_STAMP_FAIL();\r
+               return;\r
+       }\r
+       return;\r
+}\r
+\r
+/**\r
+* @brief tel_get_sim_mailbox_info() API : Negative condition(Null Parameter test)\r
+* @par ID: UTC_TEL_GET_SIM_MAILBOX_INFO_02\r
+* @param [out] &mailbox = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+void utc_tel_get_sim_mailbox_info_02()\r
+{\r
+    TET_STAMP_START("null pointer operation");\r
+    TelSimMailboxNumbers_s mailbox;\r
+\r
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_mailbox_info(NULL));\r
+    TET_STAMP_PASS();\r
+    return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info.h
new file mode 100644 (file)
index 0000000..a3cfde5
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_MAILBOX_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_MAILBOX_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_MAILBOX_INFO_ Uts_tel_get_sim_mailbox_info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_mailbox_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_mailbox_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+#include <string.h>
+\r
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+
+#ifndef _UTS_TEL_GET_SIM_MAILBOX_INFO_H_
+#define _UTS_TEL_GET_SIM_MAILBOX_INFO_H_
+       static void utc_tel_get_sim_mailbox_info_01 ();\r
+       static void utc_tel_get_sim_mailbox_info_02 ();
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.c
new file mode 100644 (file)
index 0000000..c98c00a
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TAPI_SIM_GET_MESSAGEWAITING_INFO tel_get_sim_messagewaiting_info\r
+*\r
+* @brief Unit test code for tel_get_sim_messagewaiting_info()\r
+* @par Test function Prototype:\r
+*      int tel_get_sim_messagewaiting_info(TelSimMessageWaiting_s *mw);\r
+* @par Test function description:\r
+*      This function is used to get messagewaiting indication Information\r
+* @par Important Notes:\r
+*      None\r
+* @param [out] mw This parameter returns the messagewaiting indication information\r
+* @code\r
+* typedef struct\r
+* {\r
+*      int b_cphs; // current data is from CPHS SIM or not\r
+*      union{\r
+*              TelSimCphsVoiceMsgWaitFlagInfo_t cphs_mw;       // information from CPHS SIM\r
+*              TelSimMsgWaitingIndicationStatus_t mw;  // information from 3GPP SIM\r
+*      }mw_data_u;\r
+* }TelSimMessageWaiting_s;\r
+* @endcode\r
+* @par Async Response Message:\r
+*      None\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (int)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_get_sim_messagewaiting_info.c\r
+* @brief       Test for the tel_get_sim_messagewaiting_info() API that is used to get messagewaiting indication information\r
+* @author\r
+* @version     Initial Creation V0.1\r
+* @date                2011.08.29\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include "tet_tapi_util.h"\r
+#include "uts_tel_get_sim_messagewaiting_info.h"\r
+#include "sim_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sim_messagewaiting_info_01, 1},\r
+       {utc_tel_get_sim_messagewaiting_info_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_messagewaiting_info Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_messagewaiting_info Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+/**\r
+* @brief tel_get_sim_messagewaiting_info() API : Positive condition(Get messagewaiting Information)\r
+* @par ID: UTC_TEL_GET_SIM_MESSAGEWAITING_INFO_01\r
+* @param [out] &mw\r
+* @return TAPI_API_SUCCESS\r
+* @par Expected Result:\r
+*  - message waiting information\r
+*/\r
+void utc_tel_get_sim_messagewaiting_info_01()\r
+{\r
+    TET_STAMP_START("Normal operation");\r
+    TelSimMessageWaiting_s mw;\r
+\r
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_messagewaiting_info(&mw));\r
+\r
+       if( mw.b_cphs == 0 || mw.b_cphs == 1)\r
+       {\r
+               tet_printf("b_cphs[%d]",mw.b_cphs);\r
+               TET_STAMP_PASS();\r
+               return;\r
+       }\r
+       else\r
+       {\r
+               TET_STAMP_FAIL();\r
+               return;\r
+       }\r
+       return;\r
+}\r
+\r
+/**\r
+* @brief tel_get_sim_messagewaiting_info() API : Negative condition(Null Parameter test)\r
+* @par ID: UTC_TEL_GET_SIM_MESSAGEWAITING_INFO_02\r
+* @param [out] &mw = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+void utc_tel_get_sim_messagewaiting_info_02()\r
+{\r
+    TET_STAMP_START("null pointer operation");\r
+    TelSimMessageWaiting_s mw;\r
+\r
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_messagewaiting_info(NULL));\r
+    TET_STAMP_PASS();\r
+    return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info.h
new file mode 100644 (file)
index 0000000..a2659d4
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_MESSAGEWAITING_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_MESSAGEWAITING_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_MESSAGEWAITING_INFO Uts_tel_get_sim_messagewaiting_info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_messagewaiting_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_messagewaiting_info() API function\r
+* @author\r
+* @version Initial Creation Version 0.1\r
+* @date 2011.08.29\r
+*/\r
+\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include <string.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+\r
+#ifndef _UTS_TEL_GET_SIM_MESSAGEWAITING_INFO_H_\r
+#define _UTS_TEL_GET_SIM_MESSAGEWAITING_INFO_H_\r
+       static void utc_tel_get_sim_messagewaiting_info_01 ();\r
+       static void utc_tel_get_sim_messagewaiting_info_02 ();\r
+#endif\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.c
new file mode 100644 (file)
index 0000000..ebe59c0
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+/**\r
+* @ingroup TELEPHONY_API\r
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT\r
+*/\r
+\r
+/**\r
+* @ingroup  TAPI_API_SIM_SAT\r
+* @addtogroup UTS_SIM_SAT Unit\r
+*/\r
+\r
+/**\r
+* @ingroup  UTS_SIM_SAT\r
+* @addtogroup UTS_TAPI_SIM_GET_MSISDN tel_get_sim_msisdn\r
+*\r
+* @brief Unit test code for tel_get_sim_msisdn()\r
+* @par Test function Prototype:\r
+*      int tel_get_sim_msisdn(TelSimSubscriberInfo_t *subscriber);\r
+* @par Test function description:\r
+*      This function is used to get SIM MSISDN Information\r
+* @par Important Notes:\r
+*      None\r
+* @param [out] subscriber This parameter returns the MSISDN information\r
+* @code\r
+* typedef struct\r
+* {\r
+*      char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN+1]; // MSISDN number. If not exist, Null string will be returned\r
+*      char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN+1]; // MSISDN name. If not exist, Null string will be returned\r
+* }TelSimSubscriberInfo_t;\r
+*\r
+* @endcode\r
+* @par Async Response Message:\r
+*      None\r
+* @pre\r
+*      None\r
+* @post\r
+*      None\r
+* @return\r
+* Return Type : (int)\r
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.\r
+* - Otherwise it provides an error code (Refer #TapiResult_t)\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file                uts_tel_get_sim_msisdn.c\r
+* @brief       Test for the tel_get_sim_msisdn() API that is used to get MSISDN information\r
+* @author\r
+* @version     Initial Creation V0.1\r
+* @date                2011.09.13\r
+*/\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include "tet_tapi_util.h"\r
+#include "uts_tel_get_sim_msisdn.h"\r
+#include "sim_common.h"\r
+\r
+/* Initialize TCM data structures */\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sim_msisdn_01, 1},\r
+       {utc_tel_get_sim_msisdn_02, 2},\r
+       {NULL, 0}\r
+};\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module\r
+*/\r
+static void startup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_msisdn Test Start\n");\r
+       if (tel_init() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_init() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+static void cleanup()\r
+{\r
+       tet_infoline("uts_tel_get_sim_msisdn Test Finished\n");\r
+       if (tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("startup fail. tel_deinit() failed");\r
+       }\r
+       return;\r
+}\r
+\r
+\r
+/*\r
+  Unit Test Case functions\r
+*/\r
+/**\r
+* @brief tel_get_sim_msisdn() API : Positive condition(Get MSISDN Information)\r
+* @par ID: UTC_TEL_GET_SIM_MSISDN_01\r
+* @param [out] &msisdn\r
+* @return TAPI_API_SUCCESS\r
+* @par Expected Result:\r
+*  - msisdn information\r
+*/\r
+void utc_tel_get_sim_msisdn_01()\r
+{\r
+    TET_STAMP_START("Normal operation");\r
+    TelSimSubscriberInfo_t msisdn;\r
+       int api_ret = 0;\r
+       api_ret = tel_get_sim_msisdn(&msisdn);\r
+\r
+       if (api_ret == TAPI_API_SUCCESS) {\r
+               TET_STAMP_PASS();\r
+               return;\r
+       } else {\r
+               TET_STAMP_FAIL();\r
+               return;\r
+       }\r
+       return;\r
+}\r
+\r
+/**\r
+* @brief tel_get_sim_msisdn() API : Negative condition(Null Parameter test)\r
+* @par ID: UTC_TEL_GET_SIM_MSISDN_02\r
+* @param [out] &cphs = NULL\r
+* @return TAPI_API_INVALID_PTR\r
+*/\r
+void utc_tel_get_sim_msisdn_02()\r
+{\r
+    TET_STAMP_START("null pointer operation");\r
+    TelSimSubscriberInfo_t msisdn;\r
+\r
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_msisdn(NULL));\r
+    TET_STAMP_PASS();\r
+    return;\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_msisdn.h
new file mode 100644 (file)
index 0000000..e49ec82
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_MSISDN Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_MSISDN Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_MSISDN Uts_tel_get_sim_msisdn\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_msisdn.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_msisdn() API function\r
+* @author\r
+* @version Initial Creation Version 0.1\r
+* @date 2011.09.13\r
+*/\r
+\r
+\r
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include <string.h>\r
+\r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+\r
+#ifndef _UTS_TEL_GET_SIM_MSISDN_H_\r
+#define _UTS_TEL_GET_SIM_MSISDN_H_\r
+       static void utc_tel_get_sim_msisdn_01 ();\r
+       static void utc_tel_get_sim_msisdn_02 ();\r
+#endif\r
+\r
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.c
new file mode 100644 (file)
index 0000000..8a111b4
--- /dev/null
@@ -0,0 +1,262 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_3G_CAPABILLITY_INFO tel_get_sim_pb_3g_meta_info
+*
+* @brief Unit test code for tel_get_sim_pb_3g_meta_info()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_pb_3g_meta_info (int *pRequestId);
+* @par Test function description:
+*      This API is used to Get the 3G phone book capability information
+* @par Important Notes:
+*      The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+*      This API is applicable only for 3G phonebook.
+* @param [out] pRequestId  Unique identifier for a particular request.
+*   - pRequestId value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbCapabilityInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_pb_3g_meta_info.c
+* @brief       Test for the tel_get_sim_pb_3g_meta_info() API that is used to get phonebook capability info
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_pb_3g_meta_info.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_pb_3g_meta_info_01, 1},
+       {utc_tel_get_sim_pb_3g_meta_info_02, 2},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+               case TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF:
+       {
+            tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF,******\n");
+            tet_printf("[SIM]SIM PB Capability Info event status = [%x]\n", sim_event->Status);
+
+                       //TelSimPbCapabilityInfo_t *sim_capability_info = (TelSimPbCapabilityInfo_t*)sim_event->pData;
+                       //int i;
+                       // for(i = 0;i<sim_capability_info->FileTypeCount;i++)
+                       //{
+             //   tet_printf(" [SIM APP]Filed tag type[%d]", sim_capability_info->FileTypeInfo[i].FileType3G);
+               // tet_printf(" [SIM APP]max index [%d]\n", sim_capability_info->FileTypeInfo[i].PbIndexMax);
+               // tet_printf(" [SIM APP]max text [%d]\n", sim_capability_info->FileTypeInfo[i].PbTextMax);
+               // tet_printf(" [SIM APP]used count [%d]\n",  sim_capability_info->FileTypeInfo[i].TotalRecordCount);
+                       //}
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("Info : TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF = %d",TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF);
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+static void startup()
+{
+    tet_infoline("uts_tel_get_sim_pb_3g_meta_info Test Start\n");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+        tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("uts_tel_get_sim_pb_3g_meta_info Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_pb_3g_meta_info() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_GET_SIM_PB_3G_META_INFO_01
+* @param [out] &req_id = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_pb_3g_meta_info_01()
+{
+    TET_STAMP_START("Null parameter test");
+
+    /* calling PB capability info api */
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_get_sim_pb_3g_meta_info(NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+/**
+* @brief tel_get_sim_pb_3g_meta_info() API : Positive condition
+* @par ID: UTC_TEL_GET_SIM_PB_3G_META_INFO_02
+* @param [out] &req_id
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event received is below and the event data is #TelSimPbCapabilityInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_3g_meta_info_02()
+{
+    TET_STAMP_START("utc_tel_get_sim_pb_3g_meta_info_02");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int req_id=0;
+       
+    gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_3g_meta_info(&req_id));
+
+    G_MAIN_LOOP_RUN(2);
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_STAMP_PASS();
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info.h
new file mode 100644 (file)
index 0000000..3b55a8a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_pb_3g_meta_info_H_
+#define _uts_tel_get_sim_pb_3g_meta_info_H_
+
+       static void utc_tel_get_sim_pb_3g_meta_info_01 ();
+       static void utc_tel_get_sim_pb_3g_meta_info_02 ();
+
+#endif
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.c
new file mode 100644 (file)
index 0000000..085be7e
--- /dev/null
@@ -0,0 +1,473 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PB_GET_STORAGE_COUNT tel_get_sim_pb_count
+*
+* @brief Unit test code for tel_get_sim_pb_count()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_pb_count(TelSimPbFileType_t StorageFileType, int* pRequestId);
+* @par Test function description:
+*      This API is used to get number of used records and total records in SIM phone book files.
+*      This API is applicable only to GSM phonebook (ADN and EXT1), FDN, SDN, LND and MSISDN.
+* @par Important Notes:
+*      None
+* @param [in] StorageFileType    Different storage types to be selected in SIM.
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+* @pre
+*      - Phonebook supported SIM used for test
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_pb_count.c
+* @brief       Test for the tel_get_sim_pb_count() API that is used to get phonebook Storage Count
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_pb_count.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_pb_count_01, 1},
+       {utc_tel_get_sim_pb_count_02, 2},
+       {utc_tel_get_sim_pb_count_03, 3},
+       {utc_tel_get_sim_pb_count_04, 4},
+       {utc_tel_get_sim_pb_count_05, 5},
+       {utc_tel_get_sim_pb_count_06, 6},
+       {utc_tel_get_sim_pb_count_07, 7},
+       {utc_tel_get_sim_pb_count_08, 8},
+       {utc_tel_get_sim_pb_count_09, 9},
+       {utc_tel_get_sim_pb_count_10, 10},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+       case TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF:
+        {
+                       tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF***************************\n");
+
+               //      TelSimPbStorageInfo_t *storageInfo  = (TelSimPbStorageInfo_t*)sim_event->pData ;
+                       tet_printf("SIM PB storage count event status = [%x]\n", sim_event->Status);
+               //      tet_printf("[SIM APP]PB_STORAGE_TYPE %x\n", storageInfo->StorageFileType);
+               //      tet_printf("[SIM APP]TOTAL_COUNT = %d\n", storageInfo->TotalRecordCount);
+               //      tet_printf("[SIM APP]USED_COUNT =  %d\n",  storageInfo->UsedRecordCount);
+                       gAsyncResult = TRUE;
+                       bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("uts_tel_get_sim_pb_count Test Start");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+static void cleanup()
+{
+    tet_infoline("uts_tel_get_sim_pb_count Finished");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_pb_count() API : Negative condition(Low boundary test)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_01
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_pb_count_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 1");
+       TelSimPbFileType_t  StorageFileType=(TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_get_sim_pb_count(StorageFileType,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_count() API : Negative condition(Upper boundary test)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_02
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_pb_count_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 2");
+       TelSimPbFileType_t  StorageFileType=(TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_get_sim_pb_count(StorageFileType,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_pb_count() API : Negative condition(NULL Parameter test)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_03
+* @param [in] StorageFileType = TAPI_SIM_PB_GAS
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_pb_count_03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR test");
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_GAS;
+
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_get_sim_pb_count(StorageFileType,NULL));
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is FDN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_04
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_04()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_FDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_FDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is LDN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_05
+* @param [in] StorageFileType = TAPI_SIM_PB_LDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_05()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_LDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_LDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is MSISDN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_06
+* @param [in] StorageFileType = TAPI_SIM_PB_MSISDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_06()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_MSISDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_MSISDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is ADN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_07
+* @param [in] StorageFileType = TAPI_SIM_PB_ADN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_07()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_ADN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_ADN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is SDN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_08
+* @param [in] StorageFileType = TAPI_SIM_PB_SDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_08()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_SDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_SDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+}
+
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is EN)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_09
+* @param [in] StorageFileType = TAPI_SIM_PB_EN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_09()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_EN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_EN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_pb_count() API : Positive condition(Get count when type is 3GSIM)
+* @par ID: UTC_TEL_GET_SIM_PB_COUNT_10
+* @param [in] StorageFileType = TAPI_SIM_PB_3GSIM
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbStorageInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+*/
+void utc_tel_get_sim_pb_count_10()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_3GSIM");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_3GSIM;
+       int pRequestId=0;
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_count(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(10);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_count.h
new file mode 100644 (file)
index 0000000..b9996b4
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_pb_count_H_
+#define _uts_tel_get_sim_pb_count_H_
+
+       static void utc_tel_get_sim_pb_count_01 ();
+       static void utc_tel_get_sim_pb_count_02 ();
+       static void utc_tel_get_sim_pb_count_03 ();
+       static void utc_tel_get_sim_pb_count_04 ();
+       static void utc_tel_get_sim_pb_count_05 ();
+       static void utc_tel_get_sim_pb_count_06 ();
+       static void utc_tel_get_sim_pb_count_07 ();
+       static void utc_tel_get_sim_pb_count_08 ();
+       static void utc_tel_get_sim_pb_count_09 ();
+       static void utc_tel_get_sim_pb_count_10 ();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.c
new file mode 100644 (file)
index 0000000..e25ac4d
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_PB_INIT_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_PB_INIT_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_PB_INIT_INFO_ Uts_Tel_Get_Sim_Pb_Init_Info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_pb_init_info.c\r
+* @brief This is a suit of unit test cases to test tel_get_sim_pb_init_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+#include <tet_api.h>\r
+#include <ITapiSim.h>\r
+#include <TapiCommon.h>\r
+#include <string.h>\r
+       \r
+#include "tet_tapi_util.h"\r
+#include "sim_common.h"\r
+#include "uts_tel_get_sim_pb_init_info.h"\r
+\r
+\r
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_pb_init_info_01, 1},
+       {utc_tel_get_sim_pb_init_info_02, 2},
+       {utc_tel_get_sim_pb_init_info_03, 3},
+       {utc_tel_get_sim_pb_init_info_04, 4},
+       {NULL, 0}
+};
+
+\r
+static void startup()
+{
+    tet_infoline("utc_tel_get_sim_pb_init_info Test Start\n");
+
+       if ( tel_init() != TAPI_API_SUCCESS)\r
+       {
+               tet_infoline("startup fail. tel_init() failed");\r
+       }
+    return;\r
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_get_sim_pb_init_info Test Finished\n");
+\r
+       if ( tel_deinit() != TAPI_API_SUCCESS)\r
+       {\r
+               tet_infoline("cleanup fail. tel_deinit() failed");\r
+       }\r
+    return;\r
+}
+\r
+
+void utc_tel_get_sim_pb_init_info_01()
+{
+    int err,init_completed = 0;
+    TelSimPbList_t pb_list = {0,}; 
+    int first_index = 0;
+    err = tel_get_sim_pb_init_info(&init_completed, &pb_list,&first_index );
+       if(err == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_01 has passed and the data in err-->%d", err);\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_01 has failed and the data in err-->%d", err);\r
+               tet_result(TET_FAIL);\r
+       }\r
+       return;       \r
+}
+
+
+void utc_tel_get_sim_pb_init_info_02()
+{
+    int err;
+    TelSimPbList_t pb_list = {0,}; 
+    int first_index = 0;
+    err = tel_get_sim_pb_init_info(NULL, &pb_list,&first_index );
+    if(err != TAPI_API_SUCCESS)
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_02 has passed and the data in err-->%d", err);\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_02 has failed and the data in err-->%d", err);\r
+               tet_result(TET_FAIL);\r
+       }\r
+       return;\r
+}\r
+
+void utc_tel_get_sim_pb_init_info_03()
+{
+    int err;
+    
+    int first_index = 0;
+    err = tel_get_sim_pb_init_info(NULL, NULL,&first_index );
+    if(err != TAPI_API_SUCCESS)
+    {
+               tet_printf("utc_tel_get_sim_pb_init_info_03 has passed and the data in err-->%d", err);\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_03 has failed and the data in err-->%d", err);\r
+               tet_result(TET_FAIL);\r
+       }\r
+       return;      \r
+}
+
+void utc_tel_get_sim_pb_init_info_04()
+{
+    int err,init_completed = 0;
+   \r
+    err = tel_get_sim_pb_init_info(&init_completed, NULL,NULL );
+       if(err != TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_04 has passed and the data in err-->%d", err);\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_get_sim_pb_init_info_04 has failed and the data in err-->%d", err);\r
+               tet_result(TET_FAIL);\r
+       }\r
+       return;   \r
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info.h
new file mode 100644 (file)
index 0000000..cc409d8
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_GET_SIM_PB_INIT_INFO Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SIM_PB_INIT_INFO Unit\r
+* @addtogroup  UTS_TEL_GET_SIM_PB_INIT_INFO_ Uts_Tel_Get_Sim_Pb_Init_Info\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sim_pb_init_info.h\r
+* @brief This is a suit of unit test cases to test tel_get_sim_pb_init_info() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+\r
+#ifndef _UTS_TEL_GET_SIM_PB_INIT_INFO_H_\r
+#define _UTS_TEL_GET_SIM_PB_INIT_INFO_H_
+
+       static void utc_tel_get_sim_pb_init_info_01 ();
+       static void utc_tel_get_sim_pb_init_info_02 ();
+       static void utc_tel_get_sim_pb_init_info_03 ();
+       static void utc_tel_get_sim_pb_init_info_04 ();
+
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.c
new file mode 100644 (file)
index 0000000..31d4bb9
--- /dev/null
@@ -0,0 +1,556 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PB_GET_ENTRY_INFO tel_get_sim_pb_meta_info
+*
+* @brief Unit test code for tel_get_sim_pb_meta_info()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_pb_meta_info(TelSimPbFileType_t  StorageFileType, int* pRequestId);
+* @par Test function description:
+*      This API is used to get max text length and max number length supported by SIM phone book elementary file.
+* @par Important Notes:
+*      The max number length includes the storage space provided by the corresponding EXT file for a given Dialling Number file.
+* @param [in] StorageFileType    Different storage types to be selected in SIM.
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+* @pre
+*      - Phonebook supported SIM used for test
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_pb_meta_info.c
+* @brief       Test for the tel_get_sim_pb_meta_info() API that is used to get phonebook entry info
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_pb_meta_info.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_pb_meta_info_01, 1},
+       {utc_tel_get_sim_pb_meta_info_02, 2},
+       {utc_tel_get_sim_pb_meta_info_03, 3},
+       {utc_tel_get_sim_pb_meta_info_04, 4},
+       {utc_tel_get_sim_pb_meta_info_05, 5},
+       {utc_tel_get_sim_pb_meta_info_06, 6},
+       {utc_tel_get_sim_pb_meta_info_07, 7},
+       {utc_tel_get_sim_pb_meta_info_08, 8},
+       {utc_tel_get_sim_pb_meta_info_09, 9},
+       {utc_tel_get_sim_pb_meta_info_10, 10},
+       {utc_tel_get_sim_pb_meta_info_11, 11},
+       {utc_tel_get_sim_pb_meta_info_12, 12},
+       {utc_tel_get_sim_pb_meta_info_13, 13},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+       case TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF:
+       {
+                tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF***************************\n");
+
+//                TelSimPbEntryInfo_t *entryInfo = (TelSimPbEntryInfo_t*)sim_event->pData ;
+                tet_printf("SIM PB entry info event status = [%x]\n", sim_event->Status);
+        //        tet_printf("[SIM APP]STORAGE TYPE [%d]\n", entryInfo->StorageFileType);
+           //     tet_printf("[SIM APP]PB_INDEX_MIN %d\n", entryInfo->PbIndexMin);
+             //   tet_printf("[SIM APP]PB_INDEX_MAX = %d\n", entryInfo->PbIndexMax);
+               // tet_printf("[SIM APP]PB_NUM_LEN_MAX =  %d\n", entryInfo->PbNumLenMax);
+              //  tet_printf("[SIM APP]PB_TEXT_LEN_MAX =  %d\n", entryInfo->PbTextLenMax);
+               // tet_printf("********************************************\n");
+                gAsyncResult = TRUE;
+                bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("Info TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF = %d",TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF);
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_get_sim_pb_meta_info Test Start\n");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_get_sim_pb_meta_info Test Finished\n");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Negative condition(Low boundary test)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_01
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_pb_meta_info_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 1");
+       TelSimPbFileType_t  StorageFileType=(TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Negative condition(Upper boundary test)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_02
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_pb_meta_info_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 2");
+       TelSimPbFileType_t  StorageFileType=(TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Negative condition(NULL Parameter test)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_03
+* @param [in] StorageFileType = TAPI_SIM_PB_GAS
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_pb_meta_info_03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR test");
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_GAS;
+
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_get_sim_pb_meta_info(StorageFileType,NULL));
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook FDN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_04
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_04()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_FDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_FDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook LDN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_05
+* @param [in] StorageFileType = TAPI_SIM_PB_LDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_05()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_LDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_LDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+       
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+       
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook MSISDN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_06
+* @param [in] StorageFileType = TAPI_SIM_PB_MSISDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_06()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_MSISDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_MSISDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook ADN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_07
+* @param [in] StorageFileType = TAPI_SIM_PB_ADN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_07()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_ADN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_ADN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook SDN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_08
+* @param [in] StorageFileType = TAPI_SIM_PB_SDN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_08()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_SDN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_SDN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook EN record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_09
+* @param [in] StorageFileType = TAPI_SIM_PB_EN
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_09()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_EN");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_EN;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+       
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook 3GSIM record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_10
+* @param [in] StorageFileType = TAPI_SIM_PB_3GSIM
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_10()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_3GSIM");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_3GSIM;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook AAS record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_11
+* @param [in] StorageFileType = TAPI_SIM_PB_AAS
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_11()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_AAS");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_AAS;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Positive condition(Get Entry info for a Phonebook GAS record)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_12
+* @param [in] StorageFileType = TAPI_SIM_PB_GAS
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbEntryInfo_t. \n
+*      - TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+*/
+void utc_tel_get_sim_pb_meta_info_12()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_GAS");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_GAS;
+       int pRequestId=0;
+
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_pb_meta_info() API : Negative condition( StorageFileType=TAPI_SIM_PB_UNKNOWNN)
+* @par ID: UTC_TEL_GET_SIM_PB_META_INFO_13
+* @param [in] StorageFileType = TAPI_SIM_PB_UNKNOWNN
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_pb_meta_info_13()
+{
+       TET_STAMP_START("StorageFileType = TAPI_SIM_PB_UNKNOWNN");
+       TelSimPbFileType_t  StorageFileType=TAPI_SIM_PB_UNKNOWNN;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT,tel_get_sim_pb_meta_info(StorageFileType,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info.h
new file mode 100644 (file)
index 0000000..20b1daa
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_pb_meta_info_H_
+#define _uts_tel_get_sim_pb_meta_info_H_
+
+       static void utc_tel_get_sim_pb_meta_info_01();
+       static void utc_tel_get_sim_pb_meta_info_02();
+       static void utc_tel_get_sim_pb_meta_info_03();
+       static void utc_tel_get_sim_pb_meta_info_04();
+       static void utc_tel_get_sim_pb_meta_info_05();
+       static void utc_tel_get_sim_pb_meta_info_06();
+       static void utc_tel_get_sim_pb_meta_info_07();
+       static void utc_tel_get_sim_pb_meta_info_08();
+       static void utc_tel_get_sim_pb_meta_info_09();
+       static void utc_tel_get_sim_pb_meta_info_10();
+       static void utc_tel_get_sim_pb_meta_info_11();
+       static void utc_tel_get_sim_pb_meta_info_12();
+       static void utc_tel_get_sim_pb_meta_info_13();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.c
new file mode 100644 (file)
index 0000000..b9c2b8a
--- /dev/null
@@ -0,0 +1,331 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_LOCK_ENABLE_PERSONALISATION tel_enable_sim_personalization
+*
+* @brief Unit test code for tel_enable_sim_personalization()
+* @par Test function Prototype:
+*      TapiResult_t tel_enable_sim_personalization(TelSimLockPersonalisationInfo_t *PersonalisationPwd, int *pRequestId);
+* @par Test function description:
+*      This API is used to enable the network personalisation feature.
+* @par Important Notes:
+*      None
+* @param [in] PersonalisationPwd
+*      The information required to disable network personalisation.
+*      @code
+       typedef struct
+       {
+               TelSimPersType_t PersonalisationLock;
+               UINT8   Password_length;
+               UINT8   Personalisation_password[TAPI_SEC_LOCK_PERSONALISATION_PASSWD_LEN];
+       }TelSimLockPersonalisationInfo_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is TAPI_EVENT_SIM_ENABLE_PERSONALIZATION_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tapi_sim_lock_personalization.c
+* @brief
+       Test for the tel_disable_sim_personalization() API that is used to disable the network personalisation feature \n
+       Test for the tel_enable_sim_personalization() API that is used to enable the network personalisation feature
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_get_sim_personalization_status.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_personalization_status01, 1},
+       {utc_tel_get_sim_personalization_status02, 2},
+       {utc_tel_get_sim_personalization_status03, 3},
+       {utc_tel_get_sim_personalization_status04, 4},
+       {utc_tel_get_sim_personalization_status05, 5},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+               case TAPI_EVENT_SIM_PERS_STATUS_CNF:
+               {
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_PERS_STATUS_CNF******\n");
+                       tet_printf("[SIM APP]SIM personalization status event status  = [0x%x]\n", sim_event->Status);
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+               }
+               break;
+
+        default:
+        {
+                       bReceived = TRUE;
+                       gAsyncResult = FALSE;
+                       tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+                       tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+               }
+               break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("uts_tel_get_sim_personalization_status Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PERS_STATUS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+        tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("uts_tel_get_sim_personalization_status Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief TelTapiSimGetLockPersonalisationSatus() API : Negative condition(invalid input parameterl)
+* @par ID: UTC_TEL_GET_SIM_PERSONALIZATION_STATUS01
+* @param [in] PersType =  TAPI_SIM_PERS_CP+1 
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_personalization_status01()
+{
+       TET_STAMP_START("utc_tel_get_sim_personalization_status01 -TAPI_API_INVALID_INPUT ");
+       int pRequestId=0;
+       TelSimPersType_t PersType = TAPI_SIM_PERS_CP+1 ;
+       TET_CHECK(TAPI_API_INVALID_INPUT,tel_get_sim_personalization_status (PersType, &pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+void utc_tel_get_sim_personalization_status02()
+{
+       TET_STAMP_START("utc_tel_get_sim_personalization_status02 ");
+       int pRequestId=0;
+       TelSimPersType_t PersType= TAPI_SIM_PERS_NET;
+
+       gAsyncResult = FALSE;
+                                       
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_personalization_status (PersType, &pRequestId));
+                                                               
+                                                               tet_printf("after real tc api - wait start");
+                                                               
+                                                               G_MAIN_LOOP_RUN(5);
+                                                               
+                                                               tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+
+
+void utc_tel_get_sim_personalization_status03()
+{
+       TET_STAMP_START("utc_tel_get_sim_personalization_status03 ");
+       int pRequestId=0;
+       TelSimPersType_t PersType=TAPI_SIM_PERS_NS ;
+       
+       gAsyncResult = FALSE;
+                                               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_personalization_status (PersType, &pRequestId));
+                                                                       
+                                                                       tet_printf("after real tc api - wait start");
+                                                                       
+                                                                       G_MAIN_LOOP_RUN(5);
+                                                                       
+                                                                       tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+
+void utc_tel_get_sim_personalization_status04()
+{
+       TET_STAMP_START("utc_tel_get_sim_personalization_status04 ");
+       int pRequestId=0;
+       TelSimPersType_t PersType= TAPI_SIM_PERS_SP ;
+       
+       gAsyncResult = FALSE;
+                                               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_personalization_status (PersType, &pRequestId));
+                                                                       
+                                                                       tet_printf("after real tc api - wait start");
+                                                                       
+                                                                       G_MAIN_LOOP_RUN(5);
+                                                                       
+                                                                       tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+void utc_tel_get_sim_personalization_status05()
+{
+       TET_STAMP_START("utc_tel_get_sim_personalization_status05 ");
+       int pRequestId=0;
+       TelSimPersType_t PersType= TAPI_SIM_PERS_CP ;
+       
+       gAsyncResult = FALSE;
+                                               
+       TET_CHECK(TAPI_API_SUCCESS,tel_get_sim_personalization_status (PersType, &pRequestId));
+                                                                       
+                                                                       tet_printf("after real tc api - wait start");
+                                                                       
+                                                                       G_MAIN_LOOP_RUN(5);
+                                                                       
+                                                                       tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_personalization_status.h
new file mode 100644 (file)
index 0000000..93982ef
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SIM_GETLOCK_PERSONALIZATION_STATUSH_
+#define _UTS_TAPI_SIM_GETLOCK_PERSONALIZATION_STATUSH_
+
+       static void utc_tel_get_sim_personalization_status01();
+       static void utc_tel_get_sim_personalization_status02();
+       static void utc_tel_get_sim_personalization_status03();
+       static void utc_tel_get_sim_personalization_status04();
+       static void utc_tel_get_sim_personalization_status05();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.c
new file mode 100644 (file)
index 0000000..d2a622d
--- /dev/null
@@ -0,0 +1,235 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_GET_PIN_STATUS tel_get_sim_security_status
+*
+* @brief Unit test code for tel_get_sim_security_status()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_security_status(TelSimPinStatus_t *pPinStatus, TelSimPinType_t* pPinType);
+* @par Test function description:
+*      This function gets the current PIN (PIN1 or UPIN) status.
+* @par Important Notes:
+*      None
+* @param [out] pPinStatus
+*      This parameter returns the current Pin status.
+* @code
+typedef enum
+{
+       TAPI_SIM_PIN_STATUS_DISABLED            = 0x00,
+       TAPI_SIM_PIN_STATUS_ENABLED             = 0x01,
+       TAPI_SIM_PIN_STATUS_BLOCKED             = 0x02,
+       TAPI_SIM_PIN_STATUS_PUK_BLOCKED         = 0x03,
+       TAPI_SIM_PIN_STATUS_UNKNOWN             = 0xFF
+} TelSimPinStatus_t;
+* @endcode
+* @param [out] pPinType
+*      This parameter returns the current Pin (Pin1 or upin) type.
+* @code
+typedef enum
+{
+       TAPI_SIM_PTYPE_PIN1             = 0x00,
+       TAPI_SIM_PTYPE_PIN2             = 0x01,
+       TAPI_SIM_PTYPE_PUK1             = 0x02,
+       TAPI_SIM_PTYPE_PUK2             = 0x03,
+       TAPI_SIM_PTYPE_UPIN             = 0x04,
+       TAPI_SIM_PTYPE_ADM              = 0x05
+} TelSimPinType_t;
+* @endcode
+* @par Async Response Message:
+*      None
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_security_status.c
+* @brief       Test for the tel_get_sim_security_status() API that is used to get pin1 status
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_sim_security_status.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_security_status_01, 1},
+       {utc_tel_get_sim_security_status_02, 2},
+       {utc_tel_get_sim_security_status_03, 3},
+       {NULL, 0}
+};
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("utc_tel_get_sim_security_status Test Start\n");
+       if (tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("utc_tel_get_sim_security_status Test Finished\n");
+       if (tel_deinit() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_deinit() failed");
+       }
+       return;
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_security_status() API : Positive condition(Get PIN1 status)
+* @par ID: UTC_TEL_SET_SIM_SECURITY_STATUS_01
+* @param [out] pPinStatus
+* @param [in] pPinType
+* @return TAPI_API_SUCCESS
+* @par Expected Result:
+*      pPinStatus is one of TelSimPinStatus_t type value and pPinType is one of pPinType value
+*/
+void utc_tel_get_sim_security_status_01()
+{
+       TET_STAMP_START("Normal operation - get pin1 status");
+       TelSimPinStatus_t pin1_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+       TelSimPinType_t pPinType = TAPI_SIM_PTYPE_PIN1;
+
+       TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_security_status(pPinType, &pin1_status));
+       tet_printf ("PIN1 status is %d\n", pin1_status);
+       if ( (pin1_status>=TAPI_SIM_PIN_STATUS_DISABLED && pin1_status<=TAPI_SIM_PIN_STATUS_PUK_BLOCKED)||(pin1_status==TAPI_SIM_PIN_STATUS_UNKNOWN))
+       {
+               if ( pPinType >= TAPI_SIM_PTYPE_PIN1 && pPinType <=TAPI_SIM_PTYPE_ADM )
+               {
+                       TET_STAMP_PASS();
+                       return;
+               }
+       }
+       TET_STAMP_FAIL();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_security_status() API : Positive condition(Get PIN2 status)
+* @par ID: UTC_TEL_SET_SIM_SECURITY_STATUS_02
+* @param [out] pPinStatus
+* @param [in] pPinType
+* @return TAPI_API_SUCCESS
+* @par Expected Result:
+*      pPinStatus is one of TelSimPinStatus_t type value and pPinType is one of pPinType value
+*/
+void utc_tel_get_sim_security_status_02()
+{
+       TET_STAMP_START("Normal operation - get pin2 status");
+       TelSimPinStatus_t pin2_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+        TelSimPinType_t pPinType = TAPI_SIM_PTYPE_PIN2;
+
+       TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_security_status(pPinType, &pin2_status));
+       tet_printf ("PIN1 status is %d\n", pin2_status);
+       if ( (pin2_status>=TAPI_SIM_PIN_STATUS_DISABLED && pin2_status<=TAPI_SIM_PIN_STATUS_PUK_BLOCKED)||(pin2_status==TAPI_SIM_PIN_STATUS_UNKNOWN))
+       {
+               if ( pPinType >= TAPI_SIM_PTYPE_PIN1 && pPinType <=TAPI_SIM_PTYPE_ADM )
+               {
+                       TET_STAMP_PASS();
+                       return;
+               }
+       }
+       TET_STAMP_FAIL();
+       return;
+}
+
+
+/**
+* @brief tel_get_sim_security_status() API : Negative condition(Second parameter is NULL)
+* @par ID: UTC_TEL_SET_SIM_SECURITY_STATUS_03
+* @param [out] pPinStatus = NULL
+* @param [in] pPinType
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_security_status_03()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR");
+    TelSimPinType_t pPinType = TAPI_SIM_PTYPE_PIN1;
+
+    TET_CHECK(TAPI_API_INVALID_PTR,tel_get_sim_security_status(pPinType, NULL));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_get_sim_security_status() API : Negative condition(first parameter is invalid)
+* @par ID: UTC_TEL_SET_SIM_SECURITY_STATUS_04
+* @param [out] pPinStatus
+* @param [in] pPinType = NULL
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_get_sim_security_status_04()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR 2");
+    TelSimPinStatus_t pin1_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+    TelSimPinType_t pPinType = TAPI_SIM_PTYPE_SIM+1;
+
+    TET_CHECK(TAPI_API_INVALID_INPUT,tel_get_sim_security_status(pPinType, &pin1_status));
+    TET_STAMP_PASS();
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_security_status.h
new file mode 100644 (file)
index 0000000..bb3475b
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_get_sim_security_status_H_
+#define _uts_tel_get_sim_security_status_H_
+
+       static void utc_tel_get_sim_security_status_01();
+       static void utc_tel_get_sim_security_status_02();
+       static void utc_tel_get_sim_security_status_03();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_type.c b/TC/telephony_TC/sim/unit/uts_tel_get_sim_type.c
new file mode 100644 (file)
index 0000000..c6dac4f
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TEL_GET_SIM_TYPE tel_get_sim_type
+*
+* @brief Unit test code for tel_get_sim_type()
+* @par Test function Prototype:
+*      TapiResult_t tel_get_sim_type(TelSimCardType_t *pCardInfo);
+* @par Test function description:
+*      This function is a synchronous API which gets the Card Type whether SIM Card is a GSM SIM or a 3G SIM.
+* @par Important Notes:
+*      None
+* @param [in]
+*      None
+* @param [out] pCardInfo
+* This parameter returns the SIM card type information like whether it is GSM SIM card or USIM or it is of unknown type.
+*  - TAPI_SIM_CARD_TYPE_UNKNOWN
+*  - TAPI_SIM_CARD_TYPE_GSM
+*  - TAPI_SIM_CARD_TYPE_USIM
+* @par Async Response Message
+*      None
+* @pre
+*      Before test, prepare GSM SIM and USIM cards.
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_get_sim_type.c
+* @brief       Test for the tel_get_sim_type() API that is used to get SIM Card type
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include "uts_tel_get_sim_type.h"
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sim_type_01, 1},
+       {utc_tel_get_sim_type_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static void startup()
+{
+       tet_infoline("uts_tel_get_sim_imsi Test Start\n");
+       if (tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       return;
+}
+
+
+static void cleanup()
+{
+       tet_infoline("uts_tel_get_sim_imsi Test Finished\n");
+       if (tel_deinit() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_deinit() failed");
+       }
+       return;
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_get_sim_type() API : Normal condition
+* @par ID: UTC_TEL_GET_SIM_TYPE_01
+* @param [out] &cardInfo
+* @return TAPI_API_SUCCESS
+* @par Expected Result:
+* - Out paramter's value satisfied below
+*@n -#cardInfo >= 0 and #cardInfo <= 2 (TAPI_SIM_CARD_TYPE_UNKNOWN, TAPI_SIM_CARD_TYPE_GSM, TAPI_SIM_CARD_TYPE_USIM)
+*/
+void utc_tel_get_sim_type_01()
+{
+       TET_STAMP_START("utc_tel_get_sim_type_01");
+       TelSimCardType_t cardInfo;
+
+    TET_STAMP_START("SIM Type check test");
+
+    /* Calling TAPI LAGUAGE INDICATOR  API */
+    TET_CHECK(TAPI_API_SUCCESS, tel_get_sim_type(&cardInfo));
+
+    tet_printf("The card type is %d\n", cardInfo);
+    tet_printf("\t0x00 : UNKNOWN\n\t0x01 : 2GGSM\n\t0x02 : 3G\n");
+
+    if (cardInfo >= 0 && cardInfo <= 2)
+        TET_STAMP_PASS();
+    else
+        TET_STAMP_FAIL();
+    return;
+}
+
+/**
+* @brief tel_get_sim_type() API : Negative condition(First parameter is Null)
+* @par ID: UTC_TEL_GET_SIM_TYPE_02
+* @param [out] &cardInfo = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_get_sim_type_02()
+{
+       TET_STAMP_START("utc_tel_get_sim_type_02");
+
+    /* Calling TAPI LAGUAGE INDICATOR  API */
+    TET_CHECK( TAPI_API_INVALID_PTR,tel_get_sim_type(NULL));
+    TET_STAMP_PASS();
+    return;
+}
+/** @} */
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_get_sim_type.h b/TC/telephony_TC/sim/unit/uts_tel_get_sim_type.h
new file mode 100644 (file)
index 0000000..62f4e7d
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SIM_TYPE_H_
+#define _UTS_TEL_GET_SIM_TYPE_H_
+
+       static void utc_tel_get_sim_type_01 ();
+       static void utc_tel_get_sim_type_02 ();
+//     static void utc_tapi_get_basic_info_01();
+//     static void utc_tapi_get_basic_info_02();
+
+
+#endif //_UTS_TEL_GET_SIM_TYPE_H_
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.c b/TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.c
new file mode 100644 (file)
index 0000000..6075245
--- /dev/null
@@ -0,0 +1,547 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_LOCK_ENABLE_PERSONALISATION tel_enable_sim_personalization
+*
+* @brief Unit test code for tel_enable_sim_personalization()
+* @par Test function Prototype:
+*      TapiResult_t tel_enable_sim_personalization(TelSimLockPersonalisationInfo_t *PersonalisationPwd, int *pRequestId);
+* @par Test function description:
+*      This API is used to enable the network personalisation feature.
+* @par Important Notes:
+*      None
+* @param [in] PersonalisationPwd
+*      The information required to disable network personalisation.
+*      @code
+       typedef struct
+       {
+               TelSimLockType_t PersonalisationLock;
+               UINT8   Password_length;
+               UINT8   Personalisation_password[TAPI_SEC_LOCK_PERSONALISATION_PASSWD_LEN];
+       }TelSimLockPersonalisationInfo_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is TAPI_EVENT_SIM_ENABLE_PERSONALIZATION_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tapi_sim_lock_personalization.c
+* @brief
+       Test for the tel_disable_sim_personalization() API that is used to disable the network personalisation feature \n
+       Test for the tel_enable_sim_personalization() API that is used to enable the network personalisation feature
+* @author
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_lock_sim_personalization.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_enable_sim_personalization01, 1},
+       {utc_tel_enable_sim_personalization02, 2},
+       {utc_tel_enable_sim_personalization03, 3},
+       {utc_tel_enable_sim_personalization04, 4},
+       {utc_tel_disable_sim_personalization01, 5},
+       {utc_tel_disable_sim_personalization02, 6},
+       {utc_tel_disable_sim_personalization03, 7},
+       {utc_tel_disable_sim_personalization04, 8},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+#if 0
+       case TAPI_EVENT_SIM_LOCKTYPE_INFO_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_LOCKTYPE_INFO_CNF******\n");
+               tet_printf("[SIM APP]SIM SAP trasfer ATR event status  = [0x%x]\n", sim_event->Status);
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+#endif
+       case TAPI_EVENT_SIM_ENABLE_PERS_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_DISABLE_PERS_CNF******\n");
+               tet_printf("[SIM]SIM SAP trasfer ATR event status  = [0x%x]\n", sim_event->Status);
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_DISABLE_PERS_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_DISABLE_PERS_CNF******\n");
+               tet_printf("[SIM]SIM SAP trasfer ATR event status  = [0x%x]\n", sim_event->Status);
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_ENABLE_PERS_CNF = %d", TAPI_EVENT_SIM_ENABLE_PERS_CNF);
+               tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("uts_tapi_sim_lock_personalization Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ENABLE_PERS_CNF, &subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+ tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("uts_tapi_sim_lock_personalization Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_enable_sim_personalization() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_PERSONALIZATION01
+* @param [in] &lock_pers = NULL
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_personalization01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+
+       TapiResult_t err = tel_enable_sim_personalization(NULL,&pRequestId);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err == TAPI_API_INVALID_PTR )
+               TET_STAMP_PASS();
+       else if ( err == TAPI_API_NOT_SUPPORTED )
+               TET_STAMP(TET_NOTINUSE);
+       else
+               TET_STAMP_FAIL();
+
+}
+
+
+/**
+* @brief tel_enable_sim_personalization() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_ENABLE_SIM_PERSONALIZATION02
+* @param [in] &lock_pers
+* @param [out]&pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_enable_sim_personalization02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN;  /* only for testing */
+
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       TET_PRECONDITION(TAPI_API_SUCCESS,tel_get_sim_imsi(&pSimImsiInfo));
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       tet_printf("check");
+       TapiResult_t err = tel_enable_sim_personalization(&lock_pers,NULL);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err == TAPI_API_INVALID_PTR )
+               TET_STAMP_PASS();
+       else if ( err == TAPI_API_NOT_SUPPORTED )
+               TET_STAMP(TET_NOTINUSE);
+       else
+               TET_STAMP_FAIL();
+}
+
+/**
+* @brief tel_enable_sim_personalization() API : Positive condition(Normal operation)
+* @par ID: UTC_TEL_ENABLE_SIM_PERSONALIZATION03
+* @pre Successfully get IMSI information using tel_get_sim_imsi()
+* @param [in] &lock_pers
+*      @code
+       TelSimLockPersonalisationInfo_t lock_pers;
+       TelSimImsiInfo_t pSimImsiInfo;
+       tel_get_sim_imsi(&pSimImsiInfo);
+
+       lock_pers.PersonalisationLock = TAPI_SIM_LOCK_PN;  // only for testing
+       lock_pers.Password_length = 1 // 1 byte length of mnc+mcc
+                                 + 5  // 5 or 6 bytes mnc+mcc
+                                 + 6; //control key;
+       lock_pers.Personalisation_password[0] = 5; // mcc + mnc length can be 5 or 6
+       memcpy(&lock_pers.Personalisation_password[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.Personalisation_password[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(&lock_pers.Personalisation_password[1 + TAPI_SIM_MCC_CODE_LEN + TAPI_SIM_MNC_CODE_LEN], "123456", 6); // only for testing - random password
+*      @endcode
+* @param [out]&pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is TAPI_EVENT_SIM_ENABLE_PERSONALIZATION_CNF
+*/
+void utc_tel_enable_sim_personalization03()
+{
+       TET_STAMP_START("Normal operation ");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN;  /* only for testing */
+
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       TET_PRECONDITION(TAPI_API_SUCCESS,tel_get_sim_imsi(&pSimImsiInfo));
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       TapiResult_t err =  tel_enable_sim_personalization(&lock_pers,&pRequestId);
+       if ( err == TAPI_API_NOT_SUPPORTED )
+       {
+               tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+               TET_STAMP(TET_NOTINUSE);
+               return;
+       }
+       TET_CHECK(TAPI_API_SUCCESS,err);
+
+       gAsyncResult = FALSE;
+       G_MAIN_LOOP_RUN(55);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+}
+
+void utc_tel_enable_sim_personalization04()
+{
+       TET_STAMP_START("Normal operation ");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN + 12;  /* only for testing */
+
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       TET_PRECONDITION(TAPI_API_SUCCESS,tel_get_sim_imsi(&pSimImsiInfo));
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       TapiResult_t err =  tel_enable_sim_personalization(&lock_pers,&pRequestId);
+       if ( err == TAPI_API_NOT_SUPPORTED )
+       {
+               tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+               TET_STAMP(TET_NOTINUSE);
+               return;
+       }
+       TET_CHECK(TAPI_API_SUCCESS,err);
+
+       gAsyncResult = FALSE;
+       G_MAIN_LOOP_RUN(55);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+}
+
+/** @} */
+
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_LOCK_DISABLE_PERSONALISATION tel_disable_sim_personalization
+*
+* @brief Unit test code for tel_disable_sim_personalization()
+* @par Test function Prototype:
+*      TapiResult_t tel_disable_sim_personalization(TelSimLockPersonalisationInfo_t *PersonalisationPwd, int *pRequestId);
+* @par Test function description:
+*      This API is used to disable the network personalisation feature.
+* @par Important Notes:
+*      None
+* @param [in] PersonalisationPwd
+*      The information required to disable network personalisation.
+*      @code
+       typedef struct
+       {
+               TelSimLockType_t PersonalisationLock;
+               UINT8   Password_length;
+               UINT8   Personalisation_password[TAPI_SEC_LOCK_PERSONALISATION_PASSWD_LEN];
+       }TelSimLockPersonalisationInfo_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is TAPI_EVENT_SIM_DISABLE_PERSONALIZATION_CNF
+* @pre
+*      None
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+
+/**
+* @file                uts_tapi_sim_lock_personalization.c
+* @brief
+       Test for the tel_disable_sim_personalization() API that is used to disable the network personalisation feature \n
+       Test for the tel_enable_sim_personalization() API that is used to enable the network personalisation feature
+* @author
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+/**
+* @brief tel_disable_sim_personalization() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_DISABLE_SIM_PERSONALIZATION01
+* @param [in] &lock_pers = NULL
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_personalization01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+
+       TapiResult_t err =  tel_disable_sim_personalization(NULL,&pRequestId);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err == TAPI_API_INVALID_PTR )
+               TET_STAMP_PASS();
+       else if ( err == TAPI_API_NOT_SUPPORTED )
+               TET_STAMP(TET_NOTINUSE);
+       else
+               TET_STAMP_FAIL();
+
+}
+
+/**
+* @brief tel_disable_sim_personalization() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_DISABLE_SIM_PERSONALIZATION02
+* @param [in] &lock_pers
+* @param [out]&pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_disable_sim_personalization02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN;  /* only for testing */
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       tel_get_sim_imsi(&pSimImsiInfo);
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       TapiResult_t err = tel_disable_sim_personalization(&lock_pers,NULL);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err == TAPI_API_INVALID_PTR )
+               TET_STAMP_PASS();
+       else if ( err == TAPI_API_NOT_SUPPORTED )
+               TET_STAMP(TET_NOTINUSE);
+       else
+               TET_STAMP_FAIL();
+}
+
+void utc_tel_disable_sim_personalization03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN;  /* only for testing */
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       tel_get_sim_imsi(&pSimImsiInfo);
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       TapiResult_t err = tel_disable_sim_personalization(&lock_pers,&pRequestId);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err == TAPI_API_SUCCESS )
+               TET_STAMP_PASS();
+       else
+               TET_STAMP_FAIL();
+}
+
+
+void utc_tel_disable_sim_personalization04()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+       TelSimPersPw_t lock_pers;// = {0,};
+
+       lock_pers.type = TAPI_SIM_LOCK_PN-12;  /* only for testing */
+       lock_pers.pw_len = 8 /*control key*/;
+
+       TelSimImsiInfo_t pSimImsiInfo;
+       tel_get_sim_imsi(&pSimImsiInfo);
+       memcpy(&lock_pers.pw[1], pSimImsiInfo.szMcc, TAPI_SIM_MCC_CODE_LEN);
+       memcpy(&lock_pers.pw[1 + TAPI_SIM_MCC_CODE_LEN], pSimImsiInfo.szMnc, TAPI_SIM_MNC_CODE_LEN);
+       memcpy(lock_pers.pw, "12345678\0", 9); /* only for testing - random password */
+
+       TapiResult_t err = tel_disable_sim_personalization(&lock_pers,&pRequestId);
+       tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+       if (err != TAPI_API_SUCCESS )
+               TET_STAMP_PASS();
+       else
+               TET_STAMP_FAIL();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.h b/TC/telephony_TC/sim/unit/uts_tel_lock_sim_personalization.h
new file mode 100644 (file)
index 0000000..aa86475
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SIM_LOCK_PERSONALIZATION_H_
+#define _UTS_TAPI_SIM_LOCK_PERSONALIZATION_H_
+
+       static void utc_tel_enable_sim_personalization01();
+       static void utc_tel_enable_sim_personalization02();
+       static void utc_tel_enable_sim_personalization03();
+       static void utc_tel_enable_sim_personalization04();
+       static void utc_tel_disable_sim_personalization01();
+       static void utc_tel_disable_sim_personalization02();
+       static void utc_tel_disable_sim_personalization03();
+       static void utc_tel_disable_sim_personalization04();
+typedef enum 
+{
+       TAPI_SIM_LOCK_READY             = 0x00, /**< ME Not locked - No pin verifications for any lock*/
+               
+       TAPI_SIM_LOCK_PS,                               /** < PH-SIM (phone-sim) locked.Lock Phone to SIM/UICC card 
+                                                                                  *    (MT asks password when other than current SIM/UICC card inserted; 
+                                                                                  *    MT may remember certain amount of previously used cards thus not 
+                                                                                  *    requiring password when they are inserted 
+                                                                                  */ 
+                                                                               /* This is currently managed by launcher in using gconf - NOT useful from modem 
+                                                                                   * as of now.
+                                                                                  */
+                                                                               
+       TAPI_SIM_LOCK_PF,                                       /** < PH-FSIM (phone-first-sim) Lock Phone to the very 
+                                                                                  * First inserted SIM/UICC card(MT asks password when other than the first SIM/UICC 
+                                                                                  * card is inserted
+                                                                                  */
+                                                                                /* This should managed by launcher in using gconf - NOT useful from modem 
+                                                                                   * as of now.
+                                                                                   
+                                                                                   */
+       TAPI_SIM_LOCK_SC,                                       /** < SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks password in ME power-up and
+                                                                                  *    when this command is issued 
+                                                                                  */
+                                                                          
+       TAPI_SIM_LOCK_FD,                                       /** < FDN - SIM card or active application in the UICC (GSM or USIM)
+                                                                                  *    fixed dialing memory feature */
+       TAPI_SIM_LOCK_PN,                                       /**< Network Personalization */
+       TAPI_SIM_LOCK_PU,                                       /** < network subset Personalization */
+       TAPI_SIM_LOCK_PP,                                       /** < service Provider Personalization */
+       TAPI_SIM_LOCK_PC,                                       /** < Coporate Personalization */
+       TAPI_SIM_LOCK_SC2,                                      /**< PIN2 lock*/
+       TAPI_SIM_LOCK_SCPUK2            = 0x0A,         /** < PIN2 Unblocking Key */
+       TAPI_SIM_LOCK_ACL                       = 0x0B, /** < ACL lock */
+       
+       TAPI_SIM_NO_SIM                 = 0x80,         /**< SIM not inserted */
+       TAPI_SIM_UNAVAIL                        = 0x81, /** < SIM interface error - SIM inserted but cannot communicate */
+       TAPI_SIM_INIT_COMPLETE  = 0x82, /** < SIM initialization completed */
+       TAPI_SIM_PB_INIT_COMPLETE = 0x83, /**< PB init completed */
+} TelSimLockType_t;
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.c b/TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.c
new file mode 100644 (file)
index 0000000..4ae9189
--- /dev/null
@@ -0,0 +1,428 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PB_READ_RECORD tel_read_sim_pb_record
+*
+* @brief Unit test code for tel_read_sim_pb_record()
+* @par Test function Prototype:
+*      TapiResult_t tel_read_sim_pb_record(TelSimPbFileType_t StorageFileType, unsigned short Index, int* pRequestId);
+* @par Test function description:
+*      This API is used to read SIM phone book entry information from given storage type
+* @par Important Notes:
+*      The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+* @param [in] StorageFileType    Different storage types to be selected in SIM.
+* @param [in] Index  Index for accessing the SIM data.
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+* @pre
+*      - Phonebook supported SIM used for test
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_read_sim_pb_record.c
+* @brief       Test for the tel_read_sim_pb_record() API that is used to read phonebook entry
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_read_sim_pb_record.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_read_sim_pb_record_01, 1},
+       {utc_tel_read_sim_pb_record_02, 2},
+       {utc_tel_read_sim_pb_record_03, 3},
+       {utc_tel_read_sim_pb_record_04, 4},
+       {utc_tel_read_sim_pb_record_05, 5},
+       {utc_tel_read_sim_pb_record_06, 6},
+       {utc_tel_read_sim_pb_record_07, 7},
+       {utc_tel_read_sim_pb_record_08, 8},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n**************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+       case TAPI_EVENT_SIM_PB_ACCESS_READ_CNF:
+       {
+                       tet_printf("[SIM]*****************TAPI_EVENT_SIM_PB_ACCESS_READ_CNF***************************");
+                       tet_printf("[SIM]SIM PB access read event status = [%x]", sim_event->Status);
+
+                       //TelSimPbRecordData_t *sim_acces_info = (TelSimPbRecordData_t*)sim_event->pData;
+                       //    tet_printf("[SIM APP]storaget type is [%x]",sim_acces_info->StorageFileType);
+                       //  tet_printf(" SIM phone book access error [%d]", sim_event->Status);
+                       tet_printf("********************************************");
+                       gAsyncResult = TRUE;
+                       bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+               }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_read_sim_pb_record Test Start");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_ACCESS_READ_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_read_sim_pb_record Finished");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_read_sim_pb_record() API : Negative condition(Lower boundary test)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_01
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_read_sim_pb_record_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 1");
+       TelSimPbFileType_t StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_FDN-1;
+       unsigned short Index=1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_read_sim_pb_record() API : Negative condition(Lower boundary test)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_02
+* @param [in] StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_read_sim_pb_record_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 2");
+       TelSimPbFileType_t StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;
+       unsigned short Index=1;
+       int pRequestId=0;
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+       TET_STAMP_PASS();
+}
+
+
+/**
+* @brief tel_read_sim_pb_record() API : Negative condition(NULL parameter test)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_03
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [in] Index = 1
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_read_sim_pb_record_03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT test 3");
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       unsigned short Index=1;
+
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_read_sim_pb_record(StorageFileType,Index,NULL));   //<-------------------- Invalid value
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_read_sim_pb_record() API : Positive condition(Get FDN record)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_04
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+*/
+void utc_tel_read_sim_pb_record_04()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_FDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_FDN;
+    unsigned short Index=1;
+    int pRequestId=0;
+
+    gAsyncResult = FALSE;
+
+    TET_CHECK(TAPI_API_SUCCESS, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+
+    G_MAIN_LOOP_RUN(2);
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_STAMP_PASS();
+       return;
+}
+
+/**
+* @brief tel_read_sim_pb_record() API : Positive condition(Get LDN record)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_05
+* @param [in] StorageFileType = TAPI_SIM_PB_FDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+*/
+void utc_tel_read_sim_pb_record_05()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_LDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_LDN;
+    unsigned short Index=4;
+    int pRequestId=0;
+
+       gAsyncResult = FALSE;
+       
+       TET_CHECK(TAPI_API_SUCCESS, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+       
+       G_MAIN_LOOP_RUN(2);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_read_sim_pb_record() API : Positive condition(Get MSISDN record)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_06
+* @param [in] StorageFileType = TAPI_SIM_PB_MSISDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+*/
+void utc_tel_read_sim_pb_record_06()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_MSISDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_MSISDN;
+    unsigned short Index=1;
+    int pRequestId=0;
+
+       gAsyncResult = FALSE;
+       
+       TET_CHECK(TAPI_API_SUCCESS, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+       
+       G_MAIN_LOOP_RUN(2);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_read_sim_pb_record() API : Positive condition(Get ADN record)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_07
+* @param [in] StorageFileType = TAPI_SIM_PB_ADN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+*/
+void utc_tel_read_sim_pb_record_07()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_ADN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_ADN;
+       unsigned short Index=1;
+       int pRequestId=0;
+       
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(2);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_read_sim_pb_record() API : Positive condition(Get SDN record)
+* @par ID: UTC_TEL_READ_SIM_PB_RECORD_08
+* @param [in] StorageFileType = TAPI_SIM_PB_SDN
+* @param [in] Index = 1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbRecordData_t. \n
+*      - TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+*/
+void utc_tel_read_sim_pb_record_08()
+{
+    TET_STAMP_START("StorageFileType=TAPI_SIM_PB_SDN");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimPbFileType_t StorageFileType=TAPI_SIM_PB_SDN;
+       unsigned short Index=1;
+       int pRequestId=0;
+       
+       gAsyncResult = FALSE;
+               
+       TET_CHECK(TAPI_API_SUCCESS, tel_read_sim_pb_record(StorageFileType,Index,&pRequestId));
+               
+       G_MAIN_LOOP_RUN(5);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.h b/TC/telephony_TC/sim/unit/uts_tel_read_sim_pb_record.h
new file mode 100644 (file)
index 0000000..16ff84f
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_READ_SIM_PB_RECORD_H_
+#define _UTS_TEL_READ_SIM_PB_RECORD_H_
+
+       static void utc_tel_read_sim_pb_record_01 ();
+       static void utc_tel_read_sim_pb_record_02 ();
+       static void utc_tel_read_sim_pb_record_03 ();
+       static void utc_tel_read_sim_pb_record_04 ();
+       static void utc_tel_read_sim_pb_record_05 ();
+       static void utc_tel_read_sim_pb_record_06 ();
+       static void utc_tel_read_sim_pb_record_07 ();
+       static void utc_tel_read_sim_pb_record_08 ();
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.c
new file mode 100644 (file)
index 0000000..5ac45c8
--- /dev/null
@@ -0,0 +1,338 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_CARD_READER_STATUS tel_req_sap_cardreader_status
+*
+* @brief Unit test code for tel_req_sap_cardreader_status()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_cardreader_status( int* pRequestId);
+* @par Test function description:
+*      This API is used to get the card reader status.
+* @par Important Notes:
+*      None
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimCardReaderStatus_t. \n
+*      - TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_cardreader_status.c
+* @brief       Test for the tel_req_sap_cardreader_status() API that is used to get SAP card reader status
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_req_sap_cardreader_status.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_cardreader_status_01, 1},
+       {utc_tel_req_sap_cardreader_status_02, 2},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int sim_sap_process_for_condition(int wish_condition)
+{
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       
+       tet_printf("sap wish condition[%d]:0-disconnect, 1-connect",wish_condition);
+
+       if(wish_condition == 1)
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       }
+       else
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+       }
+
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+               
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_connection(&pConnectionReq,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(2);
+
+       if(gAsyncResult == TRUE)
+               return 0;
+       else
+               return -1;
+
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+       case TAPI_EVENT_SIM_SAP_CONNECT_NOTI:
+       {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_SAP_CONNECT_NOTI***************************\n");
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+
+       case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+       {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_SAP_CONNECT_CNF***************************\n");
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+       case TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF:
+       {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF***************************\n");
+            TelSimCardReaderStatus_t *sap_card_reader_status = (TelSimCardReaderStatus_t*)sim_event->pData;
+
+            tet_printf(" [SIM APP]card reader result [%x]\n ", sap_card_reader_status->CardReaderResult);
+            tet_printf(" [SIM APP]card reader status bitwise encoded data [%d]\n", sap_card_reader_status->CardReaderStatus);
+
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            //tet_printf("Info : TAPI_EVENT_SIM_READ_FILE_CNF = %d", TAPI_EVENT_SIM_READ_FILE_CNF);
+            tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_cardreader_status Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);           
+
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_cardreader_status Test Finished\n");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_cardreader_status() API : Normal condition(Request card reader status)
+* @par ID: UTC_TEL_REQ_SAP_CARDREADER_STATUS_01
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimCardReaderStatus_t. \n
+*      - TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF
+*/
+void utc_tel_req_sap_cardreader_status_01()
+{
+    tet_infoline("TRANSFER SAP READER STATUS\n");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+#if 0 // we assume sap connect on.
+
+       // Step 1 : make proper condition
+       tet_printf("Step 1 : sap connect");
+       
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+#endif         
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_cardreader_status(&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+                       
+       tet_printf("after real tc api - wait start");
+                       
+       G_MAIN_LOOP_RUN(3);
+                       
+       tet_printf("after real tc api - wait stop");
+                       
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+       TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+                       
+exit:
+       // Step 3 : make default condition
+#if 0 // we assume sap connect on.
+
+       tet_printf("Step 3 : disconnect sap");
+                       
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+       return;
+}
+
+
+/**
+* @brief tel_req_sap_cardreader_status() API : Negative condition(NULL Parameter test)
+* @par ID: UTC_TEL_REQ_SAP_CARDREADER_STATUS_02
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_cardreader_status_02()
+{
+    TET_STAMP_START("TRANSFER SAP READER STATUS WITH INVALID SIM SESSION\n");
+    TapiResult_t error = tel_req_sap_cardreader_status(NULL);
+    TET_CHECK(TAPI_API_INVALID_PTR,error);
+    TET_STAMP_PASS();
+
+       tel_reset_modem();
+
+    return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status.h
new file mode 100644 (file)
index 0000000..c48f059
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_REQ_SAP_CARDREADER_STATUS_H
+#define _UTS_TEL_REQ_SAP_CARDREADER_STATUS_H
+
+       static void utc_tel_req_sap_cardreader_status_01();
+       static void utc_tel_req_sap_cardreader_status_02();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.c
new file mode 100644 (file)
index 0000000..0686d32
--- /dev/null
@@ -0,0 +1,309 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_CONNECT_REQUEST tel_req_sap_connection
+*
+* @brief Unit test code for tel_req_sap_connection()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_connection( TelSimSapConnect_t *pConnectionReq, int* pRequestId);
+* @par Test function description:
+*      This API is used to request for an external SAP connection
+* @par Important Notes:
+*      None
+* @param [in] pConnectionReq    This enum gives the SAP ATR response data information
+*      @code
+       typedef struct
+       {
+               TelSimSapMsgId_t        MsgId;  // connect or disconnect request /response
+               TelSimSapConnectionStatus_t     ConnectionStatus;       // used only in response from tapi
+               unsigned short  MaxMsgSize;     // request from app or set by lower layer
+       }TelSimSapConnect_t;
+
+        // This enum gives the SAP message Ids between SAP client and SAP server.
+       typedef enum
+       {
+               TAPI_SIM_SAP_CONNECT_REQ        = 0x00,
+               TAPI_SIM_SAP_CONNECT_RESP       = 0x01,
+               TAPI_SIM_SAP_DISCONNECT_REQ     = 0x02,
+               TAPI_SIM_SAP_DISCONNECT_RESP    = 0x03,
+               TAPI_SIM_SAP_DISCONNECT_IND     = 0x04,
+               TAPI_SIM_SAP_TRANSFER_APDU_REQ  = 0x05,
+               TAPI_SIM_SAP_TRANSFER_APDU_RESP = 0x06,
+               TAPI_SIM_SAP_TRANSFER_ATR_REQ   = 0x07,
+               TAPI_SIM_SAP_TRANSFER_ATR_RESP  = 0x08,
+               TAPI_SIM_SAP_POWER_SIM_OFF_REQ  = 0x09,
+               TAPI_SIM_SAP_POWER_SIM_OFF_RESP = 0x0A,
+               TAPI_SIM_SAP_POWER_SIM_ON_REQ   = 0x0B,
+               TAPI_SIM_SAP_POWER_SIM_ON_RESP  = 0x0C,
+               TAPI_SIM_SAP_RESET_SIM_REQ      = 0x0D,
+               TAPI_SIM_SAP_RESET_SIM_RESP     = 0x0E,
+               TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ  = 0x0F,
+               TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_RESP = 0x10,
+               TAPI_SIM_SAP_STATUS_IND         = 0x11,
+               TAPI_SIM_SAP_ERROR_RESP         = 0x12,
+               TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_REQ = 0x13,
+               TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP = 0x14
+       }TelSimSapMsgId_t
+
+       // This enum gives the SAP connection status information. This is used for Async Response Message
+       typedef enum
+       {
+               TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00,
+               TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH ,
+               TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE,
+               TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE
+       }TelSimSapConnectionStatus_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+*      The event associated is below and the event data is #TelSimSapConnect_t.
+*      - TAPI_EVENT_SIM_SAP_CONNECT_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_connection.c
+* @brief       Test for the tel_req_sap_connection() API that is used to sap connect request
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_req_sap_connection.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_connection_01, 1},
+       {utc_tel_req_sap_connection_02, 2},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+       case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+               TelSimSapConnect_t  *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+//             tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+//             tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+//             tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_STAT_CNF:******\n");
+               tet_printf("[SIM APP]SIM SAP connect event status = [%x]\n", sim_event->Status);
+
+               TelSimSapStatusInfo_t *sap_conn_status = (TelSimSapStatusInfo_t*)sim_event->pData;
+               tet_printf("[SIM APP] connection status info [%x]\n", *sap_conn_status);
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+       }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_SAP_CONNECT_CNF = %d", TAPI_EVENT_SIM_SAP_CONNECT_CNF);
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tet_infoline("utc_tel_req_sap_connection Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+       return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_connection Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_connection() API : Negative condition(Second Parameter is Null)
+* @par ID: UTC_TEL_REQ_SAP_CONNECTION_01
+* @param [in] &pConnectionReq
+* @param [out]&sim_data = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_connection_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR 1");
+
+       TelSimSapConnect_t pConnectionReq;
+       pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+
+    TET_CHECK(TAPI_API_INVALID_PTR,tel_req_sap_connection(&pConnectionReq,NULL));
+    TET_STAMP_PASS();
+    return;
+}
+
+
+/**
+* @brief tel_req_sap_connection() API : Negative condition(First Parameter is Null)
+* @par ID: UTC_TEL_REQ_SAP_CONNECTION_02
+* @param [in] &pConnectionReq = NULL
+* @param [out]&sim_data
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_connection_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR 2");
+
+       int pRequestId=0;
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_req_sap_connection(NULL,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection.h
new file mode 100644 (file)
index 0000000..2f551f4
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_req_sap_connection_H
+#define _uts_tel_req_sap_connection_H
+
+
+       static void utc_tel_req_sap_connection_01();
+       static void utc_tel_req_sap_connection_02();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.c
new file mode 100644 (file)
index 0000000..3fee414
--- /dev/null
@@ -0,0 +1,275 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_CONNECT_STATUS_REQ tel_req_sap_connection_status
+*
+* @brief Unit test code for tel_req_sap_connection_status()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_connection_status(int* pRequestId);
+* @par Test function description:
+*      This API is used to request for the status of the requested SAP connection.
+* @par Important Notes:
+*      None
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapStatusInfo_t. \n
+*      - TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF
+* @pre
+*      - SAP supported sim used to testing
+*   - tel_req_sap_connection() function called
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_connection_status.c
+* @brief       Test for the tel_req_sap_connection_status() API that is used to get phonebook entry info
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_req_sap_connection_status.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_connection_status_01, 1},
+       {utc_tel_req_sap_connection_status_02, 2},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+       case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+               TelSimSapConnect_t  *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+               tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+               tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+               tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+
+               bReceived = TRUE;
+               if (sap_conn_resp->ConnectionStatus==0)
+                       gAsyncResult = TRUE;
+               else
+                       gAsyncResult = FALSE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_STAT_CNF:******\n");
+               tet_printf("[SIM APP]SIM SAP connect event status = [%x]\n", sim_event->Status);
+
+               TelSimSapStatusInfo_t *sap_conn_status = (TelSimSapStatusInfo_t*)sim_event->pData;
+               tet_printf("[SIM APP] connection status info [%x]\n", *sap_conn_status);
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_SAP_CONNECT_CNF = %d", TAPI_EVENT_SIM_SAP_CONNECT_CNF);
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_connection_status Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+ tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_connection_status Test Finished\n");
+
+       if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_connection_status() API : Positive condition
+* @par ID: UTC_TEL_REQ_SAP_CONNECTIOn_STATUS_01
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS and async result
+*/
+void utc_tel_req_sap_connection_status_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR 1");
+       int requestId =0;
+       int tapiRet = TAPI_API_SUCCESS;
+       gAsyncResult = FALSE;
+       tapiRet = tel_req_sap_connection_status(&requestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+       
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_connection_status() API : Negative condition(NULL Parameter test)
+* @par ID: UTC_TEL_REQ_SAP_CONNECTIOn_STATUS_02
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_connection_status_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR");
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_req_sap_connection_status(NULL));
+       TET_STAMP_PASS();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_connection_status.h
new file mode 100644 (file)
index 0000000..eb27814
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_REQ_SAP_CONNECTIOn_STATUS_H
+#define _UTS_TEL_REQ_SAP_CONNECTIOn_STATUS_H
+       static void utc_tel_req_sap_connection_status_01();
+       static void utc_tel_req_sap_connection_status_02();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.c
new file mode 100644 (file)
index 0000000..a563324
--- /dev/null
@@ -0,0 +1,405 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_SET_POWER tel_req_sap_power_operation
+*
+* @brief Unit test code for tel_req_sap_power_operation()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_power_operation(TelSimSapMsgId_t MsgId,  int* pRequestId );
+* @par Test function description:
+*      This API is used to set the SIM power level for SAP.
+* @par Important Notes:
+*      None
+* @param [in] MsgId
+*      This enum gives the SAP message Ids between SAP client and SAP server.
+*      @code
+       // This enum gives the SAP message Ids between SAP client and SAP server.
+       typedef enum
+       {
+               TAPI_SIM_SAP_CONNECT_REQ                = 0x00,
+               TAPI_SIM_SAP_CONNECT_RESP               = 0x01,
+               TAPI_SIM_SAP_DISCONNECT_REQ             = 0x02,
+               TAPI_SIM_SAP_DISCONNECT_RESP            = 0x03,
+               TAPI_SIM_SAP_DISCONNECT_IND             = 0x04,
+               TAPI_SIM_SAP_TRANSFER_APDU_REQ          = 0x05,
+               TAPI_SIM_SAP_TRANSFER_APDU_RESP         = 0x06,
+               TAPI_SIM_SAP_TRANSFER_ATR_REQ           = 0x07,
+               TAPI_SIM_SAP_TRANSFER_ATR_RESP          = 0x08,
+               TAPI_SIM_SAP_POWER_SIM_OFF_REQ          = 0x09,
+               TAPI_SIM_SAP_POWER_SIM_OFF_RESP         = 0x0A,
+               TAPI_SIM_SAP_POWER_SIM_ON_REQ           = 0x0B,
+               TAPI_SIM_SAP_POWER_SIM_ON_RESP          = 0x0C,
+               TAPI_SIM_SAP_RESET_SIM_REQ              = 0x0D,
+               TAPI_SIM_SAP_RESET_SIM_RESP             = 0x0E,
+               TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ    = 0x0F,
+               TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_RESP   = 0x10,
+               TAPI_SIM_SAP_STATUS_IND                 = 0x11,
+               TAPI_SIM_SAP_ERROR_RESP                 = 0x12,
+               TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_REQ  = 0x13,
+               TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP = 0x14
+       }TelSimSapMsgId_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapPower_t. \n
+*      - TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF
+* @pre
+*      - SAT supported SIM used for test
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_power_operation.c
+* @brief       Test for the tel_req_sap_power_operation() API that is used to sap set power
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_req_sap_power_operation.h"
+#include "sim_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_power_operation_01, 1},
+       {utc_tel_req_sap_power_operation_02, 2},
+       {utc_tel_req_sap_power_operation_03, 3},
+       {utc_tel_req_sap_power_operation_04, 4},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int sim_sap_process_for_condition(int wish_condition)
+{
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       
+       tet_printf("sap wish condition[%d]:0-disconnect, 1-connect",wish_condition);
+
+       if(wish_condition == 1)
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       }
+       else
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+       }
+
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+               
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_connection(&pConnectionReq,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(2);
+
+       if(gAsyncResult == TRUE)
+               return 0;
+       else
+               return -1;
+
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+       case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+               TelSimSapConnect_t  *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+               tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+               tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+               tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+
+               bReceived = TRUE;
+               if (sap_conn_resp->ConnectionStatus==0)
+                       gAsyncResult = TRUE;
+               else
+                       gAsyncResult = FALSE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF:******\n");
+               tet_printf("[SIM APP]SIM SAP connect event status = [%x]\n", sim_event->Status);
+
+               TelSimSapPower_t *sap_status = (TelSimSapPower_t*)sim_event->pData;
+//             tet_printf("[SIM APP] sap_status->MsgID = %d\n", sap_status->MsgId);
+//             tet_printf("[SIM APP] sap_status->SimPowerResult = %d  (enum TelSimSapResultCode_t) \n", sap_status->SimPowerResult);
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF = %d", TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF);
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_power_operation Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);                
+
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_power_operation Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+/**
+* @brief tel_req_sap_power_operation() API : Negative condition(Lower bound test)
+* @par ID: UTC_TEL_REQ_SAP_pOWER_OPErATION_01
+* @param [in] MsgId = TAPI_SIM_SAP_CONNECT_REQ-1; // Lower bound
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_req_sap_power_operation_01()
+{
+    tet_infoline("TAPI_API_INVALID_INPUT 1");
+
+    TelSimSapMsgId_t MsgId = TAPI_SIM_SAP_CONNECT_REQ-1;
+    int pRequestId=0;
+
+    TapiResult_t error = tel_req_sap_power_operation(MsgId,&pRequestId);
+    TET_CHECK( TAPI_API_INVALID_INPUT,error);
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_power_operation() API : Negative condition(Upper bound test)
+* @par ID: UTC_TEL_REQ_SAP_pOWER_OPErATION_02
+* @param [in] MsgId = TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP+1; // Upper bound
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_req_sap_power_operation_02()
+{
+    tet_infoline("TAPI_API_INVALID_INPUT 2");
+
+    TelSimSapMsgId_t MsgId = TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP+1;
+    int pRequestId=0;
+
+    TapiResult_t error = tel_req_sap_power_operation(MsgId,&pRequestId);
+    TET_CHECK( TAPI_API_INVALID_INPUT,error);
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_power_operation() API : Negative condition(NULL parameter test)
+* @par ID: UTC_TEL_REQ_SAP_pOWER_OPErATION_03
+* @param [in] MsgId
+* @param [out]&pRequestId = NULL; // NULL parameter
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_power_operation_03()
+{
+    tet_infoline("TAPI_API_INVALID_PTR 1");
+
+    TelSimSapMsgId_t MsgId = TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP+1;
+    TapiResult_t error = tel_req_sap_power_operation(MsgId,NULL);
+    TET_CHECK( TAPI_API_INVALID_PTR,error);
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_power_operation() API : Positive condition(Normal operation)
+* @par ID: UTC_TEL_REQ_SAP_pOWER_OPErATION_04
+* @param [in] MsgId = TAPI_SIM_SAP_POWER_SIM_ON_REQ;
+* @param [out]&pRequestId
+* @return TAPI_API_SUCCESS
+* The event associated is below and the event data is #TelSimSapPower_t. \n
+*      - TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF
+*/
+void utc_tel_req_sap_power_operation_04()
+{
+    tet_infoline("Normal operation");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    TelSimSapMsgId_t MsgId = (TelSimSapMsgId_t) TAPI_SIM_SAP_POWER_SIM_ON_REQ;
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+#if 0 // we assume sap connect on.
+       // Step 1 : make proper condition
+       tet_printf("Step 1 : sap connect");
+       
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+#endif 
+       gAsyncResult = FALSE;
+       
+       tapiRet = tel_req_sap_power_operation(MsgId,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(3);
+               
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+       TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+               
+exit:
+#if 0 // we assume sap connect on.     
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disconnect sap");
+               
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+       gAsyncResult = FALSE;
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_power_operation.h
new file mode 100644 (file)
index 0000000..6100272
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_req_sap_power_operation_H
+#define _uts_tel_req_sap_power_operation_H
+
+       static void utc_tel_req_sap_power_operation_01();
+       static void utc_tel_req_sap_power_operation_02();
+       static void utc_tel_req_sap_power_operation_03();
+       static void utc_tel_req_sap_power_operation_04();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.c
new file mode 100644 (file)
index 0000000..5ad78d9
--- /dev/null
@@ -0,0 +1,423 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PSAP_TRANSFER_APDU tel_req_sap_transfer_apdu
+*
+* @brief Unit test code for tel_req_sap_transfer_apdu()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_transfer_apdu(TelSimSapApduData_t *pApduData,  int* pRequestId);
+* @par Test function description:
+*      This API is used to transfer APDU from SIM using SAP.
+* @par Important Notes:
+*      None
+* @param [in] pApduData    SAP APDU data
+*      @code
+       typedef struct
+       {
+               unsigned char   ApduLength;
+               unsigned char   Apdu[TAPI_SIM_APDU_MAX_LEN];
+       }TelSimSapApduData_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapApduData_t. \n
+*      - TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_transfer_apdu.c
+* @brief       Test for the tel_req_sap_transfer_apdu() API that is used to transfer APDU
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_req_sap_transfer_apdu.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_transfer_apdu_01, 1},
+       {utc_tel_req_sap_transfer_apdu_02, 2},
+       {utc_tel_req_sap_transfer_apdu_03, 3},
+       {NULL, 0}
+};
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int sim_sap_process_for_condition(int wish_condition)
+{
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       
+       tet_printf("sap wish condition[%d]:0-disconnect, 1-connect",wish_condition);
+
+       if(wish_condition == 1)
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       }
+       else
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+       }
+
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+               
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_connection(&pConnectionReq,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(2);
+
+       if(gAsyncResult == TRUE)
+               return 0;
+       else
+               return -1;
+
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+               case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+               {
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+                       TelSimSapConnect_t      *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+               
+                       tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+               //              tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+               //              tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+               //              tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+               
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+               }
+               break;
+
+       case TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF:
+       {
+               tet_printf("\n[GOT THE EVENT]*****TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF******\n");
+
+               int i = 0;
+               TelSimSapApduData_t *sap_transfer_apdu = (TelSimSapApduData_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP trasfer APDU event status  = [%x]\n", sim_event->Status);
+       //      tet_printf(" [SIM APP]APDU  length [%x]\n", sap_transfer_apdu->ApduLength);
+       //      tet_printf(" [SIM APP]APDU  data ---> \n" );
+       //      for(i =0 ; i<sap_transfer_apdu->ApduLength;  i++ )
+       //              tet_printf(" [%x]", sap_transfer_apdu->Apdu[i]);
+
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF:
+       {
+               tet_printf("[SIM APP]*********** SAP TRANSFER ATR *************\n");
+
+               int i = 0;
+               TelSimSapAtrInfo_t *sap_transfer_atr = (TelSimSapAtrInfo_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP trasfer ATR event status  = [%x]\n", sim_event->Status);
+
+               tet_printf(" [SIM APP]ATR result [%x]\n", sap_transfer_atr->AtrResult);
+               tet_printf(" [SIM APP]ATR length [%x]\n", sap_transfer_atr->AtrLength);
+               tet_printf(" [SIM APP]ATR data ---> \n" );
+
+               for(i =0 ; i<sap_transfer_atr->AtrLength; i++ )
+                       tet_printf(" [SIM APP][%x]", sap_transfer_atr->AtrData[i]);
+
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_SAP_CONNECT_CNF = %d", TAPI_EVENT_SIM_SAP_CONNECT_CNF);
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_transfer_apdu Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_transfer_apdu Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_transfer_apdu() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_REQ_SAP_TRANSFER_APDU_01
+* @param [in] pApduData
+* @param [out]&sim_data = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_transfer_apdu_01()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int file_id = TAPI_SIM_EFILE_ICCID;
+
+       /* for selecting EF ICCID */
+       TelSimSapApduData_t  apdu_data;
+       int pRequestId=0;
+       apdu_data.ApduLength = 7;
+       apdu_data.Apdu[0] = 0xA0; // class
+       apdu_data.Apdu[1] = 0xA4; // instruction
+       apdu_data.Apdu[2] = 0; // p1 = parameter 1
+       apdu_data.Apdu[3] = 0; // p2 = parameter 2
+       apdu_data.Apdu[4] = 2; // p3 - parameter 3
+
+       memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+
+       TapiResult_t error = tel_req_sap_transfer_apdu(&apdu_data,NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, error);
+       TET_STAMP_PASS();
+       
+}
+
+/**
+* @brief tel_req_sap_transfer_apdu() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_REQ_SAP_TRANSFER_APDU_02
+* @param [in] pApduData = NULL
+* @param [out]&sim_data
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_transfer_apdu_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR ");
+       int pRequestId=0;
+       TapiResult_t error = tel_req_sap_transfer_apdu(NULL,&pRequestId);
+       TET_CHECK(TAPI_API_INVALID_PTR, error);
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_transfer_apdu() API : Positive condition(Request to transfer Apdu)
+* @par ID: UTC_TEL_REQ_SAP_TRANSFER_APDU_03
+* @param [in] pApduData
+*      @code
+       int file_id = TAPI_SIM_EFILE_ICCID;
+
+       // for selecting EF ICCID
+       TelSimSapApduData_t  apdu_data;
+       int pRequestId=0;
+       apdu_data.ApduLength = 7;
+       apdu_data.Apdu[0] = 0xA0; // class
+       apdu_data.Apdu[1] = 0xA4; // instruction
+       apdu_data.Apdu[2] = 0;    // p1 = parameter 1
+       apdu_data.Apdu[3] = 0;    // p2 = parameter 2
+       apdu_data.Apdu[4] = 2;    // p3 - parameter 3
+       memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+*      @endcode
+* @param [out]&sim_data = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_transfer_apdu_03()
+{
+       TET_STAMP_START("Normal operation ");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int file_id = TAPI_SIM_EFILE_ICCID;
+       int tapiRet = TAPI_API_SUCCESS;
+       int pRequestId=0;
+       
+       /* for selecting EF ICCID */
+       TelSimSapApduData_t  apdu_data;
+
+       apdu_data.ApduLength = 7;
+       apdu_data.Apdu[0] = 0xA0; // class
+       apdu_data.Apdu[1] = 0xA4; // instruction
+       apdu_data.Apdu[2] = 0; // p1 = parameter 1
+       apdu_data.Apdu[3] = 0; // p2 = parameter 2
+       apdu_data.Apdu[4] = 2; // p3 - parameter 3
+
+       memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+#if 0 // we assume sap connect on.
+       // Step 1 : make proper condition
+       tet_printf("Step 1 : sap connect");
+       
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+#endif 
+       gAsyncResult = FALSE;
+       
+       tapiRet = tel_req_sap_transfer_apdu(&apdu_data,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(3);
+               
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+       TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+               
+exit:
+#if 0 // we use connection status until finishing sap related api test.
+
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disconnect sap");
+               
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+       gAsyncResult = FALSE;
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu.h
new file mode 100644 (file)
index 0000000..bc2aaaf
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_req_sap_transfer_apdu_H
+#define _uts_tel_req_sap_transfer_apdu_H
+
+       static void utc_tel_req_sap_transfer_apdu_01();
+       static void utc_tel_req_sap_transfer_apdu_02();
+       static void utc_tel_req_sap_transfer_apdu_03();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.c
new file mode 100644 (file)
index 0000000..48c8b7c
--- /dev/null
@@ -0,0 +1,344 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_TRANSFER_ATR_REQUEST tel_req_sap_transfer_atr
+*
+* @brief Unit test code for tel_req_sap_transfer_atr()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_transfer_atr(int* pRequestId);
+* @par Test function description:
+*      This API is used to request for an external SAP connection.
+* @par Important Notes:
+*      None
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapAtrInfo_t. \n
+*      - TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_transfer_atr_request.c
+* @brief       Test for the tel_req_sap_transfer_atr() API that is used to transfer atr request
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_req_sap_transfer_atr.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_transfer_atr_01, 1},
+       {utc_tel_req_sap_transfer_atr_02, 2},
+       {NULL, 0}
+};
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int sim_sap_process_for_condition(int wish_condition)
+{
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       
+       tet_printf("sap wish condition[%d]:0-disconnect, 1-connect",wish_condition);
+
+       if(wish_condition == 1)
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       }
+       else
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+       }
+
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+               
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_connection(&pConnectionReq,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(5);
+
+       if(gAsyncResult == TRUE)
+               return 0;
+       else
+               return -1;
+
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+               case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+               {
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+                       TelSimSapConnect_t      *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+               
+                       tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+               //              tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+               //              tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+               //              tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+               
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+               }
+               break;
+
+       case TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF:
+       {
+               tet_printf("[SIM APP]*********** SAP TRANSFER ATR *************\n");
+
+               int i = 0;
+               TelSimSapAtrInfo_t *sap_transfer_atr = (TelSimSapAtrInfo_t*)sim_event->pData;
+
+               tet_printf("[SIM APP]SIM SAP trasfer ATR event status  = [%x]\n", sim_event->Status);
+
+               tet_printf(" [SIM APP]ATR result [%x]\n", sap_transfer_atr->AtrResult);
+               tet_printf(" [SIM APP]ATR length [%x]\n", sap_transfer_atr->AtrLength);
+               tet_printf(" [SIM APP]ATR data ---> \n" );
+
+//             for(i =0 ; i<sap_transfer_atr->AtrLength; i++ )
+//                     tet_printf(" [SIM APP][%x]", sap_transfer_atr->AtrData[i]);
+
+               bReceived = TRUE;
+               gAsyncResult = TRUE;
+       }
+       break;
+
+       default:
+       {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_transfer_atr Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);                 
+                       
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_transfer_atr Test Finished\n");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_transfer_atr() API : Positive condition(Request to transfer Atr)
+* @par ID: UTC_TEL_REQ_SAP_TRANSFER_ATR_01
+* @param [out]&pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapAtrInfo_t. \n
+*      - TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF
+*/
+void utc_tel_req_sap_transfer_atr_01()
+{
+       TET_STAMP_START("Normal operation");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : sap connect");
+
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+
+    tet_printf("Step 2 : sap atr");
+
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_req_sap_transfer_atr(&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+       
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(3);
+
+    tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+       TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+       
+exit:
+#if 0 // we use connection status until finishing sap related api test.
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disconnect sap");
+       
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+       gAsyncResult = FALSE;
+       return;
+}
+
+/**
+* @brief tel_req_sap_transfer_atr() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_REQ_SAP_TRANSFER_ATR_02
+* @param [out]&pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sap_transfer_atr_02()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR 1");
+
+       TapiResult_t error = tel_req_sap_transfer_atr(NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, error);
+       TET_STAMP_PASS();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr.h
new file mode 100644 (file)
index 0000000..9d1fb5a
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_REQ_SAP_TRANSFER_ATR_H
+#define _UTS_TEL_REQ_SAP_TRANSFER_ATR_H
+
+       static void utc_tel_req_sap_transfer_atr_01();
+       static void utc_tel_req_sap_transfer_atr_02();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.c b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.c
new file mode 100644 (file)
index 0000000..c28d8b3
--- /dev/null
@@ -0,0 +1,439 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL tel_req_sap_transport_protocol
+*
+* @brief Unit test code for tel_req_sap_transport_protocol()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sap_transport_protocol(TelSimSapProtocol_t  Protocol, int* pRequestId);
+* @par Test function description:
+*      This API is used to transfer APDU from SIM using SAP.
+* @par Important Notes:
+*      None
+* @param [in] Protocol                 SAP transfer protocol type
+*      @code
+       typedef enum
+       {
+               TAPI_SIM_SAP_PROTOCOL_T0,  // T = 0
+               TAPI_SIM_SAP_PROTOCOL_T1   // T = 1
+       }TelSimSapProtocol_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapResultCode_t. \n
+*      - TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sap_transport_protocol.c
+* @brief       Test for the tel_req_sap_transport_protocol() API that is used to set transport protocol
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_req_sap_transport_protocol.h"
+
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sap_transport_protocol_01, 1},
+       {utc_tel_req_sap_transport_protocol_02, 2},
+       {utc_tel_req_sap_transport_protocol_03, 3},
+       {utc_tel_req_sap_transport_protocol_04, 4},
+       {utc_tel_req_sap_transport_protocol_05, 5},
+       {NULL, 0}
+};
+
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int sim_sap_process_for_condition(int wish_condition)
+{
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       
+       tet_printf("sap wish condition[%d]:0-disconnect, 1-connect",wish_condition);
+
+       if(wish_condition == 1)
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       }
+       else
+       {
+               pConnectionReq.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+       }
+
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+               
+       gAsyncResult = FALSE;
+               
+       tapiRet = tel_req_sap_connection(&pConnectionReq,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+               
+       G_MAIN_LOOP_RUN(2);
+
+       if(gAsyncResult == TRUE)
+               return 0;
+       else
+               return -1;
+
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+               case TAPI_EVENT_SIM_SAP_CONNECT_CNF:
+               {
+                       tet_printf("\n[GOT THE EVENT]*******TAPI_EVENT_SIM_SAP_CONNECT_CNF:******\n");
+                       TelSimSapConnect_t      *sap_conn_resp = (TelSimSapConnect_t*)sim_event->pData;
+               
+                       tet_printf("[SIM APP]SIM SAP connect request event status  = [%x]\n", sim_event->Status);
+               //              tet_printf("[SIM APP] message id [%x]\n", sap_conn_resp->MsgId);
+               //              tet_printf("[SIM APP]connection status [%x]\n ", sap_conn_resp->ConnectionStatus);
+               //              tet_printf("[SIM APP]max message size [%d]\n", sap_conn_resp->MaxMsgSize);
+               
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+               }
+               break;
+
+               case TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF:
+               {
+                       tet_printf("\n[GOT THE EVENT]*****TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF******\n");
+                       TelSimSapProtocol_t *sap_result_code = (TelSimSapProtocol_t*)sim_event->pData;
+
+                       tet_printf("[SIM APP]SIM SAP set protocol event status  = [%x]\n", sim_event->Status);
+               //      tet_printf("[SIM APP]SAP SET protocol  result [%x]\n", *sap_result_code );
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+               }
+               break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sap_transport_protocol Test Start\n");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               tel_register_event(TAPI_EVENT_SIM_SAP_CONNECT_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);                 
+
+               gStartupSuccess = TRUE;
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sap_transport_protocol Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sap_transport_protocol() API : Positive condition(Set protocol TAPI_SIM_SAP_PROTOCOL_T0)
+* @par ID: UTC_TEL_REQ_SAP_TRANSPORT_PROTOCOL_01
+* @param [in] Protocol = TAPI_SIM_SAP_PROTOCOL_T0
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapResultCode_t. \n
+*      - TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF
+*/
+void utc_tel_req_sap_transport_protocol_01()
+{
+       TET_STAMP_START("Normal operation : TAPI_SIM_SAP_PROTOCOL_T0");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimSapProtocol_t Protocol=TAPI_SIM_SAP_PROTOCOL_T0;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+#if 0 // we assume sap connect on.
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : sap connect");
+
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+#endif
+    gAsyncResult = FALSE;
+
+       tapiRet = tel_req_sap_transport_protocol(Protocol,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+
+    G_MAIN_LOOP_RUN(3);
+
+    TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+    TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+
+exit:
+#if 0 // we assume sap connect on.
+
+       // Step 3 : make default condition
+    tet_printf("Step 3 : disconnect sap");
+
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+    gAsyncResult = FALSE;
+       return;
+}
+
+/**
+* @brief tel_req_sap_transport_protocol() API : Positive condition(Set protocol TAPI_SIM_SAP_PROTOCOL_T1)
+* @par ID: UTC_TEL_REQ_SAP_TRANSPORT_PROTOCOL_02
+* @param [in] Protocol = TAPI_SIM_SAP_PROTOCOL_T1
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimSapResultCode_t. \n
+*      - TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF
+*/
+void utc_tel_req_sap_transport_protocol_02()
+{
+       TET_STAMP_START("Normal operation : TAPI_SIM_SAP_PROTOCOL_T1");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+       TelSimSapProtocol_t Protocol=TAPI_SIM_SAP_PROTOCOL_T1;
+       int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+#if 0 // we assume sap connect on.     
+       // Step 1 : make proper condition
+       tet_printf("Step 1 : sap connect");
+       
+       if( 0 != sim_sap_process_for_condition(1))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+#endif 
+       gAsyncResult = FALSE;
+       
+       tapiRet = tel_req_sap_transport_protocol(Protocol,&pRequestId);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,tapiRet);
+       
+       G_MAIN_LOOP_RUN(2);
+       
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE);
+       TET_RESULT_EQUAL_GOTO(TET_PASS,exit,gAsyncResult,TRUE);
+       
+exit:
+#if 0 // we assume sap connect on.
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disconnect sap");
+       
+       if( 0 != sim_sap_process_for_condition(0))
+       {
+               tet_printf("condition set is failed!!");
+       }
+#endif 
+       gAsyncResult = FALSE;
+       return;
+}
+
+
+/**
+* @brief tel_req_sap_transport_protocol() API : Negative condition(Low boundary test)
+* @par ID: UTC_TEL_REQ_SAP_TRANSPORT_PROTOCOL_03
+* @param [in] Protocol = TAPI_SIM_SAP_PROTOCOL_T0-1;// Low boundary
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_req_sap_transport_protocol_03()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT");
+
+       TelSimSapProtocol_t Protocol=(TelSimSapProtocol_t)TAPI_SIM_SAP_PROTOCOL_T0-1;
+       int pRequestId=0;
+
+       TapiResult_t error = tel_req_sap_transport_protocol(Protocol,&pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, error);
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_transport_protocol() API : Negative condition(Upper boundary test)
+* @par ID: UTC_TEL_REQ_SAP_TRANSPORT_PROTOCOL_04
+* @param [in] Protocol = TAPI_SIM_SAP_PROTOCOL_T1+1;// Upper boundary
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_req_sap_transport_protocol_04()
+{
+       TET_STAMP_START("TAPI_API_INVALID_INPUT");
+
+       TelSimSapProtocol_t Protocol=(TelSimSapProtocol_t)TAPI_SIM_SAP_PROTOCOL_T1+1;
+       int pRequestId=0;
+
+       TapiResult_t error = tel_req_sap_transport_protocol(Protocol,&pRequestId);
+       TET_CHECK(TAPI_API_INVALID_INPUT, error);
+       TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_req_sap_transport_protocol() API : Negative condition(Null parameter)
+* @par ID: UTC_TEL_REQ_SAP_TRANSPORT_PROTOCOL_04
+* @param [in] Protocol = TAPI_SIM_SAP_PROTOCOL_T1
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_req_sap_transport_protocol_05()
+{
+       TET_STAMP_START("TAPI_API_INVALID_PTR");
+
+       TelSimSapProtocol_t Protocol= TAPI_SIM_SAP_PROTOCOL_T1;
+       TapiResult_t error = tel_req_sap_transport_protocol(Protocol,NULL);
+       TET_CHECK(TAPI_API_INVALID_PTR, error);
+       TET_STAMP_PASS();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.h b/TC/telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol.h
new file mode 100644 (file)
index 0000000..132af0d
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tel_req_sap_transport_protocol_H
+#define _uts_tel_req_sap_transport_protocol_H
+
+       static void utc_tel_req_sap_transport_protocol_01();
+       static void utc_tel_req_sap_transport_protocol_02();
+       static void utc_tel_req_sap_transport_protocol_03();
+       static void utc_tel_req_sap_transport_protocol_04();
+       static void utc_tel_req_sap_transport_protocol_05();
+
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sim_access.c b/TC/telephony_TC/sim/unit/uts_tel_req_sim_access.c
new file mode 100644 (file)
index 0000000..6ea944b
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_REQ_SIM_ACCESS Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_REQ_SIM_ACCESS Unit\r
+* @addtogroup  UTS_TEL_REQ_SIM_ACCESS_ Uts_Tel_Req_Sim_Access\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_req_sim_access.c\r
+* @brief This is a suit of unit test cases to test tel_req_sim_access() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/
+
+
+#include "uts_tel_req_sim_access.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sim_access_01, 1},
+       {utc_tel_req_sim_access_02, 2},
+       {utc_tel_req_sim_access_03, 3},
+       {NULL, 0}
+};
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+static TelSimPinOperationResult_t gSimEventStatus;
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");\r
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);\r
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);\r
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+        case TAPI_EVENT_SIM_RSIM_ACCESS_CNF:\r
+        {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_RSIM_ACCESS_CNF (%d) ***************************\n", TAPI_EVENT_SIM_GET_MAILBOX_CNF);\r
+            tet_printf("SIM rsim access event status = [%x]\n", sim_event->Status);\r
+
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:\r
+        {
+            gSimEventStatus = sim_event->Status;
+            gAsyncResult = FALSE;
+            tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);\r
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+       }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+    return 0;
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_req_sim_access Test Start\n");\r
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_RSIM_ACCESS_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )\r
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       tel_register_app_name("org.samsung.test");\r
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_req_sim_access Test Finished\n");\r
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+\r
+void utc_tel_req_sim_access_01()
+{\r
+       TET_STAMP_START("utc_tel_req_sim_access_01");\r
+\r
+    int request=0;\r
+    TelSimRSimReq_t sim = {0,};
+    sim.file_id = 0x6F60;
+    sim.rsim_cmd = TAPI_SIM_GET_RESPONSE;
+\r
+       gAsyncResult = FALSE;\r
+                                       \r
+       TET_CHECK(TAPI_API_SUCCESS,tel_req_sim_access(&sim,&request));\r
+                                                               \r
+       G_MAIN_LOOP_RUN(2);\r
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+
+void utc_tel_req_sim_access_02()
+{
+       TET_STAMP_START("utc_tel_req_sim_access_02");\r
+\r
+    TelSimRSimReq_t sim = {0,};
+    sim.file_id = 0x6F60;
+    sim.rsim_cmd = TAPI_SIM_GET_RESPONSE;
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_req_sim_access(&sim,NULL));\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+
+void utc_tel_req_sim_access_03()
+{
+       TET_STAMP_START("utc_tel_req_sim_access_03");\r
+\r
+    int requestId = 0;\r
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_req_sim_access(NULL,&requestId));\r
+       TET_STAMP_PASS();\r
+       return;\r
+}\r
+\r
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sim_access.h b/TC/telephony_TC/sim/unit/uts_tel_req_sim_access.h
new file mode 100644 (file)
index 0000000..ba9adbb
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  SIM\r
+*/\r
+\r
+/**\r
+* @ingroup     SIM\r
+* @addtogroup  UTS_TEL_REQ_SIM_ACCESS Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_REQ_SIM_ACCESS Unit\r
+* @addtogroup  UTS_TEL_REQ_SIM_ACCESS_ Uts_Tel_Req_Sim_Access\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_req_sim_access.h\r
+* @brief This is a suit of unit test cases to test tel_req_sim_access() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2010.06.29\r
+*/\r
+\r
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+#include <string.h>
+\r
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+
+#ifndef _UTS_TEL_REQ_SIM_ACCESS_H_
+#define _UTS_TEL_REQ_SIM_ACCESS_H_
+
+       static void utc_tel_req_sim_access_01 ();
+       static void utc_tel_req_sim_access_02 ();
+       static void utc_tel_req_sim_access_03 ();
+       
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.c b/TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.c
new file mode 100644 (file)
index 0000000..fbee581
--- /dev/null
@@ -0,0 +1,277 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_SAP_AUTH tel_req_sim_isim_authentication
+*
+* @brief Unit test code for tel_req_sim_isim_authentication()
+* @par Test function Prototype:
+*      TapiResult_t tel_req_sim_isim_authentication(TelSimIsimAuthenticationData_t* AuthReqData, int *pRequestId);
+* @par Test function description:
+*      This function is a used to do the authentication proceedure of ISIM for IMS application
+* @par Important Notes:
+*      None
+* @param [in] AuthReqData
+* ISIM Authentication data.(auth_req_data - authentication data to be verified.)
+* @code
+// GBA(Generic Bootstrapping architecture) Boot strapping parameters.
+// This is used for IMS Authentication proceedure.
+typedef struct
+{
+       UINT8 RandomAccessLength;       // ISIM random access length
+       UINT8 AuthDataLength; // ISIM Boot straping transaction ID len
+       UINT8 RandomAccessData[TAPI_SIM_ISIM_AUTH_MAX_REQ_DATA_LEN];    // ISIM random data
+       UINT8 AuthData[TAPI_SIM_ISIM_AUTH_MAX_REQ_DATA_LEN];    // ISIM autherisation data
+}TelSimIsimAuthenticationData_t;
+* @endcode
+* @param [out] pRequestId
+*   - Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimIsimAuthenticationResponse_t. \n
+*      - TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF
+* @pre
+*      SAP supported sim used to testing
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_req_sim_isim_authentication.c
+* @brief       Test for the tel_req_sim_isim_authentication() API that is used to isim authentication request
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_req_sim_isim_authentication.h"
+#include "sim_common.h"
+
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_req_sim_isim_authentication_01, 1},
+       {utc_tel_req_sim_isim_authentication_02, 2},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+
+       case TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF:
+       {
+            tet_printf("\n[SIM APP]*****************TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF***************************\n");
+            gAsyncResult = TRUE;
+            bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf(" TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF = %d", TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF);
+            tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+               }
+       }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("uts_tel_req_sim_isim_authentication Test Start");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+ tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("uts_tel_req_sim_isim_authentication Finished");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_req_sim_isim_authentication() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_REQ_SIM_ISIM_AUTHENTICATION_01
+* @param [in] pAuthenticationData
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sim_isim_authentication_01()
+{
+    TET_STAMP_START("NULL Test 1");
+    TelSimIsimAuthenticationData_t pAuthenticationData;
+
+    tet_printf(" Enter  RAND data \n");
+    strcpy((char*)pAuthenticationData.RandomAccessData, "username@operator.com");
+    pAuthenticationData.RandomAccessLength= strlen("username@operator.com");
+
+    tet_printf(" Enter Authentication  data \n");
+    strcpy((char*)pAuthenticationData.AuthData,  "+1-212-555-12345");
+    pAuthenticationData.AuthDataLength = strlen("+1-212-555-12345");
+
+    /* Calling TAPI API */
+    TapiResult_t err = tel_req_sim_isim_authentication(&pAuthenticationData,NULL);
+    tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+    if (err == TAPI_API_INVALID_PTR )
+        TET_STAMP_PASS();
+    else if ( err == TAPI_API_NOT_SUPPORTED )
+        TET_STAMP(TET_NOTINUSE);
+    else
+        TET_STAMP_FAIL();
+}
+
+/**
+* @brief tel_req_sim_isim_authentication() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_REQ_SIM_ISIM_AUTHENTICATION_02
+* @param [in] pAuthenticationData = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_req_sim_isim_authentication_02()
+{
+    TET_STAMP_START("NULL Test 2");
+    int pRequestId=0;
+
+    /* Calling TAPI API */
+    TapiResult_t err = tel_req_sim_isim_authentication(NULL,&pRequestId);
+    tet_printf("%s[%d] %s(): error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) );
+    if (err == TAPI_API_INVALID_PTR )
+        TET_STAMP_PASS();
+    else if ( err == TAPI_API_NOT_SUPPORTED )
+        TET_STAMP(TET_NOTINUSE);
+    else
+        TET_STAMP_FAIL();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.h b/TC/telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication.h
new file mode 100644 (file)
index 0000000..749a7f0
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _uts_tapi_isim_auth_req_H_
+#define _uts_tapi_isim_auth_req_H_
+
+       static void utc_tel_req_sim_isim_authentication_01();
+       static void utc_tel_req_sim_isim_authentication_02();
+
+#endif
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_set_sim_language.c b/TC/telephony_TC/sim/unit/uts_tel_set_sim_language.c
new file mode 100644 (file)
index 0000000..5cb66c9
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_set_sim_language.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sim_language_01, 1},
+       {utc_tel_set_sim_language_02, 2},
+       {NULL, 0}
+};
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(nw_context_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       //GMainLoop *mainloop;
+       nw_context_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (nw_context_loop);
+
+       return 0;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+// G_MAIN Utility : time out callback function
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[SIM APP][TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n\n\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM APP]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM APP]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+
+       case TAPI_EVENT_SIM_SET_LANGUAGE_CNF:
+        {
+               tet_printf("\n[SIM APP]***************TAPI_EVENT_SIM_SET_LANGUAGE_CNF*****************************\n");
+               tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+               bReceived = TRUE;
+               if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       gAsyncResult = TRUE;
+               else
+                       gAsyncResult = FALSE;
+        }
+       break;
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("[SIM APP]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM APP]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+    tet_infoline("utc_tel_set_sim_language Test Start\n");
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if ( TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_SET_LANGUAGE_CNF,&subscription_id,(TelAppCallback)sim_app_callback, NULL) ) 
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+       
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_set_sim_langauge Test Finished\n");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+
+void utc_tel_set_sim_language_01()
+{
+       TET_STAMP_START("utc_tel_set_sim_language_01");
+
+    TelSimLanguagePreferenceCode_t language = 0x00;
+       TET_CHECK(TAPI_API_INVALID_PTR,tel_set_sim_language(language,NULL));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+void utc_tel_set_sim_language_02()
+{
+       TET_STAMP_START("utc_tel_set_sim_language_02");
+
+    TelSimLanguagePreferenceCode_t language = 0x00;
+    int req_id = 0;
+
+       gAsyncResult = FALSE;
+                               
+       TET_CHECK(TAPI_API_SUCCESS,tel_set_sim_language(language,&req_id));
+                                                       
+       G_MAIN_LOOP_RUN(2);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_set_sim_language.h b/TC/telephony_TC/sim/unit/uts_tel_set_sim_language.h
new file mode 100644 (file)
index 0000000..3fd22aa
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SET_SIM_LANGUAGE_H
+#define _UTS_TEL_SET_SIM_LANGUAGE_H
+
+       static void utc_tel_set_sim_language_01();
+       static void utc_tel_set_sim_language_02();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.c b/TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.c
new file mode 100644 (file)
index 0000000..188cebf
--- /dev/null
@@ -0,0 +1,519 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_PB_UPDATE_RECORD tel_update_sim_pb_record
+*
+* @brief Unit test code for tel_update_sim_pb_record()
+* @par Test function Prototype:
+*      TapiResult_t tel_update_sim_pb_record(const TelSimPbRecordData_t* pPbRecordData, int* pRequestId);
+* @par Test function description:
+*      This API is used to add or edit SIM phone book record entry information.
+* @par Important Notes:
+*      GSM 7 Bit or Unicode conversion required to make record data
+*      - GSM 7 Bit conversion
+* @code
+BOOL oem_encode_gsm_7_bit_chars (char text_len,  const char* text_data,char *out_len_max, char* gsm7bit_text )
+{
+       int i;
+       int pos;
+        UINT16 shift = 0;
+
+       for( pos = 0, i = 0; i < text_len; pos++, i++ )
+       {
+               // pack the low bits - for single char
+               gsm7bit_text[pos] = text_data[i] >> shift;
+
+               if ( i + 1 < text_len )
+               {
+                       // pack the high bits using the low bits of the next character
+                       gsm7bit_text[pos] |= text_data[i+1] << ( 7 - shift );
+                       shift++;
+                       if( shift == 7 )
+                       {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+       *out_len_max  = (text_len* 7 )/8;
+       return pos;
+}
+* @endcode
+*      - Unicode conversion
+* @code
+BOOL
+oem_encode_text_unicode(char text_len, char *text_data,char *unicode_text_len,char *unicode_text)
+{
+       int j,i;
+       i = j = 0;
+
+       if(text_len == 0)
+       {
+               tet_printf(LEVEL_ERR,"Unicode encoding failed - input text string length is 0!");
+               return FALSE;
+       }
+       // UNicode conversion
+       // a  = Ascii is 61 and in Unicode it is 0061 but modem expects 6100
+       for(j= 0,i = 0;i<text_len*2;i++)
+       {
+               unicode_text[i++] = text_data[j++];
+               unicode_text[i] = 0x00;
+       }
+       *unicode_text_len = text_len * 2;
+       return TRUE;
+}
+@endcode
+* @param [in] pPbRecordData  Record data
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_UPDATE_CNF
+* @pre
+*      - Phonebook supported SIM used for test
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tapi_pb_rec_modify_access.c
+* @brief       Test for the tel_update_sim_pb_record() API that is used to modify phonebook record
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "uts_tel_update_sim_pb_record.h"
+#include "sim_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_update_sim_pb_record_01, 1},
+       {utc_tel_update_sim_pb_record_02, 2},
+       {utc_tel_update_sim_pb_record_03, 3},
+       {utc_tel_update_sim_pb_record_04, 4},
+       {utc_tel_update_sim_pb_record_05, 5},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+
+// Prototype : User must add function body
+gboolean g_timeout_callback(void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+      {
+        case TAPI_EVENT_SIM_PB_UPDATE_CNF:
+        {
+                       tet_printf("[SIM]*****************TAPI_EVENT_SIM_PB_UPDATE_CNF***************************");
+                       tet_printf("SIM Delete PB event status = [%x]", sim_event->Status);
+
+                       //TelSimPbUpdateResp_t *pUpdateResp = (TelSimPbUpdateResp_t *)sim_event->pData;
+                       //  tet_printf(" index [%d]\n",pUpdateResp->PbIndex);
+                       // tet_printf(" storage type [%d]\n",pUpdateResp->PbStorageInfo.StorageFileType);
+                       tet_printf("*******************************************");
+                       gAsyncResult = TRUE;
+                       bReceived = TRUE;
+        }
+        break;
+
+        default:
+        {
+            bReceived = TRUE;
+            gAsyncResult = FALSE;
+            tet_printf("Info : TAPI_EVENT_SIM_PB_DELETE_CNF = %d", TAPI_EVENT_SIM_PB_DELETE_CNF);
+            tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+            tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+            break;
+               }
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_update_sim_pb_record Test Start");
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_PB_UPDATE_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL))
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_update_sim_pb_record Finished");
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/* Utility function
+*/
+BOOL oem_encode_gsm_7_bit_chars (char text_len,  const char* text_data,char *out_len_max, char* gsm7bit_text )
+{
+       int i;
+       int pos;
+        UINT16 shift = 0;
+
+       for( pos = 0, i = 0; i < text_len; pos++, i++ )
+       {
+               /* pack the low bits - for single char */
+               gsm7bit_text[pos] = text_data[i] >> shift;
+
+               if ( i + 1 < text_len )
+               {
+                       /* pack the high bits using the low bits of the next character */
+                       gsm7bit_text[pos] |= text_data[i+1] << ( 7 - shift );
+
+                       shift++;
+
+                       if( shift == 7 )
+                       {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+       *out_len_max  = (text_len* 7 )/8;
+
+       /* done */
+       return pos;
+
+}
+
+BOOL oem_encode_text_unicode(char text_len, char *text_data,char *unicode_text_len,char *unicode_text)
+{
+       int j,i;
+       i = j = 0;
+
+       if(text_len == 0)
+       {
+               tet_printf("Unicode encoding failed - input text string length is 0!");
+               return FALSE;
+       }
+       /*UNicode conversion*/
+       /* a  = Ascii is 61 and in Unicode it is 0061 but modem expects 6100 */
+       for(j= 0,i = 0;i<text_len*2;i++)
+       {
+               unicode_text[i++] = text_data[j++];
+               unicode_text[i] = 0x00;
+       }
+       *unicode_text_len = text_len * 2;
+       return TRUE;
+
+}
+
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_update_sim_pb_record() API : Negative condition(NULL parameter test)
+* @par ID: UTC_TEL_UPDATE_SIM_PB_RECORD_01
+* @param [in] pb_add = NULL
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_update_sim_pb_record_01()
+{
+       int  pRequestId=0;
+
+       TET_STAMP_START("TAPI_API_INVALID_PTR");
+       /* calling PB capability info api */
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_update_sim_pb_record(NULL,&pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_update_sim_pb_record() API : Negative condition(NULL parameter test)
+* @par ID: UTC_TEL_UPDATE_SIM_PB_RECORD_02
+* @param [in] pb_add
+* @param [out] &pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_update_sim_pb_record_02()
+{
+       TelSimPbRecordData_t  pb_add;
+       pb_add.StorageFileType=TAPI_SIM_PB_GAS;
+       pb_add.Index=1;
+       char unicode_text[256];
+       int unicode_text_len = 0;
+
+       TET_STAMP_START("TAPI_API_INVALID_PTR");
+
+       unsigned char name[]="user";
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData,name,20);
+
+       /* GSM 7bit conversion */
+       oem_encode_gsm_7_bit_chars(strlen((char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData) ,
+                               (char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData, (char *)&unicode_text_len, unicode_text);
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData, unicode_text, unicode_text_len );
+       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength =  unicode_text_len;
+       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType = TAPI_SIM_TEXT_ENC_GSM7BIT; // always 2 for GAS and AAS
+
+       TET_CHECK(TAPI_API_INVALID_PTR, tel_update_sim_pb_record(&pb_add, NULL)); //<----Invalid PTR
+       TET_STAMP_PASS();
+       return;
+}
+
+
+
+/**
+* @brief tel_update_sim_pb_record() API : Negative condition(Low boundry test)
+* @par ID: UTC_TEL_UPDATE_SIM_PB_RECORD_03
+* @param [in] pb_add.StorageFileType = (TelSimPbFileType_t)-1;//<--------- invalid
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_update_sim_pb_record_03()
+{
+       TelSimPbRecordData_t  pb_add;
+       pb_add.StorageFileType = -1;//<--------- invalid
+       int  pRequestId=0;
+       pb_add.Index=1;
+       char unicode_text[256];
+       int unicode_text_len = 0;
+
+       TET_STAMP_START("TAPI_API_INVALID_INPUT");
+
+       unsigned char name[]="user";
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData,name,20);
+
+       /* GSM 7bit conversion */
+       oem_encode_gsm_7_bit_chars(strlen((char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData) ,
+                               (char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData, (char *)&unicode_text_len, unicode_text);
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData, unicode_text, unicode_text_len );
+       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength =  unicode_text_len;
+       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType = TAPI_SIM_TEXT_ENC_GSM7BIT; // always 2 for GAS and AAS
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_update_sim_pb_record(&pb_add, &pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_update_sim_pb_record() API : Negative condition(Upper boundry test)
+* @par ID: UTC_TEL_UPDATE_SIM_PB_RECORD_04
+* @param [in] pb_add.StorageFileType = (TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN + 1;//<--------- invalid
+* @param [out] &pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_update_sim_pb_record_04()
+{
+       TelSimPbRecordData_t  pb_add;
+       pb_add.StorageFileType=(TelSimPbFileType_t)TAPI_SIM_PB_UNKNOWNN+1;//<--------- invalid
+       int  pRequestId=0;
+       pb_add.Index=1;
+       char unicode_text[256];
+       int unicode_text_len = 0;
+
+       TET_STAMP_START("TAPI_API_INVALID_INPUT");
+
+       unsigned char name[]="user";
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData,name,20);
+
+       /* GSM 7bit conversion */
+       oem_encode_gsm_7_bit_chars(strlen((char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData) ,
+                               (char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData, (char *)&unicode_text_len, unicode_text);
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData, unicode_text, unicode_text_len );
+       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength =  unicode_text_len;
+       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType = TAPI_SIM_TEXT_ENC_GSM7BIT; // always 2 for GAS and AAS
+
+       TET_CHECK(TAPI_API_INVALID_INPUT, tel_update_sim_pb_record(&pb_add, &pRequestId));
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/**
+* @brief tel_update_sim_pb_record() API : Positive condition(Save to 3GSIM)
+* @par ID: UTC_TEL_UPDATE_SIM_PB_RECORD_05
+* @param [in] pb_add
+* @code
+       pb_add.StorageFileType=TAPI_SIM_PB_3GSIM;
+       pb_add.Index=1;
+
+       char unicode_text[256];
+       int unicode_text_len = 0;
+
+       unsigned char name[]="user";
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData,name,20);
+
+       // Unicode conversion conversion
+       BOOL ret =oem_encode_text_unicode(strlen((char *)pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData) ,
+                               (char *)pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData, (char *)&unicode_text_len, unicode_text);
+       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData, unicode_text, unicode_text_len );
+       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength =  unicode_text_len;
+       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType = TAPI_SIM_TEXT_ENC_GSM7BIT;
+* @endcode
+* @param [out] &pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPbUpdateResp_t. \n
+*      - TAPI_EVENT_SIM_PB_UPDATE_CNF
+*/
+void utc_tel_update_sim_pb_record_05()
+{
+       TelSimPbRecordData_t  pb_add = {0,};
+       pb_add.StorageFileType=TAPI_SIM_PB_3GSIM;
+       int  pRequestId=0;
+       pb_add.Index=1;
+       char unicode_text[256];
+       int unicode_text_len = 0;
+
+       TET_STAMP_START("StorageFileType=TAPI_SIM_PB_3GSIM");
+       TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+
+       pb_add.ContactInfo.Pb3GData.FileTypeCount = 1;
+       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileType = TAPI_PB_3G_NAME;
+       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileDataType.EncryptionType = TAPI_SIM_TEXT_ENC_UCS2;
+
+       unsigned char name[]="user";
+       memcpy(pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData,name,20);
+
+       /* Unicode conversion */
+       BOOL ret =oem_encode_text_unicode(strlen((char *)pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData) ,
+                               (char *)pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData, (char *)&unicode_text_len, unicode_text);
+       if (ret == FALSE)
+       {
+               tet_printf("unicode conversion failed");
+               TET_STAMP_FAIL();
+               return;
+       }
+       memcpy(pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileData, unicode_text, unicode_text_len );
+       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[0].FileDataLength =  unicode_text_len;
+
+       gAsyncResult = FALSE;
+
+       TET_CHECK(TAPI_API_SUCCESS, tel_update_sim_pb_record(&pb_add, &pRequestId));
+
+       G_MAIN_LOOP_RUN(2);
+       TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       return;
+}
+
+
+/** @} */
+
diff --git a/TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.h b/TC/telephony_TC/sim/unit/uts_tel_update_sim_pb_record.h
new file mode 100644 (file)
index 0000000..ecf372d
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_PB_REC_MODIFY_ACCESS_H_
+#define _UTS_TAPI_PB_REC_MODIFY_ACCESS_H_
+
+       static void utc_tel_update_sim_pb_record_01 ();
+       static void utc_tel_update_sim_pb_record_02 ();
+       static void utc_tel_update_sim_pb_record_03 ();
+       static void utc_tel_update_sim_pb_record_04 ();
+       static void utc_tel_update_sim_pb_record_05 ();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.c b/TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.c
new file mode 100644 (file)
index 0000000..ae5a9b9
--- /dev/null
@@ -0,0 +1,366 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_VERIFY_PIN tel_verifiy_sim_pins
+*
+* @brief Unit test code for tel_verifiy_sim_pins()
+* @par Test function Prototype:
+*      TapiResult_t tel_verifiy_sim_pins(const TelSimPinData_t *pPinData, int *pRequestId);
+* @par Test function description:
+*      This function performs PIN verification. This function performs PIN verification based
+*      on the pin type passed along with pin data
+* @par Important Notes:
+*      This API is used only Boot time. You will used other API set(tel_change_sim_pins(), etc) when boot finished
+* @param [in] pPinData  PIN code, entered by the user.
+*      @code
+       typedef struct
+       {
+               TelSimPinType_t pinType; // Pin type
+               char szPinCode[TAPI_SIM_PIN_LENGTH+1];  // PIN code
+       } TelSimPinData_t;
+       typedef enum
+       {
+               TAPI_SIM_PTYPE_PIN1,
+               TAPI_SIM_PTYPE_PIN2,
+               TAPI_SIM_PTYPE_PUK1,
+               TAPI_SIM_PTYPE_PUK2,
+               TAPI_SIM_PTYPE_UPIN,
+               TAPI_SIM_PTYPE_ADM
+       } TelSimPinType_t;
+*      @endcode
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* ( Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_VERIFY_PIN_CNF(API_SIM_PIN_OPERATION_SUCCESS)
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_verifiy_sim_pins.c
+* @brief       Test for the tel_verifiy_sim_pins() API that is used to verify pin code
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_verifiy_sim_pins.h"
+#include "async_util.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_verifiy_sim_pins_01, 1},
+       {utc_tel_verifiy_sim_pins_02, 2},
+       {utc_tel_verifiy_sim_pins_03, 3},
+       {utc_tel_verifiy_sim_pins_04, 4},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+       gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+       case TAPI_EVENT_SIM_VERIFY_SEC_CNF:
+       {
+               tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_VERIFY_SEC_CNF***************************\n");
+
+               //TelSimPinInfo_t *pPinInfo = (TelSimPinInfo_t*)sim_event->pData;
+               tet_printf("SIM Verify PIN event status = [%x]\n", sim_event->Status);
+
+               if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+               {
+                       tet_printf("PIN2 Vefication Success!");
+
+               }
+               else
+               {
+                       tet_printf("PIN1 Verification Failed! - PIN Required \n");
+                       //tet_printf("Remainint attempts [%d]\n", pPinInfo->RemainingAttempts);
+               }
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+       }
+       break;
+
+       case TAPI_EVENT_SIM_ENABLE_SEC_CNF:
+        {
+               tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF***************************\n");
+               //TelSimPinInfo_t *pPinInfo = (TelSimPinInfo_t*)sim_event->pData;
+
+               tet_printf("SIM Enable PIN event status = [%x]\n", sim_event->Status);
+               bReceived = TRUE;
+               if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       gAsyncResult = TRUE;
+               else
+                       gAsyncResult = FALSE;
+
+
+        }
+       break;
+
+       case TAPI_EVENT_SIM_DISABLE_SEC_CNF:
+        {
+               tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_DISABLE_SEC_CNF***************************\n");
+               //TelSimPinInfo_t *pPinInfo = (TelSimPinInfo_t*)sim_event->pData;
+
+               tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+               bReceived = TRUE;
+               if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       gAsyncResult = TRUE;
+               else
+                       gAsyncResult = FALSE;
+        }
+       break;
+
+       default:
+               {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_DISABLE_SEC_CNF = %d", TAPI_EVENT_SIM_DISABLE_SEC_CNF);
+               tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+               }
+               break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_verifiy_sim_pins Test Start\n");
+
+       sim_pin_info_setup();
+       
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+               if ( (TAPI_API_SUCCESS == tel_register_event(TAPI_EVENT_SIM_VERIFY_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL) ) || (TAPI_API_SUCCESS == tel_register_event(TAPI_SIM_PIN_OPERATION_SUCCESS,&subscription_id,(TelAppCallback)sim_app_callback,NULL) ) )
+                       gStartupSuccess = TRUE;
+               else
+                       tet_infoline("startup fail. tel_register_event() failed");
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+       tel_register_app_name("org.samsung.test");
+       
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_verifiy_sim_pins Test Finished\n");
+
+   // Disable pin with correct PWD
+    TelSimSecPw_t pPinData;
+    int pRequestId=0;
+    pPinData.type=TAPI_SIM_PTYPE_PIN1;
+
+    pPinData.pw = (unsigned char*)g_si.pin1;
+       pPinData.pw_len =strlen(g_si.pin1) ;
+    tel_disable_sim_security(&pPinData,&pRequestId);
+
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_verifiy_sim_pins() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_01
+* @param [in] &pPinData
+* @param [out]&pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verifiy_sim_pins_01()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR");
+    TelSimSecPw_t pPinData;
+    pPinData.type=TAPI_SIM_PTYPE_PIN1;
+       pPinData.pw = (unsigned char*)g_si.pin1;
+       pPinData.pw_len =strlen(g_si.pin1) ;
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_verifiy_sim_pins(&pPinData, NULL));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verifiy_sim_pins() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_02
+* @param [in] &pPinData = NULL
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verifiy_sim_pins_02()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR");
+    int RequestId;
+    TelSimSecPw_t pPinData;
+    pPinData.type=TAPI_SIM_PTYPE_PIN1;
+       pPinData.pw = (unsigned char*)g_si.pin1;
+       pPinData.pw_len =strlen(g_si.pin1) ;
+
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_verifiy_sim_pins(NULL,&RequestId));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verifiy_sim_pins() API : Negative condition(Low boundary test)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_03
+* @param [in] &pPinData.PinType = (TelSimPinType_t)TAPI_SIM_PTYPE_PIN1-1;
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verifiy_sim_pins_03()
+{
+    TET_STAMP_START("TAPI_API_INVALID_INPUT");
+    int RequestId;
+    TelSimSecPw_t pPinData = {0,};
+    pPinData.type = (TelSimPinType_t)TAPI_SIM_PTYPE_PIN1-1;
+       pPinData.pw = (unsigned char*)g_si.pin1;
+       pPinData.pw_len =strlen(g_si.pin1) ;
+    TET_CHECK(TAPI_API_INVALID_INPUT, tel_verifiy_sim_pins(&pPinData, &RequestId));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verifiy_sim_pins() API : Negative condition(Upper boundary test)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_04
+* @param [in] &pPinData.PinType = (TelSimPinType_t)TAPI_SIM_PTYPE_SIM+1;
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verifiy_sim_pins_04()
+{
+    TET_STAMP_START("TAPI_API_INVALID_INPUT");
+    int RequestId;
+    TelSimSecPw_t pPinData;
+    pPinData.type = (TelSimPinType_t)TAPI_SIM_PTYPE_SIM+1;
+       pPinData.pw = (unsigned char*)g_si.pin1;
+       pPinData.pw_len =strlen(g_si.pin1) ;
+
+    TET_CHECK(TAPI_API_INVALID_INPUT, tel_verifiy_sim_pins(&pPinData, &RequestId));
+    TET_STAMP_PASS();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.h b/TC/telephony_TC/sim/unit/uts_tel_verifiy_sim_pins.h
new file mode 100644 (file)
index 0000000..65c885c
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_VERIFIY_SIM_PINS_H
+#define _UTS_TEL_VERIFIY_SIM_PINS_H
+
+       static void utc_tel_verifiy_sim_pins_01();
+       static void utc_tel_verifiy_sim_pins_02();
+       static void utc_tel_verifiy_sim_pins_03();
+       static void utc_tel_verifiy_sim_pins_04();
+#endif
diff --git a/TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.c b/TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.c
new file mode 100644 (file)
index 0000000..8f1b7d1
--- /dev/null
@@ -0,0 +1,633 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+* @ingroup TELEPHONY_API
+* @addtogroup TAPI_API_SIM_SAT SIM/SAT
+*/
+
+/**
+* @ingroup  TAPI_API_SIM_SAT
+* @addtogroup UTS_SIM_SAT Unit
+*/
+
+/**
+* @ingroup  UTS_SIM_SAT
+* @addtogroup UTS_TAPI_SIM_UNBLOCK_PIN tel_verify_sim_puks
+*
+* @brief Unit test code for tel_verify_sim_puks()
+* @par Test function Prototype:
+*      TapiResult_t tel_verify_sim_puks(const TelSimPinData_t * pPukPinData, const TelSimPinData_t * pNewPinData, int *pRequestId);
+* @par Test function description:
+*      This function performs unblock PIN operation based on PUK information passed along with
+*      unblock information entered by the user.
+* @par Important Notes:
+*      Based on Pin status (PIN/UPIN/PUK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
+*      is published to Applications.
+* @param [in] pPukPinData  Specifies unblocking PIN password
+*      @code
+       typedef struct
+       {
+               TelSimPinType_t PinType;        // Pin type
+               char    szPinCode[TAPI_SIM_PIN_LENGTH+1]; // PIN code
+       } TelSimPinData_t;
+*      @endcode
+* @param [in] pNewPinData  Specifies PIN password.
+* @param [out] pRequestId   Unique identifier for a particular request.
+*   - request_id value can be any value from 0 to 255 if the API is returned successfully
+*   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* ( Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_UNBLOCK_PIN_CNF(TAPI_SIM_PIN_OPERATION_SUCCESS)
+* @pre
+*      - Before test script compile, you set correct PIN1_NORMAL, PIN2_NORMAL, PIN1_CHANGED, PIN2_CHANGED value on 'tet_tapi_util.h'
+*      - Before test script compile, you set incorrect PIN1_INCORRECT value on 'tet_tapi_util.h'
+* @post
+*      None
+* @return
+* Return Type : (TapiResult_t)
+* - TAPI_API_SUCCESS - indicating that the operation has completed successfully.
+* - Otherwise it provides an error code (Refer #TapiResult_t)
+* @{
+*/
+
+/**
+* @file                uts_tel_verify_sim_puks.c
+* @brief       Test for the tel_verify_sim_puks() API that is used to unblock PIN
+* @author      
+* @version     Initial Creation V0.1
+* @date                2008.07.30
+*/
+
+
+#include <tet_api.h>
+#include <ITapiSim.h>
+#include <TapiCommon.h>
+
+#include "tet_tapi_util.h"
+#include "sim_common.h"
+#include "uts_tel_verify_sim_puks.h"
+#include "async_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_verify_sim_puks_01, 1},
+       {utc_tel_verify_sim_puks_02, 2},
+       {utc_tel_verify_sim_puks_03, 3},
+       {utc_tel_verify_sim_puks_04, 4},
+       {utc_tel_verify_sim_puks_05, 5},
+       {NULL, 0}
+};
+
+/*
+  User Defined Handler
+*/
+// Global variable for user data
+static BOOL gAsyncResult; //user defined data : Async callback is called or not
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+extern sim_info_t g_si;
+
+
+/*
+  G_MAIN Utility ////////////////////////////////////////////////////////////////////////////
+*/
+// Prototype : User must add function body
+gboolean g_timeout_callback (void *data);
+
+// GMainLoop global handler
+GMainLoop *sim_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(sim_loop);
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       sim_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add ( (sec * 1000), g_timeout_callback, NULL);
+       g_main_loop_run (sim_loop);
+
+       return 0;
+}
+
+gboolean g_timeout_callback (void *data)
+{
+//     gAsyncResult = FALSE;
+       tet_printf("[TIME OUT] g_timeout called .Close g_main_roop()");
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+// End of  G_MAIN Utility//////////////////////////////////////////////////////////////////////
+
+
+static int sim_pin_process_for_condition(TelSimPinType_t wish_pin, TelSimPinStatus_t wish_condition)
+{
+    int pRequestId=0;
+       int tapiRet = TAPI_API_SUCCESS;
+       TelSimPinStatus_t pin_status = TAPI_SIM_PIN_STATUS_UNKNOWN;
+       TelSimSecPw_t sec_data;
+       memset(&sec_data, 0x00, sizeof(TelSimSecPw_t));
+       
+       tet_printf("pin[%d]:0-pin1, 1-pin2, wish_condition[%d]: 0-dis, 1- enabled, 2-blocked(puk)",wish_pin, wish_condition);
+
+       tapiRet = tel_get_sim_security_status(wish_pin,&pin_status);
+       if(tapiRet != TAPI_API_SUCCESS)
+       {
+               tet_printf("tel_get_sim_security_status is Failed with tapiRet[%d]", tapiRet);
+               return -1;
+       }
+
+       if(pin_status == TAPI_SIM_PIN_STATUS_DISABLED )
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_DISABLED");
+       }
+       else if(pin_status == TAPI_SIM_PIN_STATUS_ENABLED)
+       {
+               tet_printf("current pin status is TAPI_SIM_PIN_STATUS_ENABLED");
+       }
+       else
+       {
+               tet_printf("current pin status is unhandled status[%d]",pin_status );
+               return -1;
+       }
+
+       if(pin_status == wish_condition )
+       {
+               tet_printf("current pin status is same with wished condition");
+               return 0;
+       }
+       else
+       {
+               tet_printf("current pin status is different with wished condition");    
+               sec_data.type = wish_pin;
+
+               if(wish_pin == TAPI_SIM_PTYPE_PIN1 )
+               {
+                       sec_data.pw_len = strlen(g_si.pin1);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin1,sec_data.pw_len);
+               }
+               else if(wish_pin == TAPI_SIM_PTYPE_PIN2)
+               {
+                       sec_data.pw_len = strlen(g_si.pin2);
+                       sec_data.pw = (unsigned char*)malloc(sec_data.pw_len);
+                       memcpy(sec_data.pw,g_si.pin2,sec_data.pw_len);
+               }
+
+               gAsyncResult = FALSE;
+               
+               if(wish_condition == TAPI_SIM_PIN_STATUS_DISABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_DISABLED)");
+
+                       tapiRet = tel_disable_sim_security(&sec_data,&pRequestId);
+               }
+               else if(wish_condition == TAPI_SIM_PIN_STATUS_ENABLED)
+               {
+                       tet_printf("make pin status with wished condition(TAPI_SIM_PIN_STATUS_ENABLED)");               
+                       tapiRet = tel_enable_sim_security(&sec_data,&pRequestId);
+               }
+               else
+               {
+                       tet_printf("Unhandled wish_condition[%d]", wish_condition);
+                       return -1;
+               }
+               
+               if(tapiRet != TAPI_API_SUCCESS)
+               {
+                       tet_printf("tapi return[%d] when en/disabling pin for condition",tapiRet);
+                       return -1;
+               }
+               else
+               {
+                       tet_printf("wait for condition async event resp - start");                              
+                       G_MAIN_LOOP_RUN(5);
+                       tet_printf("wait for condition async event resp - stop");                               
+               }
+
+               tet_printf("gAsyncResult[%d]", gAsyncResult);                           
+
+               if(gAsyncResult == TRUE)
+               {
+                       return 0;
+               }
+               else
+               {
+                       return -1;
+               }
+       }
+
+       return 0;
+}
+
+
+static int  sim_app_callback  (TelTapiEvent_t *sim_event)
+{
+    tet_printf("\n***************[SIM APP]Callback data **********************\n");
+    tet_printf("[SIM]Reques Id[%d]\n", sim_event->RequestId);
+    tet_printf("[SIM]event status [%d]\n", sim_event->Status);
+
+    gAsyncResult = FALSE;
+    BOOL bReceived = FALSE;
+
+    switch(sim_event->EventType)
+    {
+       case   TAPI_EVENT_SIM_VERIFY_PUK_CNF:
+       {
+               tet_printf("[SIM]***************** TAPI_EVENT_SIM_VERIFY_PUK_CNF***************************");
+               TelSimPinOperationResult_t opResult = (TelSimPinOperationResult_t)sim_event->Status;
+               TelSimPinInfo_t *pPinInfo;
+               pPinInfo = (TelSimPinInfo_t *)sim_event->pData;
+               tet_printf("SIM Unblock PIN event status = [%x]", opResult);
+
+               if(opResult == TAPI_EVENT_SIM_VERIFY_PUK_CNF)
+               {
+                       if(pPinInfo->PinType == TAPI_SIM_PTYPE_PIN1)
+                               tet_printf("Unblock PIN1 Success!\n");
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PIN2)
+                               tet_printf("Unblock PIN2 Success!\n");
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PUK1)
+                               tet_printf("Unblock PUK1 Success!\n");
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PUK2)
+                               tet_printf("Unblock PUK2 Success!\n");
+
+               }
+               else
+               {
+                       if(pPinInfo->PinType == TAPI_SIM_PTYPE_PIN1)
+                       {
+                               tet_printf("PIN1 Verification Failed! - PIN Required \n");
+                               //tet_printf("Remainint attempts [%d]\n", pPinInfo->RemainingAttempts);
+                       }
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PUK1)
+                       {
+                               tet_printf("PIN1 Verification Failed! - PUK Required \n");
+                               //tet_printf("Remainint attempts [%d]\n", pPinInfo->RemainingAttempts);
+                       }
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PIN2)
+                       {
+                               tet_printf("PIN2 Verification Failed! - PIN2 Required \n");
+                               //tet_printf("Remainint attempts [%d]\n", pPinInfo->RemainingAttempts);
+                       }
+                       else if(pPinInfo->PinType == TAPI_SIM_PTYPE_PUK1)
+                       {
+                               tet_printf("PIN2 Verification Failed! - PUK2 Required \n");
+                               //tet_printf("Remainint attempts [%d]\n", pPinInfo->RemainingAttempts);
+                       }
+
+
+               }
+                       bReceived = TRUE;
+                       gAsyncResult = TRUE;
+       }
+       break;
+
+           case TAPI_EVENT_SIM_ENABLE_SEC_CNF: //preet: changed TAPI_EVENT_SIM_ENABLE_PIN_CNF to TAPI_EVENT_SIM_ENABLE_SEC_CNF
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Enable PIN event status = [%x]\n", sim_event->Status);
+
+            if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                gAsyncResult = TRUE;
+            else
+                gAsyncResult = FALSE;
+
+                       tet_printf("gAsyncResult after enpin[%d]",gAsyncResult);
+        }
+        break;
+
+           case TAPI_EVENT_SIM_DISABLE_SEC_CNF:        ////preet: changed TAPI_EVENT_SIM_DISABLE_PIN_CNF to TAPI_EVENT_SIM_DISABLE_SEC_CNF
+        {
+            tet_printf("\n[SIM]*****************TAPI_EVENT_SIM_DISABLE_SEC_CNF***************************\n");
+            tet_printf("SIM Disable PIN event status = [%x]\n", sim_event->Status);
+
+            if(sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                  gAsyncResult = TRUE;
+            else
+                gAsyncResult = FALSE;
+        }
+        break;
+
+
+        default:
+        {
+               bReceived = TRUE;
+               gAsyncResult = FALSE;
+               tet_printf("Info : TAPI_EVENT_SIM_VERIFY_PUK_CNF = %d", TAPI_EVENT_SIM_VERIFY_PUK_CNF);
+               tet_printf("[SIM]***************** Undhandled event type [%d] *****************\n",sim_event->EventType);
+               tet_printf("[SIM]Undhandled event state [%d]\n",sim_event->Status);
+       }
+       break;
+    }//end switch
+
+    if (bReceived == TRUE)
+      G_MAIN_LOOP_CLOSE();
+
+    return 0;
+}
+
+
+static void startup()
+{
+    tet_infoline("utc_tel_verify_sim_puks Test Start\n");
+
+       sim_pin_info_setup();
+
+       if ( tel_init() == TAPI_API_SUCCESS)
+       {
+
+               tel_register_event(TAPI_EVENT_SIM_VERIFY_PUK_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_ENABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);
+               tel_register_event(TAPI_EVENT_SIM_DISABLE_SEC_CNF,&subscription_id,(TelAppCallback)sim_app_callback,NULL);              
+
+               gStartupSuccess = TRUE;
+
+       } else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+        tel_register_app_name("org.samsung.test");
+    return;
+}
+
+
+static void cleanup()
+{
+    tet_infoline("utc_tel_verify_sim_puks Test Finished\n");
+    if (gStartupSuccess == TRUE)
+       {
+               tel_deregister_event(subscription_id);
+       }
+       tel_deinit();
+    return;
+}
+
+
+/*
+  Unit Test Case functions
+*/
+
+/**
+* @brief tel_verify_sim_puks() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_01
+* @param [in] &pPukPinData = NULL
+* @param [in] &pNewPinData
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verify_sim_puks_01()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR 1");
+    int pRequestId=0;
+
+    TelSimSecPw_t pPukdata;
+    TelSimSecPw_t pNewPindata;
+  
+    tet_printf("THE PUK CODE IS %s\n", g_si.puk1);
+    tet_printf("NEW PIN1 CODE %s\n", g_si.pin1);
+
+    pPukdata.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+    pNewPindata.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+
+       pPukdata.pw= (unsigned char*)g_si.puk1;
+       pNewPindata.pw = (unsigned char*)g_si.pin1;
+       pPukdata.pw_len=strlen(g_si.puk1);
+       pNewPindata.pw_len=strlen(g_si.pin1);
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_verify_sim_puks(NULL,&pNewPindata,&pRequestId));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verify_sim_puks() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_02
+* @param [in] &pPukPinData
+* @param [in] &pNewPinData = NULL
+* @param [out]&pRequestId
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verify_sim_puks_02()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR 2");
+    int pRequestId=0;
+
+    TelSimSecPw_t pPukdata;
+    TelSimSecPw_t pNewPindata;
+
+    tet_printf("THE PUK CODE IS %s\n", g_si.puk1);
+    tet_printf("NEW PIN1 CODE %s\n", g_si.pin1);
+
+    pPukdata.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+    pNewPindata.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       pPukdata.pw=(unsigned char*)g_si.puk1;
+       pNewPindata.pw = (unsigned char*)g_si.pin1;
+
+       pPukdata.pw_len=strlen(g_si.puk1);
+       pNewPindata.pw_len=strlen(g_si.pin1);
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_verify_sim_puks(&pPukdata,NULL,&pRequestId));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verify_sim_puks() API : Negative condition(Parameter is Null)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_03
+* @param [in] &pPukPinData
+* @param [in] &pNewPinData
+* @param [out]&pRequestId = NULL
+* @return TAPI_API_INVALID_PTR
+*/
+void utc_tel_verify_sim_puks_03()
+{
+    TET_STAMP_START("TAPI_API_INVALID_PTR 3");
+
+    TelSimSecPw_t pPukdata;
+    TelSimSecPw_t pNewPindata;
+
+    tet_printf("THE PUK CODE IS %s\n", g_si.puk1);
+    tet_printf("NEW PIN1 CODE %s\n", g_si.pin1);
+
+    pPukdata.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+    pNewPindata.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+
+       pPukdata.pw=(unsigned char*)g_si.puk1;
+       pNewPindata.pw = (unsigned char*)g_si.pin1;
+
+       pPukdata.pw_len=strlen(g_si.puk1);
+       pNewPindata.pw_len=strlen(g_si.pin1);
+    TET_CHECK(TAPI_API_INVALID_PTR, tel_verify_sim_puks(&pPukdata,&pNewPindata,NULL));
+    TET_STAMP_PASS();
+}
+
+/**
+* @brief tel_verify_sim_puks() API : Positive condition(Try to unblock PIN1 code)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_04
+* @param [in] &pPukPinData
+* @param [in] &pNewPinData
+* @code
+    TelSimPinData_t pPukdata;
+    TelSimPinData_t pNewPindata;
+
+    strcpy(init_puk_val, PUK1_CODE);
+    strcpy(init_pin_val, PIN1_NORMAL);
+
+    pPukdata.PinType = TAPI_SIM_PTYPE_PUK1;
+    pNewPindata.PinType = TAPI_SIM_PTYPE_PIN1;
+
+    memcpy(pPukdata.szPinCode,init_puk_val,length);
+    memcpy(pNewPindata.szPinCode,init_pin_val,length);
+* @endcode
+* @param [out]&pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* ( Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_UNBLOCK_PIN_CNF(TAPI_SIM_PIN_OPERATION_SUCCESS)
+*/
+void utc_tel_verify_sim_puks_04()
+{
+    TET_STAMP_START("Normal operation TAPI_SIM_PTYPE_PIN1");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+
+    TelSimSecPw_t pPukdata;
+    TelSimSecPw_t pNewPindata;
+
+       // Step 1 : make proper condition
+    tet_printf("Step 1 : enable pin");
+
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_ENABLED))
+       {
+               tet_printf("condition set is failed!!");
+               return;
+       }
+
+       // Step 2 : verify puk
+    tet_printf("Step 2 : verify puk");
+
+    tet_printf("THE PUK CODE IS %s\n", g_si.puk1);
+    tet_printf("NEW PIN1 CODE %s\n", g_si.pin1);
+
+    pPukdata.type = TAPI_SIM_PTYPE_PUK1;
+    pNewPindata.type = TAPI_SIM_PTYPE_PIN1;
+       pPukdata.pw = (unsigned char*)g_si.puk1;
+       pNewPindata.pw = (unsigned char*)g_si.pin1;
+
+       pPukdata.pw_len=strlen(g_si.puk1);
+       pNewPindata.pw_len=strlen(g_si.pin1);
+
+    gAsyncResult = FALSE;
+
+    TapiResult_t err = tel_verify_sim_puks(&pPukdata,&pNewPindata,&pRequestId);
+
+       TET_RESULT_NOT_EQUAL(TET_FAIL,TAPI_API_SUCCESS,err);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(10);
+
+    tet_printf("after real tc api - wait stop");
+
+       TET_RESULT_NOT_EQUAL_GOTO(TET_FAIL,exit,gAsyncResult,TRUE); // If gAsyncResult != FALSE, then TET_FAIL and return
+       TET_STAMP_PASS();
+       
+exit:
+       // Step 3 : make default condition
+       tet_printf("Step 3 : disable pin");
+       
+       if( 0 != sim_pin_process_for_condition(TAPI_SIM_PTYPE_PIN1,TAPI_SIM_PIN_STATUS_DISABLED))
+       {
+               tet_printf("condition set is failed!!");
+       }
+       return; 
+}
+
+
+/**
+* @brief tel_verify_sim_puks() API : Positive condition(Try to unblock PIN2 code)
+* @par ID: UTC_TEL_VERIFY_SIM_PUKS_05
+* @param [in] &pPukPinData
+* @param [in] &pNewPinData
+* @code
+    TelSimPinData_t pPukdata;
+    TelSimPinData_t pNewPindata;
+
+    strcpy(init_puk_val, PUK2_CODE);
+    strcpy(init_pin_val, PIN2_NORMAL);
+
+    pPukdata.PinType = TAPI_SIM_PTYPE_PUK2;
+    pNewPindata.PinType = TAPI_SIM_PTYPE_PIN2;
+
+    memcpy(pPukdata.szPinCode,init_puk_val,length);
+    memcpy(pNewPindata.szPinCode,init_pin_val,length);
+* @endcode
+* @param [out]&pRequestId
+* @return TAPI_API_SUCCESS
+* @par Async Response Message:
+* The event associated is below and the event data is #TelSimPinInfo_t. \n
+* ( Asynchronous return status is indicated by #TelSimPinOperationResult_t.)
+*      - TAPI_EVENT_SIM_UNBLOCK_PIN_CNF(TAPI_SIM_PIN_OPERATION_SUCCESS)
+*/
+void utc_tel_verify_sim_puks_05()
+{
+    TET_STAMP_START("Normal operation : TAPI_SIM_PTYPE_PIN2");
+    TET_RESULT_NOT_EQUAL(TET_UNTESTED,gStartupSuccess, TRUE);
+
+    int pRequestId=0;
+       TelSimSecPw_t puk_data = {0,};
+       TelSimSecPw_t new_pin_data = {0,};
+       
+       puk_data.type = TAPI_SIM_PTYPE_PUK2;   // 0x00
+       puk_data.pw_len = strlen(g_si.puk2);
+       puk_data.pw = (unsigned char*)malloc(puk_data.pw_len);
+       memcpy(puk_data.pw,g_si.puk2,puk_data.pw_len);
+       
+       new_pin_data.type = TAPI_SIM_PTYPE_PIN2;   // 0x00
+       new_pin_data.pw_len = strlen(g_si.pin2);
+       new_pin_data.pw = (unsigned char*)malloc(new_pin_data.pw_len);
+       memcpy(new_pin_data.pw,g_si.pin2,new_pin_data.pw_len);
+
+    gAsyncResult = FALSE;
+
+    TapiResult_t err = tel_verify_sim_puks(&puk_data,&new_pin_data,&pRequestId);
+    TET_CHECK(TAPI_API_SUCCESS, err);
+
+    tet_printf("after real tc api - wait start");
+
+    G_MAIN_LOOP_RUN(10);
+
+    tet_printf("after real tc api - wait stop");
+
+    TET_RESULT_NOT_EQUAL(TET_FAIL,gAsyncResult,TRUE); // If gAsyncResult != TRUE, then TET_FAIL and return
+    TET_STAMP_PASS();
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.h b/TC/telephony_TC/sim/unit/uts_tel_verify_sim_puks.h
new file mode 100644 (file)
index 0000000..bd36df6
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_VERIFY_SIM_PUKS_H_
+#define _UTS_TEL_VERIFY_SIM_PUKS_H_
+
+       static void utc_tel_verify_sim_puks_01();
+       static void utc_tel_verify_sim_puks_02();
+       static void utc_tel_verify_sim_puks_03();
+       static void utc_tel_verify_sim_puks_04();
+       static void utc_tel_verify_sim_puks_05();
+#endif
diff --git a/TC/telephony_TC/sms/README b/TC/telephony_TC/sms/README
new file mode 100644 (file)
index 0000000..2e920d4
--- /dev/null
@@ -0,0 +1,69 @@
+=================================================================================
+*                              README                                                                          *
+=================================================================================
+
+1. The SMS Test Script directory (TestCases) includes:
+
+       telephony-framework/sms
+               |-- README                                          ; This file
+               `-- Unit                                            ; contains Unit TCs
+                   |-- makefile
+                   |-- tslist
+                   `-- Unit test case source codes
+       2 directories, 82 files
+       
+
+2. The $(TEST_ROOT) directory must includes following files:
+
+       /$(TEST_ROOT)
+               |-- tet_scen
+               |-- tetbuild.cfg
+               |-- tetclean.cfg
+               |-- tetexec.cfg
+               `-- ...(elipsis)
+
+=================================================================================
+*                                  Preconditions                                *
+---------------------------------------------------------------------------------
+|  Before Testing SMS Module, you should check the following conditions         |
+=================================================================================
+
+1. Prepare a vaild SIM card.
+
+2. One target for the execution of testcases.
+
+3. One mobile phone for receiving test message.
+       
+4. Modify the mobile number
+       - sms_common.h
+       - Followings are the macro for mobile number customized as per the country.
+               // Mobile numbers
+
+               #define VALID_SCA_NUM   "8210911111"            // SMS Center Address
+               #define RECEIPIENT      "01030014342"           // Receipient Number
+
+5. During execution continuously watch the log file at Putty or whatever terminal used for target logging and as per the log instruction, user has to provide a SMS.
+
+         e,g.: log will be printed in the following fashion:
+
+       ******************************************
+       * Please send a message to tesing target * 
+       * within 60 seconds !!!                  *
+       ******************************************
+
+=================================================================================
+*                                  Change log                                   *
+=================================================================================
+1. 18-Dec-2008
+       - Initial draft.
+
+2. 6-Oct-2010
+       - Revised
+       
+=================================================================================
+*                                      NOTE                                     *
+=================================================================================
+1. In order to ensure successful working of the Test Scripts, please ensure that all of the IPKG files are installed normally.
+2. Testing SMS Module can be executed under target system environment (not simulator).
+
+
diff --git a/TC/telephony_TC/sms/sms_common.h b/TC/telephony_TC/sms/sms_common.h
new file mode 100644 (file)
index 0000000..922dfbc
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _SMS_COMMON_H_
+#define _SMS_COMMON_H_
+
+#define VALID_SCA_NUM   "8210911111"
+#define RECEIPIENT      "01030014342"
+
+#endif
+
diff --git a/TC/telephony_TC/sms/unit/async_util.c b/TC/telephony_TC/sms/unit/async_util.c
new file mode 100644 (file)
index 0000000..f854b12
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <unistd.h>
+
+#include "async_util.h"
+
+static void G_MAIN_TIMER_HANDLER(int sgi);
+
+// Global variable for G_MAIN system
+#if 0
+static int gEventHandle=0;
+static unsigned int gSubscription_id;
+#endif
+static GMainLoop * nw_context_loop = NULL;
+static EvtAlarmCb gpAlarm_Handler = NULL;
+
+GMainLoop *main_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+       g_main_loop_quit(nw_context_loop);
+}
+
+void G_MAIN_TIMER_HANDLER(int sgi)
+{
+       if (gpAlarm_Handler)
+               gpAlarm_Handler(sgi);
+       else {
+               fprintf(stderr, "SIGALRM received. But user handler not registered. Close g_main_loop()");
+               G_MAIN_LOOP_CLOSE();
+       }
+}
+
+#if 0
+TS_BOOL G_MAIN_INIT(EvtSysEventCb pNotiHandler, EvtAlarmCb pAlarmHandler)
+{
+       int open_status;
+       int error_code;
+       gpAlarm_Handler = pAlarmHandler;
+
+       g_type_init();
+       /*
+        open_status = EvtSysLibraryOpen(&gEventHandle);
+        if (open_status!=0)
+        {
+        printf("Unable to get connection to event delivery\n");
+        printf("the error is %d\n",open_status);
+        return FALSE;
+        }
+        printf("event handle is %d\n",gEventHandle);
+
+        error_code = EvtSysEventSubscribe(
+        0,
+        "Telephony.Nettext.*",          // notification ID
+        NULL,                       //  filter expression   //
+        pNotiHandler,      // notification handler
+        NULL,                       // local data //
+        &gSubscription_id            // subscription ID //
+        );
+        */
+       if (error_code )
+       {
+               fprintf(stderr, "EvtSysEventSubscribe(): error [%#X] for event [Telephony.test.Async]\n", error_code);
+               return FALSE;
+       }
+       return TRUE;
+}
+
+TS_BOOL G_MAIN_CLOSE()
+{
+       //int close_status = EvtSysLibraryClose(gEventHandle);
+       if (close_status!=0)
+       {
+               printf("Unable to get close connection to event delivery\n");
+               printf("The error is %d\n",close_status);
+               return FALSE;
+       }
+       gEventHandle = 0;
+       sleep(3);
+       printf("############ Notification subscriber remove  #######\n");
+       return TRUE;
+}
+#endif
+
+void G_MAIN_LOOP_RUN(int sec)
+{
+       (void) signal(SIGALRM, G_MAIN_TIMER_HANDLER);
+       alarm(sec);
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+       alarm(0);
+}
+
+gboolean TimeOutFun(void *data)
+{
+       g_main_loop_quit(main_loop);
+       printf("[TimeOutFun()] : g_main_loop_quit.\n");
+       return FALSE;
+
+}
+
+int gmain_loop_for_events(int delay)
+{
+       main_loop = g_main_loop_new(NULL, FALSE);
+       g_timeout_add(delay, TimeOutFun, NULL);
+       g_main_loop_run(main_loop);
+
+       return 0;
+}
diff --git a/TC/telephony_TC/sms/unit/async_util.h b/TC/telephony_TC/sms/unit/async_util.h
new file mode 100644 (file)
index 0000000..61be8e1
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _ASYNC_UTIL_H_
+#define _ASYNC_UTIL_H_
+
+/*
+ G_MAIN event system
+ */
+#include <sys/types.h>
+#include <signal.h>
+#include <glib.h>
+#include <glib/gbase64.h>
+#include <TelDefines.h>
+
+typedef void (*EvtAlarmCb)(int sgi);
+TS_BOOL gAsyncResult;
+
+// Prototype for G_MAIN system
+//TS_BOOL G_MAIN_INIT(EvtSysEventCb pNotiHandler, EvtAlarmCb pAlarmHandler);
+//TS_BOOL G_MAIN_CLOSE();
+void G_MAIN_LOOP_RUN(int sec);
+void G_MAIN_LOOP_CLOSE();
+int gmain_loop_for_events(int delay);
+gboolean TimeOutFun(void *data);
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/error b/TC/telephony_TC/sms/unit/error
new file mode 100644 (file)
index 0000000..c3d4070
--- /dev/null
@@ -0,0 +1,86 @@
+sbox-arm-none-linux-gnueabi-gcc: /lib/tet3/tcm.o: No such file or directory
+uts_tel_delete_sms_in_sim.c: In function 'startup':
+uts_tel_delete_sms_in_sim.c:88: warning: passing argument 3 of 'tel_register_event' from incompatible pointer type
+/usr/include/telephony/common/include/TapiCommon.h:153: note: expected 'TelAppCallback' but argument is of type 'void (*)(struct TelTapiEvent_t *)'
+sms_callback_util.c: In function 'DecodeCellBroadcastMsg':
+sms_callback_util.c:69: warning: suggest parentheses around arithmetic in operand of '|'
+sms_callback_util.c:92: warning: pointer targets in passing argument 1 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'char *' but argument is of type 'TS_UINT8 *'
+sms_callback_util.c:92: warning: pointer targets in passing argument 2 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'const TS_BYTE *' but argument is of type 'char *'
+sms_callback_util.c:97: warning: assignment makes integer from pointer without a cast
+sms_callback_util.c:106: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'tapi_nettext_coding_scheme'
+sms_callback_util.c: In function 'DecodeSmsSubmitTpdu':
+sms_callback_util.c:133: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:133: warning: pointer targets in passing argument 2 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:137: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
+/usr/include/string.h:397: note: expected 'const char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:177: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:177: warning: pointer targets in passing argument 2 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:217: warning: enumeration value 'TAPI_NETTEXT_VP_NOT_USED' not handled in switch
+sms_callback_util.c:257: warning: pointer targets in passing argument 1 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c: In function 'DecodeSmsDeliverTpdu':
+sms_callback_util.c:317: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:317: warning: pointer targets in passing argument 2 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:351: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeTimeStamp' differ in signedness
+sms_util.h:471: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:376: warning: pointer targets in passing argument 1 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c: In function 'DecodeSmsSubmitReportTpdu':
+sms_callback_util.c:479: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeTimeStamp' differ in signedness
+sms_util.h:471: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:523: warning: pointer targets in passing argument 1 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c: In function 'DecodeSmsStatusReportTpdu':
+sms_callback_util.c:579: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:579: warning: pointer targets in passing argument 2 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:608: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeTimeStamp' differ in signedness
+sms_util.h:471: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:612: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeTimeStamp' differ in signedness
+sms_util.h:471: note: expected 'unsigned char *' but argument is of type 'char *'
+sms_callback_util.c:661: warning: pointer targets in passing argument 1 of 'SmsUtilUnpackGSMCode' differ in signedness
+sms_util.h:465: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:555: warning: unused variable 'scaAddr'
+sms_callback_util.c: In function 'ReadMsgNotification':
+sms_callback_util.c:751: warning: pointer targets in passing argument 1 of 'SmsUtilDecodeAddrField' differ in signedness
+sms_util.h:475: note: expected 'char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c:755: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
+/usr/include/string.h:397: note: expected 'const char *' but argument is of type 'TS_BYTE *'
+sms_callback_util.c: In function 'tapi_sms_callback':
+sms_callback_util.c:961: warning: 'pData' may be used uninitialized in this function
+sms_util.c: In function 'SmsUtilEncodeTimeStamp':
+sms_util.c:357: warning: format '%02d' expects type 'int', but argument 3 has type 'char *'
+sms_util.c: In function 'SmsUtilEncodeDCS':
+sms_util.c:742: warning: enumeration value 'TAPI_NETTEXT_CLASS_NONE' not handled in switch
+sms_util.c:742: warning: enumeration value 'TAPI_NETTEXT_CLASS_MAX' not handled in switch
+sms_util.c:806: warning: enumeration value 'TAPI_NETTEXT_WAITING_MAX' not handled in switch
+sms_util.c:839: warning: enumeration value 'TAPI_NETTEXT_WAITING_MAX' not handled in switch
+sms_util.c:869: warning: enumeration value 'TAPI_NETTEXT_ALPHABET_UCS2' not handled in switch
+sms_util.c:869: warning: enumeration value 'TAPI_NETTEXT_ALPHABET_KSC5601' not handled in switch
+sms_util.c:869: warning: enumeration value 'TAPI_NETTEXT_ALPHABET_MAX' not handled in switch
+sms_util.c:883: warning: enumeration value 'TAPI_NETTEXT_CLASS_NONE' not handled in switch
+sms_util.c:883: warning: enumeration value 'TAPI_NETTEXT_CLASS_MAX' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_GENERAL_LANG' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_ALPHA' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_RES1' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_RES2' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_SM_AUTO_DELETION' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_GENERAL_DCS' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_WAP' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_CB_CLASS_CODING' not handled in switch
+sms_util.c:731: warning: enumeration value 'TAPI_NETTEXT_CODGRP_MAX' not handled in switch
+async_util.c: In function 'G_MAIN_LOOP_RUN':
+async_util.c:111: warning: implicit declaration of function 'alarm'
+async_util.c: At top level:
+async_util.c:35: warning: 'gEventHandle' defined but not used
+async_util.c:38: warning: 'gSubscription_id' defined but not used
+make: *** [uts_tel_delete_sms_in_sim] Error 1
diff --git a/TC/telephony_TC/sms/unit/makefile b/TC/telephony_TC/sms/unit/makefile
new file mode 100644 (file)
index 0000000..ad8e882
--- /dev/null
@@ -0,0 +1,82 @@
+CC=gcc -Wall
+
+TS1  =  uts_tel_delete_sms_in_sim
+TS2  =  uts_tel_get_sms_cb_config
+TS3  =  uts_tel_get_sms_count
+TS4  =  uts_tel_get_sms_parameter_count
+TS5  =  uts_tel_get_sms_parameters
+TS6  =  uts_tel_get_sms_preferred_bearer
+TS7  =  uts_tel_get_sms_sca
+TS8  =  uts_tel_read_sms_in_sim
+TS9  =  uts_tel_send_sms
+TS10 =  uts_tel_send_sms_deliver_report
+TS11 =  uts_tel_send_sms_msg
+TS12 =  uts_tel_set_sms_cb_config
+TS13 =  uts_tel_set_sms_memory_status
+TS14 =  uts_tel_set_sms_message_status
+TS15 =  uts_tel_set_sms_parameters
+TS16 =  uts_tel_set_sms_preferred_bearer
+TS17 =  uts_tel_set_sms_sca
+TS18 =  uts_tel_write_sms_in_sim
+
+LIBS = `pkg-config --libs  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+
+INCS =  -I. `pkg-config --cflags  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS += -I$(TET_ROOT)/inc/tet3 
+INCS += -I../
+
+CFLAGS = $(INCS) -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DWITHOUT_APP_MGR -D_TETWARE_MODE_ 
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+all : $(TS1)  $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) 
+
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(TS1)  $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12) $(TS13) $(TS14) $(TS15) $(TS16) $(TS17) $(TS18) 
+
+
+$(TS1): $(TS1).c
+       $(CC) -o $(TS1) $(TS1).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS2): $(TS2).c
+       $(CC) -o $(TS2) $(TS2).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS3): $(TS3).c
+       $(CC) -o $(TS3) $(TS3).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS4): $(TS4).c
+       $(CC) -o $(TS4) $(TS4).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS5): $(TS5).c
+       $(CC) -o $(TS5) $(TS5).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS6): $(TS6).c
+       $(CC) -o $(TS6) $(TS6).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS7): $(TS7).c
+       $(CC) -o $(TS7) $(TS7).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS8): $(TS8).c
+       $(CC) -o $(TS8) $(TS8).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS9): $(TS9).c
+       $(CC) -o $(TS9) $(TS9).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS10): $(TS10).c
+       $(CC) -o $(TS10) $(TS10).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS11): $(TS11).c
+       $(CC) -o $(TS11) $(TS11).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS12): $(TS12).c
+       $(CC) -o $(TS12) $(TS12).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS13): $(TS13).c
+       $(CC) -o $(TS13) $(TS13).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS14): $(TS14).c
+       $(CC) -o $(TS14) $(TS14).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS15): $(TS15).c
+       $(CC) -o $(TS15) $(TS15).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS16): $(TS16).c
+       $(CC) -o $(TS16) $(TS16).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS17): $(TS17).c
+       $(CC) -o $(TS17) $(TS17).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+$(TS18): $(TS18).c
+       $(CC) -o $(TS18) $(TS18).c sms_callback_util.c sms_util.c async_util.c $(LDFLAGS)
+
+
diff --git a/TC/telephony_TC/sms/unit/sms_callback_util.c b/TC/telephony_TC/sms/unit/sms_callback_util.c
new file mode 100644 (file)
index 0000000..115db5c
--- /dev/null
@@ -0,0 +1,1031 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <string.h>
+
+#include <assert.h>
+#include <glib.h>
+#include <TapiCommon.h>
+
+#include "sms_callback_util.h"
+
+int error_code;
+int dcs_pos =0;
+
+TS_UINT8 tp_mr = 0x00;
+
+
+TS_BOOL DecodeCellBroadcastMsg(int length, char *pPDU)
+{
+       int msgLength;
+       int sn = 0; //serial number
+       int msgID; //message identifier
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT8 page[2];
+       int contents_length;
+       TS_UINT8 contents[TAPI_NETTEXT_CB_SIZE_MAX];
+
+       TS_UINT8 gs;
+       TS_UINT8 msgCode;
+       TS_UINT8 updateNumber;
+
+       printf("cb msg type is %x\n", pPDU[0]);
+       printf("cb msg len is %x\n", pPDU[1]);
+
+       printf("$$$$$$$$$$$$$$$length of cb msg is %d\n", length);
+       sn = (pPDU[2] << 8) | pPDU[1];
+
+       gs = (pPDU[2] & 0xC0) >> 6; //bit 7, bit 6
+
+       msgCode = (((pPDU[2] & 0x3F) << 4) | pPDU[3]) & 0xF0;
+
+       updateNumber = pPDU[3] & 0x0F; //bit3, bit2, bit1, bit0
+
+       msgID = (pPDU[4] << 4) | pPDU[3];
+
+       SmsUtilDecodeDCS(&dcs, pPDU[6]);
+
+       page[0] = pPDU[7] & 0x0F; //total page
+       page[1] = (pPDU[7] & 0xF0) >> 4; //current page
+
+
+       msgLength = length - 2;
+
+       contents_length = msgLength - 6;
+
+       if (dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+               TS_BYTE inData[TAPI_NETTEXT_CB_SIZE_MAX + 1];
+
+               memset(inData, 0x00, TAPI_NETTEXT_CB_SIZE_MAX + 1);
+
+               memcpy((void*) inData, (void*) &pPDU[8], contents_length);
+               SmsUtilUnpackGSMCode((char *) contents, (TS_BYTE *) &pPDU[8], msgLength);
+       }
+       else {
+               memcpy(contents, &pPDU[8], msgLength);
+               contents[msgLength] = 0; //NULL;
+       }
+
+       printf("*************************************\n");
+       printf("serical number : 0x%04x \n", sn);
+       printf("Geographical Scope: %x\n", gs);
+       printf("message code : %x\n", msgCode);
+       printf("update Number : %x\n", updateNumber);
+       printf("message identifier :  %x\n", msgID);
+       printf("data coding scheme :  %x\n", (unsigned int) &dcs);
+       printf("contents bytes size : %d\n", contents_length);
+       printf("page : (%d /%d) (page /total ) \n", page[1], page[0]);
+       printf("contents: %s\n", contents);
+       printf("*************************************\n");
+
+       return TRUE;
+}
+
+TS_BOOL DecodeSmsSubmitTpdu(int pdu_len, char *pPDU)
+{
+       TPDU_SMS_SUBMIT tpdu_submit;
+
+       TS_BYTE scaAddr_len = 0;
+       int destAddr_len = 0;
+       TS_BYTE diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       TS_BYTE scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       TS_BYTE destAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //destination number
+       int sca_ton, sca_npi, dest_ton, dest_npi;
+       int position;
+
+       position = 0;
+
+       /* SCA_ADDR */
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField((char *) diallingNum, (unsigned char *) &pPDU[position], &sca_ton, &sca_npi);
+
+       position += 2; //include Address-Length, Type of Address
+
+       scaAddr_len = strlen((char *) diallingNum);
+
+       if (scaAddr_len % 2)
+               position += scaAddr_len / 2 + 1;
+       else
+               position += scaAddr_len / 2;
+
+       if (sca_ton == SIM_TON_INTERNATIONAL) {
+               scaAddr[0] = '+';
+               memcpy(&scaAddr[1], diallingNum, scaAddr_len);
+               scaAddr[scaAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy(scaAddr, diallingNum, scaAddr_len);
+               scaAddr[scaAddr_len] = '\0';
+       }
+
+       /* TP-MTI, TP-RD, TP-VPF,  TP-RP, TP_UDHI, TP-SRR */
+
+       tpdu_submit.msg_type = SMS_TPDU_SUBMIT; // bit 0,1(Message Type Indicator )
+       tpdu_submit.rd = (pPDU[position] & 0x04) ? TRUE : FALSE;// bit 2 (Message Type Indicator)
+       tpdu_submit.vpf = (pPDU[position] & 0x18) >> 3; //  bits 3, 4 ( validity period format)
+       tpdu_submit.srr = (pPDU[position] & 0x20) ? TRUE : FALSE; // bit 5 (Status Report Request)
+       tpdu_submit.udhi = (pPDU[position] & 0x40) ? TRUE : FALSE; // bit 6 (User Data Header Indicator)
+       tpdu_submit.rp = (pPDU[position] & 0x80) ? TRUE : FALSE; // bit 7 (Reply Path)
+
+       position++;
+
+       /* TP-MR */
+       tpdu_submit.mr = pPDU[position];
+
+       position++;
+
+       /* TP-DA */
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField((char *) diallingNum, (unsigned char *) &pPDU[position], &dest_ton, &dest_npi);
+
+       position += 2;
+
+       destAddr_len = strlen((char*) diallingNum);
+       if (destAddr_len % 2)
+               position += destAddr_len / 2 + 1;
+       else
+               position += destAddr_len / 2;
+
+       if (dest_ton == SIM_TON_INTERNATIONAL) {
+               destAddr[0] = '+';
+               memcpy(&destAddr[1], diallingNum, destAddr_len);
+               destAddr[destAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy(destAddr, diallingNum, destAddr_len);
+               destAddr[destAddr_len] = '\0';
+       }
+
+       tpdu_submit.desAddr.DialNumLen = destAddr_len;
+       memcpy(tpdu_submit.desAddr.szDiallingNum, destAddr, destAddr_len);
+       tpdu_submit.desAddr.Npi = dest_npi;
+       tpdu_submit.desAddr.Ton = dest_ton;
+
+       /* TP-PID */
+
+       tpdu_submit.pId = pPDU[position];
+       position++;
+
+       /* TP DCS */
+       SmsUtilDecodeDCS(&tpdu_submit.dcs, pPDU[position]);
+       position++;
+
+       /* TP VP */
+       tpdu_submit.vp.vp_type = TAPI_NETTEXT_VP_RELATIVE; //temp
+
+       switch (tpdu_submit.vp.vp_type) {
+               case TAPI_NETTEXT_VP_RELATIVE:
+                       tpdu_submit.vp.vpValue = pPDU[position];
+                       tpdu_submit.vp.vp_rel_type = TAPI_NETTEXT_VP_REL_1D;
+                       position++;
+                       break;
+
+               case TAPI_NETTEXT_VP_ABSOLUTE:
+               case TAPI_NETTEXT_VP_ENHANCED:
+                       position += 7;
+                       break;
+
+               default:
+                       break;
+       }
+
+       /* TP UDL */
+       tpdu_submit.udl = pPDU[position];
+
+       if (tpdu_submit.udl > TAPI_NETTEXT_SMDATA_SIZE_MAX)
+               tpdu_submit.udl = TAPI_NETTEXT_SMDATA_SIZE_MAX;
+
+       position++;
+
+       /* TP UD */
+       tpdu_submit.userData = malloc(sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+       memset(tpdu_submit.userData, 0, sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+       if (tpdu_submit.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+               TS_BYTE inData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
+
+               memset(inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+
+               memcpy((void*) inData, (void*) &pPDU[position], tpdu_submit.udl);
+
+               SmsUtilUnpackGSMCode((char *) tpdu_submit.userData, inData, (TS_UINT8) tpdu_submit.udl);
+       }
+
+       printf("*************************************\n");
+       printf("Msg Type: TPDU_SUBMIT\n");
+
+       if (tpdu_submit.rd)
+               printf("RD: Reject Duplicate\n");
+       else if (!tpdu_submit.rd)
+               printf("RD: Accept Duplicate\n");
+
+       if (tpdu_submit.srr)
+               printf("SRR: A status report is requested\n");
+       else if (!tpdu_submit.srr)
+               printf("SRR: A status report is not  requested\n");
+
+       if (tpdu_submit.udhi)
+               printf("UDHI: Contains a Header in addition to the short message.\n");
+       else if (!tpdu_submit.udhi)
+               printf("UDHI: Only Short Message\n");
+
+       if (tpdu_submit.rp)
+               printf("RP: Set Reply Path\n");
+       else if (!tpdu_submit.rp)
+               printf("RP: Not set Reply Path\n");
+
+       printf("SCA Addr : %s\n", scaAddr);
+       printf("To : %s\n", destAddr);
+       printf("Message : %s \n", tpdu_submit.userData);
+       printf("*************************************\n");
+
+       return TRUE;
+}
+
+int DecodeSmsDeliverTpdu(int tpdu_len, char *pTPDU)
+{
+       TPDU_SMS_DELIVER tpdu_deliver;
+       TmDateTime SCTimeStamp;
+       int orgAddr_len = 0;
+       TS_BYTE diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       TS_BYTE orgAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //originating number
+       int org_ton, org_npi;
+       int position;
+
+       position = 0;
+
+       /* TP-MTI, TP-MMS, TP-SRI, TP_UDHI, TP-RP */
+       tpdu_deliver.msg_type = SMS_TPDU_DELIVER;
+       tpdu_deliver.mms = (pTPDU[position] & 0x04) ? TRUE : FALSE;// bit 2 (Message Type Indicator)
+       tpdu_deliver.sri = (pTPDU[position] & 0x20) ? TRUE : FALSE; // bit 5 (Status Report Indication)
+       tpdu_deliver.udhi = (pTPDU[position] & 0x40) ? TRUE : FALSE; // bit 6 (User Data Header Indicator)
+       tpdu_deliver.rp = (pTPDU[position] & 0x80) ? TRUE : FALSE; // bit 7 (Reply Path)
+
+       position++;
+
+       /* TP-OA */
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField((char *) diallingNum, (unsigned char *) &pTPDU[position], &org_ton, &org_npi);
+
+       position += 2;
+
+       orgAddr_len = strlen((char*) diallingNum);
+       if (orgAddr_len % 2)
+               position += orgAddr_len / 2 + 1;
+       else
+               position += orgAddr_len / 2;
+
+       if (org_ton == SIM_TON_INTERNATIONAL) {
+               orgAddr[0] = '+';
+               memcpy(&orgAddr[1], diallingNum, orgAddr_len);
+               orgAddr[orgAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy(orgAddr, diallingNum, orgAddr_len);
+               orgAddr[orgAddr_len] = '\0';
+       }
+
+       /* TP-PID */
+       tpdu_deliver.pId = pTPDU[position];
+
+       position++;
+
+       /* TP-DCS */
+       SmsUtilDecodeDCS(&tpdu_deliver.dcs, pTPDU[position]);
+       dcs_pos = position;
+       position++;
+
+       /* TP-SCTS */
+       SmsUtilDecodeTimeStamp((unsigned char *) &pTPDU[position], &SCTimeStamp);
+
+       position += 7;
+
+       /* TP-UDL */
+       tpdu_deliver.udl = pTPDU[position];
+       if (tpdu_deliver.udl > TAPI_NETTEXT_SMDATA_SIZE_MAX)
+               tpdu_deliver.udl = TAPI_NETTEXT_SMDATA_SIZE_MAX;
+
+       position++;
+
+       /* TP-UD */
+       tpdu_deliver.userData = malloc(sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+       memset(tpdu_deliver.userData, 0, sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+       if (tpdu_deliver.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+               TS_BYTE inData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
+
+               memset(inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+
+               memcpy((void*) inData, (void*) &pTPDU[position], tpdu_deliver.udl);
+
+               SmsUtilUnpackGSMCode((char *) tpdu_deliver.userData, inData, (TS_UINT8) tpdu_deliver.udl);
+       }
+
+       printf("*************************************\n");
+       printf("Msg Type: TPDU_DELIVER\n");
+
+       if (tpdu_deliver.rp)
+               printf("RP: Set Reply Path\n");
+       else if (!tpdu_deliver.rp)
+               printf("RP: Not set Reply Path\n");
+
+       if (tpdu_deliver.sri)
+               printf("SRI: A status report shall be returned to the SME\n");
+       else if (!tpdu_deliver.sri)
+               printf("SRI: A status report shall be not returned to the SME\n");
+
+       if (tpdu_deliver.mms)
+               printf("MMS: No more messages are waiting for the MS in this SC\n");
+       else if (!tpdu_deliver.mms)
+               printf("MMS: More messages are waiting for the MS in this SC\n");
+
+       if (tpdu_deliver.udhi)
+               printf("UDHI: Contains a Header in addition to the short message.\n");
+       else if (!tpdu_deliver.udhi)
+               printf("UDHI: Only short message.\n");
+
+       printf("DcsClass : %x \n", tpdu_deliver.dcs.class_type);
+
+       printf("From : %s\n", orgAddr);
+       printf("Time : %d-%d-%d  , %d:%d:%d\n", SCTimeStamp.year, SCTimeStamp.month, SCTimeStamp.day, SCTimeStamp.hour, SCTimeStamp.minute, SCTimeStamp.second);
+       printf("Message : %s \n", tpdu_deliver.userData);
+       printf("*************************************\n");
+
+       return dcs_pos;
+}
+
+TS_BOOL DecodeSmsSubmitReportTpdu(int length, char *data)
+{
+       TPDU_SMS_SUBMIT_REPORT submit_report;
+       TmDateTime SCTimeStamp;
+       int position = 1;
+       int i = 0;
+       TS_BYTE msgRef, tpdu_len;
+       int result = 0;
+       TS_BYTE mask;
+
+       if (data == NULL)
+               return FALSE;
+
+       /* Result */
+       printf("length :%d\n", length);
+
+       for (i = 0; i < length; i++)
+               printf("[%02x]", data[i]);
+
+       result = data[position];
+
+       printf("\nIn ackrecv (return status) result is %x\n", result);
+       position++;
+
+       /* Msg Reference */
+       msgRef = data[position++];
+       printf("In ackrecv  position :%d msgref is %x\n", position, msgRef);
+       position++;
+
+       /* TPDU Length */
+       tpdu_len = data[position];
+       printf("In ackrecv position :%d len is %d\n", position, tpdu_len);
+
+       /**** SUBMIT REPORT TPDU PARSING***/
+
+       /* TP-MTI , TP-UDHI */
+       printf("before TPDU position value:%d\n", position);
+
+       submit_report.msg_type = data[position] & 0x03; //bit 0,1
+       submit_report.udhi = data[position] & 0x40 ? TRUE : FALSE; //bit 6;
+
+       position++;
+
+       if (result == FAIL) {
+               /* TP-FCS */
+               submit_report.fcs = data[position];
+               position++;
+       }
+
+       /* TP-PI  - set to a 1 indicates that a particular optional parameter is present in the fields which follow. */
+       /* Masking Bit  - TP -PID (bit 0), TP-DCS(bit 1), TP-UDL(bit 2) */
+
+       submit_report.paraInd = data[position];
+       mask = submit_report.paraInd;
+       position++;
+
+       /* TP-SCTS */
+
+       SmsUtilDecodeTimeStamp((unsigned char *) &data[position], &SCTimeStamp);
+
+       position += 7;
+
+       if ((mask != 0xFF) && (mask != 0)) {
+               /* TP-PID */
+               if (mask & 0x01) {
+                       submit_report.pId = data[position];
+                       position++;
+                       printf("TP-PID :%x\n", submit_report.pId);
+               }
+
+               /* TP-DCS */
+               if (mask & 0x02) {
+                       SmsUtilDecodeDCS(&submit_report.dcs, data[position]);
+                       position++;
+                       printf("TP-DCS :%x\n", data[position]);
+               }
+
+               if (mask & 0x04) {
+                       /* TP-UDL */
+                       submit_report.udl = data[position];
+                       position++;
+
+                       printf("TP-UDL :%x\n", data[position]);
+
+                       /* TP-UD */
+
+                       submit_report.userData = malloc(sizeof(TS_BYTE) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+                       memset(submit_report.userData, 0, sizeof(TS_BYTE) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+                       if (submit_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+                               TS_BYTE inData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
+
+                               memset(inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+
+                               memcpy((void*) inData, (void*) &data[position], submit_report.udl);
+
+                               SmsUtilUnpackGSMCode((char *) submit_report.userData, inData, (TS_UINT8) submit_report.udl);
+                       }
+
+               }
+       }
+
+       printf("*************************************\n");
+
+       if (result != 0x00)
+               printf("SMS SEND FAIL!!\n");
+       else
+               printf("SMS SEND SUCCESS!!\n");
+
+       if (result != 0x00)
+               printf("Failure Code : %x\n", submit_report.fcs);
+
+       printf("*************************************\n");
+
+       return TRUE;
+}
+
+TS_BOOL DecodeSmsStatusReportTpdu(int tpdu_len, char *pTPDU)
+{
+       TPDU_SMS_STATUS_REPORT status_report;
+
+       TmDateTime SCTimeStamp;
+       TmDateTime DischargeTime;
+
+       int rcpAddr_len = 0;
+       TS_BYTE diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       //      TS_BYTE              scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       TS_BYTE rcpAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //recipient number
+       int rcp_ton, rcp_npi;
+       int position = 0;
+       TS_UINT mask;
+
+       /* TP-MTI, TP MMS, TP SRQ, TP_UDHI */
+
+       status_report.msg_type = pTPDU[position] & 0x03; // bit 0,1
+       status_report.mms = pTPDU[position] & 0x04 ? TRUE : FALSE; // bit 2
+       status_report.srq = pTPDU[position] & 0x20 ? TRUE : FALSE; //bit 5
+       status_report.udhi = pTPDU[position] & 0x40 ? TRUE : FALSE; //bit 6
+
+       position++;
+
+       /* TP-MR */
+       status_report.mr = pTPDU[position];
+       position++;
+
+       /* TP-RA */
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField((char *) diallingNum, (unsigned char *) &pTPDU[position], &rcp_ton, &rcp_npi);
+
+       position += 2;
+
+       rcpAddr_len = strlen((char*) diallingNum);
+       if (rcpAddr_len % 2)
+               position += rcpAddr_len / 2 + 1;
+       else
+               position += rcpAddr_len / 2;
+
+       if (rcp_ton == SIM_TON_INTERNATIONAL) {
+               rcpAddr[0] = '+';
+               memcpy(&rcpAddr[1], diallingNum, rcpAddr_len);
+               rcpAddr[rcpAddr_len + 1] = '\0';
+       }
+       else {
+               memcpy(rcpAddr, diallingNum, rcpAddr_len);
+               rcpAddr[rcpAddr_len] = '\0';
+       }
+
+       status_report.rcpAddr.DialNumLen = rcpAddr_len;
+       memcpy(status_report.rcpAddr.szDiallingNum, rcpAddr, rcpAddr_len);
+       status_report.rcpAddr.Npi = rcp_npi;
+       status_report.rcpAddr.Ton = rcp_ton;
+
+       /* TP-SCTS */
+       SmsUtilDecodeTimeStamp((unsigned char *) &pTPDU[position], &SCTimeStamp);
+       position += 7;
+
+       /* TP-DT */
+       SmsUtilDecodeTimeStamp((unsigned char *) &pTPDU[position], &DischargeTime);
+       position += 7;
+
+       /* TP-ST */
+       status_report.status = pTPDU[position];
+       position++;
+
+       /* TP-PI */
+       status_report.paraInd = pTPDU[position];
+
+       mask = status_report.paraInd;
+
+       if ((mask != 0xFF) && (mask != 0)) {
+               /* Increment only if mask is valid */
+               position++;
+
+               /* TP-PID */
+               if (mask & 0x01) {
+                       status_report.pId = pTPDU[position];
+                       position++;
+               }
+
+               /* TP-DCS */
+               if (mask & 0x02) {
+                       SmsUtilDecodeDCS(&status_report.dcs, pTPDU[position]);
+                       position++;
+               }
+
+               if (mask & 0x04) {
+                       /* TP-UDL */
+                       status_report.udl = pTPDU[position];
+                       position++;
+
+                       /* TP-UD */
+
+                       status_report.userData = malloc(sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+                       memset(status_report.userData, 0, sizeof(unsigned char) * (TAPI_NETTEXT_SMDATA_SIZE_MAX + 1));
+
+                       if (status_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+                               TS_BYTE inData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1];
+
+                               memset(inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1);
+
+                               memcpy((void*) inData, (void*) &pTPDU[position], status_report.udl);
+
+                               SmsUtilUnpackGSMCode((char *) status_report.userData, inData, (TS_UINT8) status_report.udl);
+                       }
+               }
+       }
+
+       printf("*************************************\n");
+       printf("Msg Type: STATUS_REPORT\n");
+
+       if (status_report.mms)
+               printf("MMS: No more messages are waiting for the MS in this SC\n");
+       else if (!status_report.mms)
+               printf("MMS: More messages are waiting for the MS in this SC\n");
+
+       if (status_report.srq)
+               printf("SRQ: the result of an SMS COMMAND \n");
+       else if (!status_report.srq)
+               printf("SRQ: the result of a SMS SUBMIT.\n");
+
+       if (status_report.udhi)
+               printf("UDHI: Contains a Header in addition to the short message.\n");
+       else if (!status_report.udhi)
+               printf("UDHI: Only Short Message\n");
+
+       printf("STATUS:%x\n", status_report.status);
+
+       if (status_report.status == 0x00)
+               printf("STATUS : Short message received by the SME\n");
+       else if (status_report.status == 0x01)
+               printf("STATUS : Short message forwarded by the SC to the SME\nbut the SC is unable to confirm delivery\n");
+       else if (status_report.status == 0x02)
+               printf("STATUS : Short message replaced by the SC\n");
+
+       printf("Recipient Number : %s\n", rcpAddr);
+       printf("SC Time Stamp : %d-%d-%d  , %d:%d:%d\n", SCTimeStamp.year, SCTimeStamp.month, SCTimeStamp.day, SCTimeStamp.hour, SCTimeStamp.minute,
+                       SCTimeStamp.second);
+       printf("Discharge Time : %d-%d-%d  , %d:%d:%d\n", DischargeTime.year, DischargeTime.month, DischargeTime.day, DischargeTime.hour, DischargeTime.minute,
+                       DischargeTime.second);
+
+       if (mask & 0x04)
+               printf("Message : %s \n", status_report.userData);
+
+       printf("*************************************\n");
+
+       return TRUE;
+}
+
+void MsgCountNotification(int length, char *pData)
+{
+       static TelSmsStoredMsgCountInfo_t *countInfo;
+
+       printf("length %d", length);
+       printf("pdata %s", pData);
+
+       countInfo = (TelSmsStoredMsgCountInfo_t*) pData;
+       printf("In MsgCountNotification total cnt is %d, usedcnt is %d\n", countInfo->TotalCount, countInfo->UsedCount);
+       printf("In MsgCountNotification total cnt is %d, usedcnt is %d\n", countInfo->TotalCount, countInfo->UsedCount);
+}
+
+void ReadMsgNotification(int length, char *pData)
+{
+       TelSmsData_t * sim_data;
+       int scaAddr_len = 0;
+       char * pTPDU;
+       int tpdu_len = 0;
+       TS_BYTE diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       TS_BYTE scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       int sca_ton, sca_npi;
+       int position;
+
+       sim_data = (TelSmsData_t *) pData;
+       printf("length in readmsg notification is %d\n", length);
+
+       if (sim_data->MsgStatus == 0x00)
+               printf("Msg Staus : unknown msg\n");
+       else if (sim_data->MsgStatus == 0x01)
+               printf("Msg Staus : received unread msg\n");
+       else if (sim_data->MsgStatus == 0x02)
+               printf("Msg Staus : received read msg\n");
+       else if (sim_data->MsgStatus == 0x03)
+               printf("Msg Staus : unsent msg\n");
+       else if (sim_data->MsgStatus == 0x04)
+               printf("Msg Staus : stored sent msg\n");
+
+       if (sim_data->MsgStatus == 0x01 || sim_data->MsgStatus == 0x02) {
+               position = 0;
+               // SCA_ADDR
+               memset(diallingNum, 0, sizeof(diallingNum));
+
+               SmsUtilDecodeAddrField((char *) diallingNum, &sim_data->SmsData.szData[position], &sca_ton, &sca_npi);
+
+               position += 2; //include Address-Length, Type of Address
+
+               scaAddr_len = strlen((char *) diallingNum);
+
+               if (scaAddr_len % 2)
+                       position += scaAddr_len / 2 + 1;
+               else
+                       position += scaAddr_len / 2;
+
+               if (sca_ton == SIM_TON_INTERNATIONAL) {
+                       scaAddr[0] = '+';
+                       memcpy(&scaAddr[1], diallingNum, scaAddr_len);
+                       scaAddr[scaAddr_len + 1] = '\0';
+               }
+               else {
+                       memcpy(scaAddr, diallingNum, scaAddr_len);
+                       scaAddr[scaAddr_len] = '\0';
+               }
+
+               tpdu_len = sim_data->SmsData.MsgLength - position;
+
+               printf("SCA Number : %s tpdu_len is %d\n", scaAddr, tpdu_len);
+
+               pTPDU = malloc(sizeof(TS_BYTE) * tpdu_len);
+               printf("bfor memcopy position is %d\n", position);
+               memcpy(pTPDU, &(sim_data->SmsData.szData[position]), tpdu_len);
+               printf("after memcpy\n");
+
+               DecodeSmsDeliverTpdu(tpdu_len, pTPDU);
+       }
+}
+
+void MemoryFullNotification(int length, char *pData)
+{
+       int *memory_ind;
+
+       memory_ind = (int *) pData;
+       printf("In memory full notification status %d\n", *memory_ind);
+}
+
+void DeleteMsgNotification(int length, char *pData)
+{
+       tel_delete_sms_in_simMsg_status_ind *delete_ind;
+
+       delete_ind = (tel_delete_sms_in_simMsg_status_ind *) pData;
+       printf("In deletenotifcation the result and index are %x %d\n", delete_ind->result, delete_ind->index);
+}
+
+void SaveMsgNotification(int length, char *pData)
+{
+       tapi_nettext_save_status_ind *save_ind;
+
+       save_ind = (tapi_nettext_save_status_ind *) pData;
+       printf("In savestatus noti, index %x result %x\n", save_ind->index, save_ind->result);
+}
+
+void GetCBNotification(int length, char *pData)
+{
+       TelSmsCbConfig_t *CBConfig;
+       int i = 0;
+
+       CBConfig = (TelSmsCbConfig_t *) pData;
+
+       printf("=========CB Configuration=========\n");
+
+       /*** CB Enable/Diable ***/
+       if (CBConfig->bCBEnabled == 0x01)
+               printf("Cell Broadcast Msg Enabled...\n");
+       else if (CBConfig->bCBEnabled == 0x02)
+               printf("Cell Broadcast Msg Disabled...\n");
+
+       /*** Selected ID ***/
+       if (CBConfig->SelectedId == 0x01)
+               printf("All CBMI is selected... \n");
+       else if (CBConfig->SelectedId == 0x02)
+               printf("There are some selected CBMI...\n");
+
+       /*** CBMI  Count ***/
+       printf("CBMI Count: %d \n\n", CBConfig->MsgIdCount);
+
+       /*** CBMI  List ***/
+
+       if (CBConfig->MsgIdCount != 0) {
+               printf("----- CBMI List -----\n");
+
+               for (i = 0; i < CBConfig->MsgIdCount; i++) {
+                       printf("No.%d - [0x%04x]\n", i, CBConfig->MsgIDs[i]);
+               }
+
+       }
+       printf("\n==================================\n");
+}
+
+void Deliver_ReportNoti()
+{
+       printf("DELIVERY REPORT SUCCESS\n");
+}
+
+void get_preferred_bearer_noti(int length, char *pData)
+{
+       int svc = 0;
+       TelSmsBearerType_t *bearer;
+
+       printf("get preferred bearer\n");
+       bearer = (TelSmsBearerType_t *) pData;
+       printf("In GetPreferredBearer noti bearer:%d\n", *bearer);
+       svc = *bearer;
+       printf("svc:%d\n", svc);
+
+       if (svc == TAPI_NETTEXT_BEARER_PS_ONLY)
+               printf("Packet Domain\n");
+       else if (svc == TAPI_NETTEXT_BEARER_CS_ONLY)
+               printf("Circuit Switched\n");
+       else if (svc == TAPI_NETTEXT_BEARER_PS_PREFERRED)
+               printf("Packet Domain preferred \n");
+       else if (svc == TAPI_NETTEXT_BEARER_CS_PREFERRED)
+               printf("Circuit Switched preferred\n");
+
+}
+
+void set_request_confirm_noti()
+{
+       printf("***Set Request  confirm Notification*******\n");
+       printf("Notification Received Successfully\n");
+}
+
+void param_get_noti(int length, char *pData)
+{
+       TelSmsParams_t *smsp_param;
+
+       smsp_param = (TelSmsParams_t *) pData;
+
+       printf("record index is %x\n", smsp_param->RecordIndex);
+       printf("record len  is %x\n", smsp_param->RecordLen);
+       printf("alpha_id len  is %lu \n", smsp_param->AlphaIdLen);
+       printf("alpha_id is %s \n", smsp_param->szAlphaId);
+       printf("param indicator is  %xn", smsp_param->ParamIndicator);
+       printf("dest dialling num is %s\n", smsp_param->TpDestAddr.szDiallingNum);
+       printf("svcaddr dialling num is %s\n", smsp_param->TpSvcCntrAddr.szDiallingNum);
+       printf("pid %x\n", smsp_param->TpProtocolId);
+       printf("dcs is %x\n", smsp_param->TpDataCodingScheme);
+       printf("validity is %x\n", smsp_param->TpValidityPeriod);
+}
+
+void Device_ReadyNoti(int length, char *pData)
+{
+       //TelSmsDeviceReadyInd *device_status;
+
+       //device_status = (TelSmsDeviceReadyInd *)pData;
+
+       //printf("In device ready noti the result is %d\n",device_status->Result);
+}
+
+void param_count_noti(int length, char *pData)
+{
+       printf("In param_count_noti the record count:");
+}
+
+int tapi_sms_callback(const TelTapiEvent_t *TapiEvent, void *data)
+{
+       printf("\n******  Inside SMS Callback func........   ******\n");
+
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       char *EventData = NULL;
+       int param1 = 0;
+       char *pData = NULL;
+
+       int expected_event = (int) data;
+
+       if (TapiEvent == NULL) {
+               printf("Event is NULL\n");
+               return 0;
+       }
+       
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = (char *) TapiEvent->pData;
+
+       if (EventData == NULL) {
+               printf("\n******  EventData is NULL.........******\n");
+       }
+       else {
+               printf("\nClass:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType, requestId, status);
+
+               param1 = strlen((char *) TapiEvent->pData);
+               printf("\n param1 = %d", param1);
+               if (TapiEvent->pData != NULL) {
+                       pData = (char *) TapiEvent->pData;
+                       printf("pData(size):%d\n", strlen(pData));
+               }
+       }
+
+       if (eventClass != TAPI_EVENT_CLASS_NETTEXT) {
+               return 0;
+       }
+
+       switch (eventType) {
+               case TAPI_EVENT_NETTEXT_INCOM_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$ INCOMING MESSAGE NOTIFICATION $$$$$$ \n");
+                       printf("param1(length):%d\n", param1);
+                       //                                              ReceiveMessage(param1,pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$ RECEIVE  ACK NOTIFICATION $$$$$$ \n");
+                       printf("param1(length):%d\n", param1);
+                       DecodeSmsSubmitReportTpdu(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$ INCOMING CB NOTIFICATION $$$$$$ \n");
+                       printf("length:%d\n", param1);
+                       DecodeCellBroadcastMsg(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$ MEMORYF  FULL NOTIFICATION $$$$$$ \n");
+                       printf("param1(length):%d\n", param1);
+                       MemoryFullNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_COUNT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GetMsgCountNotification$$$$\n");
+                       MsgCountNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_READ_SMS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$Read Msg Notification $$$\n");
+                       printf("param1(length):%d\n", param1);
+                       //ReadMsgNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$Delete Notification$$$\n");
+                       printf("param1(length):%d\n", param1);
+                       DeleteMsgNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$Save Status Notification$$\n");
+                       printf("param1(length):%d\n", param1);
+                       SaveMsgNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GET CB Config$$$\n");
+                       printf("param1(length):%d\n", param1);
+                       GetCBNotification(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ DELIVER REPORT NOTI$$$\n");
+                       Deliver_ReportNoti();
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_PARAM_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ GET PARAM NOTI$$$\n");
+                       printf("param1(length):%d\n", param1);
+                       param_get_noti(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF:
+                       printf("\n****************************************\n");
+                       printf("\n$$$ GET PREFERRED BEARER$$$\n");
+                       printf("param1(length):%d\n", param1);
+                       get_preferred_bearer_noti(param1, pData);
+                       printf("\n****************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ SET REQUESTCONFIRM NOTI$$$\n");
+                       set_request_confirm_noti();
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DEVICE_READY_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ DEVICE READY NOTI$$$\n");
+                       Device_ReadyNoti(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_PARAM_COUNT_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ PARAM COUNT NOTI$$$\n");
+                       param_count_noti(param1, pData);
+                       printf("\n***************************************\n");
+                       break;
+
+               default:
+                       printf("\n****************DEFAULT***************\n");
+                       break;
+       }
+
+       if (eventType == expected_event)
+               TimeOutFun(NULL);
+
+       return 0;
+}//end callback
+
+
diff --git a/TC/telephony_TC/sms/unit/sms_callback_util.h b/TC/telephony_TC/sms/unit/sms_callback_util.h
new file mode 100644 (file)
index 0000000..d54b9bf
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _SMS_CALLBACK_UTIL_H_
+#define _SMS_CALLBACK_UTIL_H_
+
+#include "async_util.h"
+#include "sms_util.h"
+
+int tapi_sms_callback(const TelTapiEvent_t *TapiEvent, void *data);
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/sms_util.c b/TC/telephony_TC/sms/unit/sms_util.c
new file mode 100644 (file)
index 0000000..c4cefba
--- /dev/null
@@ -0,0 +1,956 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include "sms_util.h"
+#include <sms_common.h>
+
+void reverse(char *x, int len)
+{
+       int i, j = len - 1;
+
+       for (i = 0; i < j; i++) {
+               int t = x[i];
+               x[i] = x[j];
+               x[j--] = t;
+       }
+}
+
+char *AcItoa(int n, char *str, int b)
+{
+       int i = 0;
+
+       do {
+               str[i++] = "0123456789ABCDEF"[n % b];
+       } while ((n /= b) > 0);
+
+       reverse(str, i);
+       str[i] = '\0';
+
+       return str;
+}
+
+int AcToupper(int ch)
+{
+       return (('a' <= (ch) && (ch) <= 'z') ? ((ch) - ('a' - 'A')) : (ch));
+}
+
+char *SmsUtilUnpackGSMCode(char *szData, const TS_BYTE *pIn, int in_len)
+{
+       int i;
+       int pos = 0;
+       int shift = 0;
+
+       /* If the number of fill bits != 0, then it would cause an additional shift */
+       /*
+        if ( shift != 0 )
+        pos = pos + 1;
+
+        if ( shift ==7 )
+        shift = 0;
+        */
+
+       for (i = 0; i < in_len; i++, pos++) {
+               szData[i] = (pIn[pos] << shift) & 0x7F;
+
+               if (pos != 0) {
+                       /* except the first byte, a character contains some bits
+                        ** from the previous byte.
+                        */
+                       szData[i] |= pIn[pos - 1] >> (8 - shift);
+               }
+
+               shift++;
+
+               if (shift == 7) {
+                       shift = 0;
+
+                       /* a possible extra complete character is available */
+                       i++;
+                       szData[i] = pIn[pos] >> 1;
+
+                       if (szData[i] == 0) {
+                               /* this is the end of the input, quit */
+                               break;
+                       }
+               }
+       }
+
+       return szData;
+}
+
+int SmsUtilPackGSMCode(TS_BYTE *pOut, const char *szData, int in_len)
+{
+       int i;
+       int pos;
+       int shift = 0;
+       //shift = fill_bits;
+
+       //  memset( out, 0, out_len_max );
+
+       /* pack the ASCII characters
+        */
+       /*
+        if ( shift == 7 )
+        shift = 0;
+        */
+
+       for (pos = 0, i = 0; /*pos < out_len_max &&*/i < in_len; pos++, i++) {
+               /* pack the low bits */
+               pOut[pos] = szData[i] >> shift;
+
+               if (i + 1 < in_len) {
+                       /* pack the high bits using the low bits of the next character */
+                       pOut[pos] |= szData[i + 1] << (7 - shift);
+
+                       shift++;
+
+                       if (shift == 7) {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+
+       /* done */
+       return pos;
+}
+
+void SmsUtilConvertBCD2Digit(char *pDigits, char *pBCD, int digitLen)
+{
+       int i, bcdLen;
+       char c[2];
+       unsigned char higher, lower;
+
+       //SysDebug( ( MID_SMS, "__SmsConvertBCD2Digit: start.\n" ) );
+
+       if (pBCD == NULL || pDigits == NULL) {
+               printf("__SmsConvertBCD2Digit: pBCD == NULL || pDigits == NULL. return.\n");
+               return;
+       }
+
+       if (digitLen == 0) {
+               //printf("__SmsConvertBCD2Digit: digitLen == 0. return.\n" );
+
+               pDigits[0] = 0x00;
+
+               return;
+       }
+
+       if (digitLen % 2)
+               bcdLen = digitLen / 2 + 1;
+       else
+               bcdLen = digitLen / 2;
+
+       memset(pDigits, 0, bcdLen * 2);
+
+       for (i = 0; i < bcdLen; i++) {
+               lower = pBCD[i] & 0x0F; // get low nibble
+
+               if (lower == 0x0A)
+                       lower = '*';
+               else if (lower == 0x0B)
+                       lower = '#';
+               else if (lower == 0x0C)
+                       lower = 'p'; //DTMF Control pDigits seperator
+               else if (lower == 0x0F)
+                       lower = 0;
+               else {
+                       AcItoa(lower, c, 16);
+                       lower = (char) AcToupper(c[0]);
+               }
+
+               higher = (pBCD[i] >> 4) & 0x0F; // get high nibble
+
+               if (higher == 0x0A)
+                       higher = '*'; // =0x2A
+               else if (higher == 0x0B)
+                       higher = '#'; // =0x23
+               else if (higher == 0x0C)
+                       higher = 'p'; // =0x70, DTMF Control pDigits seperator
+               else if (higher == 0x0F) // if higher semi-octet is 0x0F, filled bits.
+               {
+                       //higher = 0;
+                       sprintf(pDigits + strlen(pDigits), "%c", lower);
+                       pDigits[/*digitLen-1*/bcdLen * 2 - 1] = '\0';
+
+                       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
+
+                       return;
+               }
+               else {
+                       AcItoa(higher, c, 16);
+                       higher = (char) AcToupper(c[0]);
+               }
+
+               //sprintf(pDigits, "%s%c%c", pDigits, lower, higher);
+               sprintf(pDigits + strlen(pDigits), "%c%c", lower, higher);
+       }
+
+       pDigits[digitLen] = '\0';
+
+       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
+}
+
+void SmsUtilConvertDigit2BCD(char *pBCD, char *pDigits, int digitLen)
+{
+       int i, j, digit;
+
+       unsigned char higher, lower;
+
+       if (pBCD == NULL || pDigits == NULL)
+               return;
+
+       // 0123456789 -> 1032547698
+       for (i = 0, j = 0; i < digitLen; i = i + 2, j++) {
+               if (pDigits[i] == '*')
+                       digit = 0x0A;
+               else if (pDigits[i] == '#')
+                       digit = 0x0B;
+               else if (AcToupper(pDigits[i]) == 'P')
+                       digit = 0x0C;
+               else
+                       digit = (int) (pDigits[i] - '0');
+
+               lower = digit & 0x0F;
+
+               if (digitLen != i + 1) {
+                       if (pDigits[i + 1] == '*')
+                               digit = 0x0A;
+                       else if (pDigits[i + 1] == '#')
+                               digit = 0x0B;
+                       else if (AcToupper(pDigits[i + 1]) == 'P')
+                               digit = 0x0C;
+                       else
+                               digit = (int) (pDigits[i + 1] - '0');
+
+                       higher = digit & 0x0F;
+               }
+               else {
+                       higher = 0xFF;
+               }
+
+               pBCD[j] = (higher << 4) | lower;
+       }
+}
+
+TmDateTime* SmsUtilDecodeTimeStamp(unsigned char *pTimeStamp, TmDateTime *tmDateTime)
+{
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       //TS_UINT32     time;
+
+       if (pTimeStamp == NULL)
+               return NULL;
+
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[0], 2);
+       tmDateTime->year = atoi(szBuf) + 2000;
+       if ((tmDateTime->year >= 1900 + MAX_YEAR)/* && ( tmDateTime->year < 2000 + BASE_YEAR )*/)
+               tmDateTime->year -= 100;
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[1], 2);
+       tmDateTime->month = atoi(szBuf);
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[2], 2);
+       tmDateTime->day = atoi(szBuf);
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[3], 2);
+       tmDateTime->hour = atoi(szBuf);
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[4], 2);
+       tmDateTime->minute = atoi(szBuf);
+       SmsUtilConvertBCD2Digit(szBuf, (char*) &pTimeStamp[5], 2);
+       tmDateTime->second = atoi(szBuf);
+
+       if ((tmDateTime->year < 1900 + BASE_YEAR) || (tmDateTime->year > 1900 + MAX_YEAR))
+               tmDateTime->year = 1900 + BASE_YEAR;
+
+       /*
+        time = TmDateTimeToSeconds( &tmDateTime );
+        if ( time > MAX_SECONDS )
+        time = MAX_SECONDS;
+
+        */
+
+       return tmDateTime;
+}
+
+unsigned char *SmsUtilEncodeTimeStamp(TmDateTime *tmDateTime, unsigned char *pTimeStamp)
+{
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       int year;
+
+       if (pTimeStamp == NULL)
+               return NULL;
+
+       memset((void*) pTimeStamp, 0x00, sizeof(unsigned char) * 7);
+
+       //TmSecondsToDateTime( timeStamp, &tmDateTime );
+
+       year = tmDateTime->year - 2000;
+       if (year < 0)
+               year += 100;
+       sprintf(szBuf, "%02d", year);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[0], szBuf, 2);
+       sprintf(szBuf, "%02d", tmDateTime->month);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[1], szBuf, 2);
+       sprintf(szBuf, "%02d", tmDateTime->day);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[2], szBuf, 2);
+       sprintf(szBuf, "%02d", tmDateTime->hour);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[3], szBuf, 2);
+       sprintf(szBuf, "%02d", tmDateTime->minute);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[4], szBuf, 2);
+       sprintf(szBuf, "%02d", tmDateTime->second);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[5], szBuf, 2);
+
+       /*      ignore Time zone (assume it is using 0x00 as default)
+        timeZone = TmGetTimeZoneOffset() /15;
+        if ( timeZone < 0 )
+        absTimeZone = -timeZone;
+        else
+        absTimeZone = timeZone;
+        */
+
+       sprintf(szBuf, "%02d", 0);
+       SmsUtilConvertDigit2BCD((char*) &pTimeStamp[6], szBuf, 2);
+
+       //if ( timeZone < 0 )
+       //      pTimeStamp[6] |= 0x80;
+
+       return pTimeStamp;
+}
+
+void SmsUtilDecodeAddrField(char *diallingNum, unsigned char *pAddrField, int *result_ton, int *result_npi)
+{
+       int index = 0;
+       int ton, npi;
+       int dialnumLen = 0;
+
+       ton = (pAddrField[index + 1] & 0x70) >> 4;
+       npi = pAddrField[index + 1] & 0x0F;
+
+       if (ton != SIM_TON_ALPHA_NUMERIC) {
+               // Origination/Destination address �ʵ忡���� length�� ���� address length
+               // origination/destination address �ʵ��� ��� length�� 0 �� ���� number type/plan �ʵ�� 0xFF ���� ���´�.
+               dialnumLen = pAddrField[index++];
+       }
+       else {
+               dialnumLen = (((pAddrField[index++] + 1) / 2) * 8) / 7;
+       }
+
+       // SIM_SMSP_ADDRESS_LEN ���� address length �� ũ�� SIM_SMSP_ADDRESS_LEN ��ŭ�� ��ȯ�� �Ѵ�.
+       if (dialnumLen > SIM_SMSP_ADDRESS_LEN) {
+               dialnumLen = SIM_SMSP_ADDRESS_LEN;
+       }
+
+       //printf(" dialnumLen = %d\n", dialnumLen  );
+
+       index++; /* ignore Type of Address field */
+
+       if (ton != SIM_TON_ALPHA_NUMERIC) {
+               SmsUtilConvertBCD2Digit(diallingNum, (char*) &pAddrField[index], dialnumLen);
+       }
+       else {
+               SmsUtilUnpackGSMCode(diallingNum, &pAddrField[index], dialnumLen);
+       }
+
+       //printf(  "__SmsDecodeAddrField: diallingNum [%s].\n", (char*) diallingNum  );
+
+       *result_ton = ton;
+       *result_npi = npi;
+}
+
+int SmsUtilEncodeAddrField(unsigned char *pAddrField, char *diallingNum, int dialnumLen, int ton, int npi)
+{
+       int index = 0;
+
+       if (diallingNum == NULL || pAddrField == NULL) {
+               printf("SmsUtilEncodeAddrField: invalid input\n");
+               return -1;
+       }
+
+       if (ton != SIM_TON_ALPHA_NUMERIC) {
+               // Origination/Destination address �ʵ忡���� length�� ���� address length
+               pAddrField[index++] = (unsigned char) dialnumLen;
+               printf("SmsUtilEncodeAddrField: addr len packet: %d\n", pAddrField[index]);
+       }
+       else {
+               pAddrField[index] = (unsigned char) (((dialnumLen * 7 + 7) / 8) * 2);
+
+               // ������ ����Ʈ���� ���� 4��Ʈ�� ������ ������ length �ʵ尪�� -1�� �Ѵ�.
+               if (((dialnumLen * 7) % 8) <= 4)
+                       pAddrField[index]--;
+
+               printf("SmsUtilEncodeAddrField: addr len packet: %d out of SIM_TON_ALPAHA\n", pAddrField[index]);
+
+               index++;
+       }
+
+       SET_TON_NPI(pAddrField[index], ton, npi);
+
+       index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ����
+
+       if (ton != SIM_TON_ALPHA_NUMERIC) {
+               SmsUtilConvertDigit2BCD((char*) &pAddrField[index], (char*) diallingNum, dialnumLen);
+
+               if (dialnumLen % 2)
+                       index += dialnumLen / 2 + 1;
+               else
+                       index += dialnumLen / 2;
+       }
+       else {
+               index += SmsUtilPackGSMCode(&pAddrField[index], diallingNum, (int) dialnumLen);
+       }
+
+       return index;
+}
+
+int SmsUtilDecodeScAddrField(TelSmsAddressInfo_t *pSmsAddrField, TS_BYTE *pAddrField)
+{
+       printf("SmsUtilDecodeScAddrField\n");
+       int index = 0;
+       int length = 0;
+
+       //SysDebug( ( MID_SMS, "__SmsDecodeScAddrField: start.\n" ) );
+
+       if (pSmsAddrField == NULL || pAddrField == NULL) {
+               printf("SmsUtilDecodeScAddrField: pSimAddrField or pAddrField is NULL.\n");
+               return 0;
+       }
+
+       // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
+       // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
+       length = pAddrField[index];
+       // ������ ���� �޽����� ��쿡�� service center address�� ���� ���� �ִ�.
+       // �� ��쿡 length �� 0 �̸� number type, plan �� ��� ���
+       // length �� 1 �̸� type, plan �� �ִ� ���
+       if (length > 1) {
+               pSmsAddrField->DialNumLen = (pAddrField[index++] - 1) * 2; // -1�� TON/API �ʵ�
+
+               // SIM_SMSP_ADDRESS_LEN ���� address length �� ũ�� SIM_SMSP_ADDRESS_LEN ��ŭ�� ��ȯ�� �Ѵ�.
+               if (pSmsAddrField->DialNumLen > SIM_SMSP_ADDRESS_LEN) {
+                       pSmsAddrField->DialNumLen = SIM_SMSP_ADDRESS_LEN;
+               }
+
+               pSmsAddrField->Ton = (pAddrField[index] & 0x70) >> 4;
+               pSmsAddrField->Npi = pAddrField[index] & 0x0F;
+
+               index++; /* ignore Type of Address field */
+
+               SmsUtilConvertBCD2Digit((char*) pSmsAddrField->szDiallingNum, (char*) &pAddrField[index], pSmsAddrField->DialNumLen);
+
+               printf("SmsUtilDecodeScAddrField: diallingNum [%s].\n", (char*) pSmsAddrField->szDiallingNum);
+               printf("length=%d , ton %d, npi =%d\n", pSmsAddrField->DialNumLen, pSmsAddrField->Ton, pSmsAddrField->Npi);
+       }
+
+       return ++length;
+}
+
+int SmsUtilEncodeScAddrField(TS_BYTE *pAddrField, TelSmsAddressInfo_t *pSmsAddrField)
+{
+       int index = 0;
+
+       if (pSmsAddrField == NULL || pAddrField == NULL)
+               return -1;
+
+       // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
+       // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
+       if (pSmsAddrField->DialNumLen % 2) {
+               pAddrField[index++] = pSmsAddrField->DialNumLen / 2 + 1 + 1; // +1 �� TON/NPI �ʵ�, Ȧ������ ���� ������ ���߱� ���� �ѹ� �� +1
+       }
+       else {
+               pAddrField[index++] = pSmsAddrField->DialNumLen / 2 + 1; // +1 �� TON/NPI �ʵ�
+       }
+
+       SET_TON_NPI( pAddrField[index], pSmsAddrField->Ton, pSmsAddrField->Npi );
+
+       index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ���׹߻�
+
+       SmsUtilConvertDigit2BCD((char*) &pAddrField[index], (char*) pSmsAddrField->szDiallingNum, pSmsAddrField->DialNumLen);
+
+       if (pSmsAddrField->DialNumLen % 2)
+               index += pSmsAddrField->DialNumLen / 2 + 1;
+       else
+               index += pSmsAddrField->DialNumLen / 2;
+
+       return index;
+}
+
+void SmsUtilDecodeDCS(tapi_nettext_coding_scheme *pCodingScheme, unsigned char dcs)
+{
+       assert( pCodingScheme != NULL );
+
+       memset(pCodingScheme, 0, sizeof(tapi_nettext_coding_scheme));
+
+       if (dcs < 0x40) // bits 7..4 = 00xx : general data coding indication
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+
+               if (dcs & 0x20) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if (dcs & 0x10) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch (dcs & 0x03) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                                       break;
+                       }
+               }
+               else {
+                       // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_NONE;
+               }
+
+               switch (dcs & 0x0C) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_MAX;
+                               break;
+               }
+       }
+       else if (dcs >= 0x40 && dcs < 0x80) // bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0 are coded exactly the same as group 00xx
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_AUTO_DELETION;
+
+               if (dcs & 0x20) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if (dcs & 0x10) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch (dcs & 0x03) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                                       break;
+                       }
+               }
+               else {
+                       // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_NONE;
+               }
+
+               switch (dcs & 0x0C) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_MAX;
+                               break;
+               }
+       }
+       // bits 7..4 = 1000 ~ 1011 : reserved
+       else if (dcs == 0xC0) // bits 7..4 = 1100 : message waiting indication group, discard message
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD;
+       }
+       else if (dcs < 0xE0) {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_STORE;
+
+               if (dcs & 0x08)
+                       pCodingScheme->bmsg_ind_active = TRUE;
+
+               switch (dcs & 0x03) {
+                       case 0x00:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_OTHER_MSG;
+                               break;
+               }
+       }
+       else if (dcs < 0xF0) {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2;
+
+               if (dcs & 0x08)
+                       pCodingScheme->bmsg_ind_active = TRUE;
+
+               switch (dcs & 0x03) {
+                       case 0x00:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_OTHER_MSG;
+                               break;
+               }
+       }
+       else {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_CLASS_CODING;
+
+               if (dcs & 0x04)
+                       pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+
+               switch (dcs & 0x03) {
+                       case 0x00:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                               break;
+                       case 0x01:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                               break;
+                       case 0x02:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                               break;
+                       case 0x03:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                               break;
+               }
+       }
+}
+
+void SmsUtilEncodeDCS(TS_BYTE *pDCS, tapi_nettext_coding_scheme *pCodingScheme)
+{
+       printf("SmsUtilEncodeDCS Start\n");
+       TS_BYTE dcs = 0x00;
+
+       assert( pCodingScheme != NULL );
+
+       switch (pCodingScheme->coding_group_type) {
+               case TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS: // bit 7..4 is 00xx
+                       if (pCodingScheme->bCompressed)
+                               dcs |= 0x20; // bit 5 is 1
+
+                       if (pCodingScheme->bmsg_class_set) {
+                               dcs |= 0x10; // bit 4 is 1
+
+                               switch (pCodingScheme->class_type) {
+                                       case TAPI_NETTEXT_CLASS_0: // bit 1..0 is 00
+                                               dcs |= 0x00;
+                                               break;
+                                       case TAPI_NETTEXT_CLASS_1: // bit 1..0 is 01
+                                               dcs |= 0x01;
+                                               break;
+                                       case TAPI_NETTEXT_CLASS_2: // bit 1..0 is 10
+                                               dcs |= 0x02;
+                                               break;
+                                       case TAPI_NETTEXT_CLASS_3: // bit 1..0 is 11
+                                               dcs |= 0x03;
+                                               break;
+                                       default:
+                                               break;
+                               }
+                       }
+
+                       switch (pCodingScheme->alphabet_type) {
+                               case TAPI_NETTEXT_ALPHABET_DEFAULT: // bit 3..2 is 00
+                                       dcs |= 0x00;
+                                       break;
+                               case TAPI_NETTEXT_ALPHABET_8BIT: // bit 3..2 is 01
+                                       dcs |= 0x04;
+                                       break;
+                               case TAPI_NETTEXT_ALPHABET_UCS2: // bit 3..2 is 10
+                                       dcs |= 0x08;
+                                       break;
+                               default: // bit 3..2 is 11
+                                       dcs |= 0x0C;
+                                       break;
+                       }
+                       break;
+
+               case TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD: // bit 7..4 is 1100
+                       dcs |= 0xC0;
+                       break;
+
+               case TAPI_NETTEXT_CODGRP_SM_WAITING_STORE: // bit 7..4 is 1101
+                       dcs |= 0xD0;
+
+                       if (pCodingScheme->bmsg_ind_active) // bit 3..2 is 10
+                               dcs |= 0x08;
+
+                       switch (pCodingScheme->waiting_type) {
+                               case TAPI_NETTEXT_WAITING_VOICE_MSG: // bit 1..0 is 00
+                                       dcs |= 0x00;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_FAX_MSG: // bit 1..0 is 01
+                                       dcs |= 0x01;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_EMAIL_MSG: // bit 1..0 is 10
+                                       dcs |= 0x02;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_OTHER_MSG: // bit 1..0 is 11
+                                       dcs |= 0x03;
+                                       break;
+                               default:
+                                       break;
+                       }
+                       break;
+
+               case TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2: // bit 7..4 is 1110
+                       dcs |= 0xE0;
+
+                       if (pCodingScheme->bmsg_ind_active) // bit 3..2 is 10
+                               dcs |= 0x08;
+
+                       switch (pCodingScheme->waiting_type) {
+                               case TAPI_NETTEXT_WAITING_VOICE_MSG: // bit 1..0 is 00
+                                       dcs |= 0x00;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_FAX_MSG: // bit 1..0 is 01
+                                       dcs |= 0x01;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_EMAIL_MSG: // bit 1..0 is 10
+                                       dcs |= 0x02;
+                                       break;
+                               case TAPI_NETTEXT_WAITING_OTHER_MSG: // bit 1..0 is 11
+                                       dcs |= 0x03;
+                                       break;
+                               default:
+                                       break;
+                       }
+
+                       break;
+               case TAPI_NETTEXT_CODGRP_SM_CLASS_CODING: // bit 7..4 is 1111
+                       dcs |= 0xF0;
+
+                       switch (pCodingScheme->alphabet_type) {
+                               case TAPI_NETTEXT_ALPHABET_DEFAULT: // bit 2 is 0
+                                       dcs |= 0x00;
+                                       break;
+                               case TAPI_NETTEXT_ALPHABET_8BIT: // bit 2 is 1
+                                       dcs |= 0x04;
+                                       break;
+                               default:
+                                       break;
+                       }
+
+                       switch (pCodingScheme->class_type) {
+                               case TAPI_NETTEXT_CLASS_0: // bit 1..0 is 00
+                                       break;
+                               case TAPI_NETTEXT_CLASS_1: // bit 1..0 is 01
+                                       dcs |= 0x01;
+                                       break;
+                               case TAPI_NETTEXT_CLASS_2: // bit 1..0 is 10
+                                       dcs |= 0x02;
+                                       break;
+                               case TAPI_NETTEXT_CLASS_3: // bit 1..0 is 11
+                                       dcs |= 0x03;
+                                       break;
+                               default:
+                                       break;
+                       }
+                       break;
+
+               default:
+                       break;
+       }
+
+       memcpy(pDCS, &dcs, sizeof(TS_BYTE));
+
+       printf("SmsUtilEncodeDCS End\n");
+}
+
+TS_UINT8 SmsUtilEncodeValidity(TS_BYTE *pValidity, tapi_nettext_vp *pVP)
+{
+       TS_UINT8 pos = 0;
+
+       switch (pVP->vp_type) {
+               case TAPI_NETTEXT_VP_NOT_USED:
+                       break;
+
+               case TAPI_NETTEXT_VP_RELATIVE:
+                       pValidity[pos] = (TS_UINT8) pVP->vpValue;
+                       pos++;
+                       break;
+
+               case TAPI_NETTEXT_VP_ABSOLUTE:
+                       //TO DO
+                       //SmsUtilEncodeTimeStamp( pValidity, pVP->vpValue );
+                       pos += 7;
+                       break;
+
+               case TAPI_NETTEXT_VP_ENHANCED:
+                       break;
+       }
+
+       return pos;
+}
+
+void EncodeSmsSubmitTPDU(TelSmsDatapackageInfo_t *pDataPackage, char *diallingNum, int dialNumLen, char *msg, int msg_len)
+{
+       TPDU_SMS_SUBMIT tpdu_submit;
+       TS_BYTE packet[TAPI_NETTEXT_MSG_SIZE_MAX];
+       TS_UINT8 tp_mr = 0x01;
+       TS_UINT8 tp_pid = 0; //reaplace type (65)
+       TS_UINT8 tp_dcs; //=17; //class_1(17),class_2(18)
+       TS_UINT8 tp_vp;
+
+       int pos;
+       int index = 0, ScIndex = 0;
+       int i;
+
+       char *SCA = VALID_SCA_NUM;
+
+       memset(packet, 0, TAPI_NETTEXT_MSG_SIZE_MAX);
+
+       ScIndex = SmsUtilEncodeAddrField(pDataPackage->Sca, SCA, strlen(SCA), 0x01, 0x01);
+
+       printf("ScIndex is %d\n", ScIndex);
+
+       for (i = 0; i < strlen((char *) pDataPackage->Sca); i++)
+               printf("[%02x]", pDataPackage->Sca[i]);
+       printf("\n");
+
+       tpdu_submit.msg_type = SMS_TPDU_SUBMIT;
+       tpdu_submit.rd = TRUE; //false :accept duplicate msg , true: reject duplicate msg
+       tpdu_submit.vpf = TAPI_NETTEXT_VP_RELATIVE;
+       tpdu_submit.srr = TRUE; //false :A status report is not requested , true: A status report is requested
+       tpdu_submit.udhi = FALSE; //false: contains only the short message , true :a Header in addition to the short message
+       tpdu_submit.rp = TRUE; //false :TP Reply Path parameter is not set in this SMS SUBMIT, true : TP Reply Path parameter is set in this SMS SUBMIT
+
+       packet[index] = tpdu_submit.msg_type;
+       packet[index] |= tpdu_submit.rd ? 0x04 : 0;
+       packet[index] |= tpdu_submit.vpf << 3;
+       packet[index] |= tpdu_submit.srr ? 0x20 : 0;
+       packet[index] |= tpdu_submit.udhi ? 0x40 : 0;
+       packet[index] |= tpdu_submit.rp ? 0x80 : 0;
+
+       index++;
+       printf("index of message ref is %d, msgref is %d\n", index, tp_mr);
+
+       packet[index++] = tp_mr;
+
+       index += SmsUtilEncodeAddrField(packet + index, diallingNum, dialNumLen, 0x01, 0x01);
+
+       //printf("DESTINATTION  ADDR Encoded =========\n");
+       packet[index++] = tp_pid;
+
+       tpdu_submit.dcs.bCompressed = FALSE;
+       tpdu_submit.dcs.bmsg_class_set = TRUE;
+       tpdu_submit.dcs.coding_group_type = TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+       tpdu_submit.dcs.alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+       tpdu_submit.dcs.class_type = TAPI_NETTEXT_CLASS_2;
+
+       SmsUtilEncodeDCS(&tp_dcs, &tpdu_submit.dcs);
+
+       packet[index++] = tp_dcs;
+
+       tpdu_submit.vp.vp_rel_type = TAPI_NETTEXT_VP_REL_6H;
+       tpdu_submit.vp.vp_type = TAPI_NETTEXT_VP_RELATIVE;
+       tpdu_submit.vp.vpValue = 0xff;
+
+       SmsUtilEncodeValidity(&tp_vp, &tpdu_submit.vp);
+
+       //tp_vp =65;
+       packet[index++] = tp_vp;
+       packet[index++] = msg_len;
+
+       /*********TP-UD **********/
+       if (tpdu_submit.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+               pos = SmsUtilPackGSMCode(packet + index, msg, msg_len);
+               index += pos;
+       }
+
+       printf("\nSend packet to phonseSever[%d] -----\n", index);
+
+       for (i = 0; i < index; i++) {
+               printf("[%02x]", packet[i]);
+               if (i % 10 == 9)
+                       printf("\n");
+       }
+       printf("\n");
+
+       // Copy the packet to the pDataPackage
+       pDataPackage->MsgLength = index;
+       memcpy(pDataPackage->szData, packet, index);
+}
+
+void PrepareMessage(TelSmsDatapackageInfo_t *pDataPackage)
+{
+       int msg_len = 0;
+       char buf[512];
+       char message[512];
+       char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       int diallingNum_len = 0;
+
+       memset(buf, 0, sizeof(buf));
+       memset(diallingNum, 0, sizeof(diallingNum));
+       memset(message, 0, sizeof(message));
+
+       strcpy(message, "This is a test message");
+       strncpy(diallingNum, RECEIPIENT, TAPI_NETTEXT_ADDRESS_LEN_MAX);
+
+       diallingNum_len = strlen(diallingNum);
+       printf("dialling num %s and dialling num len is %d\n", diallingNum, diallingNum_len);
+       diallingNum[diallingNum_len] = 0;
+       //      diallingNum_len = diallingNum_len-1;
+
+       msg_len = strlen(message);
+
+       printf("==========================\n");
+       printf("To :%s\n", diallingNum);
+       printf("Message: %s\nMsg Length:%d\n", message, msg_len);
+       printf("Dialling number Length : %d\n", diallingNum_len);
+       printf("==========================\n");
+
+       EncodeSmsSubmitTPDU(pDataPackage, diallingNum, diallingNum_len, message, msg_len);
+}
+
diff --git a/TC/telephony_TC/sms/unit/sms_util.h b/TC/telephony_TC/sms/unit/sms_util.h
new file mode 100644 (file)
index 0000000..8f3dd39
--- /dev/null
@@ -0,0 +1,455 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 __TET_SMS_UTIL_H_
+#define __TET_SMS_UTIL_H_
+
+#include "ITapiNetText.h"
+
+#define SIM_TON_UNKNOWN                                        0 //unknown
+#define        SIM_TON_INTERNATIONAL                   1 //international number
+#define        SIM_TON_NATIONAL                                2 //national number
+#define SIM_TON_NETWORK_SPECIFIC               3 //natwork specific number
+#define        SIM_TON_DEDICATED_ACCESS                4 //subscriber number
+#define        SIM_TON_ALPHA_NUMERIC                   5//alphanumeric, GSM 7-bit default alphabet)
+#define        SIM_TON_ABBREVIATED_NUMBER              6 //abbreviated number
+#define        SIM_TON_RESERVED_FOR_EXT                7 //reserved for extension
+
+
+#define MAX_UDH_LEN            137
+#define UDH_MAX                        7
+#define SMDATA_SIZE_MAX 160
+
+#define FAIL                   0x00
+#define SUCCESS                        0x01
+
+//////////////////////////////////TPDU type////////////////////////////////
+typedef enum {
+       SMS_TPDU_DELIVER                        = 0x00, // sc -> ms
+       SMS_TPDU_DELIVER_REPORT         = 0x00, // ms -> sc
+       SMS_TPDU_SUBMIT                         = 0x01, // ms -> sc
+       SMS_TPDU_SUBMIT_REPORT          = 0x01, // sc -> ms
+       SMS_TPDU_STATUS_REPORT          = 0x02, // sc -> ms
+       SMS_TPDU_COMMAND                        = 0x02, // ms -> sc
+       SMS_PDU_INVALID_TYPE
+} SmsTPDUType;
+
+typedef enum {
+       SMS_DAEMON_UNKNOWN_MESSAGE,
+       SMS_DAEMON_RECEIVED_UNREAD_MESSAGE,
+       SMS_DAEMON_RECEIVED_READ_MESSAGE,
+       SMS_DAEMON_UNSENT_MESSAGE,
+       SMS_DAEMON_STORED_SENT_MESSAGE,
+} sd_message_status;
+
+
+/*
+ * tapi_nettext_vp_type
+ * This enumeration defines the validity period type.
+ */
+typedef enum {
+       TAPI_NETTEXT_VP_NOT_USED = 0,           /**< validity period not used */
+       TAPI_NETTEXT_VP_RELATIVE = 2,           /**< after a predetermined time period after the service center has received the message */
+       TAPI_NETTEXT_VP_ABSOLUTE = 3,
+       TAPI_NETTEXT_VP_ENHANCED = 1,
+
+       TAPI_NETTEXT_VP_MAX
+} tapi_nettext_vp_type;
+
+/*
+ * tapi_nettext_coding_group_type
+ This enum defined the different sms coding group types
+ */
+typedef enum {
+       TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS,                     /**< Bits 7..4 00xx */
+       TAPI_NETTEXT_CODGRP_CB_GENERAL_LANG,            /**< 0000 */
+       TAPI_NETTEXT_CODGRP_CB_ALPHA,                           /**< 0001 */
+       TAPI_NETTEXT_CODGRP_CB_RES1,                            /**< 0010 */
+       TAPI_NETTEXT_CODGRP_CB_RES2,                            /**< 0011 */
+       TAPI_NETTEXT_CODGRP_SM_AUTO_DELETION,           /**< 01xx Bits 5..0 are coded the same as SM_GENERAL_DCS */
+       TAPI_NETTEXT_CODGRP_CB_GENERAL_DCS,                     /**< 01xx behavior is as SM_GENERAL_DCS */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD,         /**< 1100 */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_STORE,           /**< 1101 */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2,      /**< 1110 */
+       TAPI_NETTEXT_CODGRP_CB_WAP,                                     /**< 1110 Cell Broadcast */
+       TAPI_NETTEXT_CODGRP_SM_CLASS_CODING,            /**< 1111 */
+       TAPI_NETTEXT_CODGRP_CB_CLASS_CODING,            /**< 1111 Cell Broadcast */
+
+       TAPI_NETTEXT_CODGRP_MAX
+} tapi_nettext_coding_group_type;
+
+/*
+ *  tapi_nettext_waiting_type
+ Defines different types of waiting indicators
+ */
+typedef enum {
+       TAPI_NETTEXT_WAITING_VOICE_MSG,         /**< voice message waiting */
+       TAPI_NETTEXT_WAITING_FAX_MSG,           /**< FAX message waiting */
+       TAPI_NETTEXT_WAITING_EMAIL_MSG,         /**< E-mail waiting */
+       TAPI_NETTEXT_WAITING_OTHER_MSG,         /**< Other message waiting */
+
+       TAPI_NETTEXT_WAITING_MAX
+} tapi_nettext_waiting_type;
+
+/*
+ * tapi_nettext_alphabet_type
+ Defines different alphabet types of an sms
+ */
+typedef enum {
+       TAPI_NETTEXT_ALPHABET_DEFAULT,  /**< GSM alphabet default 7bit */
+       TAPI_NETTEXT_ALPHABET_8BIT,             /**< 8bit */
+       TAPI_NETTEXT_ALPHABET_UCS2,             /**< 16bit ucs2 */
+
+       TAPI_NETTEXT_ALPHABET_KSC5601,  /**< for Korean */
+
+       TAPI_NETTEXT_ALPHABET_MAX
+} tapi_nettext_alphabet_type;
+
+/*
+ * tapi_nettext_class_type
+ This enum defines the different classes of SMS which indicates the
+ type of storage of the sms.
+ */
+typedef enum {
+       TAPI_NETTEXT_CLASS_0,   /**< display immediately */
+       TAPI_NETTEXT_CLASS_1,   /**< may be stored */
+       TAPI_NETTEXT_CLASS_2,   /**< store in SIM */
+       TAPI_NETTEXT_CLASS_3,   /**< transfer to TE */
+       TAPI_NETTEXT_CLASS_NONE,
+
+       TAPI_NETTEXT_CLASS_MAX
+} tapi_nettext_class_type;
+
+/*
+This structure contains the information related to sms coding schemes
+
+*/
+typedef struct {
+       TS_BOOL                                                 bCompressed;            /**< if text is compressed this is TRUE */
+       TS_BOOL                                                 bmsg_class_set;         /**< message class indication. if TRUE = bits 1..0, if FALSE = reserved */
+       TS_BOOL                                                 bmsg_ind_active;                /**< message indication group. if TRUE = on, FALSE = off */
+       tapi_nettext_coding_group_type  coding_group_type;      /**< Coding group, GSM 03.38 */
+       tapi_nettext_waiting_type               waiting_type;           /**< Type of message waiting */
+       tapi_nettext_alphabet_type              alphabet_type;          /**< How to encode a message. */
+       tapi_nettext_class_type                 class_type;                     /**< The message class */
+} tapi_nettext_coding_scheme;
+
+/*
+ *  tapi_nettext_vp_rel_Value
+ * This structure defines the validity period types.
+ */
+typedef enum {
+       TAPI_NETTEXT_VP_REL_1H,         /**< One hour */
+       TAPI_NETTEXT_VP_REL_6H,         /**< Six hours */
+       TAPI_NETTEXT_VP_REL_12H,        /**< Twelve hours */
+       TAPI_NETTEXT_VP_REL_1D,         /**< One day */
+       TAPI_NETTEXT_VP_REL_3D,         /**< Three days */
+       TAPI_NETTEXT_VP_REL_1W,         /**< One week */
+       TAPI_NETTEXT_VP_REL_1M,         /**< One Month */
+       TAPI_NETTEXT_VP_REL_MAX         /**< Max = 63 weeks */
+} tapi_nettext_vp_rel_Value;
+
+/*
+This structure contains all the information
+related to validity period of a message.
+*/
+typedef struct {
+       tapi_nettext_vp_type vp_type;                   /**< Validity period format */
+       tapi_nettext_vp_rel_Value vp_rel_type;  /**< Validity period value duration the message must retain in the service center while application attempts delivery */
+       TS_UINT32 vpValue;                                              /** Validity period value */
+} tapi_nettext_vp;
+
+
+/* This structure contains the details of delete status notification, which comes after calling
+ tel_delete_sms_in_simMsg*/
+typedef struct {
+       TS_UINT16 result;
+       TS_UINT8 index;
+} tel_delete_sms_in_simMsg_status_ind;
+
+
+/* This structure contains the details of save status notification, which comes after calling
+ tel_write_sms_in_simMsg*/
+
+typedef struct {
+       TS_UINT16 result;
+       TS_UINT8 index;
+} tapi_nettext_save_status_ind;
+
+typedef struct {
+       int year;
+       int month;
+       int day;
+       int hour;
+       int minute;
+       int second;
+} TmDateTime;
+
+
+#define BASE_YEAR                              70L             /* 1970 is the base year */
+#define MAX_YEAR                               130L    /* 2030 is the max year */
+#define        SIM_SMSP_ADDRESS_LEN    20              /* digit length */
+
+#define SET_TON_NPI(dest, ton, npi) {  \
+       dest = 0x80;                                            \
+       dest |= (ton & 0x07) << 4;                      \
+       dest |= npi & 0x0F;                                     \
+}
+
+typedef struct {
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       // reject duplicates [M]
+       TS_BOOL rd; // bit 2
+
+       // validity period format [M]
+       tapi_nettext_vp_type vpf; //  bits 3, 4
+
+       // reply path [M]
+       TS_BOOL rp; //bit 7
+
+       // user data header indication
+       TS_BOOL udhi; //bit 6
+
+       // status report request
+       TS_BOOL srr; // bit 5
+
+       /************BODY************/
+
+       //message reference [M]
+       TS_UINT mr;
+
+       // destination address [M]
+       TelSmsAddressInfo_t desAddr;
+
+       // protocol identifier [M]
+       TS_BYTE pId;
+
+       // data coding scheme [M]
+       tapi_nettext_coding_scheme dcs;
+
+       // validity period
+       tapi_nettext_vp vp;
+
+       // user data length [M]
+       TS_UINT udl;
+
+       // user data
+       TS_BYTE * userData;
+
+} TPDU_SMS_SUBMIT;
+
+typedef struct {
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       // user data header indication
+       TS_BOOL udhi; //bit 6
+
+       /************BODY************/
+
+       // failure Cause [M]
+       TS_UINT fcs;
+
+       // parameter indicator [M]
+       TS_BYTE paraInd;
+
+       // service centre time stamp [M]
+       TmDateTime scts;
+
+       // protocol identifier [M]
+       TS_BYTE pId;
+
+       // data coding scheme
+       tapi_nettext_coding_scheme dcs;
+
+       // user data length [M]
+       TS_UINT udl;
+
+       // user data
+       TS_BYTE * userData;
+
+} TPDU_SMS_SUBMIT_REPORT;
+
+typedef struct {
+       /************HEADER************/
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       TS_BOOL mms; // bit 2
+
+       TS_BOOL rp; // bit 7
+
+       TS_BOOL udhi; //bit 6
+
+       TS_BOOL sri; // bit , 5status_report_indication
+
+       /************BODY************/
+
+       TelSmsAddressInfo_t orgAddr;
+
+       TS_BYTE pId;
+
+       TmDateTime scts;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+} TPDU_SMS_DELIVER;
+
+typedef struct {
+       /************HEADER************/
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       TS_BOOL udhi; //bit 6
+
+       /************BODY************/
+
+       TS_UINT fcs;
+
+       TS_BYTE paraInd;
+
+       TS_BYTE pId;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+} TPDU_SMS_DELIVER_REPORT;
+
+typedef struct {
+       /************HEADER************/
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       TS_BOOL udhi; //bit 6
+
+       TS_BOOL srr; //bit 5, status_report_request
+
+       /************BODY************/
+
+       TS_UINT mr; //message_ref
+
+       TS_BYTE pId;
+
+       TS_BYTE cmdType;
+
+       TS_BYTE msgNum;
+
+       TelSmsAddressInfo_t destAddr;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+} TPDU_SMS_COMMAND;
+
+typedef struct {
+       /************HEADER************/
+
+       SmsTPDUType msg_type; //bit 0 ,1
+
+       TS_BOOL udhi; //bit 6
+
+       TS_BOOL mms; //bit 2
+
+       TS_BOOL srq; //bit 5, status_report_qualifier
+
+       /************BODY************/
+
+       TS_UINT mr;
+
+       TelSmsAddressInfo_t rcpAddr; //recipient_addr
+
+       TmDateTime scts;
+
+       TmDateTime dt; //discharge_time
+
+       TS_BYTE status;
+
+       TS_BYTE paraInd;
+
+       TS_BYTE pId;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+} TPDU_SMS_STATUS_REPORT;
+
+/**************************************************************************************
+*** (main.c) function header****************************************************************
+***************************************************************************************
+***************************************************************************************/
+int SendMessage();
+int ReadMessage();
+int DeleteMessage();
+int ReceiveMessage(int pdu_len, char * pPDU);
+int GetInformation();
+int Setting();
+
+TS_BOOL DecodeCellBroadcastMsg(int length, char * pPDU);
+TS_BOOL EncodeSmsSubmitTpdu(char* diallingNum, int dialNumLen, char* msg, int msg_len);
+TS_BOOL DecodeSmsSubmitTpdu(int pdu_len, char * pPDU);
+int DecodeSmsDeliverTpdu(int pdu_len, char * pPDU);
+TS_BOOL EncodeSmsDeliverReportTpdu();
+TS_BOOL DecodeSmsSubmitReportTpdu(int length, char *data);
+TS_BOOL DecodeSmsStatusReportTpdu(int pdu_len, char * pPDU);
+
+/***************************************************************************************/
+void reverse(char* x, int len);
+char* AcItoa(int n, char* str, int b);
+int AcToupper(int ch);
+
+char* SmsUtilUnpackGSMCode(char* szData, const TS_BYTE* pIn, int in_len);
+int SmsUtilPackGSMCode(TS_BYTE* pOut, const char* szData, int in_len);
+
+void SmsUtilConvertBCD2Digit(char* pDigits, char* pBCD, int digitLen);
+void SmsUtilConvertDigit2BCD(char* pBCD, char* pDigits, int digitLen);
+
+TmDateTime* SmsUtilDecodeTimeStamp(unsigned char* pTimeStamp, TmDateTime *tmDateTime);
+unsigned char* SmsUtilEncodeTimeStamp(TmDateTime* tmDateTime, unsigned char* pTimeStamp);
+
+void SmsUtilDecodeAddrField(char *diallingNum, unsigned char * pAddrField, int *result_ton, int *result_npi);
+int SmsUtilEncodeAddrField(unsigned char* pAddrField, char* diallingNum, int dialnumLen, int ton, int npi);
+
+int SmsUtilDecodeScAddrField(TelSmsAddressInfo_t* pSmsAddrField, TS_BYTE* pAddrField);
+int SmsUtilEncodeScAddrField(TS_BYTE* pAddrField, TelSmsAddressInfo_t * pSmsAddrField);
+
+void SmsUtilDecodeDCS(tapi_nettext_coding_scheme* pCodingScheme, unsigned char dcs);
+void SmsUtilEncodeDCS(TS_BYTE* pDCS, tapi_nettext_coding_scheme* pCodingScheme);
+TS_UINT8 SmsUtilEncodeValidity(TS_BYTE* pValidity, tapi_nettext_vp* pVP);
+
+void PrepareMessage(TelSmsDatapackageInfo_t *pDataPackage);
+
+#endif
+
+
diff --git a/TC/telephony_TC/sms/unit/tet_macro.h b/TC/telephony_TC/sms/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..b386b3e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TET_MACRO_H
+#define TET_MACRO_H
+
+
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)
+
+
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}
+
+
+#endif
+
diff --git a/TC/telephony_TC/sms/unit/tet_tapi_util_new.h b/TC/telephony_TC/sms/unit/tet_tapi_util_new.h
new file mode 100644 (file)
index 0000000..a474546
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TET_UTIL_NEW_
+#define _TET_UTIL_NEW_
+
+#include <TelUtility.h>
+
+// TET_Error Code string return macro
+typedef struct {
+       TapiResult_t err;
+       char * string;
+} TAPI_Error_String;
+
+#ifndef BOOL
+typedef int BOOL;
+#endif
+
+#ifndef TRUE
+#define TRUE   1
+#endif
+
+#ifndef FALSE
+#define FALSE  0
+#endif
+
+#define TAPI_ERROR_MAX TAPI_API_MISC_VALIDITY_ERROR+1
+
+TAPI_Error_String g_ErrorString[TAPI_ERROR_MAX] = {
+
+       /* #################### COMMON START ################ */
+
+       {TAPI_API_SUCCESS, "No Error occured"},
+       {TAPI_API_INVALID_INPUT, "Input values are not correct"},
+       {TAPI_API_INVALID_PTR, "TAPI_API_INVALID_PTR"},
+       {TAPI_API_API_DEPRICATED, "This API is depricated and will be so in future also."},
+       {TAPI_API_SYSTEM_OUT_OF_MEM, "TAPI_API_SYSTEM_OUT_OF_MEM"},
+       {TAPI_API_SYSTEM_RPC_LINK_DOWN, "TAPI_API_SYSTEM_RPC_LINK_DOWN"},
+       {TAPI_API_SYSTEM_RPC_LINK_NOT_EST, "TAPI_API_SYSTEM_RPC_LINK_NOT_EST"},
+       {TAPI_API_SERVICE_NOT_READY, "Phone was powered on, but yet to receive the power up completed noti"},
+       {TAPI_API_SERVER_LAYER_FAILURE, "Erros happend in executing the following layer fucntions"},
+       {TAPI_API_TRANSPORT_LAYER_FAILURE, "TAPI_API_TRANSPORT_LAYER_FAILURE"},
+
+       /* #################### COMMON END ################ */
+
+       /* CALL */
+       {TAPI_API_INVALID_CALL_HANDLE, "TAPI_API_INVALID_CALL_HANDLE"},
+       {TAPI_API_INVALID_CALL_STATE, "TAPI_API_INVALID_CALL_STATE"},
+       {TAPI_API_INVALID_LINE_ID, "TAPI_API_INVALID_LINE_ID"},
+
+       /* POWER */
+       {TAPI_API_MODEM_ALREADY_ON, "TAPI_API_MODEM_ALREADY_ON"},
+       {TAPI_API_MODEM_ALREADY_OFF, "TAPI_API_MODEM_ALREADY_OFF"},
+
+       /* SAT */
+       {TAPI_API_SAT_PARSER_ENCODING_ERROR, "TAPI_API_SAT_PARSER_ENCODING_ERROR"},
+       {TAPI_API_SAT_COMMAND_NUMBER_INVALID, "TAPI_API_SAT_COMMAND_NUMBER_INVALID"},
+       {TAPI_API_SAT_COMMAND_NUMBER_MISMATCH, "TAPI_API_SAT_COMMAND_NUMBER_MISMATCH"},
+       {TAPI_API_SAT_COMMAND_TYPE_MISMATCH, "TAPI_API_SAT_COMMAND_TYPE_MISMATCH"},
+
+       /* Misc */
+       {TAPI_API_MISC_RETURN_NULL, "TAPI_API_MISC_RETURN_NULL"},
+       {TAPI_API_MISC_INPUTPARM_ERROR, "TAPI_API_MISC_INPUTPARM_ERROR"},
+       {TAPI_API_MISC_OUTPARAM_NULL, "TAPI_API_MISC_OUTPARAM_NULL"},
+       {TAPI_API_MISC_VALIDITY_ERROR, "TAPI_API_MISC_VALIDITY_ERROR"},
+};
+
+static const char *TET_ERROR_TO_STRING(TapiResult_t err_code)
+{
+       int index;
+       for (index = 0; g_ErrorString[index].err != TAPI_ERROR_MAX; index++) {
+               if (g_ErrorString[index].err == err_code || g_ErrorString[index].err == TAPI_ERROR_MAX)
+                       return g_ErrorString[index].string;
+       }
+       return NULL;
+}
+
+#define TET_CHECK(x1, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+#define TET_CHECK2(x1,x2, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2))) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+#define TET_CHECK3(x1,x2,x3, y...) \
+ { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2) || err == (x3))) \
+       { \
+               tet_printf("%s[%d] : test fail. error code =%d [%s] ",__FILE__,__LINE__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ }
+
+
+#endif //_TET_UTIL_
diff --git a/TC/telephony_TC/sms/unit/tslist b/TC/telephony_TC/sms/unit/tslist
new file mode 100644 (file)
index 0000000..0aa1b3d
--- /dev/null
@@ -0,0 +1,15 @@
+/sms/unit/uts_tel_send_sms_deliver_report
+/sms/unit/uts_tel_delete_sms_in_sim
+/sms/unit/uts_tel_get_sms_cb_config
+/sms/unit/uts_tel_get_sms_count
+/sms/unit/uts_tel_get_sms_parameter_count
+/sms/unit/uts_tel_get_sms_parameters
+/sms/unit/uts_tel_get_sms_sca
+/sms/unit/uts_tel_read_sms_in_sim
+/sms/unit/uts_tel_send_sms
+/sms/unit/uts_tel_set_sms_cb_config
+/sms/unit/uts_tel_set_sms_memory_status
+/sms/unit/uts_tel_set_sms_message_status
+/sms/unit/uts_tel_set_sms_parameters
+/sms/unit/uts_tel_set_sms_sca
+/sms/unit/uts_tel_write_sms_in_sim
diff --git a/TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.c b/TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.c
new file mode 100644 (file)
index 0000000..5908435
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_delete_sms_in_sim.h"
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_delete_sms_in_sim_01, 1},
+       {utc_tel_delete_sms_in_sim_02, 2},
+       {utc_tel_delete_sms_in_sim_03, 3},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/*
+ * Startup & Clean function : It is not test code, only for initialize and finalize test module
+ */
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       /* if( !(G_MAIN_INIT((EvtSysEventCb)on_sms_check_event_received, alarm_received) ) )
+
+        printf("G_MAIN_INIT() Failed\n"); */
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephpny service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests TelTapiDeleteSms() API in normal conditions
+ * @par ID:
+ * UTC_TEL_DELETE_SMS_01
+ * @param [in]  Index = 1
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_delete_sms_in_sim_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+
+       returnStatus = tel_delete_sms_in_sim(1, &pRequestId);
+       gmain_loop_for_events(5000);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("uts_tel_delete_sms_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests TelTapiDeleteSms() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_DELETE_SMS_02
+ * @param [in]  Index = 1
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_delete_sms_in_sim_02()
+{
+       TapiResult_t returnStatus;
+
+       returnStatus = tel_delete_sms_in_sim(1, NULL);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("uts_tel_delete_sms_02 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests TelTapiDeleteSms() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_DELETE_SMS_03
+ * @param [in] Index
+ * @code
+ Index = -1;
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_delete_sms_in_sim_03()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+
+       returnStatus = tel_delete_sms_in_sim(-1, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("uts_tel_delete_sms_03 pass\n");
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.h b/TC/telephony_TC/sms/unit/uts_tel_delete_sms_in_sim.h
new file mode 100644 (file)
index 0000000..4d8e5bf
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_DELETE_SMS_IN_SIM_H_
+#define _UTS_DELETE_SMS_IN_SIM_H_
+
+static void utc_tel_delete_sms_in_sim_01();
+static void utc_tel_delete_sms_in_sim_02();
+static void utc_tel_delete_sms_in_sim_03();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.c
new file mode 100644 (file)
index 0000000..cebbcaa
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_cb_config.h"
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_get_sms_cb_config_01, 1 }, { utc_tel_get_sms_cb_config_02, 2 }, { NULL, 0 } };
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_register_event Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after tel_register_event subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_cb_config() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_GET_CONFIG_01
+ * @param [in]  None
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_cb_config_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SMS SET SMS GET CB CONFIG API */
+       returnStatus = tel_get_sms_cb_config(&pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_get_cbconfig_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_cb_config() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_GET_CONFIG_02
+ * @param [in]  None
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_sms_cb_config_02()
+{
+       TapiResult_t returnStatus;
+
+       /* CALLING TAPI SMS SET SMS GET CB CONFIG API */
+       returnStatus = tel_get_sms_cb_config(NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_get_cbconfig_02 pass\n");
+
+       return;
+}
+/** @} */
+
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_cb_config.h
new file mode 100644 (file)
index 0000000..d714699
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_CB_CONFIG_H_
+#define _UTS_TEL_GET_SMS_CB_CONFIG_H_
+
+static void utc_tel_get_sms_cb_config_01();
+static void utc_tel_get_sms_cb_config_02();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_count.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_count.c
new file mode 100644 (file)
index 0000000..baa4683
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_count.h"
+
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+
+struct tet_testlist tet_testlist[] = { { utc_tel_get_sms_count_01, 1 }, { utc_tel_get_sms_count_02, 2 }, { NULL, 0 } };
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_GET_COUNT_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_register_event Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after tel_register_event subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_count() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SMS_GET_COUNT_01
+ * @param [in]  None
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_count_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       returnStatus = tel_get_sms_count(&pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The request id value is %d\n", pRequestId);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_get_count_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_count() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SMS_GET_COUNT_02
+ * @param [in]  None
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_sms_count_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       returnStatus = tel_get_sms_count(NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_get_count_02 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_count.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_count.h
new file mode 100644 (file)
index 0000000..e530f06
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_COUNT_H_
+#define _UTS_TEL_GET_SMS_COUNT_H_
+
+static void utc_tel_get_sms_count_01();
+static void utc_tel_get_sms_count_02();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.c
new file mode 100644 (file)
index 0000000..623bc61
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_parameter_count.h"
+
+static void startup();
+static void cleanup();
+
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_get_sms_parameter_count_01, 1 }, { utc_tel_get_sms_parameter_count_02, 2 }, { NULL, 0 } };
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_PARAM_COUNT_IND, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_register_event Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after tel_register_event subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests TelTapiGetParamCount() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_PARAM_COUNT_01
+ * @param [in]  None
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_parameter_count_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId = -1;
+
+       returnStatus = tel_get_sms_parameter_count(&pRequestId);
+
+       gmain_loop_for_events(5000);
+       printf("The request id value is %d\n", pRequestId);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_get_sms_parameter_count_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests TelTapiGetParamCount() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_PARAM_COUNT_02
+ * @param [in] None
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_sms_parameter_count_02()
+{
+       TapiResult_t returnStatus;
+
+       returnStatus = tel_get_sms_parameter_count(NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_get_sms_parameter_count_02 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameter_count.h
new file mode 100644 (file)
index 0000000..53b3012
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_PARAMETER_COUNT_H_
+#define _UTS_TEL_GET_SMS_PARAMETER_COUNT_H_
+
+static void utc_tel_get_sms_parameter_count_01();
+static void utc_tel_get_sms_parameter_count_02();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.c
new file mode 100644 (file)
index 0000000..4984781
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_parameters.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_get_sms_parameters_01, 1 }, { utc_tel_get_sms_parameters_02, 2 }, { utc_tel_get_sms_parameters_03, 3 }, {
+               utc_tel_get_sms_parameters_04, 4 }, { utc_tel_get_sms_parameters_05, 5 }, { NULL, 0 } };
+
+unsigned int subscription_id;
+static TapiResult_t gStartupSuccess;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_GET_PARAM_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_parameters() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_SMS_PARAM_01
+ * @param [in]  SmsRecordIndex = 1
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_parameters_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+       int SmsRecordIndex = 1;
+
+       /* CALLING TAPI SMS GET PARAMETERS */
+       returnStatus = tel_get_sms_parameters(SmsRecordIndex, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_get_sms_parameters_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_parameters() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_SMS_PARAM_02
+ * @param [in]  SmsRecordIndex = 0
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_parameters_02()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+       int SmsRecordIndex = 0;
+
+       /* CALLING TAPI SMS GET PARAMETERS */
+       returnStatus = tel_get_sms_parameters(SmsRecordIndex, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_get_sms_parameters_02 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_parameters() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_SMS_PARAM_03
+ * @param [in]  SmsRecordIndex = -1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_get_sms_parameters_03()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+       int SmsRecordIndex = -1;
+
+       /* CALLING TAPI SMS GET PARAMETERS */
+       returnStatus = tel_get_sms_parameters(SmsRecordIndex, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_get_sms_parameters_03 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_parameters() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_SMS_PARAM_04
+ * @param [in]  SmsRecordIndex = 256
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_get_sms_parameters_04()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+       int SmsRecordIndex = 256;
+
+       /* CALLING TAPI SMS GET PARAMETERS */
+       returnStatus = tel_get_sms_parameters(SmsRecordIndex, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_get_sms_parameters_04 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_parameters() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_SMS_PARAM_05
+ * @param [in]  SmsRecordIndex = 1
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_sms_parameters_05()
+{
+       TapiResult_t returnStatus;
+       int SmsRecordIndex = 1;
+
+       /* CALLING TAPI SMS GET PARAMETERS */
+       returnStatus = tel_get_sms_parameters(SmsRecordIndex, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_get_sms_parameters_05 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_parameters.h
new file mode 100644 (file)
index 0000000..f1c470c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_PARAMETERS_H_
+#define _UTS_TEL_GET_SMS_PARAMETERS_H_
+
+static void utc_tel_get_sms_parameters_01();
+
+static void utc_tel_get_sms_parameters_02();
+
+static void utc_tel_get_sms_parameters_03();
+
+static void utc_tel_get_sms_parameters_04();
+
+static void utc_tel_get_sms_parameters_05();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.c
new file mode 100644 (file)
index 0000000..611c01c
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_preferred_bearer.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { uts_tel_get_sms_preferred_bearer_01, 1 }, { uts_tel_get_sms_preferred_bearer_02, 2 }, { NULL, 0 } };
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_register_event Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after tel_register_event subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_preferred_bearer() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_PREFEERED_BEARER_01
+ * @param [in]  None
+ @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void uts_tel_get_sms_preferred_bearer_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId = -1;
+
+       returnStatus = tel_get_sms_preferred_bearer(&pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The request id value is %d\n", pRequestId);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_NOT_SUPPORTED);
+       if (returnStatus == TAPI_API_NOT_SUPPORTED)
+               printf("uts_tel_get_sms_preferred_bearer_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_preferred_bearer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_PREFEERED_BEARER_02
+ * @param [in]  None
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void uts_tel_get_sms_preferred_bearer_02()
+{
+       TapiResult_t returnStatus;
+
+       returnStatus = tel_get_sms_preferred_bearer(NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("uts_tel_get_sms_preferred_bearer_02 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_preferred_bearer.h
new file mode 100644 (file)
index 0000000..3135dbb
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_PREFERRED_BEARER_H_
+#define _UTS_TEL_GET_SMS_PREFERRED_BEARER_H_
+
+static void uts_tel_get_sms_preferred_bearer_01();
+static void uts_tel_get_sms_preferred_bearer_02();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.c b/TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.c
new file mode 100644 (file)
index 0000000..1d8f715
--- /dev/null
@@ -0,0 +1,179 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_get_sms_sca.h"
+#include "sms_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_get_sms_sca_01, 1 }, { utc_tel_get_sms_sca_02, 2 }, { NULL, 0 } };
+
+TelSmsAddressInfo_t *pSCA;
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+static void startup()
+{
+#if 0
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       int scaNum_len = 0;
+       int Index = 0;
+       int i = 0;
+       int pRequestId = -1;
+       TS_BYTE packet[500];
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       pSCA = (TelSmsAddressInfo_t*) malloc(sizeof(TelSmsAddressInfo_t));
+       memset(pSCA, 0, sizeof(pSCA));
+
+       sprintf(scaNum, "%d", VALID_SCA_NUM);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = '\0';
+       scaNum_len = scaNum_len - 1;
+
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+
+       Index = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+
+       printf("Index =%d\n", Index);
+
+       for (i = 0; i < Index; i++)
+       printf("[%02x]", packet[i]);
+
+       pSCA->DialNumLen = Index;
+
+       memcpy(pSCA->szDiallingNum, packet, Index);
+#endif
+
+       tel_init();
+       tel_register_app_name("org.samsung.test");
+
+#if 0
+       printf("\nSET INVALID SERVICE CENTER ADDRESS\n");
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(pSCA, Index, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+       if (returnStatus == TAPI_API_SUCCESS)
+       printf("Set SCA settings successful\n");
+#endif
+}
+
+static void cleanup()
+{
+       tel_deinit();
+
+       //free(pSCA);
+}
+
+/**
+ * @brief This tests tel_get_sms_sca() API in normal conditions
+ * @par ID:
+ * UTC_TEL_GET_SERV_CENTER_ADDR_01
+ * @param [in] Index = 0
+ * @param [out] pSCA
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_get_sms_sca_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TelSmsAddressInfo_t *pSCA;
+       int req;
+
+       pSCA = (TelSmsAddressInfo_t *) malloc(sizeof(TelSmsAddressInfo_t));
+
+       returnStatus = tel_get_sms_sca(0, &req);
+
+       printf("The return value is %d\n", returnStatus);
+
+#if 0
+       TS_BYTE SCA[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       char decode_sca_addr[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       int sca_len = -1;
+
+       /* Decode the service center address */
+       printf("Service center addr returned from TAPI SCA address %s returnStatus %d\n", pSCA->szDiallingNum, returnStatus);
+       SmsUtilDecodeAddrField(decode_sca_addr, &(pSCA->szDiallingNum[0]), &(pSCA->Ton), &(pSCA->Npi));
+       sca_len = strlen(decode_sca_addr);
+
+       memcpy(SCA, decode_sca_addr, sca_len);
+       SCA[sca_len] = '\0';
+
+       printf("Decode SCA Address =========\n");
+       printf("SCA Number :%s, SCA Length :%d \n", SCA, sca_len);
+       printf("========================\n");
+       printf("decodeScaAddr :%s\n", decode_sca_addr);
+#endif
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_sca_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_get_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_GET_SERV_CENTER_ADDR_02
+ * @param [in]  Index = 0
+ * @param [out] pSCA = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_get_sms_sca_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int req;
+
+       returnStatus = tel_get_sms_sca(-1, &req);
+
+       printf("The return value is %d\n", returnStatus);
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_sca_02 pass\n");
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.h b/TC/telephony_TC/sms/unit/uts_tel_get_sms_sca.h
new file mode 100644 (file)
index 0000000..9d36720
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_GET_SMS_SCA_H_
+#define _UTS_TEL_GET_SMS_SCA_H_
+
+static void utc_tel_get_sms_sca_01();
+static void utc_tel_get_sms_sca_02();
+
+#endif //_UTS_GET_SERV_CENTER_ADDR_H_
diff --git a/TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.c b/TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.c
new file mode 100644 (file)
index 0000000..8c0670e
--- /dev/null
@@ -0,0 +1,202 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_read_sms_in_sim.h"
+
+static void startup();
+static void cleanup();
+void (*tet_startup)() = startup;
+void (*tet_cleanup)() = cleanup;
+struct tet_testlist tet_testlist[] = { { utc_tel_read_sms_in_sim_01, 1 }, { utc_tel_read_sms_in_sim_02, 2 }, { utc_tel_read_sms_in_sim_03, 3 }, {
+               utc_tel_read_sms_in_sim_04, 4 }, { NULL, 0 } };
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_READ_SMS_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_read_sms_in_sim() API in normal conditions
+ * @par ID:
+ * UTC_TEL_READ_SMS_01
+ * @param [in]  Index = 1
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_read_sms_in_sim_01()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+
+       returnStatus = tel_read_sms_in_sim(1, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_read_sms_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_read_sms_in_sim() API in normal conditions
+ * @par ID:
+ * UTC_TEL_READ_SMS_02
+ * @param [in]  Index = 0
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_read_sms_in_sim_02()
+{
+       TapiResult_t returnStatus;
+       int pRequestId;
+
+       returnStatus = tel_read_sms_in_sim(0, &pRequestId);
+
+       gmain_loop_for_events(5000);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_read_sms_02 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_read_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_READ_SMS_03
+ * @param [in] Index = -1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_read_sms_in_sim_03()
+{
+       TapiResult_t returnStatus;
+       int pRequestId = -1;
+
+       returnStatus = tel_read_sms_in_sim(-1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_read_sms_03 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_read_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_READ_SMS_04
+ * @param [in]  Index = 1
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_read_sms_in_sim_04()
+{
+       TapiResult_t returnStatus;
+
+       returnStatus = tel_read_sms_in_sim(1, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_read_sms_04 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.h b/TC/telephony_TC/sms/unit/uts_tel_read_sms_in_sim.h
new file mode 100644 (file)
index 0000000..44daa6d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_READ_SMS_IN_SIM_H_
+#define _UTS_TEL_READ_SMS_IN_SIM_H_
+
+static void utc_tel_read_sms_in_sim_01();
+
+static void utc_tel_read_sms_in_sim_02();
+
+static void utc_tel_read_sms_in_sim_03();
+
+static void utc_tel_read_sms_in_sim_04();
+
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms.c b/TC/telephony_TC/sms/unit/uts_tel_send_sms.c
new file mode 100644 (file)
index 0000000..afccf52
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include "tet_api.h"
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "sms_util.h"
+#include "uts_tel_send_sms.h"
+#include "sms_common.h"
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_sms_01, 1},
+       {utc_tel_send_sms_02, 2},
+       {utc_tel_send_sms_03, 3},
+       {utc_tel_send_sms_04, 4},
+       {utc_tel_send_sms_05, 5},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SENTSTATUS_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_01
+ * @param [in] pDataPackage   = valid
+ * @param [in] bMoreMsgToSend = FALSE
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_send_sms_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = FALSE;
+       int pRequestId = -1;
+       TelSmsDatapackageInfo_t smsDataPackage;
+
+       PrepareMessage(&smsDataPackage);
+       returnStatus = tel_send_sms(&smsDataPackage, bMoreMsgToSend, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_send_sms_01 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_02
+ * @param [in] pDataPackage   = NULL
+ * @param [in] bMoreMsgToSend = FALSE
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = FALSE;
+       int pRequestId = -1;
+
+       returnStatus = tel_send_sms(NULL, bMoreMsgToSend, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_02 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_03
+ * @param [in]  pDataPackage = valid
+ * @param [in]  bMoreMsgToSend = FALSE
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+
+void utc_tel_send_sms_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TelSmsDatapackageInfo_t smsDataPackage;
+       TS_BOOL bMoreMsgToSend = FALSE;
+       PrepareMessage(&smsDataPackage);
+       returnStatus = tel_send_sms(&smsDataPackage, bMoreMsgToSend, NULL);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_03 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_04
+ * @param [in] pDataPackage   = valid
+ * @param [in] bMoreMsgToSend = TRUE
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+
+void utc_tel_send_sms_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = TRUE;
+       TelSmsDatapackageInfo_t smsDataPackage;
+       int pRequestId = -1;
+       PrepareMessage(&smsDataPackage);
+       returnStatus = tel_send_sms(&smsDataPackage, bMoreMsgToSend, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_send_sms_04 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_05
+ * @param [in]  pDataPackage   = NULL
+ * @param [in]  bMoreMsgToSend = FALSE
+ * @param [out] pRequestId     = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_05()
+{
+
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = FALSE;
+       returnStatus = tel_send_sms(NULL, bMoreMsgToSend, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_05 pass\n");
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms.h b/TC/telephony_TC/sms/unit/uts_tel_send_sms.h
new file mode 100644 (file)
index 0000000..83846ea
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SEND_SMS_H_
+#define _UTS_TEL_SEND_SMS_H_
+
+static void utc_tel_send_sms_01();
+static void utc_tel_send_sms_02();
+static void utc_tel_send_sms_03();
+static void utc_tel_send_sms_04();
+static void utc_tel_send_sms_05();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.c b/TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.c
new file mode 100644 (file)
index 0000000..0832f48
--- /dev/null
@@ -0,0 +1,312 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_common.h"
+#include "sms_callback_util.h"
+#include "uts_tel_send_sms_deliver_report.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_sms_deliver_report_01, 1},
+       {utc_tel_send_sms_deliver_report_02, 2},
+       {utc_tel_send_sms_deliver_report_03, 3},
+       {utc_tel_send_sms_deliver_report_04, 4},
+       {NULL, 0}
+};
+
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF, &subscription_id, tapi_sms_callback, (void *)TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF);
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_INCOM_IND, &subscription_id, tapi_sms_callback, (void *)TAPI_EVENT_NETTEXT_INCOM_IND);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id1 is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+
+       printf("\n## TEST START ##\n");
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+
+       printf("\n## TEST FINISH ##\n");
+       return;
+}
+
+void EncodeSmsDeliveryReportTpdu(TelSmsDatapackageInfo_t *pDataPackage)
+{
+       TPDU_SMS_DELIVER_REPORT deliver_report;
+       unsigned char packet[TAPI_NETTEXT_MSG_SIZE_MAX] = {0,};
+       char *SCA = VALID_SCA_NUM;
+
+       TS_BYTE tp_dcs;
+       TS_BYTE mask = 0x69;
+       int index = 0, ScIndex = 0, sca_len;
+       int i;
+
+       ScIndex = SmsUtilEncodeAddrField(pDataPackage->Sca, SCA, strlen(SCA), 0x01, 0x01);
+       sca_len = strlen(SCA);
+
+       /* TP-MTI , TP-UDHI */
+       deliver_report.msg_type = SMS_TPDU_DELIVER_REPORT;
+       deliver_report.udhi = FALSE;
+
+       packet[index] = deliver_report.msg_type; //DELIVER REPORT
+       packet[index] |= deliver_report.udhi ? 0x40 : 0; //bit 6
+
+       index++;
+
+       /* TP -PI */
+       deliver_report.paraInd = mask;
+       packet[index] = deliver_report.paraInd;
+
+       if ((mask != 0xFF) && (mask != 0)) {
+               index++;
+               /* TP-PID */
+               if (mask & 0x01) {
+                       deliver_report.pId = 0x65;
+                       packet[index++] = deliver_report.pId;
+               }
+
+               /* TP-DCS */
+               if (mask & 0x02) {
+                       deliver_report.dcs.bCompressed = FALSE;
+                       deliver_report.dcs.bmsg_class_set = TRUE;
+                       deliver_report.dcs.coding_group_type = TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+                       deliver_report.dcs.alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                       deliver_report.dcs.class_type = TAPI_NETTEXT_CLASS_2;
+
+                       SmsUtilEncodeDCS(&tp_dcs, &deliver_report.dcs);
+                       packet[index++] = tp_dcs;
+               }
+               /* TP-UDL */
+               if (mask & 0x04) {
+                       deliver_report.udl = 0x00;
+                       packet[index++] = deliver_report.udl;
+
+                       /* TP-UD */
+
+                       if (deliver_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT) {
+                               //SmsUtilPackGSMCode( packet + index, msg, msg_len);
+                       }
+               }
+       }
+       printf("EncodeSmsDeliveryReportTpdu: Send packet to phonseSever[%d] : ", index);
+
+       for (i = 0; i < index; i++) {
+               printf("[%02x]", packet[i]);
+               if (i % 10 == 9)
+                       printf("\n");
+       }
+       printf("\n");
+
+       memcpy(pDataPackage->szData, packet, index);
+       pDataPackage->MsgLength = index;
+       printf("- msgLength:%d\n", pDataPackage->MsgLength);
+       printf("- SCA Number:[%s], SCA Length:%d\n", SCA, sca_len);
+       printf("- SCA Addr:");
+
+       for (i = 0; i < sca_len; i++) {
+               printf("%02x ",  pDataPackage->Sca[i]);
+               if (i % 10 == 9)
+                       printf("  ");
+       }
+       printf("\n\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms_deliver_report() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SEND_DELIVERY_REPORT_01
+ * @param [in] pDataPackage = valid
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_send_sms_deliver_report_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = 1;
+       TelSmsDatapackageInfo_t deliveryReportDataPackage = {{0,},0,{0,},};
+
+       printf("/******************************************\n");
+       printf("* Please send a message to tesing target  *\n");
+       printf("* within 60 seconds !!!                   *\n");
+       printf("*******************************************\n");
+
+       EncodeSmsDeliveryReportTpdu(&deliveryReportDataPackage);
+       returnStatus = tel_send_sms_deliver_report(&deliveryReportDataPackage, TAPI_NETTEXT_SENDSMS_SUCCESS, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       /* return TAPI_API_OEM_PLUGIN_FAILURE is ok. because call tel_send_sms_deliver_report() without tel_send_sms() */
+       TET_CHECK(returnStatus == TAPI_API_OEM_PLUGIN_FAILURE);
+       if (returnStatus == TAPI_API_OEM_PLUGIN_FAILURE)
+               printf("utc_tel_send_sms_deliver_report_01 pass\n");
+       else
+               printf("utc_tel_send_sms_deliver_report_01 fail\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms_deliver_report() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_DELIVERY_REPORT_02
+ * @param [in] pDataPackage = valid
+ * @param [out] pRequestId  = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_deliver_report_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TelSmsDatapackageInfo_t deliveryReportDataPackage;
+       EncodeSmsDeliveryReportTpdu(&deliveryReportDataPackage);
+
+       returnStatus = tel_send_sms_deliver_report(&deliveryReportDataPackage, TAPI_NETTEXT_SENDSMS_SUCCESS, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_deliver_report_02 pass\n");
+       else
+               printf("utc_tel_send_sms_deliver_report_02 fail\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms_deliver_report() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_DELIVERY_REPORT_03
+ * @param [in] pDataPackage = NULL
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_deliver_report_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       returnStatus = tel_send_sms_deliver_report(NULL, TAPI_NETTEXT_SENDSMS_SUCCESS, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_deliver_report_03 pass\n");
+       else
+               printf("utc_tel_send_sms_deliver_report_03 fail\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_DELIVERY_REPORT_04
+ * @param [in]  pDataPackage = NULL
+ * @param [out] pRequestId  = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_deliver_report_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       returnStatus = tel_send_sms_deliver_report(NULL, TAPI_NETTEXT_SENDSMS_SUCCESS, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_deliver_report_04 pass\n");
+       else
+               printf("utc_tel_send_sms_deliver_report_04 fail\n");
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.h b/TC/telephony_TC/sms/unit/uts_tel_send_sms_deliver_report.h
new file mode 100644 (file)
index 0000000..97b6db3
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SEND_SMS_DELIVER_REPORT_H_
+#define _UTS_TEL_SEND_SMS_DELIVER_REPORT_H_
+
+static void utc_tel_send_sms_deliver_report_01();
+static void utc_tel_send_sms_deliver_report_02();
+static void utc_tel_send_sms_deliver_report_03();
+static void utc_tel_send_sms_deliver_report_04();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.c b/TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.c
new file mode 100644 (file)
index 0000000..e55e271
--- /dev/null
@@ -0,0 +1,448 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include "tet_api.h"
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_send_sms_msg.h"
+#include "sms_common.h"
+
+#define BOOL int
+
+unsigned int SmsMsgId = 0;
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_sms_msg_01, 1},
+       {utc_tel_send_sms_msg_02, 2},
+       {utc_tel_send_sms_msg_03, 3},
+       {utc_tel_send_sms_msg_04, 4},
+       {NULL, 0}
+};
+
+TelSmsMsgInfo_t *pDataPackage;
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void EncodeCdmaSmsSubmitTpdu(char* diallingNum, int dialNumLen, char* msgTxt, int msg_len);
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module
+ */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+       memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SENTSTATUS_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       free(pDataPackage);
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/////////////////////
+
+
+BOOL EncodeCdmaSmsParamTeleservice(int teleservice_id, ParamTeleserv_t *ParamTeleserv)
+{
+       BOOL ret = FALSE;
+
+       if (ParamTeleserv == NULL) {
+               printf("[EncodeCdmaSmsParamTeleservice] NULL pointer  \n");
+               return ret;
+       }
+
+       switch (teleservice_id) {
+               case TELESERVICEID_CPT95:
+               case TELESERVICEID_CMT95:
+               case TELESERVICEID_VMN95:
+               case TELESERVICEID_WAP:
+                       ret = TRUE;
+                       break;
+
+               default:
+                       ret = FALSE;
+       }
+
+       if (ret == TRUE) {
+               ParamTeleserv->param_id = PARAMID_TELESERVICE_ID;
+               ParamTeleserv->param_len = 2;
+               ParamTeleserv->teleserv_id = teleservice_id;
+       }
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamDestAddress(int NumberPlan, char *diallingNum, ParamAddress_t *ParamAddr)
+{
+       int length = 0;
+
+       if (ParamAddr == NULL || diallingNum == NULL) {
+               printf("[EncodeCdmaSmsParamAddress] NULL pointer  \n");
+               return FALSE;
+       }
+
+       length = strlen(diallingNum); //remove CR
+
+       ParamAddr->param_id = PARAMID_ADDRESS;
+       ParamAddr->len = length;
+       ParamAddr->digit = DIGITMODE_4BITDTMF;
+       ParamAddr->num = NUMMODE_NONE_DATANETWORK;
+       ParamAddr->numtype = NUMBER_TYPE_UNKNOWN;
+       ParamAddr->numplan = NumberPlan;
+
+       strncpy((char *) ParamAddr->CHARi, diallingNum, length);
+
+       length += 5;
+       ParamAddr->param_len = length;
+
+       return TRUE;
+}
+
+BOOL EncodeCdmaSmsParamCallbackAddress(int NumberPlan, char *diallingNum, ParamCallback_t *ParamCallback)
+{
+       int length = 0;
+
+       if (ParamCallback == NULL || diallingNum == NULL) {
+               printf("[EncodeCdmaSmsParamAddress] NULL pointer  \n");
+               return FALSE;
+       }
+
+       length = strlen(diallingNum); //remove CR
+
+       ParamCallback->param_id = PARAMID_CALLBACK;
+       ParamCallback->digit = DIGITMODE_4BITDTMF;
+       ParamCallback->numtype = NUMBER_TYPE_UNKNOWN;
+       ParamCallback->numplan = NumberPlan;
+       ParamCallback->len = length;
+       strncpy((char *) ParamCallback->CHARi, diallingNum, length);
+
+       length += 4;
+       ParamCallback->param_len = length;
+
+       return TRUE;
+}
+
+BOOL EncodeCdmaSmsParamMsgId(int type, ParamMsgId_t *ParamMsg)
+{
+       BOOL ret = FALSE;
+
+       if (ParamMsg == NULL) {
+               printf("[EncodeCdmaSmsParamMsgId] NULL pointer  \n");
+               return ret;
+       }
+
+       ParamMsg->param_id = PARAMID_MESSAGE_ID;
+       ParamMsg->param_len = 3;
+       ParamMsg->type = type;
+       ParamMsg->msg_id = SmsMsgId++;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamUserData(char *SendTxt, ParamUserData_t *ParamUser)
+{
+       BOOL ret = FALSE;
+       int length = 0;
+
+       if (ParamUser == NULL || SendTxt == NULL) {
+               printf("[EncodeCdmaSmsParamUserData] NULL pointer  \n");
+               return ret;
+       }
+
+       length = strlen(SendTxt);
+
+       ParamUser->param_id = PARAMID_USER_DATA;
+       ParamUser->encoding = MSGENCODING_7BIT_ASCII;
+       strncpy((char *) ParamUser->CHARi, SendTxt, length);
+
+       ParamUser->len = length;
+       length += 2;
+       ;
+       ParamUser->param_len = length;
+
+       ret = TRUE;
+
+       return ret;
+}
+////////////////////
+
+void EncodeCdmaSmsSubmitTpdu(char *diallingNum, int dialNumLen, char *msgTxt, int msg_len)
+{
+       ParamTeleserv_t ParamTeleserv = { 0, };
+       ParamAddress_t ParamAddr = { 0, };
+       ParamCallback_t Paramcallback = { 0, };
+       ParamMsgId_t ParamMsg = { 0, };
+       ParamUserData_t ParamUser = { 0, };
+       int i;
+       char CallbackNum[] = "1117908499";
+
+       printf("EncodeCdmaSmsSubmitTpdu Func Enter\n");
+
+       memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+       pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT;
+       EncodeCdmaSmsParamTeleservice(TELESERVICEID_CMT95, &ParamTeleserv);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+       memcpy(&pDataPackage->MsgData.OutSubmit.TeleService, &ParamTeleserv.teleserv_id, sizeof(unsigned short));
+       printf("teleservice at TEST APP=%x\n", pDataPackage->MsgData.OutSubmit.TeleService);
+
+       diallingNum[dialNumLen] = '\0';
+       EncodeCdmaSmsParamDestAddress(NUMBER_PLAN_TELEPHONY, diallingNum, &ParamAddr);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_ADDRESS_MASK;
+       pDataPackage->MsgData.OutSubmit.DstAddr.Digit = ParamAddr.digit;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberMode = ParamAddr.num;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberType = ParamAddr.numtype;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberPlan = ParamAddr.numplan;
+       pDataPackage->MsgData.OutSubmit.DstAddr.szAddrLength = ParamAddr.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.DstAddr.szAddress, ParamAddr.CHARi, ParamAddr.len);
+
+       EncodeCdmaSmsParamMsgId(MESSAGETYPE_SUBMIT, &ParamMsg);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK;
+       pDataPackage->MsgData.OutSubmit.MsgId = ParamMsg.type;
+       pDataPackage->MsgType = ParamMsg.type;
+
+       EncodeCdmaSmsParamCallbackAddress(NUMBER_PLAN_UNKNOWN, CallbackNum, &Paramcallback);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_CALLBACK_MASK;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.Digit = Paramcallback.digit;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.NumberType = Paramcallback.numtype;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.NumberPlan = Paramcallback.numplan;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.szAddrLength = Paramcallback.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.CallBackNumber.szAddress, Paramcallback.CHARi, Paramcallback.len);
+
+       msgTxt[msg_len - 1] = '\0';
+       EncodeCdmaSmsParamUserData(msgTxt, &ParamUser);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_USER_DATA_MASK;
+       pDataPackage->MsgData.OutSubmit.MsgEncoding = ParamUser.encoding;
+       pDataPackage->MsgData.OutSubmit.MsgLength = ParamUser.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.szData, ParamUser.CHARi, ParamUser.len);
+
+       printf("\n=============== Test App Message =================\n");
+       printf("0000: ");
+       for (i = 0; i < sizeof(TelSmsMsgInfo_t); i++) {
+               printf("[%2x] ", *(((unsigned char *) pDataPackage) + i));
+               if ((i+1)%32 == 0) {
+                       printf("\n%04x: ", i+1);
+               }
+       }
+       printf("\n==============================================\n");
+}
+
+void PrepareCDMAMessage()
+{
+       int msg_len = 0;
+       char buf[512];
+       char message[512];
+       char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       int diallingNum_len = 0;
+
+       memset(buf, 0, sizeof(buf));
+       memset(diallingNum, 0, sizeof(diallingNum));
+       memset(message, 0, sizeof(message));
+
+       strcpy(message, "This is a test message");
+       strncpy(diallingNum, RECEIPIENT, TAPI_NETTEXT_ADDRESS_LEN_MAX);
+
+       diallingNum_len = strlen(diallingNum);
+       printf("dialling num %s and dialling num len is %d\n", diallingNum, diallingNum_len);
+       diallingNum[diallingNum_len] = 0;
+       diallingNum_len = diallingNum_len - 1;
+
+       msg_len = strlen(message);
+
+       printf("==========================\n");
+       printf("To :%s\n", diallingNum);
+       printf("Message: %s\nMsg Length:%d\n", message, msg_len);
+       printf("Dialling number Length : %d\n", diallingNum_len);
+       printf("==========================\n");
+
+       EncodeCdmaSmsSubmitTpdu(diallingNum, diallingNum_len, message, msg_len);
+}
+
+/**
+ * @brief This tests tel_send_sms_msg() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_01
+ * @param [in] pDataPackage   = valid
+ * @param [in] bMoreMsgToSend = FALSE
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_send_sms_msg_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       PrepareCDMAMessage();
+       returnStatus = tel_send_sms_msg(pDataPackage, 0, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_send_sms_msg_01 pass\n");
+       else
+               printf("utc_tel_send_sms_msg_01 fail\n");
+
+       printf("\n");
+       return;
+}
+
+void utc_tel_send_sms_msg_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = FALSE;
+       int pRequestId = -1;
+
+       returnStatus = tel_send_sms_msg(NULL, bMoreMsgToSend, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_msg_02 pass\n");
+       else
+               printf("utc_tel_send_sms_msg_02 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms_msg() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_03
+ * @param [in]  pDataPackage = valid
+ * @param [in]  bMoreMsgToSend = FALSE
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_send_sms_msg_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = FALSE;
+
+       returnStatus = tel_send_sms_msg(pDataPackage, bMoreMsgToSend, NULL);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_send_sms_msg_03 pass\n");
+       else
+               printf("utc_tel_send_sms_msg_03 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_send_sms() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SEND_SMS_04
+ * @param [in] pDataPackage   = valid
+ * @param [in] bMoreMsgToSend = TRUE
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_send_sms_msg_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TS_BOOL bMoreMsgToSend = TRUE;
+       int pRequestId = -1;
+
+       PrepareCDMAMessage();
+       returnStatus = tel_send_sms_msg(pDataPackage, bMoreMsgToSend, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_send_sms_msg_04 pass\n");
+       else
+               printf("utc_tel_send_sms_msg_04 fail\n");
+
+       printf("\n");
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.h b/TC/telephony_TC/sms/unit/uts_tel_send_sms_msg.h
new file mode 100644 (file)
index 0000000..7952f7a
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SEND_SMS_MSG_H_
+#define _UTS_TEL_SEND_SMS_MSG_H_
+
+static void utc_tel_send_sms_msg_01();
+static void utc_tel_send_sms_msg_02();
+static void utc_tel_send_sms_msg_03();
+static void utc_tel_send_sms_msg_04();
+
+#define MAXLENGTH_SMS_ADDRESS 20
+#define MAXLENGTH_SMS_USER_DATA 160
+#define TELESERVICEID_CMT95 0x1002
+#define NUMBER_PLAN_TELEPHONY 0x01
+#define NUMBER_PLAN_UNKNOWN  0
+#define MESSAGETYPE_SUBMIT 2
+
+/* Common TELESERVICE ID's */
+#define TELESERVICEID_CPT95                            0x1001  /* 4097 : Paging */
+#define TELESERVICEID_CMT95                            0x1002  /* 4098 : Text Message */
+#define TELESERVICEID_VMN95                            0x1003  /* 4099 : Voice Mail Notification */
+#define TELESERVICEID_WAP                              0x1004  /* WAP Message */
+
+/* DIGIT MODE : CHARi[] filed°¡ 4bit dtmf codeÀÎÁö 8bit codeÀÎÁöžŠ ÀǹÌÇÑŽÙ.
+*/
+#define DIGITMODE_4BITDTMF                     0x00
+#define DIGITMODE_8BITCODE                     0x01
+
+/* NUMBER MODE
+*/
+#define NUMMODE_NONE_DATANETWORK       0x00    /* in ANSI TI.607 */
+#define NUMMODE_DATANETWORK                    0x01
+
+/* MESSAGE_ENCODING
+*/
+#define MSGENCODING_UNSPECIFIED                                                0x00    /* OCTET */
+#define MSGENCODING_IS91_EXTENDED_PROTOCOL                     0x01    /* */
+#define MSGENCODING_7BIT_ASCII                                         0x02    /* */
+#define MSGENCODING_IA5                                                                0x03    /* */
+#define MSGENCODING_UNICODE                                                    0x04    /* */
+#define MSGENCODING_SHIFT_JIS                                          0x05    /* */
+#define MSGENCODING_KSC5601                                                    0x06    /* Korean */
+#define MSGENCODING_HEBREW                                                     0x07    /* ISO_8859_8 */
+#define MSGENCODING_LATIN                                                      0x08    /* ISO_8859_1 */
+#define MSGENCODING_KSC5601_3PCS                                       0x10    /* Korean Standard */
+
+
+/* NUMBER TYPE
+*/
+/* The following are used when number mode is not data network address.
+*/
+#define NUMBER_TYPE_UNKNOWN                    0x00
+#define NUMBER_TYPE_INTERNATIONAL      0x01
+#define NUMBER_TYPE_NATIONAL           0x02
+#define NUMBER_TYPE_NETWORK                    0x03
+#define NUMBER_TYPE_SUBSCRIBER         0x04
+#define NUMBER_TYPE_RESERVED_5         0x05
+#define NUMBER_TYPE_ABREVIATED         0x06
+#define NUMBER_TYPE_RESERVED_7         0x07
+
+//=============================================================
+#define PARAMID_TELESERVICE_ID                 0x01    /* Teleservice Identifier */
+#define PARAMID_SERVICE_CATEGORY               0x02    /* Broadcast Service Category */
+#define PARAMID_ADDRESS                                        0x03    /* Address */
+#define PARAMID_SUBADDRESS                             0x04    /* Subaddress */
+#define PARAMID_BEARER_REPLY                   0x05    /* Bearer Reply Option */
+#define PARAMID_CAUSE_CODES                            0x06    /* Cause Codes */
+#define PARAMID_MESSAGE_ID                             0x07    /* Message Identifier */
+#define PARAMID_USER_DATA                              0x08    /* User Data */
+#define PARAMID_USER_RESPONSE_CODE             0x09    /* User Response Code */
+#define PARAMID_MC_TIME_STAMP                  0x0A    /* Message Center Time Stamp */
+#define PARAMID_VALIDITY_PERIOD_ABS            0x0B    /* Validity Period - Absolute */
+#define PARAMID_VALIDITY_PERIOD_REL            0x0C    /* Validiry Period - Relative */
+#define PARAMID_DEFERRED_DELIVERY_ABS  0x0D    /* Deferred Delivery Time - Absolute */
+#define PARAMID_DEFERRED_DELIVERY_REL  0x0E    /* Deferred Delivery Time - Relative */
+#define PARAMID_PRIORITY                               0x0F    /* Priority Indicator */
+#define PARAMID_PRIVACY                                        0x10    /* Privacy Indicator */
+#define PARAMID_REPLY_OPTION                   0x11    /* Reply Option */
+#define PARAMID_NUMBER_OF_MESSAGE              0x12    /* Number of Messages : Voice Mail Count */
+#define PARAMID_ALERT_ON_DELIVERY              0x13    /* Alert on Message Delivery */
+#define PARAMID_LANGUAGE                               0x14    /* Langauge Indicator */
+#define PARAMID_CALLBACK                               0x15    /* Call Back Number */
+#define PARAMID_DISPLAY_MODE                   0x16    /* Display Mode */
+#define PARAMID_MULTI_ENCODING_USER_DATA       0x17    /* Multiply Encoding User Data */
+#define PARAMID_MEMORY_INDEX                   0x18    /* Memory address stored in Phone Memory */
+#define PARAMID_BEARER_DATA                            0x19    /* Bearer data - raw data  */
+
+typedef struct {
+       TS_UINT8 param_id;
+       TS_UINT8 param_len;
+       TS_UINT16 teleserv_id;
+} ParamTeleserv_t;
+
+typedef struct {
+       TS_UINT8 param_id;
+       TS_UINT8 param_len;
+       TS_UINT8 digit;
+       TS_UINT8 num;
+       TS_UINT8 numtype;
+       TS_UINT8 numplan;
+       TS_UINT8 len;
+       TS_UINT8 CHARi[MAXLENGTH_SMS_ADDRESS];
+} ParamAddress_t;
+
+typedef struct {
+       TS_UINT8 param_id;
+       TS_UINT8 param_len;
+       TS_UINT8 type;
+       TS_UINT16 msg_id;
+} ParamMsgId_t;
+
+typedef struct {
+       TS_UINT8 param_id;
+       TS_UINT8 param_len;
+       TS_UINT8 encoding;
+       TS_UINT8 len;
+       TS_UINT8 CHARi[MAXLENGTH_SMS_USER_DATA];
+} ParamUserData_t;
+
+typedef struct {
+       TS_UINT8 param_id;
+       TS_UINT8 param_len;
+       TS_UINT8 digit;
+       TS_UINT8 numtype;
+       TS_UINT8 numplan;
+       TS_UINT8 len;
+       TS_UINT8 CHARi[MAXLENGTH_SMS_ADDRESS];
+} ParamCallback_t;
+
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.c
new file mode 100644 (file)
index 0000000..276094b
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_cb_config.h"
+
+/* Initialize TCM data structures */
+
+TelSmsCbConfig_t *pCBConfig;
+unsigned int subscription_id;
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sms_cb_config_01, 1},
+       {utc_tel_set_sms_cb_config_02, 2},
+       {utc_tel_set_sms_cb_config_03, 3},
+       {utc_tel_set_sms_cb_config_04, 4},
+       {utc_tel_set_sms_cb_config_05, 5},
+       {NULL, 0}
+};
+
+
+static TapiResult_t gStartupSuccess;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       pCBConfig = (TelSmsCbConfig_t *) malloc(sizeof(TelSmsCbConfig_t));
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       free(pCBConfig);
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests tel_set_sms_cb_config() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_SET_CONFIG_01
+ * @param [in] pCBConfig
+ * @code
+ pCBConfig->bCBEnabled = TRUE;
+ pCBConfig->SelectedId = 0x01;
+ pCBConfig->MsgIdCount = 0x04;
+ pCBConfig->MsgIDs[0] = 0x03;
+ pCBConfig->MsgIDs[1] = 0x0c;
+ pCBConfig->MsgIDs[2] = 0x0d;
+ pCBConfig->MsgIDs[3] = 0x0f;
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_cb_config_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId;
+       pCBConfig->bCBEnabled = TRUE;
+       pCBConfig->SelectedId = 0x01;
+       pCBConfig->MsgIdCount = 0x04;
+
+       pCBConfig->MsgIDs[0] = 0x03;
+       pCBConfig->MsgIDs[1] = 0x0c;
+       pCBConfig->MsgIDs[2] = 0x0d;
+       pCBConfig->MsgIDs[3] = 0x0f;
+
+       /* Calling TAPI SMS  SET CB CONFIG API */
+       returnStatus = tel_set_sms_cb_config(pCBConfig, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_cb_config_01 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_cb_config() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_SET_CONFIG_02
+ * @param [in] pCBConfig
+ * @code
+ pCBConfig->bCBEnabled = TRUE;
+ pCBConfig->SelectedId = 0x02;
+ pCBConfig->MsgIdCount = 0x04;
+ pCBConfig->MsgIDs[0] = 0x0c;
+ pCBConfig->MsgIDs[1] = 0x0d;
+ pCBConfig->MsgIDs[2] = 0x0f;
+ pCBConfig->MsgIDs[3] = 0x00;
+ * @endcode
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_cb_config_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       pCBConfig->bCBEnabled = TRUE;
+       pCBConfig->SelectedId = 0x02;
+       pCBConfig->MsgIdCount = 0x04;
+
+       pCBConfig->MsgIDs[0] = 0x0c;
+       pCBConfig->MsgIDs[1] = 0x0d;
+       pCBConfig->MsgIDs[2] = 0x0f;
+       pCBConfig->MsgIDs[3] = 0x00;
+
+       /* Calling TAPI SMS  SET CB CONFIG API */
+       returnStatus = tel_set_sms_cb_config(pCBConfig, NULL);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_cb_config_02 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_cb_config() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_SET_CONFIG_03
+ * @param [in]  pCBConfig  = NULL
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_cb_config_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId;
+
+       /* Calling TAPI SMS  SET CB CONFIG API */
+       returnStatus = tel_set_sms_cb_config(NULL, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_cb_config_03 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_cb_config() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_SET_CONFIG_04
+ * @param [in]  pCBConfig  = NULL
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_cb_config_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       /* Calling TAPI SMS  SET CB CONFIG API */
+       returnStatus = tel_set_sms_cb_config(NULL, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_cb_config_04 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_cb_config() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SMS_CB_SET_CONFIG_05
+ * @param [in] pCBConfig
+ * @code
+ pCBConfig->bCBEnabled = TRUE;
+ pCBConfig->SelectedId = -1;
+ pCBConfig->MsgIdCount = -1;
+
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_cb_config_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId;
+
+       pCBConfig->bCBEnabled = TRUE;
+       pCBConfig->SelectedId = -1;
+       pCBConfig->MsgIdCount = -1;
+
+       pCBConfig->MsgIDs[0] = 0x0c;
+       pCBConfig->MsgIDs[1] = 0x00;
+       pCBConfig->MsgIDs[2] = 0x0d;
+       pCBConfig->MsgIDs[3] = 0x0f;
+
+       /* Calling TAPI SMS  SET CB CONFIG API */
+       returnStatus = tel_set_sms_cb_config(pCBConfig, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_cb_config_05 pass\n");
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_cb_config.h
new file mode 100644 (file)
index 0000000..30e47db
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SET_SMS_CB_CONFIG_H_
+#define _UTS_TEL_SET_SMS_CB_CONFIG_H_
+
+static void utc_tel_set_sms_cb_config_01();
+
+static void utc_tel_set_sms_cb_config_02();
+
+static void utc_tel_set_sms_cb_config_03();
+
+static void utc_tel_set_sms_cb_config_04();
+
+static void utc_tel_set_sms_cb_config_05();
+
+#endif
+
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.c
new file mode 100644 (file)
index 0000000..34e466e
--- /dev/null
@@ -0,0 +1,240 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_memory_status.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sms_memory_status_01, 1},
+       {utc_tel_set_sms_memory_status_02, 2},
+       {utc_tel_set_sms_memory_status_03, 3},
+       {utc_tel_set_sms_memory_status_04, 4},
+       {utc_tel_set_sms_memory_status_05, 5},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       //      G_MAIN_CLOSE();
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_memory_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_MEMORY_STATUS_01
+ * @param [in]  memory_status = TAPI_NETTEXT_MEMORY_STATUS_AVAILABLE
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_memory_status_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MEMORY STATUS API */
+
+       returnStatus = tel_set_sms_memory_status(TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_memory_status_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_memory_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_MEMORY_STATUS_02
+ * @param [in]  memory_status = TAPI_NETTEXT_MEMORY_STATUS_FULL
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_memory_status_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MEMORY STATUS API */
+
+       returnStatus = tel_set_sms_memory_status(TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_memory_status_02 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_memory_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MEMORY_STATUS_03
+ * @param [in]  memory_status = TAPI_NETTEXT_MEMORY_STATUS_AVAILABLE - 1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_memory_status_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MEMORY STATUS API */
+
+       returnStatus = tel_set_sms_memory_status(TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE - 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_memory_status_03 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_memory_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MEMORY_STATUS_04
+ * @param [in]  memory_status = TAPI_NETTEXT_MEMORY_STATUS_FULL + 1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_memory_status_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       returnStatus = tel_set_sms_memory_status(TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL + 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_memory_status_04 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_memory_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MEMORY_STATUS_05
+ * @param [in]  memory_status = TAPI_NETTEXT_MEMORY_STATUS_FULL
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_memory_status_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       returnStatus = tel_set_sms_memory_status(TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_memory_status_05 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_memory_status.h
new file mode 100644 (file)
index 0000000..4b825cb
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SET_SMS_MEMORY_STATUS_H_
+#define _UTS_TEL_SET_SMS_MEMORY_STATUS_H_
+
+static void utc_tel_set_sms_memory_status_01();
+
+static void utc_tel_set_sms_memory_status_02();
+
+static void utc_tel_set_sms_memory_status_03();
+
+static void utc_tel_set_sms_memory_status_04();
+
+static void utc_tel_set_sms_memory_status_05();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.c
new file mode 100644 (file)
index 0000000..02b3e02
--- /dev/null
@@ -0,0 +1,335 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_message_status.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sms_message_status_01, 1},
+       {utc_tel_set_sms_message_status_02, 2},
+       {utc_tel_set_sms_message_status_03, 3},
+       {utc_tel_set_sms_message_status_04, 4},
+       {utc_tel_set_sms_message_status_05, 5},
+       {utc_tel_set_sms_message_status_06, 6},
+       {utc_tel_set_sms_message_status_07, 7},
+       {utc_tel_set_sms_message_status_08, 8},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_01
+ * @param [in] Index     = 0
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_READ
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_message_status_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(0, TAPI_NETTEXT_STATUS_READ, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_message_status_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_02
+ * @param [in]  Index     = 0
+ * @param [in]  msgStatus = TAPI_NETTEXT_STATUS_UNREAD
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_message_status_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(1, TAPI_NETTEXT_STATUS_UNREAD, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_message_status_02 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_03
+ * @param [in] Index     = 1
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_SENT
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_message_status_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(1, TAPI_NETTEXT_STATUS_SENT, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_message_status_03 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_04
+ * @param [in] Index     = -1
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_UNSENT
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_message_status_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(-1, TAPI_NETTEXT_STATUS_UNSENT, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_message_status_04 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_05
+ * @param [in] Index     = 256
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_RESERVED
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_message_status_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(256, TAPI_NETTEXT_STATUS_RESERVED, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_message_status_05 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_06
+ * @param [in] Index     = 1
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_RESERVED +1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_message_status_06()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(1, TAPI_NETTEXT_STATUS_RESERVED + 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_message_status_06 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_07
+ * @param [in] Index     = 1
+ * @param [in] msgStatus = TAPI_NETTEXT_STATUS_READ - 1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_message_status_07()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(1, TAPI_NETTEXT_STATUS_READ - 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_message_status_07 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_message_status() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_MESSAGE_STATUS_08
+ * @param [in] Index       = 1
+ * @param [in] msgStatus   = TAPI_NETTEXT_STATUS_DELIVERED
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_message_status_08()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       /* CALLING TAPI SET MSG STATUS API */
+
+       returnStatus = tel_set_sms_message_status(1, TAPI_NETTEXT_STATUS_DELIVERED, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_message_status_08 pass\n");
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_message_status.h
new file mode 100644 (file)
index 0000000..58cd061
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SET_SMS_MESSAGE_STATUS_H_
+#define _UTS_TEL_SET_SMS_MESSAGE_STATUS_H_
+
+static void utc_tel_set_sms_message_status_01();
+
+static void utc_tel_set_sms_message_status_02();
+
+static void utc_tel_set_sms_message_status_03();
+
+static void utc_tel_set_sms_message_status_04();
+
+static void utc_tel_set_sms_message_status_05();
+
+static void utc_tel_set_sms_message_status_06();
+
+static void utc_tel_set_sms_message_status_07();
+
+static void utc_tel_set_sms_message_status_08();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.c
new file mode 100644 (file)
index 0000000..a446a4d
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_parameters.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {tel_set_sms_parameters_01, 1},
+       {tel_set_sms_parameters_02, 2},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests tel_set_sms_parameters() API in normal conditions
+ * @par ID:
+ * UTC_SET_SMS_PARAMS_01
+ * @param [in] smsParameters
+ * @code
+ smsParameters.RecordIndex = 0;
+ smsParameters.RecordLen = 28;
+ smsParameters.AlphaIdLen = 10;
+ smsParameters.ParamIndicator = TAPI_SIM_SMSP_TP_DEST_ADDR_PRESENT;
+ strcpy(smsParameters.TpDestAddr.szDiallingNum,DESTINATION_NUMBER);
+ smsParameters.TpDestAddr.DialNumLen=strlen(smsParameters.TpDestAddr.szDiallingNum);
+ smsParameters.TpDestAddr.Ton=TAPI_SIM_TON_NATIONAL;
+ smsParameters.TpDestAddr.Npi=TAPI_SIM_NPI_NATIONAL;
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void tel_set_sms_parameters_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId;
+       TelSmsParams_t smsParameters;
+
+       printf("****Setting SMS Parameters****\n");
+
+       smsParameters.RecordIndex = 0;
+       smsParameters.RecordLen = 28;
+       smsParameters.AlphaIdLen = 10;
+       returnStatus = tel_set_sms_parameters(&smsParameters, &pRequestId);
+       gmain_loop_for_events(5000);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("tel_set_sms_parameters_01 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_parameters() API in abnormal conditions
+ * @par ID:
+ * UTC_SET_SMS_PARAMS_02
+ * @param [in] smsParameters
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+
+void tel_set_sms_parameters_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       TelSmsParams_t smsParameters = { 0, };
+
+       printf("****Setting SMS Parameters****\n");
+
+       smsParameters.RecordIndex = 1;
+       smsParameters.RecordLen = 28;
+       returnStatus = tel_set_sms_parameters(&smsParameters, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("tel_set_sms_parameters_03 pass\n");
+
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_parameters.h
new file mode 100644 (file)
index 0000000..41e4edc
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_SET_SMS_PARAMETERS_H_
+#define _UTS_SET_SMS_PARAMETERS_H_
+
+static void tel_set_sms_parameters_01();
+static void tel_set_sms_parameters_02();
+
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.c
new file mode 100644 (file)
index 0000000..268c8c2
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_preferred_bearer.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sms_preferred_bearer_01, 1},
+       {utc_tel_set_sms_preferred_bearer_02, 2},
+       {utc_tel_set_sms_preferred_bearer_03, 3},
+       {utc_tel_set_sms_preferred_bearer_04, 4},
+       {utc_tel_set_sms_preferred_bearer_05, 5},
+       {utc_tel_set_sms_preferred_bearer_06, 6},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("after TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       //G_MAIN_CLOSE();
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_01()
+ * @param [in] BearerType = TAPI_NETTEXT_BEARER_PS_PREFERRED
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_preferred_bearer_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+       printf("SET PREFERRED BEARER TO PS MODE.\n");
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_BEARER_PS_PREFERRED, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_preferred_bearer pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_02()
+ * @param [in] BearerType = TAPI_NETTEXT_BEARER_CS_PREFERRED
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_preferred_bearer_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+       printf("SET PREFERRED BEARER TO CS MODE.\n");
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_BEARER_CS_PREFERRED, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_preferred_bearer_02 pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer_02 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_03()
+ * @param [in] BearerType = TAPI_NETTEXT_NO_PREFERRED_BEARER
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_preferred_bearer_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+       printf("SET PREFERRED BEARER to No Preferred Mode.\n");
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_NO_PREFERRED_BEARER, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_preferred_bearer_03 pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer_03 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_04()
+ * @param [in]  BearerType = TAPI_NETTEXT_NO_PREFERRED_BEARER + 1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_preferred_bearer_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+       printf("SET PREFERRED BEARER TO INVALID MODE.\n");
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_NO_PREFERRED_BEARER + 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_preferred_bearer_04 pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer_04 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_05()
+ * @param [in] BearerType = TAPI_NETTEXT_BEARER_PS_ONLY - 1
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_preferred_bearer_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       int pRequestId = -1;
+       printf("SET PREFERRED BEARER TO INVALID MODE.\n");
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_BEARER_PS_ONLY - 1, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_preferred_bearer_05 pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer_05 fail\n");
+
+       printf("\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_preferred_bearer() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_PREFERRED_BEARER_05()
+ * @param [in]  BearerType = TAPI_NETTEXT_BEARER_PS_PREFERRED
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_preferred_bearer_06()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       returnStatus = tel_set_sms_preferred_bearer(TAPI_NETTEXT_BEARER_PS_PREFERRED, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_preferred_bearer_06 pass\n");
+       else
+               printf("utc_tel_set_sms_preferred_bearer_06 fail\n");
+
+       printf("\n");
+       return;
+}
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_preferred_bearer.h
new file mode 100644 (file)
index 0000000..631b78e
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TEL_SET_SMS_PREFERRED_BEARER_H_
+#define _UTS_TEL_SET_SMS_PREFERRED_BEARER_H_
+
+static void utc_tel_set_sms_preferred_bearer_01();
+
+static void utc_tel_set_sms_preferred_bearer_02();
+
+static void utc_tel_set_sms_preferred_bearer_03();
+
+static void utc_tel_set_sms_preferred_bearer_04();
+
+static void utc_tel_set_sms_preferred_bearer_05();
+
+static void utc_tel_set_sms_preferred_bearer_06();
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.c b/TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.c
new file mode 100644 (file)
index 0000000..02d5b8c
--- /dev/null
@@ -0,0 +1,408 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include "string.h"
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <ITapiNetText.h>
+
+#include <TapiCommon.h>
+#include <gconf/gconf-client.h>
+
+#include <tet_api.h>
+#include "tet_macro.h"
+
+#include "sms_callback_util.h"
+#include "uts_tel_set_sms_sca.h"
+#include "sms_common.h"
+
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_sms_sca_01, 1},
+       {utc_tel_set_sms_sca_02, 2},
+       {utc_tel_set_sms_sca_03, 3},
+       {utc_tel_set_sms_sca_04, 4},
+       {utc_tel_set_sms_sca_05, 5},
+       {utc_tel_set_sms_sca_06, 6},
+       {NULL, 0}
+};
+
+TelSmsAddressInfo_t *pSCA;
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+/* Startup & Clean function : It is not test code, only for
+ initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       pSCA = (TelSmsAddressInfo_t*) malloc(sizeof(TelSmsAddressInfo_t));
+       memset(pSCA, 0, sizeof(pSCA));
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SET_REQUEST_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("TapiCommonRegisterEvent subscription_id is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests tel_set_sms_sca() API in normal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_01
+ * @param [in] pSCA
+ * @param [in] Index = 0
+ * @code
+ sprintf (scaNum,"%d", VALID_SCA_NUM);
+ scaNum_len = strlen(scaNum);
+ scaNum[scaNum_len] = '\0';
+ pSCA->DialNumLen = scaNum_len;
+ pSCA->Ton = SIM_TON_NATIONAL;
+ pSCA->Npi = TAPI_SIM_NPI_ISDN_TEL;
+ memcpy(pSCA->szDiallingNum,scaNum,scaNum_len);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_set_sms_sca_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char scaNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1];
+       int scaNum_len = 0;
+       int Index = 0;
+       int i = 0;
+       TS_BYTE packet[500];
+
+       sprintf(scaNum, "%s", VALID_SCA_NUM);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = '\0';
+       scaNum_len = scaNum_len - 1;
+
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+
+       Index = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+
+       printf("Index =%d\n", Index);
+
+       for (i = 0; i < Index; i++)
+               printf("[%02x]", packet[i]);
+
+       pSCA->DialNumLen = Index;
+
+       memcpy(pSCA->szDiallingNum, packet, Index);
+
+       printf("\nSET VALID SERVICE CENTER ADDRESS\n");
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(pSCA, 0, &pRequestId);
+
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_set_sms_sca_01 pass\n");
+
+       return;
+}
+
+
+/**
+ * @brief This tests tel_set_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_02
+ * @param [in] pSCA
+ * @param [in] Index = 0
+ * @code
+ sprintf (scaNum,"%d", INVALID_SCA_ADDR);
+ scaNum_len = strlen(scaNum);
+ scaNum[scaNum_len] = '\0';
+ pSCA->DialNumLen = scaNum_len;
+ pSCA->Ton = SIM_TON_NATIONAL;
+ pSCA->Npi = TAPI_SIM_NPI_ISDN_TEL;
+ memcpy(pSCA->szDiallingNum,scaNum,scaNum_len);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_sca_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       int scaNum_len = 0;
+       int Index = 0;
+       int i = 0;
+       TS_BYTE packet[500];
+
+       sprintf(scaNum, "%s", INVALID_SCA_ADDR);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = '\0';
+       scaNum_len = scaNum_len - 1;
+
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+
+       Index = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+
+       printf("Index =%d\n", Index);
+
+       for (i = 0; i < Index; i++)
+               printf("[%02x]", packet[i]);
+
+       pSCA->DialNumLen = Index;
+
+       memcpy(pSCA->szDiallingNum, packet, Index);
+
+       printf("\nSET INVALID SERVICE CENTER ADDRESS\n");
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(pSCA, Index, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       if (Index != 0) {
+               TET_CHECK(returnStatus == TAPI_API_NOT_SUPPORTED);
+               if (returnStatus == TAPI_API_NOT_SUPPORTED)
+                       printf("utc_tel_set_sms_sca_02 pass\n");
+       }
+       else {
+               TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+               if (returnStatus == TAPI_API_SUCCESS)
+                       printf("utc_tel_set_sms_sca_02 pass\n");
+       }
+       return;
+
+}
+
+/**
+ * @brief This tests tel_set_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_03()
+ * @param [in] pSCA
+ * @param [in] Index = 0
+ * @code
+ sprintf (scaNum,"%d", VALID_SCA_NUM);
+ scaNum_len = strlen(scaNum);
+ scaNum[scaNum_len] = '\0';
+ pSCA->DialNumLen = -1;
+ pSCA->Ton = SIM_TON_NATIONAL;
+ pSCA->Npi = TAPI_SIM_NPI_ISDN_TEL;
+ memcpy(pSCA->szDiallingNum,scaNum,scaNum_len);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_set_sms_sca_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       int scaNum_len = 0;
+       int Index = 0;
+       int i = 0;
+       TS_BYTE packet[500];
+
+       sprintf(scaNum, "%s", VALID_SCA_NUM);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = '\0';
+       scaNum_len = scaNum_len - 1;
+
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+
+       Index = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+
+       printf("Index =%d\n", Index);
+
+       for (i = 0; i < Index; i++)
+               printf("[%02x]", packet[i]);
+
+       pSCA->DialNumLen = -1;
+
+       memcpy(pSCA->szDiallingNum, packet, Index);
+
+       printf("\nSET INVALID SERVICE CENTER ADDRESS LENGTH\n");
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(pSCA, Index, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_set_sms_sca_03 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_04()
+ * @param [in] pSCA
+ * @param [in] Index = 0
+ * @code
+ sprintf (scaNum,"%d", VALID_SCA_NUM);
+ scaNum_len = strlen(scaNum);
+ scaNum[scaNum_len] = '\0';
+ pSCA->DialNumLen = -1;
+ pSCA->Ton = SIM_TON_NATIONAL;
+ pSCA->Npi = TAPI_SIM_NPI_ISDN_TEL;
+ memcpy(pSCA->szDiallingNum,scaNum,scaNum_len);
+ * @endcode
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_sca_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       //int  pRequestId = -1;
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       int scaNum_len = 0;
+       int Index = 0;
+
+       sprintf(scaNum, "%s", VALID_SCA_NUM);
+       scaNum_len = strlen(scaNum); //shlee, temporary divide the length by 2
+       scaNum[scaNum_len] = '\0';
+
+       pSCA->DialNumLen = scaNum_len;
+       pSCA->Ton = SIM_TON_NATIONAL;
+       pSCA->Npi = TAPI_SIM_NPI_ISDN_TEL;
+
+       memcpy(pSCA->szDiallingNum, scaNum, scaNum_len);
+
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(pSCA, Index, NULL);
+       printf("The return value is %d\n", returnStatus);
+       //printf ("The pRequestId value is %d\n",pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_sca_04 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_05()
+ * @param [in] pSCA  = NULL
+ * @param [in] Index = 0
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_set_sms_sca_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       int Index = 0;
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(NULL, Index, &pRequestId);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_sca_05 pass\n");
+
+       return;
+}
+
+/**
+ * @brief This tests tel_set_sms_sca() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_SET_SERV_CENTER_ADDR_06()
+ * @param [in] pSCA  = NULL
+ * @param [in] Index = 0
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+
+void utc_tel_set_sms_sca_06()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int Index = 0;
+       /* Calling TAPI SMS SET SCA API */
+       returnStatus = tel_set_sms_sca(NULL, Index, NULL);
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_set_sms_sca_06 pass\n");
+
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.h b/TC/telephony_TC/sms/unit/uts_tel_set_sms_sca.h
new file mode 100644 (file)
index 0000000..1519e84
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_SET_SERV_ADDR_H_
+#define _UTS_SET_SERV_ADDR_H_
+
+#define INVALID_SCA_ADDR "919910010000"
+
+static void utc_tel_set_sms_sca_01();
+
+static void utc_tel_set_sms_sca_02();
+
+static void utc_tel_set_sms_sca_03();
+
+static void utc_tel_set_sms_sca_04();
+
+static void utc_tel_set_sms_sca_05();
+
+static void utc_tel_set_sms_sca_06();
+
+
+#endif
diff --git a/TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.c b/TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.c
new file mode 100644 (file)
index 0000000..933ae53
--- /dev/null
@@ -0,0 +1,360 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include "string.h"
+#include <malloc.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+#include <ITapiNetText.h>
+#include <tet_api.h>
+#include "tet_macro.h"
+
+
+#include "TapiCommon.h"
+#include <gconf/gconf-client.h>
+
+#include "sms_callback_util.h"
+#include "uts_tel_write_sms_in_sim.h"
+
+
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_write_sms_in_sim_01, 1},
+       {utc_tel_write_sms_in_sim_02, 2},
+       {utc_tel_write_sms_in_sim_03, 3},
+       {utc_tel_write_sms_in_sim_04, 4},
+       {utc_tel_write_sms_in_sim_05, 5},
+       {utc_tel_write_sms_in_sim_06, 6},
+       {utc_tel_write_sms_in_sim_07, 7},
+       {NULL, 0}
+};
+
+static TapiResult_t gStartupSuccess;
+unsigned int subscription_id;
+
+void alarm_received(int sgi)
+{
+       gAsyncResult = FALSE;
+       printf("Signal [SIGALARM] Received. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+}
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = tel_init();
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("tel_init() Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       gStartupSuccess = tel_register_event(TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF, &subscription_id, tapi_sms_callback, NULL);
+
+       if (gStartupSuccess != TAPI_API_SUCCESS) {
+               printf("TapiCommonRegisterEvent Failed gStartupSuccess = %d \n", gStartupSuccess);
+       }
+       else {
+               tel_register_app_name("org.samsung.test");
+               if (tel_get_app_name(&dname))
+                       printf("Dbus Get app name error\n");
+               else
+                       printf("Dbus Name is %s\n", dname.name);
+
+               tel_check_service_ready(&bStatus);
+               printf("Telephony service  %d\n", bStatus);
+
+               printf("TapiCommonRegisterEvent subscription_id1 is %d gStartupSuccess is %d\n", subscription_id, gStartupSuccess);
+       }
+}
+
+static void cleanup()
+{
+
+       if (gStartupSuccess == TAPI_API_SUCCESS)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in normal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_01
+ * @param [in] MsgStatus    = TAPI_NETTEXT_STATUS_READ
+ * @param [in] pDataPackage
+ * @code
+ pDataPackage->SimIndex = 0;
+ pDataPackage->MsgLength = pdu_len;
+ memcpy(pDataPackage->szData, pPDU, pDataPackage->MsgLength);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_SUCCESS
+ */
+void utc_tel_write_sms_in_sim_01()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char *scaNum = "8210911111";
+       char *pPDU = "This is a Test SMS";
+       int pdu_len = strlen(pPDU);
+       TelSmsData_t WriteData;
+
+       memset(&WriteData, 0, sizeof(TelSmsData_t));
+       memcpy(WriteData.SmsData.Sca, scaNum, strlen(scaNum));
+       WriteData.SmsData.MsgLength = pdu_len;
+       memcpy(WriteData.SmsData.szData, pPDU, pdu_len);
+       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_READ;
+
+       returnStatus = tel_write_sms_in_sim(&WriteData, &pRequestId);
+
+       gmain_loop_for_events(5000);
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_write_sms_in_sim_01 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_02
+ * @param [in] MsgStatus   = TAPI_NETTEXT_STATUS_READ - 1
+ * @param [in] pDataPackage
+ * @code
+ pDataPackage->SimIndex = 2;
+ pDataPackage->MsgLength = pdu_len;
+ memcpy(pDataPackage->szData, pPDU, pDataPackage->MsgLength);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_write_sms_in_sim_02()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char *scaNum = "8210911111";
+       char *pPDU = "This is a Test SMS";
+       int pdu_len = strlen(pPDU);
+
+       TelSmsData_t WriteData;
+
+       memset(&WriteData, 0, sizeof(TelSmsData_t));
+       memcpy(WriteData.SmsData.Sca, scaNum, strlen(scaNum));
+       WriteData.SmsData.MsgLength = pdu_len;
+       memcpy(WriteData.SmsData.szData, pPDU, pdu_len);
+       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_READ - 1;
+
+       returnStatus = tel_write_sms_in_sim(&WriteData, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_write_sms_in_sim_02 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_03
+ * @param [in] MsgStatus   = TAPI_NETTEXT_STATUS_RESERVED + 1
+ * @param [in] pDataPackage
+ * @code
+ pDataPackage->SimIndex = 0;
+ pDataPackage->MsgLength = pdu_len;
+ memcpy(pDataPackage->szData, pPDU, pDataPackage->MsgLength);
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_write_sms_in_sim_03()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       char *scaNum = "8210911111";
+       char *pPDU = "This is a Test SMS";
+       int pdu_len = strlen(pPDU);
+
+       TelSmsData_t WriteData;
+
+       memset(&WriteData, 0, sizeof(TelSmsData_t));
+       memcpy(WriteData.SmsData.Sca, scaNum, strlen(scaNum));
+       WriteData.SmsData.MsgLength = pdu_len;
+       memcpy(WriteData.SmsData.szData, pPDU, pdu_len);
+       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_RESERVED + 1;
+
+       returnStatus = tel_write_sms_in_sim(&WriteData, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);
+       if (returnStatus == TAPI_API_INVALID_INPUT)
+               printf("utc_tel_write_sms_in_sim_03 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in normal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_04
+ * @param [in] MsgStatus   = TAPI_NETTEXT_STATUS_SENT
+ * @param [in] pDataPackage
+ * @code
+ pDataPackage->SimIndex = 1;
+ pDataPackage->MsgLength = pdu_len;
+ memcpy(pDataPackage->szData, pPDU, pDataPackage->MsgLength);
+ memcpy(pDataPackage->pSCA, pSCA, strlen(pSCA));
+ * @endcode
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_INPUT
+ */
+void utc_tel_write_sms_in_sim_04()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       char *scaNum = "8210911111";
+       char *pPDU = "This is a Test SMS";
+       int pdu_len = strlen(pPDU);
+
+       TelSmsData_t WriteData;
+
+       memset(&WriteData, 0, sizeof(TelSmsData_t));
+       memcpy(WriteData.SmsData.Sca, scaNum, strlen(scaNum));
+       WriteData.SmsData.MsgLength = pdu_len;
+       memcpy(WriteData.SmsData.szData, pPDU, pdu_len);
+       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_SENT;
+
+       returnStatus = tel_write_sms_in_sim(&WriteData, &pRequestId);
+       gmain_loop_for_events(5000);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);
+       if (returnStatus == TAPI_API_SUCCESS)
+               printf("utc_tel_write_sms_in_sim_04 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_05
+ * @param [in] MsgStatus    = TAPI_NETTEXT_STATUS_READ
+ * @param [in] pDataPackage = NULL
+ * @param [out] pRequestId
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_write_sms_in_sim_05()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+
+       returnStatus = tel_write_sms_in_sim(NULL, &pRequestId);
+
+       printf("The return value is %d\n", returnStatus);
+       printf("The pRequestId value is %d\n", pRequestId);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_write_sms_in_sim_05 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_06
+ * @param [in] MsgStatus   = TAPI_NETTEXT_STATUS_READ
+ * @param [in] pDataPackage
+ * @param [out] pRequestId = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_write_sms_in_sim_06()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+       char *scaNum = "8210911111";
+       char *pPDU = "This is a Test SMS";
+       int pdu_len = strlen(pPDU);
+
+       TelSmsData_t WriteData;
+
+       memset(&WriteData, 0, sizeof(TelSmsData_t));
+       memcpy(WriteData.SmsData.Sca, scaNum, strlen(scaNum));
+       WriteData.SmsData.MsgLength = pdu_len;
+       memcpy(WriteData.SmsData.szData, pPDU, pdu_len);
+       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_SENT;
+
+       returnStatus = tel_write_sms_in_sim(&WriteData, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_write_sms_in_sim_06 pass\n");
+       return;
+}
+
+/**
+ * @brief This tests tel_write_sms_in_sim() API in abnormal conditions
+ * @par ID:
+ * UTC_TEL_WRITE_SMS_07
+ * @param [in] MsgStatus    = TAPI_NETTEXT_STATUS_READ
+ * @param [in] pDataPackage = NULL
+ * @param [out] pRequestId  = NULL
+ * @return TAPI_API_INVALID_PTR
+ */
+void utc_tel_write_sms_in_sim_07()
+{
+       TapiResult_t returnStatus = TAPI_API_SUCCESS;
+
+       returnStatus = tel_write_sms_in_sim(NULL, NULL);
+
+       printf("The return value is %d\n", returnStatus);
+
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);
+       if (returnStatus == TAPI_API_INVALID_PTR)
+               printf("utc_tel_write_sms_in_sim_07 pass\n");
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.h b/TC/telephony_TC/sms/unit/uts_tel_write_sms_in_sim.h
new file mode 100644 (file)
index 0000000..716edff
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_WRITE_SMS_IN_SIM_H_
+#define _UTS_WRITE_SMS_IN_SIM_H_
+
+static void utc_tel_write_sms_in_sim_01();
+
+static void utc_tel_write_sms_in_sim_02();
+
+static void utc_tel_write_sms_in_sim_03();
+
+static void utc_tel_write_sms_in_sim_04();
+
+static void utc_tel_write_sms_in_sim_05();
+
+static void utc_tel_write_sms_in_sim_06();
+
+static void utc_tel_write_sms_in_sim_07();
+
+#endif
diff --git a/TC/telephony_TC/sound/unit/async_util.c b/TC/telephony_TC/sound/unit/async_util.c
new file mode 100644 (file)
index 0000000..0b5bdbc
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "sound_callback_util.h"
+#include "async_util.h"
+
+static void G_MAIN_TIMER_HANDLER(int sgi);
+
+// Global variable for G_MAIN system
+static int gEventHandle=0;
+static GMainLoop * context_loop = NULL;
+static EvtAlarmCb gpAlarm_Handler = NULL;
+static unsigned int gSubscription_id;
+
+void G_MAIN_LOOP_CLOSE()
+{
+    g_main_loop_quit(context_loop);
+}
+
+void G_MAIN_TIMER_HANDLER(int sgi)
+{
+    if (gpAlarm_Handler)
+       gpAlarm_Handler(sgi);
+    else
+    {
+       fprintf(stderr, "SIGALRM received. But user handler not registered. Close g_main_loop()");
+       G_MAIN_LOOP_CLOSE();
+    }
+}
+
+void G_MAIN_LOOP_RUN(int sec)
+{
+    (void) signal(SIGALRM, G_MAIN_TIMER_HANDLER);
+    alarm(sec);
+    context_loop = g_main_loop_new(NULL, FALSE);
+    g_main_loop_run(context_loop);
+    alarm(0);
+}
diff --git a/TC/telephony_TC/sound/unit/async_util.h b/TC/telephony_TC/sound/unit/async_util.h
new file mode 100644 (file)
index 0000000..d60d2d5
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _ASYNC_UTIL_H_
+#define _ASYNC_UTIL_H_
+
+#include <TelCall.h>
+
+typedef void (*EvtAlarmCb) (int sgi);
+TS_BOOL gAsyncResult;
+void G_MAIN_LOOP_RUN(int sec);
+void G_MAIN_LOOP_CLOSE();
+
+#endif //_ASYNC_UTIL_H_
diff --git a/TC/telephony_TC/sound/unit/makefile b/TC/telephony_TC/sound/unit/makefile
new file mode 100644 (file)
index 0000000..170109a
--- /dev/null
@@ -0,0 +1,41 @@
+CC=gcc -Wall
+
+TS1  =  uts_tel_get_sound_volume_info
+TS2  =  uts_tel_set_sound_volume_info
+TS3  =  uts_tel_set_sound_path
+TS4  =  uts_tel_set_sound_mute_status
+TS5  =  uts_tel_get_sound_mute_status
+#TS6  =  uts_tel_control_sound_voice_recording
+#TS7  =  uts_tel_set_sound_loopback
+#TS8  =  uts_tel_set_sound_clock
+
+LIBS  = `pkg-config --libs  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi
+       
+INCS  =  -I. `pkg-config --cflags  glib-2.0 gconf-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`
+INCS  += -I$(TET_ROOT)/inc/tet3 
+
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER 
+CC +=$(CFLAGS)
+LDFLAGS = $(LIBS)
+
+#ifeq ($(ARCH),target)
+#CC += -g -mabi=aapcs-linux
+#endif
+
+all : $(TS1) $(TS2) $(TS3) $(TS4) $(TS5)
+
+clean :
+       rm -rf *~ *.o tet_lock tet_captured $(TS1)  $(TS2) $(TS3) $(TS4) $(TS5)
+
+$(TS1): $(TS1).c
+       $(CC) -o $(TS1) $(TS1).c sound_callback_util.c  $(LDFLAGS)
+$(TS2): $(TS2).c
+       $(CC) -o $(TS2) $(TS2).c sound_callback_util.c  $(LDFLAGS)
+$(TS3): $(TS3).c
+       $(CC) -o $(TS3) $(TS3).c sound_callback_util.c  $(LDFLAGS)
+$(TS4): $(TS4).c
+       $(CC) -o $(TS4) $(TS4).c sound_callback_util.c  $(LDFLAGS)
+$(TS5): $(TS5).c
+       $(CC) -o $(TS5) $(TS5).c sound_callback_util.c  $(LDFLAGS)
diff --git a/TC/telephony_TC/sound/unit/sound_callback_util.c b/TC/telephony_TC/sound/unit/sound_callback_util.c
new file mode 100644 (file)
index 0000000..a661b71
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "sound_callback_util.h"
+
+static unsigned int subscription_id[7];
+GMainLoop *main_loop = NULL;
+
+int  app_sound_callback (const TelTapiEvent_t * TapiEvent)
+{
+
+       int     eventClass;
+       int     eventType;
+       int                             requestId;
+       int                             status;
+       void                    *EventData = NULL;
+
+       eventClass = TapiEvent->EventClass;
+       eventType = TapiEvent->EventType;
+       requestId = TapiEvent->RequestId;
+       status = TapiEvent->Status;
+       EventData = TapiEvent->pData;
+
+       printf("\nClass:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if( EventData==NULL)
+       {\r
+               printf("\n******  EventData is NULL.........   ******\n");\r
+       }\r
+\r
+       switch(eventClass)\r
+       {\r
+                       case TAPI_EVENT_CLASS_SOUND:\r
+                               switch(eventType)\r
+                               {\r
+                                       case TAPI_EVENT_SOUND_VOLUMECTRL_RSP :\r
+                                               printf("***  TAPI_EVENT_SOUND_VOLUMECTRL_RSP received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       //case TAPI_EVENT_SOUND_MICGAINCTRL_RSP:\r
+                                       //      printf("*** TAPI_EVENT_SOUND_MICGAINCTRL_RSP received  : %x ****\n", eventType);\r
+                                       //      break;\r
+\r
+                                       case TAPI_EVENT_SOUND_MICMUTECTRL_RSP:\r
+                                               printf("***  TAPI_EVENT_SOUND_MICMUTECTRL_RSP received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       case TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI:\r
+                                               printf("***  TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       case TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI:\r
+                                               printf("***  TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI received : %x ****\n", eventType);\r
+                                               break;\r
+\r
+                                       case TAPI_EVENT_SOUND_ERROR_IND:\r
+                                               printf("***  TAPI_EVENT_SOUND_ERROR_IND received : %x ****\n", eventType);\r
+                                               break;\r
+                                       //case TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP:\r
+                                       //      printf("***  TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP received : %x ****\n", eventType);\r
+                                       //      break;\r
+                                       default:\r
+                                               printf("***  Default Event  %x ****\n", eventType);\r
+                                               break;\r
+\r
+                               }\r
+\r
+                               break;\r
+\r
+                       default:\r
+                               printf("*** Other TAPI EVENT received : class : %x ****\n", eventClass);\r
+                               break;\r
+       }
+       return 0;
+}
+
+gboolean TimeOutFun (void *data)\r
+{
+       g_main_loop_quit (main_loop);
+       printf ("Exit from this callback\n");
+       return FALSE;
+}
+
+int gmain_loop_for_tapi_events(int delay)
+{
+       main_loop = g_main_loop_new (NULL, FALSE);
+       g_timeout_add (delay, TimeOutFun, NULL);
+       g_main_loop_run (main_loop);
+
+       return 0;
+}
+
+void print_all_subsciption_ids()
+{
+       int i=0;
+       for(i=0;i<7;i++)
+       {
+               printf("\n subscription_id[%d] has value %d \n",i,subscription_id[i]);
+       }
+}
+\r
+TapiResult_t register_all_events()
+{
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       api_err = tel_register_event(TAPI_EVENT_SOUND_VOLUMECTRL_RSP, &subscription_id[0], (TelAppCallback)&app_sound_callback,NULL);
+
+       //api_err = tel_register_event(TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP, &subscription_id[1], (TelAppCallback)&app_sound_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_SOUND_ERROR_IND, &subscription_id[2], (TelAppCallback)&app_sound_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI, &subscription_id[3],(TelAppCallback)&app_sound_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI, &subscription_id[4],(TelAppCallback) &app_sound_callback,NULL);
+       api_err = tel_register_event(TAPI_EVENT_SOUND_MICMUTECTRL_RSP, &subscription_id[5],(TelAppCallback) &app_sound_callback,NULL);
+//     api_err = tel_register_event(TAPI_EVENT_SOUND_MICGAINCTRL_RSP, &subscription_id[6], (TelAppCallback)&app_sound_callback,NULL);\r
+       print_all_subsciption_ids();
+       return 0;
+}
+\r
+TapiResult_t deregister_all()\r
+{
+       tel_deregister_event(subscription_id[0]);
+       tel_deregister_event(subscription_id[1]);
+       tel_deregister_event(subscription_id[2]);
+       tel_deregister_event(subscription_id[3]);
+       tel_deregister_event(subscription_id[4]);
+       tel_deregister_event(subscription_id[5]);
+       tel_deregister_event(subscription_id[6]);
+       return 0;\r
+}\r
diff --git a/TC/telephony_TC/sound/unit/sound_callback_util.h b/TC/telephony_TC/sound/unit/sound_callback_util.h
new file mode 100644 (file)
index 0000000..7d3f781
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef _SOUND_CALLBACK_UTIL_H_\r
+#define _SOUND_CALLBACK_UTIL_H_\r
+\r
+\r
+#include <stdlib.h>\r
+#include <signal.h>\r
+#include <errno.h>\r
+#include "string.h"\r
+#include "assert.h"\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <fcntl.h>\r
+#include <unistd.h>\r
+#include <glib.h>\r
+#include <pthread.h>\r
+#include <stdio.h>\r
+\r
+#include <ITapiSound.h>\r
+#include <tet_api.h>\r
+#include "tet_macro.h"\r
+#include <gconf/gconf-client.h>\r
+#include <ITapiCall.h>\r
+#include <TapiCommon.h>\r
+#include <TelErr.h>\r
+\r
+\r
+#define TIME_DELAY 5000\r
+\r
+extern int app_sound_callback (const TelTapiEvent_t * TapiEvent);\r
+\r
+extern TapiResult_t register_all_events();\r
+extern  TapiResult_t deregister_all();\r
+void print_all_subsciption_ids();\r
+extern int gmain_loop_for_tapi_events(int delay);\r
+extern gboolean TimeOutFun (void *data);\r
+\r
+#endif //_SOUND_CALLBACK_UTIL_H_
diff --git a/TC/telephony_TC/sound/unit/tet_macro.h b/TC/telephony_TC/sound/unit/tet_macro.h
new file mode 100644 (file)
index 0000000..89744c0
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#ifndef TET_MACRO_H\r
+#define TET_MACRO_H\r
+\r
+#define TET_CHECK(x) if(x) tet_result(TET_PASS); else tet_result(TET_FAIL)\r
+#define TET_CHECK_EQUAL(x,y) if ((x)==(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)\r
+#define TET_CHECK_NOT_EQUAL(x,y) if ((x)!=(y)) tet_result(TET_PASS);  else tet_result(TET_FAIL)\r
+\r
+#define TET_CHECK_MESSAGE(x,y) if ((y)==(TRUE)) tet_result(TET_PASS); else {tet_result(TET_FAIL); tet_printf(x);}\r
+#define TET_CHECK_EQUAL_MESSAGE(x,y,z) if ((y)==(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}\r
+#define TET_CHECK_NOT_EQUAL_MESSAGE(x,y,z) if ((y)!=(z)) tet_result(TET_PASS);  else {tet_result(TET_FAIL); tet_printf(x);}\r
+\r
+#endif\r
+\r
diff --git a/TC/telephony_TC/sound/unit/tslist b/TC/telephony_TC/sound/unit/tslist
new file mode 100644 (file)
index 0000000..c129d13
--- /dev/null
@@ -0,0 +1,5 @@
+/sound/unit/uts_tel_get_sound_mute_status
+/sound/unit/uts_tel_set_sound_mute_status
+/sound/unit/uts_tel_set_sound_path
+/sound/unit/uts_tel_get_sound_volume_info
+/sound/unit/uts_tel_set_sound_volume_info
diff --git a/TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.c b/TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.c
new file mode 100644 (file)
index 0000000..8a23dda
--- /dev/null
@@ -0,0 +1,268 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  MMS\r
+*/\r
+\r
+/**\r
+* @ingroup     SOUND\r
+* @addtogroup  UTS_TEL_CONTROL_SOUND_VOICE_RECORDING Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_CONTROL_SOUND_VOICE_RECORDING Unit\r
+* @addtogroup  UTS_TEL_CONTROL_SOUND_VOICE_RECORDING_ Uts_Tel_Control_Sound_Voice_Recording\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_control_sound_voice_recording.c\r
+* @brief This is a suit of unit test cases to test tel_control_sound_voice_recording() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2008.09.08\r
+*/\r
+\r
+#include "uts_tel_control_sound_voice_recording.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+\r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+       \r
+       register_all_events();\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephpny service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_control_sound_voice_recording_000, 1},\r
+       {utc_tel_control_sound_voice_recording_001, 2},\r
+       {utc_tel_control_sound_voice_recording_002, 3},\r
+       {utc_tel_control_sound_voice_recording_003, 4},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_control_sound_voice_recording_000\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_000()\r
+{\r
+\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_OFF,&pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+        {\r
+        tet_infoline("utc_tel_control_sound_voice_recording_000 pass\n");\r
+         tet_result(TET_PASS);\r
+         }\r
+          else\r
+          {\r
+           tet_infoline("utc_tel_control_sound_voice_recording_000 has failed\n");\r
+           tet_result(TET_FAIL);\r
+           }\r
+\r
+\r
+\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_control_sound_voice_recording_001\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_001()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_ON,&pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+        {\r
+        tet_infoline("utc_tel_control_sound_voice_recording_001 pass\n");\r
+         tet_result(TET_PASS);\r
+         }\r
+          else\r
+          {\r
+           tet_infoline("utc_tel_control_sound_voice_recording_001 has failed\n");\r
+           tet_result(TET_FAIL);\r
+           }\r
+\r
+\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_control_sound_voice_recording_002\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_002()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_ON + 1,&pRequestId);\r
+\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+        {\r
+        tet_infoline("utc_tel_control_sound_voice_recording_002 pass\n");\r
+         tet_result(TET_PASS);\r
+         }\r
+          else\r
+          {\r
+           tet_infoline("utc_tel_control_sound_voice_recording_002 has failed\n");\r
+           tet_result(TET_FAIL);\r
+           }\r
+\r
+\r
+}\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_control_sound_voice_recording_003\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_003()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_OFF - 1,&pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+        {\r
+        tet_infoline("utc_tel_control_sound_voice_recording_003 pass\n");\r
+         tet_result(TET_PASS);\r
+         }\r
+          else\r
+          {\r
+           tet_infoline("utc_tel_control_sound_voice_recording_003 has failed\n");\r
+           tet_result(TET_FAIL);\r
+           }\r
+\r
+}\r
+\r
+\r
+\r
+/** @} */\r
+\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.h b/TC/telephony_TC/sound/unit/uts_tel_control_sound_voice_recording.h
new file mode 100644 (file)
index 0000000..d24bb9c
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  MMS\r
+*/\r
+\r
+/**\r
+* @ingroup     SOUND\r
+* @addtogroup  UTS_TEL_CONTROL_SOUND_VOICE_RECORDING Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_CONTROL_SOUND_VOICE_RECORDING Unit\r
+* @addtogroup  UTS_TEL_CONTROL_SOUND_VOICE_RECORDING_ Uts_Tel_Control_Sound_Voice_Recording\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_control_sound_voice_recording.c\r
+* @brief This is a suit of unit test cases to test tel_control_sound_voice_recording() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2008.09.08\r
+*/\r
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_CONTROL_SOUND_VOICE_RECORDING_\r
+#define  _UTC_TEL_CONTROL_SOUND_VOICE_RECORDING_\r
+\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_000();\r
+\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_001();\r
+\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_002();\r
+\r
+\r
+\r
+void utc_tel_control_sound_voice_recording_003();\r
+\r
+\r
+\r
+#endif // _UTC_TEL_CONTROL_SOUND_VOICE_RECORDING_\r
+\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.c b/TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.c
new file mode 100644 (file)
index 0000000..90f928a
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @ingroup     TELEPHONY_FRAMEWORK_API
+* @addtogroup  MMS
+*/
+
+/**
+* @ingroup     SOUND
+* @addtogroup  UTS_TEL_GET_SOUND_MUTE_STATUS Unit
+*/
+
+/**
+* @ingroup     UTS_TEL_GET_SOUND_MUTE_STATUS Unit
+* @addtogroup  UTS_TEL_GET_SOUND_MUTE_STATUS_ Uts_Tel_Get_Sound_Mute_Status
+* @{
+*/
+
+/**
+* @file uts_tel_get_sound_mute_status.c
+* @brief This is a suit of unit test cases to test tel_get_sound_mute_status() API function
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)
+* @version Initial Creation Version 0.1
+* @date 2008.09.08
+*/
+
+#include "uts_tel_get_sound_mute_status.h"
+
+
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+
+
+static TapiResult_t gStartupSuccess;
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module */
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess =  tel_init();
+       if(gStartupSuccess != TAPI_API_SUCCESS)
+       {
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);
+       }
+               register_all_events();
+       tel_register_app_name("org.samsung.test");
+       if(tel_get_app_name(&dname))
+               printf("Dbus Get app name error\n");
+       else 
+               printf("Dbus Name is %s\n",dname.name);
+               
+       tel_check_service_ready(&bStatus);
+       printf("Telephony service  %d\n",bStatus);
+
+}
+
+static void cleanup()
+{
+       deregister_all();
+       tel_deinit();
+       return;
+
+}
+
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_sound_mute_status_000, 1},
+       {utc_tel_get_sound_mute_status_001, 2},
+       {utc_tel_get_sound_mute_status_002, 3},
+       {NULL, 0}
+};
+
+
+
+
+
+/**
+ * @brief This tests
+ * @par ID:
+ *  utc_tel_get_sound_mute_status_000
+ * @param [out]  pRequestId
+ * @code
+ * @endcode
+ * @return TapiResult_t
+*/
+
+
+void utc_tel_get_sound_mute_status_000()
+{
+
+
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tel_set_sound_mute_status(TAPI_SOUND_MIC_MUTE,&pRequestId);
+        returnStatus = tel_get_sound_mute_status(&pRequestId);
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tet_printf ("The return value is %d\n", returnStatus);
+       tet_printf ("The pRequestId value is %d\n",pRequestId);
+
+       
+       if(returnStatus == TAPI_API_SUCCESS)
+        {
+        tet_infoline("utc_tel_set_sound_mute_status_000 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_sound_mute_status_000 has failed\n");
+           tet_result(TET_FAIL);
+           }
+
+
+
+}
+
+
+/**
+ * @brief This tests
+ * @par ID:
+ *  utc_tel_get_sound_mute_status_001
+ * @param [out]  pRequestId
+ * @code
+ * @endcode
+ * @return TapiResult_t
+*/
+
+
+
+void utc_tel_get_sound_mute_status_001()
+{
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;
+       int pRequestId = -1;
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tel_set_sound_mute_status(TAPI_SOUND_MIC_UNMUTE,&pRequestId);
+        returnStatus = tel_get_sound_mute_status(&pRequestId);
+       gmain_loop_for_tapi_events(TIME_DELAY);
+       tet_printf ("The return value is %d\n", returnStatus);
+       tet_printf ("The pRequestId value is %d\n",pRequestId);
+
+       if(returnStatus == TAPI_API_SUCCESS)
+        {
+        tet_infoline("utc_tel_set_sound_mute_status_001 pass\n");
+         tet_result(TET_PASS);
+         }
+          else
+          {
+           tet_infoline("utc_tel_set_sound_mute_status_001 has failed\n");
+           tet_result(TET_FAIL);
+           }
+
+
+}
+
+
+
+
+/**
+ * @brief This tests
+ * @par ID:
+ *  utc_tel_get_sound_mute_status_002
+ * @param [out]  pRequestId
+ * @code
+ * @endcode
+ * @return TapiResult_t
+*/
+
+
+void utc_tel_get_sound_mute_status_002()
+{
+
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;
+        returnStatus = tel_get_sound_mute_status(NULL);
+       gmain_loop_for_tapi_events(TIME_DELAY);
+
+       tet_printf ("The return value is %d\n", returnStatus);
+
+       if(returnStatus == TAPI_API_INVALID_PTR)
+    {
+                tet_infoline("utc_tel_set_sound_mute_status_002 pass\n");
+         tet_result(TET_PASS);
+     }
+     else
+     {
+           tet_infoline("utc_tel_set_sound_mute_status_002 has failed\n");
+           tet_result(TET_FAIL);
+      }
+
+
+}
+
+/** @} */
+
diff --git a/TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.h b/TC/telephony_TC/sound/unit/uts_tel_get_sound_mute_status.h
new file mode 100644 (file)
index 0000000..4f6364f
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+/**\r
+* @ingroup     TELEPHONY_FRAMEWORK_API\r
+* @addtogroup  MMS\r
+*/\r
+\r
+/**\r
+* @ingroup     SOUND\r
+* @addtogroup  UTS_TEL_GET_SOUND_MUTE_STATUS Unit\r
+*/\r
+\r
+/**\r
+* @ingroup     UTS_TEL_GET_SOUND_MUTE_STATUS Unit\r
+* @addtogroup  UTS_TEL_GET_SOUND_MUTE_STATUS_ Uts_Tel_Get_Sound_Mute_Status\r
+* @{\r
+*/\r
+\r
+/**\r
+* @file uts_tel_get_sound_mute_status.h\r
+* @brief This is a suit of unit test cases to test tel_get_sound_mute_status() API function\r
+* @author Gautam Nand Sinha (gnand.sinha@samsung.com)\r
+* @version Initial Creation Version 0.1\r
+* @date 2008.09.08\r
+*/\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_GET_SOUND_MUTE_STATUS_\r
+#define  _UTC_TEL_GET_SOUND_MUTE_STATUS_\r
+\r
+\r
+\r
+void utc_tel_get_sound_mute_status_000();\r
+\r
+\r
+\r
+void utc_tel_get_sound_mute_status_001();\r
+\r
+\r
+\r
+void utc_tel_get_sound_mute_status_002();\r
+\r
+\r
+\r
+void utc_tel_get_sound_mute_status_003();
+
+void utc_tel_get_sound_mute_status_004();\r
+\r
+\r
+\r
+#endif // _UTC_TEL_GET_SOUND_MUTE_STATUS_\r
+\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.c b/TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.c
new file mode 100644 (file)
index 0000000..bc1128f
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tel_get_sound_volume_info.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       \r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_get_sound_volume_info_000, 1},\r
+       {utc_tel_get_sound_volume_info_001, 2},\r
+       {utc_tel_get_sound_volume_info_002, 3},\r
+       {utc_tel_get_sound_volume_info_003, 4},\r
+       {utc_tel_get_sound_volume_info_004, 5},\r
+       {utc_tel_get_sound_volume_info_005, 6},\r
+       {utc_tel_get_sound_volume_info_006, 7},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_000\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_get_sound_volume_info_000()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_SPK_PHONE, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_get_sound_volume_info_000 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_001\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_get_sound_volume_info_001()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_BT_VOICE, &pRequestId);\r
+\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_get_sound_volume_info_001 pass\n");\r
+\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_002\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_get_sound_volume_info_002()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_TYPE_ALL, &pRequestId);\r
+\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_get_sound_volume_info_002 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_003\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_get_sound_volume_info_003()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_VOICE - 1, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_get_sound_volume_info_003 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_004\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_get_sound_volume_info_004()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_VOICE - 1, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_get_sound_volume_info_004 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_005\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_get_sound_volume_info_005()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_TYPE_ALL + 1, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_get_sound_volume_info_005 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_GET_SOUND_VOLUME_INFO_006\r
+ * @param [in]  vol_control_type\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control_type\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_get_sound_volume_info_006()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_get_sound_volume_info(TAPI_SOUND_VOL_VOICE, NULL);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);\r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+       printf("utc_tel_get_sound_volume_info_006 pass\n");\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.h b/TC/telephony_TC/sound/unit/uts_tel_get_sound_volume_info.h
new file mode 100644 (file)
index 0000000..ccbfea7
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TAPI_GET_SOUND_VOLUME_INFO_\r
+#define  _UTC_TAPI_GET_SOUND_VOLUME_INFO_\r
+\r
+\r
+\r
+void utc_tel_get_sound_volume_info_000();\r
+\r
+\r
+\r
+void utc_tel_get_sound_volume_info_001();\r
+\r
+\r
+\r
+void utc_tel_get_sound_volume_info_002();\r
+\r
+\r
+\r
+void utc_tel_get_sound_volume_info_003();\r
+\r
+void utc_tel_get_sound_volume_info_004();\r
+\r
+void utc_tel_get_sound_volume_info_005();\r
+\r
+void utc_tel_get_sound_volume_info_006();\r
+\r
+\r
+#endif // _UTC_TAPI_GET_SOUND_VOLUME_INFO_\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.c b/TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.c
new file mode 100644 (file)
index 0000000..0ea84f8
--- /dev/null
@@ -0,0 +1,238 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tel_set_sound_clock.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       \r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+       \r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_sound_clock_000, 1},\r
+       {utc_tel_set_sound_clock_001, 2},\r
+       {utc_tel_set_sound_clock_002, 3},\r
+       {utc_tel_set_sound_clock_003, 4},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_CLOCK_000\r
+ * @param [in]  vc_clock\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_clock\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_clock_000()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_set_sound_clock(1, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+        {\r
+         tet_printf("utc_tel_set_sound_clock_000 pass\n");\r
+          tet_result(TET_PASS);\r
+         }\r
+          else\r
+           {\r
+           tet_printf("utc_tel_set_sound_clock_000 has failed\n");\r
+            tet_result(TET_FAIL);\r
+           }\r
+          \r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_CLOCK_001\r
+ * @param [in]  vc_clock\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_clock\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_clock_001()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_set_sound_clock(0, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+        {\r
+         tet_printf("utc_tel_set_sound_clock_000 pass\n");\r
+          tet_result(TET_PASS);\r
+         }\r
+          else\r
+           {\r
+           tet_printf("utc_tel_set_sound_clock_000 has failed\n");\r
+            tet_result(TET_FAIL);\r
+           }\r
+          \r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_CLOCK_002\r
+ * @param [in]  vc_clock\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_clock\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_clock_002()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_set_sound_clock(0, NULL);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+        {\r
+         tet_printf("utc_tel_set_sound_clock_003 pass\n");\r
+          tet_result(TET_PASS);\r
+         }\r
+          else\r
+           {\r
+           tet_printf("utc_tel_set_sound_clock_003 has failed\n");\r
+            tet_result(TET_FAIL);\r
+           }\r
+          \r
+}\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_CLOCK_003\r
+ * @param [in]  vc_clock\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_clock\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_clock_003()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       returnStatus = tel_set_sound_clock(1, NULL);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+        {\r
+         tet_printf("utc_tel_set_sound_clock_003 pass\n");\r
+          tet_result(TET_PASS);\r
+         }\r
+          else\r
+           {\r
+           tet_printf("utc_tel_set_sound_clock_003 has failed\n");\r
+            tet_result(TET_FAIL);\r
+           }\r
+          \r
+}\r
+\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.h b/TC/telephony_TC/sound/unit/uts_tel_set_sound_clock.h
new file mode 100644 (file)
index 0000000..eee8c6b
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_SET_SOUND_CLOCK_\r
+#define  _UTC_TEL_SET_SOUND_CLOCK_\r
+\r
+\r
+\r
+void utc_tel_set_sound_clock_000();\r
+\r
+\r
+\r
+void utc_tel_set_sound_clock_001();\r
+\r
+\r
+\r
+void utc_tel_set_sound_clock_002();\r
+\r
+\r
+\r
+void utc_tel_set_sound_clock_003();\r
+\r
+void utc_tel_set_sound_clock_004();\r
+\r
+void utc_tel_set_sound_clock_005();
+
+void utc_tel_set_sound_clock_006();\r
+\r
+\r
+#endif // _UTC_TEL_SET_SOUND_CLOCK_\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.c b/TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.c
new file mode 100644 (file)
index 0000000..aa3db5b
--- /dev/null
@@ -0,0 +1,359 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tel_set_sound_loopback.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       \r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+       \r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_sound_loopback_000, 1},\r
+       {utc_tel_set_sound_loopback_001, 2},\r
+       {utc_tel_set_sound_loopback_002, 3},\r
+       {utc_tel_set_sound_loopback_003, 4},\r
+       {utc_tel_set_sound_loopback_004, 5},\r
+       {utc_tel_set_sound_loopback_005, 6},\r
+        {utc_tel_set_sound_loopback_006, 7},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_000\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_000()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_HANDSET;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_OFF;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_000 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_000 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }     \r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_001\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_001()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_STEREO_BLUETOOTH;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_OFF;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_001 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_001 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_002\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_002()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_HEADSET_3_5PI;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_OFF;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_002 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_002 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_003\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_003()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_HANDSET;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_ON;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_003 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_003 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_004\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_004()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_STEREO_BLUETOOTH;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_ON;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       \r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_004 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_004 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_005\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+void utc_tel_set_sound_loopback_005()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_STEREO_BLUETOOTH;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_MAX + 1;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+       \r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_005 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_005 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_LOOPBACK_005\r
+ * @param [in]  vc_loopback\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_loopback\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_loopback_006()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+       TelAudioLoopbackMode_t Mode;\r
+       Mode.path = TAPI_SOUND_HEADSET_3_5PI + 1;\r
+       Mode.status =  TAPI_SOUND_AUDIO_LOOPBACK_MAX + 1;\r
+\r
+       returnStatus = tel_set_sound_loopback(Mode, &pRequestId);\r
+\r
+       tet_printf ("The return value is %d\n", returnStatus);\r
+       tet_printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_006 pass\n");\r
+               tet_result(TET_PASS);\r
+       }\r
+       else\r
+       {\r
+               tet_printf("utc_tel_set_sound_loopback_006 has failed\n");\r
+               tet_result(TET_FAIL);\r
+       }\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.h b/TC/telephony_TC/sound/unit/uts_tel_set_sound_loopback.h
new file mode 100644 (file)
index 0000000..689e3ad
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"
+#include <ITapiSound_ext.h>\r
+\r
+#ifndef  _UTC_TEL_SET_SOUND_LOOPBACK_\r
+#define  _UTC_TEL_SET_SOUND_LOOPBACK_\r
+\r
+\r
+\r
+void utc_tel_set_sound_loopback_000();\r
+\r
+\r
+\r
+void utc_tel_set_sound_loopback_001();\r
+\r
+\r
+\r
+void utc_tel_set_sound_loopback_002();\r
+\r
+\r
+\r
+void utc_tel_set_sound_loopback_003();\r
+\r
+void utc_tel_set_sound_loopback_004();\r
+\r
+void utc_tel_set_sound_loopback_005();
+
+void utc_tel_set_sound_loopback_006();\r
+\r
+\r
+#endif // _UTC_TEL_SET_SOUND_LOOPBACK_\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.c b/TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.c
new file mode 100644 (file)
index 0000000..5304295
--- /dev/null
@@ -0,0 +1,199 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+\r
+#include "uts_tel_set_sound_mute_status.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+\r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+               register_all_events();\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_sound_mute_status_000, 1},\r
+       {utc_tel_set_sound_mute_status_001, 2},\r
+       {utc_tel_set_sound_mute_status_002, 3},\r
+       {utc_tel_set_sound_mute_status_003, 4},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_set_sound_mute_status_000\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_mute_status_000()\r
+{\r
+\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_mute_status(TAPI_SOUND_MIC_MUTE,&pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_mute_status_000 pass\n");\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_set_sound_mute_status_001\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_mute_status_001()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_mute_status(TAPI_SOUND_MIC_UNMUTE,&pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_mute_status_001 pass\n");\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_set_sound_mute_status_002\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_mute_status_002()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_mute_status(TAPI_SOUND_MIC_MUTE + 1,&pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_mute_status_002 pass\n");\r
+\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  utc_tel_set_sound_mute_status_003\r
+ * @param [in]  mic_mute\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  snd_mask\r
+ * @param [out]  snd_value\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_mute_status_003()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_mute_status(TAPI_SOUND_MIC_UNMUTE - 1,&pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_mute_status_003 pass\n");\r
+\r
+}\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.h b/TC/telephony_TC/sound/unit/uts_tel_set_sound_mute_status.h
new file mode 100644 (file)
index 0000000..85822de
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_SET_SOUND_MUTE_STATUS_\r
+#define  _UTC_TEL_SET_SOUND_MUTE_STATUS_\r
+\r
+\r
+\r
+void utc_tel_set_sound_mute_status_000();\r
+\r
+\r
+\r
+void utc_tel_set_sound_mute_status_001();\r
+\r
+\r
+\r
+void utc_tel_set_sound_mute_status_002();\r
+\r
+\r
+\r
+void utc_tel_set_sound_mute_status_003();\r
+\r
+\r
+\r
+#endif // _UTC_TEL_SET_SOUND_MUTE_STATUS_\r
+\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_path.c b/TC/telephony_TC/sound/unit/uts_tel_set_sound_path.c
new file mode 100644 (file)
index 0000000..800bb23
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tel_set_sound_path.h"\r
+\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       \r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_sound_path_000, 1},\r
+       {utc_tel_set_sound_path_001, 2},\r
+       {utc_tel_set_sound_path_002, 3},\r
+       {utc_tel_set_sound_path_003, 4},\r
+       {utc_tel_set_sound_path_004, 5},\r
+       {utc_tel_set_sound_path_005, 6},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_000\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_path_000()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_HANDSET, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_path_000 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_001\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_path_001()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_STEREO_BLUETOOTH, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_path_001 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_002\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+void utc_tel_set_sound_path_002()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_HEADSET_3_5PI, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_path_002 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_003\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_path_003()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_HANDSET-1, &pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_path_003 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_004\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_path_004()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_HEADSET_3_5PI +1, &pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_path_004 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  UTC_TEL_SET_SOUND_PATH_005\r
+ * @param [in]  vc_path\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vc_path\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+void utc_tel_set_sound_path_005()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_path(TAPI_SOUND_HANDSET , NULL);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);\r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+               printf("utc_tel_set_sound_path_005 pass\n");\r
+}\r
+\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_path.h b/TC/telephony_TC/sound/unit/uts_tel_set_sound_path.h
new file mode 100644 (file)
index 0000000..b03cb5f
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_SET_SOUND_PATH_\r
+#define  _UTC_TEL_SET_SOUND_PATH_\r
+\r
+\r
+\r
+void utc_tel_set_sound_path_000();\r
+\r
+\r
+\r
+void utc_tel_set_sound_path_001();\r
+\r
+\r
+\r
+void utc_tel_set_sound_path_002();\r
+\r
+\r
+\r
+void utc_tel_set_sound_path_003();\r
+\r
+void utc_tel_set_sound_path_004();\r
+\r
+void utc_tel_set_sound_path_005();\r
+\r
+\r
+#endif // _UTC_TEL_SET_SOUND_PATH_\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.c b/TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.c
new file mode 100644 (file)
index 0000000..c64d5eb
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "uts_tel_set_sound_volume_info.h"\r
+\r
+static void startup();\r
+static void cleanup();\r
+void (*tet_startup) () = startup;\r
+void (*tet_cleanup) () = cleanup;\r
+\r
+\r
+static TapiResult_t gStartupSuccess;\r
+\r
+/* Startup & Clean function : It is not test code, only for\r
+   initialize and finalize test module */\r
+\r
+static void startup()\r
+{\r
+       tapi_dbus_connection_name dname;\r
+       int bStatus;\r
+       \r
+       gStartupSuccess =  tel_init();\r
+       if(gStartupSuccess != TAPI_API_SUCCESS)\r
+       {\r
+               printf("tel_init() Failed gStartupSuccess = %d \n",gStartupSuccess);\r
+       }\r
+\r
+       register_all_events();\r
+\r
+       tel_register_app_name("org.samsung.test");\r
+       if(tel_get_app_name(&dname))\r
+               printf("Dbus Get app name error\n");\r
+       else \r
+               printf("Dbus Name is %s\n",dname.name);\r
+               \r
+       tel_check_service_ready(&bStatus);\r
+       printf("Telephony service  %d\n",bStatus);\r
+\r
+}\r
+\r
+static void cleanup()\r
+{\r
+       deregister_all();\r
+       tel_deinit();\r
+       return;\r
+\r
+}\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       {utc_tel_set_sound_volume_info_000, 1},\r
+       {utc_tel_set_sound_volume_info_001, 2},\r
+       {utc_tel_set_sound_volume_info_002, 3},\r
+       {utc_tel_set_sound_volume_info_003, 4},\r
+       {utc_tel_set_sound_volume_info_004, 5},\r
+       {utc_tel_set_sound_volume_info_005, 6},\r
+       {utc_tel_set_sound_volume_info_006, 7},\r
+       {NULL, 0}\r
+};\r
+\r
+\r
+\r
+/**\r
+ * @brief This tests sound volume control api valid case\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_000\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_volume_info_000()\r
+{\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_MUTE;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_VOICE;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_volume_info_000 pass\n");\r
+\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_001\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_volume_info_001()\r
+{\r
+\r
+\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_6;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_HFK_KEYTONE;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_volume_info_001 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_002\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_volume_info_002()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_8;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_TYPE_ALL;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+       gmain_loop_for_tapi_events(TIME_DELAY);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_SUCCESS);\r
+       if(returnStatus == TAPI_API_SUCCESS)\r
+               printf("utc_tel_set_sound_volume_info_002 pass\n");\r
+\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_003\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_volume_info_003()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_MUTE - 1;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_TYPE_ALL;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_volume_info_003 pass\n");\r
+}\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_004\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+void utc_tel_set_sound_volume_info_004()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_MUTE;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_TYPE_ALL + 1;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_volume_info_004 pass\n");\r
+}\r
+\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_005\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_volume_info_005()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_8 + 1  ;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_VOICE  - 1;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, &pRequestId);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_INPUT);\r
+       if(returnStatus == TAPI_API_INVALID_INPUT)\r
+               printf("utc_tel_set_sound_volume_info_005 pass\n");\r
+}\r
+\r
+/**\r
+ * @brief This tests\r
+ * @par ID:\r
+ *  TEL_SET_SOUND_VOLUME_INFO_006\r
+ * @param [in]  vol_control\r
+ * @param [in]  *pRequestId\r
+ * @code\r
+ * @endcode\r
+ * @param [out]  vol_control\r
+ * @param [out]  *pRequestId\r
+ * @return TapiResult_t\r
+*/\r
+\r
+\r
+void utc_tel_set_sound_volume_info_006()\r
+{\r
+       TapiResult_t  returnStatus = TAPI_API_SUCCESS;\r
+       tapi_sound_volume_control_t vol_control;\r
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_8 + 1  ;\r
+       vol_control.vol_type = TAPI_SOUND_VOL_VOICE  - 1;\r
+\r
+       int pRequestId = -1;\r
+\r
+       returnStatus = tel_set_sound_volume_info(vol_control, NULL);\r
+\r
+       printf ("The return value is %d\n", returnStatus);\r
+       printf ("The pRequestId value is %d\n",pRequestId);\r
+\r
+       TET_CHECK(returnStatus == TAPI_API_INVALID_PTR);\r
+       if(returnStatus == TAPI_API_INVALID_PTR)\r
+               printf("utc_tel_set_sound_volume_info_006 pass\n");\r
+}\r
+\r
+\r
+/** @} */\r
diff --git a/TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.h b/TC/telephony_TC/sound/unit/uts_tel_set_sound_volume_info.h
new file mode 100644 (file)
index 0000000..ceda084
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+\r
+#include "sound_callback_util.h"\r
+\r
+#ifndef  _UTC_TEL_SET_SOUND_VOLUME_INFO_\r
+#define  _UTC_TEL_SET_SOUND_VOLUME_INFO_\r
+\r
+\r
+\r
+void utc_tel_set_sound_volume_info_000();\r
+\r
+\r
+\r
+void utc_tel_set_sound_volume_info_001();\r
+\r
+\r
+\r
+void utc_tel_set_sound_volume_info_002();\r
+\r
+\r
+\r
+void utc_tel_set_sound_volume_info_003();\r
+\r
+void utc_tel_set_sound_volume_info_004();\r
+\r
+void utc_tel_set_sound_volume_info_005();\r
+\r
+void utc_tel_set_sound_volume_info_006();\r
+\r
+\r
+\r
+#endif // _UTC_TEL_SET_SOUND_VOLUME_INFO_\r
diff --git a/TC/telephony_TC/ss/README b/TC/telephony_TC/ss/README
new file mode 100644 (file)
index 0000000..6aebe55
--- /dev/null
@@ -0,0 +1,59 @@
+=================================================================================
+*                              README                                                                          *
+=================================================================================
+
+1. The SS Test Script directory (TestCases) includes:
+
+       telephony-framework/ss
+               |-- README                                          ; This file
+               `-- Unit                                            ; contains Unit TCs
+                   |-- makefile
+                   |-- tslist
+                   `-- Unit test case source codes
+       
+
+2. The $(TEST_ROOT) directory must includes following files:
+
+       /$(TEST_ROOT)
+               |-- tet_scen
+               |-- tetbuild.cfg
+               |-- tetclean.cfg
+               |-- tetexec.cfg
+               `-- ...(elipsis)
+
+=================================================================================
+*                                  Preconditions                                *
+---------------------------------------------------------------------------------
+|  Before Testing SMS Module, you should check the following conditions         |
+=================================================================================
+
+1. Prepare a vaild SIM card.
+
+2. One target for the execution of testcases.
+
+4. Modify the mobile number
+       - ss_common.h
+       - Followings are the macro for mobile number customized as per the country.
+        - Barring password should be valid. Otherwise, it cause blocking of all barring features.
+       
+               #define BARRING_PWD     "4291"
+               #define FWD_NUM "01030018654"
+               #define OLD_PWD "4291"
+               #define NEW_PWD "4291"
+
+=================================================================================
+*                                  Change log                                   *
+=================================================================================
+1. 18-Dec-2008
+       - Initial draft.
+
+2. 6-Oct-2010
+       - Revised
+       
+=================================================================================
+*                                      NOTE                                     *
+=================================================================================
+1. In order to ensure successful working of the Test Scripts, please ensure that all of the IPKG files are installed normally.
+2. Testing SS Module can be executed under target system environment (not simulator).
+
+
diff --git a/TC/telephony_TC/ss/ss_common.h b/TC/telephony_TC/ss/ss_common.h
new file mode 100644 (file)
index 0000000..de82b66
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**********************************************
+ * Caution               
+ * If you use invalid barring password, 
+ * it can block all barring feature
+ * ********************************************/
+
+#define BARRING_PWD     "4291"
+#define FWD_NUM "01030018654"
+#define OLD_PWD "4291"
+#define NEW_PWD "4291"
+
diff --git a/TC/telephony_TC/ss/unit/makefile b/TC/telephony_TC/ss/unit/makefile
new file mode 100644 (file)
index 0000000..e3711d5
--- /dev/null
@@ -0,0 +1,81 @@
+CC=gcc -Wall\r
+\r
+LB1  = tet_tapi_util\r
+TS1  = uts_tel_change_ss_barring_password\r
+TS2  = uts_tel_get_ss_aoc_info\r
+TS3  = uts_tel_get_ss_barring_status\r
+TS4  = uts_tel_get_ss_cli_status\r
+TS5  = uts_tel_get_ss_forward_status\r
+TS6  = uts_tel_get_ss_waiting_status\r
+TS7  = uts_tel_send_ss_ussd_cancel\r
+TS8  = uts_tel_send_ss_ussd_request\r
+TS9 = uts_tel_send_ss_ussd_response\r
+TS10 = uts_tel_set_ss_barring\r
+TS11 = uts_tel_set_ss_forward\r
+#TS12 = uts_tapi_ussd_send_rsp\r
+TS12  = uts_tel_set_ss_aoc_info\r
+TS13 = uts_tel_set_ss_waiting\r
+\r
+LIBS =$(LB1).o\r
+LIBS +=`pkg-config --libs gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`\r
+LIBS +=$(TET_ROOT)/lib/tet3/tcm.o\r
+LIBS +=-L$(TET_ROOT)/lib/tet3 -lapi\r
+\r
+INCS = -I. `pkg-config --cflags gconf-2.0 glib-2.0 dbus-1 dbus-glib-1 gthread-2.0 tapi`\r
+INCS += -I$(TET_ROOT)/inc/tet3 \r
+INCS += -I../\r
+\r
+CFLAGS += $(INCS) -D__arm__ -D_ARM_TOUCH -DTELEPHONY_TIMER\r
+CC +=$(CFLAGS)\r
+LDFLAGS = $(LIBS)\r
+\r
+#ifeq ($(ARCH),target)\r
+#CC += -g -mabi=aapcs-linux\r
+#endif\r
+\r
+all : $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12)  $(TS13) \r
+\r
+clean :\r
+       rm -rf *~ *.o tet_lock tet_captured $(LB1) $(TS1) $(TS2) $(TS3) $(TS4) $(TS5) $(TS6) $(TS7) $(TS8) $(TS9) $(TS10) $(TS11) $(TS12)  $(TS13) \r
+\r
+$(LB1): $(LB1).c\r
+       $(CC) -c $(LB1).c\r
+\r
+$(TS1): $(TS1).c $(LB1)\r
+       $(CC) -o $(TS1) $(TS1).c  $(LDFLAGS)\r
+\r
+$(TS2): $(TS2).c $(LB1)\r
+       $(CC) -o $(TS2) $(TS2).c  $(LDFLAGS)\r
+\r
+$(TS3): $(TS3).c $(LB1)\r
+       $(CC) -o $(TS3) $(TS3).c  $(LDFLAGS)\r
+\r
+$(TS4): $(TS4).c $(LB1)\r
+       $(CC) -o $(TS4) $(TS4).c  $(LDFLAGS)\r
+\r
+$(TS5): $(TS5).c $(LB1)\r
+       $(CC) -o $(TS5) $(TS5).c  $(LDFLAGS)\r
+\r
+$(TS6): $(TS6).c $(LB1)\r
+       $(CC) -o $(TS6) $(TS6).c  $(LDFLAGS)\r
+\r
+$(TS7): $(TS7).c $(LB1)\r
+       $(CC) -o $(TS7) $(TS7).c  $(LDFLAGS)\r
+\r
+$(TS8): $(TS8).c $(LB1)\r
+       $(CC) -o $(TS8) $(TS8).c  $(LDFLAGS)\r
+\r
+$(TS9): $(TS9).c $(LB1)\r
+       $(CC) -o $(TS9) $(TS9).c  $(LDFLAGS)\r
+\r
+$(TS10): $(TS10).c $(LB1)\r
+       $(CC) -o $(TS10) $(TS10).c  $(LDFLAGS)\r
+\r
+$(TS11): $(TS11).c $(LB1)\r
+       $(CC) -o $(TS11) $(TS11).c  $(LDFLAGS)\r
+\r
+$(TS12): $(TS12).c $(LB1)\r
+       $(CC) -o $(TS12) $(TS12).c  $(LDFLAGS)\r
+\r
+$(TS13): $(TS13).c $(LB1)\r
+       $(CC) -o $(TS13) $(TS13).c  $(LDFLAGS)\r
diff --git a/TC/telephony_TC/ss/unit/tet_tapi_util.c b/TC/telephony_TC/ss/unit/tet_tapi_util.c
new file mode 100644 (file)
index 0000000..5d973e5
--- /dev/null
@@ -0,0 +1,439 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "tet_tapi_util.h"
+#include "glib.h"
+
+GMainLoop *nw_context_loop = NULL;
+
+void G_MAIN_LOOP_CLOSE()
+{
+       g_main_loop_quit(nw_context_loop);
+}
+
+gboolean g_timeout_callback(void * data)
+{
+       G_MAIN_LOOP_CLOSE();
+       return FALSE;
+}
+
+int G_MAIN_LOOP_RUN(int sec)
+{
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_timeout_add_seconds(sec, g_timeout_callback, NULL);
+       g_main_loop_run(nw_context_loop);
+
+       return 0;
+}
+#if 0
+#define TAPI_EVENT_CLASS_MAX TAPI_EVENT_CLASS_SAT+2
+
+
+TAPI_EventClass_String g_TAPI_event_class_string[TAPI_EVENT_CLASS_MAX] = {     /* Tapi Call Related Event Types */
+       {TAPI_EVENT_NONE,"TAPI_EVENT_NONE"},                                            /**< Event None */
+       {TAPI_EVENT_CLASS_CALL_VOICE, "TAPI_EVENT_CLASS_CALL_VOICE"},   /**<    Voice Call Event Class  */
+       {TAPI_EVENT_CLASS_CALL_DATA,"TAPI_EVENT_CLASS_CALL_DATA"},      /**<    Data Call Event Class   */
+       {TAPI_EVENT_CLASS_NETTEXT,"TAPI_EVENT_CLASS_NETTEXT"},  /**<    Nettext (SMS/CB) Event Class    */
+       {TAPI_EVENT_CLASS_NETWORK,"TAPI_EVENT_CLASS_NETWORK"},  /**<    Network Event  Class    */
+       {TAPI_EVENT_CLASS_SS,"TAPI_EVENT_CLASS_SS"},                    /**<    SS Event  Class */
+       {TAPI_EVENT_CLASS_SIM,"TAPI_EVENT_CLASS_SIM"},                  /**<    SIM Event  Class        */
+//     {TAPI_EVENT_CLASS_ERR,"TAPI_EVENT_CLASS_ERR"},                  /**<    Fatal error Event  Class        */
+//     {TAPI_EVENT_CLASS_UTIL,"TAPI_EVENT_CLASS_UTIL"},                        /**<    Utility Events  Class   */
+//     {TAPI_EVENT_CLASS_POWER,"TAPI_EVENT_CLASS_POWER"},              /**<    POWEREvents  Class      */
+//     {TAPI_EVENT_CLASS_DISPLAY,"TAPI_EVENT_CLASS_DISPLAY"},  /**<    DISPLAY Events  Class   */
+//     {TAPI_EVENT_CLASS_MISC,"TAPI_EVENT_CLASS_MISC"},                        /**<    MISC Events  Class      */
+       {TAPI_EVENT_CLASS_DATA,"TAPI_EVENT_CLASS_DATA"},                        /**<    DATA Events  Class      */
+       {TAPI_EVENT_CLASS_SOUND,"TAPI_EVENT_CLASS_SOUND"},              /**<    SOUND Events  Class     */
+       {TAPI_EVENT_CLASS_SAT,"TAPI_EVENT_CLASS_SAT"},                  /**<    SAT Events  Class       */
+//     {TAPI_EVENT_CLASS_GPS,"TAPI_EVENT_CLASS_GPS"},                  /**<GPS Events  Class   */
+//     {TAPI_EVENT_CLASS_ALL,"TAPI_EVENT_CLASS_ALL"},
+};
+
+#define TAPI_EVENT_MAX TAPI_EVENT_TYPE_MAX+1
+
+
+TAPI_Event_String g_TAPI_EventString[TAPI_EVENT_MAX] = {
+       /*      Events releated to Call -voice   */
+       {TAPI_EVENT_CALL_SETUP_CNF,"TAPI_EVENT_CLASS_CALL_VOICE"},  /**<0x0000,""},     This event indicates the Call Setup request triggred */
+       {TAPI_EVENT_CALL_ALERT_IND,"TAPI_EVENT_CALL_ALERT_IND"},                        /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_CONNECTING_IND,"TAPI_EVENT_CALL_CONNECTING_IND"},      /**<    This event indicates the Call is in Connecting stage*/
+       {TAPI_EVENT_CALL_CONNECTED_IND,"TAPI_EVENT_CALL_CONNECTED_IND"},        /**<            This event indicates the Call is Connected */
+       {TAPI_EVENT_CALL_INCOM_IND    ,"TAPI_EVENT_CALL_INCOM_IND"},            /**<            This event indicates Incoming Call indication to Application*/
+       {TAPI_EVENT_CALL_ANSWER_CNF," TAPI_EVENT_CALL_ANSWER_CNF"},             /**<    Incoming call was answered*/
+       {TAPI_EVENT_CALL_RETRIEVE_CNF,"TAPI_EVENT_CALL_RETRIEVE_CNF"},  /**<    This event indicates Call is retrieved from held state*/
+       {TAPI_EVENT_CALL_RETRIEVE_IND,"TAPI_EVENT_CALL_RETRIEVE_IND"},          /**<    This event indicates that other party has retrieved the call from hold*/
+       {TAPI_EVENT_CALL_HOLD_IND,"TAPI_EVENT_CALL_HOLD_IND"},          /**<    This event indicates that other party is has put the call on hold*/
+       {TAPI_EVENT_CALL_HOLD_CNF ," TAPI_EVENT_CALL_HOLD_CNF"},                /**<    This event indicates is call is put on hold*/
+       {TAPI_EVENT_CALL_TRANSFER_CNF,"TAPI_EVENT_CALL_TRANSFER_CNF"},  /**<    This event indicates is call is explicitly transferred*/
+       {TAPI_EVENT_CALL_TRANSFER_IND,"TAPI_EVENT_CALL_TRANSFER_IND"},  /**<    Call Transfer Indication*/
+       {TAPI_EVENT_CALL_SETUPCONFERENCE_CNF,"TAPI_EVENT_CALL_SETUPCONFERENCE_CNF"},            /**<    This event indicates that Call is joined in a conference*/
+       {TAPI_EVENT_CALL_SETUPCONFERENCE_IND,"TAPI_EVENT_CALL_SETUPCONFERENCE_IND"},            /**<    Conference setup indication*/
+       {TAPI_EVENT_CALL_SPLITCONFERENCE_CNF,"TAPI_EVENT_CALL_SPLITCONFERENCE_CNF"},            /**<    This event indicates Call is split from conference*/
+       {TAPI_EVENT_CALL_SEND_DTMF_CNF," TAPI_EVENT_CALL_SEND_DTMF_CNF"},       /**<    This event indicates the confirmation for sending DTMF Digits to the network*/
+       {TAPI_EVENT_CALL_WAITING_IND,"TAPI_EVENT_CALL_WAITING_IND"},                    /**<    Call waiting indication*/
+       {TAPI_EVENT_CALL_FORWARD_IND,"TAPI_EVENT_CALL_FORWARD_IND"},            /**<    This event indication for Call is forwarded */
+//     {TAPI_EVENT_CALL_USERINFO_IND,"TAPI_EVENT_CALL_USERINFO_IND"},          /**<    This event is indicated when User Information is exchanged during the call */
+       {TAPI_EVENT_CALL_RELEASE_CNF,"TAPI_EVENT_CALL_RELEASE_CNF"},            /**<    This event is indicated when a specific call is released requested by the application*/
+       {TAPI_EVENT_CALL_RELEASE_ALL_CNF,"TAPI_EVENT_CALL_RELEASE_ALL_CNF"},    /**<    This event is indicated when all the calls released requested by the application*/
+       {TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF,"TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF"},      /**<    This event is indicated when all the active calls released requested by the application*/
+       {TAPI_EVENT_CALL_END_IND,"TAPI_EVENT_CALL_END_IND"},                     /**<   This event indicates the Call is Ended. This event can be solicited/unsolicited.*/
+       {TAPI_EVENT_CALL_GET_LINEID_CNF," TAPI_EVENT_CALL_GET_LINEID_CNF"},     /**<    Error in Get Line ID    */
+       {TAPI_EVENT_CALL_SET_LINEID_CNF,"TAPI_EVENT_CALL_SET_LINEID_CNF"}, /**<                 Error in Set Line Id            */
+       {TAPI_EVENT_CALL_SWAP_CNF," TAPI_EVENT_CALL_SWAP_CNF"}, /**< Call Swap Confirmation */
+
+       {TAPI_EVENT_CALL_BARRING_IND,"TAPI_EVENT_CALL_BARRING_IND"},                    /**<    This event indicates the Call is Barred*/
+       {TAPI_EVENT_CALL_CUGINFO_IND,"TAPI_EVENT_CALL_CUGINFO_IND"},            /**<    This event indicates CUG information */
+       {TAPI_EVENT_CALL_AOCINFO_IND,"TAPI_EVENT_CALL_AOCINFO_IND"},    /**<    This event indicates the AOC Information*/
+//     {TAPI_EVENT_CALL_SSNOTIFY_IND,"TAPI_EVENT_CALL_SSNOTIFY_IND"},  /**<    This event indicates SS Notification*/
+       {TAPI_EVENT_CALL_CALLINGNAMEINFO_IND,"TAPI_EVENT_CALL_CALLINGNAMEINFO_IND"},    /**<    This event indicates the Calling Name Information*/
+       {TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND,"TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND"},    /**<    This event indicates the Connected Number Information*/
+       {TAPI_EVENT_CALL_CLISUPRESSIONREJ_IND,"TAPI_EVENT_CALL_CLISUPRESSIONREJ_IND"},  /**<    This event indicates the CLI Suppression Indication*/
+       {TAPI_EVENT_CALL_UNCOND_FORWARDING_IND,"TAPI_EVENT_CALL_UNCOND_FORWARDING_IND"},        /**<    This event indicates the Call is unconditionally forwarded*/
+       {TAPI_EVENT_CALL_COND_FORWARDING_IND,"TAPI_EVENT_CALL_COND_FORWARDING_IND"},    /**<    This event indicates the Call is conditionally forwarded*/
+       {TAPI_EVENT_CALL_CONNECTED_ECT_REMOTE_IND," TAPI_EVENT_CALL_CONNECTED_ECT_REMOTE_IND"}, /**<    This event indicates the ECT remote connection  */
+       {TAPI_EVENT_CALL_ON_HOLD_RELEASED_IND,"TAPI_EVENT_CALL_ON_HOLD_RELEASED_IND"},  /**<    This event indicates the Call on hold is released*/
+       {TAPI_EVENT_CALL_ALERT_ECT_REMOTE_IND," TAPI_EVENT_CALL_ALERT_ECT_REMOTE_IND"}, /**<    This event indicates the ECT remote alert*/
+       {TAPI_EVENT_CALL_SS_FORWARDED_MSG_RXED_IND,"TAPI_EVENT_CALL_SS_FORWARDED_MSG_RXED_IND"},        /**<    This event indicates that the forwarded msg has been received*/
+
+       /*      Events releated to Call         video */
+       {TAPI_EVENT_CALL_SETUP_CNF," TAPI_EVENT_DATA_SETUP_CNF"},               /**<0x0100,""}, This event indicates the Call Setup request triggred */
+       {TAPI_EVENT_CALL_ALERT_IND," TAPI_EVENT_DATA_ALERT_IND"},               /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_CONNECTED_IND,"TAPI_EVENT_DATA_CONNECTED_IND"},        /**<            This event indicates the Call is Connected */
+       {TAPI_EVENT_CALL_INCOM_IND    ,"{TAPI_EVENT_DATA_INCOM_IND"},           /**<            This event indicates Incoming Call indication to Application*/
+       {TAPI_EVENT_CALL_ANSWER_CNF,"TAPI_EVENT_DATA_ANSWER_CNF"},              /**<    Incoming call was answered*/
+       {TAPI_EVENT_CALL_FORWARD_IND," TAPI_EVENT_DATA_FORWARD_IND"},           /**<    This event indication for Call is forwarded */
+       {TAPI_EVENT_CALL_RELEASE_CNF,"TAPI_EVENT_DATA_RELEASE_CNF"},            /**<    This event is indicated when all the calls released requested by the application*/
+       {TAPI_EVENT_CALL_END_IND," TAPI_EVENT_DATA_END_IND"},                    /**<   This event indicates the Call is Ended. This event can be solicited/unsolicited.*/
+
+       {TAPI_EVENT_CALL_BARRING_IND,"TAPI_EVENT_DATA_BARRING_IND"},                    /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_AOCINFO_IND,"TAPI_EVENT_DATA_AOCINFO_IND"},    /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND," TAPI_EVENT_DATA_CONNECTEDNUMBERINFO_IND"},   /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_UNCOND_FORWARDING_IND," TAPI_EVENT_DATA_UNCOND_FORWARDING_IND"},       /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_COND_FORWARDING_IND," TAPI_EVENT_DATA_COND_FORWARDING_IND"},   /**<    This event indicates the Call is in Alerting stage*/
+       {TAPI_EVENT_CALL_CONNECTED_ECT_REMOTE_IND,"TAPI_EVENT_DATA_CONNECTED_ECT_REMOTE_IND"},  /**<    This event indicates the Call is in Alerting stage*/
+
+
+       /* Events related on Nettext Messages  */
+       {TAPI_EVENT_NETTEXT_READ_SMS_CNF,"TAPI_EVENT_CLASS_NETTEXT"},           /**<0x0200,""},         This event is returned in response to SMS Read message*/
+       {TAPI_EVENT_NETTEXT_GET_COUNT_CNF,"TAPI_EVENT_NETTEXT_GET_COUNT_CNF"},          /**<    This event is returned in response to Get Number of messages stored in SIM*/
+       {TAPI_EVENT_NETTEXT_SENTSTATUS_CNF,"TAPI_EVENT_NETTEXT_SENTSTATUS_CNF"},                /**<    This event is returned in response to SMS  message sent*/
+       {TAPI_EVENT_NETTEXT_GET_PARAM_CNF,"TAPI_EVENT_NETTEXT_GET_PARAM_CNF"},          /**<    This event is returned in response to NetText Get parameters*/
+       {TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF," TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF"}, /**<    This confirmation event is a returned indicating the delete message e status*/
+       {TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF,"TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF"},      /**<    This confirmation event is a returned indicating the Save SMS into SIM status*/
+       {TAPI_EVENT_NETTEXT_SET_REQUEST_CNF," TAPI_EVENT_NETTEXT_SET_REQUEST_CNF"},     /**<    This event is returned as a confirmation for SET nettext APIs*/
+       {TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF," TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF"},         /**<    This event is returned with Get CB configuration details*/
+       {TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF,"TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF"},  /**<    This event is returned as a response to get preferred bearer used for SMS Transport*/
+       {TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF,"TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF"},/**<  This event is returned in response to send delivery report*/
+       {TAPI_EVENT_NETTEXT_INCOM_IND,"TAPI_EVENT_NETTEXT_INCOM_IND"},                  /**<    This is an unsolicited Incoming SMS Event*/
+       {TAPI_EVENT_NETTEXT_CB_INCOM_IND,"TAPI_EVENT_NETTEXT_CB_INCOM_IND"},            /**<    This is an unsolicited Incoming cell broadcast message*/
+       {TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND,"TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND"},  /**<    This event is an unsolicited event indicating SIM memory status */
+       {TAPI_EVENT_NETTEXT_DEVICE_READY_IND,"TAPI_EVENT_NETTEXT_DEVICE_READY_IND"}, /**< Device Ready indication */
+       {TAPI_EVENT_NETTEXT_PARAM_COUNT_IND,"TAPI_EVENT_NETTEXT_PARAM_COUNT_IND"},  /**< Param count indication */
+       /* Events related on Network Messages  */
+       {TAPI_EVENT_NETWORK_GETNWBAND_CNF,"TAPI_EVENT_NETWORK_GETNWBAND_CNF"},          /**<0x0300,""}, This event indicates the Network Band has been identified and returned*/
+       {TAPI_EVENT_NETWORK_SETNWBAND_CNF,"TAPI_EVENT_NETWORK_SETNWBAND_CNF"},          /**<    This event indicates the Network Band has been set*/
+       {TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF," TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF"},   /**<    This event confirms the request to get the service domain */
+       {TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF,"TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF"},    /**<    This event confirms the request to set the service domain */
+//     {TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF,"TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF"},        /**<    This event is returned on cancellation of manual network search*/
+       {TAPI_EVENT_NETWORK_GETNWMODE_CNF," TAPI_EVENT_NETWORK_GETNWMODE_CNF"},/**<     This event is returned on getting network mode*/
+       {TAPI_EVENT_NETWORK_SETNWMODE_CNF,"TAPI_EVENT_NETWORK_SETNWMODE_CNF"},  /**<    This event is returned on setting network mode*/
+       {TAPI_EVENT_NETWORK_SELECT_CNF," TAPI_EVENT_NETWORK_SELECT_CNF"},       /**<    This confirmation event is returned when user manually selected a network from list for Network selection */
+       {TAPI_EVENT_NETWORK_SEARCH_CNF," TAPI_EVENT_NETWORK_SEARCH_CNF"},       /**<    This event is returned as confirmation for manual Network search with the available network list*/
+       {TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF,"TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF"},    /**<    This event is returned on getting network selection mode*/
+//     {TAPI_EVENT_NETWORK_GETNETWORKINFO_CNF,"TAPI_EVENT_NETWORK_GETNETWORKINFO_CNF"},        /**<    This event is returned when Get network information is requested*/
+       {TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF," TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF"},   /**<    This event indicates that the PLMN used has been identified and returned */
+       {TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF,"TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF"},    /**<    This event indicates the preferred PLMN has been set*/
+       {TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND,"TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND"},    /**<    This event indicates the LAC and CELLID has been obtained*/
+//     {TAPI_EVENT_NETWORK_IDENTITY_IND,"TAPI_EVENT_NETWORK_IDENTITY_IND"},    /**<    This event indicates the Network ID has been detected*/
+       {TAPI_EVENT_NETWORK_CHANGE_IND," TAPI_EVENT_NETWORK_CHANGE_IND"},       /**<    This event indicates there is a change in Network*/
+//     {TAPI_EVENT_NETWORK_SELECT_IND," TAPI_EVENT_NETWORK_SELECT_IND"},       /**<    This event indicates the chosen network has been selected*/
+//     {TAPI_EVENT_NETWORK_SEARCH_IND," TAPI_EVENT_NETWORK_SEARCH_IND"},       /**<    This event indicates that available networks are being searched for */
+//     {TAPI_EVENT_NETWORK_RADIO_INFO_IND," TAPI_EVENT_NETWORK_RADIO_INFO_IND"},       /**<    This event indicates the Radio Information is got*/
+//     {TAPI_EVENT_NETWORK_PLMNLIST_INFO,"TAPI_EVENT_NETWORK_PLMNLIST_INFO"},  /**<    This event indicates the list of available PLMN's is got*/
+//     {TAPI_EVENT_NETWORK_SPN_INFO,"TAPI_EVENT_NETWORK_SPN_INFO"},    /**<    This event indicates the SPN info is got*/
+//     {TAPI_EVENT_NETWORK_DISPLAYINFO_IND," TAPI_EVENT_NETWORK_DISPLAYINFO_IND"},     /**<    This event indicates the Display Information is obtained*/
+
+       /* Events Related on Supplementary services      */
+//     {TAPI_EVENT_SS_BARRING_CNF, "TAPI_EVENT_CLASS_SS"},   /**<0x0400," "},  This confirmation event is sent when Barring activation/deactivation is requested*/
+       {TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF," TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF"},   /**<  This event is returned as Barring password change confirmation*/
+       {TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF," TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF"},   /**<        This event is returned  as Barring status query confirmation*/
+       {TAPI_EVENT_SS_FORWARD_CNF," TAPI_EVENT_SS_FORWARD_CNF"},   /**<        This event is returned as confirmation for Forward Activation/Deactivation/Registration/Erasure */
+       {TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF,"TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF "},   /**<        This event is returned as confirmation for Forward Status query confirmation*/
+       {TAPI_EVENT_SS_WAITING_CNF,"TAPI_EVENT_SS_WAITING_CNF "},   /**<        This event is returned as confirmation for Call waiting activation/deactivation*/
+       {TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF,"TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF "},   /**<        This event is returned as Call waiting status query confirmation*/
+       {TAPI_EVENT_SS_USSD_CNF,"TAPI_EVENT_SS_USSD_CNF "},   /**<      This event is returned as USSD send confirmation*/
+//     {TAPI_EVENT_SS_QUERYCAPABILITY_INFO_CNF,"TAPI_EVENT_SS_QUERYCAPABILITY_INFO_CNF "},   /**<      Event associated with the interrogation of supported supplementary services at OEM.*/
+       {TAPI_EVENT_SS_USSD_IND," TAPI_EVENT_SS_USSD_IND"},   /**<      This is an unsolicited USSD indication*/
+//     {TAPI_EVENT_SS_GET_PASSWORD_IND," TAPI_EVENT_SS_GET_PASSWORD_IND"},   /**<      This event is indicated to the Application when network requests for Call barring Get password for barring operation*/
+//     {TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF,"TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF "},   /**<        This event is indicated to the Application for CLI service interrogation*/
+//     {TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY,"TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY "}, /**<  This event is indicated to the Application when tapi receives Release complete message notiification for any SS transactions*/
+//     {TAPI_EVENT_SS_ERROR_IND," TAPI_EVENT_SS_ERROR_IND"},                           /**<This event is used to indicate ss related errors sent by the network*/
+//     {TAPI_EVENT_SS_AOC_RSP," TAPI_EVENT_SS_AOC_RSP"},                               /**<This event is used to send the aoc information */
+//     {TAPI_EVENT_SS_SET_AOC_CNF,"TAPI_EVENT_SS_SET_AOC_CNF "},                       /**<This event is used to send the confirmation for setting aoc values */
+//     {TAPI_EVENT_SS_BARRING_TYPE_IND,"TAPI_EVENT_SS_BARRING_TYPE_IND "},             /**<This event is used to send the barring type while making an MO call */
+
+       /* Events Related on SIM services        */
+//     {TAPI_EVENT_SIM_FILE_INFO_CNF, "TAPI_EVENT_CLASS_SIM "},        /**<0x0500," "},          File info */
+//     {TAPI_EVENT_SIM_READ_FILE_CNF," TAPI_EVENT_SIM_READ_FILE_CNF"}, /**< Read file */
+//     {TAPI_EVENT_SIM_UPDATE_FILE_CNF," TAPI_EVENT_SIM_UPDATE_FILE_CNF"},     /**< Updated file */
+//     {TAPI_EVENT_SIM_VERIFY_PIN_CNF," TAPI_EVENT_SIM_VERIFY_PIN_CNF"},       /**< Verified Chv */
+//     {TAPI_EVENT_SIM_CHANGE_PIN_CNF,"TAPI_EVENT_SIM_CHANGE_PIN_CNF "},       /**< Changed Chv */
+//     {TAPI_EVENT_SIM_DISABLE_PIN_CNF," TAPI_EVENT_SIM_DISABLE_PIN_CNF"},     /**< Disabled Chv */
+//     {TAPI_EVENT_SIM_ENABLE_PIN_CNF,"TAPI_EVENT_SIM_ENABLE_PIN_CNF "},       /**< Enabled Chv */
+//     {TAPI_EVENT_SIM_UNBLOCK_PIN_CNF,"TAPI_EVENT_SIM_UNBLOCK_PIN_CNF "},     /**< Unblocked Chv */
+//     {TAPI_EVENT_SIM_DISABLE_FDN_CNF,"TAPI_EVENT_SIM_DISABLE_FDN_CNF "},     /**< Disabled Fdn */
+//     {TAPI_EVENT_SIM_ENABLE_FDN_CNF,"TAPI_EVENT_SIM_ENABLE_FDN_CNF "},       /**< Enabled Fdn */
+
+//     {TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF," TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF"}, /**<Phonebook storage count*/
+//     {TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF," TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF"},        /**<Phonebook entry information*/
+//     {TAPI_EVENT_SIM_PB_ACCESS_READ_CNF," TAPI_EVENT_SIM_PB_ACCESS_READ_CNF"},     /**<Phonebook access read*/
+
+//     {TAPI_EVENT_SIM_PB_UPDATE_CNF," TAPI_EVENT_SIM_PB_UPDATE_CNF"},       /**<Phonebook update result*/
+//     {TAPI_EVENT_SIM_PB_DELETE_CNF,"TAPI_EVENT_SIM_PB_DELETE_CNF "},       /**<Phonebook delete result*/
+//     {TAPI_EVENT_SIM_STATUS_IND,"TAPI_EVENT_SIM_STATUS_IND "},         /**<Unsolicited event --- whenever there is a changes in SIM status*/
+//     {TAPI_EVENT_SIM_FDN_STATUS_IND,"TAPI_EVENT_SIM_FDN_STATUS_IND "},         /**<Unsolicited event --- whenever there is a changes in FDN status */
+
+       /* Extensions */
+       {TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF,"TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF "}, /** < 3G SIM PB capability Info */
+       {TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF,"TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF "}, /**< ISIM authentication confirmation*/
+       {TAPI_EVENT_SIM_SAP_CONNECT_NOTI,"TAPI_EVENT_SIM_SAP_CONNECT_NOTI "}, /**<SAP connect notification */
+       {TAPI_EVENT_SIM_SAP_CONNECT_CNF,"TAPI_EVENT_SIM_SAP_CONNECT_CNF "}, /**< SAP connect confirmation */
+       {TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF," TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF"}, /**< SAP connection status confirmation*/
+       {TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF," TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF"}, /**< SAP transfer ATR confirmation */
+       {TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF," TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF"}, /**< SAP transfer APDU confirmation */
+       {TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF," TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF"}, /**< SAP set protocaol confirmation */
+       {TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF," TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF"}, /**< SAP set sim power confirmation */
+       {TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF," TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF"}, /**< SAP card reader status confirmation*/
+//     {TAPI_EVENT_SIM_ENABLE_PERSONALIZATION_CNF,"TAPI_EVENT_SIM_ENABLE_PERSONALIZATION_CNF "}, /**< Enable personalization confirmation*/
+//     {TAPI_EVENT_SIM_DISABLE_PERSONALIZATION_CNF," TAPI_EVENT_SIM_DISABLE_PERSONALIZATION_CNF"}, /**<Disable personalization confirmation*/
+
+       /* Error Class Events*/
+       /*      fatal Error Event*/
+       //{TAPI_EVENT_ERR,"TAPI_EVENT_CLASS_ERR "},             /**0x0600," "},   <  Fatal Error Information */
+//     {TAPI_EVENT_ERR_MODEM_OFF," TAPI_EVENT_ERR_MODEM_OFF"},
+//     {TAPI_EVENT_ERR_MODEM_RESET," TAPI_EVENT_ERR_MODEM_RESET"},
+//     {TAPI_EVENT_ERR_RESERVED1_IND ,"TAPI_EVENT_ERR_RESERVED1_IND "},        /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+//     {TAPI_EVENT_ERR_RESERVED2_IND," TAPI_EVENT_ERR_RESERVED2_IND"}, /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+//     {TAPI_EVENT_ERR_RESERVED3_IND," TAPI_EVENT_ERR_RESERVED3_IND"}, /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+//     {TAPI_EVENT_ERR_RESERVED4_IND," TAPI_EVENT_ERR_RESERVED4_IND"}, /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+//     {TAPI_EVENT_ERR_RESERVED5_IND," TAPI_EVENT_ERR_RESERVED5_IND"}, /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+
+    /* Power Module Event Types...     */
+//     {TAPI_EVENT_POWER_PHONE_OFF, "TAPI_EVENT_CLASS_POWER"},                 /**0x0800," "},  <  Modem powerd Off    */
+       /*      Display Module Event Types...   */
+//     {TAPI_EVENT_DISPLAY_ICON_INFO_IND, "TAPI_EVENT_CLASS_DISPLAY"},         /**0x0900," "}, <  Display Icon Info Indication */
+//     {TAPI_EVENT_DISPLAY_HMZ_O2_IND," TAPI_EVENT_DISPLAY_HMZ_O2_IND"},                               /**<  Home Zone Info Indication */
+
+//     {TAPI_EVENT_MISC_NITZ_GETCNF, "TAPI_EVENT_CLASS_MISC"}, /**< 0x0A00," "}, */
+//     {TAPI_EVENT_MISC_NITZ_NOTIFY,"TAPI_EVENT_MISC_NITZ_NOTIFY "},      /**<     */
+//     {TAPI_EVENT_MISC_NITZ_IND," TAPI_EVENT_MISC_NITZ_IND"},      /**<     */
+
+       /*      PACKET CALL Events      */
+       {TAPI_EVENT_PS_PDP_ACT_RSP , "API_EVENT_CLASS_DATA"},   /**< 0x0B00," "},   -  PDP activation response event */
+       {TAPI_EVENT_PS_PDP_DEACT_RSP,"TAPI_EVENT_PS_PDP_DEACT_RSP "},                           /**<      PDP deactivation response event */
+       {TAPI_EVENT_PS_PDP_DEACT_IND," TAPI_EVENT_PS_PDP_DEACT_IND"},                   /**<     PDP deactivation indication event. */
+       {TAPI_EVENT_PS_STATUS,"TAPI_EVENT_PS_STATUS "},                 /**<     PDP status event. */
+       {TAPI_EVENT_PS_CALL_STATISTICS," TAPI_EVENT_PS_CALL_STATISTICS"},               /**<     publish notification or response of the call statistics  */
+//     {TAPI_EVENT_PS_PDP_CONTEXTINFO_RSP," TAPI_EVENT_PS_PDP_CONTEXTINFO_RSP"},       /**<     */
+//     {TAPI_EVENT_PS_CALL_STATUS_RSP," TAPI_EVENT_PS_CALL_STATUS_RSP"},      /**<     */
+//     {TAPI_EVENT_PS_PDP_ADDRESS_RSP," TAPI_EVENT_PS_PDP_ADDRESS_RSP"},      /**<     */
+//     {TAPI_EVENT_PS_QOS_PROFILE_RSP,"TAPI_EVENT_PS_QOS_PROFILE_RSP "},      /**<     */
+//     {TAPI_EVENT_PS_QOS_3G_PROFILE_RSP,"TAPI_EVENT_PS_QOS_3G_PROFILE_RSP "},      /**<     */
+//     {TAPI_EVENT_PS_NETWORK_STATUS_RSP," TAPI_EVENT_PS_NETWORK_STATUS_RSP"},      /**<     */
+//     {TAPI_EVENT_PS_HSDPA_STATUS_NOTI," TAPI_EVENT_PS_HSDPA_STATUS_NOTI"},      /**<     */
+//     {TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI,"TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI "},      /**<     */
+       {TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO," TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO"},      /**<     */
+       {TAPI_EVENT_PS_ERROR_IND," TAPI_EVENT_PS_ERROR_IND"},      /**<     */
+
+       {TAPI_EVENT_SOUND_VOLUMECTRL_RSP, "TAPI_EVENT_CLASS_SOUND"},          /**<     */
+//     {TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP," TAPI_EVENT_SOUND_USRCONFIGURATIONCTRL_RSP"},      /**<     */
+       {TAPI_EVENT_SOUND_ERROR_IND," TAPI_EVENT_SOUND_ERROR_IND"},      /**<     */
+       {TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI," TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI"},      /**<     */
+       {TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI," TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI"},      /**<     */
+       {TAPI_EVENT_SOUND_MICMUTECTRL_RSP,"TAPI_EVENT_SOUND_MICMUTECTRL_RSP "},      /**<     */
+//     {TAPI_EVENT_SOUND_MICGAINCTRL_RSP,"TAPI_EVENT_SOUND_MICGAINCTRL_RSP "},      /**<     */
+
+/*SAT events*/
+//     {TAPI_EVENT_SAT_DISPLAY_TEXT_IND, "TAPI_EVENT_CLASS_SAT"},      /**< 0x0D00," "}, SAT Dsiplay Text Event*/
+//     {TAPI_EVENT_SAT_GET_INKEY_IND," TAPI_EVENT_SAT_GET_INKEY_IND"},                                       /**< SAT Get Inkey Event */
+//     {TAPI_EVENT_SAT_GET_INPUT_IND," TAPI_EVENT_SAT_GET_INPUT_IND"},                                     /**< SAT Get Input Event */
+//     {TAPI_EVENT_SAT_UI_PLAY_TONE_IND,"TAPI_EVENT_SAT_UI_PLAY_TONE_IND "},                              /**< SAT Play Tone Event for UI client*/
+//     {TAPI_EVENT_SAT_PLAY_TONE_IND ," TAPI_EVENT_SAT_PLAY_TONE_IND"},                                     /**< SAT Play Tone Event for MM client */
+  //   {TAPI_EVENT_SAT_UI_REFRESH_IND," TAPI_EVENT_SAT_UI_REFRESH_IND"},                                     /**< SAT Refresh Event for UI client*/
+//     {TAPI_EVENT_SAT_SETUP_MENU_IND," TAPI_EVENT_SAT_SETUP_MENU_IND"},                                 /**< SAT Setup Menu Event */
+//     {TAPI_EVENT_SAT_SELECT_ITEM_IND," TAPI_EVENT_SAT_SELECT_ITEM_IND"},                                   /**< SAT Select Item Event */
+//     {TAPI_EVENT_SAT_UI_SEND_SMS_IND,"TAPI_EVENT_SAT_UI_SEND_SMS_IND "},                                                /**< SAT Send SMS Event for UI client */
+//     {TAPI_EVENT_SAT_UI_SEND_SS_IND," TAPI_EVENT_SAT_UI_SEND_SS_IND"},                                  /**< SAT Send SS Event for UI client */
+//     {TAPI_EVENT_SAT_UI_SEND_USSD_IND,"TAPI_EVENT_SAT_UI_SEND_USSD_IND "},                              /**< SAT Send USSD Event for UI client */
+//     {TAPI_EVENT_SAT_UI_SETUP_CALL_IND,"TAPI_EVENT_SAT_UI_SETUP_CALL_IND "},                             /**< SAT Setup Call Event for UI client */
+//     {TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND," TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND"}, /**< SAT Provide Local Information Event*/
+//     {TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND," TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND"}, /**< SAT Setup Idle Mode Event*/
+//     {TAPI_EVENT_SAT_UI_SEND_DTMF_IND," TAPI_EVENT_SAT_UI_SEND_DTMF_IND"},         /**< SAT Send DTMF Event for UI client*/
+//     {TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND,"TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND "},      /**< SAT Language notification Event */
+//     {TAPI_EVENT_SAT_UI_LAUNCH_BROWSER_IND," TAPI_EVENT_SAT_UI_LAUNCH_BROWSER_IND"},             /**< SAT Launch Browser Event for UI client*/
+//     {TAPI_EVENT_SAT_OPEN_CHANNEL_LOCAL_LINK_IND," TAPI_EVENT_SAT_OPEN_CHANNEL_LOCAL_LINK_IND"},
+//     {TAPI_EVENT_SAT_OPEN_CHANNEL_CSB_IND,"TAPI_EVENT_SAT_OPEN_CHANNEL_CSB_IND "},
+//     {TAPI_EVENT_SAT_OPEN_CHANNEL_GPRS_IND," TAPI_EVENT_SAT_OPEN_CHANNEL_GPRS_IND"},
+//     {TAPI_EVENT_SAT_CLOSE_CHANNEL_IND," TAPI_EVENT_SAT_CLOSE_CHANNEL_IND"},
+//     {TAPI_EVENT_SAT_RECEIVE_DATA_IND," TAPI_EVENT_SAT_RECEIVE_DATA_IND"},
+//     {TAPI_EVENT_SAT_SEND_DATA_IND," TAPI_EVENT_SAT_SEND_DATA_IND"},
+//     {TAPI_EVENT_SAT_GET_CHANNEL_STATUS_IND," TAPI_EVENT_SAT_GET_CHANNEL_STATUS_IND"},
+//     {TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND," TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND"},       /**< SAT End Proactive Command Session Event. This is to indicate that Proactive UICC Session ended*/
+       {TAPI_EVENT_SAT_MENU_SELECTION_CNF,"TAPI_EVENT_SAT_MENU_SELECTION_CNF "},      /**< response from sim for menu selection request */
+       {TAPI_EVENT_SAT_CALL_CONTROL_IND," TAPI_EVENT_SAT_CALL_CONTROL_IND"},               /**< response from sim for call control by USIM. This is to indicate that the voice call/ss/ussd parameters have been modified by USIM  */
+       {TAPI_EVENT_SAT_MO_SMS_CONTROL_IND," TAPI_EVENT_SAT_MO_SMS_CONTROL_IND"},               /**< response from sim for Mo sms control bu USIM. This is to indicate that the SMS parameters have been modified by USIM */
+       {TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF,"TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF "},               /**< response from sim for event download request */
+
+       /**EVENTS SENT TO OTHER APPS**/
+       {TAPI_EVENT_SAT_SMS_REFRESH_IND," TAPI_EVENT_SAT_SMS_REFRESH_IND"},      /**< SAT Refresh Event for SMS client */
+       {TAPI_EVENT_SAT_PB_REFRESH_IND," TAPI_EVENT_SAT_PB_REFRESH_IND"},        /**< SAT Refresh Event for Phonebook client*/
+       {TAPI_EVENT_SAT_IDLE_REFRESH_IND,"TAPI_EVENT_SAT_IDLE_REFRESH_IND "}, /**< SAT Refresh Event for Idle Mode client */
+       {TAPI_EVENT_SAT_SEND_SMS_IND," TAPI_EVENT_SAT_SEND_SMS_IND"}, /**< SAT Send SMS Event for SMS client*/
+       {TAPI_EVENT_SAT_SETUP_CALL_IND," TAPI_EVENT_SAT_SETUP_CALL_IND"},        /**< SAT Setup Call Event for Call client */
+       {TAPI_EVENT_SAT_SEND_SS_IND,"TAPI_EVENT_SAT_SEND_SS_IND "},        /**< SAT Send SS Event for SS client*/
+       {TAPI_EVENT_SAT_SEND_USSD_IND," TAPI_EVENT_SAT_SEND_USSD_IND"},        /**< SAT Send SS Event for USSD client */
+       {TAPI_EVENT_SAT_SEND_DTMF_IND,"TAPI_EVENT_SAT_SEND_DTMF_IND "},      /**< SAT Send DTMF Event for UI client*/
+       {TAPI_EVENT_SAT_LAUNCH_BROWSER_IND," TAPI_EVENT_SAT_LAUNCH_BROWSER_IND"},   /**< SAT Launch Browser Event for Browser */
+       {TAPI_EVENT_SAT_END_OF_APP_EXEC_IND," TAPI_EVENT_SAT_END_OF_APP_EXEC_IND"},    /**< SAT End Proactive command Execution Event. This event will be indicated to the application to end the execution of a Proactive Command when required  */
+
+
+       //{TAPI_GPS_EVENT_START_SESSION_RESP, "TAPI_EVENT_CLASS_GPS"},          /**<0x0F00," "},        Start session response event type.              */
+       //{TAPI_GPS_EVENT_OPTION_SET_RESP,"TAPI_GPS_EVENT_OPTION_SET_RESP "},                   /**<    GPS option set response  event type.            */
+
+//     {TAPI_GPS_EVENT_CLOSE_SESSION_RESP,"TAPI_GPS_EVENT_CLOSE_SESSION_RESP "},                               /**<    Close session response event type */
+
+//     {TAPI_GPS_EVENT_AGPS_SSL_SET_RESP," TAPI_GPS_EVENT_AGPS_SSL_SET_RESP"},      /**<     */
+//     {TAPI_GPS_EVENT_AGPS_BEARER_SET_RESP," TAPI_GPS_EVENT_AGPS_BEARER_SET_RESP"},      /**<     */
+
+//     {TAPI_GPS_EVENT_AGPS_PDP_CONNECTION_IND," TAPI_GPS_EVENT_AGPS_PDP_CONNECTION_IND"},                     /**<    .               */
+
+//     {TAPI_GPS_EVENT_AGPS_SSL_GET_RESPONSE," TAPI_GPS_EVENT_AGPS_SSL_GET_RESPONSE"},      /**<     */
+
+//     {TAPI_GPS_EVENT_DEVSTATE_NOTI,"TAPI_GPS_EVENT_DEVSTATE_NOTI "},                                         /**<    Device state notification event type .          */
+//     {TAPI_GPS_EVENT_DEVSTATE_RESP," TAPI_GPS_EVENT_DEVSTATE_RESP"},                                         /**<    Device state response type.             */
+//     {TAPI_GPS_EVENT_VERIFICATION_IND," TAPI_GPS_EVENT_VERIFICATION_IND"},                                   /**<    Verification indication event type.             */
+//     {TAPI_GPS_EVENT_SUPL_NOTI,"TAPI_GPS_EVENT_SUPL_NOTI "},                                                 /**<    SUPL Notification event type .          */
+
+       /*      All please add your events if any," "}, above this one  */
+       {TAPI_EVENT_TYPE_MAX," "},/**< Event Max */
+
+       /* Events Related on Supplementary services      */
+       {TAPI_EVENT_SS_BARRING_CNF,"TAPI_EVENT_SS_BARRING_CNF"},
+       {TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF,"TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF"},
+       {TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF,"TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF"},
+       {TAPI_EVENT_SS_FORWARD_CNF,"TAPI_EVENT_SS_FORWARD_CNF"},
+       {TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF,"TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF"},
+       {TAPI_EVENT_SS_WAITING_CNF,"TAPI_EVENT_SS_WAITING_CNF"},
+       {TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF,"TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF"},
+       {TAPI_EVENT_SS_USSD_CNF,"TAPI_EVENT_SS_USSD_CNF"},
+};
+#endif
+
+#define TAPI_ERROR_MAX TAPI_API_SERVER_LAYER_FAILURE+1
+
+TAPI_Error_String g_TAPI_ErrorString[200] = {
+
+       /* #################### COMMON START ################ */
+       {TAPI_API_SUCCESS,              "TAPI_API_SUCCESS : No Error occured"},
+       {TAPI_API_INVALID_INPUT,        "TAPI_API_INVALID_INPUT : Input values are not correct in TAPI Library"},
+       {TAPI_API_INVALID_PTR,          "TAPI_API_INVALID_PTR : Invalid pointer"},
+       {TAPI_API_NOT_SUPPORTED,        "TAPI_API_NOT_SUPPORTED: The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network"},
+       {TAPI_API_DEPRICATED,           "TAPI_API_DEPRICATED : This API is deprecated and will be so in future also"},
+       {TAPI_API_SYSTEM_OUT_OF_MEM,    "TAPI_API_SYSTEM_OUT_OF_MEM : Out of memory"},
+       {TAPI_API_SYSTEM_RPC_LINK_DOWN, "TAPI_API_SYSTEM_RPC_LINK_DOWN : RPC link down"},
+       {TAPI_API_MODEM_POWERED_OFF,    "TAPI_API_MODEM_POWERED_OFF : The Modem is powered off"},
+       {TAPI_API_SERVICE_NOT_READY,    "TAPI_API_SERVICE_NOT_READY : Phone was powered on, but yet to receive the power up completed notification"},
+       {TAPI_API_SERVER_FAILURE ,      "TAPI_API_SERVER_FAILURE : error occurred in Telephony server"},
+       {TAPI_API_OEM_PLUGIN_FAILURE ,  "TAPI_API_OEM_PLUGIN_FAILURE  : Plug-in layer failure"},
+       {TAPI_API_TRANSPORT_LAYER_FAILURE, "TAPI_API_TRANSPORT_LAYER_FAILURE"},
+
+       {TAPI_API_INVALID_CALL_HANDLE,  "TAPI_API_INVALID_CALL_HANDLE : Invalid call handle"},
+       {TAPI_API_INVALID_CALL_STATE,   "TAPI_API_INVALID_CALL_STATE : Invalid call state- Newly added. Need to raise a CR for this"},
+
+       {TAPI_API_INVALID_DATA_LEN,     "TAPI_API_INVALID_DATA_LEN : Invalid data length"},
+       {TAPI_API_SIM_NOT_FOUND,        "TAPI_API_SIM_NOT_FOUND : Sim is not present / removed "},
+       {TAPI_API_SIM_BUSY,             "TAPI_API_SIM_BUSY : SIM is busy"},
+       {TAPI_API_SIM_INVALID_CARD_TYPE, "TAPI_API_SIM_INVALID_CARD_TYPE : Sim card is unknown "},
+       {TAPI_API_SIM_CARD_PERMANENT_ERROR, "TAPI_API_SIM_CARD_PERMANENT_ERROR : SIM error/blocked state"},
+       {TAPI_API_SIM_NOT_INITIALIZED,  "TAPI_API_SIM_NOT_INITIALIZED : SIM has not initialized yet (waiting for PIN verifcation, etc)"},
+       {TAPI_API_REQUEST_MAX_IN_PROGRESS, "TAPI_API_REQUEST_MAX_IN_PROGRESS : Maximum number of API Request for the same service are already in progress "},
+       {TAPI_API_OFFLINE_MODE_ERROR,   "TAPI_API_OFFLINE_MODE_ERROR : OEM Telephony Provider is in Offline mode"},
+       {TAPI_EVENT_CLASS_UNKNOWN,      "TAPI_EVENT_CLASS_UNKNOWN : Event class specified is not present in Event Class list"},
+       {TAPI_EVENT_UNKNOWN,            "TAPI_EVENT_UNKNOWN : Event specified is not present in TAPI Unsolicited Event list"},
+       {TAPI_REGISTRATION_OP_FAILED,   "TAPI_REGISTRATION_OP_FAILED : Callback Registration/De-registration failed"},
+       {TAPI_NETTEXT_SCADDRESS_NOT_SET, "TAPI_NETTEXT_SCADDRESS_NOT_SET"},
+       {TAPI_API_OPERATION_FAILED,     "TAPI_API_OPERATION_FAILED"},
+       {TAPI_API_INVALID_OPERATION,    "TAPI_API_INVALID_OPERATION"},
+};
+
+/*static char * nondefined_event_class = "Non defined event class";
+static const char* TET_EVENT_CLASS_TO_STRING(int event_class)
+{
+       int index;
+       for( index=0; g_TAPI_event_class_string[index].event_class != TAPI_EVENT_CLASS_MAX ; index++)
+       {
+               if (g_TAPI_event_class_string[index].event_class == event_class || g_TAPI_event_class_string[index].event_class == TAPI_EVENT_CLASS_MAX)
+                       return g_TAPI_event_class_string[index].string;
+       }
+       return nondefined_event_class;
+}
+
+static char * nondefined_event = "Non defined event";
+static const char* TET_EVENT_TO_STRING(int event_class)
+{
+       int index;
+       for( index=0; g_TAPI_EventString[index].event != TAPI_EVENT_MAX ; index++)
+       {
+               if (g_TAPI_EventString[index].event == event_class || g_TAPI_EventString[index].event == TAPI_EVENT_MAX)
+                       return g_TAPI_EventString[index].string;
+       }
+       return nondefined_event;
+}*/
+
+char * nondefined_err = "Non defined error code";
+const char* TET_RESULT_TO_STRING(TapiResult_t err_code)
+{
+       int index;
+       for( index=0; g_TAPI_ErrorString[index].err != TAPI_ERROR_MAX ; index++)
+       {
+               if (g_TAPI_ErrorString[index].err == err_code || g_TAPI_ErrorString[index].err == TAPI_ERROR_MAX)
+                       return g_TAPI_ErrorString[index].string;
+       }
+       return nondefined_err;
+}
+
+void  ss_utc_callback(TelTapiEvent_t *Event, void *data)
+{
+       int eventClass;
+       int eventType;
+
+       eventClass= Event->EventClass;
+       eventType= Event->EventType;
+
+       int expected_event = (int)data;
+
+       if(expected_event == data){
+               printf("expected event=%d, received=%d\n", expected_event, eventType);
+               G_MAIN_LOOP_CLOSE();
+       }       
+       
+       return;
+}
diff --git a/TC/telephony_TC/ss/unit/tet_tapi_util.h b/TC/telephony_TC/ss/unit/tet_tapi_util.h
new file mode 100644 (file)
index 0000000..7e406b4
--- /dev/null
@@ -0,0 +1,250 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TET_TAPI_UTIL_
+#define _TET_TAPI_UTIL_
+
+//#include <tapi_err.h>
+#include "TapiCommon.h"
+
+extern void G_MAIN_LOOP_CLOSE();
+extern int G_MAIN_LOOP_RUN(int);
+extern void  ss_utc_callback(TelTapiEvent_t *, void *data);
+extern const char* TET_RESULT_TO_STRING(TapiResult_t err_code);
+
+typedef enum{
+       SS_NO_RESPONSE,
+       SS_OK,
+       SS_FAIL
+} SsAsyncResponse_t;
+
+#ifndef BOOL
+    typedef int                 BOOL;
+#endif
+
+#ifndef TRUE
+#define TRUE                1
+#endif
+
+#ifndef FALSE
+#define FALSE           0
+#endif
+
+// TET_Error Code string return macro
+typedef struct {
+       TapiResult_t err;
+       char * string;
+}TAPI_Error_String;
+
+// TET_Event Code string return macro
+typedef struct {
+       int event_class;
+       char * string;
+}TAPI_EventClass_String;
+
+
+// TET_Event Code string return macro
+typedef struct {
+       int event;
+       char * string;
+}TAPI_Event_String;
+
+
+/////////////////////////////////////////////////////////////////////////
+//                      TETware Utility Function
+/////////////////////////////////////////////////////////////////////////
+
+
+// TET_STAMP ******************************************************************************
+#define TET_STAMP_START(log) \
+do {\
+       tet_printf("\n###########################################\n## %s \n## %s ", __FUNCTION__,log);\
+} while(0)
+
+#define TET_STAMP_PASS() \
+do {\
+       tet_printf("%s : pass",__FUNCTION__);\
+       tet_result(TET_PASS);\
+} while(0)
+
+#define TET_STAMP_FAIL() \
+do {\
+       tet_printf("%s : fail",__FUNCTION__);\
+       tet_result(TET_FAIL);\
+} while(0)
+
+#define TET_STAMP(result) \
+do {\
+       tet_printf("%s[%d] %s() TET_STAMP(%d)",__FILE__,__LINE__,__FUNCTION__,result); \
+       tet_result(result);\
+} while(0)
+
+// TET_RESULT Function *********************************************************************
+#define TET_RESULT_IF_EQUAL(result,x1,x2) \
+do { \
+   if ((x1) == (x2)) \
+       { \
+          tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,x2); \
+          tet_result(result); \
+          if(result==TET_PASS || result==TET_FAIL || result == TET_UNTESTED) return;\
+       } \
+ } while(0)
+
+#define TET_RESULT_IF_EQUAL_THEN_GOTO(result,label,x1,x2) \
+do { \
+   if ((x1) == (x2)) \
+       { \
+           tet_result(result); \
+           goto label; \
+       } \
+   else \
+   { \
+       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,x2); \
+   } \
+ } while(0)
+
+#define TET_RESULT_IF_NOT_EQUAL(result,x1,x2) \
+do { \
+   if ((x1) != (x2)) \
+       { \
+       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,x2); \
+          tet_result(result); \
+          if(result==TET_PASS || result==TET_FAIL || result == TET_UNTESTED) return; \
+       } \
+ } while(0)
+
+
+#define TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(result,label,x1,x2) \
+do { \
+   if ((x1) != (x2)) \
+       { \
+       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,x2); \
+          tet_result(result); \
+          tet_result(result); \
+          goto label;\
+       } \
+ } while(0)
+
+
+// TET_CHECK Macro : TAPI api return value test macro. If it is not TAPI_API_SUCCESS, tet_retult(TET_FAIL) is called
+#define TET_CHECK(x1, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+       tet_printf("[line %d] Expected Result: %d  Actual Result: %d",__LINE__, x1,x2); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+
+
+#define TET_PRECONDITION(x1, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+               tet_printf("%s[%d] %s : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_UNTESTED); \
+               return;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION2(x1, x2, y...) \
+do { \
+   TapiResult_t err = y;\
+   if ( !(err == (x1) || err == (x2))) \
+       { \
+               tet_printf("%s[%d] %s : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_UNTESTED); \
+               return;\
+       } \
+ } while(0)
+
+
+#define TET_CHECK_GOTO(x1,label, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+               tet_printf("%s[%d] %s() : test fail. error code =%x [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               goto label;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION_GOTO(x1,label, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (err != (x1)) \
+       { \
+               tet_printf("%s[%d] %s() : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_UNTESTED); \
+               goto label;\
+       } \
+ } while(0)
+
+#define TET_PRECONDITION2_GOTO(x1,x2,label, y...) \
+do { \
+   TapiResult_t err = y;\
+   if ( !(err == (x1)||err == (x2))) \
+       { \
+               tet_printf("%s[%d] %s() : Test precondition fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_UNTESTED); \
+               goto label;\
+       } \
+ } while(0)
+
+
+#define TET_CHECK2(x1,x2, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2))) \
+       { \
+               tet_printf("%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+
+#define TET_CHECK2_GOTO(x1,x2, label, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2))) \
+       { \
+               tet_printf("%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               goto label;\
+       } \
+   else tet_printf("%s[%d] %s() : test success. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+ } while(0)
+
+
+#define TET_CHECK3(x1,x2,x3, y...) \
+do { \
+   TapiResult_t err = y;\
+   if (!(err == (x1) || err == (x2) || err == (x3))) \
+       { \
+               tet_printf("%s[%d] %s() : test fail. error code =%d [%s] ",__FILE__,__LINE__,__FUNCTION__, err, TET_ERROR_TO_STRING(err) ); \
+               tet_result(TET_FAIL); \
+               return;\
+       } \
+ } while(0)
+#endif //_TET_TAPI_UTIL_
diff --git a/TC/telephony_TC/ss/unit/tslist b/TC/telephony_TC/ss/unit/tslist
new file mode 100644 (file)
index 0000000..8f06a23
--- /dev/null
@@ -0,0 +1,11 @@
+/ss/unit/uts_tel_set_ss_barring
+/ss/unit/uts_tel_get_ss_barring_status
+/ss/unit/uts_tel_change_ss_barring_password
+/ss/unit/uts_tel_set_ss_forward
+/ss/unit/uts_tel_get_ss_forward_status
+/ss/unit/uts_tel_set_ss_waiting
+/ss/unit/uts_tel_get_ss_waiting_status
+/ss/unit/uts_tel_get_ss_cli_status
+/ss/unit/uts_tel_send_ss_ussd_request
+/ss/unit/uts_tel_send_ss_ussd_response
+/ss/unit/uts_tel_send_ss_ussd_cancel
diff --git a/TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.c b/TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.c
new file mode 100644 (file)
index 0000000..91cedd8
--- /dev/null
@@ -0,0 +1,299 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "uts_tel_change_ss_barring_password.h"
+
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include <ss_common.h>
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_change_ss_barring_password_01, 1},
+       {utc_tel_change_ss_barring_password_02, 2},
+       {utc_tel_change_ss_barring_password_03, 3},
+       {utc_tel_change_ss_barring_password_04, 4},
+       {utc_tel_change_ss_barring_password_05, 5},
+       {utc_tel_change_ss_barring_password_06, 6},
+       {NULL, 0}
+};
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephpny service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiSsChangeBarPassword() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_001
+ * @param [in] oldPwd "0000"
+ * @param [in] newPwd "1111"
+* @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_change_ss_barring_password_01()
+{
+       TET_STAMP_START("Positive Test");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+
+       char *oldPwd=OLD_PWD;
+       char *newPwd=OLD_PWD;
+       char *newPwdAgain=OLD_PWD;
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, &pRequestId);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Error handling of the old password for TelTapiSsChangeBarPassword() API
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_002
+ * @param [in] oldPwd "00000"  //Long password
+ * @param [in] newPwd "1111"
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_change_ss_barring_password_02()
+{
+       TET_STAMP_START("Invalid long old password");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+       char *oldPwd="00000";
+       char *newPwd="1111";
+        char *newPwdAgain="1111";
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, &pRequestId);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Error handling of the new password for TelTapiSsChangeBarPassword() API
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_003
+ * @param [in] oldPwd "0000"
+ * @param [in] newPwd "11111"   //Long password
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_change_ss_barring_password_03()
+{
+       TET_STAMP_START("Invalid long new password");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+       char *oldPwd="0000";
+       char *newPwd="11111";
+       char *newPwdAgain="11111";
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, &pRequestId);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the old password for TelTapiSsChangeBarPassword() API
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_004
+ * @param [in] oldPwd NULL
+ * @param [in] newPwd "1111"
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_change_ss_barring_password_04()
+{
+       TET_STAMP_START("Null old password");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+       char *oldPwd=NULL;
+       char *newPwd="1111";
+       char *newPwdAgain="1111";
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, &pRequestId);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the new password for TelTapiSsChangeBarPassword() API
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_005
+ * @param [in] oldPwd "0000"
+ * @param [in] newPwd NULL
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_change_ss_barring_password_05()
+{
+       TET_STAMP_START("Null new password");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+       char *oldPwd="0000";
+       char *newPwd=NULL;
+       char *newPwdAgain=NULL;
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, &pRequestId);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the request ID for TelTapiSsChangeBarPassword() API
+ * @par ID:
+ * UTC_TAPI_SS_CHANGE_BAR_PASSWORD_006
+ * @param [in] oldPwd "0000"
+ * @param [in] newPwd "1111"
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_change_ss_barring_password_06()
+{
+       TET_STAMP_START("Null RequstId");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       char *oldPwd="0000";
+       char *newPwd="1111";
+        char *newPwdAgain="1111";
+
+       ret_status = tel_change_ss_barring_password(oldPwd,newPwd,newPwdAgain, NULL);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+
+/** @} */
diff --git a/TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.h b/TC/telephony_TC/ss/unit/uts_tel_change_ss_barring_password.h
new file mode 100644 (file)
index 0000000..0f0d1cc
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SS_CHANGE_BAR_PASSWORD_H_
+#define _UTS_TAPI_SS_CHANGE_BAR_PASSWORD_H_
+
+static void utc_tel_change_ss_barring_password_01();
+static void utc_tel_change_ss_barring_password_02();
+static void utc_tel_change_ss_barring_password_03();
+static void utc_tel_change_ss_barring_password_04();
+static void utc_tel_change_ss_barring_password_05();
+static void utc_tel_change_ss_barring_password_06();
+
+#endif //_ITS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.c b/TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.c
new file mode 100644 (file)
index 0000000..601fa2e
--- /dev/null
@@ -0,0 +1,203 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <tet_api.h>
+#include "uts_tel_get_ss_aoc_info.h"
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_ss_aoc_info_01, 1},
+       {utc_tel_get_ss_aoc_info_02, 2},
+       {utc_tel_get_ss_aoc_info_03, 3},
+       {utc_tel_get_ss_aoc_info_04, 4},
+       {NULL, 0}
+};
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() != TAPI_API_SUCCESS)
+       {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests TelTapiReadAocInfoRequest() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_READ_AOC_INFO_REQUEST_001
+ * @param [in] aoc_type  TAPI_SS_AOC_TYPE_CCM
+ * @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+static void utc_tel_get_ss_aoc_info_01()
+{
+       TET_STAMP_START("Positive Test");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int request_id;
+       TelSsAocType_t aoc_type;
+       aoc_type =(TelSsAocType_t)TAPI_SS_AOC_TYPE_CCM;
+       
+       if(tel_register_event(TAPI_EVENT_SS_AOC_RSP, &subscription_id, (TelAppCallback)ss_utc_callback,TAPI_EVENT_SS_AOC_RSP) == TAPI_API_SUCCESS)
+       {
+               gStartupSuccess = TRUE;
+               tel_register_app_name("org.samsung.test");
+       }
+
+       ret_status = tel_get_ss_aoc_info(aoc_type,&request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Lower boundary testing of the AoC type for TelTapiReadAocInfoRequest() API
+ * @par ID:
+ * UTC_TAPI_READ_AOC_INFO_REQUEST_002
+ * @param [in] aoc_type  -1
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+static void utc_tel_get_ss_aoc_info_02()
+{
+       TET_STAMP_START("Invalid AoC type -1");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int request_id;
+       TelSsAocType_t aoc_type;
+       aoc_type =(TelSsAocType_t) -1;
+
+       ret_status = tel_get_ss_aoc_info(aoc_type,&request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+       tet_result(TET_FAIL);
+
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the AoC type for TelTapiReadAocInfoRequest() API
+ * @par ID:
+ * UTC_TAPI_READ_AOC_INFO_REQUEST_003
+ * @param [in] aoc_type  TAPI_SS_AOC_TYPE_PUC+1
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+static void utc_tel_get_ss_aoc_info_03()
+{
+       TET_STAMP_START("Invalid AoC type +1");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int request_id;
+       TelSsAocType_t aoc_type;
+       aoc_type =(TelSsAocType_t)( TAPI_SS_AOC_TYPE_PUC+1);
+
+       ret_status = tel_get_ss_aoc_info(aoc_type,&request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+       tet_result(TET_FAIL);
+
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the request ID for TelTapiReadAocInfoRequest() API
+ * @par ID:
+ * UTC_TAPI_READ_AOC_INFO_REQUEST_004
+ * @param [in] aoc_type  TAPI_SS_AOC_TYPE_PUC
+ * @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+static void utc_tel_get_ss_aoc_info_04()
+{
+       TET_STAMP_START("Null Request ID");
+
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+
+       TelSsAocType_t aoc_type;
+       aoc_type =TAPI_SS_AOC_TYPE_PUC;
+
+       ret_status = tel_get_ss_aoc_info(aoc_type,NULL);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(5);
+       tet_result(TET_FAIL);
+
+exit:
+       return;
+}
+
+
+/** @} */
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.h b/TC/telephony_TC/ss/unit/uts_tel_get_ss_aoc_info.h
new file mode 100644 (file)
index 0000000..948119e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_READ_AOC_INFO_REQUEST_H_
+#define _UTS_TAPI_READ_AOC_INFO_REQUEST_H_
+
+static void utc_tel_get_ss_aoc_info_01();
+static void utc_tel_get_ss_aoc_info_02();
+static void utc_tel_get_ss_aoc_info_03();
+static void utc_tel_get_ss_aoc_info_04();
+
+#endif //_ITS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.c b/TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.c
new file mode 100644 (file)
index 0000000..730cd00
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+#include "uts_tel_get_ss_barring_status.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_ss_barring_status_01, 1},
+       {utc_tel_get_ss_barring_status_02, 2},
+       {utc_tel_get_ss_barring_status_03, 3},
+       {utc_tel_get_ss_barring_status_04, 4},
+       {utc_tel_get_ss_barring_status_05, 5},
+       {utc_tel_get_ss_barring_status_06, 6},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+
+/**
+ * @brief This tests TelTapiSsGetCallbarringStatus() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_001
+ * @param [in] bar_type TAPI_CALL_BARRING_OUTGOING
+ * @param [in] CallType  TAPI_CALL_TYPE_VOICE_EV
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_ss_barring_status_01()
+{
+       TET_STAMP_START("Positive Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+       int request_id;
+
+       bar_type = TAPI_CALL_BARRING_OUTGOING;
+       call_type = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, &request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the barring type for TelTapiSsGetCallBarringStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_002
+ * @param [in] bar_type  -1
+ * @param [in] call_type TAPI_CALL_TYPE_VOICE_EV
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_barring_status_02()
+{
+       TET_STAMP_START("Invalid Barring type -1");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+       int request_id;
+
+       bar_type = (TelSsCallBarType_t)-1;//TAPI_CALL_BARRING_OUTGOING;
+       call_type = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the barring type for TelTapiSsGetCallBarringStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_003
+ * @param [in] bar_type  TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+ * @param [in] call_type TAPI_CALL_TYPE_VOICE_EV
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_barring_status_03()
+{
+       TET_STAMP_START("Invalid Barring type +1");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+       int request_id;
+
+       bar_type = (TelSsCallBarType_t)(TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1);
+       call_type = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing for the call type of TelTapiSsGetCallBarringStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_004
+ * @param [in] bar_type  TAPI_CALL_BARRING_ALL_OUTGOING_CALLS
+ * @param [in] call_type -1
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_barring_status_04()
+{
+       TET_STAMP_START("Invalid Call type -1");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+       int request_id;
+
+       bar_type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       call_type = (TelSsCallType_t)-1;
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing for the call type of TelTapiSsGetCallBarringStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_005
+ * @param [in] bar_type  TAPI_CALL_BARRING_ALL_OUTGOING_CALLS
+ * @param [in] call_type TAPI_CALL_TYPE_ALL_TELE+1
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_barring_status_05()
+{
+       TET_STAMP_START("Invalid Call Type +1");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+       int request_id;
+
+       bar_type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       call_type = (TelSsCallType_t)(TAPI_CALL_TYPE_ALL_TELE+1);
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing for the request ID of TelTapiSsGetCallBarringStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_BARRING_STATUS_005
+ * @param [in] bar_type  TAPI_CALL_BARRING_ALL_OUTGOING_CALLS
+ * @param [in] call_type TAPI_CALL_TYPE_VOICE_EV
+ * @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_ss_barring_status_06()
+{
+       TET_STAMP_START("Null request id");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarType_t bar_type;
+       TelSsCallType_t call_type;
+
+       bar_type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       call_type = (TelSsCallType_t)TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_get_ss_barring_status(bar_type, call_type, NULL);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.h b/TC/telephony_TC/ss/unit/uts_tel_get_ss_barring_status.h
new file mode 100644 (file)
index 0000000..c4afe6d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_CALL_BARRING_STATUS_H_
+#define _UTS_TAPI_CALL_BARRING_STATUS_H_
+
+static void utc_tel_get_ss_barring_status_01();
+
+       static void utc_tel_get_ss_barring_status_02();
+       static void utc_tel_get_ss_barring_status_03();
+       static void utc_tel_get_ss_barring_status_04();
+       static void utc_tel_get_ss_barring_status_05();
+       static void utc_tel_get_ss_barring_status_06();
+
+#endif //_UTS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.c b/TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.c
new file mode 100644 (file)
index 0000000..27f7421
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+//#include "tapi_proxy_utility.h"
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_ss_cli_status.h"
+#include <ss_common.h>
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_ss_cli_status_01, 1},
+       {utc_tel_get_ss_cli_status_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static int gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiSsCliServiceStatus API in normal condition
+ * @par ID:
+ * UTS_TAPI_SS_QUERY_CLI_SERVICE_STATUS_001
+ * @param [in] pBarringInfo
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_ss_cli_status_01()
+{
+       TET_STAMP_START("Positive Test");
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCliType_t Cli_Service_Type;
+       int pRequestId=0;
+       Cli_Service_Type = TAPI_SS_CLI_CLIP;
+       ret_status = tel_get_ss_cli_status(Cli_Service_Type,  &pRequestId );
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+void utc_tel_get_ss_cli_status_02()
+{
+       TET_STAMP_START("Positive Test");
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCliType_t Cli_Service_Type;
+       int pRequestId=0;
+       Cli_Service_Type = TAPI_SS_CLI_CLIP;
+       ret_status = tel_get_ss_cli_status(Cli_Service_Type, NULL );
+       if(ret_status ==tel_get_ss_cli_status)
+               tet_result(TET_FAIL);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+
+       return;
+}
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.h b/TC/telephony_TC/ss/unit/uts_tel_get_ss_cli_status.h
new file mode 100644 (file)
index 0000000..64f8731
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SS_QUERY_CLI_SERVICE_STATUS_H_
+#define _UTS_TAPI_SS_QUERY_CLI_SERVICE_STATUS_H_
+
+       static void utc_tel_get_ss_cli_status_01();
+       static void utc_tel_get_ss_cli_status_02();
+
+#endif //_UTS_TAPI_SS_QUERY_CLI_SERVICE_STATUS_H
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.c b/TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.c
new file mode 100644 (file)
index 0000000..ba116c1
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_ss_forward_status.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_ss_forward_status_01, 1},
+       {utc_tel_get_ss_forward_status_02, 2},
+       {utc_tel_get_ss_forward_status_03, 3},
+       {utc_tel_get_ss_forward_status_04, 4},
+       {utc_tel_get_ss_forward_status_05, 5},
+       {utc_tel_get_ss_forward_status_06, 6},
+       {NULL, 0}
+};
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+
+/**
+ * @brief This tests TelTapiSsGetCallForwardStatus() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_001
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_ss_forward_status_01()
+{
+       TET_STAMP_START("Positive Test");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       int pRequestId=0;
+
+/* Calling TAPI SS Call Frwd Query Req Status Api */
+       ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId);
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the forward type for TelTapiSsGetCallForwardStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_001
+ * @param [in] forward_type -1
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+
+void utc_tel_get_ss_forward_status_02()
+{
+       TET_STAMP_START("Invalid Forward type -1");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = (TelSsForwardType_t)-1;//TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       int pRequestId=0;
+
+       ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the forward type for TelTapiSsGetCallForwardStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_003
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_ALL_TELE+1
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+
+void utc_tel_get_ss_forward_status_03()
+{
+
+       TET_STAMP_START("Invalid Forward Type +1");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = (TelSsForwardType_t)(TAPI_CS_FORWARD_TYPE_ALL_TELE+1);
+       TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       int pRequestId=0;
+
+       ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the forward condition for TelTapiSsGetCallForwardStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_004
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  -1
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_forward_status_04()
+{
+       TET_STAMP_START("Invalid Condition -1");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t  Condition = (TelSsForwardWhen_t)-1;
+       int pRequestId=0;
+
+       ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief upper boundary testing of the forward condition for TelTapiSsGetCallForwardStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_004
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV+1
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_forward_status_05()
+{
+       TET_STAMP_START("Invalid Condition +1");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t  Condition = (TelSsForwardWhen_t)(TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV+1);
+       int pRequestId=0;
+
+       ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing for the request ID of TelTapiSsGetCallForwardStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_FORWARD_STATUS_006
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_PTR
+*/
+
+
+void utc_tel_get_ss_forward_status_06()
+{
+       TET_STAMP_START("Null Request Id");
+
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+
+       ret_status = tel_get_ss_forward_status(Type,Condition,NULL);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.h b/TC/telephony_TC/ss/unit/uts_tel_get_ss_forward_status.h
new file mode 100644 (file)
index 0000000..b58a3ef
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+static void utc_tel_get_ss_forward_status_01();
+static void utc_tel_get_ss_forward_status_02();
+static void utc_tel_get_ss_forward_status_03();
+static void utc_tel_get_ss_forward_status_04();
+static void utc_tel_get_ss_forward_status_05();
+static void utc_tel_get_ss_forward_status_06();
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.c b/TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.c
new file mode 100644 (file)
index 0000000..64e80cf
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include "uts_tel_get_ss_waiting_status.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_get_ss_waiting_status_01, 1},
+       {utc_tel_get_ss_waiting_status_02, 2},
+       {utc_tel_get_ss_waiting_status_03, 3},
+       {utc_tel_get_ss_waiting_status_04, 4},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiSsGetCallWaitingStatus() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_WAITING_STATUS_001
+ * @param [in] CallType  TAPI_CALL_TYPE_VOICE_EV
+* @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_get_ss_waiting_status_01()
+{
+       TET_STAMP_START("Positive Test");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       int request_id=0;
+
+       ret_status = tel_get_ss_waiting_status(CallType, &request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the ss call type for TelTapiSsGetCallWaitingStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_WAITING_STATUS_002
+ * @param [in] CallType  (TelSsCallType_t)(TAPI_CALL_TYPE_ALL_TELE+1)
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_waiting_status_02()
+{
+       TET_STAMP_START("Invalid call type +1");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsCallType_t CallType = (TelSsCallType_t)(TAPI_CALL_TYPE_ALL_TELE+1);
+       int request_id=0;
+
+       ret_status = tel_get_ss_waiting_status(CallType, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the ss call type for TelTapiSsGetCallWaitingStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_WAITING_STATUS_003
+ * @param [in] CallType  (TelSsCallType_t)-1
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_get_ss_waiting_status_03()
+{
+       TET_STAMP_START("Invalid call type -1");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsCallType_t CallType = (TelSsCallType_t)-1;//TAPI_CALL_TYPE_VOICE_EV;
+       int request_id=0;
+
+       ret_status = tel_get_ss_waiting_status(CallType, &request_id);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null test of the forward info for TelTapiSsGetCallWaitingStatus() API
+ * @par ID:
+ * UTC_TAPI_SS_GET_CALL_WAITING_STATUS_004
+ * @param [in] CallType  TAPI_CALL_TYPE_VOICE_EV
+* @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_get_ss_waiting_status_04()
+{
+       TET_STAMP_START("Null request ID");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_get_ss_waiting_status(CallType, NULL);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.h b/TC/telephony_TC/ss/unit/uts_tel_get_ss_waiting_status.h
new file mode 100644 (file)
index 0000000..80cedde
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SS_SET_CALL_WAITING_STATUS_H_
+#define _UTS_TAPI_SS_SET_CALL_WAITING_STATUS_H_
+
+       static void utc_tel_get_ss_waiting_status_01();
+       static void utc_tel_get_ss_waiting_status_02();
+       static void utc_tel_get_ss_waiting_status_03();
+       static void utc_tel_get_ss_waiting_status_04();
+
+#endif //_UTS_TAPI_CALL_BARRING_ACT_H_
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.c b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.c
new file mode 100644 (file)
index 0000000..a5c0738
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "uts_tel_send_ss_ussd_cancel.h"
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include "TapiCommon.h"
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_ss_ussd_cancel_01, 1},
+       {utc_tel_send_ss_ussd_cancel_02, 2},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_USSD_CANCEL_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                               tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiUssdSendCancel() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_CANCEL_001
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_send_ss_ussd_cancel_01()
+{
+       TET_STAMP_START("Positive Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId;
+
+       ret_status = tel_send_ss_ussd_cancel(&pRequestId);
+//     tet_printf("%s",TET_RESULT_TO_STRING(ret_status));
+
+//     TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiUssdSendCancel() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_CANCEL_002
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_send_ss_ussd_cancel_02()
+{
+       TET_STAMP_START("Test with Null Parameter");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+
+       ret_status = tel_send_ss_ussd_cancel(NULL);
+       tet_printf("ret_status %d",ret_status);
+//     tet_infoline("aaa");
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR,ret_status);
+
+       G_MAIN_LOOP_RUN(7);
+       tet_result(TET_FAIL);
+       exit:
+               return;
+}
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.h b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel.h
new file mode 100644 (file)
index 0000000..0e021cf
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_USSD_SEND_CANCEL_H_
+#define _UTS_TAPI_USSD_SEND_CANCEL_H_
+
+       static void utc_tel_send_ss_ussd_cancel_01();
+       static void utc_tel_send_ss_ussd_cancel_02();
+#endif //_UTS_TAPI_USSD_SEND_CANCEL_H_
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.c b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.c
new file mode 100644 (file)
index 0000000..85a91e8
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "uts_tel_send_ss_ussd_request.h"
+
+
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_ss_ussd_request_01, 1},
+       {utc_tel_send_ss_ussd_request_02, 2},
+       {utc_tel_send_ss_ussd_request_03, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_USSD_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiUssdSendRequest() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_REQUEST_001
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_send_ss_ussd_request_01()
+{
+       TET_STAMP_START("Positive Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t pAppMsg;
+       int pRequestId;
+
+       char ussd_str[25] = {"*123*0#"};
+       strncpy(pAppMsg.szUssdString, ussd_str, strlen(ussd_str));
+       pAppMsg.UssdStringLength = strlen(pAppMsg.szUssdString);
+
+       ret_status = tel_send_ss_ussd_request(&pAppMsg, &pRequestId);
+       tet_printf("%s",TET_RESULT_TO_STRING(ret_status));
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the pAppMsg for TelTapiUssdSendRequest() API
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_REQUEST_002
+ * @param [in] pAppMsg NULL
+ * @param [out] RequestId
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_send_ss_ussd_request_02()
+{
+       TET_STAMP_START("Test for null pAppMsg");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t *pAppMsg=NULL;
+       int pRequestId;
+
+       ret_status = tel_send_ss_ussd_request(pAppMsg, &pRequestId);
+       tet_printf("ret_status %d",ret_status);
+       tet_infoline("aaa");
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR,ret_status);
+
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the request ID for TelTapiUssdSendRequest() API
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_REQUEST_003
+ * @param [in] pAppMsg
+ * @code
+       pAppMsg.Dcs  = 0x0f;
+       pAppMsg.IndType = TAPI_USSD_IND_NOTIFY;
+       char ussd_str[25] = {"*123*0#"};
+       strcpy(pAppMsg.szUssdString,ussd_str);
+       pAppMsg.UssdStringLength = strlen(ussd_str);
+* @endcode
+ * @param [out] RequestId NULL
+ * @return TAPI_API_INVALID_INPUT
+*/
+
+
+void utc_tel_send_ss_ussd_request_03()
+{
+       TET_STAMP_START("Test for null pRequestId");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t pAppMsg;
+
+       char ussd_str[25] = {"*123*0#"};
+       strncpy(pAppMsg.szUssdString, ussd_str, strlen(ussd_str));
+       pAppMsg.UssdStringLength = strlen(ussd_str);
+
+       ret_status = tel_send_ss_ussd_request(&pAppMsg, NULL);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR,ret_status);
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.h b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_request.h
new file mode 100644 (file)
index 0000000..b0396d1
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _ITS_TAPI_USSD_SEND_REQUEST_H_
+#define _ITS_TAPI_USSD_SEND_REQUEST_H_
+
+       static void utc_tel_send_ss_ussd_request_01();
+       static void utc_tel_send_ss_ussd_request_02();
+       static void utc_tel_send_ss_ussd_request_03();
+
+#endif //_ITS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.c b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.c
new file mode 100644 (file)
index 0000000..72ed039
--- /dev/null
@@ -0,0 +1,175 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include "uts_tel_send_ss_ussd_response.h"
+
+
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_send_ss_ussd_response_01, 1},
+       {utc_tel_send_ss_ussd_response_02, 2},
+       {utc_tel_send_ss_ussd_response_03, 3},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_USSD_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiUssdSendRequest() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_USSD_SEND_REQUEST_001
+ * @param [in] forward_type TAPI_CS_FORWARD_TYPE_VOICE_EV
+ * @param [in] Condition  TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV
+ * @param [out] RequestId
+ * @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_send_ss_ussd_response_01()
+{
+       TET_STAMP_START("Positive Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t pAppMsg;
+       int pRequestId;
+
+       char ussd_str[25] = {"*123*0#"};
+       strncpy(pAppMsg.szUssdString, ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX);
+       pAppMsg.UssdStringLength = strlen(pAppMsg.szUssdString);
+
+       ret_status = tel_send_ss_ussd_response(&pAppMsg, &pRequestId);
+//     tet_printf("%s",TET_RESULT_TO_STRING(ret_status));
+
+//     TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+       return;
+}
+
+void utc_tel_send_ss_ussd_response_02()
+{
+       TET_STAMP_START("Negative Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t pAppMsg;
+       int pRequestId;
+
+       char ussd_str[25] = {"*123*0#"};
+       strncpy(pAppMsg.szUssdString, ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX);
+       pAppMsg.UssdStringLength = strlen(pAppMsg.szUssdString);
+
+       ret_status = tel_send_ss_ussd_response(&pAppMsg, NULL);
+       if(ret_status ==TAPI_API_SUCCESS)
+               tet_result(TET_FAIL);
+//     tet_printf("%s",TET_RESULT_TO_STRING(ret_status));
+
+//     TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+       return;
+}
+
+void utc_tel_send_ss_ussd_response_03()
+{
+       TET_STAMP_START("Negative Test");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsUssdMsgInfo_t pAppMsg;
+       int pRequestId;
+
+       char ussd_str[25] = {"*123*0#"};
+       strncpy(pAppMsg.szUssdString, ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX);
+       pAppMsg.UssdStringLength = strlen(pAppMsg.szUssdString);
+
+       ret_status = tel_send_ss_ussd_response(NULL, &pRequestId);
+       if(ret_status ==TAPI_API_SUCCESS)
+               tet_result(TET_FAIL);
+//     tet_printf("%s",TET_RESULT_TO_STRING(ret_status));
+
+//     TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+       return;
+}
diff --git a/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.h b/TC/telephony_TC/ss/unit/uts_tel_send_ss_ussd_response.h
new file mode 100644 (file)
index 0000000..ce553e6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_USSD_SEND_RSP_H_
+#define _UTS_TAPI_USSD_SEND_RSP_H_
+
+
+       static void utc_tel_send_ss_ussd_response_01();
+       static void utc_tel_send_ss_ussd_response_02();
+       static void utc_tel_send_ss_ussd_response_03();
+
+#endif //_UTS_TAPI_USSD_SEND_RSP_H_
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.c b/TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.c
new file mode 100644 (file)
index 0000000..e35fbe3
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <tet_api.h>
+#include "uts_tel_set_ss_aoc_info.h"
+#include "tet_tapi_util.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_ss_aoc_info_01, 1},
+       {utc_tel_set_ss_aoc_info_02, 2},
+       {utc_tel_set_ss_aoc_info_03, 3},
+       {utc_tel_set_ss_aoc_info_04, 4},
+       {utc_tel_set_ss_aoc_info_05, 5},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_SET_AOC_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests TelTapiReadAocInfoRequest() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SET_AOC_INFO_REQUEST_001
+ * @param [in] aoc_type  TAPI_SS_AOC_TYPE_CCM
+ * @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_set_ss_aoc_info_01()
+{
+       TET_STAMP_START("Positive Test");
+
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int request_id;
+       TelCallAocInfo_t aocInfo;
+
+       aocInfo.AocType=TAPI_SS_AOC_TYPE_MAXACM;
+       aocInfo.MaxAcm=10;
+
+       ret_status = tel_set_ss_aoc_info(&aocInfo,&request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Lower boundary testing of the AoC type for TelTapiReadAocInfoRequest() API
+ * @par ID:
+ * UTC_TAPI_SET_AOC_INFO_REQUEST_002
+ * @param [in] aoc_type  -1
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+void utc_tel_set_ss_aoc_info_02()
+{
+
+       TET_STAMP_START("InvalidAocType -1");
+
+        TapiResult_t ret_status = TAPI_API_SUCCESS;
+        int request_id;
+        TelCallAocInfo_t aocInfo;
+
+       aocInfo.AocType=(TelSsAocType_t)-1;
+        aocInfo.MaxAcm=10;
+
+       ret_status = tel_set_ss_aoc_info(&aocInfo,&request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+        G_MAIN_LOOP_RUN(5);
+
+        tet_result(TET_PASS);
+exit:
+         return;
+}
+
+void utc_tel_set_ss_aoc_info_03()
+{
+       TET_STAMP_START("Invalid AocType +1");
+       TapiResult_t ret_status=TAPI_API_SUCCESS;
+       int request_id;
+       TelCallAocInfo_t aocInfo;
+       aocInfo.AocType=(TelSsAocType_t)( TAPI_SS_AOC_TYPE_PUC+1);
+       aocInfo.MaxAcm=10;
+       ret_status = tel_set_ss_aoc_info(&aocInfo,&request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_PASS,exit,TAPI_API_INVALID_INPUT,ret_status);
+       G_MAIN_LOOP_RUN(50);
+
+       tet_result(TET_PASS);
+
+exit:
+       return;
+}
+
+void utc_tel_set_ss_aoc_info_04()
+{
+       TET_STAMP_START("NULL RequestId");
+       TapiResult_t ret_status=TAPI_API_SUCCESS;
+       TelCallAocInfo_t aocInfo;
+       aocInfo.AocType=TAPI_SS_AOC_TYPE_MAXACM;
+       aocInfo.MaxAcm=10;
+       ret_status = tel_set_ss_aoc_info(&aocInfo,NULL);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_PASS,exit,TAPI_API_INVALID_INPUT,ret_status);
+       G_MAIN_LOOP_RUN(50);
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+
+void utc_tel_set_ss_aoc_info_05()
+{
+      TET_STAMP_START("NULL AocInfo");
+      TapiResult_t ret_status=TAPI_API_SUCCESS;
+      int request_id;
+      ret_status = tel_set_ss_aoc_info(NULL,&request_id);
+
+      TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_PASS,exit,TAPI_API_INVALID_INPUT,ret_status);
+      G_MAIN_LOOP_RUN(50);
+      tet_result(TET_PASS);
+exit:
+      return;
+}
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.h b/TC/telephony_TC/ss/unit/uts_tel_set_ss_aoc_info.h
new file mode 100644 (file)
index 0000000..ba02c28
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SET_AOC_INFO_REQUEST_H_
+#define _UTS_TAPI_SET_AOC_INFO_REQUEST_H_
+
+static void utc_tel_set_ss_aoc_info_01();
+static void utc_tel_set_ss_aoc_info_02();
+static void utc_tel_set_ss_aoc_info_03();
+static void utc_tel_set_ss_aoc_info_04();
+static void utc_tel_set_ss_aoc_info_05();
+
+#endif //_ITS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.c b/TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.c
new file mode 100644 (file)
index 0000000..b2ea7ef
--- /dev/null
@@ -0,0 +1,534 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+//#include "tapi_utility.h"
+#include <gconf/gconf-client.h>
+//#include "tapi_proxy_utility.h"
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include "uts_tel_set_ss_barring.h"
+#include <ss_common.h>
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_ss_barring_01, 1},
+       {utc_tel_set_ss_barring_02, 2},
+       {utc_tel_set_ss_barring_03, 3},
+       {utc_tel_set_ss_barring_04, 4},
+       {utc_tel_set_ss_barring_05, 5},
+       {utc_tel_set_ss_barring_06, 6},
+       {utc_tel_set_ss_barring_07, 7},
+       {utc_tel_set_ss_barring_08, 8},
+       {utc_tel_set_ss_barring_09, 9},
+       {utc_tel_set_ss_barring_10, 10},
+       {utc_tel_set_ss_barring_11, 11},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static int gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_BARRING_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       //Erase the service registration
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+       int pRequestId=0;
+       char bar_pwd[5]=BARRING_PWD;//{'0','0','0','0',};
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_DEACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_ALL_TELE;
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       G_MAIN_LOOP_RUN(5);
+
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiSsSetCallBarring() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_001
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5]="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_DEACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_set_ss_barring_01()
+{
+       TET_STAMP_START("Positive Test");
+
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+       int pRequestId=0;
+       char bar_pwd[5]=BARRING_PWD;//{'0','0','0','0',};
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_DEACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strncpy(pBarringInfo.szPassword,bar_pwd,4);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Lower boundary testing of the barring mode for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_002
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = (TelSsCallBarOperationMode_t)-1;//TAPI_SS_CALL_BAR_DEACTIVATE+1
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_02()
+{
+       TET_STAMP_START("Invalid Operation Mode -1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = (TelSsCallBarOperationMode_t)-1;//TAPI_SS_CALL_BAR_DEACTIVATE+1
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword,bar_pwd,4);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the barring mode for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_003
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = (TelSsCallBarOperationMode_t)-1;//TAPI_SS_CALL_BAR_DEACTIVATE+1
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_03()
+{
+       TET_STAMP_START("Invalid Operation Mode +1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = (TelSsCallBarOperationMode_t)(TAPI_SS_CALL_BAR_DEACTIVATE+1);
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;}
+
+/**
+ * @brief Lower boundary testing of the call type for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_004
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = (TelSsCallType_t)-1;
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_04()
+{
+       TET_STAMP_START("Invalid Call Type -1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = (TelSsCallType_t)-1;
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;}
+
+/**
+ * @brief Upper boundary testing of the call type for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_005
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = (TelSsCallType_t)TAPI_CALL_TYPE_ALL_TELE+1;
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_05()
+{
+       TET_STAMP_START("Invalid Call Type +1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = (TelSsCallType_t)TAPI_CALL_TYPE_ALL_TELE+1;
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the barring type for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_006
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = (TelSsCallBarType_t)-1;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_06()
+{
+       TET_STAMP_START("Invalid Barring Type -1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = (TelSsCallBarType_t)-1;//TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the barring type for TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_007
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = (TelSsCallBarType_t)(TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1);
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+
+void utc_tel_set_ss_barring_07()
+{
+       TET_STAMP_START("Invalid Barring Type +1");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[5] =BARRING_PWD;
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = (TelSsCallBarType_t)(TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1);
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Error handling for the invaild long password of TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_008
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[6] ="00000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_08()
+{
+        TET_STAMP_START("Invalid short password");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char bar_pwd[6] ="000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword,bar_pwd,4);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Error handling for the invaild long password of TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_009
+ * @param [in] pBarringInfo
+ * @code
+       char bar_pwd[6] ="00000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strcpy(pBarringInfo.szPassword,bar_pwd);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_09()
+{
+       TET_STAMP_START("Null RequestId");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       char bar_pwd[5] ="0000";
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,NULL);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing for pBarringInfo of TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_010
+ * @param [in] pBarringInfo NULL
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_ss_barring_10()
+{
+       TET_STAMP_START("Null BarringInfo");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+
+       int pRequestId=0;
+
+       ret_status = tel_set_ss_barring(NULL,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing for the barring password of TelTapiSsSetCallBarring() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_BARRING_011
+ * @param [in] pBarringInfo
+  * @code
+       char *bar_pwd = NULL;
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+* @endcode
+ * @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_barring_11()
+{
+       TET_STAMP_START("Test for null password");
+       TapiResult_t  ret_status = TAPI_API_SUCCESS;
+       TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+
+       int pRequestId=0;
+       char *bar_pwd = "\0";
+
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM+1
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;//TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV+1
+       strncpy(pBarringInfo.szPassword, bar_pwd, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+
+       ret_status = tel_set_ss_barring(&pBarringInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(7);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.h b/TC/telephony_TC/ss/unit/uts_tel_set_ss_barring.h
new file mode 100644 (file)
index 0000000..cbb9f08
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SET_CALL_BARRING_H_
+#define _UTS_TAPI_SET_CALL_BARRING_H_
+
+       static void utc_tel_set_ss_barring_01();
+       static void utc_tel_set_ss_barring_02();
+       static void utc_tel_set_ss_barring_03();
+       static void utc_tel_set_ss_barring_04();
+       static void utc_tel_set_ss_barring_05();
+       static void utc_tel_set_ss_barring_06();
+       static void utc_tel_set_ss_barring_07();
+       static void utc_tel_set_ss_barring_08();
+       static void utc_tel_set_ss_barring_09();
+       static void utc_tel_set_ss_barring_10();
+       static void utc_tel_set_ss_barring_11();
+
+#endif //_UTS_TAPI_CALL_BARRING_ACT_H_
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.c b/TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.c
new file mode 100644 (file)
index 0000000..6046f68
--- /dev/null
@@ -0,0 +1,520 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <tet_api.h>
+#include <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include "uts_tel_set_ss_forward.h"
+#include "ss_common.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_ss_forward_01, 1},
+       {utc_tel_set_ss_forward_02, 2},
+       {utc_tel_set_ss_forward_03, 3},
+       {utc_tel_set_ss_forward_04, 4},
+       {utc_tel_set_ss_forward_05, 5},
+       {utc_tel_set_ss_forward_06, 6},
+       {utc_tel_set_ss_forward_07, 7},
+       {utc_tel_set_ss_forward_08, 8},
+       {utc_tel_set_ss_forward_09, 9},
+       {NULL, 0}
+};
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_FORWARD_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+
+               }
+               else
+                       tet_infoline("startup fail. tel_register_event()");
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       //Erase the service registration
+       TelSsForwardInfo_t pForwardInfo;
+       int len;
+
+       int pRequestId=0;
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ERASURE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_ALL_TELE;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 0;
+
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strncpy(pForwardInfo.szPhoneNumber, cf_number, TAPI_CALL_DIALDIGIT_LEN_MAX);
+
+       tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       G_MAIN_LOOP_RUN(5);
+       printf("CF ERASE\n");
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+
+/**
+ * @brief This tests TelTapiSsSetCallForwarding() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_001
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_REGISTRATION_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 0;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_set_ss_forward_01()
+{
+       TET_STAMP_START("This tests TelTapiSsSetCallForwarding() API in normal conditions");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsForwardInfo_t pForwardInfo;
+       int len;
+
+       int pRequestId=0;
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_REGISTRATION_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 0;
+
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strncpy(pForwardInfo.szPhoneNumber, cf_number, TAPI_CALL_DIALDIGIT_LEN_MAX);
+
+       printf("CF REGISTRATION\n");
+       ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the forward mode for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_002
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = (TelSsForwardMode_t)-1;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_02()
+{
+       TET_STAMP_START("Invalid forward mode -1");
+       //invalid mode
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+
+       int pRequestId=0;
+       TelSsForwardInfo_t pForwardInfo;
+       pForwardInfo.Mode = (TelSsForwardMode_t)-1;//TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       int len;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+
+       memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+       ret_status = tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the forward mode for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_003
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = (TelSsForwardMode_t)(TAPI_CALL_FORWARD_MODE_ERASURE_EV+1);
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_03()
+{
+       //invalid mode
+       TET_STAMP_START("Invalid forward mode +1");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+
+       TelSsForwardInfo_t pForwardInfo;
+       pForwardInfo.Mode = (TelSsForwardMode_t)(TAPI_CALL_FORWARD_MODE_ERASURE_EV+1);//TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+       int pRequestId=0;
+       int len;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+
+       memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+       ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the forward type for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_004
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = (TelSsForwardType_t)-1;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_04()
+{
+       //invalid type
+       TET_STAMP_START("Invalid forward type -1");
+    TapiResult_t ret_status = TAPI_API_SUCCESS;
+int pRequestId=0;
+    TelSsForwardInfo_t pForwardInfo;
+    pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+    pForwardInfo.Type = (TelSsForwardType_t)-1;//TAPI_CS_FORWARD_TYPE_VOICE_EV;
+    pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+    pForwardInfo.NoReplyConditionTimer = 10;
+
+    int len;
+    char cf_number[20]= {FWD_NUM};
+    len = strlen(cf_number);
+
+    memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+    ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the forward type for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_005
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = (TelSsForwardType_t)(TAPI_CS_FORWARD_TYPE_ALL_TELE +1);
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_05()
+{
+       //invalid type
+       TET_STAMP_START("Invalid forward type +1");
+    TapiResult_t ret_status = TAPI_API_SUCCESS;
+int pRequestId=0;
+    TelSsForwardInfo_t pForwardInfo;
+    pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+    pForwardInfo.Type = (TelSsForwardType_t)(TAPI_CS_FORWARD_TYPE_ALL_TELE +1);
+    pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+    pForwardInfo.NoReplyConditionTimer = 10;
+
+    int len;
+    char cf_number[20]= {FWD_NUM};
+    len = strlen(cf_number);
+
+    memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+    ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the forward condition for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_006
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = (TelSsForwardWhen_t)-1;
+       pForwardInfo.NoReplyConditionTimer = 10;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_06()
+{
+       //invalid condition
+       TET_STAMP_START("Invalid forward condition -1");
+    TapiResult_t ret_status = TAPI_API_SUCCESS;
+int pRequestId=0;
+    TelSsForwardInfo_t pForwardInfo;
+    pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+    pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+    pForwardInfo.Condition = (TelSsForwardWhen_t)-1;
+    pForwardInfo.NoReplyConditionTimer = 10;
+
+    int len;
+    char cf_number[20]= {FWD_NUM};
+    len = strlen(cf_number);
+
+    memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+    ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the forward condition for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_007
+ * @param [in] pForwardInfo
+ * @code
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = (TelSsForwardWhen_t)(TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV+1);
+       pForwardInfo.NoReplyConditionTimer = 10;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       strcpy(pForwardInfo.szPhoneNumber,cf_number);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_forward_07()
+{
+       //invalid condition
+       TET_STAMP_START("Invalid Forward Condition +1");
+    TapiResult_t ret_status = TAPI_API_SUCCESS;
+int pRequestId=0;
+    TelSsForwardInfo_t pForwardInfo;
+    pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+    pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+    pForwardInfo.Condition = (TelSsForwardWhen_t)(TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV+1);
+    pForwardInfo.NoReplyConditionTimer = 10;
+
+    int len;
+    char cf_number[20]= {FWD_NUM};
+    len = strlen(cf_number);
+
+    memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+    ret_status =  tel_set_ss_forward(&pForwardInfo,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status);
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Null test of the Request ID for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_008
+ * @param [in] pForwardInfo
+ * @code
+ pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+    pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+    pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+    pForwardInfo.NoReplyConditionTimer = 10;
+
+    int len;
+    char cf_number[20]= {FWD_NUM};
+    len = strlen(cf_number);
+    memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+ * @endcode
+* @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_ss_forward_08()
+{
+       //null out param
+       TET_STAMP_START("Null Request ID");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       TelSsForwardInfo_t pForwardInfo;
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       int len;
+       char cf_number[20]= {FWD_NUM};
+       len = strlen(cf_number);
+       memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+
+       ret_status =  tel_set_ss_forward(&pForwardInfo,NULL);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Null test of the forward info for TelTapiSsSetCallForwarding() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_FORWARDING_009
+ * @param [in] pForwardInfo
+ * @endcode
+* @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_ss_forward_09()
+{
+       //null out param
+       TET_STAMP_START("Null Forward Info");
+       TapiResult_t ret_status = TAPI_API_SUCCESS;
+       int pRequestId=0;
+
+       ret_status =  tel_set_ss_forward(NULL,&pRequestId);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status);
+
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/** @} */
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.h b/TC/telephony_TC/ss/unit/uts_tel_set_ss_forward.h
new file mode 100644 (file)
index 0000000..e0d00be
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SS_SET_CALL_FORWARD_H_
+#define _UTS_TAPI_SS_SET_CALL_FORWARD_H_
+
+       static void utc_tel_set_ss_forward_01();
+       static void utc_tel_set_ss_forward_02();
+       static void utc_tel_set_ss_forward_03();
+       static void utc_tel_set_ss_forward_04();
+       static void utc_tel_set_ss_forward_05();
+       static void utc_tel_set_ss_forward_06();
+       static void utc_tel_set_ss_forward_07();
+       static void utc_tel_set_ss_forward_08();
+       static void utc_tel_set_ss_forward_09();
+
+
+#endif //_UTS_TAPI_CALL_BARRING_ACT_H_
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.c b/TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.c
new file mode 100644 (file)
index 0000000..599899b
--- /dev/null
@@ -0,0 +1,327 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <ITapiCall.h>
+#include <ITapiSs.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <sys/types.h>
+
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TapiCommon.h"
+#include <gconf/gconf-client.h>
+#include "string.h"
+
+#include "tet_tapi_util.h"
+#include <tet_api.h>
+
+#include "uts_tel_set_ss_waiting.h"
+
+/* Initialize TCM data structures */
+static void startup();
+static void cleanup();
+void (*tet_startup) () = startup;
+void (*tet_cleanup) () = cleanup;
+struct tet_testlist tet_testlist[] = {
+       {utc_tel_set_ss_waiting_01, 1},
+       {utc_tel_set_ss_waiting_02, 2},
+       {utc_tel_set_ss_waiting_03, 3},
+       {utc_tel_set_ss_waiting_04, 4},
+       {utc_tel_set_ss_waiting_05, 5},
+       {utc_tel_set_ss_waiting_06, 6},
+       {utc_tel_set_ss_waiting_07, 7},
+       {NULL, 0}
+};
+
+
+/* Startup & Clean function : It is not test code, only for
+   initialize and finalize test module
+*/
+static BOOL gStartupSuccess = FALSE;
+static unsigned int subscription_id = 0;
+
+static void startup()
+{
+       tapi_dbus_connection_name dname;
+       int bStatus;
+       
+       gStartupSuccess = FALSE;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               if(tel_register_event(TAPI_EVENT_SS_WAITING_CNF, &subscription_id, (TelAppCallback)ss_utc_callback,NULL) == TAPI_API_SUCCESS)
+               {
+                       gStartupSuccess = TRUE;
+                       tel_register_app_name("org.samsung.test");
+                       if(tel_get_app_name(&dname))
+                               printf("Dbus Get app name error\n");
+                       else 
+                               printf("Dbus Name is %s\n",dname.name);
+                               
+                       tel_check_service_ready(&bStatus);
+                       printf("Telephony service  %d\n",bStatus);
+               }
+               else
+               {
+                       tet_infoline("startup fail. tel_register_event()");
+               }
+       }else {
+               tet_infoline("startup fail. tel_init() failed");
+       }
+
+       return;
+}
+
+static void cleanup()
+{
+       if(gStartupSuccess == TRUE)
+               tel_deregister_event(subscription_id);
+       tel_deinit();
+       return;
+}
+
+/**
+ * @brief This tests TelTapiSsSetCallWaiting() API in normal conditions
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_001
+ * @param [in] waitInfo
+ * @code
+ *     waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+ *     waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_SUCCESS
+*/
+
+void utc_tel_set_ss_waiting_01()
+{
+       TET_STAMP_START("This tests TelTapiSsSetCallWaiting() API in normal conditions");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+
+       int request_id=0;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+
+       TET_RESULT_IF_NOT_EQUAL_THEN_GOTO(TET_FAIL, exit, TAPI_API_SUCCESS, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_PASS);
+exit:
+       return;
+}
+
+/**
+ * @brief Lower boundary testing of the call  type for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_002
+ * @param [in] waitInfo
+ * @code
+ *     waitInfo.CallType = (TelSsCallType_t)-1;
+ *     waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_waiting_02()
+{
+       TET_STAMP_START("Lower boundary testing of the call  type for TelTapiSsSetCallWaiting() API");
+
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+       int request_id=0;
+
+       waitInfo.CallType = (TelSsCallType_t)-1;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Upper boundary testing of the call  type for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_003
+ * @param [in] waitInfo
+ * @code
+*      waitInfo.CallType = (TelSsCallType_t)(TAPI_CALL_TYPE_ALL_TELE+1);
+*      waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_waiting_03()
+{
+       TET_STAMP_START("Upper boundary testing of the call  type for TelTapiSsSetCallWaiting() API");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+       waitInfo.CallType = (TelSsCallType_t)(TAPI_CALL_TYPE_ALL_TELE+1);
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_ACTIVATE;
+       int request_id=0;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+/**
+ * @brief Lower boundary testing of the waiting operation mode for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_004
+ * @param [in] waitInfo
+ * @code
+ *     waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+*      waitInfo.Mode =(TelSsCallWaitOperationMode_t)-1;
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_waiting_04()
+{
+       TET_STAMP_START("Lower boundary testing of the waiting operation mode for TelTapiSsSetCallWaiting() API");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)-1;
+       int request_id=0;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Upper boundary testing of the waiting operation mode for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_005
+ * @param [in] waitInfo
+ * @code
+ *     waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+ *     waitInfo.Mode =(TelSsCallWaitOperationMode_t)(TAPI_SS_CW_DEACTIVATE+1);
+* @endcode
+* @param [out] RequestId
+* @return TAPI_API_INVALID_INPUT
+*/
+
+void utc_tel_set_ss_waiting_05()
+{
+       TET_STAMP_START("Upper boundary testing of the waiting operation mode for TelTapiSsSetCallWaiting() API");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)(TAPI_SS_CW_DEACTIVATE+1);
+       int request_id=0;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, &request_id);
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_INPUT, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the waitInfo for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_006
+ * @param [in] waitInfo NULL
+* @param [out] RequestId
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_ss_waiting_06()
+{
+       TET_STAMP_START("Null testing of the waitInfo for TelTapiSsSetCallWaiting() API");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       int request_id=0;
+
+       ret_status = tel_set_ss_waiting(NULL, &request_id);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+/**
+ * @brief Null testing of the request ID for TelTapiSsSetCallWaiting() API
+ * @par ID:
+ * UTC_TAPI_SS_SET_CALL_WAITING_007
+ * @param [in] waitInfo
+  * @code
+ * waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+* waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_DEACTIVATE;
+* @param [out] RequestId NULL
+* @return TAPI_API_INVALID_PTR
+*/
+
+void utc_tel_set_ss_waiting_07()
+{
+       TET_STAMP_START("Null testing of the request ID for TelTapiSsSetCallWaiting() API");
+       TapiResult_t   ret_status = TAPI_API_SUCCESS;
+       TelSsWaitingInfo_t waitInfo;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       waitInfo.Mode =(TelSsCallWaitOperationMode_t)TAPI_SS_CW_DEACTIVATE;
+
+       ret_status = tel_set_ss_waiting(&waitInfo, NULL);
+
+       TET_RESULT_IF_EQUAL_THEN_GOTO(TET_PASS, exit, TAPI_API_INVALID_PTR, ret_status );
+       G_MAIN_LOOP_RUN(5);
+
+       tet_result(TET_FAIL);
+exit:
+       return;
+}
+
+
+/** @} */
+
+
diff --git a/TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.h b/TC/telephony_TC/ss/unit/uts_tel_set_ss_waiting.h
new file mode 100644 (file)
index 0000000..1574e7d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _UTS_TAPI_SS_SET_CALL_WAITING_H_
+#define _UTS_TAPI_SS_SET_CALL_WAITING_H_
+       static void utc_tel_set_ss_waiting_01();
+       static void utc_tel_set_ss_waiting_02();
+       static void utc_tel_set_ss_waiting_03();
+       static void utc_tel_set_ss_waiting_04();
+       static void utc_tel_set_ss_waiting_05();
+       static void utc_tel_set_ss_waiting_06();
+       static void utc_tel_set_ss_waiting_07();
+
+#endif //_UTS_TAPI_CALL_BARRING_ACT_H_
+
diff --git a/TC/telephony_TC/tet_scen b/TC/telephony_TC/tet_scen
new file mode 100644 (file)
index 0000000..6df76f3
--- /dev/null
@@ -0,0 +1,25 @@
+all
+       ^common
+       ^sim
+       ^sat
+       ^sound
+       ^ss
+       ^sms
+       ^gprs
+       ^net
+sim
+       :include:/sim/unit/tslist
+sms
+       :include:/sms/unit/tslist
+net
+       :include:/network/unit/tslist
+ss
+       :include:/ss/unit/tslist
+sat
+       :include:/sat/unit/tslist
+gprs
+       :include:/gprs/unit/tslist
+sound
+       :include:/sound/unit/tslist
+common
+       :include:/common/unit/tslist
diff --git a/TC/telephony_TC/tetbuild.cfg b/TC/telephony_TC/tetbuild.cfg
new file mode 100644 (file)
index 0000000..9aec41e
--- /dev/null
@@ -0,0 +1,3 @@
+TET_OUTPUT_CAPTURE=True
+TET_BUILD_TOOL=make
+TET_BUILD_FILE=-f makefile
diff --git a/TC/telephony_TC/tetclean.cfg b/TC/telephony_TC/tetclean.cfg
new file mode 100644 (file)
index 0000000..2cc5be7
--- /dev/null
@@ -0,0 +1,3 @@
+TET_OUTPUT_CAPTURE=False
+TET_CLEAN_TOOL=rm
+TET_CLEAN_FILE=-f
diff --git a/TC/telephony_TC/tetexec.cfg b/TC/telephony_TC/tetexec.cfg
new file mode 100644 (file)
index 0000000..afec781
--- /dev/null
@@ -0,0 +1,8 @@
+TET_OUTPUT_CAPTURE=False
+# Parameters to be passed to test cases.
+# These allow you to parameterize your test suite.
+# The name of a character device file (or "unsup" if not supported)
+#CHARDEV=/dev/null
+
+# The name of a block device file (or "unsup" if not supported)
+#BLOCKDEV=unsup
diff --git a/TC/tet_scen b/TC/tet_scen
new file mode 100644 (file)
index 0000000..334caba
--- /dev/null
@@ -0,0 +1,103 @@
+# auto generated tet_scen
+all
+       "Starting Full Test Suite"
+       /telephony_TC/sim/unit/uts_tel_change_sim_pins{1-5,9}
+       /telephony_TC/sim/unit/uts_tel_delete_sim_pb_record{1-3}
+       /telephony_TC/sim/unit/uts_tel_disable_sim_fdn
+       /telephony_TC/sim/unit/uts_tel_disable_sim_security
+       /telephony_TC/sim/unit/uts_tel_enable_sim_fdn
+       /telephony_TC/sim/unit/uts_tel_enable_sim_security
+       /telephony_TC/sim/unit/uts_tel_get_sim_ecc
+       /telephony_TC/sim/unit/uts_tel_get_sim_fdn_status
+       /telephony_TC/sim/unit/uts_tel_get_sim_imsi
+       /telephony_TC/sim/unit/uts_tel_get_sim_init_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_language
+       /telephony_TC/sim/unit/uts_tel_get_sim_mailbox_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_callforwarding_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_messagewaiting_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_cphs_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_msisdn
+       /telephony_TC/sim/unit/uts_tel_get_sim_pb_3g_meta_info{1}
+       /telephony_TC/sim/unit/uts_tel_get_sim_pb_count{1-3}
+       /telephony_TC/sim/unit/uts_tel_get_sim_pb_init_info
+       /telephony_TC/sim/unit/uts_tel_get_sim_pb_meta_info{1-3}
+       /telephony_TC/sim/unit/uts_tel_get_sim_security_status
+       /telephony_TC/sim/unit/uts_tel_get_sim_type
+       /telephony_TC/sim/unit/uts_tel_lock_sim_personalization
+       /telephony_TC/sim/unit/uts_tel_read_sim_pb_record{1-3}
+       /telephony_TC/sim/unit/uts_tel_req_sap_cardreader_status
+       /telephony_TC/sim/unit/uts_tel_req_sap_connection
+       /telephony_TC/sim/unit/uts_tel_req_sap_connection_status
+       /telephony_TC/sim/unit/uts_tel_req_sap_power_operation
+       /telephony_TC/sim/unit/uts_tel_req_sap_transfer_apdu
+       /telephony_TC/sim/unit/uts_tel_req_sap_transfer_atr
+       /telephony_TC/sim/unit/uts_tel_req_sap_transport_protocol
+       /telephony_TC/sim/unit/uts_tel_req_sim_access
+       /telephony_TC/sim/unit/uts_tel_req_sim_isim_authentication
+       /telephony_TC/sim/unit/uts_tel_set_sim_language
+       /telephony_TC/sim/unit/uts_tel_update_sim_pb_record #{1-4}
+       /telephony_TC/sim/unit/uts_tel_verifiy_sim_pins{1-4}
+       /telephony_TC/sim/unit/uts_tel_verify_sim_puks
+       /telephony_TC/call/unit/uts_tel_exe_call_mo
+       /telephony_TC/call/unit/uts_tel_answer_call
+       /telephony_TC/call/unit/uts_tel_release_call
+       /telephony_TC/call/unit/uts_tel_release_call_all_active
+       /telephony_TC/call/unit/uts_tel_retrieve_call
+       /telephony_TC/call/unit/uts_tel_hold_call
+       /telephony_TC/call/unit/uts_tel_swap_call
+       /telephony_TC/call/unit/uts_tel_join_call
+       /telephony_TC/call/unit/uts_tel_split_call
+       /telephony_TC/call/unit/uts_tel_exe_call_explicit_transfer
+       /telephony_TC/call/unit/uts_tel_get_call_act_line
+       /telephony_TC/call/unit/uts_tel_set_call_act_line
+       /telephony_TC/call/unit/uts_tel_get_call_status
+       /telephony_TC/call/unit/uts_tel_get_call_duration
+       /telephony_TC/call/unit/uts_tel_send_call_dtmf
+       /telephony_TC/call/unit/uts_tel_release_call_all_held
+       /telephony_TC/call/unit/uts_tel_get_call_conf_list
+       /telephony_TC/call/unit/uts_tel_release_call_all
+       /telephony_TC/call/unit/uts_tel_activate_call_ccbs
+       /telephony_TC/call/unit/uts_tel_deflect_call
+       /telephony_TC/common/unit/uts_tel_check_service_ready
+       /telephony_TC/common/unit/uts_tel_deinit
+       /telephony_TC/common/unit/uts_tel_deinit_ecore_loop
+       /telephony_TC/common/unit/uts_tel_register_event
+       /telephony_TC/common/unit/uts_tel_deregister_event_at_ecore_loop
+       /telephony_TC/common/unit/uts_tel_init_ecore_loop
+       /telephony_TC/common/unit/uts_tel_deregister_event
+       /telephony_TC/common/unit/uts_tel_init
+       /telephony_TC/common/unit/uts_tel_register_event_at_ecore_loop
+       /telephony_TC/network/unit/uts_tel_get_network_band
+       /telephony_TC/network/unit/uts_tel_get_network_hybrid_in_cdma
+       /telephony_TC/network/unit/uts_tel_get_network_preferred_plmn
+       /telephony_TC/network/unit/uts_tel_get_network_roaming
+       /telephony_TC/network/unit/uts_tel_get_network_selection_mode
+       /telephony_TC/network/unit/uts_tel_get_network_service_domain
+       /telephony_TC/network/unit/uts_tel_search_network
+       /telephony_TC/network/unit/uts_tel_set_network_band
+       /telephony_TC/network/unit/uts_tel_set_network_hybrid_in_cdma
+       /telephony_TC/network/unit/uts_tel_set_network_preferred_plmn
+       /telephony_TC/network/unit/uts_tel_set_network_roaming
+       /telephony_TC/network/unit/uts_tel_set_network_service_domain
+       /telephony_TC/network/unit/uts_tel_get_network_mode
+       /telephony_TC/network/unit/uts_tel_select_network_automatic
+       /telephony_TC/network/unit/uts_tel_select_network_manual
+       /telephony_TC/network/unit/uts_tel_set_network_mode
+       /telephony_TC/gprs/unit/uts_tel_activate_gprs_pdp
+       /telephony_TC/gprs/unit/uts_tel_control_gprs_btdun_pin
+       /telephony_TC/gprs/unit/uts_tel_deactivate_gprs_pdp
+       /telephony_TC/ss/unit/uts_tel_change_ss_barring_password
+       /telephony_TC/ss/unit/uts_tel_get_ss_aoc_info
+       /telephony_TC/ss/unit/uts_tel_get_ss_barring_status
+       /telephony_TC/ss/unit/uts_tel_get_ss_cli_status
+       /telephony_TC/ss/unit/uts_tel_get_ss_forward_status
+       /telephony_TC/ss/unit/uts_tel_get_ss_waiting_status
+       /telephony_TC/ss/unit/uts_tel_send_ss_ussd_cancel
+       /telephony_TC/ss/unit/uts_tel_send_ss_ussd_request
+       /telephony_TC/ss/unit/uts_tel_send_ss_ussd_response
+       /telephony_TC/ss/unit/uts_tel_set_ss_barring
+       /telephony_TC/ss/unit/uts_tel_set_ss_forward
+       /telephony_TC/ss/unit/uts_tapi_ussd_send_rsp
+       /telephony_TC/ss/unit/uts_tel_set_ss_waiting
+       "Completed Full Test Suite"
+# EOF
diff --git a/TC/tslist.txt b/TC/tslist.txt
new file mode 100644 (file)
index 0000000..cd01962
--- /dev/null
@@ -0,0 +1,6 @@
+telephony_TC/sim/unit/tslist
+telephony_TC/call/unit/tslist
+telephony_TC/common/unit/tslist
+telephony_TC/network/unit/tslist
+telephony_TC/gprs/unit/tslist
+telephony_TC/ss/unit/tslist
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..07a3066
--- /dev/null
@@ -0,0 +1,31 @@
+libslp-tapi (0.5.78) unstable; urgency=low
+
+  * Removed fast dormancy api
+  * Git: pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.78
+
+ -- Inho Oh <inho48.oh@samsung.com>  Wed, 28 Dec 2011 16:05:18 +0900
+
+libslp-tapi (0.5.77) unstable; urgency=low
+
+  * code clean up
+  * Git: pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.77
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Fri, 23 Dec 2011 18:04:11 +0900
+
+libslp-tapi (0.5.76) unstable; urgency=low
+
+  * Factory Omission Avoidance Bug Fix ( Confirm Message Broadcasting Problem )
+  * Git: pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.76
+
+ -- Youngman Park <youngman.park@samsung.com>  Fri, 09 Dec 2011 19:19:47 +0900
+
+libslp-tapi (0.5.75) unstable; urgency=low
+
+  * TIZEN initial version
+  * Git: pkgs/l/libslp-tapi
+  * Tag: libslp-tapi_0.5.75
+
+ -- Kyeongchul Kim <kyeongchul.kim@samsung.com>  Wed, 07 Dec 2011 20:19:47 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..732f778
--- /dev/null
@@ -0,0 +1,30 @@
+Source: libslp-tapi
+Section: libs
+Priority: extra
+Maintainer: Danny Jeongseok Seo <s.seo@samsung.com>
+Uploaders: Danny Jeongseok Seo <s.seo@samsung.com>, Gunwang Jeong <ethan.jeong@samsung.com>, HyunJung Park <junge.park@samsung.com>, kyeongchul.kim <kyeongchul.kim@samsung.com>, Sunghyuk Lee <sunghyuk.lee@samsung.com>, Youngman Park <youngman.park@samsung.com>, Inho Oh <inho48.oh@samsung.com>
+Build-Depends: debhelper (>= 5),
+               libglib2.0-dev, libdbus-1-dev, libdbus-glib-1-dev,
+               libslp-setting-dev, dlog-dev, libsecurity-server-client-dev
+Standards-Version: 0.0.0
+
+Package: libslp-tapi-dev
+Section: libs
+Architecture: any
+Depends: libslp-tapi-0 (= ${Source-Version}),
+         libglib2.0-dev, libdbus-1-dev, libdbus-glib-1-dev,
+         libslp-setting-dev, dlog-dev, libsecurity-server-client-dev
+Description: telephony client API library (Development)
+
+Package: libslp-tapi-0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends},
+Description: telephony client API library (Shared Object)
+
+Package: libslp-tapi-0-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libslp-tapi-0 (= ${Source-Version})
+Description: telephony client API library (dbg package)
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/libslp-tapi-0.install.in b/debian/libslp-tapi-0.install.in
new file mode 100644 (file)
index 0000000..37a7d08
--- /dev/null
@@ -0,0 +1,2 @@
+@PREFIX@/lib/libSLP-tapi.so.*
+@PREFIX@/lib/libSLP-tapi.so
diff --git a/debian/libslp-tapi-dev.install.in b/debian/libslp-tapi-dev.install.in
new file mode 100644 (file)
index 0000000..eff7d16
--- /dev/null
@@ -0,0 +1,5 @@
+@PREFIX@/include/telephony/tapi/I*
+@PREFIX@/include/telephony/common/T*
+@PREFIX@/lib/libSLP-tapi.la
+#@PREFIX@/lib/libSLP-tapi.a
+@PREFIX@/lib/pkgconfig/tapi.pc
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..0ca9918
--- /dev/null
@@ -0,0 +1,117 @@
+#!/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 ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+CFLAGS += -fvisibility=hidden -fpic
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+LDFLAGS += -Wl,--unresolved-symbols=ignore-in-shared-libs,--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)" 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) all
+
+       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#@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.
+       rm -rf $(CMAKE_TMP_DIR)
+
+       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 --dbg-package=libslp-tapi-0-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/image/SLP_TelephonyFW_PG_image001.png b/image/SLP_TelephonyFW_PG_image001.png
new file mode 100755 (executable)
index 0000000..af8da9e
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image001.png differ
diff --git a/image/SLP_TelephonyFW_PG_image002.png b/image/SLP_TelephonyFW_PG_image002.png
new file mode 100755 (executable)
index 0000000..fa22ee2
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image002.png differ
diff --git a/image/SLP_TelephonyFW_PG_image003.png b/image/SLP_TelephonyFW_PG_image003.png
new file mode 100755 (executable)
index 0000000..c518ec7
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image003.png differ
diff --git a/image/SLP_TelephonyFW_PG_image004.png b/image/SLP_TelephonyFW_PG_image004.png
new file mode 100755 (executable)
index 0000000..96f5184
Binary files /dev/null and b/image/SLP_TelephonyFW_PG_image004.png differ
diff --git a/include/SLP_TelephonyFW_PG.h b/include/SLP_TelephonyFW_PG.h
new file mode 100644 (file)
index 0000000..c2ea8f6
--- /dev/null
@@ -0,0 +1,9398 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @ingroup   SLP_PG
+ * @defgroup   TELEPHONY Telephony
+@{
+
+<h1 class="pg">Introduction</h1>
+       <h2 class="pg">Purpose</h2>
+The purpose of this document is to describe how applications can use Telephony Framework APIs. This document gives programming guidelines to application engineers.
+
+       <h2 class="pg">Scope</h2>
+The scope of this document is limited to Samsung Linux platform Telephony Framework API usage.
+
+       <h2 class="pg">Abbreviations</h2>
+<table>
+<tr><td>OEM</td><td>Original Equipment Manufacturer</td></tr>
+<tr><td>RPC</td><td>Remote Procedure Call</td></tr>
+<tr><td>SAP</td><td>Sim Access Profile</td></tr>
+<tr><td>SAT</td><td>SIM Application Toolkit</td></tr>
+<tr><td>SIM</td><td>Subscriber Identity Module</td></tr>
+<tr><td>SVC</td><td>Service</td></tr>
+<tr><td>TAPI</td><td>Telephony API</td></tr>
+<tr><td>EFL</td><td>Enlightenment Foundation Libraries</td></tr>
+</table>
+
+       <h2 class="pg">Restriction Modules</h2>
+CALL, SMS, GPRS, SAT have the permission. Refer to each module API description
+@}
+@defgroup Telephony_Architecture 1.Architecture
+@ingroup TELEPHONY
+@{
+<h1 class="pg">Telephony Framework Architecture</h1>
+@image html SLP_TelephonyFW_PG_image001.png
+
+@image html SLP_TelephonyFW_PG_image002.png System Architecture of Telephony Framework
+
+Telephony is a middleware component which acts as an interface layer between applications and the OEM.
+@n Telephony Framework provides interfaces to applications in the form of a library and to the OEM providers in the form of OEM plug-in.
+@n The applications make use of the library of exported APIs, which uses a RPC mechanism for making telephony service requests.
+@n On the other side, OEM-Plug-in library is the OEM layer, which is the wireless protocol stack specific implementation. This layer acts as a plug-in giving flexibility for any wireless protocol stack to be used avoiding any changes to be made in the Telephony clients.
+@n Telephony has certain synchronous and asynchronous exported APIs. Synchronous APIs provide data as the function parameter passed to Telephony. Asynchronous APIs provide data using an event based mechanism.
+@image html SLP_TelephonyFW_PG_image003.png Asynchronous service request (response Use-Case Diagram)
+@image html SLP_TelephonyFW_PG_image003.png Synchronous service request (response Use-Case Diagram)
+@}
+@defgroup Telephony_Feature 2.SubModules & Services
+@ingroup TELEPHONY
+@{
+
+<h1 class="pg">Telephony Framework SubModules & Services</h1>
+       <h2 class="pg">Call & Call-dependent SS</h2>
+       Also see Use Cases of @ref Use_Cases2_CALL
+- Initiate, accept, reject and end calls.
+- Call supplementary service ( Hold,CLI, Multiparty, Call Waiting, Forwarding, Barring)
+- Get Call Time, Status, Duration, Conference List
+- Get and Set Active Line
+- Retrieve, swap, and transfer call.
+- For CDMA
+       - Call Flash Information
+       - Get and Set voice privacy mode
+
+       <h2 class="pg">SMS</h2>
+       Also see Use Cases of @ref Use_Cases4_SMS
+SMS service in Telephony Framework only provides the interface to the modem and doesn’t handle Transport layer, storing and deleting the SMS in the storage except SIM. We recommend you use MAPI of Message Framework.
+- Send, save, receive, read and delete network texts.
+- Receive Cell-Broadcast Message.
+- Set and Get Cell broadcast configuration.
+- Set message status, memory status.
+- Set and Get sms parameters
+
+       <h2 class="pg">Supplementary Service</h2>
+- Interrogation and activation for Call Barring, forwarding and waiting.
+- USSD services, AOC Services.
+
+       <h2 class="pg">Network Registration/Configuration</h2>
+- Search and Select Network.
+- Set and Get Selection Mode, Service Domain, network Mode and Band.
+- Get Network information.
+- For CDMA
+       - Get and Set CDMA Hybrid Mode
+       - Get and Set Roaming Mode, Preferred PLMN
+
+       <h2 class="pg">SIM</h2>
+- Handling SIM security procedure (PIN, PUK).
+- Get / Update / Delete SIM EF files.
+- Support 2G/3G Phonebook data.
+- SIM Lock Personalisation enable or disable
+- SIM lock enable or disable
+- SAP
+
+       <h2 class="pg">SAT (SIM Application Tool Kit)</h2>
+- Get main menu information from the SIM application
+- Send envelope commands to the SIM application
+- Send the execution results of which the SIM application requests to applications
+- Send UI / User confirmation to the SIM application
+
+       <h2 class="pg">Sound</h2>
+Sound that is related with voice call is used to control modem configuration
+- Sound user configuration
+- Voice path control
+- Volume control
+- Mic mute control
+
+       <h2 class="pg">Common</h2>
+
+- TAPI initialization & De-initialization
+- Register, Deregister event
+- TAPI Initialization & De-initialization for Ecore
+- Register, Deregister Ecore event
+- Request Connection name
+
+@}
+
+<h1 class="pg">Feature Description</h1>
+<h2 class="pg">COMMON</h2>
+
+@defgroup Use_Cases1_1 TAPI Initialization
+@ingroup Use_Cases1_COMMON
+@{
+<h3 class="pg">TAPI Initialization</h3>
+This API shall be used to initialize the TAPI library. This API internally performs initialization routines related to Event delivery.
+@n This API should be called before any other TAPI APIs. This API should be used by GTK/Glib applications.
+
+@code
+int tel_init (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapiinit()
+{
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_init Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases1_2 TAPI De-initialization
+@ingroup Use_Cases1_COMMON
+@{
+               <h3 class="pg">TAPI De-initialization</h3>
+This API shall be used to de initialize the Tapi library.
+@n It shall perform the deinitializing routines related to event delivery.
+@n The API shall be called finally, as a part of clean up routines. This API should be used by GTK/Glib applications.
+
+@code
+int tel_deinit (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapideinit()
+{
+       int api_err;
+
+       api_err = tel_deinit();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_deinit Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases1_3 Register Event
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Register Event</h3>
+API is used to register the callback function for a specific TAPI Event. Upon successful registration of the event, the function shall return a valid subscription id.
+
+If Application registers multiple callbacks for a specific event, then all the callbacks will be called when an event indication is received.
+@n This API should be used by GTK/Glib applications.
+
+@code
+int tel_register_event (int EventType , unsigned int * SubscriptionId, TelAppCallback AppCallBack);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+// REGISTER EVENT
+void registerevent()
+{
+       unsigned int subscription_id = 0;
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_init Failed - api_err = %d\n", api_err);
+       }
+
+       api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+
+       printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+       tel_register_app_name("org.tizen.appname");
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //Callback function to be called
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_4 Deregister Event
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Deregister Event</h3>
+API shall de-register the pre-registered TAPI event and the associated application callback, based on the subscription id.
+@n This identifier is the same as the subscription identifier returned to the application during the TAPI registration procedure. If the de-register API is called during any service requests, the registered callback will be cleared based on the subscription id. No application callback shall be called when any confirmation/indication events are received after de-registration.
+@n This API should be used by GTK/Glib applications.
+
+@code
+int tel_deregister_event ( unsigned int  SubscriptionId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+void registerevent()
+{
+       unsigned int subscription_id = 0;
+       int api_err;
+
+       api_err = tel_init();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_deregister_event Failed - api_err = %d\n", api_err);
+       }
+
+       // REGISTER EVENT
+       api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+       printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+       tel_register_app_name("org.tizen.appname");
+
+       // DEREGISTER EVENT
+       api_err = tel_deregister_event (subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("Event Deregistration Failed\n");
+       }
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       // callback function to be called
+}
+@endcode
+@}
+
+
+@defgroup Use_Cases1_5 TAPI Ecore Initialization
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI Ecore Initialization</h3>
+This API shall be used by Ecore based applications, to initialize TAPI library. This API internally performs event delivery related initialization routines. This API shall be called before any other TAPI APIs.
+@n This API is for applications using Ecore library.
+
+@code
+int tel_init_ecore_loop (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapiinitecore()
+{
+       int api_err;
+
+       api_err = tel_init_ecore_loop();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_init_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+
+5              <h3 class="pg">TAPI Ecore De-Initialization</h3>
+API shall be used to de-initialize the TAPI library. It shall be used by Ecore based applications.
+@n This API shall be called finally, as a part of cleanup routine. This API is for applications using Ecore library.
+
+@code
+int tel_deinit_ecore_loop (void);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void tapideinitecore()
+{
+       int api_err;
+
+       api_err = tel_deinit_ecore_loop();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_deinit_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_6 TAPI RegisterEvent Ecore
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">TAPI RegisterEvent Ecore</h3>
+API shall be used to register for TAPI events (for application that use EFL).
+@n Upon successful registration of the event, the API shall return a valid subscription id.
+@n If Application registers multiple callbacks for a specific event, then all the callbacks will be called when an event indication is received
+@n This API is for applications using Ecore library.
+
+@code
+int tel_register_event_at_ecore_loop(int EventType, unsigned int * SubscriptionId, TelAppCallback AppCallBack);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+void app_callback(TelTapiEvent_t *event);
+
+void registereventecore()
+{
+       int api_err;
+       unsigned int subscription_id = 0;
+
+       api_err = tel_register_event_at_ecore_loop (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TellAppCallback)&app_callback);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf ("tel_register_event_at_ecore_loop Failed - api_err = %d \n", api_err);
+       }
+       printf("RegisterEventEcore done with subscription_id:%d and return Status:%d\n", subscription_id, api_err);
+
+       tel_register_app_name("org.tizen.appname");
+}
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //Callback function to be called
+}
+@endcode
+@}
+
+
+@defgroup Use_Cases1_7 TAPI DeRegisterEvent Ecore
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI DeRegisterEvent Ecore</h3>
+API shall de-register the pre-registered TAPI event and the associated application callback, based on the subscription id.
+@n This identifier is the same as the subscription identifier returned to the application during the TAPI registration procedure.
+@n If the de-register API is called during any service requests, the registered callback will be cleared based on the subscription id. No application callback shall be called when any confirmation/indication events are received after de-registration.
+@n This API is for applications based on Ecore library.
+
+@code
+int tel_deregister_event_at_ecore_loop (unsigned int SubscriptionId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+Void deregistereventecore()
+{
+       int api_err;
+       unsigned int subscription_id = 0;
+
+       // REGISTER EVENT
+       api_err = tel_register_event_at_ecore_loop (TAPI_EVENT_CALL_SETUP_CNF, &subscription_id, (TellAppCallback)&app_callback);
+       printf("RegisterEventEcore done with subscription_id:%d and return Status:%d\n", subscription_id, api_err);
+
+       tel_register_app_name("org.tizen.appname");
+
+       // DEREGISTER EVENT
+       api_err = tel_deregister_event_at_ecore_loop (subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("tel_deregister_event_at_ecore_loop Failed - api_err = %d\n", api_err);
+       }
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_8 Register Application Name
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Register Application Name</h3>
+This function registers the application name which requests any telephony service. Telephony Server uses this name as the destination name of response message upon the service request. If the name is not set, the request will fails. Before an application invoke this function, it shall initialize a connection to Telephony Sever with #tel_init or #tel_init_ecore_loop. And the application name shall be registered prior to start a event loop.
+
+@code
+int tel_register_app_name(char *name)
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+
+Void register_app_name()
+{
+       tel_init();
+       //register telephony event
+       tel_register_event(...);
+       //...
+       tel_register_app_name("org.tizen.appname");
+       GMainLoop *loop = g_main_loop_new(NULL, false);
+       g_main_loop_run(loop);
+}
+@endcode
+@}
+
+@defgroup Use_Cases1_9 Get Application Name
+@ingroup Use_Cases1_COMMON
+@{
+
+               <h3 class="pg">Get Application Name</h3>
+This function get the application name which was registered with #tel_register_application_name.
+
+@code
+int tel_get_app_name(tapi_dbus_connection_name *app_name)
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+
+void get_app_name()
+{
+       tapi_dbus_connection_name app_name;
+       tel_get_app_name(&app_name);
+       printf("app_name = %s\n", app_name.name);
+}
+@endcode
+@}
+@defgroup Use_Cases1_10 TAPI Check service ready
+@ingroup Use_Cases1_COMMON
+@{
+
+       <h3 class="pg">TAPI Check service ready </h3>
+API is used to get the modem status i.e. whether modem is on or off.
+
+@code
+int tel_check_service_ready (int* bStatus)
+@endcode
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+
+void getmodemstatus()
+{
+       int bStatus = 0;
+       int err_code;
+
+       err_code = tel_check_service_ready(&bStatus);
+       if (err_code != TAPI_API_SUCCESS) {
+               printf("Error Code [%x]\n", err_code);
+       }
+       else {
+               if (bStatus == 0)
+                       printf("Telephony Service Not Ready";
+               else if (bStatus == 1)
+                       printf("Telephony Service Ready";
+       }
+}
+@endcode
+@}
+
+
+<h2 class="pg">CALL</h2>
+
+@defgroup Use_Cases2_1 Event Register and Deregister
+@ingroup Use_Cases2_CALL
+@{
+
+       <h3 class="pg">Event Register and Deregister</h3>
+To receive asynchronous event notifications for the call APIs, the registration of related events with their associated call backs is required. After these are registered, when an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+int api_err;
+unsigned int subscription_id = 0;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_CALL_CALL_SETUP_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VOICE CALL Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregistration Fail\n");
+}
+@endcode
+@}
+
+@defgroup Use_Cases2_2 Call Setup
+@ingroup Use_Cases2_CALL
+@{
+
+<h3 class="pg">Call Setup</h3>
+This API originates an MO call setup.
+
+@code
+int  tel_exe_call_mo _t (const TelCallSetupParams_t* const pParams, unsigned int  * pCallHandle, int * pRequestID);
+@endcode
+
+On success, this API returns a valid call handle and the request ID as out parameters.
+@n The MO call setup procedure continues in background. There are multiple states involved in the call setup procedure. Upon completion of the setup request, the event notifications and associated event data are sent to the client, based on the indication or response received by the Telephony Server.
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callsetup()
+{
+       int ret_status;
+       int pRequestID = 0;
+       unsigned int pCallHandle;
+       TelCallSetupParams_t pParams;
+       char normal[16] = "1234"; //Called party number
+
+       memset(&pParams, 0, sizeof(TelCallSetupParams_t));
+       pParams.CallType = TAPI_CALL_TYPE_VOICE;
+       strcpy(pParams.szNumber, normal);
+
+       ret_status = tel_exe_call_mo (&pParams, &pCallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       unsigned int temp_handle = 0;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_CALL_SETUP_CNF:
+                       printf("TAPI_EVENT_CALL_SETUP_CNF");
+                       memcpy(&temp_handle, EventData, sizeof(unsigned int));
+                       TEST_DEBUG("Received setup cnf for call Handle [%d]", temp_handle);
+
+                       break;
+
+               case TAPI_EVENT_CALL_ALERT_IND:
+                       int index;
+                       TEST_DEBUG("TAPI_EVENT_CALL_ALERT_IND");
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       TEST_DEBUG("Received Alert for call Handle [%d]", temp_handle);
+                       break;
+
+               case TAPI_EVENT_CALL_CONNECTED_IND:
+                       int index;
+                       TEST_DEBUG("TAPI_EVENT_CALL_CONNECTED_IND");
+                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+                       TEST_DEBUG("Received Connected Event  for call Handle [%d]", temp_handle);
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases2_3 Call Answer
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Answer</h3>
+This API responds to an incoming call either by accepting or rejecting the call.
+
+Pre Conditions:
+@n Call associated with the call handle should be in TAPI_CALL_STATE_INCOM state.
+@n There should be no more than one existing call.
+
+@code
+int  tel_answer_call (unsigned int CallHandle,TelCallAnswerType_t AnsType, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callsetup(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_answer_call (CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               //GET CALL HANDLE FROM INCOMING CALL EVENT DATA
+               case TAPI_EVENT_CALL_INCOM_IND:
+                       unsigned int CallHandle;
+                       TelCallIncomingCallInfo_t IncomingInfo;
+                       memcpy(&IncomingInfo, event->pData, sizeof(TelCallIncomingCallInfo_t));
+                       CallHandle = IncomingInfo.CallHandle;
+                       break;
+
+               case TAPI_EVENT_CALL_ANSWER_CNF:
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_ANSWER_CNF\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_4 Call Release
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Release</h3>
+This API is used to release the call.
+@n The call to be released can be a single call based on the call handle, or all active calls or all calls.
+
+Pre Conditions:
+@n Call handle should be valid and there should be an existing call in Active/hold state.
+
+@code
+int tel_release_call (unsigned int  CallHandle, int * pRequestID);
+int tel_release_call_all (int * pRequestId);
+int tel_release_call_all_active (int *pRequestID);
+int tel_release_call_all_held (int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callrelease(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_release_call (CallHandle, &pRequestID);
+       //OR
+       ret_status = tel_release_call_all (&pRequestID);
+       //OR
+       ret_status = tel_release_call_all_active (&pRequestID);
+       //OR
+       ret_status = tel_release_call_all_held (&pRequestID);
+
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       //...
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               //GET CALL HANDLE FROM INCOMING CALL EVENT DATA
+               case TAPI_EVENT_CALL_INCOM_IND:
+                       TelCallIncomingCallInfo_t IncomingInfo;
+                       memcpy(&IncomingInfo, event->pData, sizeof(TelCallIncomingCallInfo_t));
+                       CallHandle = IncomingInfo.CallHandle;
+                       break;
+
+               case TAPI_EVENT_CALL_RELEASE_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF:
+               case TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF:
+               case TAPI_EVENT_CALL_END_IND_IND:
+                       unsigned int handle;
+                       memcpy(&handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_RELEASE_CNF\n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_5 Call Hold
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Hold</h3>
+This API puts the specified call on hold. The call identified by Call Handle should be in the active state.
+
+@code
+int tel_hold_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callhold(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_hold_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_HOLD_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_HOLD_CNF\n");
+                       break;
+               //...
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases2_6  Call Retrieve
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Retrieve</h3>
+This API can be used to retrieve a held call.
+
+Pre Conditions:
+@n Call should be in held state in order to return to the active state, and no other call should be active.
+
+@code
+int tel_retrieve_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callretrieve(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID=0;
+
+       ret_status = tel_retrieve_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_HOLD_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_HOLD_CNF\n");
+                       break;
+
+               case TAPI_EVENT_CALL_RETRIEVE_CNF:
+                       unsigned int CallHandle;
+                       memcpy(&CallHandle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_RETRIEVE_CNF ");
+                       break;
+       }
+       //...
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases2_7  Call Swap
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Swap</h3>
+This API can be used to swap calls. This feature is only available for the calls that have been setup and answered using the Telephony service. The swap functionality is only available for voice calls.
+
+Pre Conditions:
+@n Two calls should be present, one of them in the Active state and the other in the held state
+
+@code
+int tel_swap_call (unsigned int CallHandle1, const TS_UINT CallHandle2, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+void callswap(unsigned int CallHandle1, unsigned int CallHandle2)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_swap_call(CallHandle1, CallHandle2, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //..
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SWAP_CNF:
+                       printf("TAPI_EVENT_CALL_RETRIEVE_CNF\n");
+                       break;
+       }
+       //..
+}
+//..
+@endcode
+@}
+@defgroup Use_Cases2_8 Send DTMF
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Send DTMF</h3>
+This API can be used for sending one or more DTMF digits during the call.
+
+Pre Conditions:
+@n Active call should be present.
+
+@code
+int tel_send_call_dtmf (char const * const pDtmfString, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void senddtmf()
+{
+       int ret_status;
+       int pRequestID = 0;
+       char DtmfString[10];
+
+       strcpy(DtmfString, "123456789"); //Sample DTMF digits that need to be sent
+
+       ret_status = tel_send_call_dtmf(DtmfString, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+static void app_callback(TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SEND_DTMF_CNF:
+                       printf("TAPI_EVENT_CALL_SEND_DTMF_CNF\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_9 Call Join
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Join</h3>
+This API joins the specified two calls (one call which is in the active state and other call which is in the held state) into a conference call.
+
+Pre Conditions:
+@n For a Multiparty call or for joining two calls into conference, there should be one call in active state and another call in held state.
+
+@code
+int tel_join_call (unsigned int CallHandle1, const unsigned int CallHandle2,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void calljoin(unsigned int CallHandle1, unsigned int CallHandle2)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status= tel_join_call(CallHandle1, CallHandle2, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+} //WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SETUPCONFERENCE_CNF:
+                       unsigned int temp_handle;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_SETUPCONFERENCE_CNF ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_10 Call Split
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call Split</h3>
+This API triggers the split of a single call from multiparty call. This can be used for creating a private communication with one of remote parties in a multiparty session.
+@n TAPI client application has to pass the call handle which should be split from the multiparty call.
+
+Pre Conditions:
+@n Call should be in multiparty conference call.
+
+Post Conditions:
+@n Split call will be the active call and the conference will be held call.
+
+@code
+int tel_split_call (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callsplit(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_split_call(CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI TAPI_EVENT_CALL_SPLITCONFERENCE_CNF:
+                       unsigned int temp_handle;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_SPLITCONFERENCE_CNF ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_11 Active Line
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Active Line </h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs for setting and getting the current calling line identification number.
+
+@code
+int tel_set_call_act_line const TelCallActiveLine_t active_line, int * pRequestID);
+int tel_get_call_act_line ( int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SET ACTIVE LINE
+void activeline()
+{
+       int ret_status;
+       int pRequestID = 0;
+       TelCallActiveLine_t g_curLine = TAPI_CALL_ACTIVE_LINE1;
+       TelCallActiveLine_t active_line;
+
+       printf (" Set Active Line with TAPI_ACTIVE_LINE1.");
+
+       ret_status = tel_set_call_act_line (g_curLine, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+
+       //GET ACTIVE LINE
+       ret_status = tel_get_call_act_line (&pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //..
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_SET_LINEID_CNF:
+                       //TEST_DEBUG("Received TAPI_EVENT_CALL_SET_LINEID_CNF");
+                       //AUTO_LOG("EVENT: SET_LINEID_CNF:");
+                       break;
+
+               case TAPI_EVENT_CALL_GET_LINEID_CNF:
+                       TelCallActiveLine_t active_line;
+                       memcpy(&active_line, event->pData, sizeof(TelCallActiveLine_t));
+                       TEST_DEBUG("Received TAPI_EVENT_CALL_GET_LINEID_CNF");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_12  Call transfer
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call transfer</h3>
+This API triggers an explicit call transfer by connecting two parties, one of which is in the active state with the other in the held state.
+
+Pre Conditions:
+@n In order to call transfer, 2 calls should be present. One in the active state and the other in the Held state.
+
+Post Conditions:
+@n When the request has been completed successfully, Call end indication will be sent to both the calls (active and held).
+
+@code
+int tel_exe_call_explicit_transfer (unsigned int CallHandle, int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void calltransfer(unsigned int CallHandle)
+{
+       int ret_status;
+       int pRequestID = 0;
+
+       ret_status = tel_exe_call_explicit_transfer (CallHandle, &pRequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       //..
+       switch (eventType) //REFER Call Setup TO GET eventType
+       {
+               case TAPI_EVENT_CALL_TRANSFER_CNF:
+                       unsigned int temp_handle = 0;
+                       memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+                       printf("TAPI_EVENT_CALL_TRANSFER_CNF. ");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases2_13 Get Call Status
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Status</h3>
+When call status is requested by the application, this API gets the status of the call associated with the input Call Handle. Call status information consists of destination number, call direction (MO or MT), call type (voice or data etc), multiparty state (whether the call is in conference state or not) and present call state.
+@n Call handle must be valid.
+
+@code
+int tel_get_call_status (unsigned int CallHandle, TelCallStatus_t * pCallStatus)
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcallstatus(unsigned int CallHandle)
+{
+       int ret_status;
+       TelCallStatus_t callStatus;
+
+       ret_status = tel_get_call_status(CallHandle, &callStatus);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("CallNumber: %s\n", callStatus.pNumber);
+               printf("Is Mobile Originated:%d n\t CallType : %d \n\t CallActiveState: %d\n\t CallState : %d\n\t isConferenceState:%d \n",
+                               callStatus.bMoCall,
+                               callStatus.CallType,
+                               callStatus.CallActiveState,
+                               callStatus.CallState,
+                               callStatus.bConferenceState);
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_14  Get Call Duration
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Duration</h3>
+This API gets the duration of the specified call.
+@n This is a synchronous API. Duration is timed from the moment the connection is established, i.e. call goes into active state for first time. The total call duration is provided in seconds, from the call connecting time to the current time.
+
+@code
+int tel_get_call_duration unsigned int CallHandle, unsigned int * pDurationInSecs);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcallduration(unsigned int CallHandle)
+{
+       int ret_status;
+       unsigned int duration;
+
+       ret_status = tel_get_call_duration (CallHandle, &duration);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("Call Duration : %d Seconds\n", duration);
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_15 Get Call Conference List
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Get Call Conference List</h3>
+This is a synchronous API which returns information about all the call handles and the total number of call handles, within the specified conference call.
+
+Pre Conditions:
+@n Call should be a multi-party conference call in order to return actual number of calls and call handles in the conference call.
+
+@code
+int tel_get_call_conf_list(unsigned int  CallHandle,  unsigned int * pCallList, int * pNoOfCalls);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getconferencelist(unsigned int CallHandle)
+{
+       int ret_status ;
+       unsigned int callList[5];
+       int  noOfCalls;
+
+       ret_status = tel_get_call_conf_list(CallHandle, callList, &noOfCalls);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+               printf("\n No.of Calls %d, \n", noOfCalls);
+               for (i = 0; i < noOfCalls; i++)
+               {
+                       printf("\n Call Handle in conference calls %d \n", callList[i]);
+               }
+       }
+       else {
+               printf("error=%d\n", ret_status);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_16 Voice Privacy Mode
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Voice Privacy Mode</h3>
+Telephony provides two APIs which can be used to set and get the CDMA voice privacy mode .
+
+@code
+int tel_get_call_privacy_mode (TelCallVoicePrivacyInfo_t PrivacyInfo, int *pRequestID);
+int tel_set_call_privacy_mode (TelCallPrivacyType_t PrivacyType, int *pRequestID);
+@endcode
+
+This API is restricted for direct use.  Use the Voice call engine API instead.
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//SetVoicePrivacyMode
+void setvoiceprivacymode()
+{
+       int ReqId = -1;
+       int ret_status = -1;
+       int api_err;
+       TelCallPrivacyMode_t PrivacyMode_info;
+
+       pPrivacyMode_info = TAPI_CALL_PRIVACY_MODE_STANDARD;
+
+       ret_status = tel_set_call_privacy_mode (pPrivacyMode_info, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+bool call_app_callback (TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType) {
+                       case TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF:
+                               if (RequestId != reqId) {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS) {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+
+//GetVoicePrivacyMode
+void getprivacymode()
+{
+       Int ReqId = -1;
+       int ret_status = -1;
+       int api_err;
+       TelCallPrivacyType_t privacyType;
+
+       privacyType = TAPI_CALL_PRIVACY_TYPE_MS;
+
+       ret_status = tel_get_call_privacy_mode (privacyType, &req_id);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+bool call_app_callback (TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType) {
+                       case TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF:
+                               TelCallVoicePrivacyInfo_t vp_info;
+                               memcpy(&vp_info, event->pData, sizeof(TelCallVoicePrivacyInfo_t));
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases2_17 Call FlashInformation
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Call FlashInformation</h3>
+The user makes an additional outgoing call in CDMA, this API is used instead of the CALL Outgoing API because there is no additional voice call transaction in CDMA. So the voice call id is only one in CDMA. The multiparty call is not supported in CDMA.
+
+@code
+int tel_exe_call_flash_info (const char* pDialNumber, int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+//CallFlashInfo
+void callflashinfo()
+{
+       int ret_status = -1;
+       int api_err;
+       const char *pDialNumber = "9999900000";
+
+       ret_status = tel_exe_call_flash_info(pDialNumber, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+bool call_app_callback(TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType)
+               {
+                       case TAPI_EVENT_CALL_FLASHINFO_CNF:
+                               if (RequestId != reqId)
+                               {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               printf("\n Received TAPI_EVENT_CALL_FLASHINFO_CNF \n");
+                               break;
+
+               }
+       }
+       return true;
+}
+@endcode
+@}
+@defgroup Use_Cases2_18 Getting Call Time
+@ingroup Use_Cases2_CALL
+@{
+
+               <h3 class="pg">Getting Call Time</h3>
+This API is used to query information about a call time and call count.
+
+@code
+int tel_get_call_time (const TS_WORD req_mask, int *pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Voice call engine API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <ITapiCall.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcalltime()
+{
+       int ret_status = -1;
+       int api_err;
+       TelCallTimeMaskType_t mask_byte1;
+       TelCallTimeMaskType_t mask_byte2;
+       unsigned short mask_type;
+
+       mask_byte1 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT;
+       mask_byte2 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME;
+
+       mask_type = (mask_byte1 | mask_byte2);
+
+       ret_status = tel_get_call_time(mask_type, &reqId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+bool call_app_callback(TelTapiEvent_t *Event)
+{
+       int ret = -1;
+       int eventClass = Event->EventClass;
+       int eventType = Event->EventType;
+       int RequestId = Event->RequestId;
+       int Status = Event->Status;
+
+       if (eventClass == TAPI_EVENT_CLASS_CALL_VOICE)
+       {
+               switch (eventType)
+               {
+                       case TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF:
+                               if (RequestId != reqId)
+                               {
+                                       printf("Invalid RequestID received %d \n", reqId);
+                                       return false;
+                               }
+
+                               if (Status != TAPI_CAUSE_SUCCESS)
+                               {
+                                       printf("Invalid Status value received");
+                                       return false;
+                               }
+                               break;
+               }
+       }
+}
+@endcode
+@}
+
+<h2 class="pg">SUPPLEMENTARY SERVICE </h2>
+@defgroup Use_Cases3_1 Event register and deregister
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the SS APIs, the registration of related events with their associated call backs is required. After these are registered, when an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_SS_WAITING_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("SS Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregisteration Fail\n");
+}
+@endcode
+@}
+@defgroup Use_Cases3_2 Call Barring
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+               <h3 class="pg">Call Barring </h3>
+Telephony provides APIs to activate/deactivate call barring, get the barring status and change the barring password. It also provides APIs for applications to provide barring password requested by network for Call Barring Request or Change barring password request.
+@n This service makes it possible for a mobile subscriber to activate barring for certain categories of outgoing or incoming calls. It also allows the deactivation of call barring based on categories set.
+@n The mobile subscriber may also determine the type of barring preferrred for incoming/outgoing calls, by subscribing to a set of one or more unique barring programs .
+
+@code
+int   tel_set_ss_barring (const  TelSsCallBarringInfo_t *pBarringInfo, int * pRequestId);
+int   tel_get_ss_barring_status (TelSsCallBarType_t  BarType, TelSsCallType_t  CallType,  int * pRequestId )
+int   tel_change_ss_barring_password ( const char*  pOldPassword,const char*  pNewPassword,const char * pNewPasswordAgain, int *  pRequestId);
+@endcode
+
+SAMPLE CODE FOR CALL BARRING
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callbarring()
+{
+       int ret_status = -1;
+       TelSsCallBarringInfo_t BarringInfo;
+       int RequestId = 0;
+       char *bar_pwd = "0000";
+
+       BarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       BarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+       BarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(BarringInfo.szPassword, bar_pwd);
+
+       ret_status = tel_set_ss_barring (&BarringInfo, &RequestId);
+       if (ret_status == TAPI_API_SUCCESS) {
+               printf("successful\n");
+       }
+       else {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_CNF:
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+                       printf("Received Event :TAPI_EVENT_SS_BARRING_CNF\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR BARRING STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+void callbarringstatus()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       TelSsCallBarType_t BarType = TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       int pRequestId = 0;
+
+       ret_status = tel_get_ss_barring_status (BarType, CallType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF:
+                       printf(" Received Event :TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF \n");
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++) {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n", i,
+                                               SsInfo.SsRecord.BarringRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.BarringRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.BarringRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("  Status: Active \n");
+                               else
+                                       printf("Status: Not Active \n");
+                       }
+
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CHANGING BARRING PASSWORD
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void changebarpwd()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_change_ss_barring_password ("0000", "0000", "0000", &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF:
+                       printf("Received Event : TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF\n");
+                       //check data
+                       //
+                       printf("Call barring Password Changed successfully\n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_3 Call Forward
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Call Forward</h3>
+These APIs are used to set (activate/deactivate) the call forwarding option at the Network and to get call forward status. Call forwarding allows a user to forward incoming calls to another party. This service permits a called mobile subscriber to have the network send all incoming calls, or just those associated with a specific Basic service group meeting various call FORWARD conditions, to another directory number. The ability of the served mobile subscriber to originate calls is unaffected. If the service is activated, a call is forwarded only if the enabled forward condition is satisfied.
+@n Application has to call this API in order to explicitly register/erase/activate/deactivate the call forwarding. Request will be sent irrespective of whether another SS call forward is already ongoing.
+
+@code
+int   tel_set_ss_forward ( const  TelSsForwardInfo_t *pForwardInfo, int * pRequestId);
+int   tel_get_ss_forward_status (TelSsForwardType_t Type, TelSsForwardWhen_t Condition, int *  pRequestId);
+@endcode
+
+SAMPLE CODE FOR CALL FORWARD
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED INEvent Register and Deregister
+void callfwd()
+{
+       int ret_status = 0;
+       int pRequestId = 0;
+       TelSsForwardInfo_t pForwardInfo;
+
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       int len;
+       char *cf_number = "9986529874"; //number to which calles need to be forwarded.
+
+       len = strlen(cf_number);
+       printf("Length of CF number :%d \n", len);
+       memcpy(&(pForwardInfo.szPhoneNumber), cf_number, len);
+
+       ret_status = tel_set_ss_forward (&pForwardInfo, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId,i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //REFER Call Barring TO GET eventType AND EventData
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_FORWARD_CNF:
+                       printf("Received Event :TAPI_EVENT_SS_FORWARD_CNF \n");
+                       TelSsInfo_t SsInfo;
+
+                       if (EventData != NULL) {
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+                               printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                       }
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                       printf("Status: Registered \n");
+                               else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("Status: Active \n");
+                               else
+                                       printf("Status: Not Registered /Not Active\n");
+                       }
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CALL FORWARD STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callfwdstatus()
+{
+       int ret_status = 0;
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       int pRequestId = 0;
+
+       ret_status = tel_get_ss_forward_status(Type, Condition, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF:
+                       // REFER Call Barring TO GET eventType AND EventData
+                       TelSsInfo_t SsInfo;
+
+                       if (EventData != NULL)
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n",SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                       printf(" Status: Registered      \n");
+                               else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("  Status: Active   \n");
+                               else
+                                       printf("    Status: Not Registered /Not Active     \n");
+                       }
+                       break;
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases3_4 Call Waiting
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Call Waiting</h3>
+These APIs activate/deactivate the call waiting service and provide the status of call wait feature. The call waiting service permits a mobile to be notified of an incoming call (as per basic call procedures) whilst the traffic channel is not available for the incoming call or when the mobile subscriber is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+
+@code
+int   tel_set_ss_waiting ( const TelSsWaitingInfo_t *waitInfo, int * RequestID);
+int   tel_get_ss_waiting_status ( const TelSsCallType_t CallType, int * RequestID);
+@endcode
+
+SAMPLE CODE FOR CALL WAITING
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callwaiting()
+{
+       int ret_status;
+       int RequestID;
+       TelSsWaitingInfo_t waitInfo;
+
+       waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+
+       ret_status = tel_set_ss_waiting (&waitInfo, &RequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_WAITING_CNF:
+                       printf("Received Event : TAPI_EVENT_SS_WAITING_CNF  \n");
+                       //REFER Call Barring TO GET eventType AND EventData
+
+                       TelSsInfo_t SsInfo;
+
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("Status: Active      \n");
+                               else
+                                       printf(" Status: Not Active   \n");
+                       }
+                       break;
+               //...
+       }
+}
+@endcode
+
+SAMPLE CODE FOR CALL WAITING STATUS
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void callwaiting()
+{
+       int ret_status;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       int RequestID=0;
+
+       ret_status = tel_get_ss_waiting_status(CallType, &RequestID);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF:
+                       printf("Received Event :TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF\n");
+                       //REFER Call Barring TO GET eventType AND EventData
+
+                       TelSsInfo_t SsInfo;
+                       if (EventData != NULL)
+                               memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+
+                       for (i=0; i<SsInfo.NumberOfRecords; i++)
+                       {
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf(" Status: Active      \n");
+                               else
+                                       printf("Status: Not Active   \n");
+                       }
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_5 CLI Service Status
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">CLI Service Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides an API to query the status of calling line identity service. The CLI service permits a mobile to show or hide his identity to the called party.
+
+@code
+int   tel_get_ss_cli_status (TelSsCliType_t CliType,int * pRequestId );
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void cliservicestatus()
+{
+       int ret_status;
+       TelSsCliType_t CliType = TAPI_SS_CLI_CDIP;
+       int pRequestId;
+
+       ret_status = tel_get_ss_cli_status (CliType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       Int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       // TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType)
+       {
+               //REFER Call Barring TO GET eventType AND EventData
+
+               case TAPI_EVENT_SS_IDENTIFY_IND:
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)EventData, sizeof(TelSsInfo_t));
+                       printf("Received Event : TAPI_EVENT_SS_IDENTIFY_IND \n");
+                       printf("Status :%d   CLI Service : %d\n",
+                                       SsInfo.SsRecord.CliRecord.CliStatus,
+                                       SsInfo.SsRecord.CliRecord.IdentificationType);
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_6 Send USSD Request
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Request </h3>
+This API is used to send a USSD string to the Network. This is an Asynchronous API.
+
+Pre Conditions:
+@n No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application with an error (USSD_BUSY)
+
+@code
+int  tel_send_ss_ussd_request( const char* szUssdString, int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdreq()
+{
+       char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+       int ret;
+
+       memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+       strcpy(ussdString, "*124#");
+
+       ret = tel_send_ss_ussd_request (ussdString, &request_id);
+
+       ret = tel_send_ss_ussd_request (pAppMsg, &pRequestId);
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       TelSsUssdMsgIndInfo_t UssdRecord;
+                       memcpy(&UssdRecord, (TelSsInfo_t*)EventData, sizeof(TelSsUssdMsgIndInfo_t));
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+               //..
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_7 Send USSD Response
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Response</h3>
+This API is used to send a User response to the Network. This is an Asynchronous API.
+
+Pre Conditions:
+No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application with an error (USSD_BUSY)
+@code
+int  tel_send_ss_ussd_response( const TelSsUssdMsgRspInfo_t* ussdRspRecord, int * RequestID);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdresp()
+{
+       char *ussd_str = "*123*0#";
+       int ret = 0;
+       int pRequestId = 0;
+
+       TelSsUssdMsgRspInfo_t *ussdRspRecord;
+
+       ussdRspRecord = (TelSsUssdMsgRspInfo_t*)malloc(sizeof(TelSsUssdMsgRspInfo_t));
+       ussdRspRecord->SsRespType = TAPI_USSD_RES_OK;
+       ussdRspRecord->IndType = TAPI_USSD_IND_NOTIFY;
+       ussdRspRecord->UssdInfo.Dcs = 0x0f;
+       ussdRspRecord->UssdInfo.RequestedBySAT = 0;
+       strncpy(ussdRspRecord->UssdInfo.szUssdString, ussd_str, TAPI_SS_USSD_DATA_SIZE_MAX);
+       ussdRspRecord->UssdInfo.szUssdString[strlen(ussdRspRecord->UssdInfo.szUssdString)] = '\0';
+       ussdRspRecord->UssdInfo.UssdStringLength = strlen(ussd_str);
+
+       ret = tel_send_ss_ussd_response (ussdRspRecord, &pRequestId);
+       printf ("The return value is %d\n", ret);
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       TelSsUssdMsgIndInfo_t UssdRecord;
+                       memcpy(&UssdRecord, (TelSsInfo_t*)EventData, sizeof(TelSsUssdMsgIndInfo_t));
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_8 Send USSD Cancel Request
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">Send USSD Cancel Request </h3>
+This API sends a USSD cancel request to the Network to release USSD session.
+
+Pre Conditions:
+@n SS and USSD Transaction should be ongoing.
+
+@code
+int  tel_send_ss_ussd_cancel ( int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sendussdcancelreq()
+{
+       char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+       int ret;
+       int requestId = 0;
+
+       memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+       strcpy(ussdString, "*124#");
+
+       ret = tel_send_ss_ussd_request(ussdString, &requestId);
+       printf ("The return value is %d\n", ret);
+
+       ret = tel_send_ss_ussd_cancel(&equestId);
+       printf ("The return value is %d\n", ret);
+}
+
+//WAIT FOR THE EVENTS  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]          \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_USSD_CNF:
+                       printf("got event : TAPI_EVENT_SS_USSD_CNF:\n");
+                       //...
+                       break;
+
+               case TAPI_EVENT_SS_USSD_CANCEL_CNF:
+                       printf("got event : TAPI_EVENT_SS_USSD_CANCEL_CNF:\n");
+                       //...
+                       break;
+
+               //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases3_9 AOC Info
+@ingroup Use_Cases3_SUPPLEMENTARY_SERVICE
+@{
+
+
+               <h3 class="pg">AOC Info</h3>
+These APIs set and read AOC parameter values on the SIM.
+
+Pre Conditions:
+@n Advice of charge feature is dependent on the SIM for setting or reading aoc parameters. Setting of AOC requires PIN2 Verification
+
+@code
+int  tel_get_ss_aoc_info ( TelSsAocType_t AocType, int * pRequestId);
+int  tel_set_ss_aoc_info ( TelCallAocInfo_t * pAocSetInfo, int * pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSS.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//Complete PIN2verification process as mentioned in SIM
+void aocinforeq()
+{
+       //set aoc
+       printf(" Resetting Total Cost  \n");
+
+       TelCallAocInfo_t *pAocSetInfo;
+       int request_id;
+       int ret_status = 0;
+
+       pAocSetInfo = (TelCallAocInfo_t *)calloc(1, sizeof(TelCallAocInfo_t));
+       pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
+
+       ret = tel_set_ss_aoc_info (pAocSetInfo, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+
+//WAIT FOR THE EVENT  HERE
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_SET_AOC_CNF:
+                       printf("Received Event : SS -- TAPI_EVENT_SS_SET_AOC_CNF\n");
+                       break;
+       }//...
+}
+
+//read aoc
+void readaoc()
+{
+       TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
+
+       ret_status = tel_get_ss_aoc_info (AocType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+}
+//WAIT FOR THE EVENT  HERE
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_AOC_RSP:
+                       TelCallAocInfo_t aoc_info;
+                       memcpy(&aoc_info, (TelCallAocInfo_t*)EventData, sizeof(TelCallAocInfo_t));
+                       printf("Received Event : SS -- TAPI_EVENT_SS_AOC_RSP\n");
+                       printf(" AOC TYPE :%d\n", aoc_info.AocType);
+                       break;
+       }
+
+}//...
+@endcode
+@}
+
+       <h2 class="pg">SMS</h2>
+
+@defgroup Use_Cases4_1 Event register and deregister
+@ingroup Use_Cases4_SMS
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the SMS APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+@nSMS in the telephony framework only provides an interface to the modem and doesn’t handle Transport layer, storing and deleting the SMS in the storage except SIM. Because of this we recommend you shouldn’t access this API directly, and should use the MAPI of Message Framework instead.
+
+Notification Events are as follows.
+@code
+TAPI_EVENT_NETTEXT_INCOM_IND
+TAPI_EVENT_NETTEXT_CB_INCOM_IND
+TAPI_EVENT_NETTEXT_INCOM_EX_IND
+TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND
+TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND
+TAPI_EVENT_NETTEXT_DEVICE_READY_IND
+@endcode
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+api_err = tel_register_event(TAPI_EVENT_NETTEXT_SENTSTATUS_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("Nettext Class registration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregistration Fail\n");
+}
+
+// SMS notification callback function
+void app_callback(void)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf(" app _callback is called \n");
+
+       print_events((int)eventType);
+       printf("\n event came in power_callback [%d] \n", eventType);
+       printf("\n expected event is  in callback [%d] \n", expected_event);
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETTEXT_INCOM_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_IND:
+                       TelSmsCbMsg_t *ptrCbMsgInfo;
+                       printf("SMS Cell Broadcasting Incoming Message\n");
+                       ptrCbMsgInfo = (TelSmsCbMsg_t *)EventData;
+                       // Decoding Cell broadcasting Message in szData [Refer to 3GPP TS23.041 9.4.1]
+                       break;
+
+               case TAPI_EVENT_NETTEXT_INCOM_EX_IND:
+                       TelSmsMsgInfo_t *pMsgInfo;
+                       printf("CDMA SMS Incoming Message\n");
+                       pMsgInfo = (TelSmsMsgInfo_t *)EventData;
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND:
+                       TelSmsMsgInfo_t *pMsgInfo = NULL;
+                       printf("CDMA SMS Incoming Message\n");
+                       pMsgInfo = (TelSmsMsgInfo_t *)EventData;
+                       // Decoding Cell broadcasting Message in szData
+                       break;
+
+               case TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND:
+                       int *status = NULL;
+                       printf("SIM Memory Status Notification\n");
+                       status = (TelSmsMemStatusType *)EventData;
+                       if (*status == TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE)
+                               printf("SIM Memory Available\n");
+                       else if (*status == TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL)
+                               printf("SIM Memory Full\n");
+                       else
+                               printf("Unknown Type\n");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DEVICE_READY_IND:
+                       int *pDeviceReady = NULL;
+                       printf("SMS Device Ready Status Notification\n");
+                       pDeviceReady = (int*)EventData;
+                       if (pDeviceReady->Result == 1)
+                               printf("Device Ready\n");
+                       else
+                               printf("Unknown Type\n");
+                       break;
+       }
+       return;
+}
+@endcode
+@}
+@defgroup Use_Cases4_2 Send SMS
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Send SMS</h3>
+Telephony provides an API to send an SMS to the network. This API allows the transmission of an SMS PDU as defined by 3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to the lower layers. If there is a need to send multiple parts of a concatenated message, this API requests for a dedicated link, through the input parameter MoreMessageToSend, from the lower layers. This will ensure the lower layers do not release the dedicated connection if there are more messages expected.
+
+@code
+int tel_send_sms (const TelSmsDatapackageInfo_t* pDataPackage, int bMoreMsgToSend, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void send_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       TelSmsDatapackageInfo_t *pDataPackage;
+       int ret_status;
+       int pRequestId = 0;
+
+       pDataPackage = (TelSmsDatapackageInfo_t *)malloc(sizeof(TelSmsDatapackageInfo_t));
+
+       //fill the structure appropriately
+       //Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
+       //MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
+
+       ret_status = tel_send_sms (pDataPackage, 0, &pRequestId);
+       if  (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR THE EVENT  HERE
+}
+
+static void app_callback (TelTapiEvent_t* event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) {
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_SENTSTATUS_CNF $$$\n");
+                       // Extract the Event Data here
+
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_3 Send SMS Message
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Send SMS Message</h3>
+This API is used to send an SMS message to the network. This API allows the transmission of an SMS PDU as defined by 3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to the lower layers. If there is a need to send multiple parts of a concatenated message, this API requests for a dedicated link, through the input parameter MoreMessageToSend, from the lower layers. This will ensure the lower layers do not release the dedicated connection if there are more messages expected. This is currently supported in CDMA.
+
+@code
+int tel_send_sms_msg (const TelSmsMsgInfo_t* pSmsMsgInfo,unsigned int MoreMsgToSend, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void send_sms_ex()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int requestId = 0;
+       TelSmsMsgInfo_t pMsgInfo;
+       char* diallingNum;
+       int dialNumLen;
+       TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+
+       memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+       pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT;
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+       //fill structure appropriately
+
+       ret_status = tel_send_sms_msg (pDataPackage, 0, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+}
+//WAIT FOR EVENT HERE
+//CALLBACK FUNTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) {
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF $$$\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_4 Read SMS
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Read SMS</h3>
+This API reads a message from SIM card storage. You should not access this API directly; instead use the Message Framework API.
+
+@code
+int  tel_read_sms_in_sim(int Index, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void read_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_read_sms_in_sim(0, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("Error  = %d \n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_READ_SMS_CNF:
+                       TelSmsData_t *pReadData;
+                       printf("\n$$Read Msg Notification $$$\n");
+                       pReadData = (TelSmsData_t *) event->pData;
+                       printf("\n$$Read Msg index = [%d] $$$\n", pReadData->SimIndex);
+                       printf("\n$$Read Msg status = [%d] $$$\n", pReadData->MsgStatus);
+                       // TPDU
+                       // pReadData->SmsData.szData
+
+                       break;
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases4_5 Write Sms
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Write Sms</h3>
+This API writes a message to SIM storage area.
+@n The parameter of this API is changed into TelSmsData_t.
+@n If SIM index in TelSmsData_t is -1, SMS message is stored at the first empty SIM index . The contents of szData is SMS-SUBMIT, SMS-DELIVER or SMS-STATUS REPORT TPDU. You should not access this API directly; use the Message Framework API.
+
+@code
+int   tel_write_sms_in_sim(const TelSmsData_t *pWriteData, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void write_sms()
+{
+       // SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       TelSmsData_t *pWriteData;
+       int pRequestId = 0;
+       char *msg = "This is an Test SMS";
+       char *SCA = "821091";
+
+       pWriteData = malloc(sizeof(TelSmsData_t));
+       if (pWriteData == NULL) {
+               printf("Memory Allocation fails\n");
+               return;
+       }
+
+       // conv_service_center_address(pWriteData->SmsData.Sca, SCA);
+       // conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg);
+       pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
+       pWrite-> SimIndex = -1;
+
+       ret_status = tel_write_sms_in_sim (pWriteData, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF:
+                       int *SimIndex = NULL;
+                       printf("\n***************************************\n");
+                       printf("\n$$Save Status Notification$$\n");
+                       SimIndex = (int *)EventData;
+                       printf("SIM Index stored SMS is [%d]\n", *SimIndex);
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_6 Delete Sms
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Delete Sms</h3>
+This API deletes a message specified by the index (SIM index used when storing the sms) number or all the messages in the SIM storage area. If SIM index is -1, all SMS stored in SIM are deleted. You should not access this API directly; use the Message Framework API.
+
+@code
+int tel_delete_sms_in_sim(int Index, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void delete_sms()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_delete_sms_in_sim(1, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$Delete Notification$$$\n");
+                       break;
+       }
+       //..
+}
+@endcode
+@}
+@defgroup Use_Cases4_7 Getting Sms Count
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting Sms Count</h3>
+This API is used to retrieve message count information such as Total record count, used record count and the indices list for SIM Storage. You should not access this API directly; use the Message Framework API.
+
+@code
+int tel_get_sms_count (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_count()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_count (&pRequestId);
+       if  (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_COUNT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GetMsgCountNotification$$$$\n");
+                       MsgCountNotification(tapiEvent.pData);
+                       break;
+       }
+       //..
+}
+void MsgCountNotification (char *pData)
+{
+       static TelSmsStoredMsgCountInfo_t *countInfo;
+       int loop_counter = 0;
+       int returnStatus;
+       countInfo = (TelSmsStoredMsgCountInfo_t *)pData;
+       int requestId = 0;
+
+       if (countInfo->UsedCount != 0x00)
+       {
+               fprintf(stderr, "Index LIST..........\n");
+               for (loop_counter  = 0; loop_counter < countInfo->UsedCount; loop_counter++)
+               {
+                       fprintf(stderr, "[%02x]", countInfo->IndexList[loop_counter]);
+                       returnStatus = tel_read_sms_in_sim (countInfo->IndexList[loop_counter], &requestId);
+                       printf("After read msg: returnstatus %d request id is %d\n", returnStatus, requestId);
+               }
+               printf("In MsgCountNotification total cnt is %d, usedcnt is %dapi_err %d\n",
+                               countInfo->TotalCount,
+                               countInfo->UsedCount,
+                               returnStatus);
+       }
+
+       printf("In MsgCountNotification total cnt is %d, usedcnt is %d\n", countInfo->TotalCount, countInfo->UsedCount);
+}
+@endcode
+@}
+@defgroup Use_Cases4_8 Setting Sms CB message
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Sms CB message</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used to set the SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM. This API also indicates the underlying provider to enable or disable CB Channel on which CB messages are received. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_cb_config(const TelSmsCbConfig_t *pCBConfig, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_cbconfig()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsCbConfig_t *pCBConfig = NULL;
+
+       pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
+       pCBConfig->bCBEnabled = 1;
+       pCBConfig->SelectedId = 0x01;
+       pCBConfig->MsgIdCount = 0x02;
+
+       pCBConfig->MsgIDs[0] = 0x0c;
+       pCBConfig->MsgIDs[1] = 0x0c;
+       pCBConfig->MsgIDs[2] = 0xdf;
+       pCBConfig->MsgIDs[3] = 0x00;
+
+       ret_status = tel_set_sms_cb_config(pCBConfig, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_CBSETCONFIG_RSP) {
+                               printf("\n$$$$$$   SET CB CONFIRMATION $$$$$$ \n");
+                       }
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases4_9 Getting Sms CB configuration
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting Sms CB configuration</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used to retrieve SMS CB configuration options from EFcbmi file in the SIM. You should not access this API directly; use the Message Framework API.
+
+@code
+TapiResult_t    tel_get_sms_cb_config (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_cbconfig()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       ret_status = tel_get_sms_cb_config (&pRequestId);
+
+       printf ("The return value is %d\n", ret_status);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$GET CB Config$$$\n");
+                       GetCBNotification(tapiEvent.pData);
+                       break;
+       }
+       //..
+}
+
+void GetCBNotification (char *pData)
+{
+       TelSmsCbConfig_t *CBConfig;
+       int i = 0;
+
+       CBConfig = (TelSmsCbConfig_t *) pData;
+       printf("=========CB Configuration=========\n");
+
+       // CB Enable/Diable
+       if (CBConfig->bCBEnabled == 0x01)
+               printf("Cell Broadcast Msg Enabled...\n");
+       else if (CBConfig->bCBEnabled == 0x02)
+               printf("Cell Broadcast Msg Disabled...\n");
+
+       // Selected ID
+       if (CBConfig->SelectedId == 0x01)
+               printf("All CBMI is selected... \n");
+       else if (CBConfig->SelectedId == 0x02)
+               printf("There are some selected CBMI...\n");
+
+       // CBMI  Count
+       printf("CBMI Count: %d \n\n", CBConfig->MsgIdCount);
+       // CBMI  List
+       if (CBConfig->MsgIdCount != 0)
+       {
+               printf("----- CBMI List -----\n");
+               for (i=0; i < CBConfig->MsgIdCount; i++)
+               {
+                       printf("No.%d - [0x%04x]\n", i, CBConfig->MsgIDs[i]);
+               }
+       }
+}
+//...
+@endcode
+@}
+@defgroup Use_Cases4_10 Service Center Address
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Service Center Address</h3>
+This API sets the SMS Service Centre Address information in order to send the SMS.
+@n It is also possible to get current SMS Service Centre Address information. Currently Only index 0 is supported in Aquila’s Telephony OEM Plugin. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_sca(const TelSmsAddressInfo_t *pSCA, int Index, int *pRequestId);
+int  tel_get_sms_sca (int Index, int *pRequestId)
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_sca()
+{
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       BYTE scabuf[512];
+       char scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+       BYTE scaNum_len = 0;
+       TelSmsAddressInfo_t *sc_addr = NULL;
+       BYTE packet[500];
+       int idx = 0;
+       int i;
+
+       printf("***Setting the SCA(Api:SetSCA)****\n");
+       sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
+       memset(sc_addr, 0, sizeof(sc_addr));
+       memset(scaNum, 0, sizeof(scaNum));
+       memset(scabuf, 0, sizeof(scabuf));
+       sprintf(scaNum, "821091");
+       scaNum_len = strlen(scaNum);
+       scaNum_len = strlen(scaNum);
+       scaNum[scaNum_len] = 0;
+       scaNum_len = scaNum_len - 1;
+
+       printf("==========================\n");
+       printf("Sca Number :%s\n", scaNum);
+       printf("sca  number length : %d \n", scaNum_len);
+       printf("==========================\n");
+
+       //idx = SmsUtilEncodeAddrField( packet, scaNum, scaNum_len, 0x01, 0x01);
+       //get idx
+       printf("idx =%d\n", idx);
+       sc_addr->DialNumLen = idx ;
+       memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
+
+       ret_status = tel_set_sms_sca(sc_addr, 0, &pRequestId);
+       //[Note] Telephony Emulator Not Support
+
+       printf("returnstatus after scaddr set is %d requestId:%d \n", ret_status, pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //..
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //..
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETSCADDR_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_SCA_CNF$$$\n");
+                               // service center address decoding
+                       }
+                       break;
+       }
+}
+//..
+
+//get SCA
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_sca()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_sca(0, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_SCA_CNF:
+                       printf("\n****************************************\n");
+                       printf("\n$$$ TAPI_EVENT_NETTEXT_GET_SCA_CNF$$$\n");
+                       // SCA address decoding
+                       printf("\n****************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_11 Sms Preferred Bearer
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sms Preferred Bearer</h3>
+<strong>[Note] Telephony Emulator and Aquila’s Telephony OEM Plugin do not support this feature.</strong>
+@n Telephony provides APIs to set SMS preferred bearer on which SMS has to be transmitted. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_preferred_bearer (TelSmsBearerType_t    BearerType, int *pRequestId);
+int  tel_get_sms_preferred_bearer(int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_pb()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
+
+       ret_status = tel_set_sms_preferred_bearer(BearerType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETPREFERREDBEARER_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_Preferred Bearer_CNF$$$\n");
+                       }
+                       break;
+       }
+       //...
+}
+
+//get preferred bearer
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void get_pb()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_preferred_bearer(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF:
+                       printf("\n****************************************\n");
+                       printf("\n$$$ GET PREFERRED BEARER$$$\n");
+                       printf("\n****************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_12 Sms Parameters
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sms Parameters</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs to set the header parameters of SMS, which are used in the origination of MO messages. It also provides API to get the SMS parameters for a particular SMS (sent/received) based on the SIM index where it is stored. You should not access this API directly; use the Message Framework API.
+
+@code
+int  tel_set_sms_parameters(const TelSmsParams_t SmsSetParameters, int *pRequestId);
+int  tel_get_sms_parameters(const int SmsRecordIndex, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_param()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       TelSmsParams_t SmsSetParameters;
+
+       SmsSetParameters.RecordIndex = 0x01;
+       SmsSetParameters.RecordLen = 28;
+       memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
+       printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
+
+       SmsSetParameters.TpDestAddr.DialNumLen = 10;
+       SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
+       SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
+
+       ret_status = tel_set_sms_parameters(SmsSetParameters, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETPARAMETERS_RSP) {
+                               printf("\n$$$TAPI_EVENT_NETTEXT_SET_Parameter_CNF$$$\n");
+                       }
+                       break;
+       }
+}
+//...
+
+//get params
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_params()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_parameters(1, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_GET_PARAM_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ GET PARAM NOTI$$$\n");
+                       // decoding SMS parameter
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_13 Sending Delivery Report
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Sending Delivery Report</h3>
+This API sends a SMS-deliver report to the network, after receiving an incoming SMS. You should not access this API directly.
+
+@code
+int  tel_send_sms_deliver_report(const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void send_delivery()
+{
+       int ret_status;
+       int requestId = -1;
+       TelSmsResponse_t RPCause;
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       TelSmsDatapackageInfo_t *del_report = NULL;
+
+       del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
+       memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
+       //Encode Send Delivery Report here
+       //EncodeSmsDeliveryReportTpdu();
+
+       RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
+       printf("***receive message (Api:SendDeliverreport)****\n");
+
+       ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ DELIVER REPORT NOTI$$$\n");
+                       printf("\n***************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_14 Setting Memory Status
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Memory Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used by applications to inform the modem about the memory status of PDA (whether FULL or AVAILABLE) so that modem can inform network. You should not access this API directly.
+
+@code
+int  tel_set_sms_memory_status      (int  MemoryStatus ,  int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+void set_memstatus()
+{
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+       int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+
+       ret_status = tel_set_sms_memory_status(MemoryStatus, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETMEMORYSTATUS_RSP) {
+                               printf("\n$$$$$$   SET Memory Status $$$$$$ \n");
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_15 Setting Message Status
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Setting Message Status</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+This API is used by applications to set the message status in the Sim file. You should not access this API directly; use the Message Framework API.
+
+@code
+int    tel_set_sms_message_status(int Index, TelSmsMsgStatus_t MsgStatus, int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void set_msgstatus()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int Index = 2;
+       int pRequestId = 0;
+       TelSmsMsgStatus_t MsgStatus = TAPI_NETTEXT_STATUS_READ;
+
+       ret_status = tel_set_sms_message_status (Index, MsgStatus, &pRequestId);
+       printf ("The return value is %d\n", ret_status);
+       printf("RequestId is %d\n", pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TelSmsSetResponse *RequestType;
+                       printf("\n***************************************\n");
+                       printf("\n$$$$$$   SET CONFIRMATION $$$$$$ \n");
+                       RequestType = (TelSmsSetResponse *)EventData;
+                       if (*RequestType == TAPI_NETTEXT_SETMESSAGESTATUS_RSP) {
+                               printf("\n$$$$$$   SET Memory Status $$$$$$ \n");
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases4_16 Getting SMS Parameter Count
+@ingroup Use_Cases4_SMS
+@{
+
+
+               <h3 class="pg">Getting SMS Parameter Count</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n This API is used by applications to get the count of sms parameter records stored in Sim EF. You should not access this API directly.
+
+@code
+int  tel_get_sms_parameter_count (int *pRequestId);
+@endcode
+
+<strong>This API is restricted for direct use.  Use the Message Framework API instead.</strong>
+
+SAMPLE CODE:
+@code
+#include <stdio.h>
+#include <stdlib.h>
+#include <TapiCommon.h>
+#include <ITapiNetText.h>
+
+void get_paramcount()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sms_parameter_count (&pRequestId);
+       printf ("The return value is %d\n", ret_status);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("successful\n");
+       }
+       else
+       {
+               printf("error = %d\n", ret_status);
+       }
+       //WAIT FOR EVENT HERE
+}
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Send SMS TO GET eventType
+       {
+               case TAPI_EVENT_NETTEXT_PARAM_COUNT_IND:
+                       printf("\n***************************************\n");
+                       printf("\n$$$ PARAM COUNT NOTI$$$\n");
+                       printf("\n***************************************\n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+       <h2 class="pg">NETWORK Registration and Configuration<h/h2>
+
+@defgroup Use_Cases5_1 Event register and deregister
+@ingroup Use_Cases5_NETWORK
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for the network APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+Network Notification Events
+@code
+TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND
+TAPI_EVENT_NETWORK_RADIO_INFO_IND
+TAPI_EVENT_NETWORK_SPN_INFO
+TAPI_EVENT_NETWORK_DISPLAYINFO_IND
+@endcode
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("TelTapiInit Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_NETWORK_GETNWBAND_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("Network Event registration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+}
+
+// Network notification callback function
+void app_callback(void)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       print_events((int)eventType);
+       printf("\n event came in power_callback [%d] \n", eventType);
+       printf("\n expected event is  in callback [%d] \n", expected_event);
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_RADIO_INFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_SPN_INFO:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+
+               case TAPI_EVENT_NETWORK_DISPLAYINFO_IND:
+                       TelSmsDatapackageInfo_t *ptrDataPackage = NULL;
+                       printf("SMS Incoming Message\n");
+                       ptrDataPackage = (TelSmsDatapackageInfo_t *)EventData;
+                       // Decoding Service Center Address
+                       // Decoding TPDU(SMS-DELIVER, SMS-STATUS)
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_2 Network Selection
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Selection</h3>
+Telephony provides APIs which can request the lower layers use the network (PLMN) which has been selected by the user from the Network List displayed to the User.
+
+@code
+int tel_select_network_automatic(int *pRequestId)
+int tel_select_network_manual(unsigned int Plmn, int *pRequestId)
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void select_nw()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestID;
+       unsigned int plmn = 0;
+
+       //CASE 1. MANUAL MODE
+       plmn = 45454;
+       ret_status = tel_select_network_manual(Plmn, &pRequestId);
+
+       // CASE 2. AUTOMATIC MODE
+       // selectionMode = TAPI_NETWORK_SELECTIONMODE_AUTOMATIC;
+       ret_status = tel_select_network_automatic(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)
+       {
+               case TAPI_EVENT_NETWORK_SELECT_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$ \n");
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_3 Network Search
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Search</h3>
+This API is used to search for the available networks, and to provide the Network List to the User/Application.
+
+@code
+int     tel_search_network (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void searchnw()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+
+       ret_status = tel_search_network(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType)   //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SEARCH_CNF:
+                       int ui_entry_count = 0;
+                       TelNetworkPlmnList_t *pNetSearchCnf;
+                       pNetSearchCnf = (TelNetworkPlmnList_t *)EventData;
+                       while (ui_entry_count <  pNetSearchCnf->networks_count)
+                       {
+                               printf("Type_of_plmn[%d] 0:unkwon,1:home,2:available,3:forbidden, NetworkName[%s]",
+                                               pNetSearchCnf->network_list[ui_entry_count].type_of_plmn,
+                                               pNetSearchCnf->network_list[ui_entry_count].network_name);
+                               printf("ServiceProviderName[%s]", pNetSearchCnf->network_list[ui_entry_count].service_provider_name);
+                               printf("PLMN ID[%lu]", pNetSearchCnf->network_list[ui_entry_count].plmn_id);
+                               ui_entry_count++;
+                       }
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_4 Selection Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Selection Mode</h3>
+Telephony provides APIs to set and retrieve the current mode of network selection i.e. automatic or manual. Request for Automatic network selection or Manual network selection will allow OEM provider to do PLMN Selection based on network selection preference.
+
+@code
+int tel_get_network_selection_mode (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_selmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       //GET THE SELECTION MODE
+
+       ret_status = tel_get_network_selection_mode (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) // REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF $$$$$$ \n");
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_5 Service Domain
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Service Domain</h3>
+Telephony provides APIs so that User/application can configure the service domain and also retrieve the present network service domain.
+
+@code
+int tel_set_network_service_domain (TelNetworkServiceDomain_t ServiceDomain, int *pRequestId);
+int tel_get_network_service_domain (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void set_servicedomain()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       //SET NETWORK SERVICE DOMAIN
+       TelNetworkServiceDomain_t ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+
+       ret_status = tel_set_network_service_domain (ServiceDomain, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       unsigned int temp_handle = -1;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF $$$$$$ \n");
+                       break;
+       }
+
+       //...
+}
+
+//GET NETWORK SERVICE DOMAIN
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_servicedomain()
+{
+       int ret_status;
+       ret_status = tel_get_network_service_domain (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_6 Network Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n The Network Mode (Automatic, GSM, and WCDMA) can be configured at OEM provider, based on which lower layers can scan only those radio access technologies, to register with network.
+
+@code
+int tel_set_network_mode (TelNetworkMode_t NwMode, int *pRequestId);
+int     tel_get_network_mode (int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void setnwmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_set_network_mode(NwMode, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWMODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+
+//GET NETWORK MODE
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getnwmode()
+{
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_get_network_mode(&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETNWMODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GETNWMODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_7 Network Band
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Band</h3>
+Telephony provides APIs to set and retrieve the network band and allows the underlying OEM provider to scan the set band.
+
+@code
+int tel_set_network_band (TelNetworkBandPreferred_t BandMode, TelNetworkBand_t Band, int *pRequestId);
+int tel_get_network_band ( int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void setnwband()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+       TelNetworkBandPreferred_t BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+       TelNetworkBand_t Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+       int pRequestId = 0;
+
+       ret_status = tel_set_network_band (BandMode,Band, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SETNWBAND_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+
+//GET NETWORK BAND
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void getnwband()
+{
+       int ret_status;
+       int pRequestId;
+       ret_status = tel_get_network_band (BandMode, Band, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) // REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETNWBAND_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_GTNWBAND_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_8 Preferred PLMN
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Preferred PLMN</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+@n Telephony provides APIs which can be used to set and retrieve the preferred plmn of network.
+
+@code
+int tel_set_network_preferred_plmn (TelNetworkPrefferedPlmnOp_t Operation, TelNetworkPrefferedPlmnInfo_t  PreffPlmnInfo, int *pRequestId);
+int tel_get_network_preferred_plmn ( int *pRequestId);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_preferredplmn()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+       int ret_status;
+       int pRequestId;
+
+       //SET PLMN
+       TelNetworkPrefferedPlmnOp_t Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+       unsigned char *plmn = "45454";
+
+       memset(&PreffPlmnInfo, 0, sizeof(TelNetworkPrefferedPlmnInfo_t));
+       PreffPlmnInfo.Index = 0;
+       PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+       memcpy(PreffPlmnInfo.Plmn, plmn, 6);
+
+       ret_status = tel_set_network_preferred_plmn (Operation,PreffPlmnInfo, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF:
+                       printf("\n$$$$$$ TAPI TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF $$$$$$ \n");
+                       break;
+       }
+       //...
+}
+@endcode
+
+@code
+//GET PLMN
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void get_preferredplmn()
+{
+       int ret_status;
+       int pRequestId;
+
+       ret_status = tel_get_network_preferred_plmn (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF:
+                       printf("\n$$$$$$ TAPI TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF $$$$$$ \n");
+                       break;
+       }
+@endcode
+@}
+@defgroup Use_Cases5_9 Network Roaming Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network Roaming Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+Telephony provides APIs which can be used to set and retrieve the mode of network roaming. This is for CDMA.
+
+@code
+int tel_set_network_roaming (TelNetworkRoamingMode_t *RoamingMode, int *pRequestId);
+int tel_get_network_roaming (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//SetRoamingMode
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_roamingmode()
+{
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+
+       TelNetworkRoamingMode_t roamingMode;
+       int ret_status;
+
+       roamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_HOME_ONLY;
+       roamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+
+       ret_status = tel_get_network_roaming (&roamingMode, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF:
+                       printf("$$$$$TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF$$$$$\n");
+                       //....
+                       break;
+       }
+       //...
+}
+@endcode
+
+@code
+//GetRoamingMode
+#include<stdio.h>
+#include<TapiCommon.h>
+#include<ITapiNetwork.h>
+void set_roamingmode()
+{
+       int ret_status;
+
+       ret_status = tel_get_network_roaming(&requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               ("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF:
+                       printf("$$$$TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF$$$$\n");
+                       //...
+                       break;
+       }
+       //...
+}
+@endcode
+@}
+@defgroup Use_Cases5_10 Network CDMA Hybrid Mode
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Network CDMA Hybrid Mode</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+Telephony provides APIs which can be used to set and get the CDMA Hybrid Mode. This is for CDMA.
+Hybrid means 1x only, EVDO only combined. we can set network mode separately also in CDMA network.
+
+@code
+int tel_set_network_hybrid_in_cdma (TelNetworkCDMAHybridMode_t CDMAHybridMode, int *pRequestId);
+int tel_get_network_hybrid_in_cdma (int *pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//Set CDMA Hybrid Mode
+#include <ITapiNetwork.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+void set_hybridmode()
+{
+       int ret_status;
+
+       //SUBSCRIBE FOR EVENTS AS MENTIONED IN  Event Register and Deregister
+
+       TelNetworkCDMAHybridMode_t cdmaHybridMode;
+       cdmaHybridMode = TAPI_NETWORK_CDMA_HYBRID; // TAPI_NETWORK_CDMA_1X_ONLY, TAPI_NETWORK_CDMA_EVDO_ONLY, TAPI_NETWORK_CDMA_HYBRID(1X + EVDO)
+
+       ret_status = tel_get_network_hybrid_in_cdma(cdmaHybridMode, &requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("Successful\n");
+       else
+               printf("error:%d\n", ret_status);
+
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF:
+                       printf("\n$$$$$$ TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF $$$$$$ \n");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+@code
+//Get CDMA Hybrid Mode
+#include<stdio.h>
+#include<TapiCommon.h>
+#include<ITapiNetwork.h>
+void get_hybridmode()
+{
+       int ret_status;
+
+       ret_status = tel_get_network_hybrid_in_cdma (&requestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       //...
+
+       eventClass = event->EventClass;
+
+       eventType = event->EventType;
+
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       //...
+       //...
+       switch (eventType) //REFER Network Selection TO GET eventType
+       {
+               case TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF:
+                       printf("$$$$$TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF$$$$\n");
+                       //...
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_11 SIM
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM</h3>
+Event Register and Deregister
+To receive asynchronous event notifications for the SIM APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+TapiResult_t api_err;
+
+api_err = TelTapiInit();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("TelTapiInit Failed - api_err = %d \n", api_err);
+}
+
+api_err = TelTapiRegisterEvent (TAPI_EVENT_SIM_ENABLE_PERS_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VSIM Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+
+// DEREGISTER EVENT
+api_err = TelTapiDeRegister(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+
+}
+@endcode
+@}
+@defgroup Use_Cases5_12 PIN, SIM Lock operations
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">PIN, SIM Lock operations</h3>
+Telephony provides APIs to enable/disable pin, change pin, unblock pin, pin verification and sim lock enable/disable/verification. It is also possible to retrieve the pin/sim lock status.
+
+@code
+int tel_enable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+int tel_disable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+int  tel_change_sim_pins(const TelSimSecPw_t *old_pin , const TelSimSecPw_t *new_pin, int *req_id);
+int tel_verify_sim_puks(const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, int *req_id)
+int  tel_verifiy_sim_pins(const TelSimSecPw_t *pin_data, int *req_id)
+int  tel_get_sim_security_status(TelSimPinType_t type, TelSimPinStatus_t *status)
+@endcode
+
+SAMPLE CODE: PIN1/PIN2/SIM LOCK/PUK1 VERIFICATION AND CHANGE PIN1
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST PIN1 VERIFICATION PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+
+Void pin1_verify()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN1;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  OPERATION REQUEST PIN2 VERIFICATION PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+Void verify_pin2()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  OPERATION REQUEST CHANGE PIN1 PART
+#define PIN1_ORG "0000" //Sample old PIN1 code
+#define PIN1_NEW "1111" //Sample new PIN1 code
+void change_pins()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_old_pin_val[length] ;
+       char init_new_pin_val[length];
+       TelSimSecPw_t old_pin;
+       TelSimSecPw_t new_pin;
+
+       memset(&init_old_pin_val, 0, length);
+       memset(&init_new_pin_val, 0, length);
+
+       strcpy(init_old_pin_val, PIN1_ORG);
+
+       old_pin.type = TAPI_SIM_PTYPE_PIN1;
+       old_pin.pw_len = strlen(init_old_pin_val);
+       printf("pw_len[%d]", old_pin.pw_len);
+       old_pin.pw = (char*)malloc(length);
+       memcpy(old_pin.pw, init_old_pin_val, length);
+
+       strcpy(init_new_pin_val, PIN1_NEW);
+
+       new_pin.type = TAPI_SIM_PTYPE_PIN1;
+       new_pin.pw_len = strlen(init_new_pin_val);
+       printf("pw_len[%d]", new_pin.pw_len);
+       new_pin.pw = (char*)malloc(length);
+       memcpy(new_pin.pw, init_new_pin_val, length);
+
+       err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST VERIFICATION PUK1 PART
+#define PUK1_NORMAL "00000000" //Sample PUK1 code
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+
+void verify_puks()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+
+       char init_pin_val[length];
+       char init_puk_val[length];
+
+       TelSimSecPw_t puk_data;
+       TelSimSecPw_t new_pin_data;
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+       strcpy(init_puk_val, PUK1_NORMAL);
+
+       puk_data.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+       puk_data.pw_len = length;
+       puk_data.pw_len = strlen(init_puk_val);
+       printf("pw_len[%d]", puk_data.pw_len);
+       memcpy(puk_data.pw, init_pin_val, length);
+
+       new_pin_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       new_pin_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", new_pin_data.pw_len);
+       new_pin_data.pw = (char*)malloc(length);
+       memcpy(new_pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+//  OPERATION REQUEST SIM LOCK VERIFICATION PART
+#define SIM_NORMAL "0000" //Sample SIM Lock code
+Void verify_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH + 1;
+       char init_pin_val[length] ;
+       TelSimSecPw_t pin_data;
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       pin_data.type = TAPI_SIM_PTYPE_SIM;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback(TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*)event;
+
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_VERIFY_SEC_CNF:
+                       printf("********TAPI_EVENT_SIM_VERIFY_SEC_CNF**********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) EventData;
+
+                       if (status == TAPI_SIM_OPERATION_TIMEOUT )
+                       {
+                               printf("TAPI SIM Operation Timeout!!");
+                       }
+                       else if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("PIN1 Verification Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("SIM Lock Verification Success!");
+                               }
+                               else
+                               {
+                                       printf("PIN2 Vefication Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("PIN1 Verification Failed! - PIN Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("PIN1 Verification Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("PIN2 Verification Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("PIN2 Verification Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("SIM Lock Verification Failed! - SIM Lock code Required");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_VERIFY_PUK_CNF:
+                       printf("**********TAPI_EVENT_SIM_VERIFY_PUK_CNF********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Unblock PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Unblock PIN2 Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("PIN1 Verification Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("PIN2 Verification Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_CHANGE_PINS_CNF:
+                       printf("*********TAPI_EVENT_SIM_CHANGE_PINS_CNF*******************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       printf("PinType[%d]", pPinInfo->type);
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Change PIN1 Success!");
+                               }
+                               else
+                               {
+                                       printf("Change PIN2 Success!");
+                               }
+
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Change PIN1 Failed! - PIN Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Change PIN1 Failed! - PUK Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Change PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Change PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+       }
+       //...
+}
+@endcode
+
+SAMPLE CODE: ENABLE/DISABLE PIN1 and SIM LOCK
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST DISABLING PIN1 PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+void disable_pin1()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST ENABLING PIN1 PART
+#define PIN1_NORMAL "0000" //Sample PIN1 code
+void enable_pin1()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, PIN1_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST DISABLING SIM LOCK PART
+#define SIM_NORMAL "0000" //Sample SIM LOCK code
+void disable_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_SIM;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  OPERATION REQUEST ENABLING SIM LOCK PART
+#define SIM_NORMAL "0000" //Sample SIM LOCK code
+void enable_sim()
+{
+       int request_id = 0;
+       int err_code;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, SIM_NORMAL);
+
+       TelSimSecPw_t sec_data;
+       sec_data.type = TAPI_SIM_PTYPE_SIM;   // 0x00
+       sec_data.pw_len = strlen(init_pin_val);
+       printf("pw_len[%d]", sec_data.pw_len);
+
+       sec_data.pw = (char*)malloc(length);
+       memcpy(sec_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_security(&sec_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       //WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback(TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       printf("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_DISABLE_SEC_CNF:
+                       printf("****************TAPI_EVENT_SIM_DISABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Disable PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Disable PIN2 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Disable SIM LOCK Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Disable PIN1 Failed! - PIN1Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Disable PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Disable PIN1 Failed! - PUK1 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Disable PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Disable SIM LOCK Failed! - SIM LOCK CODE Required ");
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_SEC_CNF:
+                       printf("*****************TAPI_EVENT_SIM_ENABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                       if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Enable PIN1 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Enable PIN2 Success!");
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Enable SIM LOCK Success!");
+                               }
+                       }
+                       else
+                       {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1)
+                               {
+                                       printf("Enable PIN1 Failed! - PIN1Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                               {
+                                       printf("Enable PIN2 Failed! - PIN2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1)
+                               {
+                                       printf("Enable PIN1 Failed! - PUK1 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                               {
+                                       printf("Enable PIN2 Failed! - PUK2 Required ");
+                                       printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+
+                               else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM)
+                               {
+                                       printf("Enable SIM LOCK Failed! - SIM LOCK CODE Required ");
+                               }
+                       }
+                       printf("********************************************");
+                       break;
+       }
+       //...
+}
+@endcode
+
+SAMPLE CODE: GET PIN1/PIN2/SIM LOCK STATUS
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET PIN1/PIN2/SIM LOCK STATUS PART
+void get_security_status()
+{
+       int error_code;
+       TelSimPinType_t type = TAPI_SIM_PTYPE_PIN1 // or TAPI_SIM_PTYPE_PIN2 or TAPI_SIM_PTYPE_SIM;
+       TelSimPinStatus_t status = -1;
+       printf("Get Security status");
+
+       err_code = tel_get_sim_security_status(type, &status);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf(" *****************************************************");
+               switch (status)
+               {
+                       case TAPI_SIM_PIN_STATUS_DISABLED:
+                               printf("TAPI_SIM_PIN_STATUS_DISABLED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_ENABLED:
+                               printf("TAPI_SIM_PIN_STATUS_ENABLED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_BLOCKED:
+                               printf("TAPI_SIM_PIN_STATUS_BLOCKED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED:
+                               printf("TAPI_SIM_PIN_STATUS_PUK_BLOCKED ");
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_UNKNOWN:
+                               printf("TAPI_SIM_PIN_STATUS_UNKNOWN ");
+                               break;
+
+                       default:
+                               printf(" Default case statment: sim_status(%d)", status);
+                               break;
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       printf("*****************************************************");
+}
+@endcode
+@}
+@defgroup Use_Cases5_13 Personalisation Lock
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Personalisation Lock</h3>
+These APIs are used to enable/disable and get the status information about personalisation of network, network subset, corporate, service provider personalisation.
+
+@code
+int tel_enable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+int tel_disable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+int tel_get_sim_personalization_status(TelSimPersType_t type, int *req_id);
+@endcode
+
+SAMPLE CODE: GET PERSONALIZATION STATUS
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST GET NETWORK PERSONALIZATION PART
+void get_net_pers()
+{
+       int request_id = 0;
+       int err_code;
+
+       TelSimPersType_t type = TAPI_SIM_PERS_NET;
+
+       err_code = tel_get_sim_personalization_status(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_PERS_STATUS_CNF:
+                       int i = 0;
+                       TelSimPersStatus_t* pers_status = (TelSimPersStatus_t*)EventData;
+
+                       printf("[SIM APP]*********** TAPI_EVENT_SIM_PERS_STATUS_CNF************\n");
+                       printf("[SIM APP]SIM lock personalisation event status = [%x]\n", status);
+                       printf("[SIM APP]SIM lock personalisation status - net0-ns1-sp2-cp3  = [%d]\n", pers_status->type);
+                       printf("[SIM APP]SIM lock personalisation status - unlock0-lock1  = [%d]\n", pers_status->mode);
+                       printf("[SIM APP]***************************************************\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE: ENABLE/DISABLE PERSONALIZATION
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST ENABLING NETWORK PERSONALIZATION PART
+#define NET_ENCODE "54500112345678" //Sample Network Personalization code
+void enable_net_pers()
+{
+       printf("Lock Personalisation MCC+MNC 5\n");
+       printf("Plese input Network Lock CODE : length of MCC+MNC, MCC, MNC, NCK\n");
+       printf("We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), NCK(12345678) => 54500112345678\n");
+
+       int request_id = 0;
+       int err_code;
+       int length = 14+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, NET_ENCODE);
+
+       TelSimPersPw_t lock_pers = {0,};
+       lock_pers.type = TAPI_SIM_PERS_NET;
+       lock_pers.pw_len = 14;
+       lock_pers.pw = (char*)malloc(length);
+       memcpy(lock_pers.pw, init_password_val, length);
+
+       err_code = tel_enable_sim_personalization(&lock_pers, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST DISABLING NETWORK PERSONALIZATION PART
+#define NET_DISCODE "12345678" //Sample Network Personalization code
+void disable_net_pers()
+{
+       printf("de Personalisation key is 8 byte \n");
+       printf("We need to use this for testing : 12345678\n");
+
+       int request_id = 0;
+       int err_code;
+       int length = 8+1;
+       char init_pin_val[length];
+
+       strcpy(init_pin_val, NET_DISCODE);
+
+       TelSimPersPw_t lock_pers = {0,};
+       lock_pers.pw_len =  8; //control key
+       lock_pers.pw = (char*)malloc(length);
+       memcpy(lock_pers.pw,init_password_val,length);
+
+       err_code = tel_disable_sim_personalization(&lock_pers, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_DISABLE_PERS_CNF:
+                       TelSimPinOperationResult_t opResult = (TelSimPinOperationResult_t)status;
+
+                       printf("[SIM APP]**** *TAPI_EVENT_SIM_DISABLE_PERS_CNF********\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n", opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               ("[SIM APP]Disable Personalization Success!\n");
+                       }
+                       else
+                       {
+                               printf("[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf("\n***************************************************************\n");
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_PERS_CNF:
+                       TelSimPinOperationResult_t opResult = (TelSimPinOperationResult_t)status;
+
+                       printf("[SIM APP]****** *TAPI_EVENT_SIM_ENABLE_PERS_CNF*********\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n", opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                       {
+                               printf("[SIM APP]Enable Personalization Success!\n");
+                       }
+                       else
+                       {
+                               printf("[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf("\n***************************************************************\n");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_14 FDN
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">FDN</h3>
+These APIs are used to enable/disable FDN and to retrieve the current FDN status.
+
+@code
+int tel_enable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+int tel_disable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+int tel_get_sim_fdn_status(int *fdn_status);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+//  OPERATION REQUEST ENABLE FDN MODE PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+void enable_fdn()
+{
+       int request_id = 0;
+       int api_ret;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       TelSimSecPw_t pin_data = {0,};
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_enable_sim_fdn(pin_data.pw, &pin_data.pw_len, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+}
+
+
+//  OPERATION REQUEST DISABLE FDN MODE PART
+#define PIN2_NORMAL "0000" //Sample PIN2 code
+void disable_fdn()
+{
+       int request_id = 0;
+       int api_ret;
+       int length = TAPI_SIM_PIN_LENGTH+1;
+       char init_pin_val[length] ;
+
+       strcpy(init_pin_val, PIN2_NORMAL);
+
+       TelSimSecPw_t pin_data = {0,};
+
+       pin_data.type = TAPI_SIM_PTYPE_PIN2;
+       pin_data.pw_len = strlen(init_pin_val);
+
+       printf("pw_len[%d]", pin_data.pw_len);
+
+       pin_data.pw = (char*)malloc(length);
+       memcpy(pin_data.pw, init_pin_val, length);
+
+       err_code = tel_disable_sim_fdn(pin_data.pw, &pin_data.pw_len, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT FOR EVENT FROM HERE
+
+
+       //  EVENT RESPONSE PART
+       //CALLBACK FUNCTION TO BE USED
+       static void app_callback (TelTapiEvent_t *event)
+       {
+               int eventClass;
+               int eventType;
+               int requestId;
+               int status;
+               void* EventData = NULL;
+
+               TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+               unsigned int temp_handle = -1;
+               //
+               eventClass = event->EventClass;
+               eventType = event->EventType;
+               requestId = event->RequestId;
+               status = event->Status;
+               EventData = event->pData;
+
+               switch (eventType)
+               {
+                       case TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF:
+                               printf("**********TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF***********");
+
+                               TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                               if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Disable FDN Success!");
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               else
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Disable FDN Failed! - PIN2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                                       {
+                                               printf("Disable FDN Failed! - PUK2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               printf("********************************************");
+                               break;
+
+                       case TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF:
+                               printf("*******TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF*******");
+
+                               TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*)EventData;
+
+                               if (status == TAPI_SIM_PIN_OPERATION_SUCCESS)
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Enable FDN Success!");
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               else
+                               {
+                                       if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2)
+                                       {
+                                               printf("Enable FDN Failed! - PIN2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2)
+                                       {
+                                               printf("Enable FDN Failed! - PUK2 Required ");
+                                               printf("Remainint attempts [%d]", pPinInfo->retry_count);
+                                       }
+                                       else
+                                       {
+                                               printf("Unhandled type[%d]", pPinInfo->type);
+                                       }
+                               }
+                               printf("********************************************");
+                               break;
+               }
+       }
+
+
+       //  OPERATION REQUEST GET FDN STATUS PART
+       void get_fdn_status()
+       {
+               printf("Get FDN status");
+               int fdn_status = 0 ;
+
+               err_code = tel_get_sim_fdn_status(&fdn_status);
+               if (err_code == TAPI_API_SUCCESS)
+               {
+                       if (fdn_status == 0)
+                       {
+                               printf("*************************");
+                               printf("FDN disabled ");
+                               printf("*************************");
+                       }
+                       else
+                       {
+                               printf("*************************");
+                               printf("FDN enabled");
+                               printf("*************************");
+                       }
+               }
+               else
+               {
+                       printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+               }
+
+       }
+@endcode
+@}
+@defgroup Use_Cases5_15 IMSI Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">IMSI Information</h3>
+This API retrieves the IMSI (International Mobile Subscriber Identity) information.
+
+@code
+int tel_get_sim_imsi(TelSimImsiInfo_t* imsi);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getimsiInfo()
+{
+       int err_code;
+       TelSimImsiInfo_t sim_imsi_info;
+
+       err_code = tel_get_sim_imsi (&sim_imsi_info);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("[SIM APP] IMSI [mcc,mnc,msin]= ");
+               printf(" [%s]",sim_imsi_info.szMcc);
+               printf(" [%s]",sim_imsi_info.szMnc);
+               printf(" [%s]",sim_imsi_info.szMsin);
+       }
+       else
+       {
+               printf("Error Code [%x]\n", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_16 ECC Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">ECC Information</h3>
+This API retreieves the ECC (Emergency Call Codes) data.
+
+@code
+int tel_get_sim_ecc(TelSimEccData_t *ecc_data, int *ecc_count);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void geteccinfo()
+{
+       int err_code;
+       int ecc_rec_count = 0;
+       TelSimEccData_t  ecc_info = {0,};
+
+       err_code = tel_get_sim_ecc (&ecc_info, &ecc_rec_count);
+       printf("The Retrun Status is %d", err_code);
+
+       printf(" ECC count [%d]\n", ecc_rec_count);
+       printf("ECC1 [%s]\n", ecc_info.EccInfo.szEcc1);
+       printf("ECC2 [%s]\n", ecc_info.EccInfo.szEcc2);
+       printf("ECC3 [%s]\n", ecc_info.EccInfo.szEcc3);
+       printf("ECC4 [%s]\n", ecc_info.EccInfo.szEcc4);
+       printf("ECC5 [%s]\n", ecc_info.EccInfo.szEcc5);
+}
+
+void get_uecc()
+{
+       int err_code;
+       int i = 0;
+       int uecc_rec_count = 0;
+
+       printf(" Get USIM ECC  ");
+
+       TelSimEccData_t uecc_info = {{{0,}}};
+
+       err_code = tel_get_sim_ecc(&uecc_info, &uecc_rec_count);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("ECC count [%d]",uecc_rec_count );
+
+               for (i=0; i<uecc_rec_count; i++)
+               {
+                       printf("Loop(%d): ", i);
+                       printf(" ECC Used [%d]", uecc_info.UeccInfo[i].bUsed);
+                       printf(" ECC Len [%d]", uecc_info.UeccInfo[i].EccLen);
+
+                       if (NULL != uecc_info.UeccInfo[i].szEcc)
+                       {
+                               printf("ECC string [%s]", uecc_info.UeccInfo[i].szEcc);
+                       }
+                       else
+                       {
+                               printf("ECC string [null]");
+                       }
+
+                       printf("ECC alphaID [%s]",uecc_info.UeccInfo[i].szEccAlphaIdentifier);
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_17 Language Preference Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Language Preference Information</h3>
+These APIs are used to get and set the language preference information stored in SIM.
+
+@code
+int tel_get_sim_language(TelSimLanguageInfo_t *sim_language);
+int tel_set_sim_language(TelSimLanguagePreferenceCode_t language, int *req_id);
+@endcode
+
+SAMPLE CODE: GET SIM LANGUAGE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getlanguageprefinfo()
+{
+       int err_code;
+       TelSimLanguageInfo_t li_info;
+       int i;
+
+       err_code = tel_get_sim_language (&li_info);
+       printf("Error Code [%x]\n", err_code);
+
+       for (i =0; i<li_info.LpCount; i++)
+               printf(" LI[%d] --> Val  [%d]\n", i, li_info.Lp[i]);
+}
+@endcode
+
+SAMPLE CODE: UPDATE SIM LANGUAGE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST UPDATE SIM LANGUAGE PART
+void get_net_pers()
+{
+       int err_code;
+       int request_id = 0;
+       TelSimLanguagePreferenceCode_t language = 0x00;
+
+       language = TAPI_SIM_LP_ENGLISH; //0x01
+
+       err_code = tel_set_sim_language(language, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_SET_LANGUAGE_CNF:
+                       printf("*****TAPI_EVENT_SIM_SET_LANGUAGE_CNF*********");
+                       printf("update event status = [0x%x]", status);
+                       printf("*********************************************");
+                       break;
+
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_18 Getting Card Type
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting Card Type</h3>
+This API is a synchronous API which gets the Card Type i.e. whether the SIM Card is a GSM SIM or a 3G SIM.
+
+@code
+int tel_get_sim_type(TelSimCardType_t *card_type);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+void getcardtype()
+{
+       int err_code;
+       TelSimCardType_t cardInfo;
+
+       printf("Get card type !!!\n");
+       err_code = tel_get_sim_type (&cardInfo);
+       printf("card type is %d\n", cardInfo);
+}
+@endcode
+@}
+@defgroup Use_Cases5_19  Getting SIM Card Initialization Status
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting SIM Card Initialization Status</h3>
+API is a synchronous API which gets the Card Init status and Identification.
+
+@code
+int tel_get_sim_init_info(TelSimCardStatus_t *sim_status, int *card_changed);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET CARD INIT STATUS PART
+void get_sim_init_status()
+{
+       int err_code;
+       TelSimCardStatus_t status = 0x00;
+       int b_card_changed = 0;
+
+       err_code = tel_get_sim_init_info(&status, &b_card_changed);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               printf("**********************************************");
+               printf("CardStatus:[0x%x]",status);
+               printf("b_card_changed[%d]\n",b_card_changed);
+               printf("**********************************************");
+       }
+       else
+       {
+               printf("TAPI Fail: Error Code [%d]\n", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_20 SIM ACCESS COMMANDS Interface
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM ACCESS COMMANDS Interface</h3>
+This API is used to handle SIM EF data directly according to sim access command (select-file info, read, update command). Use_Cases is defined in the 3GPP or ETSI SIM specifications.
+
+@code
+int tel_req_sim_access(const TelSimRSimReq_t *rsim_data, int *req_id);
+@endcode
+
+SAMPLE CODE: EF HANDLING ( SELECT-FILE INFO)
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+//  OPERATION REQUEST GET SIM FILE INFO PART
+void get_sim_file_info()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelRSimReq_t rsim_data;
+       rsim_data.file_id = TAPI_SIM_EFILE_SPN;      // rsim access : sim file id to access
+       rsim_data.rsim_cmd = TAPI_SIM_GET_RESPONSE;  // rsim access : get response, read, update available
+
+       err_code = tel_req_sim_access(&rsim_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+
+       int status;
+
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_RSIM_ACCESS_CNF:
+                       TelSimReadFileRaw_t* rsim_resp = (TelSimReadFileRaw_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_RSIM_ACCESS_CNF**********");
+                       printf("Read event status = [0x%x]", status);
+
+                       if ((rsim_resp->sw1 == 0x90 && rsim_resp->sw2 == 0x00) ||rsim_resp->sw1 == 0x91)
+                       {
+                               printf("**********GET FILE INFO************");
+                               printf("you should parse current data array value properly regarding 3GPP or ETSI TS 102 221 SPEC");
+                       }
+                       printf("************************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_21 SIM Mailbox EF management
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM Mailbox EF management</h3>
+These APIs are used to get and update the mailbox information stored in SIM.
+
+@code
+int tel_get_sim_mailbox_info(TelSimMsgWaitingGroup_t type, int *req_id);
+int tel_set_sim_mailbox_info(TelSimMsgWaitingGroup_t type, const TelSimDialingNumberInfo_t *update_data, int *req_id);
+@endcode
+
+SAMPLE CODE: READ / UPDATE MAILBOX INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+void get_sim_mailbox()
+{
+       int err_code;
+       int request_id = 0;
+       TelSimMsgWaitingGroup_t type = 0x00;
+
+       type = TAPI_SIM_MWG_VOICE;
+
+       err_code = tel_get_sim_mailbox_info(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+//  OPERATION REQUEST UPDATE SIM MAILBOX INFO PART
+void update_sim_mailbox()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimMsgWaitingGroup_t type = 0x00;
+       TelSimDialingNumberInfo_t update_data;
+
+       type = TAPI_SIM_MWG_VOICE;
+
+       memcpy(update_data.AlphaId, "TestUpdate", 10);
+       update_data.AlphaIdLength = strlen(update_data.AlphaId);
+       update_data.CapaConfigId = 1;
+       memcpy(update_data.DiallingNum, "101020203030", 12);
+       update_data.DiallingnumLength = strlen(update_data.DiallingNum);
+       update_data.Ext1RecordId = 1;
+       update_data.NumberingPlanIdent =2;
+       update_data.TypeOfNumber = 2;
+
+       err_code = tel_set_sim_mailbox_info(type, &update_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_GET_MAILBOX_CNF:
+                       TelSimDialingNumberInfo_t* mailbox = (TelSimDialingNumberInfo_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_GET_MAILBOX_CNF*********");
+                       printf("Read event status = [0x%x]", status);
+                       printf("bUsed[%d]", mailbox->bUsed);
+                       printf("AlphaIDMaxLength[%d]", mailbox->AlphaIDMaxLength);
+                       printf("AlphaIdLength[%d]", mailbox->AlphaIdLength);
+                       printf("AlphaId[%s]", mailbox->AlphaId);
+                       printf("DiallingNumMaxLength[%d]", mailbox->DiallingNumMaxLength);
+                       printf("DiallingnumLength[%d]", mailbox->DiallingnumLength);
+                       printf("TypeOfNumber:0-unknown,1-international,2-national[%d]", mailbox->TypeOfNumber);
+                       printf("NumberingPlanIdent:0-unknown,1-isdn,3-data[%d]", mailbox->NumberingPlanIdent);
+                       printf("DiallingNum[%s]", mailbox->DiallingNum);
+                       printf("CapaConfigId[%c]", mailbox->CapaConfigId);
+                       printf("Ext1RecordId[%c]", mailbox->Ext1RecordId);
+                       printf("**********************************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_SET_MAILBOX_CNF:
+                       printf("*********NEW*TAPI_EVENT_SIM_SET_MAILBOX_CNF************");
+                       printf("update event status = [0x%x]", status);
+                       printf("**********************************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_22 SIM Indication Status EFs management
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM Indication Status EFs management</h3>
+These APIs are used to get and set the message indication status stored in SIM.
+
+@code
+int tel_get_sim_indicator_info(TelSimIndicationStatusType_t type, int *req_id);
+int tel_set_sim_indicator_info(const TelSimIndicationStatusData_t *update_data, int *req_id);
+@endcode
+
+SAMPLE CODE:  READ / UPDATE INDICATION STATUS DATA
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+//  OPERATION REQUEST READ SIM MESSAGE WAITING INDICATION STATUS INFO PART
+void read_sim_mwis()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimIndicationStatusType_t type = 0x00;
+
+       type = TAPI_SIM_INDICATION_MW;
+
+       err_code = tel_get_sim_indicator_info(type, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+//  OPERATION REQUEST UPDATE SIM MESSAGE WAITING INDICATION STATUS INFO PART
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+
+void update_sim_mwis()
+{
+       int err_code;
+       int request_id = 0;
+
+       TelSimIndicationStatusType_t type = 0x00;
+       TelSimIndicationStatusData_t update_data;
+       memset(&update_data, 0x00, sizeof(TelSimIndicationStatusData_t));
+
+       type = TAPI_SIM_INDICATION_MW;
+
+       update_data.requested_type = type;
+       update_data.data.Mwis.VoiceMailCount = 1;           // VoiceMail Count
+       update_data.data.Mwis.FaxCount = 2;                 // Fax Count
+       update_data.data.Mwis.EmailCount = 3;               // Email Count
+       update_data.data.Mwis.OtherCount = 4;               // Other Count
+       update_data.data.Mwis.VideoMailCount = 5;           // VideoMail Count
+
+       err_code = tel_set_sim_indicator_info(&update_data, &request_id);
+       if (err_code != TAPI_API_SUCCESS)
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+       // WAIT EVENT RESPONSE FROM HERE
+}
+
+
+//  EVENT RESPONSE PART
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_GET_INDICATION_CNF:
+                       TelSimIndicationStatusData_t* indi_data = (TelSimIndicationStatusData_t*)EventData;
+
+                       printf("*******TAPI_EVENT_SIM_GET_INDICATION_CNF**********");
+                       printf("Read event status = [0x%x]", status);
+
+                       if (indi_data->requested_type == TAPI_SIM_INDICATION_MW)
+                       {
+                               printf("**********MWIS************");
+                               printf("IndicatorType[%d]", indi_data->data.Mwis.IndicatorType);
+                               printf("VoiceMailCount[%d]", indi_data->data.Mwis.VoiceMailCount);
+                               printf("FaxCount[%d]", indi_data->data.Mwis.FaxCount);
+                               printf("EmailCount[%d]", indi_data->data.Mwis.EmailCount);
+                               printf("OtherCount[%d]", indi_data->data.Mwis.OtherCount);
+                               printf("VideoMailCount[%d]", indi_data->data.Mwis.VideoMailCount);
+                       }
+                       else if (indi_data->requested_type == TAPI_SIM_INDICATION_CF)
+                       {
+                               printf("**********CFIS************");
+                               printf("bUsed[%d]", indi_data->data.Cfis.bUsed);
+                               printf("MspNumber[%d]", indi_data->data.Cfis.MspNumber);
+                               printf("Status[%d]", indi_data->data.Cfis.Status);
+                               printf("DiallingnumLen[%d]", indi_data->data.Cfis.DiallingnumLen);
+                               printf("TypeOfNumber[%d]", indi_data->data.Cfis.TypeOfNumber);
+                               printf("NumberingPlanIdent[%d]", indi_data->data.Cfis.NumberingPlanIdent);
+                               printf("DiallingNum[%s]", indi_data->data.Cfis.DiallingNum);
+                               printf("CapaConfig2Id[%d]", indi_data->data.Cfis.CapaConfig2Id);
+                               printf("Ext7RecordId[%d]", indi_data->data.Cfis.Ext7RecordId);
+                       }
+                       else
+                       {
+                               printf("Unhandled indication status type[%d]",indi_data->requested_type );
+                       }
+                       printf("************************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_SET_INDICATION_CNF:
+                       printf("******TAPI_EVENT_SIM_SET_INDICATION_CNF*******");
+                       printf("update event status = [0x%x]", status);
+                       printf("**********************************************");
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_23 Phone Book
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Phone Book</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs for various phone book related features, such as getting total records in phone book, retrieving phone book entry information, reading, updating and deleting phone book information, getting first valid index.
+
+@code
+int tel_get_sim_pb_count(TelSimPbFileType_t pb_type, int* req_id);
+int tel_get_sim_pb_meta_info(TelSimPbFileType_t pb_type, int* req_id);
+int tel_read_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+int tel_update_sim_pb_record(const TelSimPbRecordData_t *req_data, int *req_id );
+int tel_delete_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+int tel_get_sim_pb_init_info(int *init_completed, TelSimPbList_t *pb_list, int *first_index );
+@endcode
+
+SAMPLE CODE FOR GETTING STORAGE COUNT
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void getstoragecount()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_LDN;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sim_pb_count (StorageFileType, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF:
+                       printf("TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE TO GET PHONE BOOK ENTRY INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENIONED IN Event Register and Deregister
+void getPBEntryInfo()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       int pRequestId = 0;
+
+       ret_status = tel_get_sim_pb_meta_info (StorageFileType, &pRequestId);
+       if (ret _status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+       //WAIT FOR EVENT HERE
+}
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType) {
+               case TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF:
+                       TelSimPbEntryInfo_t *entryInfo = (TelSimPbEntryInfo_t*)sim_event->pData ;
+                       printf("SIM PB entry info event status = [%x]\n", sim_event->Status);
+                       printf("[SIM APP]STORAGE TYPE [%d]\n", entryInfo->StorageFileType);
+                       printf("[SIM APP]PB_INDEX_MIN %d\n", entryInfo->PbIndexMin);
+                       printf("[SIM APP]PB_INDEX_MAX = %d\n", entryInfo->PbIndexMax);
+                       printf("[SIM APP]PB_NUM_LEN_MAX =  %d\n", entryInfo->PbNumLenMax);
+                       printf("[SIM APP]PB_TEXT_LEN_MAX =  %d\n", entryInfo->PbTextLenMax);
+                       printf("********************************************\n");
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR READING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simreadrecord()
+{
+       int ret_status;
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_FDN;
+       unsigned short Index = 4;
+       int pRequestId = 0;
+
+       ret_status = tel_read_sim_pb_record (StorageFileType,Index, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf(successful\n);
+       else
+               printf(error=%d\n, ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType) {
+               case TAPI TAPI_EVENT_SIM_PB_ACCESS_READ_CNF:
+                       printf("TAPI_EVENT_SIM_PB_ACCESS_READ_CNF");
+                       //READ DATA
+                       break;
+                       //
+       }
+}
+@endcode
+
+SAMPLE CODE FOR UPDATING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simupdaterecord()
+{
+       int ret_status;
+       TelSimPbRecordData_t pb_add;
+       pb_add.StorageFileType = TAPI_SIM_PB_GAS;
+       int pRequestId = 0;
+
+       pb_add.Index = 1;
+
+       ret_status = tel_update_sim_pb_record (&pb_add, &pRequestId);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_PB_UPDATE_CNF:
+                       printf("TAPI_EVENT_SIM_PB_UPDATE_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+SAMPLE CODE FOR DELETING RECORD
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void contactdelete()
+{
+       int ret_status;
+       //DELETE RECORD
+       TelSimPbFileType_t StorageFileType = TAPI_SIM_PB_3GSIM;
+       unsigned short RecordIndex = 1;
+       int pRequestId = 0;
+
+       ret_status = tel_delete_sim_pb_record (StorageFileType, RecordIndex, &pRequestId);
+}//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_PB_DELETE_CNF:
+                       printf(TAPI_EVENT_SIM_PB_DELETE_CNF);
+                       //
+                       break;
+       }
+}
+@endcode
+
+SAMPLE CODE FOR GETTING PHONEBOOK INIT INFO
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//  OPERATION REQUEST GET SIM PHONEBOOK INIT STATUS PART
+void get_sim_phonebook_init_status()
+{
+       int valid_index = 0;
+       TelSimPbList_t pb_list;
+       int pPbInitCompleted = 0;
+
+       err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list, &valid_index);
+       if (err_code == TAPI_API_SUCCESS)
+       {
+               if (pPbInitCompleted == 0)
+               {
+                       printf(" SIM PB INIT NOT completed ");
+               }
+               else
+               {
+                       printf("SIM PB INIT completed");
+                       // if no sim records at all then valid_index = 0xFF
+                       printf ("ADN First index is [%d]",valid_index);
+                       printf ("SIM phone book storage list Information ");
+                       printf ("********************************************");
+                       printf ("pb_list.b_fdn[%d]",pb_list.b_fdn);
+                       printf ("pb_list.b_msisdn[%d]",pb_list.b_msisdn);
+                       printf ("pb_list.b_adn[%d]",pb_list.b_adn);
+                       printf ("pb_list.b_sdn[%d]",pb_list.b_sdn);
+                       printf ("pb_list.b_3g[%d]",pb_list.b_3g);
+                       printf ("pb_list.b_aas[%d]",pb_list.b_aas);
+                       printf ("pb_list.b_gas[%d]",pb_list.b_gas);
+               }
+       }
+       else
+       {
+               printf("TAPI API FAIL: Error Code [0x%x]", err_code);
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_24 Getting 3G Phone Book Information
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">Getting 3G Phone Book Information</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs to retrieve SIM EFs supported by 3G phone , such as ANR, SNE, GRP, EMAIL etc and corresponding EFs max text length, number length and size.
+
+@code
+int tel_get_sim_pb_3g_meta_info(int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void get3gcapainfo()
+{
+       int ret_status;
+       int req_id = 0;
+
+       ret_status = tel_get_sim_pb_3g_meta_info (&req_id);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId, i;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType) {
+               case TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF:
+                       printf("[SIM APP]SIM PB Capability Info event status = [%x]\n", sim_event->Status);
+                       TelSimPbCapabilityInfo_t *sim_capability_info = (TelSimPbCapabilityInfo_t*)sim_event->pData;
+                       int i;
+                       for (i=0; i<sim_capability_info->FileTypeCount; i++)
+                       {
+                               printf(" [SIM APP]Filed tag type[%d]", sim_capability_info->FileTypeInfo[i].FileType3G);
+                               printf(" [SIM APP]max index [%d]\n", sim_capability_info->FileTypeInfo[i].PbIndexMax);
+                               printf(" [SIM APP]max text [%d]\n", sim_capability_info->FileTypeInfo[i].PbTextMax);
+                               printf(" [SIM APP]used count [%d]\n",  sim_capability_info->FileTypeInfo[i].TotalRecordCount);
+                       }
+                       break;
+                       //...
+       }
+}
+@endcode
+
+@}
+@defgroup Use_Cases5_25 SAP (Sim access Profile) features
+@ingroup Use_Cases5_NETWORK
+@{
+
+               <h3 class="pg">SAP (Sim access Profile) features</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+The SIM Access Profile defines the protocols and procedures that shall be used to access data and services of GSM SIM card, a UICC card or a R-UIM card via a Bluetooth link.
+
+The SIM Access Profile specifies the following features:
+- Connection Management
+- Transfer APDU
+- Transfer ATR
+- Power SIM off/on
+- Transfer Card Reader Status
+- Set Transport Protocol
+
+<h4>Connection Management:</h4>
+An established SIM Access Profile connection is the prerequisite for all other features.
+Telephony exposes APIs to make a connection request to SIM and to get connection status information.
+
+@code
+int tel_req_sap_connection( TelSimSapConnect_t *req_data, int *req_id);
+int tel_req_sap_connection_status( int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapconnectreq()
+{
+       int ret_status;
+       TelSimSapConnect_t pConnectionReq;
+       int pRequestId = 0;
+
+       pConnectionReq.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       pConnectionReq.MaxMsgSize = 10; //temp for testing only - not clear
+
+       ret_status = tel_req_sap_connection (&pConnectionReq, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CONNECT_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CONNECT_CNF");
+                       break;
+                       //...
+       }
+}
+
+//GET STATUS
+void sapconnectstatusreq()
+{
+       int request_id = 0;
+       int ret_status = tel_req_sap_connection_status (&request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CONNECT_STATUS_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CONNECT_STATUS_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Transfer APDU:</h4>
+The ability to send APDUs (Application Protocol Data Units) over the Bluetooth link
+@n Telephony provides API to transfer APDU to sim.
+
+@code
+int tel_req_sap_transfer_apdu(TelSimSapApduData_t *apdu_data, int *req_id);
+@endcode
+
+SAMPLE CODE:
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void saptransferapdu()
+{
+       int err_code;
+       int file_id = TAPI_SIM_EFILE_ICCID;
+
+       // for selecting EF ICCID
+       TelSimSapApduData_t apdu_data;
+       int pRequestId = 0;
+
+       apdu_data.ApduLength = 7;
+       apdu_data.Apdu[0] = 0xA0; // class
+       apdu_data.Apdu[1] = 0xA4; // instruction
+       apdu_data.Apdu[2] = 0; // p1 = parameter 1
+       apdu_data.Apdu[3] = 0; // p2 = parameter 2
+       apdu_data.Apdu[4] = 2; // p3 - parameter 3
+
+       memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+       err_code = tel_req_sap_transfer_apdu (&apdu_data, NULL);
+       if (err_code == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", err_code);
+}
+//WAIT FOR EVENT HERE
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_TRANSFER_APDU_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_TRANSFER_APDU_CNF");
+                       break;
+       }//...
+}
+@endcode
+
+<h4>Transfer ATR:</h4>
+The ability to send the content of the ATR (Answer to Reset) from the Server to the Client over the Bluetooth link. It contains information about the interface provided by the subscription module and the services on the GSM SIM, the UICC or the R-UIM.
+
+@code
+int tel_req_sap_transfer_atr( int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void saptransferatrreq()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_transfer_atr (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_TRANSFER_ATR_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_TRANSFER_ATR_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Power sim on/off:</h4>
+The ability to power the subscription module on/off remotely.
+
+@code
+int tel_req_sap_power_operation(TelSimSapMsgId_t req_data, int *req_id );
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapsetpower()
+{
+       int ret_status;
+       TelSimSapMsgId_t MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_power_operation (MsgId, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+
+       switch (EventType)
+       {
+               case TAPI_SIM_EVENT_SAP_SET_SIM_POWER_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_SET_SIM_POWER_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Transfer Card Reader Status:</h4>
+The card reader status contains some basic information about the Card Reader and the subscription module (e.g. the size of the SIM or if the SIM is removable).
+
+@code
+int tel_req_sap_cardreader_status(int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void simsapcardreaderstatus()
+{
+       int ret_status;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_cardreader_status (&pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+
+       switch (eventType)
+       {
+               case TAPI_SIM_EVENT_SAP_CARD_READER_STATUS_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_CARD_READER_STATUS_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+
+<h4>Set Transport Protocol:</h4>
+The server shall reset the subscription module and switch to the desired protocol if supported by subscription module and Server.
+
+@code
+int tel_req_sap_transport_protocol(TelSimSapProtocol_t protocol, int *req_id);
+@endcode
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void sapsettransportprotocol()
+{
+       int ret_status;
+       TelSimSapProtocol_t Protocol = TAPI_SIM_SAP_PROTOCOL_T0;
+       int pRequestId = 0;
+
+       ret_status = tel_req_sap_transport_protocol (Protocol, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_SIM_EVENT_SAP_SET_PROTOCOL_CNF:
+                       printf("TAPI_SIM_EVENT_SAP_SET_PROTOCOL_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_26 ISIM Features
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">ISIM Features</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+@code
+int tel_req_sim_isim_authentication( TelSimIsimAuthenticationData_t *authentication_data, int *req_id);
+@endcode
+
+Application uses this API to send the ISIM authentication request to telephony.
+
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+void isimauthreq()
+{
+       int ret_status;
+       TelSimIsimAuthenticationData_t authenticationData;
+       authenticationData.RandomAccessLength = 100;
+       authenticationData.RandomAccessLength = 100;
+       authenticationData.RandomAccessData = "test data";
+       authenticationData.AuthData = "test data";
+       int pRequestId = 0;
+
+       ret_status = tel_req_sim_isim_authentication (&authenticationData, &pRequestId);
+       if (ret_status == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF:
+                       printf("TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases5_27 SIM NOTIFICATION MESSAGE
+@ingroup Use_Cases5_NETWORK
+@{
+
+
+               <h3 class="pg">SIM NOTIFICATION MESSAGE </h3>
+These are not APIs, but EVENTs from the low layer. User can receive the following events:
+@code
+TAPI_EVENT_SIM_STATUS_IND
+TAPI_EVENT_SIM_FDN_STATUS_IND
+@endcode
+
+Application uses this event as follows.
+SAMPLE CODE
+@code
+#include <ITapiSim.h>
+#include <stdio.h>
+#include "TapiCommon.h"
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//CALLBACK FUNCTION TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       TelTapiEvent_t *sim_event = (TelTapiEvent_t*) event ;
+
+       unsigned int temp_handle = -1;
+       //...
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       switch (EventType)
+       {
+               case TAPI_EVENT_SIM_STATUS_IND:
+                       printf("***********TAPI_EVENT_SIM_STATUS_IND**************");
+
+                       if (status == TAPI_SIM_STATUS_CARD_ERROR)
+                       {
+                               printf("SIM CARD ERROR");
+                       }
+                       else if (status == TAPI_SIM_STATUS_CARD_NOT_PRESENT)
+                       {
+                               printf("SIM CARD NOT INSERTED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_INITIALIZING)
+                       {
+                               printf("SIM INITITIALIZING");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED)
+                       {
+                               printf("SIM INIT COMPLETED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED)
+                       {
+                               printf("SIM PIN REQUIRED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_SIM_PUK_REQUIRED)
+                       {
+                               printf("SIM PUK REQUIRED");
+                       }
+                       else if (status == TAPI_SIM_STATUS_CARD_BLOCKED)
+                       {
+                               printf("SIM CARD BLOCKED");
+                       }
+                       printf("********************************************");
+                       break;
+
+               case TAPI_EVENT_SIM_FDN_STATUS_IND:
+                       printf("*********TAPI_EVENT_SIM_FDN_STATUS_IND***********");
+                       printf("SIM FDN status event status = [0x%x]", status);
+                       printf("********************************************");
+                       break;
+                       //...
+       }
+}
+@endcode
+@}
+
+       <h2 class="pg">SOUND</h2>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+These APIs provide the interface for configuring sound related parameters.
+
+@defgroup Use_Cases6_1 Event Register and Deregister
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Event Register and Deregister </h3>
+To receive asynchronous event notifications for the Sound APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init ();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event (TAPI_EVENT_SOUND_VOLUMECTRL_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("VSOUND Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event (subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Deregestration Fail\n");
+}
+@endcode
+
+The main features provided by the Sound APIs include setting the volume,voice path and user configuration such as minute alert,Service change,Connet tone, Disconnect Tone...etc.
+@}
+@defgroup Use_Cases6_2 Voice path control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Voice path control</h3>
+This API provides an interface for controlling voice path via application.
+
+@code
+int tel_set_sound_path (tapi_sound_audio_path_t  vc_path, int *pRequestId);
+@endcode
+
+@}
+@defgroup Use_Cases6_3 Volume control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Volume control</h3>
+These APIs provide interfaces for controlling volume via application.
+
+@code
+int     tel_set_sound_volume_info (tapi_sound_volume_control_t vol_control, int *pRequestId);
+int     tel_get_sound_volume_info (tapi_sound_volume_type_t vol_control, int *pRequestId);
+@endcode
+
+@}
+@defgroup Use_Cases6_4 Mic mute control
+@ingroup Use_Cases6_SOUND
+@{
+
+
+               <h3 class="pg">Mic mute control</h3>
+This API provides an interface for mute/unmute mic via application.
+
+@code
+int  tel_set_sound_mute_status(tapi_sound_mic_mute_t micmute_set, int * pRequestId);
+@endcode
+
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSound.h>
+
+//SUBSCRIBE FOR EVENTS AS MENTIONED IN Event Register and Deregister
+
+//VOLUME CONTROL
+void vol_controlset()
+{
+       int ret_val;
+       int requestId = -1;
+       tapi_sound_volume_control_t vol_control;
+
+       vol_control.volume = TAPI_SOUND_VOLUME_LEVEL_3;
+       vol_control.vol_type = TAPI_SOUND_VOL_VOICE;
+
+       ret_val = tel_set_sound_volume_info(vol_control, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_val);
+       //WAIT FOR EVENT HERE
+}
+void vol_controlget()
+{
+       int ret_val;
+       int requestId = -1;
+       api_sound_volume_type_t vol_type;
+       vol_type = TAPI_SOUND_VOL_VOICE;
+
+       ret_val = tel_get_sound_volume_info (vol_type, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_val);
+       //WAIT FOR EVENT HERE
+}
+
+//VOICE PATH AND USER CONFIGURATION
+void voicepathset()
+{
+       int ret_val;
+       int requestId = -1;
+
+       tapi_sound_audio_path_t vc_path;
+       //VOICE PATH
+       vc_path = TAPI_SOUND_HANDSET;
+
+       ret_val = tel_set_sound_path (vc_path, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+
+//USER CONFIGURATION
+void usr_configset()
+{
+       int ret_val;
+       Int requestId = -1;
+       tapi_sound_user_sound_mask_t snd_mask;
+       tapi_sound_user_sound_value_t snd_value;
+
+       snd_mask = TAPI_SOUND_USER_MASK_ONE_MIN_ALERT;
+       snd_value = TAPI_SOUND_ON;
+       printf("tapi_sound_usr_configuration_set\n");
+       ret_val = tapi_sound_usr_configuration_set(snd_mask,snd_value, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+void usr_configget()
+{
+       int ret_val;
+       tapi_sound_user_sound_mask_t snd_mask;
+
+       snd_mask = TAPI_SOUND_USER_MASK_SERVICE_CHANGE_ALERT;
+       printf("tel_get_sound_mute_status \n");
+       ret_val = tel_get_sound_mute_status(snd_mask, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+//MIC MUTE CONT\ROL
+void micmute_controlset()
+{
+       int ret_val;
+       tapi_sound_mic_mute_t set_micmute;
+
+       set_micmute = TAPI_SOUND_MIC_MUTE;
+
+       printf(" tel_set_sound_mute_status \n");
+       ret_val = tel_set_sound_mute_status (set_micmute, &requestId);
+       if (ret_val == TAPI_API_SUCCESS)
+               printf("successful\n");
+       else
+               printf("error=%d\n", ret_status);
+       //WAIT FOR EVENT HERE
+}
+
+
+//CALL BACK TO BE USED
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       unsigned int temp_handle = -1;
+       //
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d]\n", eventClass, eventType , requestId, status );
+
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_SOUND:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_SOUND_VOLUMECTRL_RSP :
+                                       printf("***  TAPI_EVENT_SOUND_VOLUMECTRL_RSP received : %x ****\n", eventType);
+                                       tapi_sound_volumn_ctrl_res vlm_ctrl_info;
+                                       int index;
+
+                                       memcpy(&vlm_ctrl_info, event->pData,
+                                                       sizeof(tapi_sound_volumn_ctrl_res));
+                                       break;
+
+                               case TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI:
+                                       tapi_sound_audio_path_t AudioPath = 0;
+                                       int OldSndOutPath = MM_SOUND_PATH_NONE;
+                                       AudioPath = *((tapi_sound_audio_path_t *)(event->pData));
+                                       printf("***  TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI:
+                                       tapi_sound_audio_source_type_t *pAudioSrcCtrl = NULL;
+                                       pAudioSrcCtrl = (tapi_sound_audio_source_type_t*)(event->pData);
+                                       printf("***  TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_ERROR_IND:
+                                       tapi_phone_err_t errorCause;
+                                       errorCause = *(( tapi_phone_err_t *)(event->pData));
+                                       printf("***  TAPI_EVENT_SOUND_ERROR_IND received : %x ****\n", eventType);
+                                       break;
+
+                               case TAPI_EVENT_SOUND_MICMUTECTRL_RSP:
+                                       tapi_sound_mic_mute_t *mute_status = NULL;
+                                       mute_status = (tapi_sound_audio_source_type_t*)(event->pData);
+
+                                       printf("***  TAPI_EVENT_SOUND_MICMUTECTRL_RSP received : %x ****\n", eventType);
+                                       break;
+
+                               default:
+                                       printf("***  Default Event  %x ****\n", eventType);
+                                       break;
+                       }
+                       //...
+                       break;
+
+               default:
+                       printf("*** Other TAPI EVENT received : class : %x ****\n", eventClass);
+                       break;
+       }
+}
+@endcode
+@}
+
+
+       <h2 class="pg">SAT (SIM Application Toolkit)</h2>
+@defgroup Use_Cases7_1 Event register and deregister
+@ingroup Use_Cases7_SAT
+@{
+
+               <h3 class="pg">Event register and deregister</h3>
+To receive asynchronous event notifications for SAT APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != TAPI_API_SUCCESS)
+{
+       TEST_DEBUG("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_SAT_MENU_SELECTION_CNF, &subscription_id, (TelAppCallback)&app_callback);
+printf("SAT Event registration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+// DEREGISTER EVENT
+api_err = tel_deregister_event(subscription_id);
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("Event Class Unregeration Fail\n");
+}
+
+api_err = tel_deinit();
+if (api_err != TAPI_API_SUCCESS)
+{
+       printf("tel_deinit Fail\n");
+}
+
+static void app_callback(TelTapiEvent_t *event)
+{
+       //CALL BACK FUNTION TO BE CALLED
+       switch (event->EventType)
+       {
+               case TAPI_EVENT_SAT_DISPLAY_TEXT_IND:
+                       TelSatDisplayTextInd_t *event_data;
+                       event_data = (TelSatDisplayTextInd_t*)event->pData;
+                       break;
+               case TAPI_EVENT_SAT_GET_INKEY_IND:
+                       TelSatGetInkeyIndInfo_t *event_data;
+                       event_data = (TelSatGetInkeyIndInfo_t *)event->pData;
+                       break;
+               case TAPI_EVENT_SAT_GET_INPUT_IND:
+                       TelSatGetInputInd_t *event_data;
+                       event_data = (TelSatGetInputInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_PLAY_TONE_IND:
+                       TelSatPlayToneInd_t *event_data;
+                       event_data = (TelSatPlayToneInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_PLAY_TONE_IND:
+                       TelSatPlayToneInd_t *event_data;
+                       event_data = (TelSatPlayToneInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_REFRESH_IND:
+                       TelSatRefreshIndUiInfo_t *event_data;
+                       event_data = (TelSatRefreshIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_MENU_IND:
+                       TelSatSetupMenuInfo_t *event_data;
+                       event_data = (TelSatSetupMenuInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SETUP_MENU_IND:
+                       TelSatSetupMenuInfo_t *event_data;
+                       event_data = (TelSatSetupMenuInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SELECT_ITEM_IND:
+                       TelSatSelectItemInd_t *event_data;
+                       event_data = (TelSatSelectItemInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_SMS_IND:
+                       TelSatSendSmsIndUiInfo_t *event_data;
+                       event_data = (TelSatSendSmsIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_SS_IND:
+                       TelSatSendSsIndUiInfo_t *event_data;
+                       event_data = (TelSatSendSsIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_USSD_IND:
+                       TelSatSendUssdIndUiInfo_t *event_data;
+                       event_data = (TelSatSendUssdIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SETUP_CALL_IND:
+                       TelSatSetupCallIndUiInfo_t *event_data;
+                       event_data = (TelSatSetupCallIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND:
+                       TelSatProvideLocalInfoInd_t *event_data;
+                       event_data = (TelSatProvideLocalInfoInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND:
+                       TelSatSetupIdleModeTextInd_t *event_data;
+                       event_data = (TelSatSetupIdleModeTextInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_SEND_DTMF_IND:
+                       TelSatSendDtmfIndUiInfo_t *event_data;
+                       event_data = (TelSatSendDtmfIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND:
+                       TelSatLanguageNotiInfoInd_t *event_data;
+                       event_data = (TelSatLanguageNotiInfoInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_UI_LAUNCH_BROWSER_IND:
+                       TelSatLaunchBrowserIndUiInfo_t *event_data;
+                       event_data = (TelSatLaunchBrowserIndUiInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND:
+                       TelSatEndProactiveSessionIndInfo_t *event_data;
+                       event_data = (TelSatEndProactiveSessionIndInfo_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_MENU_SELECTION_CNF:
+                       TelSatEnvelopeResp_t *event_data;
+                       event_data = (TelSatEnvelopeResp_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_CALL_CONTROL_IND:
+                       TelSatCallCtrlIndData_t *event_data;
+                       event_data = (TelSatCallCtrlIndData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_MO_SMS_CONTROL_IND:
+                       TelSatMoSmCtrlIndData_t *event_data;
+                       event_data = (TelSatMoSmCtrlIndData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF:
+                       TelSatEnvelopeResp_t *event_data;
+                       event_data = (TelSatEnvelopeResp_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SMS_REFRESH_IND:
+               case TAPI_EVENT_SAT_PB_REFRESH_IND:
+               case TAPI_EVENT_SAT_IDLE_REFRESH_IND:
+                       TelSatRefreshInd_t *event_data;
+                       event_data = (TelSatRefreshInd_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_SMS_IND:
+                       TelSatSendSmsIndSmsData_t *event_data;
+                       event_data = (TelSatSendSmsIndSmsData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SETUP_CALL_IND:
+                       TelSatSetupCallIndCallData_t *event_data;
+                       event_data = (TelSatSetupCallIndCallData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_SS_IND:
+                       TelSatSendSsIndSsData_t *event_data;
+                       event_data = (TelSatSendSsIndSsData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_USSD_IND:
+                       TelSatSendUssdIndUssdData_t *event_data;
+                       event_data = (TelSatSendUssdIndUssdData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_SEND_DTMF_IND:
+                       TelSatSendDtmfIndDtmfData_t *event_data;
+                       event_data = (TelSatSendDtmfIndDtmfData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_LAUNCH_BROWSER_IND:
+                       TelSatLaunchBrowserIndBrowserData_t *event_data;
+                       event_data = (TelSatLaunchBrowserIndBrowserData_t *)event->pData;
+                       break;
+
+               case TAPI_EVENT_SAT_END_OF_APP_EXEC_IND:
+                       TelSatProactiveCmdEndIndInfo_t *event_data;
+                       event_data = (TelSatProactiveCmdEndIndInfo_t *)event->pData;
+                       break;
+
+               default:
+                       break;
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases7_2 Main Menu Information
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Main Menu Information</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides APIs for retreiving SAT Main Menu Information.
+
+
+@code
+int tel_get_sat_main_menu_info(TelSatSetupMenuInfo_t* pMainMenu)
+@endcode
+
+SAMPLE CODE:
+@code
+//SAT MAIN MENU INFORMATION
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void mainmenuinformation()
+{
+       int i = 0;
+       int ReturnStatus;
+       TelSatSetupMenuInfo_t SatMainMenuInfo;
+
+       ReturnStatus = tel_get_sat_main_menu_info(&SatMainMenuInfo);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+       {
+               printf(" SAT Main Menu Information \n");
+               printf("Main Menu Title  :%s\n", satMainMenuInfo.satMainTitle);
+               printf("Number of SAT Menu Items :%d\n", satMainMenuNum);
+               printf("Sat Menu Items are:\n");
+               for (i=0; i<SatMainMenuInfo.satMainMenuNum; i++)
+                       printf(" %s \n", SatMainMenuInfo.satMainMenuItem[i]);
+       }
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+@defgroup Use_Cases7_3 Envelope Commands
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Envelope Commands</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+This API sends a USIM application toolkit command to the USIM, using the envelope mechanism of USIM application toolkit. (See GSM TS 31.111)
+
+
+@code
+int tel_select_sat_menu(TelSatMenuSelectionReqInfo_t* pMenuSelect, int* pRequestId);
+int tel_download_sat_event(TelSatEventDownloadReqInfo_t*  pEventData, int* pRequestId);
+@endcode
+
+SAMPLE CODE:
+@code
+//MENU SELECTION ENVELOPE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+//Precondition
+//SUBSCRIBE TO SAT EVENT(TAPI_EVENT_SAT_MENU_SELECTION_CNF) AS MENTIONED IN //Event Register and Deregister
+
+void satmenuselectionenvelope()
+{
+       int RequestId = -1;
+       int ReturnStatus;
+       TelSatMenuSelectionReqInfo_t SatMenuSelect;
+
+       SatMenuSelect.itemIdentifier = 1;
+       SatMenuSelect.bIsHelpRequested = FALSE;
+
+       ReturnStatus = tel_select_sat_menu(&SatMenuSelect, &RequestId);
+       if (ReturnStatus != TAPI_API_SUCCESS)
+       {
+               printf("ReturnStatus =%d\n", ReturnStatus);
+       }
+       else
+       {
+               //WAIT FOR TAPI_EVENT_SAT_MENU_SELECTION_CNF EVENT HERE
+       }
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void SatAppCallback (TelTapiEvent_t *event)
+{
+       int EventClass = event->EventClass;
+       int EventType = event->EventType;
+       int RequestId = event->RequestId;
+       void* EventData = event->pData;
+       int Status = event->Status;
+
+       if (EventType == TAPI_EVENT_SAT_MENU_SELECTION_CNF)
+       {
+               printf(" TAPI_EVENT_SAT_MENU_SELECTION_CNF Event Received \n");
+       }
+}
+@endcode
+
+@code
+//EVENT DOWNLOAD ENVELOPE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+
+//Precondition
+//SUBSCRIBE TO SAT EVENT(TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF) AS MENTIONED IN //Event Register and Deregister
+void eventdownloadenvelope()
+{
+       int RequestId = -1;
+       int ReturnStatus;
+       TelSatEventDownloadReqInfo_t SatEventData;
+
+       SatEventData.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+
+       SatEventData.u.bIdleScreenAvailable = TRUE;
+
+       ReturnStatus = tel_download_sat_event(&SatEventData, &RequestId);
+       if (ReturnStatus != TAPI_API_SUCCESS)
+       {
+               printf("ReturnStatus =%d\n", ReturnStatus);
+       }
+       else
+       {
+               //WAIT FOR TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF EVENT HERE
+       }
+}
+
+//CALLBACK FUNCTION TO BE USED
+static void  SatAppCallback  (TelTapiEvent_t *event)
+{
+       int EventClass = event->EventClass;
+       int EventType = event->EventType;
+       int RequestId = event->RequestId;
+       void* EventData = event->pData;
+       int Status = event->Status;
+
+       if (EventType == TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF)
+       {
+               printf("TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF Event Received \n");
+               //Extract Event Data here
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases7_4 Application Execution result
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">Application Execution result</h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Telephony provides this API to get the Application execution result.
+
+
+@code
+Int tel_send_sat_app_exec_result(TelSatAppsRetInfo_t* pAppRetInfo);
+@endcode
+
+SAMPLE CODE:
+@code
+//SAT MAIN MENU TITLE
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void sendappexecutionresult()
+{
+       int ReturnStatus;
+       TelSatAppsRetInfo_t SatAppRetInfo;
+
+       SatAppRetInfo.commandType = TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT;
+       SatAppRetInfo.appsRet.setupIdleModeText.resp = TAPI_SAT_R_SUCCESS;
+
+       ReturnStatus = tel_send_sat_app_exec_result(&SatAppRetInfo);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+       {
+               printf(" Sending Application Execution Result Successful \n");
+       }
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+@defgroup Use_Cases7_5  UI /User Confirmation
+@ingroup Use_Cases7_SAT
+@{
+
+
+               <h3 class="pg">UI /User Confirmation </h3>
+<strong>[Note] Telephony Emulator does not support this feature.</strong>
+
+Send user’s confirmation message to the USIM application
+
+
+@code
+int tel_send_sat_ui_display_status(int commandId, TelSatUiDisplayStatusType_t status);
+int tel_send_sat_ui_user_confirm(TelSatUiUserConfirmInfo_t * pUserConfirmData) ;
+@endcode
+
+SAMPLE CODE:
+@code
+//UI DISPLAY STATUS
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void senduidisplaystatus()
+{
+       int ReturnStatus;
+       TelSatUiDisplayStatusType_t DisplatStatus;
+       int CommandId;
+
+       DisplatStatus = TAPI_SAT_DISPLAY_SUCCESS;
+       CommandId = commandId; //Command Id of the Proactive Command
+
+       ReturnStatus = tel_send_ui_display_status(CommandId, DisplayStatus);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+               printf(" Sending UI Display Status Successful \n");
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+
+@code
+//USER CONFIRMATION
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiSat.h>
+
+void senduiuserconfirm()
+{
+       int ReturnStatus;
+       TelSatUiUserConfirmInfo_t UserConfirmData;
+
+       UserConfirmData.commandId = commandId ; //Command Id of the Proactive Command
+
+       UserConfirmData.commandType = TAPI_SAT_CMD_TYPE_PLAY_TONE;
+       UserConfirmData.keyType = TAPI_SAT_USER_CONFIRM_YES;
+
+       UserConfirmData.pAdditionalData = NULL;
+       UserConfirmData.dataLen = 0;
+
+       ReturnStatus = tel_send_sat_ui_user_confirm(&UserConfirmData);
+       if (ReturnStatus == TAPI_API_SUCCESS)
+               printf(" Sending User Confirmation Data Successful \n");
+       else
+               printf("ReturnStatus =%d\n", ReturnStatus);
+}
+@endcode
+@}
+
+
+       <h2 class="pg">GPRS</h2>
+@defgroup Use_Cases8_1 Event Register and Deregister
+@ingroup Use_Cases8_GPRS
+@{
+
+               <h3 class="pg">Event Register and Deregister</h3>
+To receive asynchronous event notifications for GPRS APIs, the registration of related events with their associated call backs is required. When an asynchronous API is called, the confirmation is returned as an asynchronous event notification which invokes the callback function along with the event data.
+
+SAMPLE CODE:
+@code
+// REGISTER EVENT
+unsigned int subscription_id = 0;
+int api_err;
+
+api_err = tel_init();
+if (api_err != 0)
+{
+      printf ("tel_init Failed - api_err = %d \n", api_err);
+}
+
+api_err = tel_register_event(TAPI_EVENT_PS_PDP_ACT_RSP, &subscription_id , (TelAppCallback)&app_callback);
+printf("Power Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+
+tel_register_app_name("org.tizen.appname");
+
+void app_callback(TelTapiEvent_t *event)
+{
+       //callback function to be called
+}
+@endcode
+@}
+@defgroup Use_Cases8_2 Pdp Activation
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Pdp Activation</h3>
+This API is used to start a GPRS session successfully.
+
+@code
+int tel_activate_gprs_pdp (const tapi_ps_net_start_req_t *pNet_start_req_info,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include<stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+int ret_status;
+tapi_ps_net_start_req_t start_req;
+int request_id = 0;
+
+#define CONTEXT_ID 1
+#define APN_ADDRESS "nate.sktelecom.com"
+
+void gprsstart()
+{
+       int ret_status;
+       tapi_ps_net_start_req_t start_req;
+       int request_id = 0;
+
+       start_req.cont_id = CONTEXT_ID;
+       strcpy(start_req.pdp_info.apn , APN_ADDRESS);
+
+       ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/  gprs mode Started successfully \\n");
+       }
+       else
+       {
+               printf("/n/ gprs mode not started \\n");
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_PDP_ACT_RSP:
+                                       tapi_ps_net_activation_rsp_t  pdp_ip_resp;
+                                       memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_net_activation_rsp_t));
+                                       printf("TAPI_EVENT_PS_PDP_ACT_RSP\n");
+                                       break;
+
+                               case TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO:
+                                       tapi_ps_net_start_rsp_t  pdp_ip_resp;
+                                       memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_net_start_rsp_t));
+
+                               case TAPI_EVENT_PS_STATUS:
+                                       tapi_ps_attach_response_t res;
+                                       memcpy(&res, psEvent->pData, sizeof(tapi_ps_attach_response_t));
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_3 Check PDP Signal line On
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Check PDP Signal line On</h3>
+This API is used to check whether the PDP siganl line is on or not.
+
+Precondition:
+@n GPRS session should be started before running this API.
+
+@code
+int tel_control_gprs_btdun_pin (tapi_ps_btdun_pincontrol pincontrol,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+void pdpbtduncontrolget()
+{
+       int ret_status;
+       int request_id = 0;
+       tapi_ps_btdun_pincontrol bt_control;
+
+       bt_control.signal = GPRS_SIGNAL_DCD ;
+       bt_control.status = GPRS_SIGNAL_STATUS_OFF;
+
+       ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id) ;
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/  Successful \\n");
+       }
+       else
+       {
+               printf("/n/error:%d \n", ret_status);
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback  (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI:
+                                       tapi_ps_btdun_pincontrol pincontrol;
+                                       memcpy(&pincontrol, psEvent->pData, sizeof(tapi_ps_btdun_pincontrol));
+                                       printf("TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI\n");
+                                       break;
+                       }
+       }
+}
+@endcode
+@}
+@defgroup Use_Cases8_4 Set PDP deactivation
+@ingroup Use_Cases8_GPRS
+@{
+
+
+               <h3 class="pg">Set PDP deactivation</h3>
+This API is used to deactivate the PDP service.
+
+Precondition:
+@n GPRS session must be started before executing this API.
+
+@code
+int     tel_deactivate_gprs_pdp (const tapi_ps_net_stop_req_t *net_stop_req_info,int * pRequestID);
+@endcode
+
+<strong>This API is restricted for direct use. Use the Data Network API instead.</strong>
+
+SAMPLE CODE
+@code
+#include <stdio.h>
+#include <TapiCommon.h>
+#include <ITapiPS.h>
+
+#define CONTEXT_ID 1
+
+void setpdpdeactivation()
+{
+       int ret_status;
+       tapi_ps_net_stop_req_t end_req;
+       int request_id = 0;
+
+       memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+
+       end_req.cont_id = CONTEXT_ID;
+
+       ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id);
+       if (ret_status == TAPI_API_SUCCESS)
+       {
+               printf("/n/ gprs active session ended successfully \\n");
+       }
+       else
+       {
+               printf("/n/  gprs active session not ended  \\n");
+       }
+}
+//WAIT FOR EVENT HERE
+
+//CALLBACK FUNCTION TO BE USED
+void  ps_app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void *EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       printf(" app _callback is called \n");
+
+       switch (eventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch (eventType)
+                       {
+                               case TAPI_EVENT_PS_PDP_DEACT_IND:
+                                       tapi_ps_net_stop_rsp_t* pdp_stop_resp;
+                                       memcpy(pdp_stop_resp, psEvent->pData, sizeof(tapi_ps_net_stop_rsp_t));
+                                       printf("TAPI_EVENT_PS_PDP_DEACT_IND\n");
+                                       break;
+
+                               case TAPI_EVENT_PS_CALL_STATISTICS:
+                                       tapi_ps_call_statistics_t call_stats;
+                                       memcpy(&call_stats, psEvent->pData,
+                                                       sizeof(tapi_ps_call_statistics_t));
+                                       break;
+                       }
+                       break;
+       }
+       break;
+}
+@endcode
+@}
+@defgroup Appendixes1 Appendix A. Sample Codes
+@ingroup Appendix
+@{
+<h1 class="pg">Appendixes</h1>
+       <h2 class="pg">Appendix A. Sample Codes</h2>
+Some reference sample code is attached to help the application developer understand the telephony Framework Module
+
+How to use supplementary service APIs and handle SS events
+@code
+#include <ITapiSs.h>
+#include <TapiEvent.h>
+#include <TapiCommon.h>
+#include <TelUtility.h>
+
+GMainLoop *nw_context_loop = NULL;
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+} data_t;
+
+static int SS_Callback(int eventClass, int eventType, void * param2)
+{
+       int i;
+       printf ("\n\n\n SS_Callback is called! eventClass : %d\n, eventType : %d\n", eventClass, eventType);
+       fflush(stdout);
+       switch (eventType)
+       {
+               case TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY:
+                       if (param2 != NULL) {
+                               int x = 0;
+                               TelSsRelCompMsgInfo_t rel_comp_msg;
+                               memcpy(&rel_comp_msg, (TelSsRelCompMsgInfo_t *)param2,
+                                               sizeof(TelSsRelCompMsgInfo_t));
+                               printf("Printing the Release Complete Message \n");
+
+                               for (x=0; x<rel_comp_msg.RelCompMsgLen; x++)
+                               {
+                                       printf("[%.2x]", rel_comp_msg.szRelCompMsg[x]);
+                               }
+                       }// end if
+                       break;
+
+               case TAPI_EVENT_SS_WAITING_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_WAITING_CNF  ##### \n");
+                       if (param2 == NULL) {
+                               printf("param2 is NULL\n");
+                       }
+                       else {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       sInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####    Status: Active      #### \n");
+                                       else
+                                               printf("####     Status: Not Active   #### \n");
+                               } //end for
+                       }//end else
+                       break;
+
+               case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF:
+                       printf("####    Received vent :TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF  ##### \n");
+                       if (param2 == NULL) {
+                               printf("\n paran 2 is NULL\n");
+                               break;
+                       }
+                       TelSsInfo_t SsInfo;
+                       memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                       for (i=0; i<SsInfo.NumberOfRecords; i++) {
+                               printf("Number of records %d \n",SsInfo.NumberOfRecords);
+                               printf("Record:%d Status:%d Teleservice:%d \n",
+                                               i,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].Status,
+                                               SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+
+                               if (SsInfo.SsRecord.WaitingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                       printf("####    Status: Active      #### \n");
+                               else
+                                       printf("####     Status: Not Active   #### \n");
+                       }//end for
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF  ##### \n");
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_BARRING_CNF   ##### \n");
+                       break;
+
+               case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF  ##### \n");
+                       printf("Call barring Password Changed successfully\n");
+                       break;
+
+               case TAPI_EVENT_SS_FORWARD_CNF:
+                       printf("####    Received Event :TAPI_EVENT_SS_FORWARD_CNF  ##### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memset(&SsInfo, 0, sizeof(TelSsInfo_t));
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d\n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                               printf("####    Status: Registered      #### \n");
+                                       else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####     Status: Active   #### \n");
+                                       else
+                                               printf("####    Status: Not Registered /Not Active     ####\n");
+                               }//end for
+                       }
+                       else
+                       {
+                               printf("param2 is NULL\n");
+                       }
+                       break;
+
+               case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  ##### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               for (i=0; i<SsInfo.NumberOfRecords; i++)
+                               {
+                                       printf("Number of records %d \n", SsInfo.NumberOfRecords);
+                                       printf("Record:%d Status:%d Teleservice:%d \n",
+                                                       i,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status,
+                                                       SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                       if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_REGISTERED)
+                                               printf("####    Status: Registered      #### \n");
+                                       else if (SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status == TAPI_SS_STATUS_ACTIVE)
+                                               printf("####     Status: Active   #### \n");
+                                       else
+                                               printf("####    Status: Not Registered /Not Active     #### \n");
+                               }//end for
+                       }//end if
+                       else
+                       {
+                               printf("param 2 is NULL\n");
+                       }
+                       break;
+
+               case TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF:
+                       printf("####    Received Event : TAPI_EVENT_SS_IDENTIFY_IND #### \n");
+                       if (param2 != NULL) {
+                               TelSsInfo_t SsInfo;
+                               memcpy(&SsInfo, (TelSsInfo_t*)param2, sizeof(TelSsInfo_t));
+                               printf("Status :%d   CLI Service : %d \n",
+                                               SsInfo.SsRecord.CliRecord.CliStatus,
+                                               SsInfo.SsRecord.CliRecord.IdentificationType);
+                               if (SsInfo.SsRecord.CliRecord.CliStatus == 1)
+                                       printf(" #####    Status : Not Provisioned   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 2)
+                                       printf(" #####    Status :  Provisioned  but Deactivated #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 3)
+                                       printf(" #####    Status : Provisioned  and Activated   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 4)
+                                       printf(" #####    Status : Unknown   #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 5)
+                                       printf(" #####    Status : Temporarily Restricted  #####\n");
+                               else if (SsInfo.SsRecord.CliRecord.CliStatus == 6)
+                                       printf(" #####    Status : Temporarily Allowed  #####\n");
+                       }
+                       else
+                       {
+                               printf("param 2 is NULL\n");
+                       }
+                       break;
+
+               default:
+                       printf("\n\nDID NOT GET THE EVENT\n");
+                       break;
+       }//end switch
+       g_main_loop_quit(nw_context_loop);
+       return 0;
+}//end call back
+
+static void app_callback (TelTapiEvent_t *event)
+{
+       int eventClass;
+       int eventType;
+       int requestId;
+       int status;
+       void* EventData = NULL;
+
+       eventClass = event->EventClass;
+       eventType = event->EventType;
+       requestId = event->RequestId;
+       status = event->Status;
+       EventData = event->pData;
+       //TEST_DEBUG("Class:[%d], Event Type:[%d], RequestId:[%d], Status:[%d] \n", eventClass, eventType , requestId, status );
+       if (status != 0)
+       {
+               //TEST_DEBUG("******This is nonzero status. ******\n");
+               return;
+       }
+       SS_Callback((int)eventClass, (int)eventType, EventData);
+}
+
+ss_test_subscribe_tapi_events()
+{
+       //REGISTER EVENT
+       unsigned int subscription_id = 0;
+       TapiResult_t api_err;
+
+       api_err = TelTapiInit();
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("TelTapiInit Failed - api_err = %d \n", api_err);
+       }
+       api_err = TelTapiRegisterEvent(TAPI_EVENT_SS_WAITING_CNF, &subscription_id, (TelAppCallback)&app_callback);
+       printf("SS Class registeration is Done: sub id is %d, api_err is %d\n",subscription_id,api_err);
+       fflush(stdout);
+}
+
+noti_finish()
+{
+       //DEREGISTER EVENT
+       unsigned int subscription_id = 0;
+       TapiResult_t api_err;
+
+       api_err = tel_deregister_event(subscription_id);
+       if (api_err != TAPI_API_SUCCESS)
+       {
+               printf("Event Class Unregeration Fail\n");
+       }
+}
+
+tapi_ss_call_barr()
+{
+       TapiResult_t ret_status;
+       TelSsCallBarringInfo_t pBarringInfo;
+       int pRequestId = 0;
+       char *bar_pwd = "0000";
+
+       printf("Before copying ,,,length is %d\n", strlen(pBarringInfo.szPassword));
+       printf("len initially is %d\n", strlen(bar_pwd));
+
+       pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+       pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;//TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+       strcpy(pBarringInfo.szPassword, bar_pwd);
+       printf("length is %d\n", strlen(pBarringInfo.szPassword));
+       ret_status = tel_set_ss_barring(&pBarringInfo, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+
+       //now , get the status
+       TelSsCallBarType_t BarType = TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       ret_status = tel_get_ss_barring_status(BarType,CallType, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+tapi_ss_call_fwd()
+{
+       TapiResult_t ret_status;
+       TelSsForwardInfo_t pForwardInfo;
+       int len;
+       int pRequestId = 0;
+       char *cf_number = "9986529874";
+
+       pForwardInfo.Mode = TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+       pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+       pForwardInfo.NoReplyConditionTimer = 10;
+
+       len = strlen(cf_number);
+       printf("Length of CF number :%d \n", len);
+       memcpy(&(pForwardInfo.szPhoneNumber), cf_number, len);
+       ret_status = tel_set_ss_forward(&pForwardInfo, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+       //now , get call forward status
+       TelSsForwardType_t Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+       TelSsForwardWhen_t Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+
+       // Calling TAPI SS Call Frwd Query Req Status Api
+       ret_status = tel_get_ss_forward_status(Type,Condition, &pRequestId);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return ;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+tapi_ss_call_wait()
+{
+       //set and get call waiting
+       TapiResult_t ret_status;
+       TelSsWaitingInfo_t waitInfo;
+       int RequestID;
+
+       waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+       waitInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+
+       //set call wait
+       ret_status = tel_set_ss_waiting(&waitInfo, &RequestID);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+
+       sleep(4);
+
+       //now get call wait
+       TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+       ret_status = tel_get_ss_waiting_status(CallType, &RequestID);
+       if (ret_status != TAPI_API_SUCCESS) {
+               return;
+       }
+       nw_context_loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(nw_context_loop);
+}
+
+ss_test()
+{
+       ss_test_subscribe_tapi_events();
+       tapi_ss_call_barr();
+       tapi_ss_call_fwd();
+       tapi_ss_call_wait();
+       noti_finish();
+}
+
+int main(int argc, char *argv[])
+{
+       ss_test();
+       return 0;
+}
+@endcode
+@}
+@defgroup Appendixes2 Appendix   B. Error Code
+@ingroup Appendix
+@{
+
+       <h2 class="pg">Appendix B. Error Code</h2>
+<table>
+<tr><td>Error Num.</td>
+<td>Error Code</td>
+<td>Error Description</td></tr>
+<tr><td>0</td>
+<td>TAPI_API_SUCCESS</td>
+<td>No Error occurred</td></tr>
+<tr><td>-1</td>
+<td>TAPI_API_INVALID_INPUT</td>
+<td>Input values are not correct in TAPI Library</td></tr>
+<tr><td>-2</td>
+<td>TAPI_API_INVALID_PTR</td>
+<td>invalid pointer</td></tr>
+<tr><td>-3</td>
+<td>TAPI_API_NOT_SUPPORTED</td>
+<td>The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network.</td></tr>
+<tr><td>-4</td>
+<td>TAPI_API_DEPRICATED </td>
+<td>This API is deprecated and will be so in future also </td></tr>
+<tr><td>-5</td>
+<td>TAPI_API_SYSTEM_OUT_OF_MEM</td>
+<td>Out of memory</td></tr>
+<tr><td>-6</td>
+<td>TAPI_API_SYSTEM_RPC_LINK_DOWN</td>
+<td>RPC link down</td></tr>
+<tr><td>-7</td>
+<td>TAPI_API_SERVICE_NOT_READY          </td>
+<td>Phone was powered on, but yet to receive the power up completed notification </td></tr>
+<tr><td>-8</td>
+<td>TAPI_API_SERVER_FAILURE</td>
+<td>error occurred in Telephony server</td></tr>
+<tr><td>-9</td>
+<td>TAPI_API_OEM_PLUGIN_FAILURE</td>
+<td>Plug-in layer failure</td></tr>
+<tr><td>-10</td>
+<td>TAPI_API_TRANSPORT_LAYER_FAILURE</td>
+<td>Transport layer Failure</td></tr>
+<tr><td>-11</td>
+<td>TAPI_API_INVALID_DATA_LEN</td>
+<td>Invalid data length</td></tr>
+</table>
+@}
+*/
+/**
+* @defgroup  TELEPHONY
+ @{
+*      @defgroup Appendix Reference
+*      @defgroup TELEPHONY_USECASES Use Cases
+       @{
+*              @defgroup Use_Cases1_COMMON COMMON
+*              @defgroup Use_Cases2_CALL CALL
+*              @defgroup Use_Cases3_SUPPLEMENTARY_SERVICE SUPPLEMENTARY_SERVICE
+*              @defgroup Use_Cases4_SMS SMS
+*              @defgroup Use_Cases5_NETWORK NETWORK_Registration_and_Configuration
+*              @defgroup Use_Cases6_SOUND SOUND
+*              @defgroup Use_Cases7_SAT SAT
+*              @defgroup Use_Cases8_GPRS GPRS
+       @}
+ @}
+*/
diff --git a/include/common/TapiCommon.h b/include/common/TapiCommon.h
new file mode 100644 (file)
index 0000000..93ddbd0
--- /dev/null
@@ -0,0 +1,615 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup COMMON_TAPI     COMMON
+ * @{
+ *
+ * @file TapiCommon.h
+ * @brief  This file serves as a "C" header file defines functions for Tapi Common Interfaces like Callback Registration / De-registration. \n
+ It contains a sample set of function prototypes that would be required by applications.
+
+
+ */
+
+#ifndef _TAPI_COMMON_H_
+#define _TAPI_COMMON_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelUtility.h>
+#include <TapiEvent.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+#define TAPI_EVENT_NAME_MAX_LEN                        128             /**< Maximum length of theevent name */
+#define TAPI_REQUEST_NOTI_ID                   0xff    /**< Request id for notification message */
+#define TAPI_REQUEST_INVALID_ID                        -1              /**< Invalid request id */
+#define TAPI_DBUS_CONNECTION_NAME_LEN_MAX      255
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ *This structure retrieves current application name registered in DBUS.
+ */
+typedef struct {
+       char name[TAPI_DBUS_CONNECTION_NAME_LEN_MAX]; /**<application name*/
+       unsigned int length_of_name; /**<length of application name*/
+} tapi_dbus_connection_name;
+
+/**
+ *This structure holds information like length and actual tunneling data.
+ */
+typedef struct {
+       unsigned int TunnelDataLen; /**<Length of tunnel data*/
+       void *pTunnelData; /**<Tunneling information exchanged between OEM and application(Not Null terminated string)*/
+} TelTunnelInfo_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ * @brief This API shall be used to initialize TAPI library.
+ *  This API internally initiate a D-bus shared connection to communicate with Telephony Server.
+ *  This API should be called before any other TAPI APIs.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  None.
+ *
+ * @warning
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ *
+ * int api_err;
+ * api_err = tel_init(); //initialize telephony api if application use gmain loop
+ * @endcode
+ *
+ * @see tel_register_event tel_deinit
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_init(void);
+
+/**
+ * @brief  This function is used to register the callback function for a specific TAPI Event.
+ *           If Application tries to register a callback for a specific event multiple times, then multiple callbacks will be registered.
+ *           When an event indication is received, then registered callbacks for the specific event will be invoked multiple times.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  Incase Application has registered for multiple callbacks for a event and it wants to have only one callback to be registered
+ *     for that particular event, then Application needs to explicitly deregister the callbacks based on subscription id.
+ *     If Application wants to modify the already registered event with a different callback, then it needs to deregister the already
+ *     registered TAPI event with subscription id received and Application has to register again with a new callback for that TAPI event.
+ *
+ * @warning
+ *
+ * @param[in] EventType
+ * - TAPI Event for which the callback registration is required.
+ *
+ * @param [out] SubscriptionId
+ *   - An unique identifier identifying the callback registration.
+ *
+ * @param[in] AppCallBack
+ * - Callback which will be invoked when an event occurs for that particular event class.
+ *
+ * @param[in] data
+ * - User data which is passed as the callback parameter
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <stdio.h>
+ * #include <stdlib.h>
+ * #include <TapiCommon.h>
+ * #include <ITapiCall.h>
+ *
+ * void app_callback(TelTapiEvent_t *event);
+ * // REGISTER EVENT
+ * void registerevent()
+ * {
+ *     unsigned int subscription_id = 0;
+ *     int api_err = 0;
+ *
+ *     api_err = tel_init();
+ *     if(api_err != 0){
+ *             printf ("tel_init Failed - api_err = %d \n",api_err);
+ *     }
+ *     api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF ,
+ *                      &subscription_id, (TelAppCallback)&app_callback);
+ *     printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+ * }
+ *
+ * void callsetup()
+ * {
+ *     int ret_status = 0;
+ *     int RequestID = 0;
+ *     unsigned int CallHandle;
+ *     TelCallSetupParams_t Params;
+ *     char *normal = "1234";//Called party number
+ *
+ *     memset(&Params, 0, sizeof(TelCallSetupParams_t));
+ *     Params.CallType = TAPI_CALL_TYPE_VOICE;
+ *     strcpy(Params.szNumber, normal);
+ *
+ *     ret_status = tel_exe_call_mo (&Params, &CallHandle, &RequestID);
+ *     printf ("The return value is %d\n", ret_status);
+ *
+ *     if (ret_status == 0)
+ *             printf("successful\n");
+ *     else
+ *             printf("error=%d\n", ret_status); //WAIT FOR EVENT HERE
+ * }
+ *
+ * static void app_callback(TelTapiEvent_t *event)
+ * {
+ *     int eventClass;
+ *     int eventType;
+ *  int requestId;
+ *     int status;
+ *     void *EventData = NULL;
+ *
+ *     unsigned int temp_handle = 0;
+ *     eventClass = event->EventClass;
+ *     eventType = event->EventType;
+ *     requestId = event->RequestId;
+ *     status = event->Status;
+ *     EventData = event->pData;
+ *
+ *
+ *     if (status != 0) {
+ *             return;
+ *     }
+ *
+ *     switch (eventType) {
+ *             case TAPI_EVENT_CALL_SETUP_CNF:
+ *                     memcpy(&temp_handle, EventData, sizeof(unsigned int));
+ *                     break;
+ *             case TAPI_EVENT_CALL_ALERT_IND:
+ *                     memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+ *                     break;
+ *             case TAPI_EVENT_CALL_CONNECTED_IND:
+ *                     memcpy(&temp_handle, event->pData, sizeof(unsigned int));
+ *                     break;
+ *     }
+ *
+ *     // Handle the event data
+ *     ...
+ * }
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_register_event(int EventType, unsigned int *SubscriptionId, TelAppCallback AppCallBack, void *data);
+
+/**
+ * @brief  This function will de-register the application callback registered for the specific event or event class based on the
+ *             subscription id. This identifier is the same subscription identifier which is returned back to the application during
+ *             TAPI registration procedure.If de-register API is called during any service requests, Application registered callback
+ *             will be cleared based on the subscription id. No application callback shall be invoked in case any confirmations/indications
+ *             are received from TS.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  Application has to de-register each registration using subscription id explicitly as there is no overriding of callback registration.
+ *
+ * @warning
+ *
+ * @param[in] SubscriptionId
+ * - An unique identifier identifying the callback registration.
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ * #include <ITapiCall.h>
+ *
+ * unsigned int subscription_id = 0;
+ *
+ * void registerevent()
+ * {
+ *     int api_err = 0;
+ *     api_err = tel_init();
+ *     if (api_err != 0) {
+ *             printf ("tel_init Failed - api_err = %d \n", api_err);
+ *             return;
+ *     }
+ *     api_err = tel_register_event (TAPI_EVENT_CALL_SETUP_CNF,
+ *                      &subscription_id, (TelAppCallback)&app_callback);
+ *     printf("MISC Event registeration is Done: sub id is %d, api_err is %d\n", subscription_id, api_err);
+ * }
+ *
+ * void deregisterevent()
+ * {
+ *     int api_err = 0;
+ *  api_err = tel_deregister_event (subscription_id); //should be used subscription id which is generated at register time
+ * }
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_deregister_event(unsigned int SubscriptionId);
+
+/**
+ * @brief This API shall be used to de-initialize TAPI library.
+ *  It shall handle the reinitializing routines related to Event delivery mechanism.
+ *  This API internally shall handle Event delivery related de-initialization routines .
+ *  This API should be called before any other TAPI API.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  None.
+ *
+ * @warning
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ *
+ * int api_err = 0;
+ * api_err = tel_deinit(); //no in,out param required
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_deinit(void);
+
+
+/**
+ * @brief This API shall be used to check whether telephony service is ready or not.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  None.
+ *
+ * @warning
+ *
+ *
+ * @param[out] bStatus
+ * - Status of the telephony service
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ *
+ * int bStatus = 0;
+ * int err_code;
+ * err_code = tel_check_service_ready(&bStatus); //bStatus value is set 1 if ready
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_check_service_ready(int *bStatus);
+
+/**
+ * @brief This API shall be used to register the application name which listen
+ *        the async response upon the TAPI requests
+ *
+ * @par Notes:
+ * This function sets the application name. It is to determine the destination
+ * which the Telephony Server send the asynchronous response upon TAPI request.
+ * The TAPI callee can receive the response event.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  Before register an application name, tel_init() has to be called.
+ *    Otherwise it will fail in registering the name.
+ *
+ * @warning
+ *
+ *
+ * @param[in] name
+ * - Application name.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - It should be invoked after registering telephony events and before starting a event loop.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ * #include <glib.h>
+ *
+ * GMainLoop *loop = g_main_loop_new(NULL, false);
+ *
+ * tel_init();
+ * tel_register_app_name("org.tizen.test"); //register application name. the format of name is not fixed
+ * g_main_loop_run(loop);
+ *
+ * @endcode
+ *
+ * @see tel_get_app_name
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int tel_register_app_name(char *name);
+
+/**
+ * @brief This API shall be used to get the registered application name.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -  None.
+ *
+ * @warning
+ *
+ *
+ * @param[out] app_name
+ * - Application name which is registered in telephony server.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - It should be invoked after registering telephony events and before starting a event loop.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ *
+ * tapi_dbus_connection_name app_name;
+ * tel_get_app_name(&app_name); //if application want to get registered name itself
+ *
+ * @endcode
+ *
+ * @see tel_register_app_name
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int tel_get_app_name(tapi_dbus_connection_name *app_name);
+
+/**
+ * @brief  This API allows Application to send any proprietary information to OEM.
+ *
+ * @par Notes:
+ * This API shall be used when any proprietary information what telephony server is transparent is needed to send the OEM layer.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -  None.
+ *
+ * @warning
+ *
+ * @param[in] pTunnelInfo
+ * - This information holds the length of the tunneling data and actual tunneling data.
+ *
+ * @param[out] pRequestId
+ * - Callback which will be invoked when an event occurs for that particular event class.
+ *
+ * @par Async Response Message:
+ * - This Asynchronous event TAPI_EVENT_TUNNEL_INFO_CNF is returned in response and associated event
+ *    data is #TelTunnelInfo_t with this event. Asynchronous return status will be indicated by tunnel_status
+ *    which is a Boolean indicating success(1-True) or Failure(0-False)
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <TapiCommon.h>
+ *
+ * int requestId = 0;
+ * TelTunnelInfo_t ti;
+ * int test = 1234;
+ *
+ * ti.pTunnelData = (void *)test;
+ * ti.TunnelDataLen = sizeof(test); //should be set correct size
+ * ret = tel_request_tunnel (&ti, &requestId);
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ *  - None.
+ *
+ */
+/*================================================================================================*/
+int tel_request_tunnel(const TelTunnelInfo_t *pTunnelInfo, int *pRequestId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TAPI_COMMON_H_ */
+
+/**
+ *  @}
+ */
+
diff --git a/include/common/TapiEvent.h b/include/common/TapiEvent.h
new file mode 100644 (file)
index 0000000..cba2372
--- /dev/null
@@ -0,0 +1,610 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup COMMON_TAPI     EVENT
+ * @{
+ *
+ * @file TapiEvent.h
+ * @brief  This file serves as a "C" header file defines type of events. \n
+ */
+
+#ifndef _TAPI_EVENT_H_
+#define _TAPI_EVENT_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+/**
+ *   This value defines the Telephony Event Class. Class is nothing but a group of events
+ *   related to a particular subsystem. Example of one Event Class is TAPI_EVENT_CLASS_CALL_VOICE.
+ *   This becomes the first parameter of telephony notifications.
+ */
+
+#define TAPI_EVENT_NAME_MAX_LEN                        128     /**< Maximum length of theevent name */
+#define TAPI_REQUEST_NOTI_ID                   0xff    /**< Request id for notification message */
+#define TAPI_REQUEST_INVALID_ID                        -1              /**< Invalid request id */
+
+#define TAPI_EVENT_TYPE_CONFIRMATION   (0 << 16)
+#define TAPI_EVENT_TYPE_NOTIFICATION   (1 << 16)
+#define TAPI_EVENT_TYPE_RESERVED               (2 << 16)
+#define TAPI_EVENT_TYPE_MAX                            (3 << 16)
+
+#define TAPI_EVENT_NONE                                        (-1)                                                    /**< Event None */
+#define TAPI_EVENT_CLASS_BASE                  (0)                                                             /**< Event None */
+#define TAPI_EVENT_CLASS_CALL_VOICE            (TAPI_EVENT_CLASS_BASE + 0)             /**<    Voice Call Event Class  */
+#define TAPI_EVENT_CLASS_CALL_DATA             (TAPI_EVENT_CLASS_BASE + 1)             /**<    Data Call Event Class   */
+#define TAPI_EVENT_CLASS_SIM                   (TAPI_EVENT_CLASS_BASE + 2)             /**<    SIM Event  Class        */
+#define TAPI_EVENT_CLASS_NETTEXT               (TAPI_EVENT_CLASS_BASE + 3)             /**<    Nettext (SMS/CB) Event Class    */
+#define TAPI_EVENT_CLASS_NETWORK               (TAPI_EVENT_CLASS_BASE + 4)             /**<    Network Event  Class    */
+#define TAPI_EVENT_CLASS_SS                            (TAPI_EVENT_CLASS_BASE + 5)             /**<    SS Event  Class */
+#define TAPI_EVENT_CLASS_SAT                   (TAPI_EVENT_CLASS_BASE + 6)             /**<    SAT Events  Class       */
+#define TAPI_EVENT_CLASS_DATA                  (TAPI_EVENT_CLASS_BASE + 7)             /**<    GPRS DATA Events  Class */
+#define TAPI_EVENT_CLASS_SOUND                 (TAPI_EVENT_CLASS_BASE + 8)             /**<    SOUND Events  Class     */
+#define TAPI_EVENT_CLASS_UTIL                  (TAPI_EVENT_CLASS_BASE + 9)             /**<    COMMON Events  Class    */
+#define TAPI_EVENT_CLASS_EXTENSION             (TAPI_EVENT_CLASS_BASE + 0x1F)  /**<    Extension Event */
+#define TAPI_EVENT_CLASS_MAX                   (TAPI_EVENT_CLASS_BASE + 0x3F)  /**<    MAX event Class */
+
+#define        TAPI_EVENT_CLASS_ERR                    (TAPI_EVENT_CLASS_EXTENSION)            /**<    Fatal error Event  Class        */
+#define        TAPI_EVENT_CLASS_POWER                  (TAPI_EVENT_CLASS_EXTENSION + 1)        /**<    POWEREvents  Class      */
+#define        TAPI_EVENT_CLASS_DISPLAY                (TAPI_EVENT_CLASS_EXTENSION + 2)        /**<    DISPLAY Events  Class   */
+#define        TAPI_EVENT_CLASS_MISC                   (TAPI_EVENT_CLASS_EXTENSION + 3)        /**<    MISC Events  Class      */
+#define        TAPI_EVENT_CLASS_CFG                    (TAPI_EVENT_CLASS_EXTENSION + 4)        /**<    CFG Events  Class       */
+#define        TAPI_EVENT_CLASS_IMEI                   (TAPI_EVENT_CLASS_EXTENSION + 5)        /**<    MISC Events  Class      */
+#define        TAPI_EVENT_CLASS_GPS                    (TAPI_EVENT_CLASS_EXTENSION + 6)        /**<GPS Events  Class   */
+#define        TAPI_EVENT_CLASS_OMADM                  (TAPI_EVENT_CLASS_EXTENSION + 7)        /**<    OMADM Events  Class */
+#define TAPI_EVENT_CLASS_SVCMODE               (TAPI_EVENT_CLASS_EXTENSION + 8)
+#define TAPI_EVENT_CLASS_FACTORY               (TAPI_EVENT_CLASS_EXTENSION + 9)
+#define TAPI_EVENT_CLASS_CALL_E911             (TAPI_EVENT_CLASS_EXTENSION + 10)       // check why this is needed.
+#define        TAPI_EVENT_CLASS_CDMA_DATA              (TAPI_EVENT_CLASS_EXTENSION + 11)       /**<    CDMA Data Events  Class */
+
+/*     Events releated to Voice Call */
+#define TAPI_EVENT_CALL_CONFIRMATION                   (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_CALL_VOICE << 8))
+#define TAPI_EVENT_CALL_SETUP_CNF                              (TAPI_EVENT_CALL_CONFIRMATION + 0)              /**<    This event indicates the Call Setup request triggered */
+#define TAPI_EVENT_CALL_ANSWER_CNF                             (TAPI_EVENT_CALL_CONFIRMATION + 1)              /**<    Incoming call was answered*/
+#define TAPI_EVENT_CALL_RETRIEVE_CNF                   (TAPI_EVENT_CALL_CONFIRMATION + 2)              /**<    This event indicates Call is retrieved from held state*/
+#define TAPI_EVENT_CALL_HOLD_CNF                               (TAPI_EVENT_CALL_CONFIRMATION + 3)              /**<    This event indicates is call is put on hold*/
+#define TAPI_EVENT_CALL_TRANSFER_CNF                   (TAPI_EVENT_CALL_CONFIRMATION + 4)              /**<    This event indicates is call is explicitly transferred*/
+#define TAPI_EVENT_CALL_SETUPCONFERENCE_CNF            (TAPI_EVENT_CALL_CONFIRMATION + 5)              /**<    This event indicates that Call is joined in a conference*/
+#define TAPI_EVENT_CALL_SPLITCONFERENCE_CNF            (TAPI_EVENT_CALL_CONFIRMATION + 6)              /**<    This event indicates Call is split from conference*/
+#define TAPI_EVENT_CALL_SEND_DTMF_CNF                  (TAPI_EVENT_CALL_CONFIRMATION + 7)              /**<    This event indicates the confirmation for sending DTMF Digits to the network*/
+#define TAPI_EVENT_CALL_RELEASE_CNF                            (TAPI_EVENT_CALL_CONFIRMATION + 8)              /**<    This event is indicated when a specific call is released requested by the application*/
+#define TAPI_EVENT_CALL_RELEASE_ALL_CNF                        (TAPI_EVENT_CALL_CONFIRMATION + 9)              /**<    This event is indicated when all the calls released requested by the application*/
+#define TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF (TAPI_EVENT_CALL_CONFIRMATION + 10)             /**<    This event is indicated when all the active calls released requested by the application*/
+#define TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF   (TAPI_EVENT_CALL_CONFIRMATION + 11)             /**<    This event is indicated when all the held calls released requested by the application*/
+#define TAPI_EVENT_CALL_GET_LINEID_CNF                 (TAPI_EVENT_CALL_CONFIRMATION + 12)             /**<    Error in Get Line ID    */
+#define TAPI_EVENT_CALL_SET_LINEID_CNF                 (TAPI_EVENT_CALL_CONFIRMATION + 13)             /**<    Error in Set Line Id            */
+#define TAPI_EVENT_CALL_SWAP_CNF                               (TAPI_EVENT_CALL_CONFIRMATION + 14)             /**<    Call Swap Confirmation */
+#define TAPI_EVENT_CALL_TIME_CNF                               (TAPI_EVENT_CALL_CONFIRMATION + 15)             /**<    call time cnf */
+#define TAPI_EVENT_CALL_FLASHINFO_CNF                  (TAPI_EVENT_CALL_CONFIRMATION + 16)             /**<    Flash info      */
+#define TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF            (TAPI_EVENT_CALL_CONFIRMATION + 17)             /**<    Get Privacy mode        */
+#define TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF            (TAPI_EVENT_CALL_CONFIRMATION + 18)             /**<    Set Privacy mode        */
+#define TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF (TAPI_EVENT_CALL_CONFIRMATION + 19)             /**<    Exit Emergency mode     cnf */
+#define TAPI_EVENT_CALL_CNF_MAX                                        (TAPI_EVENT_CALL_CONFIRMATION + 20)
+
+#define TAPI_EVENT_CALL_NOTIFICATION                   (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_CALL_VOICE << 8))
+#define TAPI_EVENT_CALL_ALERT_IND                              (TAPI_EVENT_CALL_NOTIFICATION + 0)              /**<    This event indicates the Call is in Alerting stage*/
+#define TAPI_EVENT_CALL_CONNECTING_IND                 (TAPI_EVENT_CALL_NOTIFICATION + 1)              /**<    This event indicates the Call is in Connecting stage*/
+#define TAPI_EVENT_CALL_CONNECTED_IND                  (TAPI_EVENT_CALL_NOTIFICATION + 2)              /**<    This event indicates the Call is Connected */
+#define TAPI_EVENT_CALL_END_IND                                        (TAPI_EVENT_CALL_NOTIFICATION + 3)              /**<    This event indicates the Call is Ended. This event can be solicited/unsolicited.*/
+#define TAPI_EVENT_CALL_INCOM_IND                              (TAPI_EVENT_CALL_NOTIFICATION + 4)              /**<    This event indicates Incoming Call indication to Application*/
+#define TAPI_EVENT_CALL_HOLD_IND                               (TAPI_EVENT_CALL_NOTIFICATION + 5)              /**<    This event indicates that other party is has put the call on hold*/
+#define TAPI_EVENT_CALL_RETRIEVE_IND                   (TAPI_EVENT_CALL_NOTIFICATION + 6)              /**<    This event indicates that other party has retrieved the call from hold*/
+#define TAPI_EVENT_CALL_SETUPCONFERENCE_IND            (TAPI_EVENT_CALL_NOTIFICATION + 7)              /**<    Conference setup indication*/
+#define TAPI_EVENT_CALL_WAITING_IND                            (TAPI_EVENT_CALL_NOTIFICATION + 8)              /**<    Call waiting indication*/
+#define TAPI_EVENT_CALL_FORWARD_IND                            (TAPI_EVENT_CALL_NOTIFICATION + 9)              /**<    This event indication for Call is forwarded */
+#define TAPI_EVENT_CALL_TRANSFER_IND                   (TAPI_EVENT_CALL_NOTIFICATION + 10)             /**<    Call Transfer Indication*/
+#define TAPI_EVENT_CALL_TIME_IND                               (TAPI_EVENT_CALL_NOTIFICATION + 11)             /**<    call time ind */
+#define TAPI_EVENT_CALL_BARRING_IND                            (TAPI_EVENT_CALL_NOTIFICATION + 12)             /**<    This event indicates the Call is Barred*/
+#define TAPI_EVENT_CALL_FORWARDED_INFO_IND             (TAPI_EVENT_CALL_NOTIFICATION + 13)             /**<    This event indicates the MT call is Forwarded*/
+#define TAPI_EVENT_CALL_CUGINFO_IND                            (TAPI_EVENT_CALL_NOTIFICATION + 14)             /**<    This event indicates CUG information */
+#define TAPI_EVENT_CALL_AOCINFO_IND                            (TAPI_EVENT_CALL_NOTIFICATION + 15)             /**<    This event indicates the AOC Information*/
+#define TAPI_EVENT_CALL_CALLINGNAMEINFO_IND            (TAPI_EVENT_CALL_NOTIFICATION + 16)             /**<    This event indicates the Calling Name Information*/
+#define TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND        (TAPI_EVENT_CALL_NOTIFICATION + 17)             /**<    This event indicates the Connected Number Information*/
+#define TAPI_EVENT_CALL_CLISUPRESSIONREJ_IND   (TAPI_EVENT_CALL_NOTIFICATION + 18)             /**<    This event indicates the CLI Suppression Indication*/
+#define TAPI_EVENT_CALL_DEFLECTED_IND                  (TAPI_EVENT_CALL_NOTIFICATION + 19)             /**<    This event indicates the Call is Deflected*/
+#define TAPI_EVENT_CALL_UNCOND_FORWARDING_IND  (TAPI_EVENT_CALL_NOTIFICATION + 20)             /**<    This event indicates the Call is unconditionally forwarded*/
+#define TAPI_EVENT_CALL_COND_FORWARDING_IND            (TAPI_EVENT_CALL_NOTIFICATION + 21)             /**<    This event indicates the Call is conditionally forwarded*/
+#define TAPI_EVENT_CALL_CONNECTED_ECT_REMOTE_IND       (TAPI_EVENT_CALL_NOTIFICATION + 22)             /**<    This event indicates the ECT remote connection  */
+#define TAPI_EVENT_CALL_ON_HOLD_RELEASED_IND   (TAPI_EVENT_CALL_NOTIFICATION + 23)             /**<    This event indicates the Call on hold is released*/
+#define TAPI_EVENT_CALL_ALERT_ECT_REMOTE_IND   (TAPI_EVENT_CALL_NOTIFICATION + 24)             /**<    This event indicates the ECT remote alert*/
+#define TAPI_EVENT_CALL_SS_FORWARDED_MSG_RXED_IND      (TAPI_EVENT_CALL_NOTIFICATION + 25)             /**<    This event indicates that the forwarded msg has been received*/
+#define TAPI_EVENT_CALL_OTA_PROGRESS_IND               (TAPI_EVENT_CALL_NOTIFICATION + 26)             /**<       ota progress ind */
+#define TAPI_EVENT_CALL_DISPLAY_INFO_IND               (TAPI_EVENT_CALL_NOTIFICATION + 27)             /**<       display info ind */
+#define TAPI_EVENT_CALL_EMERGENCYMODE_IND              (TAPI_EVENT_CALL_NOTIFICATION + 28)             /**<    Emergency mode  ind */
+#define TAPI_EVENT_CALL_PRIVACYMODE_IND                        (TAPI_EVENT_CALL_NOTIFICATION + 29)             /**<    Privacy mode Indication */
+#define TAPI_EVENT_CALL_IND_MAX                                        (TAPI_EVENT_CALL_NOTIFICATION + 30)
+
+/*     Events releated to Data Call */
+#define TAPI_EVENT_DATA_CALL_CONFIRMATION              (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_CALL_DATA << 8))
+#define TAPI_EVENT_DATA_SETUP_CNF                              (TAPI_EVENT_DATA_CALL_CONFIRMATION + 0)         /**<    This event indicates the Call Setup request triggered */
+#define TAPI_EVENT_DATA_CNF_MAX                                        (TAPI_EVENT_DATA_CALL_CONFIRMATION + 1)
+
+#define TAPI_EVENT_DATA_CALL_NOTIFICATION              (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_CALL_DATA << 8))
+#define TAPI_EVENT_DATA_ALERT_IND                              (TAPI_EVENT_DATA_CALL_NOTIFICATION + 0)         /**<    This event indicates the Call is in Alerting stage*/
+#define TAPI_EVENT_DATA_CONNECTED_IND                  (TAPI_EVENT_DATA_CALL_NOTIFICATION + 2)         /**<    This event indicates the Call is Connected */
+#define TAPI_EVENT_DATA_END_IND                                (TAPI_EVENT_DATA_CALL_NOTIFICATION + 3)         /**<    This event indicates the Call is Ended. This event can be solicited/unsolicited.*/
+#define TAPI_EVENT_DATA_INCOM_IND                      (TAPI_EVENT_DATA_CALL_NOTIFICATION + 4)         /**<    This event indicates Incoming Call indication to Application*/
+#define TAPI_EVENT_DATA_AOCINFO_IND                    (TAPI_EVENT_DATA_CALL_NOTIFICATION + 15)        /**<    This event indicates the Call is in Alerting stage*/
+#define TAPI_EVENT_DATA_IND_MAX                                        (TAPI_EVENT_DATA_CALL_NOTIFICATION + 16)
+
+/*     Events releated to SIM */
+#define TAPI_EVENT_SIM_CONFIRMATION                            (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_SIM << 8))
+#define TAPI_EVENT_SIM_VERIFY_SEC_CNF                  (TAPI_EVENT_SIM_CONFIRMATION + 0)               /**<    verify pin,sim*/
+#define TAPI_EVENT_SIM_VERIFY_PUK_CNF                  (TAPI_EVENT_SIM_CONFIRMATION + 1)               /**<    verify puk1, puk2*/
+#define TAPI_EVENT_SIM_CHANGE_PINS_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 2)               /**<    change pin1,2*/
+#define TAPI_EVENT_SIM_DISABLE_SEC_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 3)               /**<    disable security facility*/
+#define TAPI_EVENT_SIM_ENABLE_SEC_CNF                  (TAPI_EVENT_SIM_CONFIRMATION + 4)               /**<    enable security facility*/
+#define TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF             (TAPI_EVENT_SIM_CONFIRMATION + 5)               /**<    disable fdn mode*/
+#define TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF              (TAPI_EVENT_SIM_CONFIRMATION + 6)               /**<    enable fdn mode*/
+#define TAPI_EVENT_SIM_PERS_STATUS_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 7)               /**<    status of personalization*/
+#define TAPI_EVENT_SIM_DISABLE_PERS_CNF                        (TAPI_EVENT_SIM_CONFIRMATION + 8)               /**<    disable personalization*/
+#define TAPI_EVENT_SIM_ENABLE_PERS_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 9)               /**<    enable personalization*/
+#define TAPI_EVENT_SIM_GET_INDICATION_CNF              (TAPI_EVENT_SIM_CONFIRMATION + 10)              /**<    read sim indication information(mwis, cfis)*/
+#define TAPI_EVENT_SIM_SET_INDICATION_CNF              (TAPI_EVENT_SIM_CONFIRMATION + 11)              /**<    update sim indication information(mwis, cfis)*/
+#define TAPI_EVENT_SIM_GET_MAILBOX_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 12)              /**<    read sim mailbox information*/
+#define TAPI_EVENT_SIM_SET_MAILBOX_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 13)              /**<    update sim mailbox information*/
+#define TAPI_EVENT_SIM_SET_LANGUAGE_CNF                        (TAPI_EVENT_SIM_CONFIRMATION + 14)              /**<    update sim language information*/
+#define TAPI_EVENT_SIM_RSIM_ACCESS_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 15)              /**<    rsim operation*/
+#define TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF (TAPI_EVENT_SIM_CONFIRMATION + 16)              /**<    ISIM authentication confirmation*/
+#define TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF            (TAPI_EVENT_SIM_CONFIRMATION + 17)              /**<    Phonebook storage count*/
+#define TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF               (TAPI_EVENT_SIM_CONFIRMATION + 18)              /**<    Phonebook entry information*/
+#define TAPI_EVENT_SIM_PB_ACCESS_READ_CNF              (TAPI_EVENT_SIM_CONFIRMATION + 19)              /**<    Phonebook access read*/
+#define TAPI_EVENT_SIM_PB_UPDATE_CNF                   (TAPI_EVENT_SIM_CONFIRMATION + 20)              /**<    Phonebook update result*/
+#define TAPI_EVENT_SIM_PB_DELETE_CNF                   (TAPI_EVENT_SIM_CONFIRMATION + 21)              /**<    Phonebook delete result*/
+#define TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF  (TAPI_EVENT_SIM_CONFIRMATION + 22)              /**<    3G SIM PB capability Info */
+#define TAPI_EVENT_SIM_SAP_CONNECT_CNF                 (TAPI_EVENT_SIM_CONFIRMATION + 23)              /**<    SAP connect confirmation */
+#define TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF  (TAPI_EVENT_SIM_CONFIRMATION + 24)              /**<    SAP connection status confirmation*/
+#define TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF            (TAPI_EVENT_SIM_CONFIRMATION + 25)              /**<    SAP transfer ATR confirmation */
+#define TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF   (TAPI_EVENT_SIM_CONFIRMATION + 26)              /**<    SAP transfer APDU confirmation */
+#define TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF            (TAPI_EVENT_SIM_CONFIRMATION + 27)              /**<    SAP set protocol confirmation */
+#define TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF   (TAPI_EVENT_SIM_CONFIRMATION + 28)              /**<    SAP set sim power confirmation */
+#define TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF      (TAPI_EVENT_SIM_CONFIRMATION + 29)      /**<    SAP card reader status confirmation*/
+#define TAPI_EVENT_SIM_APDU_CNF                                        (TAPI_EVENT_SIM_CONFIRMATION + 30)      /**<    apdu confirmation*/
+#define TAPI_EVENT_SIM_ATR_CNF                                 (TAPI_EVENT_SIM_CONFIRMATION + 31)      /**<    atr confirmation*/
+#define TAPI_EVENT_SIM_CNF_MAX                                 (TAPI_EVENT_SIM_CONFIRMATION + 32)
+
+#define TAPI_EVENT_SIM_NOTIFICATION                            (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_SIM << 8))
+#define TAPI_EVENT_SIM_STATUS_IND                              (TAPI_EVENT_SIM_NOTIFICATION + 0)               /**<    Unsolicited event --- whenever there is a changes in SIM status*/
+#define TAPI_EVENT_SIM_FDN_STATUS_IND                  (TAPI_EVENT_SIM_NOTIFICATION + 1)               /**<    Unsolicited event --- whenever there is a changes in FDN status and phonebook init status*/
+#define TAPI_EVENT_SIM_SAP_CONNECT_NOTI                        (TAPI_EVENT_SIM_NOTIFICATION + 2)               /**<    SAP connect notification */
+#define TAPI_EVENT_SIM_IND_MAX                                 (TAPI_EVENT_SIM_NOTIFICATION + 3)               /**<    SAP connect notification */
+
+/* Events related on Nettext Messages  */
+#define TAPI_EVENT_NETTEXT_CONFIRMATION                        (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_NETTEXT << 8))
+#define TAPI_EVENT_NETTEXT_SENTSTATUS_CNF              (TAPI_EVENT_NETTEXT_CONFIRMATION + 0)   /**<    This event is returned in response to SMS  message sent*/
+#define TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF (TAPI_EVENT_NETTEXT_CONFIRMATION + 1)   /**<    This event is returned in response to send delivery report*/
+#define TAPI_EVENT_NETTEXT_READ_SMS_CNF                (TAPI_EVENT_NETTEXT_CONFIRMATION + 2)   /**<    This event is returned in response to SMS Read message*/
+#define TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF             (TAPI_EVENT_NETTEXT_CONFIRMATION + 3)   /**<    This confirmation event is a returned indicating the Save SMS into SIM status*/
+#define TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF   (TAPI_EVENT_NETTEXT_CONFIRMATION + 4)   /**<    This confirmation event is a returned indicating the delete message status*/
+#define TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF   (TAPI_EVENT_NETTEXT_CONFIRMATION + 5)   /**<    This event is returned with Get CB configuration details*/
+#define TAPI_EVENT_NETTEXT_GET_COUNT_CNF               (TAPI_EVENT_NETTEXT_CONFIRMATION + 6)   /**<    This event is returned in response to Get Number of messages stored in SIM*/
+#define TAPI_EVENT_NETTEXT_GET_SCA_CNF                 (TAPI_EVENT_NETTEXT_CONFIRMATION + 7)   /**<    This event is returned with Get SCA Cnf*/
+#define TAPI_EVENT_NETTEXT_PARAM_COUNT_IND             (TAPI_EVENT_NETTEXT_CONFIRMATION + 8)   /**<    Param count response */
+#define TAPI_EVENT_NETTEXT_GET_PARAM_CNF               (TAPI_EVENT_NETTEXT_CONFIRMATION + 9)   /**<    This event is returned in response to NetText Get parameters*/
+#define TAPI_EVENT_NETTEXT_SET_REQUEST_CNF             (TAPI_EVENT_NETTEXT_CONFIRMATION + 10)  /**<    This event is returned as a confirmation for SET nettext APIs*/
+#define TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF   (TAPI_EVENT_NETTEXT_CONFIRMATION + 20)  /**<    This event is returned in response to SMS  message extended sent*/
+#define TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF   (TAPI_EVENT_NETTEXT_CONFIRMATION + 21)  /**<    This event is returned as a response to get preferred bearer used for SMS Transport*/
+#define TAPI_EVENT_NETTEXT_CNF_MAX                             (TAPI_EVENT_NETTEXT_CONFIRMATION + 22)
+
+#define TAPI_EVENT_NETTEXT_NOTIFICATION                        (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_NETTEXT << 8))
+#define TAPI_EVENT_NETTEXT_INCOM_IND                   (TAPI_EVENT_NETTEXT_NOTIFICATION + 0)   /**<    This is an unsolicited Incoming SMS Event*/
+#define TAPI_EVENT_NETTEXT_CB_INCOM_IND                        (TAPI_EVENT_NETTEXT_NOTIFICATION + 1)   /**<    This is an unsolicited Incoming cell broadcast message*/
+#define TAPI_EVENT_NETTEXT_INCOM_EX_IND                        (TAPI_EVENT_NETTEXT_NOTIFICATION + 2)   /**<    This is an extended unsolicited Incoming SMS Event*/
+#define TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND             (TAPI_EVENT_NETTEXT_NOTIFICATION + 3)   /**<    This is an extended unsolicited Incoming cell broadcast message*/
+#define TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND   (TAPI_EVENT_NETTEXT_NOTIFICATION + 4)   /**<    This event is an unsolicited event indicating SIM memory status */
+#define TAPI_EVENT_NETTEXT_DEVICE_READY_IND            (TAPI_EVENT_NETTEXT_NOTIFICATION + 5)   /**<    Device Ready indication */
+#define TAPI_EVENT_NETTEXT_IND_MAX                             (TAPI_EVENT_NETTEXT_NOTIFICATION + 6)
+
+/* Events related on Network Messages  */
+#define TAPI_EVENT_NETWORK_CONFIRMATION                        (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_NETWORK << 8))
+#define TAPI_EVENT_NETWORK_SELECT_CNF                  (TAPI_EVENT_NETWORK_CONFIRMATION + 0)   /**<    This confirmation event is returned when user manually selected a network from list for Network selection */
+#define TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 1)   /**<    This event is returned on getting network selection mode*/
+#define TAPI_EVENT_NETWORK_SEARCH_CNF                  (TAPI_EVENT_NETWORK_CONFIRMATION + 2)   /**<    This event is returned as confirmation for manual Network search with the available network list*/
+#define TAPI_EVENT_NETWORK_SETNWBAND_CNF               (TAPI_EVENT_NETWORK_CONFIRMATION + 3)   /**<    This event indicates the Network Band has been set*/
+#define TAPI_EVENT_NETWORK_GETNWBAND_CNF               (TAPI_EVENT_NETWORK_CONFIRMATION + 4)   /**<    This event indicates the Network Band has been identified and returned*/
+#define TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 5)   /**<    This event confirms the request to set the service domain */
+#define TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 6)   /**<    This event confirms the request to get the service domain */
+#define TAPI_EVENT_NETWORK_SETNWMODE_CNF               (TAPI_EVENT_NETWORK_CONFIRMATION + 7)   /**<    This event is returned on setting network mode*/
+#define TAPI_EVENT_NETWORK_GETNWMODE_CNF               (TAPI_EVENT_NETWORK_CONFIRMATION + 8)   /**<    This event is returned on getting network mode*/
+#define TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 9)   /**<    This event indicates the preferred PLMN has been set*/
+#define TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 10)  /**<    This event indicates that the PLMN used has been identified and returned */
+#define TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 11)  /**<     This event is returned on setting roaming mode */
+#define TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF        (TAPI_EVENT_NETWORK_CONFIRMATION + 12)  /**<    This event is returned on getting roaming mode */
+#define TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF    (TAPI_EVENT_NETWORK_CONFIRMATION + 13)  /**<    This event is returned on setting cdma hybrid mode */
+#define TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF    (TAPI_EVENT_NETWORK_CONFIRMATION + 14)  /**<    This event is returned on getting cdma hybrid mode */
+#define TAPI_EVENT_NETWORK_CNF_MAX                             (TAPI_EVENT_NETWORK_CONFIRMATION + 15)  /**<    This event is returned on getting cdma hybrid mode */
+
+#define TAPI_EVENT_NETWORK_NOTIFICATION                        (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_NETWORK << 8))
+#define TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND        (TAPI_EVENT_NETWORK_NOTIFICATION + 0)   /**<    This event indicates the LAC and CELLID has been obtained*/
+#define TAPI_EVENT_NETWORK_RADIO_INFO_IND              (TAPI_EVENT_NETWORK_NOTIFICATION + 1)   /**<    This event indicates the Radio Information is got*/
+#define TAPI_EVENT_NETWORK_SPN_INFO                            (TAPI_EVENT_NETWORK_NOTIFICATION + 2)   /**<    This event indicates the SPN info is got*/
+#define TAPI_EVENT_NETWORK_DISPLAYINFO_IND             (TAPI_EVENT_NETWORK_NOTIFICATION + 3)   /**<    This event indicates the Display Information is obtained*/
+#define TAPI_EVENT_NETWORK_CHANGE_IND                  (TAPI_EVENT_NETWORK_NOTIFICATION + 4)   /**<    This event indicates there is a change in Network*/
+#define TAPI_EVENT_NETWORK_IND_MAX                             (TAPI_EVENT_NETWORK_NOTIFICATION + 5)
+
+/* Events related on SS Messages  */
+#define TAPI_EVENT_SS_CONFIRMATION                             (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_SS << 8))
+#define TAPI_EVENT_SS_BARRING_CNF                              (TAPI_EVENT_SS_CONFIRMATION + 0)                /**<    This confirmation event is sent when Barring activation/deactivation is requested*/
+#define TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF   (TAPI_EVENT_SS_CONFIRMATION + 1)                /**<    This event is returned as Barring password change confirmation*/
+#define TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF  (TAPI_EVENT_SS_CONFIRMATION + 2)                /**<    This event is returned  as Barring status query confirmation*/
+#define TAPI_EVENT_SS_FORWARD_CNF                              (TAPI_EVENT_SS_CONFIRMATION + 3)                /**<    This event is returned as confirmation for Forward Activation/Deactivation/Registration/Erasure */
+#define TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  (TAPI_EVENT_SS_CONFIRMATION + 4)                /**<    This event is returned as confirmation for Forward Status query confirmation*/
+#define TAPI_EVENT_SS_WAITING_CNF                              (TAPI_EVENT_SS_CONFIRMATION + 5)                /**<    This event is returned as confirmation for Call waiting activation/deactivation*/
+#define TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF  (TAPI_EVENT_SS_CONFIRMATION + 6)                /**<    This event is returned as Call waiting status query confirmation*/
+#define TAPI_EVENT_SS_USSD_CNF                                 (TAPI_EVENT_SS_CONFIRMATION + 7)                /**<    This event is returned as USSD send confirmation*/
+#define TAPI_EVENT_SS_USSD_CANCEL_CNF                  (TAPI_EVENT_SS_CONFIRMATION + 8)                /**<    This event is returned as USSD cancel confirmation      >**/
+#define TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF              (TAPI_EVENT_SS_CONFIRMATION + 9)                /**<    This event is indicated to the Application for CLI service interrogation*/
+#define TAPI_EVENT_SS_AOC_RSP                                  (TAPI_EVENT_SS_CONFIRMATION + 10)               /**<    This event is used to send the aoc information */
+#define TAPI_EVENT_SS_SET_AOC_CNF                              (TAPI_EVENT_SS_CONFIRMATION + 11)               /**<    This event is used to send the confirmation for setting aoc values */
+#define TAPI_EVENT_SS_USSD_RSP_CNF                     (TAPI_EVENT_SS_CONFIRMATION + 12)       /**<    This event is returned as USSD response confirmation    >**/
+#define TAPI_EVENT_SS_CNF_MAX                                  (TAPI_EVENT_SS_CONFIRMATION + 13)
+
+#define TAPI_EVENT_SS_NOTIFICATION                             (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_SS << 8))
+#define TAPI_EVENT_SS_USSD_IND                                 (TAPI_EVENT_SS_NOTIFICATION + 0)                /**<    This is an unsolicited USSD indication*/
+#define TAPI_EVENT_SS_BARRING_TYPE_IND                 (TAPI_EVENT_SS_NOTIFICATION + 1)                /**<    This event is used to send the barring type while making an MO call */
+#define TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY              (TAPI_EVENT_SS_NOTIFICATION + 2)                /**<    This event is indicated to the Application when tapi receives Release complete message notification for any SS transactions*/
+#define TAPI_EVENT_SS_REL_CO                                   (TAPI_EVENT_SS_NOTIFICATION + 3)                /**<    This event is indicated to the Application when tapi receives Release complete message notification for any SS transactions*/
+#define TAPI_EVENT_SS_IND_MAX                                  (TAPI_EVENT_SS_NOTIFICATION + 4)
+
+/*SAT events*/
+#define TAPI_EVENT_SAT_CONFIRMATION                            (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_SAT << 8))
+#define TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF              (TAPI_EVENT_SAT_CONFIRMATION + 0)               /**< response from sim for event download request */
+#define TAPI_EVENT_SAT_MENU_SELECTION_CNF              (TAPI_EVENT_SAT_CONFIRMATION + 1)               /**< response from sim for menu selection request */
+#define TAPI_EVENT_SAT_CNF_MAX                                 (TAPI_EVENT_SAT_CONFIRMATION + 2)
+
+#define TAPI_EVENT_SAT_NOTIFICATION                            (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_SAT << 8))
+#define TAPI_EVENT_SAT_DISPLAY_TEXT_IND                        (TAPI_EVENT_SAT_NOTIFICATION + 0)               /**< 0x0D00, SAT Display Text Event*/
+#define TAPI_EVENT_SAT_GET_INKEY_IND                   (TAPI_EVENT_SAT_NOTIFICATION + 1)               /**< SAT Get Inkey Event */
+#define TAPI_EVENT_SAT_GET_INPUT_IND                   (TAPI_EVENT_SAT_NOTIFICATION + 2)               /**< SAT Get Input Event */
+#define TAPI_EVENT_SAT_UI_PLAY_TONE_IND                        (TAPI_EVENT_SAT_NOTIFICATION + 3)               /**< SAT Play Tone Event for UI client*/
+#define TAPI_EVENT_SAT_PLAY_TONE_IND                   (TAPI_EVENT_SAT_NOTIFICATION + 4)               /**< SAT Play Tone Event for MM client */
+#define TAPI_EVENT_SAT_UI_REFRESH_IND                  (TAPI_EVENT_SAT_NOTIFICATION + 5)               /**< SAT Refresh Event for UI client*/
+#define TAPI_EVENT_SAT_SETUP_MENU_IND                  (TAPI_EVENT_SAT_NOTIFICATION + 6)               /**< SAT Setup Menu Event for UI client */
+#define TAPI_EVENT_SAT_UI_SETUP_MENU_IND               (TAPI_EVENT_SAT_NOTIFICATION + 7)               /**< SAT Setup Menu Event for UI client */
+#define TAPI_EVENT_SAT_SELECT_ITEM_IND                 (TAPI_EVENT_SAT_NOTIFICATION + 8)               /**< SAT Select Item Event */
+#define TAPI_EVENT_SAT_UI_SEND_SMS_IND                 (TAPI_EVENT_SAT_NOTIFICATION + 9)               /**< SAT Send SMS Event for UI client */
+#define TAPI_EVENT_SAT_UI_SEND_SS_IND                  (TAPI_EVENT_SAT_NOTIFICATION + 10)              /**< SAT Send SS Event for UI client */
+#define TAPI_EVENT_SAT_UI_SEND_USSD_IND                        (TAPI_EVENT_SAT_NOTIFICATION + 11)              /**< SAT Send USSD Event for UI client */
+#define TAPI_EVENT_SAT_UI_SETUP_CALL_IND               (TAPI_EVENT_SAT_NOTIFICATION + 12)              /**< SAT Setup Call Event for UI client */
+#define TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND  (TAPI_EVENT_SAT_NOTIFICATION + 13)              /**< SAT Provide Local Information Event*/
+#define TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND        (TAPI_EVENT_SAT_NOTIFICATION + 14)              /**< SAT Setup Idle Mode Event*/
+#define TAPI_EVENT_SAT_UI_SEND_DTMF_IND                        (TAPI_EVENT_SAT_NOTIFICATION + 15)              /**< SAT Send DTMF Event for UI client*/
+#define TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND       (TAPI_EVENT_SAT_NOTIFICATION + 16)      /**< SAT Language notification Event */
+#define TAPI_EVENT_SAT_UI_LAUNCH_BROWSER_IND   (TAPI_EVENT_SAT_NOTIFICATION + 17)              /**< SAT Launch Browser Event for UI client*/
+#define TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND       (TAPI_EVENT_SAT_NOTIFICATION + 18)      /**< SAT End Proactive Command Session Event. This is to indicate that Proactive UICC Session ended*/
+#define TAPI_EVENT_SAT_CALL_CONTROL_IND                        (TAPI_EVENT_SAT_NOTIFICATION + 19)              /**< response from sim for call control by USIM. This is to indicate that the voice call/ss/ussd parameters have been modified by USIM  */
+#define TAPI_EVENT_SAT_MO_SMS_CONTROL_IND              (TAPI_EVENT_SAT_NOTIFICATION + 20)              /**< response from sim for Mo sms control by USIM. This is to indicate that the SMS parameters have been modified by USIM */
+#define TAPI_EVENT_SAT_SMS_REFRESH_IND (TAPI_EVENT_SAT_NOTIFICATION + 21)              /**< SAT Refresh Event for SMS client */
+#define TAPI_EVENT_SAT_PB_REFRESH_IND  (TAPI_EVENT_SAT_NOTIFICATION + 22)              /**< SAT Refresh Event for Phonebook client*/
+#define TAPI_EVENT_SAT_IDLE_REFRESH_IND                (TAPI_EVENT_SAT_NOTIFICATION + 23)              /**< SAT Refresh Event for Idle Mode client */
+#define TAPI_EVENT_SAT_SEND_SMS_IND                    (TAPI_EVENT_SAT_NOTIFICATION + 24)              /**< SAT Send SMS Event for SMS client*/
+#define TAPI_EVENT_SAT_SETUP_CALL_IND  (TAPI_EVENT_SAT_NOTIFICATION + 25)              /**< SAT Setup Call Event for Call client */
+#define TAPI_EVENT_SAT_SEND_SS_IND             (TAPI_EVENT_SAT_NOTIFICATION + 26)              /**< SAT Send SS Event for SS client*/
+#define TAPI_EVENT_SAT_SEND_USSD_IND   (TAPI_EVENT_SAT_NOTIFICATION + 27)              /**< SAT Send SS Event for USSD client */
+#define TAPI_EVENT_SAT_SEND_DTMF_IND           (TAPI_EVENT_SAT_NOTIFICATION + 28)              /**< SAT Send DTMF Event for UI client*/
+#define TAPI_EVENT_SAT_LAUNCH_BROWSER_IND      (TAPI_EVENT_SAT_NOTIFICATION + 29)              /**< SAT Launch Browser Event for Browser */
+#define TAPI_EVENT_SAT_END_OF_APP_EXEC_IND             (TAPI_EVENT_SAT_NOTIFICATION + 30)              /**< SAT End Proactive command Execution Event. This event will be indicated to the application to end the execution of a Proactive Command when required  */
+#define TAPI_EVENT_SAT_EVENT_DOWNLOAD_IND      (TAPI_EVENT_SAT_NOTIFICATION + 31)              /**< SAT Event Download Indication for Idle, Browser, Setting applications */
+#define TAPI_EVENT_SAT_IND_MAX                                 (TAPI_EVENT_SAT_NOTIFICATION + 32)
+
+/* DATA Events */
+#define TAPI_EVENT_PS_CONFIRMATION                             (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_DATA << 8))
+#define TAPI_EVENT_PS_PDP_ACT_RSP                              (TAPI_EVENT_PS_CONFIRMATION + 0)                        /**< 0x0B00,   -  PDP activation response event */
+#define TAPI_EVENT_PS_PDP_DEACT_RSP                            (TAPI_EVENT_PS_CONFIRMATION + 1)                        /**<      PDP deactivation response event */
+#define TAPI_EVENT_PS_CNF_MAX                                  (TAPI_EVENT_PS_CONFIRMATION + 5)
+
+#define TAPI_EVENT_PS_NOTIFICATION                             (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_DATA << 8))
+#define TAPI_EVENT_PS_PDP_DEACT_IND                            (TAPI_EVENT_PS_NOTIFICATION + 0)                        /**<     PDP deactivation indication event. */
+#define TAPI_EVENT_PS_STATUS                                   (TAPI_EVENT_PS_NOTIFICATION + 1)                        /**<     PDP status event. */
+#define TAPI_EVENT_PS_CALL_STATISTICS                  (TAPI_EVENT_PS_NOTIFICATION + 2)                        /**<     publish notification or response of the call statistics  */
+#define TAPI_EVENT_PS_HSDPA_STATUS_NOTI                        (TAPI_EVENT_PS_NOTIFICATION + 3)                        /**<   HSDPA Status notification event  */
+#define TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI            (TAPI_EVENT_PS_NOTIFICATION + 4)                        /**<  BT DUN PIN notification event   */
+#define TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO            (TAPI_EVENT_PS_NOTIFICATION + 5)                        /**<  PDP IP information event  */
+#define TAPI_EVENT_PS_EXTERNAL_CALL_IND                        (TAPI_EVENT_PS_NOTIFICATION + 6)                        /**<  External call indication event  */
+#define TAPI_EVENT_PS_ERROR_IND                                        (TAPI_EVENT_PS_NOTIFICATION + 7)                        /**<  PS Error event   */
+#define TAPI_EVENT_PS_IND_MAX                                  (TAPI_EVENT_PS_NOTIFICATION + 8)
+
+/* Sound events */
+#define TAPI_EVENT_SOUND_CONFIRMATION                  (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_SOUND << 8))
+#define TAPI_EVENT_SOUND_VOLUMECTRL_RSP                        (TAPI_EVENT_SOUND_CONFIRMATION + 0)            /**<  Phone volumn response event  */
+#define TAPI_EVENT_SOUND_MICMUTECTRL_RSP               (TAPI_EVENT_SOUND_CONFIRMATION + 1)             /**<   MIC mute response event */
+#define TAPI_EVENT_SOUND_SUCCESS_IND                   (TAPI_EVENT_SOUND_CONFIRMATION + 2)             /**<   Sound Error response event */
+#define TAPI_EVENT_SOUND_ERROR_IND                             (TAPI_EVENT_SOUND_CONFIRMATION + 3)             /**<   Sound Success response event */
+#define TAPI_EVENT_SOUND_CNF_MAX                               (TAPI_EVENT_SOUND_CONFIRMATION + 4)
+
+#define TAPI_EVENT_SOUND_NOTIFICATION                  (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_SOUND << 8))
+#define TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI            (TAPI_EVENT_SOUND_NOTIFICATION + 0)     /**<  Audio path indication event   */
+#define TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI  (TAPI_EVENT_SOUND_NOTIFICATION + 1)     /**<   Audio source indication event  */
+#define TAPI_EVENT_SOUND_IND_MAX                               (TAPI_EVENT_SOUND_NOTIFICATION + 2)
+
+/* Util events */
+#define TAPI_EVENT_UTIL_CONFIRMATION                   (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_UTIL << 8))
+#define TAPI_EVENT_UTIL_TUNNEL_CNF                             (TAPI_EVENT_UTIL_CONFIRMATION + 0)             /**<  tunnel response event  */
+
+#define TAPI_EVENT_UTIL_NOTIFICATION                   (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_UTIL << 8))
+#define TAPI_EVENT_UTIL_TUNNEL_NOTI                            (TAPI_EVENT_UTIL_NOTIFICATION + 0)             /**<  tunnel notification event  */
+
+/* Extension events */
+#define        TAPI_EVENT_CLASS_ERR                    (TAPI_EVENT_CLASS_EXTENSION)            /**< Fatal error Event  Class */
+#define        TAPI_EVENT_CLASS_POWER                  (TAPI_EVENT_CLASS_EXTENSION + 1)        /**< POWEREvents  Class */
+#define        TAPI_EVENT_CLASS_DISPLAY                (TAPI_EVENT_CLASS_EXTENSION + 2)        /**< DISPLAY Events  Class */
+#define        TAPI_EVENT_CLASS_MISC                   (TAPI_EVENT_CLASS_EXTENSION + 3)        /**< MISC Events  Class */
+#define        TAPI_EVENT_CLASS_CFG                    (TAPI_EVENT_CLASS_EXTENSION + 4)        /**< CFG Events  Class */
+#define        TAPI_EVENT_CLASS_IMEI                   (TAPI_EVENT_CLASS_EXTENSION + 5)        /**< MISC Events  Class */
+#define        TAPI_EVENT_CLASS_GPS                    (TAPI_EVENT_CLASS_EXTENSION + 6)        /**< GPS Events  Class */
+#define        TAPI_EVENT_CLASS_OMADM                  (TAPI_EVENT_CLASS_EXTENSION + 7)        /**< OMADM Events  Class */
+#define TAPI_EVENT_CLASS_SVCMODE               (TAPI_EVENT_CLASS_EXTENSION + 8)
+#define TAPI_EVENT_CLASS_FACTORY               (TAPI_EVENT_CLASS_EXTENSION + 9)
+#define TAPI_EVENT_CLASS_CALL_E911             (TAPI_EVENT_CLASS_EXTENSION + 10)       // check why this is needed.
+#define        TAPI_EVENT_CLASS_CDMA_DATA              (TAPI_EVENT_CLASS_EXTENSION + 11)       /**< CDMA Data Events  Class */
+
+#define        TAPI_EVENT_NETWORK_GETPOWERONATTACH_CNF                 (TAPI_EVENT_NETWORK_CNF_MAX + 0)        /**< This event indicates the Power on attach options has been identified and returned */
+#define        TAPI_EVENT_NETWORK_SETPOWERONATTACH_CNF                 (TAPI_EVENT_NETWORK_CNF_MAX + 1)        /**< This event indicates the Power on attach has been set */
+#define        TAPI_EVENT_NETWORK_GETNWORDER_CNF                               (TAPI_EVENT_NETWORK_CNF_MAX + 2)        /**< This event is returned on getting network order */
+#define        TAPI_EVENT_NETWORK_SETNWORDER_CNF                               (TAPI_EVENT_NETWORK_CNF_MAX + 3)        /**< This event is returned on setting network order */
+#define        TAPI_EVENT_NETWORK_CANCELMANUALSELECTION_CNF    (TAPI_EVENT_NETWORK_CNF_MAX + 4)        /**< This event is returned on cancellation of manual network selection from network list */
+#define        TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF               (TAPI_EVENT_NETWORK_CNF_MAX + 5)        /**< This event is returned on cancellation of manual network search */
+#define        TAPI_EVENT_NETWORK_SEARCH_POPUP_ENABLE                  (TAPI_EVENT_NETWORK_CNF_MAX + 6)        /**< This event indicates a status which applications refer to show network search popup */
+#define        TAPI_EVENT_NETWORK_SEARCH_POPUP_DISABLE                 (TAPI_EVENT_NETWORK_CNF_MAX + 7)        /**< This event indicates a status which applications refer to show network search popup */
+#define        TAPI_EVENT_NETWORK_INTERNAL_CNF_MAX                             (TAPI_EVENT_NETWORK_CNF_MAX + 8)
+
+/* Error Class Events*/
+#define        TAPI_EVENT_ERR_NOTIFICATION                                     (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_ERR<<8))
+#define        TAPI_EVENT_ERR                                                          (TAPI_EVENT_ERR_NOTIFICATION + 0)               /**< Fatal Error Information */
+#define        TAPI_EVENT_ERR_RESERVED1_IND                            (TAPI_EVENT_ERR_NOTIFICATION + 1)               /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+#define        TAPI_EVENT_ERR_RESERVED2_IND                            (TAPI_EVENT_ERR_NOTIFICATION + 2)               /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+#define        TAPI_EVENT_ERR_RESERVED3_IND                            (TAPI_EVENT_ERR_NOTIFICATION + 3)               /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+#define        TAPI_EVENT_ERR_RESERVED4_IND                            (TAPI_EVENT_ERR_NOTIFICATION + 4)               /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+#define        TAPI_EVENT_ERR_RESERVED5_IND                            (TAPI_EVENT_ERR_NOTIFICATION + 5)               /**< This event is notified to application about some error has occurred at OEM and can be used for debugging purpose */
+
+/*     Power Module Event Types...     */
+#define        TAPI_EVENT_POWER_CONFIRMATION                           (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_POWER<<8))
+#define        TAPI_EVENT_POWER_FLIGHT_MODE_RESP                       (TAPI_EVENT_POWER_CONFIRMATION + 0)             /**< Flight Mode Response */
+#define        TAPI_EVENT_POWER_CNF_MAX                                        (TAPI_EVENT_POWER_CONFIRMATION + 1)
+
+#define        TAPI_EVENT_POWER_NOTIFICATION                           (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_POWER<<8))
+#define        TAPI_EVENT_POWER_PHONE_OFF                                      (TAPI_EVENT_POWER_NOTIFICATION + 0)             /**< Modem power Off */
+#define        TAPI_EVENT_POWER_BATT_STAT_IND                          (TAPI_EVENT_POWER_NOTIFICATION + 1)             /**< Battery level Indication */
+#define        TAPI_EVENT_POWER_SERVICE_READY_IND                      (TAPI_EVENT_POWER_NOTIFICATION + 2)             /**< telephony service ready */
+#define        TAPI_EVENT_POWER_IND_MAX                                        (TAPI_EVENT_POWER_NOTIFICATION + 3)
+
+/*     Display Module Event Types...   */
+#define        TAPI_EVENT_DISPLAY_NOTIFICATION                         (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_DISPLAY<<8))
+#define        TAPI_EVENT_DISPLAY_ICON_INFO_IND                        (TAPI_EVENT_DISPLAY_NOTIFICATION + 0)   /**< Display Icon Info Indication */
+#define        TAPI_EVENT_DISPLAY_HMZ_O2_IND                           (TAPI_EVENT_DISPLAY_NOTIFICATION + 1)   /**< Home Zone Info Indication */
+#define        TAPI_EVENT_DISPLAY_PHONE_FATAL_NOTI                     (TAPI_EVENT_DISPLAY_NOTIFICATION + 2)   /**< Phone Fatal Message Notification */
+#define        TAPI_EVENT_DISPLAY_EXT_ROAM_INFO_NOTI           (TAPI_EVENT_DISPLAY_NOTIFICATION + 3)   /**< Roam Information Notification */
+#define        TAPI_EVENT_DISPLAY_EXT_USER_IND_MSG_NOTI        (TAPI_EVENT_DISPLAY_NOTIFICATION + 4)   /**< User Indication Message Notification */
+#define        TAPI_EVENT_DISPLAY_IND_MAX                                      (TAPI_EVENT_DISPLAY_NOTIFICATION + 5)
+
+/*     Misc Module Types...    */
+#define        TAPI_EVENT_MISC_CONFIRMATION                            (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_MISC<<8))
+#define        TAPI_EVENT_MISC_NITZ_GETCNF                             (TAPI_EVENT_MISC_CONFIRMATION + 0)
+#define        TAPI_EVENT_MISC_NITZ_NOTIFY                     (TAPI_EVENT_MISC_CONFIRMATION + 1)
+#define        TAPI_EVENT_MISC_NITZ_IND                                (TAPI_EVENT_MISC_CONFIRMATION + 2)
+#define        TAPI_EVENT_MISC_AT_FUS                          (TAPI_EVENT_MISC_CONFIRMATION + 3)
+#define        TAPI_EVENT_MISC_SERIAL_NUMBER_IND                       (TAPI_EVENT_MISC_CONFIRMATION + 4)
+#define        TAPI_EVENT_MISC_GET_NAM_INFO_CNF                        (TAPI_EVENT_MISC_CONFIRMATION + 5)
+#define        TAPI_EVENT_MISC_SET_NAM_INFO_CNF                        (TAPI_EVENT_MISC_CONFIRMATION + 6)
+#define        TAPI_EVENT_MISC_NAM_INFO_NOTI                           (TAPI_EVENT_MISC_CONFIRMATION + 7)
+#define        TAPI_EVENT_MISC_CNF_MAX                                         (TAPI_EVENT_MISC_CONFIRMATION + 8)
+
+/*     Config Module Types...  */
+#define        TAPI_EVENT_CFG_CONFIRMATION                                     (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_CFG<<8))
+#define        TAPI_CFG_EVENT_DEFAULTCFG_IND                           (TAPI_EVENT_CFG_CONFIRMATION + 0)       /**< Default configuration Event Type */
+#define        TAPI_EVENT_CFG_GET_A_KEY_CNF                            (TAPI_EVENT_CFG_CONFIRMATION + 1)       /**< Get A key Event Type */
+#define        TAPI_EVENT_CFG_VERIFY_A_KEY_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 2)       /**< A key verification Event Type */
+#define        TAPI_EVENT_CFG_GET_MSL_INFO_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 3)       /**< Get MSL information Event Type */
+#define        TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF           (TAPI_EVENT_CFG_CONFIRMATION + 4)       /**< Get vocoder option Event Type */
+#define        TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF           (TAPI_EVENT_CFG_CONFIRMATION + 5)       /**< Set vocoder option Event Type */
+#define        TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF       (TAPI_EVENT_CFG_CONFIRMATION + 6)       /**< Get hidden menu access Event Type */
+#define        TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF       (TAPI_EVENT_CFG_CONFIRMATION + 7)       /**< Set hidden menu access Event  Type */
+#define        TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF          (TAPI_EVENT_CFG_CONFIRMATION + 8)       /**< Get current carrier Event */
+#define        TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF          (TAPI_EVENT_CFG_CONFIRMATION + 9)       /**< Set current carrier Event */
+#define        TAPI_EVENT_CFG_GET_SIO_MODE_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 10)      /**< Get Phone SIO mode Event */
+#define        TAPI_EVENT_CFG_SET_SIO_MODE_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 11)      /**< Set Phone SIO mode Event */
+#define        TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF          (TAPI_EVENT_CFG_CONFIRMATION + 12)      /**< Get Activated Data Event */
+#define        TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF       (TAPI_EVENT_CFG_CONFIRMATION + 13)      /**< Get Reconditioned data Event */
+#define        TAPI_EVENT_CFG_SET_TTY_MODE_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 14)      /**< Set TTY mode Event */
+#define        TAPI_EVENT_CFG_GET_TTY_MODE_CNF                         (TAPI_EVENT_CFG_CONFIRMATION + 15)      /**< Get TTY mode Event */
+#define        TAPI_EVENT_CFG_CNF_MAX                                          (TAPI_EVENT_CFG_CONFIRMATION + 16)
+
+/*     IMEI Module Types...    */
+#define        TAPI_EVENT_IMEI_CONFIRMATION                            (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_IMEI<<8))
+#define        TAPI_EVENT_IMEI_CMLA_IND                                        (TAPI_EVENT_IMEI_CONFIRMATION + 0)
+#define        TAPI_EVENT_IMEI_COMPAREITEM                             (TAPI_EVENT_IMEI_CONFIRMATION + 1)
+#define        TAPI_EVENT_IMEI_CNF_MAX                                         (TAPI_EVENT_IMEI_CONFIRMATION + 2)
+
+/*     GPS Module Types...     */
+#define        TAPI_EVENT_GPS_CONFIRMATION                             (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_GPS<<8))
+#define        TAPI_EVENT_GPS_INIT_RESP                                (TAPI_EVENT_GPS_CONFIRMATION + 0)       /**< Start session response event type. */
+#define        TAPI_EVENT_GPS_DEINIT_RESP                              (TAPI_EVENT_GPS_CONFIRMATION + 1)       /**< GPS option set response  event type. */
+#define        TAPI_EVENT_GPS_FIX_REQUEST_RESP (TAPI_EVENT_GPS_CONFIRMATION + 2)
+#define        TAPI_EVENT_GPS_STOP_SESSION_RESP                (TAPI_EVENT_GPS_CONFIRMATION + 3)       /**< Close session response event type */
+#define        TAPI_EVENT_GPS_PARAMETERS_SET_RESP              (TAPI_EVENT_GPS_CONFIRMATION + 4)
+#define        TAPI_EVENT_GPS_XTRA_INIT                        (TAPI_EVENT_GPS_CONFIRMATION + 5)
+#define        TAPI_EVENT_GPS_XTRA_DEINIT              (TAPI_EVENT_GPS_CONFIRMATION + 6)
+#define        TAPI_EVENT_GPS_XTRA_ENABLE_SET_RESP     (TAPI_EVENT_GPS_CONFIRMATION + 7)
+#define        TAPI_EVENT_GPS_XTRA_SET_TIME_RESP       (TAPI_EVENT_GPS_CONFIRMATION + 8)
+#define        TAPI_EVENT_GPS_XTRA_SET_DATA_RESP       (TAPI_EVENT_GPS_CONFIRMATION + 9)
+#define        TAPI_EVENT_GPS_PARAMETERS_GET_RESP      (TAPI_EVENT_GPS_CONFIRMATION + 10)
+#define        TAPI_EVENT_GPS_FREQ_AIDING_SET_RESP     (TAPI_EVENT_GPS_CONFIRMATION + 11)
+#define        TAPI_EVENT_GPS_CNF_MAX                          (TAPI_EVENT_GPS_CONFIRMATION + 12)
+
+#define        TAPI_EVENT_GPS_NOTIFICATION                             (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_GPS<<8))
+#define        TAPI_EVENT_GPS_POSITION_NOTI                    (TAPI_EVENT_GPS_NOTIFICATION + 0)
+#define        TAPI_EVENT_GPS_EXT_POSITION_NOTI                (TAPI_EVENT_GPS_NOTIFICATION + 1)
+#define        TAPI_EVENT_GPS_PD_CMD_CB_NOTI                   (TAPI_EVENT_GPS_NOTIFICATION + 2)
+#define        TAPI_EVENT_GPS_PDP_CONNECTION_IND               (TAPI_EVENT_GPS_NOTIFICATION + 3)
+#define        TAPI_EVENT_GPS_DNS_LOOKUP_IND                   (TAPI_EVENT_GPS_NOTIFICATION + 4)
+#define        TAPI_EVENT_GPS_VERIFICATION_IND                 (TAPI_EVENT_GPS_NOTIFICATION + 5)       /**< Verification indication event type. */
+#define        TAPI_EVENT_GPS_SUPL_NOTI                                (TAPI_EVENT_GPS_NOTIFICATION + 6)       /**< SUPL Notification event type. */
+#define        TAPI_EVENT_GPS_XTRA_TIME_NOTI                   (TAPI_EVENT_GPS_NOTIFICATION + 7)       /**< XTRA Time info notification event type. */
+#define        TAPI_EVENT_GPS_XTRA_DATA_NOTI                   (TAPI_EVENT_GPS_NOTIFICATION + 8)       /**< XTRA DATA Status injection notification. */
+#define        TAPI_EVENT_GPS_ASSIST_DATA_NOTI                 (TAPI_EVENT_GPS_NOTIFICATION + 9)       /**< XTRA DATA Status injection notification. */
+#define        TAPI_EVENT_GPS_MEASURE_POSITION_IND             (TAPI_EVENT_GPS_NOTIFICATION + 10)      /**< XTRA DATA Status injection notification. */
+#define        TAPI_EVENT_GPS_MEASURE_POSITION_CNF             (TAPI_EVENT_GPS_NOTIFICATION + 11)      /**< XTRA DATA Status injection notification. */
+#define        TAPI_EVENT_GPS_RESET_ASSIST_DATA_NOTI   (TAPI_EVENT_GPS_NOTIFICATION + 12)      /**< XTRA DATA Status injection notification. */
+#define        TAPI_EVENT_GPS_IND_MAX                                  (TAPI_EVENT_GPS_NOTIFICATION + 13)
+
+/* OMA-DM events */
+#define        TAPI_EVENT_OMADM_CONFIRMATION                   (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_OMADM<<8))
+#define        TAPI_EVENT_OMADM_PRL_SIZE_GET_CNF               (TAPI_EVENT_OMADM_CONFIRMATION + 0)     /**< OMA-DM PRL size get confirm event type. */
+#define        TAPI_EVENT_OMADM_MODEL_NAME_GET_CNF             (TAPI_EVENT_OMADM_CONFIRMATION + 1)     /**< OMA-DM Model name get confirm event type. */
+#define        TAPI_EVENT_OMADM_OEM_NAME_GET_CNF               (TAPI_EVENT_OMADM_CONFIRMATION + 2)     /**< OMA-DM OEM name get confirm event type. */
+#define        TAPI_EVENT_OMADM_SW_VERSION_GET_CNF             (TAPI_EVENT_OMADM_CONFIRMATION + 3)     /**< OMA-DM SW version get confirm event type. */
+#define        TAPI_EVENT_OMADM_PRL_READ_GET_CNF               (TAPI_EVENT_OMADM_CONFIRMATION + 4)     /**< OMA-DM PRL Data read confirm event type. */
+#define        TAPI_EVENT_OMADM_PRL_WRITE_SET_CNF              (TAPI_EVENT_OMADM_CONFIRMATION + 5)     /**< OMA-DM PRL Data write confirm event type. */
+#define        TAPI_EVENT_OMADM_CNF_MAX                                (TAPI_EVENT_OMADM_CONFIRMATION + 6)
+
+/* SVC event */
+#define        TAPI_EVENT_SVCMODE_CONFIRMATION                 (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_SVCMODE<<8))
+#define        TAPI_EVENT_SVCMODE_START_NOTI                   (TAPI_EVENT_SVCMODE_CONFIRMATION + 0)   // should be checked
+#define        TAPI_EVENT_SVCMODE_END_NOTI                             (TAPI_EVENT_SVCMODE_CONFIRMATION + 1)
+#define        TAPI_EVENT_SVCMODE_DEBUG_DUMP_CNF               (TAPI_EVENT_SVCMODE_CONFIRMATION + 2)
+#define        TAPI_EVENT_SVCMODE_CNF_MAX                              (TAPI_EVENT_SVCMODE_CONFIRMATION + 3)
+
+#define        TAPI_EVENT_SVCMODE_NOTIFICATION                 (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_SVCMODE<<8))
+#define        TAPI_EVENT_SVCMODE_CHANGE_NOTI                  (TAPI_EVENT_SVCMODE_NOTIFICATION + 0)
+#define        TAPI_EVENT_SVCMODE_SCREEN_CFG_NOTI              (TAPI_EVENT_SVCMODE_NOTIFICATION + 1)
+#define        TAPI_EVENT_SVCMODE_DISP_SCREEN_NOTI             (TAPI_EVENT_SVCMODE_NOTIFICATION + 2)
+#define        TAPI_EVENT_SVCMODE_DEVICE_TEST_NOTI             (TAPI_EVENT_SVCMODE_NOTIFICATION + 3)
+#define        TAPI_EVENT_SVCMODE_IND_MAX                              (TAPI_EVENT_SVCMODE_NOTIFICATION + 4)
+
+#define TAPI_EVENT_FACTORY_CONFIRMATION                                        (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_FACTORY<<8))
+#define TAPI_EVENT_FACTORY_OMISSION_AVOIDANCE_SET_CNF  (TAPI_EVENT_FACTORY_CONFIRMATION + 0)
+#define TAPI_EVENT_FACTORY_OMISSION_AVOIDANCE_GET_CNF  (TAPI_EVENT_FACTORY_CONFIRMATION + 1)
+
+#define        TAPI_EVENT_FACTORY_NOTIFICATION                         (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_FACTORY<<8))
+#define        TAPI_EVENT_FACTORY_DFT_SMS                                      (TAPI_EVENT_FACTORY_NOTIFICATION + 0)
+#define        TAPI_EVENT_FACTORY_IND_MAX                                      (TAPI_EVENT_FACTORY_NOTIFICATION + 1)
+
+/* CDMA DATA events */
+#define        TAPI_EVENT_CDMA_DATA_CONFIRMATION                       (TAPI_EVENT_TYPE_CONFIRMATION + (TAPI_EVENT_CLASS_CDMA_DATA<<8))
+#define        TAPI_EVENT_DATA_MIP_NAI_GET_CNF                         (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 0)         /**< CDMA Data Service PIN Control confirm event type. */
+#define        TAPI_EVENT_DATA_MIP_NAI_SET_CNF                         (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 1)         /**< CDMA Data MIP NAI set confirm event type. */
+#define        TAPI_EVENT_DATA_CURRENT_NAI_INDEX_GET_CNF       (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 2)         /**< CDMA Data Current NAI Index get confirm event type. */
+#define        TAPI_EVENT_DATA_TE2_STATUS_GET_CNF                      (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 3)         /**< CDMA Data TE2 Status get confirm event type. */
+#define        TAPI_EVENT_DATA_BYTES_COUNTER_RESET_CNF         (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 4)         /**< CDMA Data Bytes Counter Reset confirm event type. */
+#define        TAPI_EVENT_DATA_BYTES_COUNTER_GET_CNF           (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 5)         /**< CDMA Data Bytes Counter get confirm event type. */
+#define        TAPI_EVENT_DATA_PACKET_DATA_CALL_CONFIGURATION_GET_CNF  (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 6) /**<  CDMA Data Packet data call configuration get confirm event type. */
+#define        TAPI_EVENT_DATA_HDR_SESSION_CLEAR_SET_CNF       (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 7)         /**< CDMA Data HDR session clear set confirm event type. */
+#define        TAPI_EVENT_DATA_ROAM_GUARD_GET_CNF                      (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 8)         /**< CDMA Roam guard get confirm event type. */
+#define        TAPI_EVENT_DATA_ROAM_GUARD_SET_CNF                      (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 9)         /**< CDMA Roam guard set confirm event type. */
+#define        TAPI_EVENT_DATA_MODEM_NAI_GET_CNF                       (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 10)        /**< CDMA Modem NAI get confirm event type. */
+#define        TAPI_EVENT_DATA_EVDO_REV_CONFIG_GET_CNF         (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 11)        /**< CDMA Force RevA mode get confirm event type. */
+#define        TAPI_EVENT_DATA_EVDO_REV_CONFIG_SET_CNF         (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 12)        /**< CDMA Force RevA mode set confirm event type. */
+#define        TAPI_EVENT_DATA_NAI_SETTING_MODE_GET_CNF        (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 13)        /**< CDMA NAI setting mode get confirm event type. */
+#define        TAPI_EVENT_DATA_NAI_SETTING_MODE_SET_CNF        (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 14)        /**< CDMA NAI setting mode set confirm event type. */
+#define        TAPI_EVENT_DATA_RESTORE_NAI_SET_CNF                     (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 15)        /**< CDMA Data Restore NAI set confirm event type. */
+#define        TAPI_EVENT_DATA_DDTM_CONFIGURATION_GET_CNF      (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 16)        /**< CDMA Data DDTM Configuration get confirm event type. */
+#define        TAPI_EVENT_DATA_DDTM_CONFIGURATION_SET_CNF      (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 17)        /**< CDMA Data DDTM Configuration set confirm event type. */
+#define        TAPI_EVENT_DATA_INTERNAL_CNF_MAX                        (TAPI_EVENT_CDMA_DATA_CONFIRMATION + 18)
+
+#define        TAPI_EVENT_CDMA_DATA_NOTIFICATION                       (TAPI_EVENT_TYPE_NOTIFICATION + (TAPI_EVENT_CLASS_CDMA_DATA<<8))
+#define        TAPI_EVENT_DATA_TE2_STATUS_NOTI                         (TAPI_EVENT_CDMA_DATA_NOTIFICATION + 0)         /**< CDMA Data TE2 Status changed indication event type. */
+#define        TAPI_EVENT_DATA_DS_TE2_DATA_RATE_INFO_NOTI      (TAPI_EVENT_CDMA_DATA_NOTIFICATION + 1)         /**< CDMA Data DS TE2 Data Rate changed indication event type. */
+#define        TAPI_EVENT_DATA_INTERNAL_IND_MAX                        (TAPI_EVENT_CDMA_DATA_NOTIFICATION + 2)
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ *This structure defines the Telephony Event.
+ */
+typedef struct {
+       int EventClass; /**< Event Class */
+       int EventType;  /**< Event type */
+       int RequestId;  /**< This parameter is applicable only for Asynchronous solicited responses. The request id for a service request is sent back in the asynchronous response. For unsolicited indications, request id will be -1 */
+       int Status;     /**< This parameter is applicable only for Asynchronous solicited responses. This status parameter informs the actual result of Asynchronous response. For unsolicited indications, status will be -1 */
+       void *pData;    /**< Event Data - Based on Event type response/indications. Event data information is captured in each API Section */
+       int pDataLen;   /**< Event Data size */
+} TelTapiEvent_t;
+
+typedef void (*TapiCallback)(int eventClass, int eventType, int param1, char *param2);
+
+/**
+ * This structure defines the Telephony Event .
+ */
+typedef struct {
+       int eventClass; /**< Event class */
+       int eventType;  /**< Event type */
+       int param1;     /**< Event Data Length */
+       void *param2;   /**< Event Data */
+} TapiEvent;
+
+/*     New Telephony Fw Event structure to be used with ts_delivery_power_display_event()      */
+typedef struct {
+       int group;   // Event Class
+       int type;    // Event Group
+       char name[TAPI_EVENT_NAME_MAX_LEN]; // Event Name
+       int len;     // Data Length
+       void *data;  // Data
+} tapi_event_type_t;
+
+/**
+ * prototype for TAPI Callback function.
+ */
+typedef int (*TelAppCallback)(const TelTapiEvent_t *pTapiEvent, void *data);
+
+/**
+ * this structure contains the necessary information on subscription list.
+ */
+typedef struct TapiSubscription {
+       int SubscriptId; /**< Subscription ID */
+       int EventClass; /**< Event Class */
+       TelAppCallback AppCallback; /**< Callback function pointer */
+       struct TapiSubscription * next; /**< Link to the next subscription */
+} TapiSubscriptionList;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TAPI_EVENT_H_ */
+
+/**
+ *  @}
+ */
+
diff --git a/include/common/TapiUtility.h b/include/common/TapiUtility.h
new file mode 100644 (file)
index 0000000..fa45172
--- /dev/null
@@ -0,0 +1,437 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TAPI_UTILITY_H_
+#define _TAPI_UTILITY_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <dlog.h>
+
+#include <TapiEvent.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/**
+ * Log levels, refer man syslog()
+ *
+ * LOG_EMERG   A panic condition.  This is normally broadcast to all users.
+ * LOG_ALERT   A condition that should be corrected immediately, such as a corrupted system database.
+ * LOG_CRIT    Critical conditions, e.g., hard device errors.
+ * LOG_ERR             Errors.
+ * LOG_WARNING Warning messages.
+ * LOG_NOTICE  Conditions that are not error conditions, but should possibly be handled specially.
+ * LOG_INFO    Informational messages.
+ * LOG_DEBUG   Messages that contain information normally of use only when debugging a program.
+ */
+#define LEVEL_DEBUG            LOG_DEBUG
+#define LEVEL_INFO             LOG_DEBUG
+#define LEVEL_NOTICE   LOG_DEBUG
+#define LEVEL_WARNING  LOG_DEBUG
+#define LEVEL_ERR              LOG_WARN
+#define LEVEL_CRIT             LOG_WARN
+#define LEVEL_ALERT            LOG_WARN
+#define LEVEL_LOGGING  LOG_WARN
+#define LEVEL_EMERG            LOG_FATAL
+
+#define LOG_TELEPHONY  "TELEPHONY"
+
+/**
+ * Default we are disabling the logging. If we want enable logging based on our
+ * requirement whether to log on to STD or to syslog we have to compile telephony
+ * code with flags as mentioned below
+ *
+ * DISABLE LOGGING                             ----> No Flag
+ * ENABLE LOGGING(to SYSLOG)   ----> Enable Flag  _TAPI_DEBUG_ON_SYSLOG_ in Sconscript
+ * ENABLE LOGGING(to STD)              ----> Enable Flag  _TAPI_DEBUG_ON_SCREEN_ in Sconscript
+ */
+
+#define TAPI_LIB_DEBUG(level, frmt, args...)   do {RLOG(level,LOG_TELEPHONY, "[TAPI] %s; "frmt"\n", __func__, ##args);} while (0)
+#define TAPI_PRINT_TIME(str, args...)                  do { } while (0)
+
+/*
+#define TAPI_LIB_DEBUG(level, frmt, args...)  do { fprintf(stderr, "\n[TAPI Library] [PID: %d, %s:%d] " frmt , getpid(), __func__,  __LINE__, ##args); } while (FALSE)
+#define TAPI_PRINT_TIME(str, args...)   do { } while(0)
+#define TAPI_SYSLOG_DEBUG(args...)   {\
+       syslog(LOG_USER , "\n[Telephony Server] [%s:%d] ",  __func__, __LINE__);  \
+       syslog(LOG_USER , args); }
+*/
+
+/**
+ * This will check the 'scalar_exp' for TRUE, if failed then return 'err_value' from function.
+ */
+#define TAPI_RET_ERR_NUM_IF_FAIL(scalar_exp, err_num) {\
+       if (!(scalar_exp)) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_ERR, "TAPI_RET_ERR_NUM_IF_FAIL Failed. returning [%d]", err_num);\
+               return err_num; \
+       } \
+}
+
+/**
+ * Returns from the current function if the expression is not true. If the expression evaluates to FALSE,
+ * a critical message is logged and the function returns. This can only be used in functions which do not
+ * return a value.
+ *
+ * expr : the expression to check.
+ */
+#define TAPI_RETURN_IF_FAIL(scalar_exp) {\
+       if (!scalar_exp) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_ERR, "TAPI_RETURN_IF_FAIL: Failed: Returning from here."); \
+               return; \
+       } \
+}
+
+/**
+ * Returns from the current function, returning the value ret, if the expression is not true.
+ * If the expression evaluates to FALSE, a critical message is logged and ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_FAIL(scalar_exp, ret) { \
+       if (!scalar_exp) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_ERR, "TAPI_RETURN_VAL_IF_FAIL: Failed: Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * Returns from the current function, returning the value ret, if the expression is not true.
+ * If the expression evaluates to FALSE, a critical message is logged and ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_SUCCESS(scalar_exp, ret) { \
+       if (scalar_exp) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "TAPI_RETURN_VAL_IF_SUCCESS: Failed Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * This assert will log an err on stderr and abort,  if assertion failed,
+ * Use this only if the telephpny sevrer needs to be exited, if asertion fails
+ */
+#define TAPI_ASSERT(scalar_exp)        assert(scalar_exp);
+
+/**
+ * Returns from the current function, returning the value ret, if the exp1 and exp2 are of same value.
+ * If the equal expression evaluates to TRUE, a critical message is logged and ret is returned.
+ */
+#define TAPI_RETURN_VAL_IF_EQUAL(exp1, exp2, ret) {    \
+       if (exp1 == exp2) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "TAPI_RETURN_VAL_IF_EQUAL: FAILED, Returning [%d]", ret); \
+               return ret; \
+       } \
+}
+
+/**
+ * void *calloc(size_t nelements, size_t bytes);
+ * which allocates a region of memory large enough to hold nelements of size bytes each.
+ * The allocated region is initialized to zero.
+ */
+#define TAPI_CALLOC(ptr, no_elements, type)    \
+       ptr = (type *) calloc (no_elements , sizeof (type)); \
+       if (ptr == NULL) { \
+               perror("NULL is returned"); \
+               TAPI_LIB_DEBUG(LEVEL_ERR, "calloc error -NULL, errno is [%d]", errno); \
+               fprintf(stderr,"Calloc ERRNO %d\n", errno); \
+               TAPI_ASSERT(ptr); \
+       }
+
+/**
+ * why ptr = NULL; after free()?.
+ * If the same pointer is passed to free twice,        known as a double free. To avoid this, set pointers to
+ * NULL after passing them to free: free(NULL) is safe (it does nothing).
+ */
+#define TAPI_FREE(ptr) \
+       if (ptr != NULL) { \
+               free(ptr); \
+               ptr = NULL; \
+       } \
+       else { \
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Double Free or NULL"); \
+       }
+
+/**
+ * check for available destination buffer size before copying source buffer data to destination buffer.
+ * Assert if destination buffer size less than source buffer size.
+ */
+#define TAPI_MEMCPY(dest, src, dest_len, src_len) \
+       if (dest_len >= src_len) { \
+               memcpy(dest, src, src_len); \
+       } \
+       else { \
+               TAPI_LIB_DEBUG(LEVEL_ERR, "TAPI_MEMCPY FAILURE - dest_len(%d) < src_len(%d)", dest_len, src_len); \
+               assert(0); \
+       }
+
+/**
+ * Encode a sequence of binary data into its Base-64 stringified representation.
+ *
+ * data : the binary data to encode.
+ * len : the length of data.
+ * Returns : a newly allocated, zero-terminated Base-64 encoded string representing data.
+ * gchar *g_base64_encode (const guchar *data, gsize len);
+ */
+#define TAPI_BASE64_ENCODE(data, len, encoded_data) \
+       encoded_data = g_base64_encode((const guchar *)data, (gsize) len);
+
+/**
+ * Decode a sequence of Base-64 encoded text into binary data
+ *
+ * text : zero-terminated string with base64 text to decode.
+ * out_len : The length of the decoded data is written here.
+ * Returns : a newly allocated buffer containing the binary data that text represents
+ * guchar *g_base64_decode  (const gchar *text, gsize *out_len);
+ */
+#define TAPI_BASE64_DECODE(text, decoded_data, ptr_out_len)    \
+       decoded_data = g_base64_decode((const gchar *)text, (gsize *)ptr_out_len);
+
+/**
+ * Define Macro for calculate the length of SCA in BCD type.
+ */
+#define TAPI_GET_LENGTH_FROM_BCD(nLength, rtn) { \
+       if (nLength <= 0) { \
+               rtn = 0; \
+       } \
+       else if ((nLength) % 2) { \
+               rtn = ((nLength) / 2) + 1; \
+       } \
+       else { \
+               rtn = (nLength) / 2; \
+       } \
+}
+
+
+#define TAPI_VALIDATE_EVENTTYPE(val_min ,val_max, type, ret) { \
+       if (type < val_min || type > val_max ) { \
+               return ret; \
+       } \
+}
+
+/**
+ * Initialize the in-put & out-put params for the TAPI API's
+ */
+#define TAPI_GLIB_INIT_PARAMS() \
+       GArray* in_param1  = NULL; \
+       GArray* in_param2  = NULL; \
+       GArray* in_param3  = NULL; \
+       GArray* in_param4  = NULL; \
+       GArray* out_param1 = NULL; \
+       GArray* out_param2 = NULL; \
+       GArray* out_param3 = NULL; \
+       GArray* out_param4 = NULL;
+
+
+/**
+ * If alloc fails any where in between IP1 to OP4 then free allocated params,
+ * and return FLASE to Application who ever called our API.
+ *
+ * GArray *g_array_new(gboolean zero_terminated, gboolean clear_ ,guint element_size);
+ */
+#define TAPI_GLIB_ALLOC_PARAMS(IP1,IP2,IP3,IP4,OP1,OP2,OP3,OP4) \
+        IP1 = g_array_new(FALSE, FALSE, sizeof(gchar));        \
+        IP2 = g_array_new(FALSE, FALSE, sizeof(gchar));        \
+        IP3 = g_array_new(FALSE, FALSE, sizeof(gchar));        \
+        IP4 = g_array_new(FALSE, FALSE, sizeof(gchar)); \
+        if(IP1 && IP2 && IP3 && IP4) \
+        { \
+        } \
+        else \
+        { \
+                       TAPI_GLIB_FREE_PARAMS(IP1,IP2,IP3,IP4,OP1,OP2,OP3,OP4); \
+                       return TAPI_API_SYSTEM_OUT_OF_MEM; \
+        }
+
+
+/**
+ * Free any allocated in-put & out-put params
+ */
+#define TAPI_GLIB_FREE_PARAMS(IP1,IP2,IP3,IP4,OP1,OP2,OP3,OP4) \
+       if (IP1) \
+               g_array_free(IP1, TRUE); \
+       if (IP2) \
+               g_array_free(IP2, TRUE); \
+       if (IP3) \
+               g_array_free(IP3, TRUE); \
+       if (IP4) \
+               g_array_free(IP4, TRUE); \
+       if (OP1) \
+               g_array_free(OP1, TRUE); \
+       if (OP2) \
+               g_array_free(OP2, TRUE); \
+       if (OP3) \
+               g_array_free(OP3, TRUE); \
+       if (OP4) \
+               g_array_free(OP4, TRUE);
+
+#define TAPI_SIGNAL_OBJPATH "/org/projectx/telephony_event"
+#define TAPI_SIGNAL_SENDER "org.projectx.telephony_event"
+#define TAPI_SIGNAL_MEMBER_ARG0 "ARG0"
+#define TAPI_SIGNAL_MEMBER_ARG1 "ARG1"
+#define TAPI_SIGNAL_MEMBER_ARG2 "ARG2"
+#define TAPI_SIGNAL_MEMBER_ARG3 "ARG3"
+#define TAPI_SIGNAL_MEMBER_ARG4 "ARG4"
+#define TAPI_SIGNAL_MEMBER_ARG5 "ARG5"
+#define TAPI_SIGNAL_MEMBER_GENRESP "GENRESP"
+
+#define IF_NAME_MAX    100
+/* Generate a unique signal interface name for each dbus message */
+#ifndef TAPI_GET_EVENT_NAME
+#define TAPI_GET_EVENT_NAME(TYPE, SIG_IF_NAME) { \
+       char *_class = NULL; \
+       char *_type = NULL; \
+       switch((TYPE >>8)&0xFF)\
+       {\
+               case TAPI_EVENT_CLASS_CALL_VOICE:\
+                       _class = "Voicecall"; \
+                       break;\
+               case TAPI_EVENT_CLASS_CALL_DATA:\
+                       _class = "Datacall"; \
+                       break;\
+               case TAPI_EVENT_CLASS_SIM:\
+                       _class = "Sim"; \
+                       break;\
+               case TAPI_EVENT_CLASS_NETTEXT:\
+                       _class = "Nettext"; \
+                       break;\
+               case TAPI_EVENT_CLASS_NETWORK:\
+                       _class = "Network"; \
+                       break;\
+               case TAPI_EVENT_CLASS_SS:\
+                       _class = "Ss"; \
+                       break;\
+               case TAPI_EVENT_CLASS_SAT:\
+                       _class = "Sat"; \
+                       break;\
+               case TAPI_EVENT_CLASS_DATA:\
+                       _class = "Data"; \
+                       break;\
+               case TAPI_EVENT_CLASS_SOUND:\
+                       _class = "Sound"; \
+                       break;\
+               case TAPI_EVENT_CLASS_UTIL:\
+                       _class = "Util"; \
+                       break;\
+               case TAPI_EVENT_CLASS_ERR:\
+                       _class = "Error"; \
+                       break;\
+               case TAPI_EVENT_CLASS_POWER:\
+                       _class = "Power"; \
+                       break;\
+               case TAPI_EVENT_CLASS_DISPLAY:\
+                       _class = "Display"; \
+                       break;\
+               case TAPI_EVENT_CLASS_MISC:\
+                       _class = "Misc"; \
+                       break;\
+               case TAPI_EVENT_CLASS_CFG:\
+                       _class = "Cfg"; \
+                       break;\
+               case TAPI_EVENT_CLASS_IMEI:\
+                       _class = "Imei"; \
+                       break;\
+               case TAPI_EVENT_CLASS_GPS:\
+                       _class = "Gps"; \
+                       break;\
+               case TAPI_EVENT_CLASS_OMADM:\
+                       _class = "Omadm"; \
+                       break;\
+               case TAPI_EVENT_CLASS_SVCMODE:\
+                       _class = "Svcmode"; \
+                       break;\
+               case TAPI_EVENT_CLASS_FACTORY:\
+                       _class = "Factory"; \
+                       break;\
+               case TAPI_EVENT_CLASS_CALL_E911:\
+                       _class = "EmergencyCall"; \
+                       break;\
+               case TAPI_EVENT_CLASS_CDMA_DATA:\
+                       _class = "CdmaData"; \
+                       break;\
+               default:\
+                       _class = "Unknown"; \
+                       TAPI_LIB_DEBUG(LEVEL_ERR,"Invalid event class = 0lx%x",(TYPE >>8)&0xFF);\
+       }\
+       switch(TYPE&0xFF0000)\
+       {\
+               case TAPI_EVENT_TYPE_NOTIFICATION:\
+                       _type = "Noti"; \
+                       break;\
+               case TAPI_EVENT_TYPE_CONFIRMATION:\
+                       _type = "Resp"; \
+                       break;\
+               default:\
+                       _type = "Unknown"; \
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid event type = 0x%lx",TYPE&0xFF0000);\
+       }\
+       snprintf(SIG_IF_NAME, IF_NAME_MAX, "Telephony.%s.%s_0x%x", _class, _type, TYPE);\
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "event_string = %s", SIG_IF_NAME);\
+}
+#endif
+
+#define TAPI_BACKTRACE  { \
+                       void *buffer[128]; \
+                       char **strings; \
+                       int i, nptrs; \
+                       nptrs = backtrace(buffer, 128); \
+                       TAPI_LIB_DEBUG(LEVEL_INFO, "backtrace() returned %d addresses", nptrs); \
+                       strings = backtrace_symbols(buffer, nptrs); \
+                       if (strings == NULL) { \
+                               TAPI_LIB_DEBUG(LEVEL_INFO, "backtrace_symbols() failed. (errno=%d)", errno); \
+                       } \
+                       else { \
+                               for (i=0; i<nptrs; i++) { \
+                                       TAPI_LIB_DEBUG(LEVEL_INFO, "[%2d] %s", i, strings[i]); \
+                               } \
+                               free(strings); \
+                       } \
+               }
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TAPI_UTILITY_H_     */
+
diff --git a/include/common/TelCall.h b/include/common/TelCall.h
new file mode 100644 (file)
index 0000000..8d2ca5f
--- /dev/null
@@ -0,0 +1,847 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup TAPI_CALL       CALL
+ * @{
+ *
+ * @file TelCall.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi Call Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_CALL_H_
+#define _TEL_CALL_H_
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelSs.h>
+#include <TelUtility.h>
+#include <TelDefines.h>
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_CALLING_NAME_SIZE_MAX      80      /**< The maximum length of the string for calling party name.   */
+#define TAPI_CALL_UUS_DATA_LEN_MAX      131     /**< The Maximum length of the user to user singnalling data string.   */
+#define TAPI_CALL_DISPLAY_RECORD_MAX    32      /**< The maximum length of the string for display record in CDMA   */
+#define MAX_TAPI_CALL_COUNT                            6       /**< Maximum number of call can be possible at a time */
+#define MAX_TAPI_CONF_CALL_COUNT               5       /**< Maximum number of Call can be possible in a conference call at a time */
+#define INVALID_CALL_HANDLE                            0               /**< TS_UINT is used for call handle */
+
+/* Call */
+#define        TAPI_CALL_DIALDIGIT_LEN_MAX             82              /**< Maximum Dialling Digit Length  */
+#define        TAPI_CALL_SUBADDRESS_LEN_MAX    40              /**< Maximum Call Subaddress Length */
+#define        TAPI_CALL_NUMBER_LEN_MAX                7               /**< Dialling Num length */
+#define        TAPI_CONTEXT_CALL_SIZE_MAX              6               /**< Maximum Call context */
+#define        TAPI_CALL_DIAL_NUMBER_LEN_MAX   82
+
+#define TAPI_INVALID_CONTEXTHANDLE             (HTapiContext)-1
+#define TAPI_CLIENT_SIZE_MAX                   30
+
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * @enum TelCallCause_t
+ * This structure defines the values for Call Cause.
+ */
+typedef enum {
+       TAPI_CAUSE_SUCCESS,                             /**< Success  */
+       TAPI_CAUSE_ACCESSDISCARD,                       /**< Access discarded  */
+       TAPI_CAUSE_BARR_BYOPERATOR,             /**< Barred by operator */
+       TAPI_CAUSE_BEARERMODE_NOTIMPL,          /**< Bearer mode not implemented */
+       TAPI_CAUSE_BEARERMODE_RESTRICTED,       /**< Bearer mode restricted */
+       TAPI_CAUSE_BEARERMODE_UNAUTH,           /**< Bearer mode un authorized */
+       TAPI_CAUSE_BEARERMODE_UNAVAIL,          /**< Bearer mode not available */
+       TAPI_CAUSE_BUSY,                                        /**< (Network/Server) busy */
+       TAPI_CAUSE_CALLMETER_EXPIRED,           /**< Call meter expired */
+       TAPI_CAUSE_CALLNO_ERROR,                        /**< Call number error */
+       TAPI_CAUSE_CKTUNAVAIL,                          /**< Circuit channel unavailable */                     //10
+       TAPI_CAUSE_CONGESTION,                          /**< Congestion happened */
+       TAPI_CAUSE_NO_CIRCUIT_AVAIL,            /**< Circuit  not available */
+       TAPI_CAUSE_DESTIN_INCOMPAT,             /**< Destination incompatibility */
+       TAPI_CAUSE_DTMF_NOSPEECH,                       /**< No speech in DTMF */
+       TAPI_CAUSE_DTMF_REJECTED,                       /**< DTMF rejected */
+       TAPI_CAUSE_FACILITY_NOTIMPL,            /**< Facility not implemented */
+       TAPI_CAUSE_FACILITY_NOTSUBSCRIBED,      /**< Facility not subscribed */
+       TAPI_CAUSE_INCOMINGCUGCALLS_BARRED, /**< Incoming CUG Calls barred */
+       TAPI_CAUSE_INVALNUM,                            /**< Invalid number */
+       TAPI_CAUSE_MPTY_ERROR,                          /**< Multiparty error */                                                //20
+       TAPI_CAUSE_NOANSWER,                            /**< No answer  */
+       TAPI_CAUSE_NONCUGMEMBER,                        /**< Non CUG member */
+       TAPI_CAUSE_NUMBERCHANGED,                       /**< Number changed */
+       TAPI_CAUSE_NUMBER_ERROR,                        /**< Number error */
+       TAPI_CAUSE_NWFAILURE,                           /**< Network failure */
+       TAPI_CAUSE_OPERATIONUNAVAIL,            /**< Operation not available */
+       TAPI_CAUSE_OUTOFORDER,                          /**< Out of order */
+       TAPI_CAUSE_PROTOCOL_ERROR,                      /**< Protocol error */
+       TAPI_CAUSE_QOSUNAVAIL,                          /**< QOS unavailable */
+       TAPI_CAUSE_REJECT,                                      /**< Rejected */                                                                //30
+       TAPI_CAUSE_REJ_FAIL,                            /**< Rejection failed */
+       TAPI_CAUSE_REJ_SRVC_NOT_AVL,            /**< Rejection service not available  */
+       TAPI_CAUSE_REMOTE_CKTUNAVAIL,           /**< Remote Circuit channel unavailable */
+       TAPI_CAUSE_RESOURCEUNAVAIL,             /**< Resource not available */
+       TAPI_CAUSE_SERVICEID_ERROR,             /**< Service id error */
+       TAPI_CAUSE_SERVICE_NOTIMPL,             /**< Service not implemented */
+       TAPI_CAUSE_SERVICE_UNAVAIL,             /**< Service not available */
+       TAPI_CAUSE_MODIFY_SAME_BEARER,          /**< Modify same bearer */
+       TAPI_CAUSE_MODIFY_NOT_PERMITTED,        /**< Modification not permitted */
+       TAPI_CAUSE_HOLD_FAIL,                           /**< Call hold fail */                                                  //40
+       TAPI_CAUSE_TEMPFAILURE,                 /**< Temporary failure */
+       TAPI_CAUSE_WRONGNUM,                            /**< Wrong number */
+       TAPI_CAUSE_NORMAL_UNSPECIFIED,          /**< Normal but unspecified */
+       TAPI_CAUSE_SSERRINVALIDTIVALUE, /**< SS invalid Transaction ID Value */
+       TAPI_CAUSE_SSERRINVALIDTI,                      /**< SS Invalid transaction ID */
+       TAPI_CAUSE_SSINCOMPATIBLESTATE, /**< SS incompatible state */
+       TAPI_CAUSE_SSERRSYNTAXERROR,            /**< SS syntax error */
+       TAPI_CAUSE_SSPROTOCOLERROR,             /**< Protocol error */
+       TAPI_CAUSE_SSNEGATIVEPASSWORDCHECK, /**< Negative password check */
+       TAPI_CAUSE_SSSENTASPHASE1,                      /**< SS sent as phase1 message */                               //50
+       TAPI_CAUSE_SSERROR,                             /**< Supplementary service error */
+       TAPI_CAUSE_SS_USSD_BUSY,                        /**< Second USSD request will be rejected when already USSD transaction is ongoing. */
+       TAPI_CAUSE_IDLE,                                        /**< Idle */
+       TAPI_CAUSE_NETWORK_SPECIFIC,            /**< Network specific error */
+       TAPI_CAUSE_FADE,                                        /**< voice call was dropped e.g. because of a loss of signal */
+       TAPI_CAUSE_UNKNOWN,                             /**< unknown no details available */
+       TAPI_CAUSE_INCOM_CALL,                          /**< terminated by incoming call */
+       TAPI_CAUSE_ALERT_STOP,                          /**< terminated by alert stop */
+       TAPI_CAUSE_INTERCEPT,                           /**< voice call was dropped by interception */
+       TAPI_CAUSE_REORDER,                             /**< voice call was dropped by reordering */    //60
+       TAPI_CAUSE_CLIENT_END,                          /**< client ended the call */
+       TAPI_CAUSE_ACCESS_CLASS_BLOCKED,        /**< access class blocked */
+       TAPI_CAUSE_MEMCAPEXCEEDED,                      /**< Memory capacity exceeded */
+       TAPI_CAUSE_TYPENOTSUPPORTED,            /**< Type not supported */
+       TAPI_CAUSE_REPLACENOTSUPPORTED, /**< Replace not supported */
+       TAPI_CAUSE_PROTOCOLID_ERROR,            /**< Protocol id error */
+       TAPI_CAUSE_CLASSNOTSUPPORTED,           /**< Class not supported */
+       TAPI_CAUSE_DATACODING_ERROR,            /**< Data coding error */
+       TAPI_CAUSE_INVAL_MSG,                           /**< Invalid message */
+       TAPI_CAUSE_CALL_BARRED,                 /**< Call barred */                                                     //70
+       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_SS,              /**< Sim call control changed to SS */
+       TAPI_CAUSE_SIM_CALL_CONTROL_CHANGED_TO_CALL,    /**< SIM Call control changed to call */
+       TAPI_CAUSE_SIM_ERROR,                           /**< SIM error */
+       TAPI_CAUSE_SIM_CALL_CONTROL_MODIFIED,                   /**< SIM call control modified */
+       TAPI_CAUSE_RANDOM_ACCESS_FAILURE,       /**< Random access error */
+       TAPI_CAUSE_LOWER_LAYER_FAILURE, /**< Lower layer error */
+       TAPI_CAUSE_ACCESS_REJECTED,             /**< Access rejected */
+       TAPI_CAUSE_RESET_NOT_ALLOWED,           /**< Reset not allowed */
+       TAPI_CAUSE_EMERGENCY_CALL_NOT_ALLOWED,                  /**< Emergency call not allowed */
+       TAPI_CAUSE_ACCESS_NOT_ALLOWED,          /**< Access not allowed */                                              //80
+       TAPI_CAUSE_RADIO_LINK_FAILURE,          /**< Radio link failure */
+       TAPI_CAUSE_INVALID_IDENTITY,            /**< Invalid identity */
+       TAPI_CAUSE_UNKNOWN_IDENTITY,            /**< Unknown identity */
+       TAPI_CAUSE_UNACCEPTABLE_IDENTITY,       /**< Un acceptable identity */
+       TAPI_CAUSE_NO_SERVICE_HERE,             /**< No service here */
+       TAPI_CAUSE_SERVICE_NOT_ALLOWED, /**< Service not allowed */
+       TAPI_CAUSE_SERVICE_NOT_AVAIL,           /**< Service not available */
+       TAPI_CAUSE_SERVICE_NOT_WORKING, /**< Service not working */
+       TAPI_CAUSE_CANNOT_IDENTIFY_CALL,        /**< Cannot identify the call */
+       TAPI_CAUSE_DEACTIVATION,                        /**< Deactivation */                                                    //90
+       TAPI_CAUSE_FATAL_ERROR,                 /**< Fatal error */
+       TAPI_CAUSE_SEND_DTMF_SUCCESS,           /**< Sending DTMF Success */
+       TAPI_CAUSE_SEND_DTMF_FAIL,                      /**< Sending DTMF Failed */
+       TAPI_CAUSE_TIMER_EXPIRED,                       /**< Call Timer Expired */
+} TelCallCause_t;
+
+/**
+ * @enum TelTapiEndCause_t
+ * When a call is ended, this end cause is given with the CALL END notification to the application.  This end cause can be originated
+ * from different elements in the communication path or different modules in the same element.
+ */
+typedef enum {
+       TAPI_CALL_END_NO_CAUSE = 0x00,                          /**< No Cause */
+
+       TAPI_CC_CAUSE_UNASSIGNED_NUMBER,                        /**< Unassigned Number */
+       TAPI_CC_CAUSE_NO_ROUTE_TO_DEST,                 /**< No Route to Destination */
+       TAPI_CC_CAUSE_CHANNEL_UNACCEPTABLE,             /**< Channel Unacceptable */
+       TAPI_CC_CAUSE_OPERATOR_DETERMINED_BARRING,      /**< Operator Determined Barring */
+       TAPI_CC_CAUSE_NORMAL_CALL_CLEARING,             /**< Normal Call Clearing */
+
+       TAPI_CC_CAUSE_USER_BUSY,                                        /**< User Busy */
+       TAPI_CC_CAUSE_NO_USER_RESPONDING,                       /**< No user Responding */
+       TAPI_CC_CAUSE_USER_ALERTING_NO_ANSWER,          /**< User Alerting no Answer */
+       TAPI_CC_CAUSE_CALL_REJECTED,                            /**< Call Rejected */
+       TAPI_CC_CAUSE_NUMBER_CHANGED,                           /**< Number Changed */
+
+       TAPI_CC_CAUSE_NON_SELECTED_USER_CLEARING,       /**< Non Selected User Clearing */
+       TAPI_CC_CAUSE_DESTINATION_OUT_OF_ORDER, /**< Destination out of Order */
+       TAPI_CC_CAUSE_INVALID_NUMBER_FORMAT,            /**< Invalid Number Format */
+       TAPI_CC_CAUSE_FACILITY_REJECTED,                        /**< Facility Rejected */
+       TAPI_CC_CAUSE_RESPONSE_TO_STATUS_ENQUIRY,       /**< Response to Status Enquiry */
+
+       TAPI_CC_CAUSE_NORMAL_UNSPECIFIED,                               /**< Normal Unspecified */
+       TAPI_CC_CAUSE_NO_CIRCUIT_CHANNEL_AVAILABLE,     /**< No Circuit Channel Available */
+       TAPI_CC_CAUSE_NETWORK_OUT_OF_ORDER,                     /**< Network out of Order */
+       TAPI_CC_CAUSE_TEMPORARY_FAILURE,                                /**< Temporary Failure */
+       TAPI_CC_CAUSE_SWITCHING_EQUIPMENT_CONGESTION,   /**< Switching Equipment Congestion */
+
+       TAPI_CC_CAUSE_ACCESS_INFORMATION_DISCARDED,                     /**< Access Information Discarded */
+       TAPI_CC_CAUSE_REQUESTED_CIRCUIT_CHANNEL_NOT_AVAILABLE,  /**< Requested Circuit channel not available */
+       TAPI_CC_CAUSE_RESOURCES_UNAVAILABLE_UNSPECIFIED,                /**< Resources unavailable unspecified */
+       TAPI_CC_CAUSE_QUALITY_OF_SERVICE_UNAVAILABLE,                   /**< Quality of service unavailable */
+       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_SUBSCRIBED,                /**< Requested facility not subscribed */
+
+       TAPI_CC_CAUSE_INCOMING_CALL_BARRED_WITHIN_CUG,                  /**< incomming call barred within CUG */
+       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_AUTHORISED,         /**< Bearer Capability not Authorised */
+       TAPI_CC_CAUSE_BEARER_CAPABILITY_NOT_PRESENTLY_AVAILABLE,/**< Bearer capability not presently Available */
+       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_AVAILABLE,                  /**< Service or Option not available */
+       TAPI_CC_CAUSE_BEARER_SERVICE_NOT_IMPLEMENTED,                   /**< Service not implemented */
+
+       TAPI_CC_CAUSE_ACM_GEQ_ACMMAX,                                                   /**< ACM GEQ ACMAX */
+       TAPI_CC_CAUSE_REQUESTED_FACILITY_NOT_IMPLEMENTED,               /**< Requested facility not implemented */
+       TAPI_CC_CAUSE_ONLY_RESTRICTED_DIGITAL_INFO_BC_AVAILABLE,/**< Resticted digital info BC not available */
+       TAPI_CC_CAUSE_SERVICE_OR_OPTION_NOT_IMPLEMENTED,                /**< Service or Option not Implemented  */
+       TAPI_CC_CAUSE_INVALID_TRANSACTION_ID_VALUE,                     /**< Transaction ID value */
+
+       TAPI_CC_CAUSE_USER_NOT_MEMBER_OF_CUG,                           /**< Not member of CUG */
+       TAPI_CC_CAUSE_INCOMPATIBLE_DESTINATION,                 /**< Incompatible Destination */
+       TAPI_CC_CAUSE_INVALID_TRANSIT_NETWORK_SELECTION,        /**< Transit Network selection */
+       TAPI_CC_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE,           /**< Semantically Incorrect message */
+       TAPI_CC_CAUSE_INVALID_MANDATORY_INFORMATION,            /**< Invalid Mandatory Message */
+
+       TAPI_CC_CAUSE_MESSAGE_TYPE_NON_EXISTENT,                                        /**< Message Type Non Existent */
+       TAPI_CC_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROT_STATE,      /**< Message type not compatible with Prot state */
+       TAPI_CC_CAUSE_IE_NON_EXISTENT_OR_NOT_IMPLEMENTED,                       /**< IE non exitent or not implemented */
+       TAPI_CC_CAUSE_CONDITIONAL_IE_ERROR,                                             /**< Conditional IE error */
+       TAPI_CC_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE,       /**< Not Compatible with protocol state */
+
+       TAPI_CC_CAUSE_RECOVERY_ON_TIMER_EXPIRY, /**< Recovery on timer expiry */
+       TAPI_CC_CAUSE_PROTOCOL_ERROR_UNSPECIFIED,       /**< Protocol error unspecified */
+       TAPI_CC_CAUSE_INTERWORKING_UNSPECIFIED, /**< Interworking unspecified */
+
+       TAPI_CC_CAUSE_END = 128,
+
+       /* Reject causes*/
+       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR,  /**< IMSI unknown in HLR */
+       TAPI_REJECT_CAUSE_ILLEGAL_MS,                   /**< Illegal MS */
+       TAPI_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR,  /**< IMSI unknown in VLR */
+       TAPI_REJECT_CAUSE_IMEI_NOT_ACCEPTED,    /**< IMEI not accepted */
+       TAPI_REJECT_CAUSE_ILLEGAL_ME,                   /**< Illegal ME */
+
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED,                                            /**< GPRS service not allowed */
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_AND_NON_GPRS_SERVICES_NOT_ALLOWED,      /**< GPRS services and Non-GPRS services not allowed */
+       TAPI_REJECT_CAUSE_MS_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK, /**< MS device cannot be derived by the network */
+       TAPI_REJECT_CAUSE_IMPLICITLY_DETACHED,                                                          /**< Implicitly detached */
+       TAPI_REJECT_CAUSE_PLMN_NOT_ALLOWED,                                                             /**< PLMN not allowed */
+
+       TAPI_REJECT_CAUSE_LA_NOT_ALLOWED,                                                       /**< LA not allowed */
+       TAPI_REJECT_CAUSE_NATIONAL_ROAMING_NOT_ALLOWED,                 /**< National roaming not allowed */
+       TAPI_REJECT_CAUSE_GPRS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN,       /**< GPRS services not allowed in this PLMN */
+       TAPI_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LA,                                      /**< No suitable cells in the LA */
+       TAPI_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE,                        /**< MSC temporarily not reachable */
+
+       TAPI_REJECT_CAUSE_NETWORK_FAILURE,              /**< Network unavailable */
+       TAPI_REJECT_CAUSE_MAC_FAILURE,                  /**< MAC failure */
+       TAPI_REJECT_CAUSE_SYNCH_FAILURE,                /**< SYNCh failure */
+       TAPI_REJECT_CAUSE_CONGESTTION,                  /**< Congestion */
+       TAPI_REJECT_CAUSE_GSM_AUTH_UNACCEPTED,  /**< GSM Auth unaccepted */
+
+       TAPI_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED, /**< Service option not supported */
+       TAPI_REJECT_CAUSE_REQ_SERV_OPT_NOT_SUBSCRIBED,  /**< REQ_SERV option not suscribed */
+       TAPI_REJECT_CAUSE_SERVICE_OPT__OUT_OF_ORDER,    /**< Service OPT out of order */
+       TAPI_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED,    /**< Call cannot be identified */
+       TAPI_REJECT_CAUSE_NO_PDP_CONTEXT_ACTIVATED,     /**< No PDP context Activated */
+
+       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MIN_VALUE,   /**< Retry upon entry into a new call min value */
+       TAPI_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_A_NEW_CELL_MAX_VALUE,   /**< Retry upon entry into a new call max value */
+       TAPI_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MSG,                                   /**< Semantically incorret message */
+       TAPI_REJECT_CAUSE_INVALID_MANDATORY_INFO,                                               /**< Invalid mandatory information */
+       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTANT,                                    /**< Message type non-existant */
+
+       TAPI_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMP_PRT_ST,         /**< Message type not COMP PRT ST */
+       TAPI_REJECT_CAUSE_IE_NON_EXISTANT,                                              /**< IE not existant */
+       TAPI_REJECT_CAUSE_MSG_NOT_COMPATIBLE_PROTOCOL_STATE,    /**< MSG not compatible protocol state */
+
+       /* Connection Management establishment rejection cause */
+       TAPI_REJECT_CAUSE_REJ_UNSPECIFIED,      /**< rej unspecified */
+
+       /* AS reject causes */
+       TAPI_REJECT_CAUSE_AS_REJ_RR_REL_IND,                                            /**< RR release indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RR_RANDOM_ACCESS_FAILURE,                      /**< Random Access Failure */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_REL_IND,                                           /**< RRC release indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_CLOSE_SESSION_IND,                 /**< RRC close session indication */
+       TAPI_REJECT_CAUSE_AS_REJ_RRC_OPEN_SESSION_FAILURE,                      /**< RRC open session failure */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL,                                        /**< Low level failure */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_FAIL_REDIAL_NOT_ALLOWED, /**< Low level failure redial not alowed */
+       TAPI_REJECT_CAUSE_AS_REJ_LOW_LEVEL_IMMED_RETRY,                 /**< low level immediate retry */
+
+       /* MM reject causes */
+       TAPI_REJECT_CAUSE_MM_REJ_INVALID_SIM,                   /**< invalid Sim */
+       TAPI_REJECT_CAUSE_MM_REJ_NO_SERVICE,                    /**< No service */
+       TAPI_REJECT_CAUSE_MM_REJ_TIMER_T3230_EXP,               /**< Timer T3230 expire */
+       TAPI_REJECT_CAUSE_MM_REJ_NO_CELL_AVAILABLE,     /**< No call available  */
+       TAPI_REJECT_CAUSE_MM_REJ_WRONG_STATE,                   /**< wrong state */
+       TAPI_REJECT_CAUSE_MM_REJ_ACCESS_CLASS_BLOCKED,  /**< Access class blocked */
+
+       /* Definitions for release ind causes between MM  and CNM*/
+       TAPI_REJECT_CAUSE_ABORT_MSG_RECEIVED,   /**< Abort Message received */
+       TAPI_REJECT_CAUSE_OTHER_CAUSE,                  /**< Other cause  */
+
+       /* CNM reject causes */
+       TAPI_REJECT_CAUSE_CNM_REJ_TIMER_T303_EXP,       /**< Timer T303 expiry */
+       TAPI_REJECT_CAUSE_CNM_REJ_NO_RESOURCES, /**< Rejected due to unavailibilty of resources */
+       TAPI_REJECT_CAUSE_CNM_MM_REL_PENDING,           /**< MM release pending */
+       TAPI_REJECT_CAUSE_CNM_INVALID_USER_DATA,        /**< Invalid user data */
+       TAPI_CALL_END_CAUSE_MAX = 255,                          /**< Maximum End Cause limit for gsm/wcdma */
+
+       /* CDMA CALL END CAUSE */
+       TAPI_CDMA_END_CAUSE_REL_BY_USER = 0x1001,               /**< Call Released by User */
+       TAPI_CDMA_END_CAUSE_REL_BY_NET,                         /**< Call Released by Network */
+       TAPI_CDMA_END_CAUSE_REL_NET_BUSY,                               /**< Call Released because of Network busy */
+       TAPI_CDMA_END_CAUSE_NO_SVC,                                     /**< Call Released because of No Service area */
+       TAPI_CDMA_END_CAUSE_FADING,                                     /**< Call Released because of Fading */
+       TAPI_CDMA_END_CAUSE_RELEASE_BY_REORDER,         /**< Call Released because of reorder */
+       TAPI_CDMA_END_CAUSE_RELEASE_BY_INTERCEPT,               /**< Call Released because of intercept */
+       TAPI_CDMA_END_CAUSE_SILENT_ZONE_RETRY,                  /**< Call Released because of silent zone retry */
+       TAPI_CDMA_END_CAUSE_OTA_CALL_FAIL,                              /**< Call Released because of OTA cal failure */
+       TAPI_CDMA_END_CAUSE_PHONE_OFFLINE,                              /**< Call Released because of phone offline */
+       TAPI_CDMA_END_CAUSE_PHONE_IS_CDMA_LOCKED,               /**< Call Released because of CDMA locked */
+       TAPI_CDMA_END_CAUSE_FLASH_IS_IN_PROGRESS_ERR,   /**< Call Released because of flash-is-in-progress error */
+       TAPI_CDMA_END_CAUSE_E911_MODE_ERR,                              /**< Call Released because of e911 mode */
+       TAPI_CDMA_END_CAUSE_OTHERS,                                     /**< Call Released by Others */
+       TAPI_CDMA_END_CAUSE_MAX                                         /**< Maximum End Cause limit for cdma */
+} TelTapiEndCause_t;
+
+/**
+ * @enum TelConferenceCallState_t
+ * This enum defines the call conference states
+ */
+typedef enum {
+       TAPI_CALL_CONFERENCE_IDLE,      /**< idle */
+       TAPI_CALL_CONFERENCE_ACTIVE /**< active */
+} TelConferenceCallState_t;
+
+/**
+ * @enum TelCallStates_t
+ * Applications can use these sates or can have their own states.
+ */
+typedef enum {
+       TAPI_CALL_STATE_IDLE,           /**< Call is in idle state - i.e. no call */
+       TAPI_CALL_STATE_ORIG,           /**< Call is in origination state */
+       TAPI_CALL_STATE_SETUPIND,       /**< Call is in setup state */
+       TAPI_CALL_STATE_CONNECTING, /**< Call is in connecting state */
+       TAPI_CALL_STATE_ALERT,          /**< Call is in alerting state */
+       TAPI_CALL_STATE_INCOM,          /**< Call is in incoming state */
+       TAPI_CALL_STATE_ANSWER, /**< Call is in answered state, and waiting for connected indication event */
+       TAPI_CALL_STATE_CONV,           /**< Call is in connected and conversation state */
+       TAPI_CALL_STATE_ENDING, /**< Call is in end-requested state */
+       TAPI_CALL_STATE_END,            /**< Call is in disconnected state */
+       TAPI_CALL_STATE_INVALID /**< Call is in invalid(unknown) state */
+} TelCallStates_t;
+
+/**
+ * IN GSM ONLY: call identification number.
+ */
+typedef enum {
+       TAPI_CALL_ACTIVE_LINE1, /**< Line 1 */
+       TAPI_CALL_ACTIVE_LINE2  /**< Line 2 */
+} TelCallActiveLine_t;
+
+typedef enum {
+       TAPI_CALL_UUS_NONE, /**< No User to User information  */
+       TAPI_CALL_UUS_1,        /**< User to User information 1 */
+} TelCallUusType_t;
+
+/**
+ * The Incoming call indication could have be one of the following SS info messages in it.
+ */
+typedef enum {
+       /*      Number details are present in the "char number" of call info struct. if number is not present
+        then "no cli cause" member in  mt_ss_info is set accordingly.  */
+       TAPI_CALL_MT_CLI_PRESENT = 0x31,
+
+       /*      Calling Name Info presnet,      TelCallingNameInfo_t of call info struct contains this info.  */
+       TAPI_CALL_MT_CNA_PRESENT = 0x32,
+
+       /*      Undefined ss indication. Ignore mt_ss_info */
+       TAPI_CALL_MT_SS_UNDEFINED = 0x00,
+
+} TelCallMtSSInfo_t;
+
+/**
+ * @enum TelCallAnswerType_t
+ * Answer type used as in parameter in the answer call API.
+ */
+typedef enum {
+       TAPI_CALL_ANSWER_ACCEPT = 0,            /**< Used to answer an incoming call when there are no current active calls. */
+       TAPI_CALL_ANSWER_REJECT,                        /**< Used to reject the incoming call */
+       TAPI_CALL_ANSWER_REPLACE,                       /**< Release current active call and accept the */
+       TAPI_CALL_ANSWER_HOLD_AND_ACCEPT,       /**< Hold the current active call, and accept the wating call */
+} TelCallAnswerType_t;
+
+/**
+ * @enum TelCallType_t
+ * Applications needs to use this call type while using the setup call API. Like the requested call is a voice call or video call.
+ */
+typedef enum {
+       TAPI_CALL_TYPE_VOICE,   /**< Voice call type. */// in ipcv4, 0x0100
+       TAPI_CALL_TYPE_DATA,    /**< Data call type - (for modem, fax, packet, etc. calls). */// in ipcv4, 0x0200
+       TAPI_CALL_TYPE_E911     /**< Emergency call type. */// in ipcv4, 0x0700
+} TelCallType_t;
+
+/**
+ * @enum TelCallAlertingPattern_t
+ * This enumeration defines the different alerting patterns available.
+ */
+typedef enum {
+       TAPI_CALL_ALERTING_PATTERN_1 = 0x00, /**< Pattern 1 */
+       TAPI_CALL_ALERTING_PATTERN_2 = 0x01, /**< Pattern 2 */
+       TAPI_CALL_ALERTING_PATTERN_3 = 0x02, /**< Pattern 3 */
+       TAPI_CALL_ALERTING_PATTERN_4 = 0x03, /**< Pattern 4 */
+       TAPI_CALL_ALERTING_PATTERN_5 = 0x04, /**< Pattern 5 */
+       TAPI_CALL_ALERTING_PATTERN_6 = 0x05, /**< Pattern 6 */
+       TAPI_CALL_ALERTING_PATTERN_7 = 0x06, /**< Pattern 7 */
+       TAPI_CALL_ALERTING_PATTERN_8 = 0x07, /**< Pattern 8 */
+       TAPI_CALL_NO_ALERTING_PATTERN = 0x08 /**< No Alerting Pattern */
+} TelCallAlertingPattern_t;
+
+/**
+ * @enum TelCallActiveState_t
+ * State of the current call.
+ */
+typedef enum {
+       TAPI_CALL_CONNECT_IDLE, /**< Call is in Idle state. */
+       TAPI_CALL_CONNECT_ACTIVE,       /**< Call is in Active state.*/
+       TAPI_CALL_CONNECT_HELD          /**< Call is in Held state. */
+} TelCallActiveState_t;
+
+/**
+ * @enum TelCallCugOptions_t
+ * This enumeration defines the closed user group options
+ */
+typedef enum {
+       TAPI_CALL_CUG_NO_INFO = 0x00,           /**< No information */
+       TAPI_CALL_CUG_SUPRESS_OA,                       /**< suppress OA */
+       TAPI_CALL_CUG_SUPRESS_PRF_CUG,          /**< suppress preferential CUG */
+       TAPI_CALL_CUG_SUPRESS_OA_AND_CUG        /**< suppress OA and preferential CUG */
+} TelCallCugOptions_t;
+
+/**
+ * @enum TelCallUusProtocolType_t
+ *  This enumeration defines the tapi call uus protocol types
+ */
+typedef enum {
+       TAPI_CALL_UUS_PROTO_SPECIFIC = 0,                       /**< The user information is structured according to user needs. */
+       TAPI_CALL_UUS_PROTO_OSI_HIGHER_LAYER = 1,       /**< OSI high layer protocols */
+       TAPI_CALL_UUS_PROTO_IA5_CHARS = 4,                      /**< user information consists of IA5 characters */
+       TAPI_CALL_UUS_PROTO_V120 = 7,                           /**< rate adaptation */
+       TAPI_CALL_UUS_PROTO_Q931 = 8                            /**< user-network call control messages */
+} TelCallUusProtocolType_t;
+
+/**
+ * @enum TelCallNameMode_t
+ *  This enumeration defines the call name mode
+ */
+typedef enum {
+       TAPI_CALL_NAME_AVAIL = 0,                               /**< This identifier refers to the presentation of the calling party's name identity to the called party. */
+       TAPI_CALL_NAME_RESTRICTED = 1,                  /**< This identifier refers to the restriction of presentation of the name identity of the calling party to the called party. */
+       TAPI_CALL_NAME_UNAVAIL = 2,                     /**< This identifier refers to the unavailability of the calling party's name identity to be offered to the called party. */
+       TAPI_CALL_NAME_AVAIL_RESTRICTED = 3     /**< This identifier refers to the calling party's name identity to be offered to the called party with which presentation restriction is overridden.  */
+} TelCallNameMode_t;
+
+/**
+ * @enum TelCallSSNocliCause_t
+ * This enumeration defines the value for "No Cli cause".
+ */
+typedef enum {
+       TAPI_SS_NO_CLI_CAUSE_UNAVAILABLE = 0x00,                /**< Unavailable */
+       TAPI_SS_NO_CLI_CAUSE_REJECTBY_USER = 0x01,              /**< Rejected by User */
+       TAPI_SS_NO_CLI_CAUSE_INTERACTION_OTHERSERVICES = 0x02, /**<  Other services */
+       TAPI_SS_NO_CLI_CAUSE_COINLINE_PAYPHONE = 0x03,  /**< Coin line phone */
+       TAPI_SS_NO_CLI_CAUSE_MAX                                                /**< maximum usage */
+} TelCallSSNocliCause_t;
+
+/**
+ * Fwded Ind Type used for MO and Mt from SS Noti Info
+ */
+typedef enum {
+       TAPI_CALL_OUTGOING_FWDED = 0x00,        /* Outgoing call forwarded */
+       TAPI_CALL_INCOMMING_FWDED = 0x01,       /* Incoming call forwarded */
+} TelCallForwardType_t;
+
+/**
+ * @enum TelCallPrivacyMode_t
+ * This structure contains the voice privacy option mode(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_PRIVACY_MODE_STANDARD = 0x00, /**< Standard mode */
+       TAPI_CALL_PRIVACY_MODE_ENHANCED         /**< Enhanced mode */
+} TelCallPrivacyMode_t;
+
+/**
+ * @enum TelCallPrivacyType_t
+ * This structure contains the voice privacy request type(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_PRIVACY_TYPE_MS = 0x01,       /**< Mobile Station Voice Privacy Mode */
+       TAPI_CALL_PRIVACY_TYPE_BS,                      /**< Base Station Voice Privacy Mode */
+       TAPI_CALL_PRIVACY_TYPE_CURRENT          /**< Current Serving Privacy Mode */
+} TelCallPrivacyType_t;
+
+/**
+ * @enum TelCallEmergecyMode_t
+ * This structure contains the emergency callback mode(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_EMERGENCY_MODE_EXIT,  /**< Emergency CB Exit mode */
+       TAPI_CALL_EMERGENCY_MODE_ENTER  /**< Emergency CB Enter mode */
+} TelCallEmergecyMode_t;
+
+/**
+ * @enum TelCallOtaType_t
+ * This structure contains the OTA type(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_OTATYPE_OTASP = 0x01, /**< OTASP : mobile initiated OTA*/
+       TAPI_CALL_OTATYPE_OTAPA,                /**< OTAPA : network initiated OTA */
+} TelCallOtaType_t;
+
+/**
+ * @enum TelCallOtaspStatus_t
+ * This structure contains the OTASP Status(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_OTASP_OK_SPL_UNLOCKED = 0x01, /**< OTASP : SPL unlocked ok*/
+       TAPI_CALL_OTASP_OK_AKEY_EXCESS,         /**< OTASP : A-Key excess ok*/
+       TAPI_CALL_OTASP_OK_SSD_UPDATE,                  /**< OTASP : SSD update ok */
+       TAPI_CALL_OTASP_OK_NAM_DWNLD,                   /**< OTASP : NAM download ok */
+       TAPI_CALL_OTASP_OK_MDN_DWNLD,                   /**< OTASP : MDN download ok */
+       TAPI_CALL_OTASP_OK_IMSI_DWNLD,                  /**< OTASP :  IMSI download ok*/
+       TAPI_CALL_OTASP_OK_PRL_DWNLD,                   /**< OTASP : PRL download ok */
+       TAPI_CALL_OTASP_OK_COMMIT,                              /**< OTASP : commit ok */
+       TAPI_CALL_OTASP_OK_PROGRAMMING,         /**< OTASP : programming ok */
+       TAPI_CALL_OTASP_SUCCESS,                                /**< OTASP : success */
+       TAPI_CALL_OTASP_UNSUCCESS,                              /**< OTASP : unsuccess */
+       TAPI_CALL_OTASP_OK_OTAPA_VERIFY,                /**< OTASP : verify ok */
+       TAPI_CALL_OTASP_PROGRESS,                               /**< OTASP : progress */
+       TAPI_CALL_OTASP_FAILURES_EXCESS_SPC,    /**< OTASP : SPC excess failure */
+       TAPI_CALL_OTASP_LOCK_CODE_PW_SET,               /**< OTASP : lock code password set*/
+} TelCallOtaspStatus_t;
+
+/**
+ * @enum TelCallOtapaStatus_t
+ * This structure contains the OTAPA Status(CDMA only).
+ */
+typedef enum {
+       TAPI_CALL_OTAPA_STOP = 0x00,    /**< OTAPA : stop */
+       TAPI_CALL_OTAPA_START,                  /**< OTAPA : start */
+} TelCallOtapaStatus_t;
+
+/**
+ * @enum TelCallTimeMaskType_t
+ * This structure contains call time request mask type.
+ */
+typedef enum {
+       TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT = 0x01,      /**< Total Call Count Mask */
+       TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME = 0x02, /**< Total Call Time Mask */
+       TAPI_CALL_TIME_TYPE_LAST_CALL_TIME = 0x04,      /**< Last Call Time Mask */
+} TelCallTimeMaskType_t;
+
+/**
+ * @enum TelCallToneDuration_t
+ * This structure contains dtmf tone length.
+ */
+typedef enum {
+       TAPI_CALL_TONE_DURATION_SHORT = 0x01,
+       TAPI_CALL_TONE_DURATION_LONG
+} TelCallToneDuration_t;
+
+/**
+ * @enum TelCallEmergencyCategory_t
+ * This structure contains emergency category type
+ */
+typedef enum {
+       TAPI_CALL_ECC_DEFAULT = 0x00,
+       TAPI_CALL_ECC_POLICE = 0x01,
+       TAPI_CALL_ECC_AMBULANCE = 0x02,
+       TAPI_CALL_ECC_FIREBRIGADE = 0x04,
+       TAPI_CALL_ECC_MARINEGUARD = 0x08,
+       TAPI_CALL_ECC_MOUNTAINRESCUE = 0x10,
+       TAPI_CALL_ECC_MANUAL_ECALL = 0x20,
+       TAPI_CALL_ECCY_AUTO_ECALL = 0x40
+} TelCallEmergencyCategory_t;
+
+typedef enum {
+       TAPI_CALL_IDENTITY_DEFAULT, /**< Calling line identity will be sent. Based on network setting, Line identity will presented to the called party. */
+       TAPI_CALL_IDENTITY_SHOW,        /**< Display calling line identity */
+       TAPI_CALL_IDENTITY_HIDE /**< Hide the display of Calling line identity */
+} TelCallIdentityMode_t;
+
+
+/**
+ * context type
+ */
+typedef enum {
+       TAPI_CONTEXT_TYPE_NONE = 0x00,
+       TAPI_CONTEXT_TYPE_VOICE_CALL = 0x01,
+       TAPI_CONTEXT_TYPE_DATA_CALL = 0x2,
+       TAPI_CONTEXT_TYPE_VIDEO_CALL = 0x3,
+       TAPI_CONTEXT_TYPE_NETTEXT,
+       TAPI_CONTEXT_TYPE_E911,
+} TapiContextType;
+
+
+/**
+ * Timer State and or Call Timer ID
+ */
+typedef enum {
+       TAPI_CALL_TSTATE_IDLE = 0x00,           /**< No timer running */
+       TAPI_CALL_TSTATE_SETUP_PENDING, /**< Setup Timer */
+       TAPI_CALL_TSTATE_CONNECT_PENDING,       /**< Connected Timer */
+       TAPI_CALL_TSTATE_END_PENDING,           /**< Release Timer */
+       TAPI_CALL_TSTATE_HOLD_PENDING,          /**< Hold Timer */
+       TAPI_CALL_TSTATE_RETRIEVE_PENDING,      /**< Retrieve Timer */
+       TAPI_CALL_TSTATE_JOIN_PENDING,          /**< Join Timer */
+       TAPI_CALL_TSTATE_SPLIT_PENDING, /**< Split Timer */
+       TAPI_CALL_TSTATE_ECT_PENDING,           /**< ECT Timer */
+       TAPI_CALL_TSTATE_DTMF_PENDING,          /**< DTMF Timer */
+} TelTapiCallTimerState;
+
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+typedef struct {
+       TS_BOOL bRequestedBySAT;                        /** This flag is to indicate whether the request has been initiated by SAT or not.Possible values are 0 and 1. This flag should be updated only when originating a setup request */
+       TelCallIdentityMode_t IdentityMode; /**< Sets Calling Line Identity mode. If default value  TAPI_IDENTITY_DEFAULT is set, OEM will set the default value. */
+       TelCallEmergencyCategory_t ecc;
+} tel_set_call_satflag_identiymode;
+
+/**
+ * This structure contains information about the redirect destination  information.
+ */
+typedef struct {
+       unsigned char number[TAPI_CALL_DIAL_NUMBER_LEN_MAX + 1]; /**< Redirect destination number */
+} TelCallDeflectDstInfo_t;
+
+/**
+ * This structure defines the calling name information
+ */
+typedef struct {
+       TelCallNameMode_t NameMode;                                     /**< Display mode of the szNameData. */
+       char szNameData[TAPI_CALLING_NAME_SIZE_MAX];    /**< Calling party name string.   */
+} TelCallingNameInfo_t;
+
+/**
+ * This structure contains information about an outgoing call.
+ */
+typedef struct {
+       TelCallType_t CallType;                                         /**< sets type of call (voice, data, video, emergency) */
+       char szNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< A string containing the destination phone number. This follows the dial number format.*/
+} TelCallSetupParams_t;
+
+/**
+ * This structure contains information about call status.
+ */
+typedef struct {
+       int bMoCall;                                                                    /**< Status will be yes for MO Call. If MT call, then FALSE*/
+       char pNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];  /**< Mobile Number */
+       TelCallType_t CallType;                                         /**< Specifies type of call (voice, data, emergency) */
+       TelCallStates_t CallState;                                              /**< Current Call state */
+       TelCallActiveState_t CallActiveState;                   /**< Current Active state */
+       int bConferenceState;                                                   /**< Whether Call is in Conference or not*/
+} TelCallStatus_t;
+
+/**
+ * This structure contains information about Call end information.
+ */
+typedef struct {
+       TelTapiEndCause_t CallEndCause; /**< End cause for the call indicates whether the call is released normally or due to other cause*/
+       unsigned int pCallHandle;               /**< Call handle*/
+       unsigned int CallStartTime;     /**< Start time of the call(time in secs) */
+       unsigned int CallEndTime;               /**< End time of the call(time in secs)*/
+} TelCallEndInfo_t;
+
+/**
+ * This structure contains information about call redirection details.
+ */
+typedef struct {
+       char szRedirectedNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];               /**< Redirected party number */
+       char szRedirectSubAddress[TAPI_CALL_SUBADDRESS_LEN_MAX + 1];    /**< Redirect party sub-address */
+} TelCallRedirectionInfo_t;
+
+/**
+ * This structure contains the incoming call information.
+ */
+typedef struct {
+       unsigned int CallHandle;                                /**< At Foundation API Level, Call handle indicates the Handle of the Call for the Application . At Framework API Level, call handle indicates the Call identifier used for call by the OEM Adaptation Layer Plug-in */
+       TelCallType_t CallType;                         /**< Call type */
+       TelSsLineIdentificationType_t CliPresentationIndicator; /**< Calling Party presentation indicator */
+       char szCallingPartyNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /**< caller number,null terminated ASCII */
+       TelCallingNameInfo_t CallingNameInfo;   /**< Call name info. If there is no information from network, this information will be NULL.*/
+       TelCallRedirectionInfo_t RedirectInfo;  /**< The data for the Call Redirect information. If there is no information from network, this information will be NULL.  */
+       TelCallSSNocliCause_t CliCause;         /**< No of CLI cause */
+       int fwded;                                                              /**< True or false. If Incoming call is a forwarded call, then true else false. */
+       TelCallActiveLine_t ActiveLine;         /**< Current Active Line */
+} TelCallIncomingCallInfo_t;
+
+/**
+ *SS Info message.
+ */
+typedef struct {
+       TelCallMtSSInfo_t type; /* Type of the SS Info presnet. */
+       TelCallSSNocliCause_t no_cli_cause;
+} TelCallMtSsInfo_t; // not used
+
+typedef struct {
+       int isMobileOriginated;                                 /* Is this call Mobile Originated? */
+       TelCallNameMode_t nameMode;                             /* Calling Party Name availability mode */
+       char callNumber[TAPI_CALL_DIALDIGIT_LEN_MAX + 1]; /* A character array of the destination address. This follows the dial callNumber format. */
+       unsigned int startTime;                                 /* Time when a call is started */
+       unsigned int endTime;                                           /* Time when a call is ended */
+       TelCallType_t callType;                                 /* Type of a call */
+       TelCallStates_t callState;                                      /* State of a call */
+       TelCallActiveState_t activeState;                       /* Status of a call */
+       TelConferenceCallState_t conferenceState;       /* State of a conference call */
+       TelCallingNameInfo_t callingNameInfo;           /* Calling name information of a call */
+       TelCallActiveLine_t current_line;                       /* Line information of a call */
+       TelCallCause_t cause;                                           /* End type of a call when a call is ended */
+       TelTapiEndCause_t endCause;                             /* EndCause */
+} TelTapiCallInfo_t;
+
+/**
+ * This structure contains the connected number information.
+ */
+typedef struct {
+       TelCallSSNocliCause_t no_cli_cause; /**< Cause when no CLI number. */
+       unsigned char dcs;                                      /**< DCS */
+       unsigned char number_type;                      /**< Number type */
+       TelCallNameMode_t name_mode;            /**< Display mode of the name. */
+       char number[TAPI_CALL_DIALDIGIT_LEN_MAX + 1];           /**< Caller number, null terminated ASCII */
+       char sub_address[TAPI_CALL_SUBADDRESS_LEN_MAX + 1]; /**< Called sub-address, null terminated ASCII */
+} TelCallConnectedNumberInfo_t;
+
+/**
+ * This structure contains the voice privacy info(CDMA only).
+ */
+typedef struct {
+       TelCallPrivacyType_t PrivacyType; /**< Voice Privacy Request Type */
+       TelCallPrivacyMode_t PrivacyMode; /**< Voice Privacy Mode */
+} TelCallVoicePrivacyInfo_t;
+
+/**
+ * This structure contains the OTA progress indication information(CDMA only).
+ */
+typedef struct {
+       TelCallOtaType_t OtaType;                       /**< OTA type */
+       TelCallOtaspStatus_t OtaspStatus;       /**< OTASP status : if OTA type is  OTASP, it is valid */
+       TelCallOtapaStatus_t OtapaStatus;       /**< OTAPA status : if OTA type is  OTAPA, it is valid */
+} TelCallOtaProgressInfo_t;
+
+/**
+ * This structure contains information about a call time and call count.
+ */
+typedef struct {
+       unsigned short req_type_mask;   /**< call time request type */
+       unsigned long TotalCallCnt;     /**< Total Call Count */
+       unsigned long OutgoingCallCnt;  /**< Outgoing Call Count */
+       unsigned long IncomingCallCnt;  /**< Incoming Call Count */
+       unsigned long TotalCallTime;    /**< Overall Call Time(Outgoing + Incoming, in second) */
+       unsigned long OutgoingCallTime; /**< Overall Outgoing Call Time(in second) */
+       unsigned long IncomingCallTime; /**< Overall Incoming Call Time(in second) */
+       unsigned long LastCallTime;     /**< Last Call Time(in second) */
+} TelCallTimeInfo_t;
+
+/**
+ * This structure contains information about display record in CDMA.
+ */
+typedef struct {
+       unsigned char Record[TAPI_CALL_DISPLAY_RECORD_MAX + 1]; /**< display record */
+} TelCallDisplayRecordInfo_t;
+
+
+/**
+ * context handle
+ */
+typedef TS_UINT HTapiContext;
+
+typedef struct {
+       TS_BOOL bUsed;                  /* This slot is used or not */
+       int eventClass;         /* Event group to notify */
+       TapiCallback callback;  /* callback function pointer of the application */
+} TapiClient;
+
+typedef struct _TapiContext {
+       TapiContextType type;
+       TS_BOOL bUsed;
+       HTapiContext hContext;
+       TapiClient *pClient; /* the client that has ownership on this call */
+} TapiContext;
+
+
+/**
+ * Call Timer object
+ */
+typedef struct {
+       TelTapiCallTimerState t_state;  /**< Timer State Map to Publish Call RSP Event */
+       int source_id;                                  /**< Unique Timer Source ID. Returned by g_timeout_add() */
+} TelTapiCallTimer_t;
+
+/**
+ * structure of voice call information
+ */
+typedef struct _TapiCallContext {
+       TapiContextType type;                   /* Voice or Video  */
+       TS_BOOL bUsed;
+       TS_UINT CallHandle;
+       int call_number;                                /* Call Id of OEM layer */
+       TelTapiCallInfo_t callInfo;
+       TelCallForwardType_t forwardIndType;
+       TelCallConnectedNumberInfo_t connected_info;
+       int requestId;
+       TelTapiCallTimer_t timer_obj;   /**<timer state and timer id */
+} tapi_call_context;
+
+typedef struct {
+       TapiClient clients[TAPI_CLIENT_SIZE_MAX];
+       int nCallContextCount;
+       tapi_call_context callContexts[TAPI_CONTEXT_CALL_SIZE_MAX];
+       TelCallActiveLine_t active_line;
+} TelCallAllContext_info_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  // _TEL_CALL_H_
+/**
+ * @}
+ */
+
diff --git a/include/common/TelData.h b/include/common/TelData.h
new file mode 100644 (file)
index 0000000..c706a53
--- /dev/null
@@ -0,0 +1,322 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup           TELEPHONY_API
+ * @addtogroup Data_Service Data Services
+ * @{
+ * @file TelData.h
+ *
+ * Data APIs allow an application to accomplish the following services: @n
+ * - process data pin control. @n
+ */
+
+#ifndef _TEL_DATA_H
+#define _TEL_DATA_H
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_DATA_MAX_DIAL_NUM_LEN                             32              /** Maximum length of dial number */
+#define TAPI_DATA_MIP_CONNECT_SUCCESS                  0xFF    /** For Sprint */
+#define TAPI_DATA_MAX_USER_NAI_LEN                             72              /** Maximum length of user NAI */
+#define TAPI_DATA_MAX_SHARED_SECRET_LEN                        16              /** Maximum length of shared secret */
+
+#define TAPI_DATA_MAX_PKT_DATA_ORIGINSTRING_LEN        16              /** Maximum length of Packet data origin string */
+#define TAPI_DATA_MAX_PAP_USER_ID_LEN                  64              /** Maximum length of Packet PAP user ID */
+#define TAPI_DATA_MAX_PAP_USER_PASSWORD_LEN            14              /** Maximum length of Packet PAP password */
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+typedef enum {
+       TAPI_DATA_NO_ERR = 0x00, /**< There is no error for any data operation. */
+       TAPI_DATA_PARAMETER_ERR, /**< There is no error for any data operation. */
+       TAPI_DATA_OFFLINE_ERR,   /**< This error is sent when any network option is tried when phone is in offline mode */
+       TAPI_DATA_OTHER_ERR      /**< This error to indicate other failure */
+} TelDataOperationCause_t;
+
+/**
+ * @enum TelDataSignalType
+ * Data Signal Type
+ */
+typedef enum {
+       TAPI_DATA_SIGNAL_DCD = 0x01, /**< DCD Signal */
+       TAPI_DATA_SIGNAL_DTR = 0x04, /**< DTR Signal */
+       TAPI_DATA_SIGNAL_DSR = 0x06, /**< DSR Signal */
+       TAPI_DATA_SIGNAL_RTS = 0x07, /**< RTS Signal */
+       TAPI_DATA_SIGNAL_CTS = 0x08, /**< CTS Signal */
+       TAPI_DATA_SIGNAL_RI = 0x09,  /**< RI Signal */
+} TelDataSignalType_t;
+
+/**
+ * @enum TelDataSignalStatus
+ * Data Signal Status
+ */
+typedef enum {
+       TAPI_DATA_SIGNAL_STATUS_OFF = 0x00, /**< Signal Status Off */
+       TAPI_DATA_SIGNAL_STATUS_ON = 0x01   /**< Signal Status On */
+} TelDataSignalStatus_t;
+
+typedef enum {
+       TAPI_DATA_TE2_TYPE_UART = 0x00,
+       TAPI_DATA_TE2_TYPE_USB = 0x01,
+       TAPI_DATA_TE2_TYPE_BLUETOOTH = 0x02
+} TelDataTE2Type_t;
+
+typedef enum {
+       TAPI_DATA_TE2_DETACHED = 0x00,
+       TAPI_DATA_TE2_ATTACHED = 0x01
+} TelDataTE2CableStatus_t;
+
+typedef enum {
+       TAPI_DATA_CALL_TYPE_DEFAULT = 0x00,
+       TAPI_DATA_CALL_TYPE_FAX_FOR_NEXT_CALL = 0x01,
+       TAPI_DATA_CALL_TYPE_FAX_FOR_ALL_CALLS = 0x02,
+       TAPI_DATA_CALL_TYPE_ASYNC_FOR_NEXT_CALL = 0x03,
+       TAPI_DATA_CALL_TYPE_ASYNC_FOR_ALL_CALLS = 0x04
+} TelDataCallType_t;
+
+typedef enum {
+       TAPI_DATA_CALL_STATUS_ALLOWED = 0x00,
+       TAPI_DATA_CALL_STATUS_NOT_ALLOWED_NO_SERVICE = 0x01,
+       TAPI_DATA_CALL_STATUS_NOT_ALLOWED_CALLING_VOICE = 0x02,
+       TAPI_DATA_CALL_STATUS_NOT_ALLOWED_NOT_CDMA = 0x03,
+       TAPI_DATA_CALL_STATUS_NOT_ALLOWED_LOCKED = 0x04,
+       TAPI_DATA_CALL_STATUS_NOT_CALL_GUARD = 0x05
+} TelDataDialingStatus_t;
+
+typedef enum {
+       TAPI_DATA_BAUDRATE_19200_BPS = 0x00,
+       TAPI_DATA_BAUDRATE_38400_BPS = 0x01,
+       TAPI_DATA_BAUDRATE_57600_BPS = 0x02,
+       TAPI_DATA_BAUDRATE_115200_BPS = 0x03,
+       TAPI_DATA_BAUDRATE_230400_BPS = 0x04
+} TelDataBaudRate_t;
+
+typedef enum {
+       TAPI_DATA_FACTORY_NAI = 0x00,
+       TAPI_DATA_CUSTOM_NAI = 0x01
+} TelDataNAIIndex_t;
+
+typedef enum {
+       TAPI_DATA_NAI_MIP_MASK_NONE = 0x0000,
+       TAPI_DATA_NAI_MIP_MASK_USER_NAI = 0x0001,
+       TAPI_DATA_NAI_MIP_MASK_SPI_MN_HA = 0x0002,
+       TAPI_DATA_NAI_MIP_MASK_SPI_MN_AAA = 0x0004,
+       TAPI_DATA_NAI_MIP_MASK_REVERSE_TUNNEL = 0x0008,
+       TAPI_DATA_NAI_MIP_MASK_HOME_ADDRESS = 0x0010,
+       TAPI_DATA_NAI_MIP_MASK_PRIMARY_HOME_AGENT_IP = 0x0020,
+       TAPI_DATA_NAI_MIP_MASK_SECONDARY_HOME_AGENT_IP = 0x0040,
+       TAPI_DATA_NAI_MIP_MASK_MN_AAA_SS = 0x0080,
+       TAPI_DATA_NAI_MIP_MASK_MN_HA_SS = 0x0100,
+       TAPI_DATA_NAI_MIP_MASK_ALGO_SIP_SS = 0x0200,
+       TAPI_DATA_NAI_MIP_MASK_ALGO_MIP_MN_AAA_SS = 0x0400,
+       TAPI_DATA_NAI_MIP_MASK_ALGO_MIP_MN_HA_SS = 0x0800,
+       TAPI_DATA_NAI_MIP_MASK_ALL = 0xFFFF
+} TelDataNaiMipParamMask_t;
+
+typedef enum {
+       TAPI_DATA_NAI_GENERIC_INFO_CHANGED = 0x0, /**< NAI, MN-HA SPI Set, MN-HA SPI Value, MN-AAA SPI Set, MN-AAA SPI Value, Rev Tunnel Preferred, Mobile IP Address, Primary HA Address, Secondary HA Address */
+       TAPI_DATA_SHARED_SECRET_CHANGED /**< HA Shared Secret, AAA Shared Secret */
+} TelDataNaiChangedItem_t;
+
+typedef enum {
+       TAPI_DATA_MIP_CHANGED_ITEM_NAI_INFO = 0x00,
+       TAPI_DATA_MIP_CHANGED_ITEM_SHARED_SECRET = 0x01
+} TelDataNAIItem_t;
+
+typedef enum {
+       TAPI_DATA_PACKET_NAI_SIGNIN_OUT = 0x00,
+       TAPI_DATA_PACKET_NAI_SIGNIN_IN = 0x01
+} TelDataSignStatus_t;
+
+typedef enum {
+       TAPI_DATA_ROAM_GUARD_DEFAULT = 0x00,
+       TAPI_DATA_ROAM_GUARD_ALWAYS_ASK = 0x01,
+       TAPI_DATA_ROAM_ROAM_GUARD_NEVER_ASK = 0x02,
+       TAPI_DATA_ROAM_ROAM_GUARD_OFF = 0x03,
+       TAPI_DATA_ROAM_ROAM_GUARD_ON = 0x04
+} TelDataRoamGuardMode_t;
+
+typedef enum {
+       TAPI_DATA_MODEM_NAI_OFF = 0x00,
+       TAPI_DATA_MODEM_NAI_ON = 0x01
+} TelDataModemNAIMode_t;
+
+typedef enum {
+       TAPI_DATA_DS_TYPE_NORMAL = 0x01,
+       TAPI_DATA_DS_TYPE_DUN = 0x02,
+       TAPI_DATA_DS_TYPE_BTDUN = 0x03,
+       TAPI_DATA_DS_TYPE_IS = 0x04,
+       TAPI_DATA_DS_TYPE_MMS = 0x05
+} TelDataDSType_t;
+
+typedef enum {
+       TAPI_DATA_REVA = 0x00,
+       TAPI_DATA_REV0 = 0x01
+} TelDataRevConfig_t;
+
+typedef enum {
+       TAPI_DATA_COMMERCIAL_NETWORK = 0x00,
+       TAPI_DATA_DOMESTIC_NETWORK = 0x01,
+       TAPI_DATA_RESERVED = 0x02
+} TelDataNAISettingMode_t;
+
+typedef enum {
+       TAPI_DATA_DDTM_MODE_OFF = 0x00,
+       TAPI_DATA_DDTM_MODE_ON = 0x01
+} TelDataDDTMStatus_t;
+
+typedef enum {
+       TAPI_DATA_DSWORKING_MODE_OFF = 0x00,
+       TAPI_DATA_DSWORKING_MODE_ON = 0x01
+} TelDataDSWorkingMode_t;
+
+typedef enum {
+       TAPI_DATA_PACKET_DATA_TYPE_QNC = 0x00,
+       TAPI_DATA_PACKET_DATA_TYPE_MIP = 0x01,
+       TAPI_DATA_PACKET_DATA_TYPE_CALL_TYPE = 0x02,
+       TAPI_DATA_PACKET_DATA_TYPE_PKT_ORIGIN_STRING = 0x03,
+       TAPI_DATA_PACKET_DATA_TYPE_PAP_USER_ID = 0x04,
+       TAPI_DATA_PACKET_DATA_TYPE_PAP_USER_PASSWORD = 0x05
+} TelDataPacketConfigType_t;
+
+typedef enum {
+       TAPI_DATA_QNC_DISABLE = 0x00,
+       TAPI_DATA_QNC_ENABLE = 0x01
+} TelDataQncType_t;
+
+typedef enum {
+       TAPI_DATA_MIP_SIMPLE_IP_ONLY = 0x00,
+       TAPI_DATA_MIP_IF_AVAIL = 0x01,
+       TAPI_DATA_MIP_ONLY = 0x02
+} TelDataMipType_t;
+
+typedef enum {
+       TAPI_DATA_CALL_TYPE_ONLY_MDR_SVC = 0x00,
+       TAPI_DATA_CALL_TYPE_MDR_SVC = 0x01,
+       TAPI_DATA_CALL_TYPE_ONLY_LSPD = 0x02,
+       TAPI_DATA_CALL_TYPE_HSPD = 0x02
+} TelDataPacketDataCallType_t;
+
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * This structure contains Data pin control information.
+ *
+ */
+typedef struct {
+       TelDataSignalType_t signaltype; /**<Signal Type*/
+       TelDataSignalStatus_t signalstatus; /**<Signal Status*/
+} TelDataPinControlInfo_t;
+
+typedef struct {
+       TelDataTE2Type_t type;
+       TelDataTE2CableStatus_t cable_status;
+} TelDataTE2Status_t;
+
+typedef struct {
+       unsigned int rx_curr_packet_bytes;
+       unsigned int tx_curr_packet_bytes;
+       unsigned long long rx_total_packet_bytes;
+       unsigned long long tx_total_packet_bytes;
+} TelDataPacketByteCounter_t;
+
+typedef struct {
+       unsigned int tx_bytes;
+       unsigned int rx_bytes;
+       unsigned char report_period;
+       unsigned char channel_num;
+       unsigned char tx_bar_level;
+       unsigned char rx_bar_level;
+} TelDataTE2DataRateInfo_t;
+
+typedef struct {
+       unsigned char usrNaiLength;
+       char usrNai[TAPI_DATA_MAX_USER_NAI_LEN + 1];
+       unsigned int mnHaSpi;
+       unsigned int mnAaaSpi;
+       unsigned char revTunPreference;
+       unsigned int homeAddress;
+       unsigned int primaryHaAddress;
+       unsigned int secondaryHaAddr;
+} TelDataMipNaiGenericInfoType_t;
+
+typedef struct {
+       unsigned char mnHaSharedSecretLength;
+       char mnHaSharedSecret[TAPI_DATA_MAX_SHARED_SECRET_LEN];
+       unsigned char mnAaaSharedSecretLength;
+       char mnAaaSharedSecret[TAPI_DATA_MAX_SHARED_SECRET_LEN];
+}TelDataMipNaiSsInfoType_t;
+
+typedef struct {
+       TelDataNAIIndex_t naiIndex;
+       unsigned short paramMask;
+       TelDataMipNaiGenericInfoType_t genericInfo; /** NAI Generic Information */
+       TelDataMipNaiSsInfoType_t ssInfo; /** <Shared Secret */
+}TelDataMipNaiParam_t;
+
+typedef struct {
+       TelDataQncType_t qnc;
+       TelDataMipType_t mip;
+       TelDataPacketDataCallType_t pkt_data_call_type;
+       char pkt_orig_str[TAPI_DATA_MAX_PKT_DATA_ORIGINSTRING_LEN+1];
+       char pap_user_id[TAPI_DATA_MAX_PAP_USER_ID_LEN+1];
+       char pap_password[TAPI_DATA_MAX_PAP_USER_PASSWORD_LEN+1];
+}TelDataPacketParam_t;
+
+typedef struct {
+       TelDataPacketConfigType_t type;
+       TelDataPacketParam_t param;
+}TelDataPacketDataCallConfig_t;
+
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_DATA_H
+/**
+ * @}
+ */
+
diff --git a/include/common/TelDefines.h b/include/common/TelDefines.h
new file mode 100644 (file)
index 0000000..72d639f
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @ingroup            TelephonyAPI
+ * @addtogroup COMMON_TAPI     COMMON
+ * @{
+ *
+ * @file TelDefines.h
+ * @brief  This file  provides #defines required for Telephony server and TAPI Client Library
+ */
+
+#ifndef _TEL_DEFINES_H_
+#define _TEL_DEFINES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+/* Machine independence */
+typedef long TS_INT32;
+typedef unsigned long TS_UINT32;
+
+typedef int TS_INT;
+typedef unsigned int TS_UINT;
+typedef double TS_DOUBLE;
+
+typedef int TS_BOOL;
+
+/* Programming concept */
+typedef unsigned char TS_BYTE;
+typedef unsigned short TS_WORD;
+typedef unsigned long TS_DWORD;
+typedef unsigned char TS_UINT8;
+typedef char TS_INT8;
+typedef unsigned short TS_UINT16;
+typedef unsigned long TS_ULONG;
+typedef unsigned long long TS_UINT64;
+typedef unsigned short TS_USHORT;
+
+#ifndef TRUE
+#define TRUE           1
+#endif
+
+#ifndef FALSE
+#define FALSE          0
+#endif
+
+#ifndef DEPRECATED
+#define DEPRECATED __attribute__((deprecated))
+#endif
+
+typedef int HObj;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_DEFINES_H_ */
+
+/**
+ *  @}
+ */
+
diff --git a/include/common/TelDisplay.h b/include/common/TelDisplay.h
new file mode 100644 (file)
index 0000000..8204e32
--- /dev/null
@@ -0,0 +1,224 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup         DISPLAY_TAPI    DISPLAY
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Get the Display Icon Information. @n
+ */
+
+#ifndef _TEL_DISPLAY_H_
+#define _TEL_DISPLAY_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#include <TelDefines.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN      13      /** Maximum number of bytes Home Zone Tag name */
+#define TAPI_MAX_DISP_ROAM_INFO_LEN                            49      /* Roaming location information Maximum length is 32 bytes, But, 49 bytes in Modem code*/
+#define TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN  64      /* Phone fatal error message length */
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * This defines the RSSI levels.
+ * In GSM, this field represent the radio signal strength in  dBm , but in the CDMA this field represents
+ * the number of the antenna bar as follows
+ */
+typedef enum {
+       TAPI_DISPLAY_RSSI_0 = 0x00,
+       TAPI_DISPLAY_RSSI_1 = 0x01,
+       TAPI_DISPLAY_RSSI_2 = 0x02,
+       TAPI_DISPLAY_RSSI_3 = 0x03,
+       TAPI_DISPLAY_RSSI_4 = 0x04,
+       TAPI_DISPLAY_RSSI_5 = 0x05,
+       TAPI_DISPLAY_RSSI_6 = 0x06
+} tapi_display_rssi_level_t;
+
+/**
+ * This enum defines the strength of the battery in levels
+ */
+typedef enum {
+       TAPI_POWER_PHONE_BATT_LEVEL0 = 0x00, /**< BLANK(Critical Low) */
+       TAPI_POWER_PHONE_BATT_LEVEL1 = 0x01, /**< bar1 */
+       TAPI_POWER_PHONE_BATT_LEVEL2 = 0x02, /**< bar2 */
+       TAPI_POWER_PHONE_BATT_LEVEL3 = 0x03, /**< bar3 */
+       TAPI_POWER_PHONE_BATT_LEVEL4 = 0x04, /**< bar4 */
+       TAPI_POWER_PHONE_BATT_LEVEL5 = 0x05, /**< bar5 */
+       TAPI_POWER_PHONE_BATT_LEVEL_INIT = 0x06 /**< init value */
+} tapi_phone_battery_level_t;
+
+/**
+ * Home Zone UI Icon Indiction Type
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_IND = 0x01, /**< Ind */
+       TAPI_DISPLAY_HMZ_O2_ZONE_INDI_CLEAR = 0x02 /**< Clear */
+} tapi_display_hmz_02_zone_ind_t;
+
+/**
+ * Home Zone Type
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_HOME = 0x01, /**< Home Zone */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TYPE_CITY = 0x02 /**< City Zone */
+} tapi_display_hmz_02_zone_type_t;
+
+/**
+ * ZONE_TAG_PRESENT
+ */
+typedef enum {
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_PRESENT = 0x01, /**< Present */
+       TAPI_DISPLAY_HMZ_O2_ZONE_TAG_ABSENT = 0x02 /**< Absent */
+} tapi_display_hmz_02_zone_tag_t;
+
+/**
+ * This enumeration is used to identify what icon info the client is interested in..
+ */
+typedef enum {
+       TAPI_DISPLAY_GET_ICON_RSSI = 0x01, /**< Signal Strength */
+       TAPI_DISPLAY_GET_ICON_BATT = 0x02, /**< Battery Level */
+       TAPI_DISPLAY_GET_ICON_HDR_RSSI = 0x04, /**< HDR(High Data Rate RSSI - CDMA */
+       TAPI_DISPLAY_GET_ICON_ALL = 0xFF /**< All Values Request */
+} tapi_display_get_icon_req_type_t;
+
+/**
+ * roam info Control Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_ROAM_INDI_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_ROAM_TEXT_OFF = 0x01, /**< Roam Text Off */
+       TAPI_DISPLAY_ROAM_TEXT_ON = 0x02 /**< Roam Text On */
+} tapi_display_roam_control_ind_t;
+
+/**
+ * roam info data roam guard Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_DATA_ROAM_GUARD_NONE = 0x00, /**< None */
+       TAPI_DISPLAY_DATA_ROAM_GUARD_OFF = 0x01, /**< Data Roam Guard Off */
+       TAPI_DISPLAY_DATA_ROAM_GUARD_ON = 0x02 /**< Data Roam Guard On */
+} tapi_display_data_roam_guard_ind_t;
+
+/**
+ * roam info data roam guard Indication Type
+ */
+typedef enum {
+       TAPI_DISPLAY_USER_IND_NORMAL_MODE = 0x01, /**< Normal Mode */
+       TAPI_DISPLAY_USER_IND_INITIAL_PROGRAMMING = 0x02, /**< Initial Programming needed */
+       TAPI_DISPLAY_USER_IND_MAINTENANCE_REQUIRED = 0x03, /**< Maintenance Required */
+       TAPI_DISPLAY_USER_IND_AUTHENTICATION_REQUIRED = 0x04 /**< Authentication Required */
+} tapi_display_user_ind_message_t;
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * This structure defines the display icon information
+ */
+typedef struct {
+       tapi_display_rssi_level_t rssi; /**< RSSI Levels */
+       tapi_display_rssi_level_t hdrRssi; /**< HDR(High Data Rate) RSSI Levels -CDMA */
+       tapi_phone_battery_level_t batt; /**< Battery Level */
+} tapi_display_icon_info_t;
+
+/**
+ * HomeZone Information Notification Message
+ *
+ * This service specifies the implementation of o2 DE's HomeZone Indication (HZI) service
+ * in 3G or 2G handsets. The HZI service consists of displaying a text and, optionally depending
+ * on the zone, an icon in the handset (UE) when the UE is located within a zone which is defined
+ * individually for each customer. The zone is defined by a set of cells, i. e. for each cell the
+ * indication is either displayed or not. If the display of a MS is too small to display the complete
+ * operator name together with the complete tag, it will be allowed to display the operator
+ * name and the HomeZone/CityZone-tag in the same line ('o2 - de city' or 'o2 - de home').
+ *
+ * Reference O2 Home Zone spec.
+ */
+typedef struct {
+       tapi_display_hmz_02_zone_ind_t ind;
+       tapi_display_hmz_02_zone_type_t type;
+       tapi_display_hmz_02_zone_tag_t tag_presnet;
+
+       /**
+        * The coding is 12-character string coded in the short message alphabet given
+        * In GSM 03.38 with bit 8 set to zero. Default FF. FF indicates no display.
+        * If ZONE_TAG_PRESENT, then this is 13 bytes.
+        * If ZONE_TAG_ABSENT, then this is zero byte.
+        */
+       unsigned char tag_name[TAPI_MAX_DISP_O2_HOMEZONE_TAG_LEN];
+} tapi_display_hmz_o2_ind_t;
+
+/**
+ * Notify the TS of the occurrence of the phone fatal in the phone
+ */
+typedef struct {
+       unsigned char Msg_len;
+       unsigned char Message[TAPI_MAX_DISP_PHONE_FATAL_ERR_MSG_LEN];
+} tapi_display_phone_fatal_info_noti_t;
+
+/**
+ * Notify the TS of the occurrence of the ext roam info in the phone
+ */
+typedef struct {
+       tapi_display_roam_control_ind_t control;
+       tapi_display_data_roam_guard_ind_t data_roam_guard;
+       unsigned char txt_len;
+       unsigned char text[TAPI_MAX_DISP_ROAM_INFO_LEN];
+} tapi_display_ext_roam_info_noti_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_DISPLAY_H_ */
+
+/**
+ *  @}
+ */
+
diff --git a/include/common/TelErr.h b/include/common/TelErr.h
new file mode 100644 (file)
index 0000000..3424db2
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup                    TelephonyAPI
+ * @addtogroup         COMMON_TAPI     COMMON
+ * @{
+ *     These error codes are used by Applications.
+ */
+
+
+#ifndef _TEL_ERR_H_
+#define _TEL_ERR_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/************************************************************
+**    Errors defined in  "+CME ERROR" ,
+**    - see 3GPP TS 27.007
+**    - ranges are 0x00 ~ 0x7FFF
+************************************************************/
+/**
+       Error codes sent by the modem in response to the above operations.
+*/
+typedef enum
+{
+  /* GENERAL ERRORS */
+  TAPI_OP_GEN_ERR_PHONE_FAILURE        = 0,                                            /* 0 */
+  TAPI_OP_GEN_ERR_NO_CONNECTION_TO_PHONE,                                      /* 1 */
+  TAPI_OP_GEN_ERR_PHONE_ADAPTOR_LINK_RESERVED,                 /* 2 */
+  TAPI_OP_GEN_ERR_OPER_NOT_ALLOWED,                                            /* 3 */
+  TAPI_OP_GEN_ERR_OPER_NOT_SUPPORTED,                                          /* 4 */
+  TAPI_OP_GEN_ERR_PH_SIM_PIN_REQU,                                             /* 5 */
+  TAPI_OP_GEN_ERR_PH_FSIM_PIN_REQU,                                            /* 6 */
+  TAPI_OP_GEN_ERR_PH_FSIM_PUK_REQU,                                            /* 7 */
+  TAPI_OP_GEN_ERR_SIM_NOT_INSERTED     =10,                                    /* 10 */
+  TAPI_OP_GEN_ERR_SIM_PIN_REQU,                                                        /* 11 */
+  TAPI_OP_GEN_ERR_SIM_PUK_REQU,                                                        /* 12 */
+  TAPI_OP_GEN_ERR_SIM_FAILURE,                                                 /* 13 */
+  TAPI_OP_GEN_ERR_SIM_BUSY,                                                            /* 14 */
+  TAPI_OP_GEN_ERR_SIM_WRONG,                                                           /* 15 */
+  TAPI_OP_GEN_ERR_INCORRECT_PW,                                                        /* 16 */
+  TAPI_OP_GEN_ERR_SIM_PIN2_REQU,                                                       /* 17 */
+  TAPI_OP_GEN_ERR_SIM_PUK2_REQU,                                                       /* 18 */
+  TAPI_OP_GEN_ERR_MEM_FULL     = 20,                                                   /* 20 */
+  TAPI_OP_GEN_ERR_INVALID_INDEX,                                                       /* 21 */
+  TAPI_OP_GEN_ERR_NOT_FOUND,                                                           /* 22 */
+  TAPI_OP_GEN_ERR_MEM_FAILURE,                                                 /* 23 */
+  TAPI_OP_GEN_ERR_TEXT_STR_TOO_LONG,                                           /* 24 */
+  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_TEXT_STR,                      /* 25 */
+  TAPI_OP_GEN_ERR_DIAL_STR_TOO_LONG,                                           /* 26 */
+  TAPI_OP_GEN_ERR_INVALID_CHARACTERS_IN_DIAL_STR,                      /* 27 */
+  TAPI_OP_GEN_ERR_NO_NET_SVC   = 30,                                           /* 30 */
+  TAPI_OP_GEN_ERR_NET_TIMEOUT,                                                 /* 31 */
+  TAPI_OP_GEN_ERR_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY,        /* 32 */
+  TAPI_OP_GEN_ERR_NET_PERS_PIN_REQU    = 40,                                   /* 40 */
+  TAPI_OP_GEN_ERR_NET_PERS_PUK_REQU,                                           /* 41 */
+  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PIN_REQU,                            /* 42 */
+  TAPI_OP_GEN_ERR_NET_SUBSET_PERS_PUK_REQU,                            /* 43 */
+  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PIN_REQU,                          /* 44 */
+  TAPI_OP_GEN_ERR_SVC_PROVIDER_PERS_PUK_REQU,                          /* 45 */
+  TAPI_OP_GEN_ERR_CORPORATE_PERS_PIN_REQU,                             /* 46 */
+  TAPI_OP_GEN_ERR_CORPORATE_PERS_PUK_REQU,                             /* 47 */
+  TAPI_OP_GEN_ERR_HIDDEN_KEY_REQU,                                             /* 48 */
+  TAPI_OP_GEN_ERR_UNKNOWN      = 100,                                          /* 100 */
+
+  /* Errors related to a failure to perform an Attach */
+  TAPI_OP_GEN_ERR_ILLEGAL_MS   = 103,                                  /* 103 */
+  TAPI_OP_GEN_ERR_ILLEGAL_ME   = 106,                                  /* 106 */
+  TAPI_OP_GEN_ERR_GPRS_SVC_NOT_ALLOWED,                                        /* 107 */
+  TAPI_OP_GEN_ERR_PLMN_NOT_ALLOWED     = 111,                          /* 111 */
+  TAPI_OP_GEN_ERR_LOCATION_AREA_NOT_ALLOWED,                           /* 112 */
+  TAPI_OP_GEN_ERR_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA,/* 113 */
+
+  /* Errors related to a failure to Activate a Context */
+  TAPI_OP_GEN_ERR_SVC_OPT_NOT_SUPPORTED        = 132,                  /* 132 */
+  TAPI_OP_GEN_ERR_REQ_SVC_OPT_NOT_SUBSCRIBED,                          /* 133 */
+  TAPI_OP_GEN_ERR_SVC_OPT_TEMPORARILY_OUT_OF_ORDER,            /* 134 */
+  TAPI_OP_GEN_ERR_UNSPECIFIED_GPRS_ERR = 148,                  /* 148 */
+  TAPI_OP_GEN_ERR_PDP_AUTHENTICATION_FAILURE,                          /* 149 */
+  TAPI_OP_GEN_ERR_INVALID_MOBILE_CLASS,                                        /* 150 */
+
+  /* VBS / VGCS and eMLPP -related errors */
+  TAPI_OP_GEN_ERR_VBS_VGCS_NOT_SUPPORTED_BY_THE_NET    = 151,  /* 151 */
+  TAPI_OP_GEN_ERR_NO_SVC_SUBSCRIPTION_ON_SIM,                          /* 152 */
+  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_GROUP_ID,                        /* 153 */
+  TAPI_OP_GEN_ERR_GROUP_ID_NOT_ACTIVATED_ON_SIM,                       /* 154 */
+  TAPI_OP_GEN_ERR_NO_MATCHING_NOTI     = 155,                          /* 155 */
+  TAPI_OP_GEN_ERR_VBS_VGCS_CALL_ALREADY_PRESENT,                       /* 156 */
+  TAPI_OP_GEN_ERR_CONGESTION,                                                          /* 157 */
+  TAPI_OP_GEN_ERR_NET_FAILURE,                                                 /* 158 */
+  TAPI_OP_GEN_ERR_UPLINK_BUSY,                                                 /* 159 */
+  TAPI_OP_GEN_ERR_NO_ACCESS_RIGHTS_FOR_SIM_FILE        = 160,  /* 160 */
+  TAPI_OP_GEN_ERR_NO_SUBSCRIPTION_FOR_PRIORITY,                        /* 161 */
+  TAPI_OP_GEN_ERR_OPER_NOT_APPLICABLE_OR_NOT_POSSIBLE, /* 162 */
+
+
+  TAPI_OP_GEN_ERR_NONE = 0x8000,                               /* 0x8000 : No Errors */
+
+  /* General Common Errors : 0x8000 - 0x80FF */
+  TAPI_OP_GEN_ERR_INVALID_IPC,                                                 /* 0x8001 : Invalid IPC_GSM Parameter or Format */
+  TAPI_OP_GEN_ERR_PHONE_OFFLINE,                                                       /* 0x8002 : */
+  TAPI_OP_GEN_ERR_CMD_NOT_ALLOWED,                                             /* 0x8003 : */
+  TAPI_OP_GEN_ERR_PHONE_IS_INUSE,                                                      /* 0x8004 : */
+  TAPI_OP_GEN_ERR_INVALID_STATE        = 0x8005,                                       /* 0x8005 : */
+
+  TAPI_OP_GEN_ERR_NO_BUFFER,                                                           /* 0x8006 :  No internal free buffers */
+  TAPI_OP_GEN_ERR_OPER_REJ,                                                            /* 0x8007 :  Operation Rejected */
+  TAPI_OP_GEN_ERR_INSUFFICIENT_RESOURCE,                                       /* 0x8008 : insufficient resource */
+  TAPI_OP_GEN_ERR_NET_NOT_RESPOND,                                             /* 0x8009 : Network not responding */
+  TAPI_OP_GEN_ERR_SIM_PIN_ENABLE_REQ   = 0x800A,                       /* 0x800A : SIM Pin Enable Required */
+  TAPI_OP_GEN_ERR_SIM_PERM_BLOCKED,                                    /* 0x800B : SIM Permanent Blocked */
+  TAPI_OP_GEN_ERR_SIM_PHONEBOOK_RESTRICTED,                            /*0x800C: SIM Phonebook Restricted*/
+  TAPI_OP_GEM_ERR_FIXED_DIALING_NUMBER_ONLY,                           /*0x800D: Restricted By FDN Mode */
+
+  /* Reserved : 0x800E ~ 0x80FF */
+  TAPI_OP_GEN_ERR_800E_RESERVED_START  = 0x800E,                       /* 0x800E */
+
+  TAPI_OP_GEN_ERR_80FF_RESERVED_END    = 0x80ff,                               /* 0x80FF */
+
+  /* the other errors */
+  TAPI_OP_GEN_ERR_OTHERS                               = 0xFFFE,                                 /* 0xFFFE */
+
+  TAPI_OP_GEN_ERR_MAX                                  = 0xFFFF
+
+}tapi_phone_err_t;
+
+typedef enum {
+       TAPI_PDP_FAILURE_CAUSE_NORMAL                                           = 0x00,           // 0x00 : Normal Process ( no problem )
+       TAPI_PDP_FAILURE_CAUSE_REL_BY_USER                                      = 0x01,           // Call Released by User
+       TAPI_PDP_FAILURE_CAUSE_REGULAR_DEACTIVATION                     = 0x02,           // Regular de-activation
+       TAPI_PDP_FAILURE_CAUSE_LLC_SNDCP                                        = 0x03,           // LLC SNDCP failure
+       TAPI_PDP_FAILURE_CAUSE_INSUFFICIENT_RESOURCE            = 0x04,           // Insufficient resources
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_APN                                      = 0x05,           // Missing or unknown APN
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS                      = 0x06,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_USER_AUTH_FAILED                         = 0x07,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_GGSN                                     = 0x08,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED                      = 0x09,           // Unknown PDP address or type
+       TAPI_PDP_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED         = 0x0A,           // Service option not supported
+       TAPI_PDP_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                       = 0x0B,           // Requested service option not subscribed
+       TAPI_PDP_FAILURE_CAUSE_SVC_OPT_OUT_ORDER                        = 0x0C,           // Service out of order
+    TAPI_PDP_FAILURE_CAUSE_NSAPI_USED                                  = 0x0D,           // NSAPI already used
+       TAPI_PDP_FAILURE_CAUSE_QOS_NOT_ACCEPTED                         = 0x0E,           // QoS not accepted
+       TAPI_PDP_FAILURE_CAUSE_NETWORK_FAILURE                          = 0x0F,           // Network Failure
+    TAPI_PDP_FAILURE_CAUSE_REACT_REQUIRED                              = 0x10,           // Reactivation Required
+       TAPI_PDP_FAILURE_CAUSE_FEATURE_NOT_SUPPORTED            = 0x11,           // Feature not supported
+       TAPI_PDP_FAILURE_CAUSE_TFT_FILTER_ERROR                         = 0x12,           // TFT or filter error
+       TAPI_PDP_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                       = 0x13,           // Unknown PDP context
+       TAPI_PDP_FAILURE_CAUSE_INVALID_MSG                                      = 0x14,           // Invalid MSG
+       TAPI_PDP_FAILURE_CAUSE_PROTOCOL_ERROR                           = 0x15,           // Protocol error
+       TAPI_PDP_FAILURE_CAUSE_MOBILE_FAILURE_ERROR                     = 0x16,           // Mobile failure error
+       TAPI_PDP_FAILURE_CAUSE_TIMEOUT_ERROR                            = 0x17,           // Timeout error
+       TAPI_PDP_FAILURE_CAUSE_UNKNOWN_ERROR                            = 0x18,           // Unknown error
+       TAPI_PDP_FAILURE_CAUSE_MAX ,
+} tapi_pdp_err_t;
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_ERR_H_
+
+/**
+* @}
+*/
+
diff --git a/include/common/TelMisc.h b/include/common/TelMisc.h
new file mode 100644 (file)
index 0000000..b8d4651
--- /dev/null
@@ -0,0 +1,371 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup MISC_TAPI       MISC
+ * @{
+ *
+ * @file TelMisc.h
+
+ @brief This file serves as a "C" header file defines structures for Tapi Misc Services. \n
+ It contains a sample set of constants, enums, structs that would be required by applications.
+
+ */
+
+#ifndef _TEL_MISC_H_
+#define _TEL_MISC_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#include <sys/time.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+#define MAX_VERSION_LEN        32    /**< Maximum version length *///sw version, hw version, rf cal date, me sn
+#define FUS_DUMMY_DATA_SIZE 2     /**< Data Size*/
+
+#define        MMICHECK_CALL_RELEASE_NOTI      "User.LauncherUi.RequestTermination"
+#define        MMICHECK_END_ALL_NOTI           "User.LauncherUi.RequestTermination"
+#define        MMICHECK_DIALER_KEY_NOTI        "User.LauncherUi.DialerKeyInsert"
+#define        MMICHECK_ACTIVITY_VIEW_NOTI     "User.MMICheck.ActivityView.ChangeStatus"
+
+#define TAPI_MISC_ME_SN_LEN_MAX                                32
+#define TAPI_MISC_PRODUCT_CODE_LEN_MAX         32
+#define TAPI_MISC_MODEL_ID_LEN_MAX                     17
+#define TAPI_MISC_PRL_ERI_VER_LEN_MAX          17
+
+#define TAPI_MISC_MCC_LEN_MAX                          3
+#define TAPI_MISC_MNC_LEN_MAX                          2
+#define TAPI_MISC_MIN_LEN_MAX                          10
+#define TAPI_MISC_MDN_LEN_MAX                          15
+#define TAPI_MISC_NAME_LEN_MAX                         17
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * @enum TelMiscApplicationKey_t
+ * This enumeration defines mmi check key values
+ */
+typedef enum {
+       MMI_CHECK_DIAL_STAR             =       0x2A,   //      20 00 2A AF 4B 7E
+       MMI_CHECK_DIAL_SHARP    =       0x23,   //      20 00 23 6E D6 7E
+       MMI_CHECK_DIAL_0                =       0x30,   //      20 00 30 74 F4 7E
+       MMI_CHECK_DIAL_1,                                       //      20 00 31 FD E5 7E
+       MMI_CHECK_DIAL_2,                                       //      20 00 32 66 D7 7E
+       MMI_CHECK_DIAL_3,                                       //      20 00 33 EF C6 7E
+       MMI_CHECK_DIAL_4,                                       //      20 00 34 50 B2 7E
+       MMI_CHECK_DIAL_5,                                       //      20 00 35 D9 A3 7E
+       MMI_CHECK_DIAL_6,                                       //      20 00 36 42 91 7E
+       MMI_CHECK_DIAL_7,                                       //      20 00 37 CB 80 7E
+       MMI_CHECK_DIAL_8,                                       //      20 00 38 3C 78 7E
+       MMI_CHECK_DIAL_9,                                       //      20 00 39 B5 69 7E
+
+       MMI_CHECK_END_ALL               =       0x41,   //
+
+       MMI_CHECK_CALL                  =       0x50,   //      20 00 50 72 97 7E
+       MMI_CHECK_END                   =       0x51,   //      20 00 51 FB 86 7E
+       MMI_CHECK_CANCEL                =       0x52,   //      20 00 52 60 B4 7E
+       MMI_CHECK_RIGHT                 =       0x53,   //      20 00 5C 1E 5D 7E
+       MMI_CHECK_SIDE_UP               =       0x54,   //      20 00 54 56 D1 7E
+       MMI_CHECK_SIDE_DOWN             =       0x55,   //      20 00 55 DF C0 7E
+
+       MMI_CHECK_LEFT                  =       0x5B,   //      20 00 5B A1 29 7E
+       MMI_CHECK_ARROW_UP              =       0x63,   //      20 00 63 6A 94 7E
+       MMI_CHECK_ARROW_DOWN    =       0x64,   //      20 00 64 D5 E0 7E
+       MMI_CHECK_ARROW_LEFT    =       0x65,   //      20 00 65 5C F1 7E
+       MMI_CHECK_ARROW_RIGHT   =       0x66,   //      20 00 66 C7 C3 7E
+
+       MMI_CHECK_WAP                   =       0x8C,   //      20 00 53 E9 A5 7E
+       MMI_CHECK_CAMERA                =       0x8D,   //      20 01 8D C2 83 7E
+       MMI_CHECK_MP3                   =       0xDD,   //      20 00 DD 9F C8 7E
+       MMI_CHECK_POWER                 =       0x95,   //      20 00 95 D3 06 7E
+       MMI_CHECK_LONG_PRESS    =       0xFF
+} TelMiscMMICHECK_t;
+
+/**
+ * @enum TelMiscApplicationKey_t
+ * This enumeration defines application key type
+ */
+typedef enum {
+       KEY_EXT_DIAL_0 = 0,
+       KEY_EXT_DIAL_1,
+       KEY_EXT_DIAL_2,
+       KEY_EXT_DIAL_3,
+       KEY_EXT_DIAL_4,
+       KEY_EXT_DIAL_5,
+       KEY_EXT_DIAL_6,
+       KEY_EXT_DIAL_7,
+       KEY_EXT_DIAL_8,
+       KEY_EXT_DIAL_9,
+       KEY_EXT_DIAL_STAR,      // 10 : *
+       KEY_EXT_DIAL_SHARP,     // 11 : #
+
+       KEY_EXT_DIAL_BACK,      // 12 : <- (backkey)
+       KEY_EXT_DIAL_HIDE,      // 13 :�� (hidekey)
+       KEY_EXT_DIAL_P,         // 14 : p
+       KEY_EXT_DIAL_PLUS,      // 15 : +
+       KEY_EXT_DIAL_MUTE,      // 16 : mute
+
+       KEY_EXT_DIAL_CALL                       =       100,            // 100 : BTN1 (call)
+       KEY_EXT_DIAL_MESSAGE,                                           // 101 : BTN2 (message)
+       KEY_EXT_DIAL_VIDEO_CALL,                                        // 102 : BTN3 (video call)
+       KEY_EXT_DIAL_SAVE,                                                      // 103 : BTN4 (save)
+       KEY_EXT_DIAL_CALL_END,                                          // noti publish
+       KEY_EXT_TERMINATE_ALL,
+
+       KEY_EXT_PAGEDOWN                        =       114,            // Volume down
+       KEY_EXT_PAGEUP                          =       115,            // Volume up
+       KEY_EXT_POWER                           =       116,            // Power short
+       KEY_EXT_PEOPLE_VIEW                     =       132,            // People view
+       KEY_EXT_TIMELINE                        =       169,            // Lifedrive
+       KEY_EXT_PREPARE_CAMERA          =       171,            // Prepare Camera
+       KEY_EXT_ACTIVITY_VIEW           =       174,            // Activity view
+       KEY_EXT_CAMERA                          =       212,            // Camera
+       KEY_EXT_SEARCH                          =       217,            // Phone Search
+       KEY_EXT_POWER_LONG                      =       356,            // Power off
+
+       KEY_EXT_INVALID_KEY                     =       500
+} TelMiscApplicationKey_t;
+
+/**
+ * @enum TelMiscDiagTouchEventType_t
+ * This enumeration defines the touch event type
+ */
+typedef enum {
+       TAPI_DIAG_TOUCH_CLICK_DOWN = 0x000F, /**< 0x0F00: Click Down */
+       TAPI_DIAG_TOUCH_MOVE = 0x0010, /**< 0x1000: Move  */
+       TAPI_DIAG_TOUCH_CLICK_UP = 0x0011, /**< 0x1100: Click Up */
+       TAPI_DIAG_TOUCH_HOLD = 0x0012 /**< 0x1200: Hold */
+} TelMiscDiagTouchEventType_t;
+
+/**
+ * @enum  TelMiscAlarmMode_t
+ * Enum type for Validity of the Alarm booting
+ */
+typedef enum {
+       TAPI_MISC_ALARMBOOT_INACTIVATE, /**< 0x00: Inactivated */
+       TAPI_MISC_ALARMBOOT_ACTIVATE /**< 0x00: Activated */
+} TelMiscAlarmMode_t;
+
+typedef enum {
+       TAPI_MISC_ME_IMEI = 0x00, /**< 0x00: IMEI, GSM/UMTS device */
+       TAPI_MISC_ME_ESN = 0x01, /**< 0x01: ESN(Electronic Serial Number), It`s essentially run out. CDMA device */
+       TAPI_MISC_ME_MEID = 0x02, /**< 0x02: MEID, This value can have hexa decimal digits. CDMA device */
+       TAPI_MISC_ME_MAX = 0xff /**< 0xff: reserved */
+} TelMiscSNIndexType_t;
+
+/**
+ * NAM Information MASK fiel
+ */
+typedef enum {
+       TAPI_MISC_NAM_INFO_MASK_TOTAL                   = 0x0001,
+       TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX   = 0x0002,
+       TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX   = 0x0004,
+       TAPI_MISC_NAM_INFO_MASK_AUTONAM         = 0x0008,
+       TAPI_MISC_NAM_INFO_MASK_MCC                     = 0x0010,
+       TAPI_MISC_NAM_INFO_MASK_MNC                     = 0x0020,
+       TAPI_MISC_NAM_INFO_MASK_MIN                     = 0x0040,
+       TAPI_MISC_NAM_INFO_MASK_MDN                     = 0x0080,
+       TAPI_MISC_NAM_INFO_MASK_NAM_NAME                = 0x0100,
+       TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE              = 0x0200,
+       TAPI_MISC_NAM_INFO_MASK_NAM_NUM         = 0x0400,
+       TAPI_MISC_NAM_INFO_MASK_ALL                     = 0x8000
+} TelMiscNamInfoMaskType_t;
+
+/**
+ * NAMIndex Field
+ */
+typedef enum {
+       TAPI_MISC_NAM_1 = 0x00,
+       TAPI_MISC_NAM_2,
+       TAPI_MISC_NAM_3,
+       TAPI_MISC_NAM_4,
+       TAPI_MISC_NAM_5
+} TelMiscNamIndex_t;
+
+
+/**
+ * @enum  tapi_misc_nitz_dayofweek_t
+ * Enum type for day of week
+ */
+typedef enum {
+       TAPI_MISC_NITZ_DOW_SUN = 0x00, /**< Sunday */
+       TAPI_MISC_NITZ_DOW_MON = 0x01, /**< Monday */
+       TAPI_MISC_NITZ_DOW_TUE = 0x02, /**< Tuesday */
+       TAPI_MISC_NITZ_DOW_WED = 0x03, /**< Wednesday */
+       TAPI_MISC_NITZ_DOW_THU = 0x04, /**< Thursday */
+       TAPI_MISC_NITZ_DOW_FRI = 0X05, /**< Friday */
+       TAPI_MISC_NITZ_DOW_SAT = 0x06  /**< Saturday */
+} tapi_misc_nitz_dayofweek_t;
+
+/**
+ * @enum  tapi_misc_nitz_daylight_t
+ * Enum type for daylight
+ */
+typedef enum {
+       TAPI_MISC_NITZ_NOADJUST = 0x00, /**< No daylight adjustment */
+       TAPI_MISC_NITZ_ONE_HR = 0x01, /**< One hour */
+       TAPI_MISC_NITZ_TW0_HR = 0x02  /**< two hours */
+} tapi_misc_nitz_daylight_t;
+
+/**
+ * @enum  tapi_misc_nitz_timeinfo_t
+ * Enum type for types of data
+ */
+typedef enum {
+       TAPI_MISC_NITZ_INVALID                  = 0x00, /**< Invalid */
+       TAPI_MISC_NITZ_TIMEINFO_NW_CDMA = 0x01, /**< Time info network */
+       TAPI_MISC_NITZ_TIMEINFO_NW_GSM  = 0x02, /**< Time info network */
+       TAPI_MISC_NITZ_RTC_INFO_LINE    = 0x03, /**< RTC Info line */
+       TAPI_MISC_NITZ_RTC_BKUP_PHONE   = 0x04, /**< RTC Backup phone */
+       TAPI_MISC_NITZ_NO_TIME_INFO     = 0x05  /**< No time info */
+} tapi_misc_nitz_timeinfo_t;
+
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * Mobile Equipment Version Information
+ */
+typedef struct {
+       unsigned char ver_mask; /**< version mask  - 0x01:SW_ver, 0x02:HW_ver, 0x04:RF_CAL_date, 0x08:Product_code, 0x10:Model_ID, 0x20:PRL, 0x04:ERI, 0xff:all */
+       unsigned char szSwVersion[MAX_VERSION_LEN]; /**< Software version, null termination */
+       unsigned char szHwVersion[MAX_VERSION_LEN]; /**< Hardware version, null termination */
+       unsigned char szRfCalDate[MAX_VERSION_LEN]; /**< Calculation Date, null termination */
+       unsigned char szProductCode[TAPI_MISC_PRODUCT_CODE_LEN_MAX]; /**< product code, null termination */
+       unsigned char szModelId[TAPI_MISC_MODEL_ID_LEN_MAX]; /**< model id (only for CDMA), null termination */
+       unsigned char prl_nam_num; /**< number of PRL NAM fields */
+       unsigned char szPrlVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< prl version (only for CDMA), null termination */
+       unsigned char eri_nam_num; /**< number of PRL NAM fields */
+       unsigned char szEriVersion[TAPI_MISC_PRL_ERI_VER_LEN_MAX * 3];/**< eri version (only for CDMA), null termination */
+} TelMiscVersionInformation;
+
+/**
+ * Mobile Equipment Serial Number Information
+ */
+typedef struct {
+       TelMiscSNIndexType_t sn_index; /**< serial number index */
+       int sn_len; /**< Length */
+       unsigned char szNumber[TAPI_MISC_ME_SN_LEN_MAX]; /**< Number */
+} TelMiscSNInformation;
+
+/**
+ * Event delivery - event type
+ */
+typedef struct {
+       struct timeval time; /**< Time information */
+       unsigned short type; /**< Type of event */
+       unsigned short code; /**< Code */
+       long value; /**< Value */
+} input_event_t;
+
+/**
+ * Diagnostic Key Code Information
+ */
+typedef struct {
+       unsigned char keycode; /**< Key Code */
+       unsigned char keyhold; /**< Key Hold */
+} TelMiscDiagKeyCodeInfomation;
+
+/**
+ * Struct for alarm info
+ */
+typedef struct {
+       unsigned char year; /**< year */
+       unsigned char month; /**< month */
+       unsigned char day; /**< day */
+       unsigned char hour; /**< hour */
+       unsigned char minute; /**< minute */
+       unsigned char second; /**< second */
+       unsigned char time_zone; /**< time zone */
+       tapi_misc_nitz_dayofweek_t day_of_week; /**< day of week */
+} TelMiscAlarmInfo_t;
+
+/**
+ * Struct for alarm response
+ */
+typedef struct {
+       TelMiscAlarmMode_t validity; /**< validity */
+       TelMiscAlarmInfo_t alarm_info; /**< alarm info */
+} TelMiscAlarmStatus_t;
+
+/**
+ * @struct  TelMiscNamInfo_t
+ * struct type for nam info
+ */
+typedef struct {
+       unsigned short nam_info_mask;
+       unsigned char nam_total; // this field is not used in case of nam set req.
+       unsigned char nam_current_index;
+       unsigned char nam_req_index;
+       unsigned char nam_auto;
+       unsigned char nam_mcc[TAPI_MISC_MCC_LEN_MAX+1];
+       unsigned char nam_mnc[TAPI_MISC_MCC_LEN_MAX+1];
+       unsigned char nam_min[TAPI_MISC_MIN_LEN_MAX+1];
+       unsigned char nam_mdn[TAPI_MISC_MDN_LEN_MAX+1];
+       unsigned char nam_name[TAPI_MISC_NAME_LEN_MAX+1];
+} TelMiscNamInfo_t;
+
+/**
+ * Struct for time info
+ */
+typedef struct {
+       tapi_misc_nitz_timeinfo_t time_zone_valid; /**< time zone */
+       int bDaylight_valid; /**< day light */
+       unsigned char year; /**< year */
+       unsigned char month; /**< month */
+       unsigned char day; /**< day */
+       unsigned char hour; /**< hour */
+       unsigned char minute; /**< minute */
+       unsigned char second; /**< second */
+       unsigned char time_zone; /**< time zone */
+       tapi_misc_nitz_daylight_t daylight_adjust; /**< day light adjust */
+       tapi_misc_nitz_dayofweek_t day_of_week; /**< day of week */
+       unsigned long plmn; /**< day of week */
+} tapi_misc_time_zone_info_type;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_MISC_H_
+/**
+ *  @}
+ */
+
diff --git a/include/common/TelNetText.h b/include/common/TelNetText.h
new file mode 100644 (file)
index 0000000..2798f2b
--- /dev/null
@@ -0,0 +1,775 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  NetText_TAPI    NetText(SMS)
+* @{
+*
+* @file TelNetText.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi Network Text Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+
+ */
+#ifndef _TEL_NETTEXT_H_
+#define _TEL_NETTEXT_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSim.h>
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+/* NetText */
+#define TAPI_NETTEXT_MSG_SIZE_MAX              918 /**< Maximum Message Size */
+#define TAPI_NETTEXT_CB_SIZE_MAX                       93 /** Maximum CB Message Size */
+#define TAPI_NETTEXT_ADDRESS_LEN_MAX   20 /* Nettext Address Length */
+#define TAPI_NETTEXT_SCADDRESS_LEN_MAX 18 /* SC Address Length */
+
+#define TAPI_NETTEXT_CB_PAGE_SIZE_MAX                           93    /**< CB maximum page size*/
+#define TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX                 90    /**< Maximum GSM SMS message number*/
+#define TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX      50    /**< Maximum GSM SMS CBMI list size*/
+#define TAPI_NETTEXT_SMDATA_SIZE_MAX                           165  /**< Maximum SMS data size that can be stored*/
+#define TAPI_NETTEXT_MAX_SMS_SERVICE_CENTER_ADDR   12    /**<Maximum SMS service center address*/
+#define TAPI_NETTEXT_MAX_INDEX                                        255 /**< Maximum index value for SMS */
+
+#define TAPI_NETTEXT_SMSP_PARAMS_MAX_LEN               28
+
+// ************************  CDMA Features  **************************//
+#define TAPI_NETTEXT_PARAM_TELESERVICE_MASK                    1 << 0                          /**< Teleservice parameter bit position */
+#define TAPI_NETTEXT_PARAM_SERVICE_CATEGORY_MASK               1 << 1                          /**< Service Category parameter bit position */
+#define TAPI_NETTEXT_PARAM_ADDRESS_MASK                                1 << 2                          /**< Address parameter bit position */
+#define TAPI_NETTEXT_PARAM_SUBADDRESS_MASK                     1 << 3                          /**< Subaddress parameter bit position */
+#define TAPI_NETTEXT_PARAM_BEARER_REPLY_MASK                   1 << 4                          /**< Bearer reply parameter bit position */
+#define TAPI_NETTEXT_PARAM_CAUSE_CODES_MASK                    1 << 5                          /**< Cause Code parameter bit position */
+#define TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK                     1 << 6                          /**< Message ID parameter bit position */
+#define TAPI_NETTEXT_PARAM_USER_DATA_MASK                      1 << 7                          /**< User Data parameter bit position */
+#define TAPI_NETTEXT_PARAM_USER_RESPONSE_CODE_MASK             1 << 8                          /**< User Response Code parameter bit position */
+#define TAPI_NETTEXT_PARAM_MC_TIME_STAMP_MASK                  1 << 9                          /**< Message Center Timestamp parameter bit position */
+#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_ABS_MASK            1 << 10                         /**< Valid period Absolute parameter bit position */
+#define TAPI_NETTEXT_PARAM_VALIDITY_PERIOD_REL_MASK                    1 << 11                         /**< Valid period Relative parameter bit position */
+#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_ABS_MASK          1 << 12                         /**< Deferred delivery absolute parameter bit position */
+#define TAPI_NETTEXT_PARAM_DEFERRED_DELIVERY_REL_MASK          1 << 13                         /**< Deferred delivery relative parameter bit position */
+#define TAPI_NETTEXT_PARAM_PRIORITY_MASK                               1 << 14                         /**< Priority parameter bit position */
+#define TAPI_NETTEXT_PARAM_PRIVACY_MASK                                1 << 15                         /**< Privacy parameter bit position */
+#define TAPI_NETTEXT_PARAM_REPLY_OPTION_MASK                   1 << 16                         /**< Reply Option parameter bit position */
+#define TAPI_NETTEXT_PARAM_NUMBER_OF_MESSAGE_MASK              1 << 17                         /**< Number of message parameter bit position */
+#define TAPI_NETTEXT_PARAM_ALERT_ON_DELIVERY_MASK                      1 << 18                         /**< Alert on delivery parameter bit position */
+#define TAPI_NETTEXT_PARAM_LANGUAGE_MASK                       1 << 19                         /**< Language parameter bit position */
+#define TAPI_NETTEXT_PARAM_CALLBACK_MASK                               1 << 20                         /**< Callback Number parameter bit position */
+#define TAPI_NETTEXT_PARAM_DISPLAY_MODE_MASK                   1 << 21                         /**< Display mode parameter bit position */
+#define TAPI_NETTEXT_PARAM_MULTI_ENCODING_USER_DATA_MASK       1 << 22                         /**< Multi Encoding user data parameter bit position */
+
+#define TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA                                160                                     /**< Maximum MT user data  size*/
+#define TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA                                160                                     /**< Maximum MO user data  size*/
+
+#define TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS                                             32                                      /**< MAX sms destination(or origination ) address /call back number */
+
+#define TAPI_NETTEXT_ERR_CLASS0_STATUS_SEND_OK                                                         0       /**< send success */
+#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_VACANT                                                                0       /**< address vacant */
+#define TAPI_NETTEXT_ERR_CLASS23_ADDRESS_TRANSLATION_FAILURE                                   1       /**< address translation failure */
+#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_RESOURCE_SHORTAGE                                     2       /**< network resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_NETWORK_FAILURE                                                               3       /**< network failure */
+#define TAPI_NETTEXT_ERR_CLASS23_INVALID_TELESERVICE_ID                                                        4       /**< invalid teleservice id */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM                                         5       /**< other network problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_FIRST                      6       /**< other network problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_NETWORK_PROBLEM_MORE_LAST                       31      /**< other network problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_NO_PAGE_RESPONSE                                                              32      /**< no page response */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_BUSY                                                              33      /**< destination busy */
+#define TAPI_NETTEXT_ERR_CLASS23_NO_ACK                                                                                        34      /**< no ack */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_RESOURCE_SHORTAGE                         35      /**< destination resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED                                                36      /**< sms delivery postponed */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_OUT_OF_SERVICE                                    37      /**< destination out of service */
+#define TAPI_NETTEXT_ERR_CLASS23_DESTINATION_NO_LONGER_AT_THIS_ADDRESS         38      /**< destination no longer at this address */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM                                                39      /**< other terminal problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_FIRST                     40      /**< other terminal problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_TERMINAL_PROBLEM_MORE_LAST                      47      /**< other terminal problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_FIRST                     48      /**< sms delivery postpone more first */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_DELIVERY_POSTPONED_MORE_LAST                      63      /**< sms delivery postpone more last */
+#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_RESOURCE_SHORTAGE                                    64      /**< radio interface resource shortage */
+#define TAPI_NETTEXT_ERR_CLASS23_RADIO_IF_INCOMPATIBLE                                                 65      /**< radio interface incompatible */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM                                                66      /**< other radio interface problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                     67      /**< other radio interface problem more first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_RADIO_IF_PROBLEM_MORE_LAST                      95      /**< other radio interface problem more last */
+#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_SIZE                                                  96      /**< unexpected parameter size */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_ORIGINATION_DENIED                                                97      /**< sms origination denied */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_TERMINATION_DENIED                                                98      /**< sms termination denied */
+#define TAPI_NETTEXT_ERR_CLASS23_SUPPL_SERVICE_NOT_SUPPORTED                                   99      /**< supplementary service not supported */
+#define TAPI_NETTEXT_ERR_CLASS23_SMS_NOT_SUPPORTED                                                             100     /**< sms not supported */
+#define TAPI_NETTEXT_ERR_CLASS23_RESERVED_101                                                                  101     /**< reserved 101 */
+#define TAPI_NETTEXT_ERR_CLASS23_MISSING_EXPECTED_PARM                                         102     /**< missing expected parameter */
+#define TAPI_NETTEXT_ERR_CLASS23_MISSING_MANDATORY_PARM                                                103     /**< missing mandatory parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_UNRECOGNIZED_PARM_VALUE                                               104     /**< unrecognized parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_UNEXPECTED_PARM_VALUE                                         105     /**< unexpected parameter value */
+#define TAPI_NETTEXT_ERR_CLASS23_USER_DATA_SIZE_ERROR                                                  106     /**< user data size error */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS                                                107     /**< other general problem */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_FIRST                     108     /**< other general problem first */
+#define TAPI_NETTEXT_ERR_CLASS23_OTHER_GENERAL_PROBLEMS_MORE_LAST                      255     /**< other general problem last */
+
+#define TAPI_NETTEXT_ERR_CLASS4_WAITING_FOR_TL_ACK                                                             1       /**< waiting for transport ack */
+#define TAPI_NETTEXT_ERR_CLASS4_OUT_OF_RESOURCES                                                               2       /**< out of resource */
+#define TAPI_NETTEXT_ERR_CLASS4_ACCESS_TOO_LARGE                                                               3       /**< access to large */
+#define TAPI_NETTEXT_ERR_CLASS4_DTC_TOO_LARGE                                                          4       /**< DTC too large */
+#define TAPI_NETTEXT_ERR_CLASS4_DTC_CONNECTED                                                                  5       /**< DTC connected */
+#define TAPI_NETTEXT_ERR_CLASS4_NETWORK_NOT_READY                                                              6       /**< network not ready */
+#define TAPI_NETTEXT_ERR_CLASS4_NO_SVC                                                                                 7       /**< no service */
+#define TAPI_NETTEXT_ERR_CLASS4_PHONE_NOT_READY                                                                8       /**< phone not ready */
+#define TAPI_NETTEXT_ERR_CLASS4_NOT_ALLOWED_IN_AMPS                                                    9       /**< fail to allowed in amps */
+#define TAPI_NETTEXT_ERR_CLASS4_CANNOT_SEND_BROADCAST                                                  10      /**< fail to send broadcast */
+#define TAPI_NETTEXT_ERR_CLASS4_INVALID_TRANSACTION_ID
+// ********************************************************************//
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+ * @enum TelSmsMsgStatus_t
+ * This enumeration defines the network text status type.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_STATUS_READ,                                       /**< MT message, stored and read */
+       TAPI_NETTEXT_STATUS_UNREAD,                                     /**< MT message, stored and unread */
+       TAPI_NETTEXT_STATUS_SENT,                                       /**< MO message, stored and  sent */
+       TAPI_NETTEXT_STATUS_UNSENT,                                     /**< MO message, stored but not sent */
+       TAPI_NETTEXT_STATUS_DELIVERED,                         /**< delivered destination */
+       TAPI_NETTEXT_STATUS_DELIVERY_UNCONFIRMED,  /**< Service centre forwarded message but is unable to confirm delivery*/
+       TAPI_NETTEXT_STATUS_MESSAGE_REPLACED,          /**< Message has been replaced*/
+       TAPI_NETTEXT_STATUS_RESERVED                            /**< Reserved for future use*/
+} TelSmsMsgStatus_t;
+
+/**
+ * @enum TelSmsMemStatusType
+ * This enumeration defines the memory status type.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE                = 0x01, /**< PDA Memory Available */
+       TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL                     = 0x02,  /**< PDAMemory is Full */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_AVAILABLE      = 0x03, /**< Phone memory Available */
+       TAPI_NETTEXT_PHONE_MEMORY_STATUS_FULL                   = 0x04, /**< phone memory is full */
+}TelSmsMemStatusType;
+
+/**
+ * @enum TelSmsBearerType_t
+ * This enum defines the different bearer types
+ */
+typedef enum
+{
+       TAPI_NETTEXT_BEARER_PS_ONLY = 0x01,       /**< Send SMS only on PS Bearer */
+       TAPI_NETTEXT_BEARER_CS_ONLY,                  /**< Send SMS only on CS Bearer */
+       TAPI_NETTEXT_BEARER_PS_PREFERRED,        /**<Send SMS preferably on PS Bearer*/
+       TAPI_NETTEXT_BEARER_CS_PREFERRED ,       /**<Send SMS preferably on CS Bearer*/
+       TAPI_NETTEXT_NO_PREFERRED_BEARER         /**<SMS is sent based on default preferred bearer set at OEM based on vendor/operator preference*/
+} TelSmsBearerType_t;
+
+
+/**
+* @enum TelSmsCbMsgType_t
+* This enumeration defines the different CB message types.
+*/
+typedef enum
+{
+          TAPI_NETTEXT_CB_MSG_CBS = 1,             /**< Cell broadcast message */
+          TAPI_NETTEXT_CB_MSG_SCHEDULE,            /**< CB Schedule message  */
+          TAPI_NETTEXT_CB_MSG_CBS41,               /**< CBS41 type message  */
+          TAPI_NETTEXT_CB_MSG_INVALID            /**< Invalid  CB message */
+} TelSmsCbMsgType_t;
+
+
+/**
+ * @enum TelSmsResponse_t
+ * This enum defines the different response types that come in the
+ * sent status acknowledgement/notification after sending a message to the network
+ */
+typedef enum
+{
+       TAPI_NETTEXT_SENDSMS_SUCCESS = 0x00,     /**<Message send success*/
+       TAPI_NETTEXT_ROUTING_NOT_AVAILABLE,     /**< Message routing not available*/
+       TAPI_NETTEXT_INVALID_PARAMETER,             /**< Invalid parameter present in TPDU*/
+       TAPI_NETTEXT_DEVICE_FAILURE,                    /**< Device failure*/
+       TAPI_NETTEXT_SERVICE_RESERVED,                /**< Reserved Service*/
+       TAPI_NETTEXT_INVALID_LOCATION,                /**< Invalid location*/
+       TAPI_NETTEXT_NO_SIM,                                    /**< No SIM error*/
+       TAPI_NETTEXT_SIM_NOT_READY,            /**< SIM not ready error*/
+       TAPI_NETTEXT_NO_NETWORK_RESP,          /**< No response from network*/
+       TAPI_NETTEXT_DEST_ADDRESS_FDN_RESTRICTED,/**< Destination address restricted*/
+       TAPI_NETTEXT_SCADDRESS_FDN_RESTRICTED,   /**< Service center address restricted*/
+       TAPI_NETTEXT_RESEND_ALREADY_DONE,        /**< Resend a operation already done*/
+       TAPI_NETTEXT_SCADDRESS_NOT_AVAILABLE,    /**< SCA address not available*/
+       TAPI_NETTEXT_UNASSIGNED_NUMBER = 0x8001,          /**< Unassigned number*/
+       TAPI_NETTEXT_OPERATOR_DETERMINED_BARRING = 0x8008,/**< Operator determined barring*/
+       TAPI_NETTEXT_CALL_BARRED = 0x800A,                /**< Call barred*/
+       TAPI_NETTEXT_MESSAGE_TRANSFER_REJECTED = 0x8015,  /**< Message transfer rejected*/
+       TAPI_NETTEXT_MEMORY_CAPACITY_EXCEEDED = 0x8016,   /**< Memory capacity exceeded/memory full*/
+       TAPI_NETTEXT_DESTINAITION_OUTOFSERVICE = 0x801B,  /**< Destination number/address out of service*/
+       TAPI_NETTEXT_UNSPECIFIED_SUBSCRIBER = 0x801C,     /**< Unspecified subscriber*/
+       TAPI_NETTEXT_FACILITY_REJECTED = 0x801D,          /**< Facility rejected*/
+       TAPI_NETTEXT_UNKNOWN_SUBSCRIBER = 0x801E,         /**< Unknown subscriber*/
+       TAPI_NETTEXT_NETWORK_OUTOFORDER = 0x8026,         /**< Network out of order*/
+       TAPI_NETTEXT_TEMPORARY_FAILURE = 0x8029,          /**< Temporary failure*/
+       TAPI_NETTEXT_CONGESTION = 0x802A,                 /**< Congestion happened*/
+       TAPI_NETTEXT_RESOURCES_UNAVAILABLE = 0x802F,      /**< Resource unavailable*/
+       TAPI_NETTEXT_FACILITY_NOT_SUBSCRIBED = 0x8032,    /**< Facility not subscribed by the user*/
+       TAPI_NETTEXT_FACILITY_NOT_IMPLEMENTED = 0x8045,   /**< Facility not implemented*/
+       TAPI_NETTEXT_INVALID_REF_VALUE = 0x8051,          /**< Invalid reference value*/
+       TAPI_NETTEXT_INVALID_MSG = 0x805F,                /**< Invalid message*/
+       TAPI_NETTEXT_INVALID_MANDATORY_INFO = 0x8060,     /**< Invalid Mandatory information*/
+       TAPI_NETTEXT_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x8061,/**< Message type not implemented*/
+       TAPI_NETTEXT_MESSAGE_NOT_COMPAT_PROTOCOL = 0x8062, /**< Message not compact protocol*/
+       TAPI_NETTEXT_IE_NOT_IMPLEMENTED = 0x8063,          /**< Information element not implemented*/
+       TAPI_NETTEXT_PROTOCOL_ERROR = 0x806F,              /**< Protocol error*/
+       TAPI_NETTEXT_INTERWORKING = 0x807F,              /**< Networking error*/
+       TAPI_NETTEXT_ME_FULL = 0x8080,                     /**< SMS ME FULL */
+       TAPI_NETTEXT_SIM_FULL = 0x8081,                     /**< SMS SIM FULL */
+       TAPI_NETTEXT_TIMEOUT                                            /**< Timeout error */
+}TelSmsResponse_t;
+
+ /** @enum  TelSmsCause_t
+ * This enum defines the different cause types that come in the
+ * sent status acknowledgement/notification after sending a message to the network
+ */
+
+typedef enum
+{
+
+  TAPI_NETTEXT_SUCCESS,                     /**< SMS Operation successful*/
+  TAPI_NETTEXT_INVALID_PARAMETER_FORMAT,    /**< Invalid format for some parameters passed in Data package information(TPDU)*/
+  TAPI_NETTEXT_PHONE_FAILURE,               /**<SMS operation failed due to Modem failure*/
+  TAPI_NETTEXT_SIM_BUSY,                    /**< SMS SIM operation cannot be performed as SIM is busy with some other operation*/
+  TAPI_NETTEXT_SIM_FAILURE,                 /**< SMS SIM operation cannot be performed due to SIM failure */
+  TAPI_NETTEXT_UNKNOWN,                     /**< unknown error*/
+  TAPI_NETTEXT_MEMORY_FAILURE,              /**< Error while accessing memory or allocation of memory for SMS operation.*/
+  TAPI_NETTEXT_OPERATION_NOT_SUPPORTED      /**< operation not allowed/supported*/
+}  TelSmsCause_t;
+
+/**
+ * @enum TelSmsSetResponse
+ * This defines the response values
+ */
+typedef enum
+{
+       TAPI_NETTEXT_CBSETCONFIG_RSP,     /**<  cellbroadcast config response */
+       TAPI_NETTEXT_SETPREFERREDBEARER_RSP,     /**<  set preferred bearer response */
+       TAPI_NETTEXT_SETPARAMETERS_RSP,     /**<  set parameter response */
+       TAPI_NETTEXT_SETMEMORYSTATUS_RSP,     /**<   set memory status response*/
+       TAPI_NETTEXT_SETMESSAGESTATUS_RSP,     /**<   set message status response*/
+       TAPI_NETTEXT_SETDEVICESTATUS_RSP,    /**<   set device status response*/
+       TAPI_NETTEXT_SETSCADDR_RSP,     /**<   set SCA address response */
+       TAPI_NETTEXT_SET_RSP_MAX     /**<   maximum limit*/
+}TelSmsSetResponse;
+
+// ************************  CDMA Features  **************************//
+ /** @enum  TelSmsIs637AlertPriority_t
+ * This enum defines the type of alerts used to distinguish different priorities
+ * of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_ALERT_PRIORITY_DEFAULT = 0,     /**< Mobile default alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_LOW,                     /**< Low priority alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_MEDIUM,          /**< Medium priority alert */
+  TAPI_NETTEXT_ALERT_PRIORITY_HIGH,                    /**< High priority alert */
+} TelSmsIs637AlertPriority_t;
+
+ /** @enum  TelSmsIs637Privacy_t
+ * This enum defines the desired privacy level of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_PRIVACY_NOT_RESTRICTED = 0,     /**< Not restricted */
+  TAPI_NETTEXT_PRIVACY_RESTRICTED,                     /**< Restricted */
+  TAPI_NETTEXT_PRIVACY_CONFIDENTIAL,                   /**< Confidential */
+  TAPI_NETTEXT_PRIVACY_SECRET,                         /**< Secret */
+} TelSmsIs637Privacy_t;
+
+ /** @enum  TelSmsIs637Priority_t
+ * This enum defines the priority level of the message
+ */
+typedef enum{
+  TAPI_NETTEXT_PRIORITY_NORMAL = 0,                    /**< Normal */
+  TAPI_NETTEXT_PRIORITY_INTERACTIVE,                   /**< Interactive */
+  TAPI_NETTEXT_PRIORITY_URGENT,                                /**< Urgent */
+  TAPI_NETTEXT_PRIORITY_EMERGENCY,                     /**< Emergency */
+} TelSmsIs637Priority_t;
+
+ /** @enum  TelSmsIs637LangIndicator_t
+ * This enum defines the language of the message so that the receiving mobile station can
+ * discard those messages that are not in the user's preferred language
+ */
+typedef enum{
+  TAPI_NETTEXT_LANG_UNKNOWN = 0x0,                     /**< Unknown or unspecified */
+  TAPI_NETTEXT_LANG_ENGLISH,                                   /**< English */
+  TAPI_NETTEXT_LANG_FRENCH,                                    /**< French */
+  TAPI_NETTEXT_LANG_SPANISH,                                   /**< Spanish */
+  TAPI_NETTEXT_LANG_JAPANESE,                                  /**< Japanese */
+  TAPI_NETTEXT_LANG_KOREAN,                                    /**< Korean */
+  TAPI_NETTEXT_LANG_CHINESE,                                   /**< Chinese */
+  TAPI_NETTEXT_LANG_HEBREW,                                    /**< Hebrew */
+} TelSmsIs637LangIndicator_t;
+
+ /** @enum  TelSmsIs637MsgDisplayMode_t
+ * This enum defines the display mode to the mobile station when to display the received message
+ */
+typedef enum{
+  TAPI_NETTEXT_MSG_DISPLAY_IMMEDIATE = 0x0,    /**< The mobile station is to display the received message as soon as possible */
+  TAPI_NETTEXT_MSG_DISPLAY_DEFAULT,                    /**< he mobile station is to display the received message based on a pre-defined mode in the mobile station. */
+  TAPI_NETTEXT_MSG_DISPLAY_USER_INVOKE = 0x3, /**< The mobile station is to display the received message based on the mode selected by the user. */
+  TAPI_NETTEXT_MSG_DISPLAY_RESERVED,                   /**< Reserved */
+} TelSmsIs637MsgDisplayMode_t;
+
+ /** @enum  TelSmsIs637ErrorClass_t
+ * This enum defines the error report class
+ */
+typedef enum{
+  TAPI_NETTEXT_MSG_ERROR_CLASS_NONE = 0x0,                                     /**< None error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_TEMPORARY_ERROR = 0x2,          /**< Temporary error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_PERMANENT_ERROR = 0x3,          /**< Permanent error(for SMS ack) */
+  TAPI_NETTEXT_MSG_ERROR_CLASS_PHONE_INTERNAL_ERROR = 0x4,     /**< Phone Internal Status (for Send status) */
+} TelSmsIs637ErrorClass_t;
+
+ /** @enum  TelSmsBroadCastCategory_t
+ * This enum defines the Broadcast Service Category
+ */
+typedef enum{
+  TAPI_NETTEXT_CATEGORY_UNKNOWN                        = 0x00,                 /**< Unknown category */
+  TAPI_NETTEXT_CATEGORY_EMERGENCY                      = 0x01,                 /**< Emergency category */
+  TAPI_NETTEXT_CATEGORY_ADMIN                          = 0x02,                 /**< Admin category */
+  TAPI_NETTEXT_CATEGORY_MAINTENANCE            = 0x03,                 /**< Maintenance category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_LOC           = 0x04,                 /**< General News(Local) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_REG           = 0x05,                 /**< General News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_NAT           = 0x06,                 /**< General News(National) category */
+  TAPI_NETTEXT_CATEGORY_GEN_NEWS_INT           = 0x07,                 /**< General News(International) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_LOC           = 0x08,                 /**< Business/Financial News(Local) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_REG           = 0x09,                 /**< Business/Financial News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_NAT           = 0x0A,                 /**< Business/Financial News(National) category */
+  TAPI_NETTEXT_CATEGORY_FIN_NEWS_INT           = 0x0B,                 /**< Business/Financial News(International) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_LOC           = 0x0C,                 /**< Sports News(Local) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_REG           = 0x0D,                 /**< Sports News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_NAT           = 0x0E,                 /**< Sports News(National) category */
+  TAPI_NETTEXT_CATEGORY_SPT_NEWS_INT           = 0x0F,                 /**< Sports News(International) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_LOC           = 0x10,                 /**< Entertainment News(Local) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_REG           = 0x11,                 /**< Entertainment News(Regional) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_NAT           = 0x12,                 /**< Entertainment News(National) category */
+  TAPI_NETTEXT_CATEGORY_ENT_NEWS_INT           = 0x13,                 /**< Entertainment News(International) category */
+  TAPI_NETTEXT_CATEGORY_LOC_WEATHER            = 0x14,                 /**< Local Weather category */
+  TAPI_NETTEXT_CATEGORY_AREA_TRAFFIC           = 0x15,                 /**< Area Traffic Reports category */
+  TAPI_NETTEXT_CATEGORY_AIRPORT_SCHED          = 0x16,                 /**< Local Airport Flight Schedules category */
+  TAPI_NETTEXT_CATEGORY_RESTAURANTS            = 0x17,                 /**< Restaurants category */
+  TAPI_NETTEXT_CATEGORY_LODGINGS                       = 0x18,                 /**< Lodgings category */
+  TAPI_NETTEXT_CATEGORY_RETAILS                        = 0x19,                 /**< Retail Directory category */
+  TAPI_NETTEXT_CATEGORY_ADS                            = 0x1A,                 /**< Advertisements category */
+  TAPI_NETTEXT_CATEGORY_STOCK_QUOTES           = 0x1B,                 /**< Stock Quotes category */
+  TAPI_NETTEXT_CATEGORY_JOBS                           = 0x1C,                 /**< Employment Opportunities category */
+  TAPI_NETTEXT_CATEGORY_MEDICAL                        = 0x1D,                 /**< Medical/Health/Hospitals category */
+  TAPI_NETTEXT_CATEGORY_TECH_NEWS                      = 0x1E,                 /**< Technology News category */
+  TAPI_NETTEXT_CATEGORY_MULTI                          =  0x1F,                        /**< Multi-category */
+} TelSmsBroadCastCategory_t;
+
+/** @enum  TelSmsMsgType_t
+ * This enum defines the type of IS637 message
+ */
+typedef enum{
+  TAPI_NETTEXT_MESSAGETYPE_DELIVER = 0x01,                                     /**< sms deliver message  */
+  TAPI_NETTEXT_MESSAGETYPE_SUBMIT = 0x02,                                      /**< sms submit message  */
+  TAPI_NETTEXT_MESSAGETYPE_CANCEL = 0x03,                                      /**< sms cancellation message  */
+  TAPI_NETTEXT_MESSAGETYPE_DELIVERY_ACK = 0x04,                                /**< sms delivery acknowledgment message  */
+  TAPI_NETTEXT_MESSAGETYPE_USER_ACK = 0x05,                                    /**< sms user acknowledgment message  */
+} TelSmsMsgType_t;
+
+/** @enum  TelSmsIs637DigitMode_t
+ * This enum defines the type of address whether it is 4-bit mode or 8-bit mode
+ */
+typedef enum{
+  TAPI_NETTEXT_DIGITMODE_4BITDTMF      = 0x00,                                 /**< 4-bit mode  */
+  TAPI_NETTEXT_DIGITMODE_8BITCODE      = 0x01,                                 /**< 8-bit mode  */
+} TelSmsIs637DigitMode_t;
+
+/** @enum  TelSmsIs637NumberMode_t
+ * This enum defines the mode of address number to indicate whether the address type is as defined in ANSI TI.607 or is a data network address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMMODE_NONE_DATANETWORK =      0x00,           /**< in ANSI TI.607 */
+  TAPI_NETTEXT_NUMMODE_DATANETWORK = 0x01,                                     /**< in Data Network */
+} TelSmsIs637NumberMode_t;
+
+/** @enum  TelSmsIs637NumberType_t
+ * This enum defines the type of address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMBER_TYPE_UNKNOWN          = 0x00,                            /**<  Unknown */
+  TAPI_NETTEXT_NUMBER_TYPE_INTERNATIONAL    = 0x01,                    /**<  International number*/
+  TAPI_NETTEXT_NUMBER_TYPE_NATIONAL         = 0x02,                            /**<  National number */
+  TAPI_NETTEXT_NUMBER_TYPE_NETWORK          = 0x03,                            /**<  Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_SUBSCRIBER       = 0x04,                    /**< Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_5       = 0x05,                    /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_TYPE_ABBREVIATED       = 0x06,                   /**<  Abbreviated number */
+  TAPI_NETTEXT_NUMBER_TYPE_RESERVED_7       = 0x07,                    /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_TYPE_IP                      = 0x11,                     /**<  Internet Protocol(RFC 791) */
+  TAPI_NETTEXT_NUMBER_TYPE_EMAILADDR       = 0x12,                     /**<  Internet Email Address(RFC 822) */
+} TelSmsIs637NumberType_t;
+
+/** @enum  TelSmsIs637NumberPlan_t
+ * This enum defines the plan of address
+ */
+typedef enum{
+  TAPI_NETTEXT_NUMBER_PLAN_UNKNOWN                         = 0x00,             /**<  Unknown */
+  TAPI_NETTEXT_NUMBER_PLAN_TELEPHONY               = 0x01,             /**< ISDN/Telephony numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_2              = 0x02,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_DATA                                = 0x03,                 /**< Data numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_TELEX                             = 0x04,           /**< CTelex numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_5              = 0x05,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_6              = 0x06,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_7              = 0x07,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_8              = 0x08,             /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_PRIVATE                         = 0x09,             /**<  Private numbering plan */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_10           = 0x0A,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_11           = 0x0B,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_12           = 0x0C,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_13           = 0x0D,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_14           = 0x0E,                       /**<  Reserved */
+  TAPI_NETTEXT_NUMBER_PLAN_RESERVED_15           = 0x0F,                       /**<  Reserved */
+} TelSmsIs637NumberPlan_t;
+
+/** @enum  TelSmsIs637SubAddressType_t
+ * This enum defines the plan of address
+ */
+typedef enum{
+  TAPI_NETTEXT_SUBADDR_NSAP                                      = 0x00,       /**< NSAP ( CCITT Recommendation X.213 or ISO 8348 AD2 ) */
+  TAPI_NETTEXT_SUBADDR_USER_SPECIFIED              = 0x01,     /**<  User-specified */
+} TelSmsIs637SubAddressType_t;
+
+// ********************************************************************//
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+/**
+ * This structure defines the different parameters of  CB configuration
+ */
+typedef struct {
+       int bCBEnabled; /**< CB service state. If cb_enabled is true then cell broadcast service will be enabled and underlying modem will enable CB Channel to receiving CB messages. Otherwise CB service will be disabled, underlying modem will deactivate the CB channel. (enabled/disabled) */
+       unsigned char SelectedId; /**< CBMI Identifier selected (all or some)  */
+       unsigned char MsgIdMaxCount; /**< CB Channel List Max Count */
+       int MsgIdCount; /**< CB message ID count */
+       unsigned short MsgIDs[TAPI_NETTEXT_GSM_SMS_CBMI_LIST_SIZE_MAX]; /**< CB message ID information */
+} TelSmsCbConfig_t;
+
+/**
+ * This structure defines the properties of a dialing number
+ * Type of Number, Numbering Plan Indicator, length and the actual number.
+ */
+typedef struct {
+       unsigned int DialNumLen; /**< length of address. If Service center address is not set, then this will be zero */
+       TelSimTypeOfNum_t Ton; /**< Type of number*/
+       TelSimNumberingPlanIdentity_t Npi; /**<Numbering plan identification*/
+       unsigned char szDiallingNum[TAPI_SIM_SMSP_ADDRESS_LEN + 1]; /**< destination address. If Address not set, then set to 0xFF */
+} TelSmsAddressInfo_t;
+
+/**
+ * This structure defines different fields involved in setting the parameters of
+ * a particular sms in EFsmsp.
+ */
+typedef struct {
+
+       unsigned char RecordIndex; /**< Index*/
+       unsigned char RecordLen; /**< SMS Parameter Record length*/
+       unsigned long AlphaIdLen; /**< Alpha id length */
+       char szAlphaId[TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX + 1]; /**< Alpha id .It is a unique identifier for each row/record in EFsmsp */
+       unsigned char ParamIndicator; /**< SMS parameter indicator is a 1 byte value. Each bit in this value indicates the presence/absence of the sms header parameters.If the parameter is present the corresponding bit value is set to 0.If the parameter is absent then it is set as 1.Refer 3GPP TS 31.02 :4.4.23 */
+       TelSmsAddressInfo_t TpDestAddr; /**< TP-destination address (TP-DA) */
+       TelSmsAddressInfo_t TpSvcCntrAddr; /**< TP-service center address */
+       unsigned short TpProtocolId; /**< TP-protocol Id */
+       unsigned short TpDataCodingScheme; /**< TP-data coding scheme */
+       unsigned short TpValidityPeriod; /**< TP-validity period */
+} TelSmsParams_t;
+
+/**
+ * This structure defines the fields related to an Sms like SIM index, TPDU  and length
+ */
+typedef struct {
+       unsigned char Sca[TAPI_SIM_SMSP_ADDRESS_LEN]; /**< Service Centre address - an optional parameter. If this parameter is not present, then this field will be Null.If present, the valid service centre address information is filled as per 3GPP TS23.040 9.1.2.5 Address fields */
+       int MsgLength; /**< Size of array szData (which is actual TPDU message) */
+       unsigned char szData[TAPI_NETTEXT_SMDATA_SIZE_MAX + 1]; /**<SMS TPDU message */
+} TelSmsDatapackageInfo_t;
+
+/**
+ *This structure defines the data Related to SimIndex,MessageStatus and SMS Data Stored.
+ */
+typedef struct {
+       int SimIndex; /**< Index where SMS is stored. */
+       TelSmsMsgStatus_t MsgStatus; /**< Message status.*/
+       TelSmsDatapackageInfo_t SmsData; /**<SMS message */
+} TelSmsData_t;
+
+/**
+ * This structure defines the different parameters that are related to the message count
+ *in a particular memory(Phone/SIM)
+ */
+typedef struct {
+       unsigned int TotalCount; /**< Total count of messages stored in SIM*/
+       int UsedCount; /**< Stored message count in SIM in SIM*/
+       int IndexList[TAPI_NETTEXT_GSM_SMS_MSG_NUM_MAX]; /**< Message index list stored in SIM. And the maximum size of this array can be of totalCount.This array contains the list of index values in which the messages are stored.i.e. index_list[totalcount] = [2,3] denotes that indexs 2 and 3 are stored(valid) and others not(empty).*/
+} TelSmsStoredMsgCountInfo_t;
+
+/**
+ * This structure defines a cell broadcast message.
+ */
+typedef struct {
+
+       TelSmsCbMsgType_t CbMsgType; /**< Cell Broadcast  message type */
+       unsigned short Length; /**<Size of array szMsgData (which is actual TPDU message) */
+       char szMsgData[TAPI_NETTEXT_CB_PAGE_SIZE_MAX + 1]; /**<Cell broadcast message data[Refer 3GPP TS 23.041 9.4.1]*/
+} TelSmsCbMsg_t;
+
+// ************************  CDMA Features  **************************//
+/**
+ *  This structure defines cause code as an indication whether an SMS error has occurred and
+ *  if so, whether the condition is considered temporary or permanent
+ **/
+typedef struct {
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       TelSmsIs637ErrorClass_t ErrClass; /**< Error report class */
+       unsigned char Cause; /**< Error cause identifier */
+} TelSmsIs637CauseCode_t;
+
+/**
+ * This structure defines the parameters of address and its type
+ */
+typedef struct {
+       TelSmsIs637DigitMode_t Digit; /**< Digit mode indicator (0x00:4bit_dtmf, 0x01:8bit_code) */
+       TelSmsIs637NumberMode_t NumberMode; /**< Number mode indicator (0x00:ANSI TI607, 0x01:Data network) */
+       TelSmsIs637NumberType_t NumberType; /**< Type of number */
+       TelSmsIs637NumberPlan_t NumberPlan; /**< Numbering plan */
+       unsigned char szAddrLength; /**< The number of CHARi */
+       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< The address digit or character */
+} TelSmsIs637Address_t;
+
+/**
+ * This structure defines the parameters of subaddress of originator and destination
+ */
+typedef struct {
+       TelSmsIs637SubAddressType_t SubType; /**< Subaddress type */
+       unsigned char Odd; /**< Odd/even indicator */
+       unsigned char szAddrLength; /**< The number of CHARi */
+       unsigned char szAddress[TAPI_NETTEXT_MAXLENGTH_SMS_ADDRESS]; /**< A subaddress octet */
+} TelSmsIs637SubAddress_t;
+
+/**
+ * This structure defines the message center time stamp may be include
+ * with SMS message sent from a message center
+ */
+typedef struct {
+       unsigned int year; /**< Year - if the year is 2002, the year field contains 0x02 */
+       unsigned int month; /**< Month (1 ~ 12) */
+       unsigned int day; /**< Day (1 ~ 31) */
+       unsigned int hours; /**< Hours (0 ~ 23) */
+       unsigned int minutes; /**< Minute (0 ~ 59) */
+       unsigned int seconds; /**< Seconds (0 ~ 59) */
+} TelSmsTimeStamp_t;
+
+/**
+ * The structure defines the parameter of SMS submit message
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute (not supported) */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative (not supported) */
+       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute */
+       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
+       int bUserAckRequest; /**< User acknowledge request */
+       int bDeliveryAckRequest; /**< Delivery acknowledge request */
+       TelSmsIs637AlertPriority_t AlertPriority; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637Address_t CallBackNumber; /**< Callback number address */
+} TelSmsIs637OutSubmit_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledgement message for submit
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MO_USER_DATA]; /**< SMS user data */
+       unsigned char UserResponseCode; /**< User response code */
+} TelSmsIs637OutAck_t;
+
+/**
+ * The structure defines the parameter of SMS cancellation message
+ */
+typedef struct {
+       TelSmsIs637Address_t DstAddr; /**< Destination address */
+       TelSmsIs637SubAddress_t DstSubAddr; /**< Destination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+} TelSmsIs637OutCancel_t;
+
+/**
+ * The structure defines the parameter of SMS devivery message
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
+       TelSmsTimeStamp_t DeferredDelTimeAbs; /**< Deferred delivery time - Absolute (not supported) */
+       unsigned char DeferredDelTimeRel; /**< Deferred delivery time - Relative (not supported) */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637Privacy_t Privacy; /**< Privacy indicator */
+       unsigned char NumMsg; /**< Number of voice mail (0-99) */
+       int bUserAckRequest; /**< User acknowledge request */
+       int bDeliveryAckRequest; /**< Delivery acknowledge request */
+       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637Address_t CallBackNumer; /**< Callback number address */
+       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
+} TelSmsIs637InDeliver_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledge message for deliver
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       unsigned char UserResponseCode; /**< User response code */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+} TelSmsIs637InAck_t;
+
+/**
+ * The structure defines the parameter of SMS acknowledge message from message center
+ */
+typedef struct {
+       TelSmsIs637Address_t OrigAddr; /**< Origination address */
+       TelSmsIs637SubAddress_t OrigSubAddr; /**< Origination subaddress */
+       unsigned short TeleService; /**< Teleservice Identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgId; /**< Message identifier */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+} TelSmsIs637InDeliverAck_t;
+
+/**
+ * The structure defines the parameter of SMS broadcast message
+ */
+typedef struct {
+       TelSmsBroadCastCategory_t ServiceCategory; /**< Broadcast service category */
+       unsigned short MsgId; /**< Message identifier */
+       int bBearerReplySeqRequest; /**< Bearer reply sequence request */
+       unsigned char ReplySeqNumber; /**< Reply sequence number */
+       unsigned short MsgEncoding; /**< Message encoding (defined in TSB-58A) */
+       unsigned short MsgLength; /**< Message length */
+       unsigned char szData[TAPI_NETTEXT_MAXLENGTH_SMS_MT_USER_DATA]; /**< SMS user data */
+       TelSmsTimeStamp_t MessageCenterTimeStamp; /**< Message center time stamp */
+       TelSmsTimeStamp_t ValidityPeriodAbs; /**< Validity period - Absolute */
+       unsigned char ValidityPeriodRel; /**< Validity period - Relative */
+       TelSmsIs637Priority_t Priority; /**< Priority indicator */
+       TelSmsIs637AlertPriority_t AlertPriorty; /**< Alert priority of message */
+       TelSmsIs637LangIndicator_t MsgLang; /**< Language indicator */
+       TelSmsIs637MsgDisplayMode_t Display; /**< Message display mode */
+} TelSmsIs637InBroadCast_t;
+
+/**
+ * The structure defines the type of SMS message as union
+ */
+typedef union {
+       TelSmsIs637OutSubmit_t OutSubmit; /**< Outgoing Submit message */
+       TelSmsIs637OutAck_t OutAck; /**< Outgoing Acknowledge message */
+       TelSmsIs637OutCancel_t OutCancel; /**< Outgoing Cancel message */
+       TelSmsIs637InDeliver_t InDeliver; /**< Incoming Delivery message */
+       TelSmsIs637InAck_t InAck; /**< Incoming Acknowledge message */
+       TelSmsIs637InDeliverAck_t InDeliverAck; /**< Incoming Delivery Acknowledge message */
+       TelSmsIs637InBroadCast_t InBc; /**< Incoming Broadcast message */
+} TelSmsMessage_t;
+
+/**
+ * The structure defines the parameter of entire SMS message of each type
+ */
+typedef struct {
+       int ParamMask; /**< Parameter ID mask */
+       TelSmsMsgType_t MsgType; /**< Message type */
+       TelSmsMessage_t MsgData; /**< Message data */
+} TelSmsMsgInfo_t;
+// ********************************************************************//
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  // _TEL_NETTEXT_H_
+
+/**
+ * @}
+*/
+
diff --git a/include/common/TelNetwork.h b/include/common/TelNetwork.h
new file mode 100644 (file)
index 0000000..6a61dcd
--- /dev/null
@@ -0,0 +1,611 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup     TelephonyAPI
+* @addtogroup  Network_TAPI    Network
+* @{
+*
+* @file TelNetwork.h
+
+     @brief This file serves as a "C" header file and defines structures for Tapi Network Services\n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_NETWORK_H_
+#define _TEL_NETWORK_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+#define TAPI_NETWORK_ORDER_MAX                                 5               /**< Maximum network order */
+#define TAPI_NETWORK_LIST_MAX                                  15              /**< Maximum network list */
+#define TAPI_NETWORK_NAME_LEN_MAX                              40              /**< Maximum network name or PLMN name length*/
+#define TAPI_NETWORK_SPN_LEN_MAX                               20              /**< Maximum network service provider name length */
+#define TAPI_PREFERRED_PLMN_RECORDS_MAX                        150             /**< Maximum record length for preferred plmn list*/
+#define TAPI_NETWORK_DISPLAY_INFO_ELEMENTS             4               /**< Maximum network Display info element length */
+#define TAPI_NETWORK_HOMEZONE_TAG_MAX_LEN              13              /**< Maximum Network  Home zone tag  length */
+#define TAPI_NETWORK_CS_DISP_INDEX                             0               /**< Maximum   Network CS display index length */
+#define TAPI_NETWORK_PS_DISP_INDEX                             1               /**< Maximum  Network PS display index  length */
+#define TAPI_NETWORK_SVC_DISP_INDEX                            2               /**< Maximum  Network SVC display index length */
+#define TAPI_NETWORK_ROAM_DISP_INDEX                   3               /**< Maximum  Network roaming display index length */
+#define TAPI_NETWORK_SUBS_SVC_NUM_MAX                  6               /**< Maximum number of the Subscriber's services */
+#define TAPI_NETWORK_SUBS_NUM_LEN_MAX                  40              /**< Maximum Subscriber Number Length */
+#define TAPI_NETWORK_SUBS_ALPHA_LEN_MAX                        16              /**< Maximum Subscriber Name Length */
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/**
+ * @enum TelNetworkSelectionMode_t
+ *  This enumeration defines the network selection modes.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SELECTIONMODE_AUTOMATIC,                           /**< Network selection is in Automatic selection mode*/
+       TAPI_NETWORK_SELECTIONMODE_MANUAL,                              /**< Network selection is in Manual selection mode */
+       TAPI_NETWORK_SELECTIONMODE_GLOBAL_AUTOMAITIC,   /**<Global Automatic */
+       TAPI_NETWORK_SELECTIONMODE_CDMA                 /**<CDMA selection*/
+} TelNetworkSelectionMode_t;
+
+/**
+ * @enum TelNetworkSystemIdFormat_t
+ * This enumeration defines the System ID Formats.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SYSID_FORMAT_SID,          /**< System ID - Format used  in CDMA. */
+       TAPI_NETWORK_SYSID_FORMAT_PLMN          /**< PLMN id - Format used in GSM/3G */
+}TelNetworkSystemIdFormat_t;
+
+/**
+ * @enum TelNetworkServiceDomain_t
+ * This enumeration defines the network service domains .
+ */
+typedef enum
+{
+       TAPI_NETWORK_SERVICE_DOMAIN_COMBINED,           /**< This member sets the Circuit switch   and Packet Switch domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_PS,                         /**< This member sets the Packet Switch service domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_CS,                         /**< This member sets the Circuit Switch service domain */
+       TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC           /**< This member sets the service domain to Circuit Switch and Packet Switch or Circuit Switch or Packet Switch domain */
+} TelNetworkServiceDomain_t;
+
+/**
+ * @enum TelNetworkMode_t
+ * This enumeration defines the network modes.
+ */
+typedef enum
+{
+       TAPI_NETWORK_MODE_NONE,                 /**< This member sets the emergency network mode */
+       TAPI_NETWORK_MODE_EMERGENCY,    /**< This member sets the emergency network mode*/
+       TAPI_NETWORK_MODE_AUTOMATIC,    /**< This member sets the automatic network mode. Based on OEM priority, network mode preference will be used */
+       TAPI_NETWORK_MODE_CDMA,                 /**< This member sets the network mode to CDMA */
+       TAPI_NETWORK_MODE_GSM,                  /**< This member sets the network mode to GSM */
+       TAPI_NETWORK_MODE_WCDMA,                /**< This member sets the network mode to WCDMA  */
+       TAPI_NETWORK_MODE_WLAN                  /**< This member sets the network mode to WLAN */
+}TelNetworkMode_t;
+
+/**
+ * @enum TelNetworkServiceLevel_t
+ * This enumeration defines the status of network service.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SERVICE_LEVEL_NO,                  /**< No service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY,   /**< Only emergency service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_FULL,                /**< FULL service available in the network ME is camped */
+       TAPI_NETWORK_SERVICE_LEVEL_SEARCH               /**< Searching for service */
+}TelNetworkServiceLevel_t;
+
+/**
+ * @enum TelNetworkServiceLevel_t
+ * This enumeration defines the service types of TAPI.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SERVICE_TYPE_NO_SVE,               /**< No service  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
+       TAPI_NETWORK_SERVICE_TYPE_LIMITED,              /**< Limited service available in the camped network  (This enumeration is not applicable for OEM_TAPI_NW_select_network_req API) */
+       TAPI_NETWORK_SERVICE_TYPE_CS,                   /**< CS service available in the camped network */
+       TAPI_NETWORK_SERVICE_TYPE_PS,                   /**< PS service available in the camped network */
+       TAPI_NETWORK_SERVICE_TYPE_COMBINED              /**< Both CS and PS services available in the camped network */
+}TelNetworkServiceType_t;
+
+/**
+ * @enum TelNetworkSystemType_t
+ * This enumeration defines the system types of TAPI.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SYSTEM_NO_SRV,                             /**< No Service available */
+       TAPI_NETWORK_SYSTEM_GSM,                                /**< Available service is GSM  */
+       TAPI_NETWORK_SYSTEM_GPRS,                               /**< Available service is GPRS */
+       TAPI_NETWORK_SYSTEM_EGPRS,                              /**< Available service is EGPRS  */
+       TAPI_NETWORK_SYSTEM_PCS1900,                    /**< Available service is PCS1900 band */
+       TAPI_NETWORK_SYSTEM_UMTS,                               /**< Available service is UMTS  */
+       TAPI_NETWORK_SYSTEM_GSM_AND_UMTS,               /**< Both GSM and UMTS systems available */
+       TAPI_NETWORK_SYSTEM_HSDPA,                              /**< Available service is hsdpa */
+       TAPI_NETWORK_SYSTEM_IS95A,                              /**< Available service is IS95A */
+       TAPI_NETWORK_SYSTEM_IS95B,                              /**< Available service is IS95B */
+       TAPI_NETWORK_SYSTEM_CDMA_1X,                    /**< Available service is CDMA 1X */
+       TAPI_NETWORK_SYSTEM_EVDO_REV_0, /**< Available service is EV-DO rev0 */
+       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_0_HYBRID, /**< Available service is  1X and EV-DO rev0 */
+       TAPI_NETWORK_SYSTEM_EVDO_REV_A, /**< Available service is  EV-DO revA */
+       TAPI_NETWORK_SYSTEM_1X_EVDO_REV_A_HYBRID, /**< Available service is 1X and EV-DO revA */
+       TAPI_NETWORK_SYSTEM_EVDV,               /**< Available service is EV-DV */
+} TelNetworkSystemType_t;
+
+/**
+ *  @enum TelNetworkBandPreferred_t
+ * This enumeration defines the operations that can be done on network Band.
+ */
+typedef enum
+{
+       TAPI_NETWORK_BAND_MODE_PREFERRED = 0x01,                 /**<  Preferred band. (If preferred Band is not available, then underlying modem can search on other bands) */
+       TAPI_NETWORK_BAND_MODE_ONLY = 0x02,                              /**<   This allows only particular band. */
+} TelNetworkBandPreferred_t;
+
+/**
+ * @enum TelNetworkBand_t
+ * This enumeration defines different network Bands.
+ */
+typedef enum
+{
+       TAPI_NETWORK_BAND_TYPE_ANY = 0x00,              /**< All bands can be tried. */
+       TAPI_NETWORK_BAND_TYPE_GSM850,                  /**< This member sets the band to GSM 850 */
+       TAPI_NETWORK_BAND_TYPE_GSM_900_1800,    /**< This member sets the band to GSM 900_1800 */
+       TAPI_NETWORK_BAND_TYPE_GSM1900,                 /**< GSM 1900*/
+       TAPI_NETWORK_BAND_TYPE_GSM,                             /**< This member sets all GSM bands */
+       TAPI_NETWORK_BAND_TYPE_WCDMA,                   /**< This member sets all WCDMA bands */
+       TAPI_NETWORK_BAND_TYPE_WCDMA850,                /**< This member sets the band to WCDMA 850 */
+       TAPI_NETWORK_BAND_TYPE_WCDMA1900,               /**< This member sets the band to WCDMA 1900 */
+       TAPI_NETWORK_BAND_TYPE_WCDMA2100,               /**< This member sets the band to WCDMA 2100 */
+       TAPI_NETWORK_BAND_TYPE_GSM900,                  /**< GSM 900*/
+       TAPI_NETWORK_BAND_TYPE_GSM1800, /**< This member sets the band to GSM 1800 */
+       TAPI_NETWORK_BAND_TYPE_GSM_850_1900     /**< This member sets the band to GSM 850_1900 */
+} TelNetworkBand_t;
+
+/**
+ * @enum TelNetworkOperationCause_t
+ * This enumeration defines different network operation cause.
+ */
+typedef enum
+{
+       TAPI_NETWORK_NO_ERR = 0x00,                                     /**< There is no error for any network operation.  */
+       TAPI_NETWORK_OPERATION_FAILED,                          /**< There is an error for any network operation.  */
+       TAPI_NETWORK_PHONE_IN_USE_ERR,                          /**< This error will be returned when any network operation is tried while phone is in use(eg, Voice / Data call in progress due to which network operation failed) */
+       TAPI_NETWORK_OFFLINE_ERR,                                       /**< This error is sent when any network option is tried when phone is in offline mode */
+       TAPI_NETWORK_CONFIG_SETTINGS_FAILURE_ERR,       /**< This error is sent when modem is unable to process the config settings information. */
+       TAPI_NETWORK_INTERNAL_FAILURE_ERR,                      /**< This error to indicate internal failure */
+       TAPI_NETWORK_MEMORY_FULL_ERR                            /**< This error is caused by memory full */
+} TelNetworkOperationCause_t;
+
+/**
+* @enum TelNetworkDayLightSavingAdj_t
+* This enumeration defines the day light saving adjustment time.
+*/
+typedef enum
+{
+       TAPI_NETWORK_DLS_ADJ_NO_ADJUSTMENT,             /**< No adjustment specified on day light saving */
+       TAPI_NETWORK_DLS_ADJ_PLUS_ONE_HOUR,             /**< Day light saving adjusted for one hour */
+       TAPI_NETWORK_DLS_PLUS_TWO_HOUR                  /**< Day light saving adjusted for two hours */
+}TelNetworkDayLightSavingAdj_t;
+
+
+/**
+ * @enum TelNetworkPowerOnAttach_t
+ * This enumeration defines operation that can be done on power on attach.
+ */
+typedef enum
+{
+       TAPI_NETWORK_POWERON_ATTACH_DISABLE = 0x00,             /**< Network Power on attach  disable */
+       TAPI_NETWORK_POWERON_ATTACH_ENABLE = 0x01,              /**< Network Power on attach enable */
+} TelNetworkPowerOnAttach_t;
+
+/**
+ * @enum TelNetworkPrefferedPlmnOp_t
+ * This enumeration defines the operation that can be done on preferred PLMN.
+ */
+typedef enum
+{
+       TAPI_NETWORK_PREF_PLMN_ADD=0x01,                        /**< Addition to  Network Preferred Plmn list*/
+       TAPI_NETWORK_PREF_PLMN_EDIT,                            /**< Edit the network Preferred Plmn list */
+       TAPI_NETWORK_PREF_PLMN_DELETE                           /**< Delete the entry to network Preferred Plmn list*/
+}TelNetworkPrefferedPlmnOp_t;
+
+typedef enum
+{
+       TAPI_NETWORK_NUM_TYPE_UNKNOWN,
+       TAPI_NETWORK_NUM_TYPE_INTERNATIONAL,
+       TAPI_NETWORK_NUM_TYPE_NATIONAL,
+       TAPI_NETWORK_NUM_TYPE_NETWORK,
+       TAPI_NETWORK_NUM_TYPE_DEDICATE,
+       TAPI_NETWORK_NUM_TYPE_OTHER = 0xFF
+}TelNetworkSubsNumType_t;
+
+typedef enum
+{
+       TAPI_NETWORK_NUM_PLAN_UNKNOWN = 0x00,
+       TAPI_NETWORK_NUM_PLAN_ISDN = 0x01,
+       TAPI_NETWORK_NUM_PLAN_DATA = 0x03,
+       TAPI_NETWORK_NUM_PLAN_TELEX = 0x04,
+       TAPI_NETWORK_NUM_PLAN_NATIONAL = 0x08,
+       TAPI_NETWORK_NUM_PLAN_PRIVATE = 0x09,
+       TAPI_NETWORK_NUM_PLAN_RSVD_CTS = 0x0B,
+       TAPI_NETWORK_NUM_PLAN_RSVD_EXT = 0x0F,
+       TAPI_NETWORK_NUM_PLAN_OTHER = 0xFF
+}TelNetworkSubsNumPlan_t;
+
+/**
+ * @enum TelNetworkPowerOnAttach_t
+ * This enumeration defines operation that can be done on power on attach.
+ * It is used on CDMA.
+ */
+typedef enum
+{
+       TAPI_NETWORK_SERVING_CARRIER_TEST = 0x00,                       /**< TestBed */
+       TAPI_NETWORK_SERVING_CARRIER_SKT,                                       /**< Korea SKT */
+       TAPI_NETWORK_SERVING_CARRIER_KTF,                                       /**< Korea KTF */
+       TAPI_NETWORK_SERVING_CARRIER_LGT,                                       /**< Korea LGT */
+       TAPI_NETWORK_SERVING_CARRIER_VERIZON = 0x11,            /**< US VERIZON */
+       TAPI_NETWORK_SERVING_CARRIER_SPRINT,                            /**< US SPRINT */
+       TAPI_NETWORK_SERVING_CARRIER_ALLTEL,                            /**< US ALLTEL */
+       TAPI_NETWORK_SERVING_CARRIER_METRO_PCS,                 /**< US METRO_PCS */
+       TAPI_NETWORK_SERVING_CARRIER_CELLULAR,                          /**< US CELLULAR */
+       TAPI_NETWORK_SERVING_CARRIER_CRIKET,                            /**< US CRIKET */
+       TAPI_NETWORK_SERVING_CARRIER_TELUS = 0x21,                      /**< CANADA TELUS */
+       TAPI_NETWORK_SERVING_CARRIER_BMC,                                       /**< CANADA BMC */
+       TAPI_NETWORK_SERVING_CARRIER_BWA,                                       /**< CANADA BWA */
+       TAPI_NETWORK_SERVING_CARRIER_CTC = 0x31,                        /**< CHINA CTC */
+       TAPI_NETWORK_SERVING_CARRIER_UNKNOWN = 0xFF             /**< SERVING NETWORK UNKNOWN */
+} TelNetworkServCarrierType_t;
+
+/**
+ * @enum TelNetworkPlmnType_t
+ * This structure defines Network Plmn type.
+ */
+typedef enum
+{
+       TAPI_UNKNOWN_PLMN=0,                            /**< Network Plmn type Unknown */
+       TAPI_HOME_PLMN ,                                        /**< Network Plmn type Home Plmn */
+       TAPI_AVAILABLE_PLMN,                            /**< Network Plmn Available */
+       TAPI_FORBIDDEN_PLMN,                            /**< Network Plmn Forbidden */
+}TelNetworkPlmnType_t;
+
+/**
+ * @enum TelNetworkHomeZoneCommand_t
+ * This enumeration defines network home zone command.
+ */
+typedef enum
+{
+       TAPI_NETWORK_ZONEINFO_NONE,                             /**< Network Zone info none */
+       TAPI_NETWORK_ZONEINFO_IND,                              /**< Network Zone info indication */
+       TAPI_NETWORK_ZONEINFO_CLEAR                             /**< Network Zone info clear */
+}TelNetworkHomeZoneCommand_t;
+
+/**
+ * @enum TelNetworkHomeZone_t
+ * This enumeration defines network home zone type.
+ */
+typedef enum
+{
+       TAPI_NETWORK_ZONE_NONE,                                 /**< Network Zone Type none */
+       TAPI_NETWORK_ZONETYPE_HOMEZONE,         /**< Network Zone Type Home zone */
+       TAPI_NETWORK_ZONETYPE_CITYZONE,                 /**< Network Zone Type City zone */
+}TelNetworkHomeZone_t;
+
+/**
+ * @enum TelNetworkNameDispCondition_t
+ * This enumeration defines network name display condition type.
+ */
+typedef enum
+{
+       TAPI_NETWORK_DISP_INVALID= 0x00,
+       TAPI_NETWORK_DISP_SPN = 0x01,
+       TAPI_NETWORK_DISP_PLMN = 0x02,
+       TAPI_NETWORK_DISP_SPN_PLMN = 0x03,
+}TelNetworkNameDispCondition_t;
+
+/**
+ * @enum TelNetworkPrefNetType_t
+ * This enumeration defines CDMA Preferred Network Type(CDMA only).
+ */
+typedef enum
+{
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC = 0x01,               /**< 0x01 : AUTOMATIC */
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A,                    /**<  0x02 : AUTOMATIC A */
+    TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B,                    /**<  0x03 : AUTOMATIC B */
+    TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY,                      /**<  0x04 : HOME ONLY */
+    TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY,                      /**<  0x05 : ROAM ONLY */
+} TelNetworkPrefNetType_t;
+
+/**
+ * @enum TelNetworkPrlPrefOnly_t
+ * This enumeration defines CDMA PRL Preferred Only field stored in the PRL(CDMA only).
+ */
+typedef enum
+{
+    TAPI_NETWORK_PRL_PREF_ONLY_OFF,                    /**< Preferred Only is FALSE */
+    TAPI_NETWORK_PRL_PREF_ONLY_ON,                     /**< Preferred Only is TRUE */
+    TAPI_NETWORK_PRL_PREF_ONLY_NONE                    /**< There isn't Preferred Only Option */
+} TelNetworkPrlPrefOnly_t;
+
+/**
+ * @enum TelNetworkCDMAHybridMode_t
+ * This enumeration defines CDMA Hybrid Mode State(CDMA only).
+ */
+typedef enum
+{
+    TAPI_NETWORK_CDMA_HYBRID = 0x01,   /**< 0x01 : HYBRID(1X + EVDO) */
+    TAPI_NETWORK_CDMA_1X_ONLY,         /**< 0x02 : 1X ONLY */
+    TAPI_NETWORK_CDMA_EVDO_ONLY,               /**< 0x03 : EVDO ONLY */
+}TelNetworkCDMAHybridMode_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/**
+ * This structure defines the network time and zone information.
+ */
+typedef struct {
+       unsigned short Year; /**< Year information  */
+       unsigned short Month; /**< Month information */
+       unsigned short Day; /**< Day */
+       unsigned short Hour; /**< Hour */
+       unsigned short Minute; /**< Minute */
+       unsigned short Second; /**< Second */
+       unsigned short TimeZone; /**< Network time zone */
+       TelNetworkDayLightSavingAdj_t DaylightSave; /**< day light saving adjustment time */
+} TelNetworkTimeAndZone_t;
+
+/**
+ * This structure defines the network system information.
+ */
+typedef struct {
+       TelNetworkSystemType_t SystemType; /**< Network system technologies like GSM, CDMA, WCDMA, WLAN etc */
+       TelNetworkServiceType_t ServiceType; /**< Network service type - Cs, Ps or combined */
+       TelNetworkSystemIdFormat_t SysIdFormat; /**< SID or PLMN based on system type */
+       TelNetworkMode_t NetworkMode; /**< Network mode Information */
+       unsigned long SysId; /**< PLMN Information */
+       int bPlmnForbidden; /**< Forbidden PLMN or Not */
+       int bHome; /**< Home PLMN Or not */
+       int bEquivalentPlmn; /**< Equivalent PLMN Or not */
+       int bNetworkIdentityAvail; /**< Network Identity Available or not */
+       int bNetworkTimeAvail; /**< Network Time Available or not */
+       int bNetworkTimeZoneAvail; /**< Network Timezone Available or not */
+       int bNetworkDlsAvail; /**< Network DLS available or not */
+       char szSystemName[TAPI_NETWORK_NAME_LEN_MAX]; /**< PLMN Name or Network Name (Null terminated string) */
+       char szSpn[TAPI_NETWORK_SPN_LEN_MAX]; /**< Service Provider Name (Null Terminated string) */
+       TelNetworkTimeAndZone_t NetworkTimeZone; /**< If NetwotkTimezone present, then timezone value */
+       int bMncIncludesPcsDigit; /**< To determine whether PLMN is US PLMN or not */
+} TelNetworkSystemId_t;
+
+/**
+ * This structure has information related to cdma system.
+ */
+typedef struct {
+       TelNetworkServCarrierType_t carrier; /**< for CDMA, Optional */
+       unsigned short system_id; /**< for CDMA, Mandatory */
+       unsigned short network_id; /**< for CDMA, Mandatory */
+       unsigned short base_station_id; /**< for CDMA, Mandatory */
+       unsigned short base_station_latitude; /**< for CDMA, Mandatory */
+       unsigned short base_station_longitude; /**< for CDMA, Mandatory */
+       unsigned short registration_zone; /**< for CDMA, Optional */
+       unsigned short pilot_offset; /**< for CDMA, Optional */
+} TelNetworkCDMASysInfo_t;
+
+/**
+ * This structure has network information.
+ */
+typedef struct {
+       TelNetworkServiceLevel_t ServiceLevel; /**< Service level available( Full Service or Limited service etc) */
+       TelNetworkSystemId_t SysId; /**< System ID information */
+       int bRoaming; /**< Roaming PLMN or not*/
+       int bDisplaySpn; /**< Service Provider Name should be displayed or not */
+       int bDisplayRplmn; /**< Display of Registered PLMN required or not. */
+       unsigned short lac; /**< Location Area Code */
+       TelNetworkCDMASysInfo_t CdmaSysInfo; /**< CDMA System Information */
+} TelNetworkInfo_t;
+
+/**
+ * This structure defines the network list.
+ */
+typedef struct {
+       unsigned int NumOfNwAvailable; /**< Count for Network list */
+       TelNetworkSystemId_t SystemList[TAPI_NETWORK_LIST_MAX]; /**< List of Networks available */
+} TelNetworkList_t;
+
+/**
+ * This structure defines the Radio information.
+ */
+typedef struct {
+       unsigned short RxLevel; /**< Received radio signal level from the wireless stack.Radio signal strength indicator (RSSI) level.RSSI in positive dBm i.e. 75 means -75dBm.The valid range for AMPS:-110 to -89 dBm800 CDMA:-105 to -90 dBm1900 CDMA: -108 to -93 dBm GSM/WCDMA: -105 to -60 dBm */
+       unsigned short RxQuality; /**< Radio signal quality received from the wireless stack.  */
+       unsigned short RssiBar; /**< Signal bars stating the signal strength */
+} TelNetworkRadioInfo_t;
+
+/**
+ * This structure defines the subscriber number information.
+ */
+typedef struct {
+       TelNetworkSubsNumType_t type;
+       TelNetworkSubsNumPlan_t plan;
+       char number[TAPI_NETWORK_SUBS_NUM_LEN_MAX];
+       char name[TAPI_NETWORK_SUBS_ALPHA_LEN_MAX];
+} TelNetworkSubscriber_t;
+
+/**
+ * This structure defines the subscriber number list.
+ */
+typedef struct {
+       unsigned int NumOfService; /**< Count for Network list */
+       TelNetworkSubscriber_t SubsList[TAPI_NETWORK_SUBS_SVC_NUM_MAX]; /**< List of Networks available */
+} TelNetworkSubscriberList_t;
+
+/**
+ *
+ * This structure defines the preferred plmn information.
+ */
+typedef struct {
+       unsigned char Index; /**< Network Preferred Plmn list index */
+       unsigned char Plmn[6]; /**< Network Preferred Plmn */
+       char network_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network Name  */
+       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Service provider name */
+       TelNetworkSystemType_t SystemType; /**< Network system type */
+} TelNetworkPrefferedPlmnInfo_t;
+
+/**
+ *
+ * This structure defines the preferred plmn list.
+ */
+typedef struct {
+       unsigned int NumOfPreffPlmns; /**< Number of preferred plmns in the list */
+       TelNetworkPrefferedPlmnInfo_t PreffPlmnRecord[TAPI_PREFERRED_PLMN_RECORDS_MAX]; /**< preferred plmns list */
+} TelNetworkPrefferedPlmnList_t;
+
+/**
+ * This structure defines the network & time zone information.
+ */
+typedef struct {
+       int bNetworkIdentityAvail; /* if network name is carried in mm information, this shall be set as TRUE */
+       int bNetworkTimeAvail; /* if this is TURE, networkTime&Zone has a meaning, otherwise it can be ignore */
+       int bNetworkTimeZoneAvail; /* if this is TRUE, only network timezone has a meaning, otherwise it can be ignore*/
+       int bNetworkDlsAvail; /* if true, Daylight saving adjustment is valid */
+       char ShortName[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network short name */
+       char LongName[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network Long name*/
+       TelNetworkTimeAndZone_t NetworkTimeZone; /**< Network Time Zone */
+       unsigned long SysId; /**< PLMN Information */
+} TelNetworkNitzInfo_t;
+
+/**
+ *
+ * This structure defines the location area code and cell id.
+ */
+typedef struct {
+       unsigned short LocationAreaCode; /**< Network Location area code */
+       unsigned long CellId; /**< Network Cell Id */
+} TelNetworkLocationCellInfo_t;
+
+/**
+ *
+ * This structure defines the network status .
+ */
+typedef struct {
+       unsigned char svctype; /**< Network svc type  */
+       unsigned char roaming; /**< Network roaming  */
+} TelNetworkStatus_t;
+
+/**
+ *
+ * This structure defines the network Cs,Ps status.
+ */
+typedef struct {
+       unsigned char cstype; /**< Network Cs type  */
+       unsigned char pstype; /**< Network Ps type  */
+} TelNetworkCsPsStatus_t;
+
+/**
+ *   TelNetworkIdentity_t
+ * This structure defines the network identity.
+ */
+typedef struct {
+       char network_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network Name  */
+       char service_provider_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Service provider name */
+       unsigned int plmn_id; /**< PLMN ID */
+       TelNetworkPlmnType_t type_of_plmn; /**< PLMN type */
+       TelNetworkSystemType_t access_technology; /**< Access technology  */
+} TelNetworkIdentity_t;
+
+/**
+ *
+ * This structure defines the network Plmn list.
+ */
+typedef struct {
+       char networks_count; /**< Network Plmn count  */
+       TelNetworkIdentity_t network_list[TAPI_NETWORK_LIST_MAX]; /**< Network list  */
+} TelNetworkPlmnList_t;
+
+/**
+ *
+ * This structure defines the network display info.
+ */
+typedef struct {
+       int DisplayInfo[TAPI_NETWORK_DISPLAY_INFO_ELEMENTS]; /**< Network display info  */
+} TelNetworkDisplayInfo_t;
+
+typedef struct {
+       TelNetworkNameDispCondition_t DispCondition; /*Display condition of SPN & PLMN*/
+       unsigned char Spn[TAPI_NETWORK_SPN_LEN_MAX + 1]; /*Spn value*/
+       unsigned char Plmn[TAPI_NETWORK_NAME_LEN_MAX + 1]; /*PLMN value,  In 2G case if DispPlmn is true and the PLMN value is null then Network module has to display registered PLMN*/
+} TelNetworkSpnPlmnDisplayInfo_t;
+
+/**
+ *  * @struct TelNetworkSpnMccMncInfo_t
+ * This structure defines the network Spn, Mcc and Mnc info.
+ */
+typedef struct {
+       int mcc; /**< Network mcc  */
+       int mnc; /**< Network Mnc  */
+       char bDispCondition; /**<Display condition */
+       char short_network_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network short Name  */
+       char spn_name[TAPI_NETWORK_NAME_LEN_MAX]; /**< Network spn Name  */
+} TelNetworkSpnMccMncInfo_t;
+
+/**
+ * @struct TelNetworkPrlPrefOnly_t
+ * This structure defines CDMA Preferred Network Setting(CDMA only).
+ */
+typedef struct {
+       TelNetworkPrefNetType_t pref_net_type; /**< CDMA Network Preferred Type */
+       TelNetworkPrlPrefOnly_t prl_pref_only; /**< CDMA PRL Preferred Only */
+} TelNetworkRoamingMode_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_NETWORK_H_
+
+/**
+* @}
+*/
+
diff --git a/include/common/TelPower.h b/include/common/TelPower.h
new file mode 100644 (file)
index 0000000..1b551f0
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup         POWER_TAPI      POWER
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Get current phone power status,  @n
+ * - Reset the phone power (on / off), @n
+ * - Get the Display Icon Information. @n
+ */
+
+#ifndef _TEL_POWER_H_
+#define _TEL_POWER_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#include <TelDefines.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * This defines the phone power reset commands.
+ */
+typedef enum {
+       TAPI_PHONE_POWER_OFF = 0, TAPI_PHONE_POWER_ON, TAPI_PHONE_POWER_RESET,
+} tapi_power_phone_cmd_t;
+
+/**
+ * This defines the phone power status values.
+ */
+typedef enum {
+       TAPI_PHONE_POWER_STATUS_OFF = 0, TAPI_PHONE_POWER_STATUS_ON
+} tapi_power_phone_power_status_t;
+
+/**
+ * Use to Enter or Leave Flight Mode.
+ *
+ */
+typedef enum {
+       TAPI_POWER_FLIGHT_MODE_ENTER = 0x01, /**< ONLINE OFF */
+       TAPI_POWER_FLIGHT_MODE_LEAVE, /**< ONLINE ON */
+       TAPI_POWER_FLIGHT_MODE_MAX
+} tapi_power_flight_mode_type_t;
+
+typedef enum {
+       TAPI_POWER_FLIGHT_MODE_RESP_ON = 0x01, /**< Flight Mode On Success */
+       TAPI_POWER_FLIGHT_MODE_RESP_OFF, /**< Flight Mode Off Success */
+       TAPI_POWER_FLIGHT_MODE_RESP_FAIL, /**< Flight Mode Request Fail */
+       TAPI_POWER_FLIGHT_MODE_RESP_MAX
+} tapi_power_flight_mode_resp_type_t;
+
+/**
+ * This enum defines the phone battery status levels.
+ *
+ * 0x01 : Power Off Level                     => PhoneLevel = power off
+ * 0x02 : Critical-Low Battery Level          => PhoneLevel = 0
+ * 0x03 : Low Battery Level                   => PhoneLevel = 1
+ * 0x04 : Normal Level                        => PhoneLevel = 2,3,4
+ */
+typedef enum {
+       TAPI_POWER_BATT_STAT_POWER_OFF_LEVEL = 0x01, /**< Power Off Level */
+       TAPI_POWER_BATT_STAT_CRIT_LOW_LEVEL = 0x02, /**< Critical-Low Battery Level */
+       TAPI_POWER_BATT_STAT_LOW_LEVEL = 0x03, /**< Low Battery Level */
+       TAPI_POWER_BATT_STAT_NORMAL_LEVEL = 0x04 /**< Normal Level */
+} tapi_power_battery_status_level_t;
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_POWER_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/common/TelSat.h b/include/common/TelSat.h
new file mode 100644 (file)
index 0000000..191c060
--- /dev/null
@@ -0,0 +1,948 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSat.h
+
+     @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+
+
+ */
+
+#ifndef _TEL_SAT_H_
+#define _TEL_SAT_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TelCall.h>
+#include <TelSs.h>
+#include <TelSatObj.h>
+#include <TelSatProactvCmd.h>
+#include <TelSatEnvelope.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+#define TAPI_SAT_DEF_TITLE_LEN_MAX                     50 /**< max length for Menu Title */
+#define TAPI_SAT_DEF_ITEM_STR_LEN_MAX          50 /**< max length for Menu Item  */
+#define TAPI_SAT_DEF_TEXT_STRING_LEN_MAX       500 /**< max length for Text String  */
+#define TAPI_SAT_DEF_BIT_MASK_CONTACT          0x01 /**< Bit Mask for Contact */
+#define TAPI_SAT_DEF_BIT_MASK_MSG                      0x02 /**< Bit Mask for Msg */
+#define TAPI_SAT_DEF_BIT_MASK_OTHER                    0x04 /**< Bit Mask for Psh */
+#define TAPI_SAT_REFRESH_FILE_LIST                     20 /**< Refresh File List*/
+#define TAPI_SAT_DEF_SS_LEN_MAX             250
+#define TAPI_SAT_DEF_USSD_LEN_MAX           250
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony UI USER CONFIRM TYPE
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatUiUserConfirmType_t
+ * This enumeration defines the UI User Confirm Type.
+ */
+typedef enum
+{
+       TAPI_SAT_USER_CONFIRM_YES,                                              /**<This Enum Informs That user confirms yes */
+       TAPI_SAT_USER_CONFIRM_NO_OR_CANCEL,                             /**<This enum informs that user confirms no/cancel */
+       TAPI_SAT_USER_CONFIRM_HELP_INFO,                                /**<This enum informs that user wants help information */
+       TAPI_SAT_USER_CONFIRM_END,                                              /**<This enum informs that user confirms end */
+       TAPI_SAT_USER_CONFIRM_TIMEOUT,                                  /**<This enum informs that user did not respond */
+}TelSatUiUserConfirmType_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony UI INKEY TYPE
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatUiInkeyYesNoCaseType_t
+ * This enumeration defines the UI Inkey Type Yes or No.
+ */
+typedef enum
+{
+       TAPI_SAT_INKEY_CONFIRM_NO                               = 0x00,                 /**<No*/
+       TAPI_SAT_INKEY_CONFIRM_YES                              = 0x01,                 /**<Yes*/
+}TelSatUiInkeyYesNoCaseType_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony UI DISPLAY STATUS
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatUiDisplayStatusType_t
+ * This enumeration defines the UI Display Status.
+ */
+typedef enum
+{
+       TAPI_SAT_DISPLAY_SUCCESS                                = 0x00,                                 /**<This enum informs  UI display success*/
+       TAPI_SAT_DISPLAY_FAIL                                   = 0x01,                                 /**<This enum informs  UI display failure*/
+}TelSatUiDisplayStatusType_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     TELEPHONY REFRESH APPLICATION TYPE
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatRefreshAppType_t
+ * This enumeration defines the Refresh Application Type.
+ */
+ typedef enum
+{
+       TAPI_SAT_REFRESH_CONTACT = 0x00,                                /**<refresh application type - Phonebook*/
+       TAPI_SAT_REFRESH_MSG,                                                   /**<refresh application type - SMS*/
+       TAPI_SAT_REFRESH_OTHER,                                                 /**<refresh application type - other*/
+       TAPI_SAT_REFRESH_MAX,                                                   /**<Maximum Enumeration Value*/
+}TelSatRefreshAppType_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony COMMAND PERFORMED RESULT
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatCommandPerformResultType_t
+ * This enumeration defines the Result of Proactive Command execution.
+ */
+typedef enum
+{
+       TAPI_SAT_CMD_PERFORM_SUCCESS = 0x00,            /**<command performed successfully*/
+       TAPI_SAT_CMD_PERFORM_FAIL,                                      /**<command execution failed*/
+       TAPI_SAT_CMD_PERFORM_MAX,                                       /**<Maximum Enumeration Value*/
+}TelSatCommandPerformResultType_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony CALL CONTROL TYPE
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * @enum TelSatCallCtrlType_t
+ * This enumeration defines Call Control Type.
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_CNF_NONE  = 0x00,         /**<call control confirm type - None*/
+       TAPI_SAT_CALL_CNF_CALL,                 /**<call control confirm type - call*/
+       TAPI_SAT_CALL_CNF_SS,                           /**<call control confirm type - ss*/
+       TAPI_SAT_CALL_CNF_USSD,                         /**<call control confirm type - ussd*/
+       TAPI_SAT_CALL_CNF_MAX,                          /**<Maximum Enumeration Value*/
+}TelSatCallCtrlType_t;
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+///////////////////////////////////////////////////////////////////////////////////////////
+//     SAT UI USER CONFIRMATION INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the user confirmation data.
+ */
+typedef struct
+{
+       int                                             commandId;                              /**<Proactive Command Number sent by USIM*/
+       TelSatCommandType_t             commandType;                    /**<Proactive Command Type*/
+       TelSatUiUserConfirmType_t       keyType;                                /**<User Response Type*/
+       unsigned char*                          pAdditionalData;                /**<Additional Data*/
+       int                                                     dataLen;                                /**<Additional Data Length*/
+}TelSatUiUserConfirmInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony TEXT INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the character data for sat engine data structure.
+ */
+typedef struct
+{
+       unsigned short  stringLen;                                                                              /**<character data length*/
+       unsigned char           string[TAPI_SAT_DEF_TEXT_STRING_LEN_MAX+1];             /**<character data*/
+}TelSatTextInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony MAIN MENU TITLE INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the main menu title to check sat menu.
+ */
+typedef struct
+{
+       int                             bIsMainMenuPresent;             /**<flag to check sat main menu existence*/
+       TelSatTextInfo_t        mainMenuTitle;                  /**<main menu title data*/
+}TelSatMainMenuTitleInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony DISPLAY TEXT DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the display text proactive command for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                                      /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                                text;                                           /**<character data to display on screen*/
+       unsigned int                                    duration;                                       /**<the duration of display */
+       int                                                     bIsPriorityHigh;                        /**<indicates whether the text is to be displayed if some other app is using the screen.*/
+       int                                                     bIsUserRespRequired;            /**<indicates whether user response required or Not*/
+       TelSatIconIdentifierInfo_t      iconId;                                         /**< Icon Identifier */
+}TelSatDisplayTextInd_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony INKEY DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the get inkey proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                              /**<Proactive Command Number sent by USIM*/
+       TelSatInkeyType_t                               keyType;                                /**<input Type:Character Set or Yes/No*/
+       TelSatUseInputAlphabetType_t    inputCharMode;                  /**<input character mode(SMS default, UCS2)*/
+       int                                                     bIsNumeric;                             /**<is input character numeric(0-9, *, # and +)*/
+       int                                                     bIsHelpInfoAvailable;   /**<help info request flag*/
+       TelSatTextInfo_t                                text;                                   /**<character data to display on screen*/
+       unsigned int                                    duration;                               /**<the duration of display*/
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<Icon Identifier*/
+}TelSatGetInkeyInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony GET INPUT DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the get input proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                              /**<Proactive Command Number sent by USIM*/
+       TelSatUseInputAlphabetType_t    inputCharMode;                  /**<input character mode(SMS default, UCS2)*/
+       int                                                     bIsNumeric;                             /**<is input character numeric(0-9, *, # and +)*/
+       int                                                     bIsHelpInfoAvailable;   /**<flag for help info request */
+       int                                                     bIsEchoInput;                   /**<indicates whether to show input data on screen or not*/
+       TelSatTextInfo_t                                text;                                   /**<character data to display on screen*/
+       TelSatRespLenInfo_t                             respLen;                                /**<input data min, max length*/
+       TelSatTextInfo_t                                defaultText;                    /**<default input character data*/
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<Icon Identifier*/
+}TelSatGetInputInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony PLAY TONE DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the play tone proactive command data for application.
+ */
+typedef struct
+{
+       int                                             commandId;      /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;           /**<character data to display on screen*/
+       TelSatToneInfo_t                        tone;           /**<tone info   */
+       TelSatDurationInfo_t            duration;       /**<the duration for playing tone*/
+       TelSatIconIdentifierInfo_t      iconId;         /**<Icon Identifier*/
+}TelSatPlayToneInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND SMS DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send sms proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+}TelSatSendSmsIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony  SEND SS DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send ss proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+} TelSatSendSsIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND USSD DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send ussd proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+}TelSatSendUssdIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND DTMF DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send dtmf proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+}TelSatSendDtmfIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony LAUNCH BROWSER  DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the launch browser proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+}TelSatLaunchBrowserIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SETUP CALL DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the setup call proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                             commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                   /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;                 /**<Icon Identifier*/
+} TelSatSetupCallIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony MENU ITEM DATA FOR SETUP MENU
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the menu item info for setup menu.
+ */
+typedef struct
+{
+       char itemString[TAPI_SAT_DEF_ITEM_STR_LEN_MAX + 6];     /**<menu item character data*/
+       char itemId;                                                                                    /**<identifies the item on the menu that user selected*/
+}TelSatMenuInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SETUP MENU INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the sat main menu info.
+ */
+typedef struct
+{
+       int commandId;  /**<Proactive Command Number sent by USIM*/
+       int     bIsMainMenuPresent;
+       char satMainTitle[TAPI_SAT_DEF_TITLE_LEN_MAX + 1];      /**<menu title text*/
+       TelSatMenuInfo_t satMainMenuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**< menu items*/
+       unsigned short satMainMenuNum;  /**<number of menu items*/
+       int     bIsSatMainMenuHelpInfo; /**<flag for help information request */
+       int     bIsUpdatedSatMainMenu;
+       TelSatIconIdentifierInfo_t iconId;      /**<Icon Identifier*/
+       TelSatIconIdentifierListInfo_t iconIdList;      /**<List of Icon Identifiers*/
+}TelSatSetupMenuInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SELECT ITEM DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the select item proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                                                                      /**<Proactive Command Number sent by USIM*/
+       int                                                     bIsHelpInfoAvailable;                                           /**<flag for help information request*/
+       TelSatTextInfo_t                                text;                                                                           /**<menu title text*/
+       char                                                    defaultItemIndex;                                                       /**<selected default item - default value is 0*/
+       char                                                    menuItemCount;                                                          /**<number of menu items*/
+       TelSatMenuItemInfo_t                    menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX];         /**<menu items*/
+       TelSatIconIdentifierInfo_t              iconId;                                                                         /**<Icon Identifier*/
+       TelSatIconIdentifierListInfo_t  iconIdList;                                                                     /**<List of Icon Identifiers*/
+
+}TelSatSelectItemInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony IDLE MODE TEXT DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * This structure defines the setup idle mode text proactive command for idle application.
+ */
+typedef struct
+{
+       int                                             commandId;                      /**<Proactive Command Number sent by USIM*/
+       TelSatTextInfo_t                        text;                           /**<character data to display on screen*/
+       TelSatIconIdentifierInfo_t      iconId;
+} TelSatSetupIdleModeTextInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony REFRESH DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the refresh proactive command data for sat ui.
+ */
+typedef struct
+{
+       int                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
+       TelSatCmdQualiRefresh_t         refreshType;            /**<refresh mode*/
+}TelSatRefreshIndUiInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony REFRESH DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * This structure defines the refresh proactive command data for applications which are concerned with files resident on USIM .
+ */
+typedef struct
+{
+       int                                             commandId;                                                              /**<Proactive Command Number sent by USIM*/
+       TelSatRefreshAppType_t          appType;                                                                /**<concerned application type */
+       TelSatCmdQualiRefresh_t         refreshMode;                                                    /**<refresh mode*/
+       unsigned char                                   fileCount;                                                              /**<refresh file count*/
+       TelSimFileID_t                          fileId[TAPI_SAT_REFRESH_FILE_LIST];             /**<refresh file identifier*/
+}TelSatRefreshInd_t;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony END PROACTIVE COMMAND INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the data objects to indicate to sat ui, the end of execution of a specific proactive command by other application.
+ */
+typedef struct
+{
+       int                                                                     commandId;                      /**<Proactive Command Number sent by USIM*/
+       char                                                                    commandType;            /**< Command Type*/
+       TelSatCommandPerformResultType_t                result;                         /**<result of command execution by application*/
+}TelSatProactiveCmdEndIndInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND SMS DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send sms proactive command data for sms application.
+ */
+typedef struct
+{
+       int                                     commandId;                              /**<Proactive Command Number sent by USIM*/
+       int                                     bIsPackingRequired;             /**<flag to check if packing required for sms tpdu*/
+       TelSatAddressInfo_t     address;                                /**<destination address*/
+       TelSatSmsTpduInfo_t     smsTpdu;                                /**<SMS TPDU data*/
+} TelSatSendSmsIndSmsData_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND SS DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send ss proactive command data for ss application.
+ */
+typedef struct
+{
+       int                                     commandId;              /**<Proactive Command Number sent by USIM*/
+       unsigned short          ssStringLen;
+       unsigned char           ssString[TAPI_SAT_DEF_SS_LEN_MAX+1];
+}TelSatSendSsIndSsData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony USSD DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send ussd proactive command data for ussd application.
+ */
+typedef struct
+{
+       int                     commandId;              /**<Proactive Command Number sent by USIM*/
+       unsigned char           rawDcs;                 /**<data coding scheme*/
+       unsigned short          ussdStringLen;
+       unsigned char           ussdString[TAPI_SAT_DEF_USSD_LEN_MAX+1];
+}TelSatSendUssdIndUssdData_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SEND DTMF DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the send dtmf proactive command data for dtmf application.
+ */
+typedef struct
+{
+       int                                     commandId;                      /**<Proactive Command Number sent by USIM*/
+       int                                     bIsHiddenMode;          /**<hidden mode flag*/
+       TelSatTextInfo_t                dtmfString;                     /**<dtmf string data*/
+}TelSatSendDtmfIndDtmfData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SETUP CALL  DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the setup call proactive command data for call application.
+ */
+typedef struct
+{
+       int                                                     commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatCmdQualiSetupCall_t               calltype;                       /**<call type*/
+       TelSatTextInfo_t                                dispText;                       /**<display data for calling*/
+       TelSatTextInfo_t                                callNumber;             /**<call number*/
+       unsigned int                                    duration;                       /**<maximum repeat duration*/
+       TelSatIconIdentifierInfo_t              iconId;                 /**<icon identifier for call application*/
+}TelSatSetupCallIndCallData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony LAUNCH BROWSER DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the launch browser proactive command data for browser application.
+ */
+typedef struct
+{
+       int                                                     commandId;              /**<Proactive Command Number sent by USIM*/
+       TelSatUrlInfo_t                                 url;                    /**<url to connect*/
+       TelSatCmdQualiLaunchBrowser_t   launchType;             /**<launch type*/
+       TelSatBrowserIdentityType_t     IdentityType;   /**<Browser Identity -default, html, etc*/
+}TelSatLaunchBrowserIndBrowserData_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony PROVIDE LOCAL INFO DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the provide local info proactive command data for application.
+ */
+
+typedef struct
+{
+       int commandId;                                                                          /**<Proactive Command Number sent by USIM*/
+       TelSatCmdQualiProvideLocalInfo_t localInfoType;         /**<Provide Local Information Type*/
+}TelSatProvideLocalInfoInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony LANGUAGE NOTIFICATION DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the language notification proactive command data for application.
+ */
+
+typedef struct
+{
+       int                                                     commandId;                                              /**<Proactive Command Number sent by USIM*/
+       int                                                     bSpecificLanguageNotification;  /**<flag for checking specific language notification. if FALSE, non-specific language notification      */
+       TelSatLanguageInfo_t                    language;                                       /**<language info from USIM application */
+}TelSatLanguageNotiInfoInd_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony PLAY TONE RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for Play Tone proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatSetupMenuRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony REFRESH RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for refresh proactive command.
+ */
+typedef struct
+{
+       TelSatRefreshAppType_t  appType;                        /**<application type*/
+       TelSatResultType_t              resp;                           /**<result response value*/
+}TelSatRefreshRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony CALL RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+ * This structure defines the return result data for setup call proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                              resp;                                                   /**<result response value*/
+       int                                                     bIsTapiCauseExist;                              /**<flag for checking tapi error cause */
+       TelCallCause_t                                  tapiCause;                                              /**<tapi call error cause*/
+       TelSsCause_t                                            ssCause;                                                /**<tapi ss error cause*/
+       TelSatMeProblemType_t                           meProblem;                                              /**<me problem error cause*/
+       int                                                             bIsOtherInfoExist;                              /**<call control result existence flag*/
+       TelSatCallCtrlProblemType_t             permanentCallCtrlProblem;               /**<call control problem type*/
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
+       TelSatResultInfo_t                      result2;                                                /**<call control envelope result value*/
+       TelSatTextTypeInfo_t                    text;                                                   /**<call control envelope display data*/
+}TelSatCallRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SS RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for send ss proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                              resp;                                                   /**<result response value*/
+       TelSsCause_t                                            ssCause;                                                /**<error - ss cause*/
+       TelSatTextInfo_t                                        ssString;                                               /**<ss result string*/
+       TelSatMeProblemType_t                   meProblem;                                              /**<error - me problem*/
+       int                                                             bIsOtherInfoExist;                              /**<call control result exist flag*/
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<call control problem*/
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
+       TelSatResultInfo_t                                      result2;                                                /**<call control envelope result value*/
+}TelSatSsRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony USSD RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for send ussd proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                                                   /**<result response value*/
+       TelSsCause_t                                            ssCause;                                                /**<error - ss cause*/
+       TelSatTextInfo_t                                        ussdString;                                             /**<ussd result string*/
+       TelSatDataCodingSchemeInfo_t            dcsUssdString;                                  /**<dcs of ussd result string */
+       TelSatMeProblemType_t                           meProblem;                                              /**<error - me problem*/
+       int                                                             bIsOtherInfoExist;                              /**<call control result exist flag*/
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<call control problem*/
+       int                                                             bCallCtrlHasModification;               /**<call control request modification flag*/
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<call control request data*/
+       TelSatResultInfo_t                                      result2;                                                /**<call control envelope result value*/
+       TelSatTextTypeInfo_t                            text2;                                                  /**<cc envelope display data */
+}TelSatUssdRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SMS RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for send sms proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatSmsRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony DTMF RETUEN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for send dtmf proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatDtmfRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony BROWSER RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for launch browser proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**<result response value*/
+       TelSatLaunchBrowserProblemType_t    browserProblem;     /**<specific browser problem*/
+}TelSatBrowserRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony SETUP IDLE MODE TEXT RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatIdleTextRetInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony PLAY TONE RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for Play Tone proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t      resp;                   /**<result response value*/
+}TelSatPlayToneRetInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony  PROVIDE LOCAL INFO RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+{
+       TelSatResultType_t                                      resp;                   /**<result response value*/
+       int                                                             bOtherInfo;             /**<flag to check whether other information are required or not */
+       TelSatCmdQualiProvideLocalInfo_t        infoType;               /**<local info type - e.g. time zone or language info, etc      */
+       union
+       {
+               TelSatDataTimeZoneInfo_t                timeZoneInfo;   /**<    current time zone info  */
+               TelSatLanguageInfo_t                    languageInfo;   /**<    current ME language setting info        */
+       }u;                                                                                                     /**<    Union*/
+}TelSatProvideLocalRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony LANGUAGE NOTI RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**<result response value*/
+       }TelSatLanguageNotiRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony DISPLAY TEXT RETURN INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the return result data for setup idle mode text proactive command.
+ */
+typedef struct
+       {
+               TelSatResultType_t               resp;                          /**<result response value*/
+               TelSatMeProblemType_t    meProblem;                     /**<Me Problem Type */
+       }TelSatDiplayTextRetInfo_t;
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony APPLICATIONS RETURN DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the common return result data for applications proactive command.
+ */
+typedef struct
+{
+       TelSatCommandType_t     commandType;                                            /**<Proactive Command type*/
+       int commandId;                                                                                  /**<Proactive Command Number sent by USIM*/
+       union
+               {
+                       TelSatSetupMenuRetInfo_t        setupMenu;                      /**<result response value for setup menu*/
+                       TelSatRefreshRetInfo_t          refresh;                                /**<result response value for refresh*/
+                       TelSatCallRetInfo_t                     setupCall;                              /**<result response value for setup call*/
+                       TelSatSsRetInfo_t                       sendSs;                                 /**<result response value for send ss*/
+                       TelSatUssdRetInfo_t                     sendUssd;                               /**<result response value for send ussd*/
+                       TelSatSmsRetInfo_t                      sendSms;                                /**<result response value for send sms*/
+                       TelSatDtmfRetInfo_t                     sendDtmf;                               /**<result response value for send dtmf*/
+                       TelSatBrowserRetInfo_t          launchBrowser;                  /**<result response value for launch browser*/
+                       TelSatIdleTextRetInfo_t         setupIdleModeText;              /**<result response value for setup idle mode text*/
+                       TelSatLanguageNotiRetInfo_t     languageNoti;                   /**<result response value for language notification*/
+                       TelSatProvideLocalRetInfo_t provideLocalInfo;           /**<result response value for provide local info*/
+                       TelSatDiplayTextRetInfo_t   displayText;                        /**<result response value for dsiplay text*/
+                       TelSatPlayToneRetInfo_t     playTone;                           /**<result response value for play tone*/
+               }appsRet;                                                                                               /**< common union result value */
+}TelSatAppsRetInfo_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony CALL CONTROL CONFIRM  DATA FOR CALL
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the call control confirm data for call.
+ */
+typedef struct
+{
+       TelSatTextInfo_t                                address;                                        /**< call destination address*/
+       TelSatTextInfo_t                                subAddress;                                     /**< call SUB address*/
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< bc repeat indicator*/
+       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1*/
+       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2*/
+} TelSatCallCtrlIndCallData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony CALL CONTROL CONFIRM  DATA FOR SS
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the call control confirm data for ss.
+ */
+typedef struct
+{
+       TelSatTextInfo_t                                ssString;                                       /**< ss destination address*/
+       TelSatTextInfo_t                                subAddress;                                     /**< call SUB address*/
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;                      /**< bc repeat indicator*/
+       TelSatTextInfo_t                                ccp1;                                           /**< Configuration Capability Parameter 1*/
+       TelSatTextInfo_t                                ccp2;                                           /**< Configuration Capability Parameter 2*/
+} TelSatCallCtrlIndSsData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony CALL CONTROL CONFIRM  DATA FOR USSD
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the call control confirm data for ussd.
+ */
+typedef struct
+{
+       TelSatTextInfo_t                ussdString;                     /**< ussd destination address*/
+} TelSatCallCtrlIndUssdData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony READ FILE REQUEST DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the common call control confirm data.
+ */
+typedef struct
+{
+       TelSatCallType_t                        callCtrlCnfType;                                /**<call control confirm type - call, ss or ussd*/
+       TelSatCallCtrlResultType_t      callCtrlResult;                                 /**<call control result*/
+       TelSatTextInfo_t                        dispData;                                               /**<call control display data*/
+       int                                             bIsUserInfoDisplayEnabled;              /**<flag for checking existence of call control display */
+
+       union
+               {
+                       TelSatCallCtrlIndCallData_t             callCtrlCnfCallData;    /**<call control call address*/
+                       TelSatCallCtrlIndSsData_t               callCtrlCnfSsData;              /**<call control ss string*/
+                       TelSatCallCtrlIndUssdData_t             callCtrlCnfUssdData;    /**<call control ussd string*/
+               }u;                                                                                                                             /**<   Union*/
+} TelSatCallCtrlIndData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony MO SMS CONTROL CONFIRMATION DATA
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the mo sms control confirm data.
+ */
+typedef struct
+{
+       TelSatCallCtrlResultType_t              moSmsCtrlResult;                        /**<envelope result*/
+       int                                                             bIsUserInfoDisplayEnabled;      /**<display present flag*/
+       TelSatTextTypeInfo_t                    dispData;                                       /**<display data for sending SMS*/
+       TelSatTextTypeInfo_t                    rpDestAddr;                             /**<the RP_Destination_Address of the Service Center */
+       TelSatTextTypeInfo_t                    tpDestAddr;                                     /**<the TP_Destination_Address */
+} TelSatMoSmCtrlIndData_t;
+
+
+///////////////////////////////////////////////////////////////////////////////////////////
+//     Telephony EVENT LIST INFO
+///////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure defines the Event List Info.
+ */
+typedef struct
+{
+       int bIsEventDownloadActive;                     /**<Is Event Download Active*/
+       int bIsMtCallEvent;                                     /**<Is Mt Call Event*/
+       int bIsCallConnected;                           /**<Is Call Connected*/
+       int bIsCallDisconnected;                        /**<Is Call Disconnected*/
+       int bIsLocationStatus;                          /**<Is Location Status*/
+       int bIsUserActivity;                            /**<Is User Activity*/
+       int bIsIdleScreenAvailable;                     /**<Is Idle Screen Available*/
+       int bIsCardReaderStatus;                        /**<Is Card Reader Status*/
+       int bIsLanguageSelection;                       /**<Is Language Selection*/
+       int bIsBrowserTermination;                      /**<Is Browser Termination*/
+       int bIsDataAvailable;                           /**<Is Data Available*/
+       int bIsChannelStatus;                           /**<Is Channel Status*/
+}      TelSatEventListData_t;
+
+/**
+ * This is the structure to be used by the Application to send envelope/event download data.
+ * This contains the data structures to be used to send any envelope/event download data.
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t                                       eventDownloadType;                              /**<    eventDownload Type      */
+
+       union
+       {
+               int                                                                     bIdleScreenAvailable;                   /**<flag to specify whether Idle Screen is Available or not*/
+               TelSatLanguageSelectionEventReqInfo_t   languageSelectionEventReqInfo;  /**<Selected Language Information*/
+               TelSatBrowserTerminationEventReqInfo_t  browserTerminationEventReqInfo; /**<BrowserTermination Event Information        */
+               TelSatDataAvailableEventReqInfo_t               dataAvailableEventReqInfo;              /**<dataAvailableEventReqInfo   */
+               TelSatChannelStatusEventReqInfo_t               channelStatusEventReqInfo;              /**<channelStatusEventReqInfo   */
+       } u;                                                                                                                                            /**<Union*/
+} TelSatEventDownloadReqInfo_t;
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_H_ */
+
+/**
+* @}
+*/
+
diff --git a/include/common/TelSatEnvelope.h b/include/common/TelSatEnvelope.h
new file mode 100644 (file)
index 0000000..044788c
--- /dev/null
@@ -0,0 +1,274 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSatEnvelope.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi Sat envelope command Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+
+
+ */
+
+#ifndef _TEL_SAT_ENVELOPE_H_
+#define _TEL_SAT_ENVELOPE_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/**
+ * @enum TelSatCallType_t
+ * This enum indicates the SAT call type
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_TYPE_MO_VOICE = 0X00,     /**<    call type -  mo voice   */
+       TAPI_SAT_CALL_TYPE_MO_SMS,                      /**<    call type - mo sms      */
+       TAPI_SAT_CALL_TYPE_SS,                          /**<    call type -  ss */
+       TAPI_SAT_CALL_TYPE_USSD,                        /**<    call type -  ussd       */
+       TAPI_SAT_PDP_CNTXT_ACT,                         /**<    call type -  pdp context action */
+       TAPI_SAT_CALL_TYPE_MAX                          /**<    call type -  max        */
+}TelSatCallType_t;
+
+/**
+ * @enum TelSatCallCtrlResultType_t
+ * This enum indicates the result of call control by SIM.
+ */
+typedef enum
+{
+       TAPI_SAT_CALL_CTRL_R_ALLOWED_NO_MOD                     = 0,            /**<    call control result type -  ALLOWED WITH NO MOD */
+       TAPI_SAT_CALL_CTRL_R_NOT_ALLOWED                        = 1,            /**<    call control result type -  NOT ALLOWED */
+       TAPI_SAT_CALL_CTRL_R_ALLOWED_WITH_MOD           = 2,            /**<    call control result type -  ALLOWED WITH MOD    */
+       TAPI_SAT_CALL_CTRL_R_RESERVED                           = 0xFF          /**<    call control result type -  RESERVED    */
+
+} TelSatCallCtrlResultType_t;
+
+/**
+ * @enum TelSatEnvelopeResp_t
+ * This enum indicates the general result of sending an envelope command to USIM.
+ */
+typedef enum
+{
+       TAPI_SAT_ENVELOPE_SUCCESS,      /**<    envelope result - success       */
+       TAPI_SAT_ENVELOPE_SIM_BUSY,     /**<    envelope result - USIM busy     */
+       TAPI_SAT_ENVELOPE_FAILED        /**<    envelope result - failed        */
+
+}TelSatEnvelopeResp_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     8.      MENU SELECTION
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure contains the data objects for MENU SELECTION envelope.
+ */
+typedef struct
+{
+       unsigned char           itemIdentifier;         /**<    menu selection item identifier  */
+       int                             bIsHelpRequested;       /**<    flag to check whether help information required or not  */
+} TelSatMenuSelectionReqInfo_t;
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     9.1 CALL CONTROL BY SIM
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This struct contains the data objects for Call Control result data sent by USIM.
+ */
+typedef struct
+{
+       TelSatAddressInfo_t                             address;                        /**<    call number     */
+       TelSatSubAddressInfo_t                  subAddress;                     /**<    call number sub address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**<    bc repeat indicator */
+       TelSatCapaConfigParamInfo_t             ccp1;                           /**<    capability configuration parameter1     */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
+}TelSatVoiceCallCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT ss control result data sent by USIM.
+ */
+typedef struct
+{
+       TelSatSsStringInfo_t                    ssString;                       /**<    ss number       */
+       TelSatSubAddressInfo_t                  subAddress;                     /**<    ss sub address */
+       TelSatBcRepeatIndicatorType_t   bcRepeatIndicator;      /**<    bc repeat indicator     */
+       TelSatCapaConfigParamInfo_t             ccp1;                           /**<    capability configuration parameter1     */
+       TelSatCapaConfigParamInfo_t             ccp2;                           /**<    capability configuration parameter2     */
+}TelSatSsCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT mo SMS control configuration data
+ */
+typedef struct
+{
+       TelSatAddressInfo_t             rpDestAddress;  /**<    sms control rp destination address      */
+       TelSatAddressInfo_t             tpDestAddress;  /**<    sms control tp destination address      */
+} TelSatMoSmsCtrlIndInfo_t;
+
+/**
+ * This struct contains SAT call control configuration data
+ */
+typedef struct
+{
+       TelSatCallType_t                                        callType;               /**<    call type       */
+       TelSatCallCtrlResultType_t                      callCtrlResult; /**<    call control result     */
+       TelSatAlphaIdentifierInfo_t                     alphaIdentifier;/**<    alpha identifier        */
+       unsigned char                                           callId;                 /**<    call id */
+       TelSatCallType_t                                        oldCallType;    /**<    old call type   */
+       union
+       {
+               TelSatVoiceCallCtrlIndInfo_t    voiceCallData;  /**<    voice call control data */
+               TelSatSsCtrlIndInfo_t                   ssData;                 /**<    ss control data */
+               TelSatMoSmsCtrlIndInfo_t                smsData;
+       }u;                                                                                                     /**<    Union           */
+} TelSatCallCtrlIndInfo_t;
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     9.2 MO SHORT MESSAGE CONTROL BY SIM RESULT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This struct contains SAT mo ss control request data
+ */
+ typedef struct
+{
+       TelSatCallCtrlResultType_t              callCtrlResult;         /**<    call control result     */
+       TelSatAlphaIdentifierInfo_t             alphaIdentifier;        /**<    alpha identifier        */
+       TelSatMoSmsCtrlIndInfo_t                smsData;                        /**<    sms control data        */
+}TelSatMoSMCtrlResult_t;
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.5 EVENT DOWNLOAD - USER ACTIVITY EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This struct contains SAT user activity event request data
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                           eventList;                      /**<    event List      */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info  */
+
+} TelSatUserActivityEventReqInfo_t;
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.6 EVENT DOWNLOAD - IDLE SCREEN AVAILABLE EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure contains the data objects for IDLE SCREEN AVAILABLE event download.
+ */
+typedef struct
+{
+       TelSatEventDownloadType_t       eventData;      /**<    event type      */
+} TelSatIdleScreenAvailableEventReqInfo_t;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.8 EVENT DOWNLOAD - LANGUAGE SELECTION EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure contains the data objects for LANGUAGE SELECTION event download.
+ */
+typedef struct
+{
+       TelSatLanguageType_t     language;              /**<    selected language info  */
+} TelSatLanguageSelectionEventReqInfo_t;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.9 EVENT DOWNLOAD - BROWSER TERMINATION EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This structure contains the data objects for BROWSER TERMINATION event download.
+ */
+typedef struct
+{
+       TelSatBrowserTerminationCauseType_t             browserTerminationCause;        /**<    browser Termination Cause       */
+} TelSatBrowserTerminationEventReqInfo_t;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.10 EVENT DOWNLOAD - DATA AVAILABLE EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This struct contains SAT data available event request data
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                   eventList;                      /**<    event List      */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info  */
+       TelSatChannelStatusInfo_t               channelStatus;          /**<    channel status  */
+       TelSatChannelDataLengthInfo_t   channelDataLen;         /**<    channel data length     */
+
+} TelSatDataAvailableEventReqInfo_t;
+
+//////////////////////////////////////////////////////////////////////////////////////////
+//     11.11 EVENT DOWNLOAD - CHANNEL STATUS EVENT
+//////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * This struct contains SAT channel status even request data
+ */
+typedef struct
+{
+       TelSatEventListInfo_t                   eventList;                      /**<    event list      */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info  */
+       TelSatChannelStatusInfo_t               channelStatus;          /**<    channel Status  */
+} TelSatChannelStatusEventReqInfo_t;
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_ENVELOPE_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/common/TelSatObj.h b/include/common/TelSatObj.h
new file mode 100644 (file)
index 0000000..146a89f
--- /dev/null
@@ -0,0 +1,1518 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSatObj.h
+
+     @brief This file serves as a "C" header file defines structures for Telephony SAT Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+            
+            
+ */
+
+#ifndef _TEL_SAT_OBJ_H_
+#define _TEL_SAT_OBJ_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TelSim.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+#define EXTENDED_ASCII 1
+
+#define TAPI_SAT_DIALLING_NUMBER_LEN_MAX                               200      /**<   max length of dialing number            */
+#define TAPI_SAT_ALPHA_ID_LEN_MAX                                              255      /**<   max length of  alpha identifier         */
+#define TAPI_SAT_TEXT_STRING_LEN_MAX                                   500      /**<   max length of text string -when the string data is in 7Bit packed format, this length is not enough to support the maximum size so should increase the value to a value > 275 */
+#define TAPI_SAT_SUB_ADDR_LEN_MAX                                              30       /**<   max length of sub address               */
+#define TAPI_SAT_CCP_DATA_LEN_MAX                                              30       /**<   max length of ccp data          */
+#define TAPI_SAT_ITEM_TEXT_LEN_MAX                                             45       /**<   max length of item text                 */
+#define TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX                             175      /**<   max length of sms tpdu data             */
+#define TAPI_SAT_SS_STRING_LEN_MAX                                             160      /**<   max length of ss string         */
+#define TAPI_SAT_USSD_STRING_LEN_MAX                                   255      /**<   max length of ussd string               */
+#define TAPI_SAT_FILE_ID_LIST_MAX_COUNT                                        255      /**<   max count of file id list               */
+#define TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT 50       /**<   max count of items next action indication list  */
+#define TAPI_SAT_EVENT_LIST_MAX_COUNT                                  17       /**<   max count of sat event list             */
+#define TAPI_SAT_IMG_INSTANT_RAW_DATA_LEN_MAX                  256      /**<   max length of image instant raw         */
+#define TAPI_SAT_CLUT_DATA_LEN_MAX                                             256      /**<   max length of clut data                 */
+#define TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX                            50       /**<   max length of image data file name (Icon, CLUT)         */
+#define TAPI_SAT_ICON_LIST_MAX_COUNT                                   50       /**<   max count of icon list          */
+#define TAPI_SAT_DTMF_STRING_LEN_MAX                                   30       /**<   max length of dtmf string               */
+#define TAPI_SAT_DATE_TIME_AND_TIME_ZONE_LEN                   7        /**<   max length of date time and time zone           */
+#define TAPI_SAT_URL_LEN_MAX                                                   129      /**<   max length of url               */
+#define TAPI_SAT_BEARER_LIST_MAX_COUNT                                 50       /**<   max count of bearer list                */
+#define TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX                        50       /**<   max length of provisioning file path    */
+#define TAPI_SAT_BEARER_PARAMS_LEN_MAX                                 10       /**<   max length of bearer parameters                 */
+#define TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX                   255      /**<   max length of channel data string               */
+#define TAPI_SAT_CHANNEL_STATUS_LEN                                            2        /**<   max length of channel status            */
+#define TAPI_SAT_CHANNEL_ID_LEN                                                        3        /**<   max length of channel id                */
+#define TAPI_SAT_OTHER_ADDR_LEN_MAX                                            30       /**<   max length of other address             */
+#define TAPI_SAT_PORT_NUMBER_LEN                                               2        /**<   max length of port number               */
+#define TAPI_SAT_NET_ACC_NAM_LEN_MAX                                   30       /**<   max length of net acc name              */
+#define TAPI_SAT_AID_LEN_MAX                                                   128      /**<   max length of aid               */
+#define TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX                            50       /**<   max length of remote entity address     */
+#define TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT   50       /**<   max count of item text attributes list          */
+#define TAPI_SAT_MCC_CODE_LEN                                                  3        /**<   max length of mcc               */
+#define TAPI_SAT_MNC_CODE_LEN                                                  3        /**<   max length of mnc               */
+#define TAPI_SAT_LAC_CODE_LEN                                                  2        /**<   max length of lac               */
+#define TAPI_SAT_CELL_ID_LEN                                                   2        /**<   max length of cell id   */
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/**
+ * @enum TelSatAlphabetFormatType_t
+ * This enum lists the Alphabet Format.
+ */
+typedef enum
+{
+       TAPI_SAT_ALPHABET_FORMAT_SMS_DEFAULT    = 0x00, /**<    ALPHABET FROMAT SMS DEFAULT             */
+       TAPI_SAT_ALPHABET_FORMAT_8BIT_DATA              = 0x01, /**<    ALPHABET FROMAT 8BIT DATA               */
+       TAPI_SAT_ALPHABET_FORMAT_UCS2                   = 0x02, /**<    ALPHABET FROMAT UCS2            */
+       TAPI_SAT_ALPHABET_FORMAT_RESERVED               = 0x03  /**<    ALPHABET FROMAT RESERVED                */
+} TelSatAlphabetFormatType_t;
+
+/**
+ * @enum TelSatMsgClassType_t
+ * This enum lists the message class.
+ */
+typedef enum
+{
+       TAPI_SAT_MSG_CLASS_NONE                                 = 0x00, /**<    none    */
+       TAPI_SAT_MSG_CLASS_0                                    = 0x01, /**<    class 0                 */
+       TAPI_SAT_MSG_CLASS_1,                                                   /**<    class 1 Default meaning:ME-specific             */
+       TAPI_SAT_MSG_CLASS_2,                                                   /**<    class 2 SIM specific message            */
+       TAPI_SAT_MSG_CLASS_3,                                                   /**<    class 3 Default meaning: TE specific            */
+       TAPI_SAT_MSG_CLASS_RESERVED                             = 0xFF  /**<    class reserved          */
+
+} TelSatMsgClassType_t;
+
+/**
+ * @enum TelSatCommandType_t
+ * This enum lists the type of command and the next action indicator.
+ */
+typedef enum
+{
+       TAPI_SAT_CMD_TYPE_NONE                                          = 0x00, /**<    command type - None             */
+               
+       TAPI_SAT_CMD_TYPE_REFRESH                                       = 0x01, /**<    command type - refresh          */
+       TAPI_SAT_CMD_TYPE_MORE_TIME                                     = 0x02, /**<    command type - more time                */
+       TAPI_SAT_CMD_TYPE_SETUP_EVENT_LIST                      = 0x05, /**<    command type - setup event list                 */
+       TAPI_SAT_CMD_TYPE_SETUP_CALL                            = 0x10, /**<    command type - setup call               */
+       TAPI_SAT_CMD_TYPE_SEND_SS                                       = 0x11, /**<    command type - send ss          */
+       TAPI_SAT_CMD_TYPE_SEND_USSD                                     = 0x12, /**<    command type - send ussd                */
+       TAPI_SAT_CMD_TYPE_SEND_SMS                                      = 0x13, /**<    command type - send sms                 */
+       TAPI_SAT_CMD_TYPE_SEND_DTMF                     = 0x14, /**<    command type - send dtmf                */
+       TAPI_SAT_CMD_TYPE_LAUNCH_BROWSER                        = 0x15, /**<    command type - launch browser           */
+       TAPI_SAT_CMD_TYPE_PLAY_TONE                                     = 0x20, /**<    command type - play tone                */
+       TAPI_SAT_CMD_TYPE_DISPLAY_TEXT                          = 0x21, /**<    command type - display text             */
+       TAPI_SAT_CMD_TYPE_GET_INKEY                                     = 0x22, /**<    command type - get inkey                */
+       TAPI_SAT_CMD_TYPE_GET_INPUT                                     = 0x23, /**<    command type - get input                */
+       TAPI_SAT_CMD_TYPE_SELECT_ITEM                           = 0x24, /**<    command type - select item              */
+       TAPI_SAT_CMD_TYPE_SETUP_MENU                            = 0x25, /**<    command type - setup menu               */
+       TAPI_SAT_CMD_TYPE_PROVIDE_LOCAL_INFO            = 0x26, /**<    command type - provide local info               */
+       TAPI_SAT_CMD_TYPE_SETUP_IDLE_MODE_TEXT          = 0x28, /**<    command type - setup idle mode text             */
+       TAPI_SAT_CMD_TYPE_LANGUAGE_NOTIFICATION         = 0x35, /**<    command type - language notification            */
+       TAPI_SAT_CMD_TYPE_OPEN_CHANNEL                          = 0x40, /**<    command type - open channel -class e            */
+       TAPI_SAT_CMD_TYPE_CLOSE_CHANNEL                         = 0x41, /**<    command type - close channel - class e          */
+       TAPI_SAT_CMD_TYPE_RECEIVE_DATA                          = 0x42, /**<    command type - receive data -class e            */
+       TAPI_SAT_CMD_TYPE_SEND_DATA                                     = 0x43, /**<    command type - send data                */
+       TAPI_SAT_CMD_TYPE_GET_CHANNEL_STATUS            = 0x44, /**<    command type - get channel status -class e              */
+       TAPI_SAT_CMD_TYPE_END_OF_APP_EXEC                       = 0xFD, /**<    inform to End the execution of a Proactive Command*/
+       TAPI_SAT_CMD_TYPE_END_PROACTIVE_SESSION         = 0xFE, /**<    inform end proactive session            */
+       TAPI_SAT_CMD_TYPE_RESERVED                                      = 0xFF  /**<    command type - reserved         */
+} TelSatCommandType_t;
+
+/**
+ * @enum TelSatCmdQualiRefresh_t
+ * This enum lists the Command qualifier values for Refresh command.
+ */
+typedef enum
+{
+       TAPI_SAT_REFRESH_SIM_INIT_AND_FULL_FCN  = 0x00, /**<    command qualifier for REFRESH SIM INIT AND FULL FILE CHANGE_NOTIFICATION                */
+       TAPI_SAT_REFRESH_FCN                                    = 0x01, /**<    command qualifier for REFRESH FILE CHANGE NOTIFICATION          */
+       TAPI_SAT_REFRESH_SIM_INIT_AND_FCN               = 0x02, /**<    command qualifier for REFRESH SIM INIT AND FILE CHANGE NOTIFICATION             */
+       TAPI_SAT_REFRESH_SIM_INIT                               = 0x03, /**<    command qualifier for REFRESH SIM INIT          */
+       TAPI_SAT_REFRESH_SIM_RESET                              = 0x04, /**<    command qualifier for REFRESH SIM RESET         */
+       TAPI_SAT_REFRESH_3G_APPLICATION_RESET   = 0x05, /**<    command qualifier for REFRESH 3G APPLICATION RESET              */
+       TAPI_SAT_REFRESH_3G_SESSION_RESET               = 0x06, /**<    command qualifier for REFRESH 3G SESSION RESET          */
+       TAPI_SAT_REFRESH_RESERVED                               = 0xFF  /**<    command qualifier for REFRESH RESERVED          */
+} TelSatCmdQualiRefresh_t;
+
+/**
+ * @enum TelSatCmdQualiSetupCall_t
+ * This enum lists the Command qualifier values for setup call command.
+ */
+typedef enum
+{
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY                            = 0x00, /**<    command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY               */
+       TAPI_SAT_SETUP_CALL_IF_ANOTHER_CALL_NOT_BUSY_WITH_REDIAL        = 0x01, /**<    command qualifier for SETUP CALL IF ANOTHER CALL NOT BUSY WITH REDIAL           */
+       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD                         = 0x02, /**<    command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD                */
+       TAPI_SAT_SETUP_CALL_PUT_ALL_OTHER_CALLS_ON_HOLD_WITH_REDIAL     = 0x03, /**<    command qualifier for SETUP CALL PUTTING ALL OTHER CALLS ON HOLD WITH REDIAL            */
+       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS                                     = 0x04, /**<    command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS          */
+       TAPI_SAT_SETUP_CALL_DISCONN_ALL_OTHER_CALLS_WITH_REDIAL         = 0x05, /**<    command qualifier for SETUP CALL DISCONNECTING ALL OTHER CALLS WITH REDIAL              */
+       TAPI_SAT_SETUP_CALL_RESERVED                                                            = 0xFF  /**<    command qualifier for SETUP CALL RESERVED               */
+} TelSatCmdQualiSetupCall_t;
+
+/**
+ * @enum TelSatDisplayTextPriorityType_t
+ * This is associated with the command qualifier for display text.
+ */
+typedef enum
+{
+       TAPI_SAT_MSG_PRIORITY_NORMAL    = 0,    /**<    MSG PRIORITY NORMAL             */
+       TAPI_SAT_MSG_PRIORITY_HIGH              = 1             /**<    MSG PRIORITY HIGH               */
+} TelSatDisplayTextPriorityType_t;
+
+/**
+ * @enum TelSatDisplayTextMsgClearType_t
+ * This is associated with the command qualifier for display text.
+ */
+typedef enum
+{
+       TAPI_SAT_AUTO_CLEAR_MSG_AFTER_A_DELAY           = 0,    /**<    message clear type -  AUTO CLEAR MSG AFTER A DELAY              */
+       TAPI_SAT_WAIT_FOR_USER_TO_CLEAR_MSG                     = 1             /**<    message clear type -  WAIT FOR USER TO CLEAR MSG                */
+} TelSatDisplayTextMsgClearType_t;
+
+/**
+ * @enum TelSatInkeyType_t
+ * This is associated with the command qualifier for get inkey.
+ */
+typedef enum
+{
+       TAPI_SAT_INKEY_TYPE_CHARACTER_SET_ENABLED       = 0,    /**<    command qualifier for  INKEY TYPE CHARACTER SET ENABLED         */
+       TAPI_SAT_INKEY_TYPE_YES_NO_REQUESTED            = 1             /**<    command qualifier for  INKEY TYPE YES NO REQUESTED              */
+
+} TelSatInkeyType_t;
+
+/**
+ * @enum TelSatUseInputAlphabetType_t
+ * This is associated with the command qualifier for get input.
+ */
+typedef enum
+{
+       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_SMS_DEFAULT   = 1,    /**<    command qualifier for  ALPHABET TYPE SMS DEFAULT                */
+       TAPI_SAT_USER_INPUT_ALPHABET_TYPE_UCS2                  = 2             /**<    command qualifier for  ALPHABET TYPE UCS2               */
+} TelSatUseInputAlphabetType_t;
+
+/**
+ * @enum TelSatDisplayVibrateAlertType_t
+ * This is associated with the command qualifier for play tone command.
+ */
+typedef enum
+{
+       TAPI_SAT_VIBRATE_ALERT_OPTIONAL = 0,    /**<    VIBRATE ALERT UPTO THE TERMINAL         */
+       TAPI_SAT_VIBRATE_ALERT_REQUIRED = 1             /**<    VIBRATE, IF AVAILABLE, WITH TONE.               */
+} TelSatDisplayVibrateAlertType_t;
+
+/**
+ * @enum TelSatPresentationType_t
+ * This is associated with the command qualifier for select item command.
+ */
+typedef enum
+{
+       TAPI_SAT_PRESENTATION_TYPE_NOT_SPECIFIED         = 0x00,        /**<    command qualifier for PRESENTATION TYPE NOT SPECIFIED */
+       TAPI_SAT_PRESENTATION_TYPE_DATA_VALUE                    = 0x01,        /**<    command qualifier for PRESENTATION TYPE DATA VALUE              */
+       TAPI_SAT_PRESENTATION_TYPE_NAVIGATION_OPTION     = 0x02         /**<    command qualifier for PRESENTATION TYPE NAVIGATION OPTION       */
+
+} TelSatPresentationType_t;
+
+/**
+ * @enum TelSatSelectionPreferenceType_t
+ * This is associated with the command qualifier for select item command.
+ */
+typedef enum
+{
+       TAPI_SAT_SELECTION_PREFERENCE_NONE_REQUESTED    = 0,    /**<    command qualifier for SELECTION PREFERENCE NONE REQUESTED               */
+       TAPI_SAT_SELECTION_PREFERENCE_USING_SOFT_KEY    = 1             /**<    command qualifier for SELECTION PREFERENCE USING SOFT KEY               */
+} TelSatSelectionPreferenceType_t;
+
+
+/**
+ * @enum TelSatCmdQualiProvideLocalInfo_t
+ * This enum defines the Command qualifier values for provide local info command.
+ */
+typedef enum
+{
+       TAPI_SAT_PROVIDE_DATE_TIME_AND_TIME_ZONE                = 0x03, /**<    command qualifier for PROVIDE DATE TIME AND TIME ZONE           */
+       TAPI_SAT_PROVIDE_LANGUAGE_SETTING                               = 0x04, /**<    command qualifier for PROVIDE LANGUAGE SETTING          */
+       TAPI_SAT_PROVIDE_IMEISV                                                 = 0x08,
+       TAPI_SAT_PROVIDE_RESERVED                                               = 0xFF  /**<    reserved                */
+} TelSatCmdQualiProvideLocalInfo_t;
+
+/**
+ * @enum TelSatCmdQualiLaunchBrowser_t
+ * This enum defines the Command qualifier values for launch browser command.
+ */
+typedef enum
+{
+       TAPI_SAT_LAUNCH_BROWSER                                 = 0,    /**<    command qualifier for  LAUNCH BROWSER           */
+       TAPI_SAT_NOT_USED                                               = 1,    /**<    command qualifier for  NOT USED         */
+       TAPI_SAT_USE_EXISTING_BROWSER                   = 2,    /**<    command qualifier for  USE EXISTING BROWSER if secure session, do not use it.           */
+       TAPI_SAT_CLOSE_AND_LAUNCH_NEW_BROWSER   = 3,    /**<    command qualifier for CLOSE AND LAUNCH NEW BROWSER              */
+       TAPI_SAT_NOT_USED2                                              = 4,    /**<    command qualifier for  NOT USED2                */
+       TAPI_SAT_LB_RESERVED                                    = 0xFF  /**<    reserved        */
+
+} TelSatCmdQualiLaunchBrowser_t;
+
+/**
+ * @enum TelSatDeviceIdentitiesTagType_t
+ * This enum lists the device identity tag value IDs.
+ */
+typedef enum
+{
+       TAPI_SAT_DEVICE_ID_KEYPAD                       = 0x01, /**<    DEVICE ID KEYPAD                */
+       TAPI_SAT_DEVICE_ID_DISPLAY                      = 0x02, /**<    DEVICE ID DISPLAY               */
+       TAPI_SAT_DEVICE_ID_EARPIECE                     = 0x03, /**<    DEVICE ID EARPIECE              */
+
+       TAPI_SAT_DEVICE_ID_SIM                          = 0x81, /**<    DEVICE ID SIM           */
+       TAPI_SAT_DEVICE_ID_ME                           = 0x82, /**<    DEVICE ID ME            */
+       TAPI_SAT_DEVICE_ID_NETWORK                      = 0x83, /**<    DEVICE ID NETWORK               */
+
+       TAPI_SAT_DEVICE_ID_RESERVED                     = 0XFF  /**<    reserved        */
+} TelSatDeviceIdentitiesTagType_t;
+
+/**
+ * @enum TelSatTimeUnitType_t
+ * This enum lists the time units for the duration data object.
+ */
+typedef enum
+{
+       TAPI_SAT_TIME_UNIT_MINUTES                                              = 0x0,  /**<    time unit - minutes             */
+       TAPI_SAT_TIME_UNIT_SECONDS                                              = 0x01, /**<    time unit - second              */
+       TAPI_SAT_TIME_UNIT_TENTHS_OF_SECONDS                    = 0x02, /**<    time unit - tenths of seconds           */
+       TAPI_SAT_TIME_UNIT_RESERVED                                             = 0xFF  /**<    reserved        */
+
+} TelSatTimeUnitType_t;
+
+/**
+ * @enum TelSatResultType_t
+ * This enum lists the values for the RESULT data object - General Response.
+ */
+typedef enum
+{
+       TAPI_SAT_R_SUCCESS                                                                                      = 0x0,  /**<    command performed successfully */
+       TAPI_SAT_R_SUCCESS_WITH_PARTIAL_COMPREHENSION                           = 0x01, /**<    command performed with partial comprehension    */
+       TAPI_SAT_R_SUCCESS_WITH_MISSING_INFO                                            = 0x02, /**<    command performed, with missing information     */
+
+       TAPI_SAT_R_REFRESH_PERFORMED_WITH_ADDITIONAL_EFS_READ           = 0x03, /**<    REFRESH PERFORMED WITH ADDITIONAL EFS READ              */
+       TAPI_SAT_R_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED                     = 0x04, /**<    command performed but REQUESTED ICON NOT DISPLAYED                      */
+       TAPI_SAT_R_SUCCESS_BUT_MODIFIED_BY_CALL_CONTROL_BY_SIM          = 0x05, /**<    command performed but MODIFIED BY CALL CONTROL BY SIM           */
+       TAPI_SAT_R_SUCCESS_LIMITED_SERVICE                                                      = 0x06, /**<    command performed with LIMITED SERVICE          */
+       TAPI_SAT_R_SUCCESS_WITH_MODIFICATION                                            = 0x07, /**<    command performed with MODIFICATION             */
+       TAPI_SAT_R_REFRESH_PRFRMD_BUT_INDICATED_USIM_NOT_ACTIVE         = 0x08, /**<    REFRESH PERFORMED BUT INDICATED USIM NOT ACTIVE                 */
+
+       TAPI_SAT_R_PROACTIVE_SESSION_TERMINATED_BY_USER                         = 0x10, /**<    proactive sim application session terminated by user            */
+       TAPI_SAT_R_BACKWARD_MOVE_BY_USER                                                        = 0x11, /**<    backward move in the proactive sim application session request by the user              */
+       TAPI_SAT_R_NO_RESPONSE_FROM_USER                                                        = 0x12, /**<    no response from user           */
+
+       TAPI_SAT_R_HELP_INFO_REQUIRED_BY_USER                                           = 0x13, /**<    HELP INFO REQUIRED BY USER              */
+       TAPI_SAT_R_USSD_OR_SS_TRANSACTION_TERMINATED_BY_USER            = 0x14, /**<    USSD OR SS TRANSACTION TERMINATED BY USER       */
+
+       TAPI_SAT_R_ME_UNABLE_TO_PROCESS_COMMAND                                         = 0x20, /**<    ME currently unable to process command          */
+       TAPI_SAT_R_NETWORK_UNABLE_TO_PROCESS_COMMAND                            = 0x21, /**<    Network currently unable to process command             */
+       TAPI_SAT_R_USER_DID_NOT_ACCEPT_CALL_SETUP_REQ                           = 0x22, /**<    User did not accept call setup request          */
+       TAPI_SAT_R_USER_CLEAR_DOWN_CALL_BEFORE_CONN                                     = 0x23, /**<    User cleared down call before connection or network released            */
+
+       TAPI_SAT_R_INTERACTION_WITH_CC_BY_SIM_IN_TMP_PRBLM                      = 0x25, /**<    INTERACTION WITH CALL CONTROL BY SIM IN TEMPORARY PROBLEM               */
+       TAPI_SAT_R_LAUNCH_BROWSER_GENERIC_ERROR_CODE                            = 0x26, /**<    LAUNCH BROWSER GENERIC ERROR CODE               */
+
+       TAPI_SAT_R_BEYOND_ME_CAPABILITIES                                                       = 0x30, /**<    command beyond ME's capabilities                */
+       TAPI_SAT_R_COMMAND_TYPE_NOT_UNDERSTOOD_BY_ME                            = 0x31, /**<    command type not understood by ME               */
+       TAPI_SAT_R_COMMAND_DATA_NOT_UNDERSTOOD_BY_ME                            = 0x32, /**<    command data not understood by ME               */
+       TAPI_SAT_R_COMMAND_NUMBER_NOT_KNOWN_BY_ME                                       = 0x33, /**<    command number not known by ME          */
+       TAPI_SAT_R_SS_RETURN_ERROR                                                                      = 0x34, /**<    SS return error         */
+       TAPI_SAT_R_SMS_RP_ERROR                                                                         = 0x35, /**<    SMS rp-error            */
+       TAPI_SAT_R_ERROR_REQUIRED_VALUES_ARE_MISSING                            = 0x36, /**<    Error, required values are missing              */
+
+       TAPI_SAT_R_USSD_RETURN_ERROR                                                            = 0x37, /**<    USSD_RETURN_ERROR               */
+       TAPI_SAT_R_INTRCTN_WITH_CC_OR_SMS_CTRL_PRMNT_PRBLM                      = 0x39, /**<    INTERACTION WITH CALL CONTROL OR SMS CONTROL PERMANENT PROBLEM          */
+       TAPI_SAT_R_BEARER_INDEPENDENT_PROTOCOL_ERROR                            = 0x3A, /**<    BEARER INDEPENDENT PROTOCOL ERROR               */
+       TAPI_SAT_R_FRAMES_ERROR                                                                         = 0x3C  /**<    FRAMES ERROR            */
+} TelSatResultType_t;
+
+
+/**
+ * @enum TelSatMeProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object and specifies a particular ME PROBLEM.
+ */
+typedef enum
+{
+       TAPI_SAT_ME_PROBLEM_NO_SPECIFIC_CAUSE                                   = 0x0,  /**<    ME problem with NO SPECIFIC CAUSE               */
+       TAPI_SAT_ME_PROBLEM_SCREEN_BUSY                                                 = 0x01, /**<    ME problem with SCREEN BUSY             */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_CALL                                             = 0x02, /**<    ME problem with ME BUSY ON CALL         */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SS                                               = 0x03, /**<    ME problem with ME_BUSY ON SS           */
+       TAPI_SAT_ME_PROBLEM_NO_SERVICE                                                  = 0x04, /**<    ME problem with NO SERVICE              */
+       TAPI_SAT_ME_PROBLEM_ACCESS_CONTROL_CLASS_BAR                    = 0x05, /**<    ME problem with ACCESS CONTROL CLASS BAR                */
+       TAPI_SAT_ME_PROBLEM_RADIO_RES_NOT_GRANTED                               = 0x06, /**<    ME problem with RADIO RES NOT GRANTED           */
+       TAPI_SAT_ME_PROBLEM_NOT_IN_SPEECH_CALL                                  = 0x07, /**<    ME problem with NOT IN SPEECH CALL      */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_USSD                                             = 0x08, /**<    ME problem with ME BUSY ON USSD         */
+       TAPI_SAT_ME_PROBLEM_ME_BUSY_ON_SEND_DTMF_CMD                    = 0x09, /**<    ME problem with ME BUSY ON SEND DTMF CMD        */
+       TAPI_SAT_ME_PROBLEM_NO_USIM_ACTIVE                                              = 0x0A, /**<    ME problem with NO USIM ACTIVE          */
+       TAPI_SAT_ME_PROBLEM_INVALID                                                     = 0xFF  /**<    ME problem with INVALID                 */
+} TelSatMeProblemType_t;
+
+/**
+ * @enum TelSatNetworkProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object and specifies a particular network PROBLEM.
+ */
+typedef enum
+{
+       TAPI_SAT_NETWORK_PROBLEM_NO_SPECIFIC_CAUSE              = 0x0,  /**<    Network problem with no specific cause          */
+       TAPI_SAT_NETWORK_PROBLEM_USER_BUSY                              = 0x91  /**<    Network problem with USER BUSY          */
+} TelSatNetworkProblemType_t;
+
+/**
+ * @enum TelSatSsProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND SS.
+ */
+typedef enum
+{
+       TAPI_SAT_SS_PROBLEM_NO_SPECIFIC_CAUSE                   = 0,    /**<    SS problem with no specific cause               */
+       TAPI_SAT_SS_PROBLEM_FACILITY_NOT_SUPPORTED              = 0x15  /**<    SS problem with FACILITY NOT SUPPORTED          */
+} TelSatSsProblemType_t;
+
+/**
+ * @enum TelSatSmsProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND SMS.
+ */
+typedef enum
+{
+       TAPI_SAT_SMS_PROBLEM_NO_SPECIFIC_CAUSE                  = 0     /**<    SMS problem with no specific cause              */
+} TelSatSmsProblemType_t;
+
+/**
+ * @enum TelSatUssdProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to SEND USSD STRING.
+ */
+typedef enum
+{
+       TAPI_SAT_USSD_PROBLEM_NO_SPECIFIC_CAUSE                 = 0,    /**<    USSD problem with no specific cause             */
+       TAPI_SAT_USSD_PROBLEM_UNKNOWN_ALPHABET                  = 0x47  /**<    USSD problem with UNKNOWN ALPHABET              */
+
+} TelSatUssdProblemType_t;
+
+/**
+ * @enum TelSatCallCtrlProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to CALL CONTROL or MO SMS CONTROL.
+ */
+typedef enum
+{
+       TAPI_SAT_CC_PROBLEM_NO_SPECIFIC_CAUSE                   = 0,    /**<    Call Control problem with no specific cause             */
+       TAPI_SAT_CC_PROBLEM_ACTION_NOT_ALLOWED                  = 1,    /**<    Call Control problem with action not allowed    */
+       TAPI_SAT_CC_PROBLEM_REQUEST_TYPE_HAS_CHANGED    = 2             /**<    Call Control problem with request type has changed      */
+} TelSatCallCtrlProblemType_t;
+
+/**
+ * @enum TelSatLaunchBrowserProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object related to LAUNCH BROWSER PROBLEM
+ */
+typedef enum
+{
+       TAPI_SAT_BROWSER_PROBLEM_NO_SPECIFIC_CAUSE                      = 0,    /**<    Browser problem with no specific cause          */
+       TAPI_SAT_BROWSER_PROBLEM_BEARER_UNAVAILABLE                     = 1,    /**<    Browser problem with bearer unavailable         */
+       TAPI_SAT_BROWSER_PROBLEM_BROWSER_UNAVAILABLE            = 2,    /**<    Browser problem with browser unavailable                */
+       TAPI_SAT_BROWSER_PRBLM_ME_UNABLE_TO_READ_PROV_DATA      = 3             /**<    Browser problem with ME unable to read provisioning data                */
+
+} TelSatLaunchBrowserProblemType_t;
+
+/**
+ * @enum TelSatBipProblemType_t
+ * This enum lists the values for the Additional response for the RESULT object.
+ *  Permanent Problems  ::: 12.12.11 ADDITIONAL INFORMATION :  BEARER INDEPENDENT PROTOCOL
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_PROBLEM_NO_SPECIFIC_CAUSE                  = 0x00, /**<    BIP problem with no specific cause      */
+       TAPI_SAT_BIP_PROBLEM_NO_CHANNEL_AVAILABLE               = 0x01, /**<    BIP problem with no channel available           */
+       TAPI_SAT_BIP_PROBLEM_CHANNEL_CLOSED                             = 0x02, /**<    BIP problem with channel closed                 */
+       TAPI_SAT_BIP_PROBLEM_CHANNEL_ID_NOT_VALID               = 0x03, /**<    BIP problem with channel id not valid           */
+       TAPI_SAT_BIP_PROBLEM_BUF_SIZE_NOT_AVAILABLE             = 0x04, /**<    BIP problem with buffer size not available              */
+       TAPI_SAT_BIP_PROBLEM_SECURITY_ERROR                             = 0x05, /**<    BIP problem with security error                 */
+       TAPI_SAT_BIP_PRBLM_SIM_ME_IF_TRNSPRT_LEVEL_NOT_AVL      = 0x06, /**<    BIP problem with SIM ME interface transport level not available         */
+       TAPI_SAT_BIP_REMOTE_DEV_NOT_REACHABLE                           = 0x07, /**<    BIP problem with remote device not reachable            */
+       TAPI_SAT_BIP_SERVICE_ERROR                                                      = 0x08, /**<    BIP service error               */
+       TAPI_SAT_BIP_SERVICE_IDENTIFIER_UNKNOWN                         = 0x09  /**<    BIP service identifier unknown          */
+
+} TelSatBipProblemType_t;
+
+/**
+ * @enum TelSatSmsTpduType_t
+ * This enum lists the values for the SMS TPDU type.
+ */
+typedef enum
+{
+       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_TPDU             = 0,    /**<    sms tpdu type - DELIVER TPDU    */
+       TAPI_SAT_SMS_TPDU_TYPE_DELIVER_RPT              = 1,    /**<    sms tpdu type - DELIVER RPT     */
+       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_TPDU              = 2,    /**<    sms tpdu type - SUBMIT TPDU             */
+       TAPI_SAT_SMS_TPDU_TYPE_SUBMIT_RPT               = 3,    /**<    sms tpdu type - SUBMIT RPT      */
+       TAPI_SAT_SMS_TPDU_TYPE_STATUS_RPT               = 4,    /**<    sms tpdu type - STATUS RPT      */
+       TAPI_SAT_SMS_TPDU_TYPE_TPDU_CMD                 = 5             /**<    sms tpdu type - TPDU CMD        */
+
+} TelSatSmsTpduType_t;
+
+/**
+ * @enum TelSatToneType_t
+ * This enum lists the values tones type.
+ */
+typedef enum
+{
+       // standard supervisory tones
+       TAPI_SAT_DIAL_TONE                                      = 0x01, /**<    TONE TYPE DIAL TONE             */
+       TAPI_SAT_CALLED_SUBSCRIBER_BUSY         = 0x02, /**<    TONE TYPE CALLED SUBSCRIBER BUSY                */
+       TAPI_SAT_CONGESTION                                     = 0x03, /**<    TONE TYPE CONGESTION    */
+       TAPI_SAT_RADIO_PATH_ACK                         = 0x04, /**<    TONE TYPE RADIO PATH ACK        */
+       TAPI_SAT_RADIO_PATH_NOT_AVAILABLE_CALL_DROPPED  = 0x05, /**<    TONE TYPE RADIO PATH NOT AVAILABLE CALL DROPPED */
+       TAPI_SAT_ERR_SPECIAL_INFO                                               = 0x06, /**<    TONE TYPE ERR SPECIAL INFO      */
+       TAPI_SAT_CALL_WAITING_TONE                                              = 0x07, /**<    TONE TYPE CALL WAITING TONE             */
+       TAPI_SAT_RINGING_TONE                                                   = 0x08, /**<    TONE TYPE RINGING TONE  */
+
+       // ME proprietary tones
+       TAPI_SAT_GENERAL_BEEP                                   = 0x10, /**<    TONE TYPE GENERAL BEEP          */
+       TAPI_SAT_POSITIVE_ACK_TONE                              = 0x11, /**<    TONE TYPE POSITIVE ACK TONE             */
+       TAPI_SAT_NEGATIVE_ACK_OR_ERROR_TONE             = 0x12, /**<    TONE TYPE NEGATIVE ACK OR ERROR TONE            */
+       TAPI_SAT_RINGING_TONE_SLCTD_BY_USR_FOR_INCOM_SPEECH_CALL         = 0x13,        /**<    TONE TYPE RINGING TONE SELECTED BY USER FOR INCOMING SPEECH CALL                */
+       TAPI_SAT_ALERT_TONE_SELECTED_BY_USER_FOR_INCOMING_SMS            = 0x14,        /**<    TONE TYPE ALERT TONE SELECTED BY USER FOR INCOMING SMS          */
+       TAPI_SAT_CRITICAL_ALERT                                 = 0x15, /**<    TONE TYPE CRITICAL ALERT                */
+
+       //Themed tones
+       TAPI_SAT_HAPPY_TONE                                             = 0x30, /**<    TONE TYPE HAPPY TONE            */
+       TAPI_SAT_SAD_TONE                                               = 0x31, /**<    TONE TYPE SAD TONE                      */
+       TAPI_SAT_URGENT_ACTION_TONE                             = 0x32, /**<    TONE TYPE URGENT ACTION TONE            */
+       TAPI_SAT_QUESTION_TONE                                  = 0x33, /**<    TONE TYPE QUESTION TONE                 */
+       TAPI_SAT_MESSAGE_RECEIVED_TONE                  = 0x34, /**<    TONE TYPE MESSAGE RECEIVED TONE                 */
+
+       //Melody tones
+       TAPI_SAT_MELODY_1               = 0x40, /**<    TONE TYPE MELODY 1              */
+       TAPI_SAT_MELODY_2               = 0x41, /**<    TONE TYPE MELODY 2              */
+       TAPI_SAT_MELODY_3               = 0x42, /**<    TONE TYPE MELODY 3              */
+       TAPI_SAT_MELODY_4               = 0x43, /**<    TONE TYPE MELODY 4              */
+       TAPI_SAT_MELODY_5               = 0x44, /**<    TONE TYPE MELODY 5              */
+       TAPI_SAT_MELODY_6               = 0x45, /**<    TONE TYPE MELODY 6              */
+       TAPI_SAT_MELODY_7               = 0x46, /**<    TONE TYPE MELODY 7              */
+       TAPI_SAT_MELODY_8               = 0x47, /**<    TONE TYPE MELODY 8              */
+
+       TAPI_SAT_TONE_TYPE_RESERVED             = 0xFF  /**<    TONE TYPE RESERVED              */
+} TelSatToneType_t;
+
+/**
+ * @enum TelSatEventDownloadType_t
+ * This enum lists event types required by ME to monitor and report to SIM.
+ */
+typedef enum
+{
+       TAPI_EVENT_SAT_DW_TYPE_MT_CALL                                                  = 0,
+       TAPI_EVENT_SAT_DW_TYPE_CALL_CONNECTED                                   = 1,
+       TAPI_EVENT_SAT_DW_TYPE_CALL_DISCONNECTED                                = 2,
+       TAPI_EVENT_SAT_DW_TYPE_LOCATION_STATUS                                  = 3,
+       TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY                                    = 4,    /**<    data download type - USER_ACTIVITY              */
+       TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE                    = 5,    /**<    data download type - IDLE SCREEN AVAILABLE              */      
+       TAPI_EVENT_SAT_DW_TYPE_CARD_READER_STATUS                               = 6,
+       TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION                               = 7,    /**<    data download type - LANGUAGE SELECTION         */
+       TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION                              = 8,    /**<    data download type - BROWSER TERMINATION                */
+       TAPI_EVENT_SAT_DW_TYPE_DATA_AVAILABLE                                   = 9,    /**<    data download type -DATA AVAILABLE              */
+       TAPI_EVENT_SAT_DW_TYPE_CHANNEL_STATUS                                   = 0x0A, /**<    data download type - CHANNEL STATUS             */
+       TAPI_EVENT_SAT_DW_TYPE_ACCESS_TECHNOLOGY_CHANGED                = 0x0B,
+       TAPI_EVENT_SAT_DW_TYPE_DISPLAY_PARAMETERS_CHANGED               = 0x0C,
+       TAPI_EVENT_SAT_DW_TYPE_LOCAL_CONNECTION                                 = 0x0D,
+       TAPI_EVENT_SAT_DW_TYPE_NW_SEARCH_MODE_CHANGED                   = 0X0E,
+       TAPI_EVENT_SAT_DW_TYPE_BROWSING_STATUS                                  = 0X0F,
+       TAPI_EVENT_SAT_DW_TYPE_FRAMES_INFORMATION_CHANGED               = 0X10,
+       TAPI_EVENT_SAT_DW_TYPE_RESERVED_FOR_3GPP                                = 0X11,
+       TAPI_EVENT_SAT_DW_TYPE_UNKNOWN                                                  = 0xFF  /**<    data download type - unknown            */
+} TelSatEventDownloadType_t;
+
+/**
+ * @enum TelSatImageCodingSchemeType_t
+ * This enum lists image coding scheme types required by ME to show.
+ */
+typedef enum
+{
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_BASIC          = 0x11, /**<    IMAGE CODING SCHEME BASIC               */
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_COLOUR         = 0x21, /**<    IMAGE CODING SCHEME COLOUR              */
+       TAPI_SAT_SIM_IMAGE_CODING_SCHEME_RESERVED       = 0xFF  /**<       RESERVED             */
+
+} TelSatImageCodingSchemeType_t;
+
+/**
+ * @enum TelSatIconQualifierType_t
+ * This enum defines the icon qualifier.
+ */
+typedef enum
+{
+       TAPI_SAT_ICON_QUALI_SELF_EXPLANATORY            = 0,            /**<    ICON QUALI SELF EXPLANATORY     */
+       TAPI_SAT_ICON_QUALI_NOT_SELF_EXPLANATORY        = 1,            /**<    ICON QUALI NOT SELF EXPLANATORY         */
+       TAPI_SAT_ICON_QUALI_RESERVED                            = 0xFF          /**<      RESERVED      */
+
+} TelSatIconQualifierType_t;
+
+/**
+ * @enum TelSatBcRepeatIndicatorType_t
+ * This enum defines the SIM ATK BC repeat indicator type.
+ */
+typedef enum
+{
+       TAPI_SAT_BC_REPEAT_INDI_ALTERNATE_MODE  = 0x01, /**<    BC REPEAT ALTERNATE MODE                */
+       TAPI_SAT_BC_REPEAT_INDI_SEQUENTIAL_MODE = 0x03, /**<    BC REPEAT SEQUENTIAL MODE               */
+       TAPI_SAT_BC_REPEAT_INDI_RESERVED                = 0xFF  /**<    RESERVED        */
+
+} TelSatBcRepeatIndicatorType_t;
+
+/**
+ * @enum TelSatCallCtrlStringType_t
+ * This enum defines call control string type.
+ */
+typedef enum
+{
+       TAPI_SAT_CC_VOICE                        = 0x00,        /**<    Call Control String Type - voice                */
+       TAPI_SAT_CC_SS                           = 0x01,        /**<    Call Control String Type - ss           */
+       TAPI_SAT_CC_USSD                         = 0x02,        /**<    Call Control String Type - ussd         */
+       TAPI_SAT_CC_NONE                     = 0xFF             /**<    Call Control String Type - none                 */
+}TelSatCallCtrlStringType_t;
+
+/**
+ * @enum TelSatLanguageType_t
+ * This enum lists the language values.
+ */
+typedef enum
+{
+       TAPI_SAT_LP_GERMAN                              = 0x00, /**<    GERMAN          */
+       TAPI_SAT_LP_ENGLISH                             = 0x01, /**<    ENGLISH         */
+       TAPI_SAT_LP_ITALIAN                             = 0x02, /**<    ITALIAN         */
+       TAPI_SAT_LP_FRENCH                              = 0x03, /**<    FRENCH          */
+       TAPI_SAT_LP_SPANISH                             = 0x04, /**<    SPANISH         */
+       TAPI_SAT_LP_DUTCH                               = 0x05, /**<    DUTCH           */
+       TAPI_SAT_LP_SWEDISH                             = 0x06, /**<    SWEDISH */
+       TAPI_SAT_LP_DANISH                              = 0x07, /**<    DANISH  */
+       TAPI_SAT_LP_PORTUGUESE                  = 0x08, /**<    PORTUGUESE      */
+       TAPI_SAT_LP_FINNISH                             = 0x09, /**<    FINNISH */
+       TAPI_SAT_LP_NORWEGIAN                   = 0x0A, /**<    NORWEGIAN       */
+       TAPI_SAT_LP_GREEK                               = 0x0B, /**<    GREEK   */
+       TAPI_SAT_LP_TURKISH                             = 0x0C, /**<    TURKISH */
+       TAPI_SAT_LP_HUNGARIAN                   = 0x0D, /**<    HUNGARIAN       */
+       TAPI_SAT_LP_POLISH                              = 0x0E, /**<    POLISH  */
+       TAPI_SAT_LP_LANG_UNSPECIFIED    = 0x0F  /**<    LANGUAGE UNSPECIFIED    */
+}TelSatLanguageType_t;
+
+/**
+ * @enum TelSatBrowserIdentityType_t
+ * This enum lists the SAT browser identity type.
+ */
+typedef enum
+{
+       TAPI_SAT_BROWSER_ID_DEFAULT                     = 0x0,  /**<    DEFAULT BROWSER                 */
+       TAPI_SAT_BROWSER_ID_WML,                                        /**<    BROWSER WML     */
+       TAPI_SAT_BROWSER_ID_HTML,                                       /**<    BROWSER HTML    */
+       TAPI_SAT_BROWSER_ID_XHTML,                                      /**<    BROWSER XHTML   */
+       TAPI_SAT_BROWSER_ID_CHTML,                                      /**<    BROWSER CHTML   */
+       TAPI_SAT_BROWSER_ID_RESERVED            = 0xFF  /**<    RESERVED        */
+} TelSatBrowserIdentityType_t;
+
+/**
+ * @enum TelSatBearerType_t
+ * This enum lists the SAT bearer type.
+ */
+typedef enum
+{
+       TAPI_SAT_BEARER_TYPE_SMS                        = 0x0,  /**<    BEARER SMS              */
+       TAPI_SAT_BEARER_TYPE_CSD                        = 0x1,  /**<    BEARER CSD              */
+       TAPI_SAT_BEARER_TYPE_USSD                       = 0x2,  /**<    BEARER USSD             */
+       TAPI_SAT_BEARER_TYPE_GPRS                       = 0x3,  /**<    BEARER GPRS             */
+       TAPI_SAT_BEARER_TYPE_RESERVED           = 0xFF  /**<    BEARER RESERVED         */
+
+} TelSatBearerType_t;
+
+/**
+ * @enum TelSatBrowserTerminationCauseType_t
+ * This enum lists the SAT browser termination cause type.
+ */
+typedef enum
+{
+       TAPI_SAT_BROWSER_TERMINATED_BY_USER                     = 0,    /**<    BROWSER TERMINATED BY USER              */
+       TAPI_SAT_BROWSER_TERMINATED_BY_ERROR        = 1,        /**<    BROWSER TERMINATED BY ERROR             */
+} TelSatBrowserTerminationCauseType_t;
+
+/**
+ * @enum TelSatBearerDescType_t
+ * This enum lists the SAT bearer destination type.
+ */
+typedef enum
+{
+       TAPI_SAT_BEARER_CSD                     = 0x1,  /**<    BEARER DESC CSD                 */
+       TAPI_SAT_BEARER_GPRS            = 0x2,  /**<    BEARER DESC GPRS                */
+       TAPI_SAT_BEARER_DEFAULT_BEARER_FROM_TRANSPORT_LAYER     = 0x3,  /**<    BEARER DESC DEFAULT BEARER FROM TRANSPORT LAYER         */
+       TAPI_SAT_BEARER_LOCAL_LINK_TECHNOLOGY_INDEPENDENT       = 0x4,  /**<    BEARER DESC LOCAL LINK TECHNOLOGY INDEPENDENT           */
+       TAPI_SAT_BEARER_BLUETOOTH   = 0x5,      /**<    BEARER DESC BLUETOOTH   */
+       TAPI_SAT_BEARER_IrDA            = 0x6,  /**<    BEARER DESC IrDA        */
+       TAPI_SAT_BEARER_RS232           = 0x7,  /**<    BEARER DESC RS232       */
+       TAPI_SAT_BEARER_USB             = 0x10, /**<    BEARER DESC USB */
+       TAPI_SAT_BEARER_RESERVED        = 0xFF  /**<    RESERVED        */
+} TelSatBearerDescType_t;
+
+
+/**
+ * @enum TelSatBearerParamCsdDataRateType_t
+ * This enum lists the SAT bearer parameter csd data rate. refer TS 27.007
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_DR_AUTOBAUDING             = 0,    /**<    CSD data rate - AUTOBAUDING             */
+       TAPI_SAT_BIP_DR_300BPS_V21                      = 1,    /**<    CSD data rate -300BPS V21               */
+       TAPI_SAT_BIP_DR_1200BPS_V22                     = 2,    /**<    CSD data rate - 1200BPS V22             */
+       TAPI_SAT_BIP_DR_1200_75BPS_V23          = 3,    /**<    CSD data rate -1200 75BPS V23                   */
+       TAPI_SAT_BIP_DR_2400BPS_V22                     = 4,    /**<    CSD data rate -2400BPS V22              */
+       TAPI_SAT_BIP_DR_2400BPS_V26                     = 5,    /**<    CSD data rate - 2400BPS V26                     */
+       TAPI_SAT_BIP_DR_4800BPS_V32             = 6,    /**<    CSD data rate - 4800BPS V32             */
+       TAPI_SAT_BIP_DR_9600BPS_V32             = 7,    /**<    CSD data rate - 9600BPS V32             */
+       TAPI_SAT_BIP_DR_9600BPS_V34             = 12,   /**<    CSD data rate - 9600BPS_V34             */
+       TAPI_SAT_BIP_DR_14400BPS_V34            = 14,   /**<    CSD data rate -14400BPS V34             */
+       TAPI_SAT_BIP_DR_19200BPS_V34            = 15,   /**<    CSD data rate -19200BPS V34             */
+       TAPI_SAT_BIP_DR_28800BPS_V34            = 16,   /**<    CSD data rate -28800BPS V34             */
+       TAPI_SAT_BIP_DR_33600BPS_V34            = 17,   /**<    CSD data rate -33600BPS V34             */
+       TAPI_SAT_BIP_DR_1200BPS_V120            = 34,   /**<    CSD data rate -1200BPS V120             */
+       TAPI_SAT_BIP_DR_2400BPS_V120            = 36,   /**<    CSD data rate -2400BPS V120             */
+       TAPI_SAT_BIP_DR_4800BPS_V120            = 38,   /**<    CSD data rate -4800BPS V120             */
+       TAPI_SAT_BIP_DR_9600BPS_V120            = 39,   /**<    CSD data rate -9600BPS V120             */
+       TAPI_SAT_BIP_DR_14400BPS_V120           = 43,   /**<    CSD data rate -14400BPS V120            */
+       TAPI_SAT_BIP_DR_19200BPS_V120           = 47,   /**<    CSD data rate -19200BPS V120            */
+       TAPI_SAT_BIP_DR_28800BPS_V120           = 48,   /**<    CSD data rate -28800BPS V120            */
+       TAPI_SAT_BIP_DR_38400BPS_V120           = 49,   /**<    CSD data rate -38400BPS V120            */
+       TAPI_SAT_BIP_DR_48000BPS_V120           = 50,   /**<    CSD data rate -48000BPS V120            */
+       TAPI_SAT_BIP_DR_56000BPS_V120           = 51,   /**<    CSD data rate -56000BPS V120            */
+       TAPI_SAT_BIP_DR_300BPS_V110             = 65,   /**<    CSD data rate - 300BPS V110             */
+       TAPI_SAT_BIP_DR_1200BPS_V110            = 66,   /**<    CSD data rate -1200BPS V110             */
+       TAPI_SAT_BIP_DR_2400BPS_V110_OR_X31_FALG_STUFFING       = 68,   /**<    CSD data rate - 2400BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_4800BPS_V110_OR_X31_FALG_STUFFING       = 70,   /**<    CSD data rate - 4800BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_9600BPS_V110_OR_X31_FALG_STUFFING       = 71,   /**<    CSD data rate - 9600BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_14400BPS_V110_OR_X31_FALG_STUFFING  = 75,       /**<    CSD data rate - 14400BPS V110 OR X31 FALG STUFFING              */
+       TAPI_SAT_BIP_DR_19200BPS_V110_OR_X31_FALG_STUFFING  = 79,       /**<    CSD data rate -19200BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_28800BPS_V110_OR_X31_FALG_STUFFING  = 80,       /**<    CSD data rate -28800BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_38400BPS_V110_OR_X31_FALG_STUFFING  = 81,       /**<    CSD data rate -38400BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_48000BPS_V110_OR_X31_FALG_STUFFING  = 82,       /**<    CSD data rate -48000BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_56000BPS_V110_OR_X31_FALG_STUFFING  = 83,       /**<    CSD data rate -56000BPS V110 OR X31 FALG STUFFING               */
+       TAPI_SAT_BIP_DR_64000BPS                                        = 84,   /**<    CSD data rate -64000BPS                 */
+       TAPI_SAT_BIP_DR_56000BPS_BIT_TRANSPERENT        = 115,  /**<    CSD data rate -56000BPS BIT TRANSPERENT                 */
+       TAPI_SAT_BIP_DR_64000BPS_BIT_TRANSPERENT        = 116,  /**<    CSD data rate -64000BPS BIT TRANSPERENT                 */
+       TAPI_SAT_BIP_DR_32000BPS_PIAFS32K                       = 120,  /**<    CSD data rate -32000BPS PIAFS32K                */
+       TAPI_SAT_BIP_DR_64000BPS_PIAFS64K                       = 121,  /**<    CSD data rate - 64000BPS PIAFS64K               */
+       TAPI_SAT_BIP_DR_28800BPS_MULTIMEDIA                     = 130,  /**<    CSD data rate -28800BPS MULTIMEDIA              */
+       TAPI_SAT_BIP_DR_32000BPS_MULTIMEDIA                     = 131,  /**<    CSD data rate -32000BPS MULTIMEDIA              */
+       TAPI_SAT_BIP_DR_33600BPS_MULTIMEDIA                     = 132,  /**<    CSD data rate - 33600BPS MULTIMEDIA             */
+       TAPI_SAT_BIP_DR_56000BPS_MULTIMEDIA                     = 133,  /**<    CSD data rate -56000BPS MULTIMEDIA              */
+       TAPI_SAT_BIP_DR_64000BPS_MULTIMEDIA                     = 134   /**<    CSD data rate -64000BPS MULTIMEDIA              */
+
+}TelSatBearerParamCsdDataRateType_t;
+
+/**
+ * @enum TelSatBearerParamCsdBearerServiceType_t
+ * This enum lists the SAT bearer parameter csd bearer service
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_UDI      =0,     /**<    CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS UDI              */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC           =1,     /**<    CSD Bearer service - DATA CIRCUIT SYNCHRONOUS UDI               */
+       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_UDI        =2,     /**<    CSD Bearer service - PAD ACCESS ASYNCHRONOUS UDI                        */
+       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC          =3,     /**<    CSD Bearer service - PACKET ACCESS SYNCHRONOUS UDI              */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_ASYNC_RDI      =4,     /**<    CSD Bearer service - DATA CIRCUIT ASYNCHRONOUS RDI              */
+       TAPI_SAT_BIP_CSD_BS_DATA_CIRCUIT_SYNC_RDI       =5,     /**<    CSD Bearer service - DATA CIRCUIT SYNCHRONOUS RDI               */
+       TAPI_SAT_BIP_CSD_BS_PAD_ACCESS_ASYNC_RDI        =6,     /**<    CSD Bearer service - PAD ACCESS ASYNCHRONOUS RDI                */
+       TAPI_SAT_BIP_CSD_BS_PACKET_ACCESS_SYNC_RDI      =7      /**<    CSD Bearer service - PACKET ACCESS SYNCHRONOUS RDI              */
+
+}TelSatBearerParamCsdBearerServiceType_t;
+
+/**
+ * @enum TelSatBearerParamCsdConnectionElementType_t
+ * This enum lists the SAT bearer parameter csd connection element
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_CSD_CONN_ELEM_TRANSPARENT                                  = 0,    /**<    CSD connection element - TRANSPARENT            */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_NON_TRANSPARENT                              = 1,    /**<    CSD connection element - NON TRANSPARENT                */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_TRANSPARENT_PREF                = 2,    /**<    CSD connection element -BOTH TRANSPARENT PREFFERED              */
+       TAPI_SAT_BIP_CSD_CONN_ELEM_BOTH_NON_TRANSPARENT_PREF    = 3             /**<    CSD connection element -  NON TRANSPARENT PREFFERED             */
+
+}TelSatBearerParamCsdConnectionElementType_t;
+
+/**
+ * @enum TelSatBearerParamGprsPrecedenceClassType_t
+ * This enum lists the SAT bearer parameter GPRS precedence class. refer  TS 23.107
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_HIGH_PRIORITY = 0x01,    /**<    GPRS precedence class -HIGH PRIORITY            */
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_NORM_PRIORITY = 0x02,    /**<    GPRS precedence class -NORM PRIORITY            */
+       TAPI_SAT_BIP_GPRS_PRECED_CLASS_LOW_PRIORITY  = 0x03             /**<    GPRS precedence class - LOW PRIORITY            */
+
+}TelSatBearerParamGprsPrecedenceClassType_t;
+
+
+/**
+ * @enum TelSatBearerParamGprsDelayClassType_t
+ * This enum lists the SAT bearer parameter GPRS delay class.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_1 = 0x01, /**<    GPRS delay class - 1            */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_2 = 0x02, /**<    GPRS delay class -      2       */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_3 = 0x03, /**<    GPRS delay class -      3       */
+       TAPI_SAT_BIP_GPRS_DELAY_CLASS_4 = 0x04  /**<    GPRS delay class - 4            */
+
+}TelSatBearerParamGprsDelayClassType_t;
+
+
+/**
+ * @enum TelSatBearerParamGprsReliabilityClassType_t
+ * This enum lists the SAT bearer parameter GPRS Reliability class.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_1   = 0x01, /**<    GPRS Reliability class -1               */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_2   = 0x02, /**<    GPRS Reliability class -2               */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_3   = 0x03, /**<    GPRS Reliability class -3               */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_4   = 0x04, /**<    GPRS Reliability class -4               */
+       TAPI_SAT_BIP_GPRS_RELIABILITY_CLASS_5   = 0x05  /**<    GPRS Reliability class -5               */
+
+}TelSatBearerParamGprsReliabilityClassType_t;
+
+
+/**
+ * @enum TelSatBearerParamGprsPeakThroughputClassType_t
+ * This enum lists the SAT bearer parameter GPRS peak throughput class.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_8KBPS          = 0x01,     /**<    GPRS peak throughput class- UPTO 8KBPS          */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_16KBPS             = 0x02, /**<    GPRS peak throughput class- UPTO 16KBPS         */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_32KBPS             = 0x03, /**<    GPRS peak throughput class-UPTO 32KBPS          */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_64KBPS             = 0x04, /**<    GPRS peak throughput class-UPTO 64KBPS          */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_128KBPS    = 0x05, /**<    GPRS peak throughput class- UPTO 128KBPS                        */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_256KBPS    = 0x06, /**<    GPRS peak throughput class- UPTO 256KBPS                        */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_512KBPS    = 0x07, /**<    GPRS peak throughput class- UPTO 512KBPS                */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_1024KBPS   = 0x08, /**<    GPRS peak throughput class-UPTO 1024KBPS                */
+       TAPI_SAT_BIP_GPRS_PEAK_THROUGHPUT_CLASS_UPTO_2048KBPS   = 0x09  /**<    GPRS peak throughput class- UPTO 2048KBPS               */
+
+}TelSatBearerParamGprsPeakThroughputClassType_t;
+
+/**
+ * @enum TelSatBearerParamGprsMeanThroughputClassType_t
+ * This enum lists the SAT bearer parameter GPRS mean throughput class.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_BPS              = 0x01, /**<    GPRS mean throughput class - DOT 22 BPS         */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_BPS              = 0x02, /**<    GPRS mean throughput class - DOT 44 BPS         */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_BPS    = 0x03, /**<    GPRS mean throughput class -1 DOT 11 BPS                */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_BPS             = 0x04, /**<    GPRS mean throughput class -2 DOT 2 BPS         */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_4_BPS             = 0x05, /**<    GPRS mean throughput class -2 DOT 4 BPS                 */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_BPS    = 0x06, /**<    GPRS mean throughput class - 11 DOT 1 BPS               */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22BPS                   = 0x07, /**<    GPRS mean throughput class -22BPS               */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44BPS                   = 0x08, /**<    GPRS mean throughput class - 44BPS              */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111BPS                  = 0x09, /**<    GPRS mean throughput class - 111BPS             */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_22_KBPS             = 0x0A, /**<    GPRS mean throughput class - DOT 22 KBPS                */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_DOT_44_KBPS             = 0x0B, /**<    GPRS mean throughput class -DOT 44 KBPS                 */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_1_DOT_11_KBPS   = 0x0C, /**<    GPRS mean throughput class -1 DOT 11 KBPS               */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_2_DOT_2_KBPS    = 0x0D, /**<    GPRS mean throughput class -2 DOT 2 KBPS                */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_4_DOT_4_KBPS    = 0x0E, /**<    GPRS mean throughput class - 4 DOT 4 KBPS               */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_11_DOT_1_KBPS   = 0x0F, /**<    GPRS mean throughput class -11 DOT 1 KBPS               */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_22KBPS                  = 0x10, /**<    GPRS mean throughput class - 22KBPS             */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_44KBPS                  = 0x11, /**<    GPRS mean throughput class - 44KBPS             */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_111KBPS                 = 0x12, /**<    GPRS mean throughput class -111KBPS             */
+       TAPI_SAT_BIP_GPRS_MEAN_THROUGHPUT_CLASS_BEST_EFFORT     = 0x13  /**<    GPRS mean throughput class - BEST EFFORT                */
+
+}TelSatBearerParamGprsMeanThroughputClassType_t;
+
+/**
+ * @enum TelSatBearerParamGprsPdpType_t
+ * This enum lists the SAT bearer parameter GPRS pdp type.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_GPRS_PDP_TYPE_IP           = 0x02, /**<    bearer parameter GPRS pdp type - IP             */
+       TAPI_SAT_BIP_GPRS_PDP_TYPE_RESERVED = 0xff      /**<    reserved                */
+}TelSatBearerParamGprsPdpType_t;
+
+/**
+ * @enum TelSatBearerParamLocalLinksServiceIdentityType_t
+ * This enum lists the SAT bearer parameters local links service identity.
+ */
+typedef enum
+{
+       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_USIM                    = 0x00, /**<    local links service identity - value assigned by USIM           */
+       TAPI_SAT_BIP_LL_SERVICE_IDENT_VALUE_ASSIGNED_BY_REMOTED_DEVICE  = 0xFF  /**<    local links service identity - value assigned by remote service */
+
+}TelSatBearerParamLocalLinksServiceIdentityType_t;
+
+/**
+ * @enum TelSatChannelStatusType_t
+ * This enum lists the SAT channel status type.
+ */
+typedef enum
+{
+       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_NOT_ACTIVATED,  /**<    channel status type-CS LINK ESTABLISHED OR PDP CTX NOT ACTIVATED                */
+       TAPI_SAT_CS_LINK_ESTABLISHED_OR_PDP_CTX_ACTIVATED,              /**<    channel status type-CS LINK ESTABLISHED OR PDP CTX ACTIVATED            */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_CLOSED_STATE,                  /**<    channel status type-UICC SERVER MODE TCP IN CLOSED STATE                */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_LISTEN_STATE,                  /**<    channel status type-UICC SERVER MODE TCP IN LISTEN STATE                */
+       TAPI_SAT_UICC_SERVER_MODE_TCP_IN_ESTABLISHED_STATE,             /**<    channel status type-UICC SERVER MODE TCP IN ESTABLISHED STATE           */
+       TAPI_SAT_UICC_SERVER_MODE_RESERVED                                              /**<    reserved                */
+} TelSatChannelStatusType_t;
+
+/**
+ * @enum TelSatChannelStatusInfoType_t
+ * This enum lists the SAT channel status info type.
+ */
+typedef enum
+{
+       TAPI_SAT_CHANNEL_STATUS_NO_FURTHER_INFO_AVAILABLE = 0,  /**<    CHANNEL STATUS NO FURTHER INFO AVAILABLE                */
+       TAPI_SAT_CHANNEL_STATUS_NOT_USED                                  = 1,  /**<    CHANNEL STATUS NOT USED                 */
+       TAPI_SAT_CHANNEL_STATUS_LINK_DROPPED                      = 5   /**<    CHANNEL STATUS LINK DROPPED     */
+}TelSatChannelStatusInfoType_t;
+
+/**
+ * @enum TelSatAddressType_t
+ * This enum lists the SAT address type.
+ */
+typedef enum
+{
+       TAPI_SAT_ADDR_TYPE_IPv4                                 = 0x21, /**<    address type - IPv4     */
+       TAPI_SAT_ADDR_TYPE_IPv6                                 = 0x57, /**<    address type - IPv6     */
+       TAPI_SAT_ADDR_RESERVED                                  = 0xFF  /**<    reserved                */
+
+} TelSatAddressType_t;
+
+/**
+ * @enum TelSatTransportProtocolType_t
+ * This enum lists the SAT transport protocol type.
+ */
+typedef enum
+{
+       TAPI_SAT_TP_TYPE_UDP_UICC_CLIENT                = 0x01, /**<    transport protocol type- UDP UICC CLIENT        */
+       TAPI_SAT_TP_TYPE_TCP_UICC_CLIENT                = 0x02, /**<    transport protocol type-TCP UICC CLIENT         */
+       TAPI_SAT_TP_TYPE_TCP_UICC_SERVER                = 0x03  /**<    transport protocol type- TCP UICC SERVER        */
+} TelSatTransportProtocolType_t;
+
+/**
+ * @enum TelSatRemoteEntityAddrCodingType_t
+ * This enum lists the SAT remote entity address coding type.
+ */
+typedef enum
+{
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IEEE802_48BIT   = 0,    /**<    remote entity address coding type- IEEE802 48BIT                */
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_IRDA_32BIT              = 1,    /**<    remote entity address coding type- IRDA 32BIT           */
+       TAPI_SAT_REMOTE_ENTITY_ADDR_CODING_TYPE_RESERVED                = 0xFF  /**<    reserved                */
+} TelSatRemoteEntityAddrCodingType_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/**
+ * This structure defines the Address data object.
+ */
+typedef struct {
+       TelSimTypeOfNum_t ton; /**<     type of number          */
+       TelSimNumberingPlanIdentity_t npi; /**< number plan identity            */
+       unsigned char diallingNumberLen; /**<   dialing number length           */
+       char diallingNumber[TAPI_SAT_DIALLING_NUMBER_LEN_MAX]; /**<     dialing number  */
+} TelSatAddressInfo_t;
+
+/**
+ * This structure defines the data coding scheme object.
+ */
+typedef struct {
+       int bIsCompressedFormat; /**<   flag to verify compressed format        */
+       TelSatAlphabetFormatType_t alphabetFormat; /**< alphabet format Type            */
+       TelSatMsgClassType_t msgClass; /**<     Type of message class           */
+       unsigned char rawDcs; /**<      raw dcs info            */
+} TelSatDataCodingSchemeInfo_t;
+
+/**
+ * This structure defines the Alpha ID data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking existence of alpha identifier         */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  dcs info                */
+       unsigned char stringLen; /**<   alpha identifier length                 */
+       char string[TAPI_SAT_ALPHA_ID_LEN_MAX]; /**<    alpha identifier info   */
+} TelSatAlphaIdentifierInfo_t;
+
+/**
+ * This structure defines the Sub Address data object.
+ */
+typedef struct {
+       unsigned char subAddressLen; /**<       sub address length              */
+       char subAddress[TAPI_SAT_SUB_ADDR_LEN_MAX]; /**<        sub address             */
+} TelSatSubAddressInfo_t;
+
+/**
+ * This structure defines the Capability Configuration Parameters data object.
+ */
+typedef struct {
+       unsigned char dataLen; /**<     capability configuration parameter length       */
+       char data[TAPI_SAT_CCP_DATA_LEN_MAX]; /**<      capability configuration parameter      */
+} TelSatCapaConfigParamInfo_t;
+
+/**
+ * This struct defines the Command qualifier values for send SMS command.
+ */
+typedef struct {
+       int bIsPackingByMeRequired; /**<        flag to verify packing requirement, if FALSE, packing by ME not required        */
+} TelSatCmdQualiSendSms_t;
+
+/**
+ * This struct defines the Command qualifier values for display text command.
+ */
+typedef struct {
+       TelSatDisplayTextPriorityType_t msgPriority; /**<       message priority                */
+       TelSatDisplayTextMsgClearType_t msgClear; /**<  message clear type              */
+} TelSatCmdQualiDisplayText_t;
+
+/**
+ * This struct defines the Command qualifier values for get inkey command.
+ */
+typedef struct {
+       TelSatInkeyType_t inkeyType; /**<       inkey type              */
+       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set or not. if FALSE, digits(0-9,*,#and+) only         */
+       TelSatUseInputAlphabetType_t alphabetType; /**< alphabet type           */
+       int bIsImmediateResponseRequired;/**<   flag for checking whether immediate response required or not            */
+       int bIsHelpInfoAvailable; /**<  flag for checking whether help info available or not. if FALSE, no help information available   */
+
+} TelSatCmdQualiGetInkey_t;
+
+/**
+ * This struct defines the Command qualifier values for get input command.
+ */
+typedef struct {
+       int bIsUsingAlphabetSet; /**<   flag for checking whether using alphabet set. if FALSE, digits(0-9,*,#and+) only        */
+       TelSatUseInputAlphabetType_t alphabetType; /**< alphabet type. only using alphabet set case.            */
+       int bIsMeEchoUserInput; /**<    flag for checking whether ME should echo user input. if FALSE, user input shall not be displayed*/
+       int bIsUserInputUnpackedFormat; /**<    flag for checking whether user input is in unpacked format or not.  if FALSE, user input in SMS packed format   */
+       int bIsHelpInfoAvailable; /**<  flag to verify if help info available or not. if FALSE, no help information available   */
+
+} TelSatCmdQualiGetInput_t;
+
+/**
+ * This struct defines the Command qualifier values for play tone command.
+ */
+typedef struct {
+       TelSatDisplayVibrateAlertType_t vibrateAlert; /**<      type of vibrate alert           */
+} TelSatCmdQualiPlayTone_t;
+
+/**
+ * This struct defines the Command qualifier values for select item command.
+ */
+typedef struct {
+       TelSatPresentationType_t presentationType; /**< type of presentation. only presentation type specified          */
+       TelSatSelectionPreferenceType_t selectionPreference; /**<       type of selection preference            */
+       int bIsHelpInfoAvailable; /**<  flag for checking whether help info available or not. if FALSE, no help information available   */
+} TelSatCmdQualiSelectItem_t;
+
+/**
+ * This struct defines the Command qualifier values for setup menu command.
+ */
+typedef struct {
+       TelSatSelectionPreferenceType_t selectionPreference; /**<       type of selection preference            */
+       int bIsHelpInfoAvailable; /**<  flag to verify help info available or not. if FALSE, no help information available      */
+
+} TelSatCmdQualiSetupMenu_t;
+
+/**
+ * This struct defines the Command qualifier values for language notification command.
+ */
+typedef struct {
+       int bSpecificLanguageNotification; /**< flag for specific language notification. if FALSE, non-specific language notification   */
+} TelSatCmdQualiLanguageNotification_t;
+
+/**
+ * SAT command qualifier open channel
+ */
+typedef struct {
+       int bIsEstablishImmediateLink; /**<     flag whether establishing immediate link or not. if FALSE, on demand link establishment */
+       int bIsAutomaticReconnection; /**<      flag whether automatic reconnection or not. if FALSE, no automatic reconnection */
+       int bIsModeBackground; /**<     flag whether background mode or not.            */
+} TelSatCmdQualiOpenChannel_t;
+
+/**
+ * SAT command qualifier send data
+ */
+typedef struct {
+       int bIsSendDataImmediately; /**<        flag whether to send data immediately or not. if FALSE, store data in Tx buffer*/
+} TelSatCmdQualiSendData_t;
+
+/**
+ * This structure contains the command number, type and the qualifier objects of a SATK command.
+ */
+typedef struct {
+       unsigned char commandNumber; /**< specific command number       */
+       TelSatCommandType_t commandType; /**<   proactive command type          */
+
+       union {
+               TelSatCmdQualiRefresh_t cmdQualiRefresh; /**<   refresh command qualifier info  */
+               TelSatCmdQualiSetupCall_t cmdQualiSetupCall; /**<       setup call command qualifier info       */
+               TelSatCmdQualiSendSms_t cmdQualiSendSms; /**<   send sms command qualifier info */
+               TelSatCmdQualiDisplayText_t cmdQualiDisplayText; /**<   display text command qualifier info     */
+               TelSatCmdQualiGetInkey_t cmdQualiGetInkey; /**< get inkey command qualifier info        */
+               TelSatCmdQualiGetInput_t cmdQualiGetInput; /**< get input command qualifier info        */
+               TelSatCmdQualiPlayTone_t cmdQualiPlayTone; /**< play tone command qualifier info        */
+               TelSatCmdQualiSelectItem_t cmdQualiSelectItem; /**<     select item command qualifier info      */
+               TelSatCmdQualiSetupMenu_t cmdQualiSetupMenu; /**<       setup menu command qualifier info       */
+               TelSatCmdQualiProvideLocalInfo_t cmdQualiProvideLocalInfo;/**<  provide local info command qualifier info       */
+               TelSatCmdQualiLanguageNotification_t cmdQualiLanguageNotification;/**<  language notification command qualifier info    */
+               TelSatCmdQualiLaunchBrowser_t cmdQualiLaunchBrowser; /**<       launch Browser command qualifier info   */
+               TelSatCmdQualiOpenChannel_t cmdQualiOpenChannel; /**<   Open channel command qualifier info     */
+               TelSatCmdQualiSendData_t cmdQualiSendData; /**< send data command qualifier info        */
+       } u; /**<       Union   */
+} TelSatCommandDetailInfo_t;
+
+/**
+ * This struct defines the device identity values.
+ */
+typedef struct {
+       TelSatDeviceIdentitiesTagType_t source; /**<    device identity tag for source  */
+       TelSatDeviceIdentitiesTagType_t destination; /**<       device identity for destination */
+
+} TelSatDeviceIdentitiesInfo_t;
+
+/**
+ * This structure defines the Duration data object.
+ */
+typedef struct {
+       TelSatTimeUnitType_t timeUnit; /**<     time units for the duration data                */
+       unsigned char timeInterval; /**<        time interval           */
+
+} TelSatDurationInfo_t;
+
+/**
+ * This structure defines the menu item data object.
+ */
+typedef struct {
+       unsigned char itemId; /**<      item identifier                 */
+       unsigned char textLen; /**<     text length             */
+       unsigned char text[TAPI_SAT_ITEM_TEXT_LEN_MAX + 1]; /**<        text information                */
+
+} TelSatMenuItemInfo_t;
+
+/**
+ * This structure defines the item identifier object.
+ */
+typedef struct {
+       unsigned char selectedItemIdentifier; /**<      selected item identifier                */
+
+} TelSatItemIdentifierInfo_t;
+
+/**
+ * This structure defines expected user response length.
+ */
+typedef struct {
+       unsigned char min; /**< user response length minimum value              */
+       unsigned char max; /**< user response length maximum value              */
+} TelSatRespLenInfo_t;
+
+/**
+ * This structure defines RESUlT data object.
+ */
+typedef struct {
+       TelSatResultType_t generalResult; /**<  general result  */
+       TelSatMeProblemType_t meProblem; /**<   additional information on general result        */
+} TelSatResultInfo_t;
+
+/**
+ * This structure defines RESUlT data object.
+ */
+typedef struct {
+       TelSatSmsTpduType_t tpduType; /**<      SMS TPDU TYPE   */
+       unsigned char dataLen; /**<     SMS TPDU DATA LENGTH    */
+       unsigned char data[TAPI_SAT_SMS_TPDU_SMS_DATA_LEN_MAX]; /**< SMS TPDU DATA*/
+
+} TelSatSmsTpduInfo_t;
+
+/**
+ * This structure defines SS STRING data object.
+ */
+typedef struct {
+       TelSimTypeOfNum_t ton; /**<     type of number  */
+       TelSimNumberingPlanIdentity_t npi; /**< number plan identity    */
+       unsigned char stringLen; /**<   ss string length        */
+       char string[TAPI_SAT_SS_STRING_LEN_MAX]; /**<   ss string       */
+} TelSatSsStringInfo_t;
+
+/**
+ * This structure defines TEXT STRING data object.
+ */
+typedef struct {
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
+       unsigned short stringLen; /**<  text length             */
+       char string[TAPI_SAT_TEXT_STRING_LEN_MAX + 1]; /**<     text string     */
+} TelSatTextTypeInfo_t;
+
+/**
+ * This structure defines menu item text object.
+ */
+typedef struct {
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme              */
+       unsigned char stringLen; /**<   menu item string length */
+       char* pString; /**<     Menu Item String */
+} TelSatMenuItemTextInfo_t;
+
+/**
+ * This structure defines tone object.
+ */
+typedef struct {
+       TelSatToneType_t type; /**<     tone type       */
+} TelSatToneInfo_t;
+
+/**
+ * This structure defines USSD string data object.
+ */
+typedef struct {
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme      */
+       unsigned char ussdStringLen; /**<       ussd string length      */
+       char ussdString[TAPI_SAT_USSD_STRING_LEN_MAX]; /**<     ussd string     */
+} TelSatUssdStringInfo_t;
+
+/**
+ * This structure defines File list data object.
+ */
+typedef struct {
+       unsigned char fileCount; /**<   file count      */
+       TelSimFileName_t fileId[TAPI_SAT_FILE_ID_LIST_MAX_COUNT]; /**<  file identifier */
+} TelSatFileListInfo_t;
+
+/**
+ * This structure defines default text data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether default text exists or not    */
+       int bIsDigitOnly; /**<  flag for checking whether only digits used or not       */
+       TelSatDataCodingSchemeInfo_t dcs; /**<  data coding scheme      */
+       unsigned char stringLen; /**<   default text string length              */
+       char string[TAPI_SAT_TEXT_STRING_LEN_MAX]; /**< default text    */
+} TelSatDefaultTextInfo_t;
+
+/**
+ * This structure defines Next Action Indicator List data object.
+ */
+typedef struct {
+       unsigned char listCount; /**<   next action identifier count    */
+       unsigned char list[TAPI_SAT_ITEMS_NEXT_ACTION_INDI_LIST_MAX_COUNT]; /**<        next action identifier list     */
+} TelSatItemsNextActionIndiListInfo_t;
+
+/**
+ * This structure defines event list data object.
+ */
+typedef struct {
+       unsigned char eventListCount; /**<      event list count        */
+       TelSatEventDownloadType_t list[TAPI_SAT_EVENT_LIST_MAX_COUNT]; /**<     event list */
+} TelSatEventListInfo_t;
+
+/**
+ * This structure defines icon info object.
+ */
+typedef struct {
+       unsigned char width; /**<       icon width              */
+       unsigned char height; /**<      icon height     */
+       TelSatImageCodingSchemeType_t ics; /**< image coding scheme     */
+       unsigned short iconDataLen; /**<        icon data length        */
+       unsigned short clutDataLen; /**<        clut data length        */
+       char iconFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];
+       char clutFile[TAPI_SAT_IMG_DATA_FILE_PATH_LEN_MAX];
+} TelSatIconInfo_t;
+
+/**
+ * This structure defines icon data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether icon identifier exists or not         */
+       TelSatIconQualifierType_t iconQualifier; /**<   icon qualifier type             */
+       unsigned char iconIdentifier; /**<      icon identifier         */
+       TelSatIconInfo_t iconInfo; /**< icon info       */
+} TelSatIconIdentifierInfo_t;
+
+/**
+ * This structure defines icon identifier data object.
+ */
+typedef struct {
+       int bIsPresent; /**<    flag for checking whether icon identifier exists or not */
+       TelSatIconQualifierType_t iconListQualifier; /**<       icon list qualifier     */
+       unsigned char iconCount; /**<   icon count      */
+       unsigned char iconIdentifierList[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**<    icon identifier list    */
+       TelSatIconInfo_t iconInfo[TAPI_SAT_ICON_LIST_MAX_COUNT]; /**<   icon list info  */
+} TelSatIconIdentifierListInfo_t;
+
+/**
+ * This structure defines SAT bc repeat indicator Info
+ */
+typedef struct {
+       TelSatBcRepeatIndicatorType_t indType; /**<     bc repeat indicator type        */
+} TelSatBcRepeatIndicatorInfo_t;
+
+/**
+ * This structure defines call control strings.
+ */
+typedef struct {
+       TelSatCallCtrlStringType_t callCtrlStringType; /**<     call control type       */
+       union {
+               TelSatAddressInfo_t voiceString; /**<   voice call string       */
+               TelSatSsStringInfo_t ssString; /**<     ss string       */
+               TelSatUssdStringInfo_t ussdString; /**< ussd string     */
+       } u; /**<       Union   */
+} TelSatCallCtrlAddressStringInfo_t;
+
+/**
+ * This structure defines the Action requested call control data.
+ */
+typedef struct {
+       TelSatCallCtrlAddressStringInfo_t callCtrlAddString; /**< Call control address string */
+       TelSatCapaConfigParamInfo_t ccp1; /**< Capability configuration parameter 1 */
+       TelSatSubAddressInfo_t subAddress; /**< Subaddress */
+       TelSatAlphaIdentifierInfo_t alphaId; /**< Alpha identifier */
+       TelSatBcRepeatIndicatorInfo_t bcRepeatIndicator; /**< Bc repeat indicator */
+       TelSatCapaConfigParamInfo_t ccp2; /**< Capability configuration parameter 2 */
+} TelSatCallCtrlRequestedActionInfo_t;
+
+/**
+ * This structure defines dtmf string data object.
+ */
+typedef struct {
+       unsigned char stringLen; /**<   dtmf string lengh       */
+       char dtmfTone[TAPI_SAT_DTMF_STRING_LEN_MAX]; /**<       dtmf tone data  */
+
+} TelSatDtmfStringInfo_t;
+
+/**
+ * This structure defines language data object.
+ */
+typedef struct {
+       TelSatLanguageType_t language; /**<     language type   */
+} TelSatLanguageInfo_t;
+
+/**
+ * This structure defines date time and time zone data object.
+ */
+typedef struct {
+       unsigned char year; /**<        year    */
+       unsigned char month; /**<       month   */
+       unsigned char day; /**< day     */
+       unsigned char hour; /**<        hour    */
+       unsigned char minute; /**<      minute  */
+       unsigned char second; /**<      second  */
+       unsigned char timeZone; /**<    timeZone        */
+} TelSatDataTimeZoneInfo_t;
+
+/**
+ * This structure defines SAT browser identities.
+ */
+typedef struct {
+       TelSatBrowserIdentityType_t browserIdentity; /**<       browser identity        */
+} TelSatBrowserIdentitiesInfo_t;
+
+/**
+ * This structure defines SAT browser URL Data Object.
+ */
+typedef struct {
+       char string[TAPI_SAT_URL_LEN_MAX + 1]; /**<     url string      */
+} TelSatUrlInfo_t;
+
+/**
+ * This structure defines SAT bearer type.
+ */
+typedef struct {
+       unsigned char listLen; /**<     bearer list length      */
+       TelSatBearerType_t bearerList[TAPI_SAT_BEARER_LIST_MAX_COUNT]; /**<     bearer list     */
+} TelSatBearerInfo_t;
+
+/**
+ * This structure defines SAT provisioning reference.
+ */
+typedef struct {
+       char provisioningFilePath[TAPI_SAT_PROVISIONING_FILE_PATH_LEN_MAX]; /**<        provisioning file path  */
+
+} TelSatProvisioningRefInfo_t;
+
+/**
+ * This structure defines SAT browser termination cause.
+ */
+typedef struct {
+       TelSatBrowserTerminationCauseType_t cause; /**< browser termination cause       */
+} TelSatBrowserTerminationCauseInfo_t;
+
+/**
+ * This structure defines SAT Csd bearer parameters .
+ */
+typedef struct {
+       TelSatBearerParamCsdDataRateType_t dataRate; /**<       bearer csd data rate    */
+       TelSatBearerParamCsdBearerServiceType_t bearerService; /**<     bearer csd service type */
+       TelSatBearerParamCsdConnectionElementType_t connectionElement; /**<     bearer connection element type  */
+} TelSatBearerParametersCsdInfo_t;
+
+/**
+ * This structure defines SAT bearer parameters GPRS.
+ */
+typedef struct {
+       TelSatBearerParamGprsPrecedenceClassType_t precedenceClass; /**<        bearer gprs     precedence class        */
+       TelSatBearerParamGprsDelayClassType_t delayClass; /**<  bearer gprs delay       */
+       TelSatBearerParamGprsReliabilityClassType_t reliabilityClass; /**<      bearer gprs reliability */
+       TelSatBearerParamGprsPeakThroughputClassType_t peakThroughputClass;/**< bearer gprs peak throughput     */
+       TelSatBearerParamGprsMeanThroughputClassType_t meanThroughputClass;/**< bearer gprs mean throughput     */
+       TelSatBearerParamGprsPdpType_t pdpType; /**<    bearer gprs pdp type    */
+} TelSatBearerParametersGprsInfo_t;
+
+/**
+ * This structure defines SAT bearer parameters local links.
+ */
+typedef struct {
+       TelSatBearerParamLocalLinksServiceIdentityType_t serviceIdentifier; /**<        bearer local link service identifier            */
+       char serviceRecord[TAPI_SAT_BEARER_PARAMS_LEN_MAX]; /**<        bearer local link service record        */
+} TelSatBearerParametersLocalLinksInfo_t;
+
+/**
+ * This structure defines SAT bearer description.
+ */
+typedef struct {
+       TelSatBearerDescType_t bearerType; /**< bearer type     */
+       union {
+               TelSatBearerParametersCsdInfo_t bearerParamsCsd; /**<   csd     */
+               TelSatBearerParametersGprsInfo_t bearerParamsGprs; /**< gprs    */
+               TelSatBearerParametersLocalLinksInfo_t bearerParamsLocalLinks; /**<     local link      */
+       } bearer_params; /**<Union */
+} TelSatBearerDescriptionInfo_t;
+
+/**
+ * This structure defines SAT channel data.
+ */
+typedef struct {
+       unsigned char channelDataStringLen; /**<        channel data length     */
+       char channelDataString[TAPI_SAT_CHANNEL_DATA_STRING_LEN_MAX]; /**<      channel data    */
+} TelSatChannelDataInfo_t;
+
+/**
+ * This structure defines SAT channel data length.
+ */
+typedef struct {
+       unsigned char channelDataLen; /**<      channel data length     */
+} TelSatChannelDataLengthInfo_t;
+
+/**
+ * This structure defines SAT buffer size.
+ */
+typedef struct {
+       unsigned char bufferSize[2]; /**<       channel data buffer size        */
+} TelSatBufferSizeInfo_t;
+
+/**
+ * This structure defines SAT channel status.
+ */
+typedef struct {
+       unsigned char channelId; /**<   channel id      */
+       TelSatChannelStatusType_t status; /**<  channel status          */
+       TelSatChannelStatusInfoType_t channelInfo; /**< channel status info     */
+} TelSatChannelStatusInfo_t;
+
+/**
+ * This structure defines SAT other address.
+ */
+typedef struct {
+       TelSatAddressType_t addressType; /**<   channel address type    */
+       unsigned char addressLen; /**<  channel address length  */
+       char address[TAPI_SAT_OTHER_ADDR_LEN_MAX]; /**< channel address */
+} TelSatOtherAddressInfo_t;
+
+/**
+ * This structure defines SIM me interface transport level.
+ */
+typedef struct {
+       TelSatTransportProtocolType_t transportProtocolType; /**<       transport protocol type */
+       unsigned short portNumber; /**< port number     */
+} TelSatSimMeInterfaceTransportLevelInfo_t;
+
+/**
+ * This structure defines SAT network access name.
+ */
+typedef struct {
+       unsigned char length; /**<      network access name length      */
+       unsigned char netAccName[TAPI_SAT_NET_ACC_NAM_LEN_MAX]; /**<    network access name     */
+} TelSatnetworkAccessNameInfo_t;
+
+/**
+ * This structure defines SAT aid.
+ */
+typedef struct {
+       char aid[TAPI_SAT_AID_LEN_MAX]; /**<    application Id  */
+} TelSatAidInfo_t;
+
+/**
+ * This structure defines SAT remote entity address.
+ */
+typedef struct {
+       TelSatRemoteEntityAddrCodingType_t codingType; /**<     remote entity address coding type       */
+       unsigned short length; /**<     remote entity address length    */
+       unsigned char remoteEntityAddress[TAPI_SAT_REMOTE_ENTITY_ADDR_LEN_MAX]; /**<    remote entity address data      */
+} TelSatRemoteEntityAddressInfo_t;
+
+/**
+ * This structure defines SAT text attribute.
+ */
+typedef struct {
+       unsigned char textFormatting[4]; /**<   text attribute -e.g. bold, center align, etc    */
+} TelSatTextAttributeInfo_t;
+
+/**
+ * This structure defines SAT text attribute list.
+ */
+typedef struct {
+       unsigned int listCount; /**<    text attribute list count               */
+       TelSatTextAttributeInfo_t list[TAPI_SAT_ITEM_TEXT_ATTRIBUTES_LIST_MAX_COUNT]; /**<      text attribute list info        */
+} TelSatTextAttributeListInfo_t;
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_OBJ_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/common/TelSatProactvCmd.h b/include/common/TelSatProactvCmd.h
new file mode 100644 (file)
index 0000000..b200b7f
--- /dev/null
@@ -0,0 +1,784 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file TelSatProactvCmd.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi SAT Proactive commands and terminal response Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SAT_PROACTV_CMD_H_
+#define _TEL_SAT_PROACTV_CMD_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSatObj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+#define TAPI_SAT_MENU_ITEM_COUNT_MAX                   40      /**<    max count of sat menu items     */
+#define TAPI_SAT_PROVISIONING_REF_MAX_COUNT            10      /**<    max count of sat provisioning reference */
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+/**
+ * This structure contains the data objects for DISPLAY TEXT proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;               /**<    device identities info. includes source and destination devices */
+} TelSatMoreTimeIndInfo_t;
+
+/**
+ * This structure contains the data objects for DISPLAY TEXT proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatTextTypeInfo_t                            text;                           /**<    display text info       */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       int                                                             bImmediateRespRequested;        /**<    flag for checking whether immediate response required or not    */
+       TelSatDurationInfo_t                            duration;                       /**<    duration for which text should be displayed     */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatDisplayTextIndInfo_t;
+
+/**
+ * This structure contains the data objects for GET INKEY proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;   /**<        device identities info. includes source and destination devices */
+       TelSatTextTypeInfo_t                            text;                           /**<    display text info       */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatDurationInfo_t                            duration;                       /**<    duration for which text should be displayed     */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatGetInkeyIndInfo_t;
+
+/**
+ * This structure contains the data objects for GET INPUT proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatTextTypeInfo_t                            text;                           /**<    display text info       */
+       TelSatRespLenInfo_t                                     respLen;                        /**<    input response length   */
+       TelSatTextTypeInfo_t                            defaultText;            /**<    default text info       */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatGetInputIndInfo_t;
+
+/**
+ * This structure contains the data objects for PLAY TONE proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatToneInfo_t                                tone;                                   /**<    tone info       */
+       TelSatDurationInfo_t                    duration;                               /**<    duration for which tone should be played        */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatPlayToneIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP MENU proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t                     alphaId;                        /**<    alpha identifier(string) info   */
+       unsigned char                                           menuItemCount;          /**<    count of menu items     */
+       TelSatMenuItemInfo_t                            menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**<    menu item data  */
+       TelSatItemsNextActionIndiListInfo_t     itemNextActionIndList;                                  /**<    next action indication list     */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatIconIdentifierListInfo_t          iconIdList;                     /**<    icon identifier list info       */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+       TelSatTextAttributeListInfo_t           itemTextAttributeList;                                  /**<    item text attribute list        */
+
+} TelSatSetupMenuIndInfo_t;
+
+/**
+ * This structure contains the data objects for SELECT ITEM proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t                     alphaId;                        /**<    alpha identifier(string) info   */
+       TelSatItemsNextActionIndiListInfo_t     itemNextActionIndList;  /**<    next action indication list     */
+       unsigned char                                                           defaultItemIdentifier;  /**<    default item identifier(default selected item id)       */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatIconIdentifierListInfo_t          iconIdList;                     /**<    icon identifier list info       */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+       TelSatTextAttributeListInfo_t           itemTextAttributeList;  /**<    item text attribute list        */
+       unsigned char                                                           menuItemCount;                  /**<    count of menu items     */
+       TelSatMenuItemInfo_t                            menuItem[TAPI_SAT_MENU_ITEM_COUNT_MAX]; /**<    menu item data  */
+
+} TelSatSelectItemIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND SHORT MESSAGE proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                        /**<    alpha identifier(string) info   */
+       TelSatAddressInfo_t                             address;                        /**<    address for sending sms */
+       TelSatSmsTpduInfo_t                             smsTpdu;                        /**<    sms tpdu info   */
+       TelSatIconIdentifierInfo_t              iconId;                         /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatSendSmsIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND SS proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatSsStringInfo_t                    ssString;                               /**<    ss string       */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatSendSsIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND USSD proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                        /**<    alpha identifier(string) info   */
+       TelSatUssdStringInfo_t                  ussdString;                     /**<    ussd string info        */
+       TelSatIconIdentifierInfo_t              iconId;                         /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatSendUssdIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP CALL proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatAddressInfo_t                             address;                                /**<    setup call address info*/
+       TelSatCapaConfigParamInfo_t             ccp;                                    /**<    capability configuration parameter      */
+       TelSatSubAddressInfo_t                  subAddress;                             /**<    setup call sub address  */
+       TelSatDurationInfo_t                    duration;                               /**<    command execution time duration */
+       TelSatAlphaIdentifierInfo_t             userConfirmPhaseAlphaId;/**<    user Confirmation Phase AlphaId */
+       TelSatAlphaIdentifierInfo_t             callSetupPhaseAlphaId;  /**<    call Setup Phase AlphaId        */
+       TelSatIconIdentifierInfo_t              userConfirmPhaseIconId; /**<    user Confirmation Phase IconId  */
+       TelSatIconIdentifierInfo_t              callSetupPhaseIconId;   /**<    call Setup Phase IconId */
+       TelSatTextAttributeInfo_t               userConfirmPhaseTextAttribute;          /**<    user Confirmation Phase Text Attribute  */
+       TelSatTextAttributeInfo_t               callSetupPhaseTextAttribute;            /**<    call Setup PhaseText Attribute  */
+} TelSatSetupCallIndInfo_t;
+
+/**
+ * This structure contains the data objects for REFRESH proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatFileListInfo_t                            fileList;                       /**<    file list for refresh   */
+       TelSatAidInfo_t                                         aid;                            /**<    application Id  */
+} TelSatRefreshIndInfo_t;
+
+/**
+ * This structure contains the data objects for PROVIDE LOCAL INFO proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+
+} TelSatProvideLocalInfoIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP EVENT LIST proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatEventListInfo_t                           eventList;                      /**<    event list contains events which are required by USIM application       */
+
+} TelSatSetupEventListIndInfo_t;
+
+/**
+ * This structure contains the data objects for SETUP IDLE MODE TEXT proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatTextTypeInfo_t                            text;                           /**<    text to be shown on idle screen */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatSetupIdleModeTextIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND DTMF COMMAND proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t                     alphaId;                        /**<    alpha identifier(string) info   */
+       TelSatDtmfStringInfo_t                          dtmfString;                     /**<    dtmf string     */
+       TelSatIconIdentifierInfo_t                      iconId;                         /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t                       textAttribute;          /**<    text attribute info -e.g. bold, center align    */
+} TelSatSendDtmfIndInfo_t;
+
+/**
+ * This structure contains the data objects for LANGUAGE NOTIFICATION proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatLanguageInfo_t                            language;                       /**<    language info from USIM application     */
+} TelSatLanguageNotificationIndInfo_t;
+
+/**
+ * This structure contains the data objects for LAUNCH BROWSER proactive command indication.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatBrowserIdentitiesInfo_t   browserId;                              /**<    browser identity        */
+       TelSatUrlInfo_t                                 url;                                    /**<    url     */
+       TelSatBearerInfo_t                              bearer;                                 /**<    bearer which is used by browser */
+       unsigned char                                   provisioningRefCount;   /**<    provisioning reference count    */
+       TelSatProvisioningRefInfo_t             provisioningRef[TAPI_SAT_PROVISIONING_REF_MAX_COUNT];   /**<    provisioning reference data     */
+       TelSatTextTypeInfo_t                    text;                                   /**<    display text info       */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatLaunchBrowserIndInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL CSB proactive command indication data.
+ */
+typedef struct
+{
+       TelSatAddressInfo_t                                                     address;                        /**<    channel address */
+       TelSatSubAddressInfo_t                                          subAddress;                     /**<    channel sub address     */
+       TelSatDurationInfo_t                                            duration1;                      /**<    connection require time */
+       TelSatDurationInfo_t                                            duration2;                      /**<    connection require time2        */
+       TelSatBearerParametersCsdInfo_t                         bearerParamsCsd;        /**<    csd info        */
+       TelSatBufferSizeInfo_t                                          bufferSize;                     /**<    bufferSize      */
+       TelSatOtherAddressInfo_t                                        otherAddress;           /**<    otherAddress    */
+       TelSatTextTypeInfo_t                                            userLogin;                      /**<    userLogin       */
+       TelSatTextTypeInfo_t                                            userPassword;           /**<    userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t        simMeInterfaceTransportLevel;   /**<    simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t                                        dataDestinationAddress;                 /**<    dataDestinationAddress  */
+} TelSatOpenChannelCsbInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (packet) proactive command indication data.
+ */
+typedef struct
+{
+       TelSatBearerParametersGprsInfo_t                        bearerParamsGprs;               /**<    gprs info       */
+       TelSatBufferSizeInfo_t                                          bufferSize;                             /**<    bufferSize      */
+       TelSatnetworkAccessNameInfo_t                           networkAccessName;              /**<    networkAccessName       */
+       TelSatOtherAddressInfo_t                                        otherAddress;                   /**<    otherAddress    */
+       TelSatTextTypeInfo_t                                            userLogin;                              /**<    userLogin       */
+       TelSatTextTypeInfo_t                                            userPassword;                   /**<    userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t        simMeInterfaceTransportLevel;   /**<    simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t                                        dataDestinationAddress;                 /**<    dataDestinationAddress  */
+       TelSatTextAttributeInfo_t                                       textAttribute;                                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatOpenChannelpdbInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL LOCAL LINK proactive command indication data.
+ */
+typedef struct
+{
+       TelSatDurationInfo_t                                            duration1;                                      /**<    command execution time duration1        */
+       TelSatDurationInfo_t                                            duration2;                                      /**<    command execution time duration2        */
+       TelSatBearerParametersLocalLinksInfo_t          bearerParamsLocalLinks;         /**<    local link info */
+       TelSatBufferSizeInfo_t                                          bufferSize;                                     /**<    bufferSize      */
+       TelSatTextTypeInfo_t                                            userPassword;                           /**<    userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t        simMeInterfaceTransportLevel;   /**<    simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t                                        dataDestinationAddress;                 /**<    dataDestinationAddress  */
+       TelSatRemoteEntityAddressInfo_t                         remoteEntityAddress;                    /**<    remoteEntityAddress     */
+       TelSatTextAttributeInfo_t                                       textAttribute;                                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatOpenChannelLocalBearerInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (DEFAULT BEARER) proactive command indication data.
+ */
+typedef struct
+{
+       TelSatBufferSizeInfo_t                                          bufferSize;                                     /**<    bufferSize      */
+       TelSatOtherAddressInfo_t                                        otherAddress;                           /**<    otherAddress    */
+       TelSatTextTypeInfo_t                                            userLogin;                                      /**<    userLogin       */
+       TelSatTextTypeInfo_t                                            userPassword;                           /**<    userPassword    */
+       TelSatSimMeInterfaceTransportLevelInfo_t        simMeInterfaceTransportLevel;/**<       simMeInterfaceTransportLevel    */
+       TelSatOtherAddressInfo_t                                        dataDestinationAddress;         /**<    dataDestinationAddress  */
+} TelSatOpenChannelDefaultBearerInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL (UICC Server Mode) proactive command indication data.
+ */
+typedef struct
+{
+       TelSatBufferSizeInfo_t                                          bufferSize;                                             /**<    bufferSize      */
+       TelSatSimMeInterfaceTransportLevelInfo_t        simMeInterfaceTransportLevel;   /**<    simMeInterfaceTransportLevel    */
+} TelSatOpenChannelUiccServerModeInfo_t;
+
+/**
+ * This structure contains the data objects for OPEN CHANNEL proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       int                                             bIsUiccServerMode;              /**<    flag whether UICC server mode or not    */
+       TelSatBearerDescType_t                  bearerType;                             /**<    bearer destination type */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       union
+       {
+               TelSatOpenChannelCsbInfo_t                              csBearer;               /**<    cs info */
+               TelSatOpenChannelpdbInfo_t                              pdBearer;               /**<    pbd info        */
+               TelSatOpenChannelLocalBearerInfo_t              locBearer;              /**<    local link info */
+               TelSatOpenChannelDefaultBearerInfo_t    defaultBearer;  /**<    defaultBearer   */
+               TelSatOpenChannelUiccServerModeInfo_t   uiccServerMode; /**<    uiccServerMode  */
+       }details;                /**< Open Channel Details */
+}TelSatOpenChannelIndInfo_t;
+
+/**
+ * This structure contains the data objects for CLOSE CHANNEL proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       TelSatTextAttributeInfo_t               textAttribute;                  /**<    text attribute info -e.g. bold, center align    */
+} TelSatCloseChannelIndInfo_t;
+
+/**
+ * This structure contains the data objects for RECEIVE DATA proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;                  /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;               /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                                /**<    alpha identifier(string) info   */
+       TelSatIconIdentifierInfo_t              iconId;                                 /**<    icon identifier info    */
+       TelSatChannelDataLengthInfo_t   channelDataLen;                 /**<    channel data length     */
+} TelSatReceiveDataIndInfo_t;
+
+/**
+ * This structure contains the data objects for SEND DATA proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t               commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t    deviceIdentities;       /**<    device identities info. includes source and destination devices */
+       TelSatAlphaIdentifierInfo_t             alphaId;                        /**<    alpha identifier(string) info   */
+       TelSatIconIdentifierInfo_t              iconId;                         /**<    icon identifier info    */
+       TelSatChannelDataInfo_t                 channel_data;           /**<    channel data for sending        */
+} TelSatSendDataIndInfo_t;
+
+/**
+ * This structure contains the data objects for GET CHANNEL STATUS proactive command indication data.
+ */
+typedef struct
+{
+       TelSatCommandDetailInfo_t                       commandDetail;          /**<    command detail info. includes command number, type, qualifier   */
+       TelSatDeviceIdentitiesInfo_t            deviceIdentities;       /**<    device identities info. includes source and destination devices */
+} TelSatGetChannelStatusIndInfo_t;
+
+/**
+ * This structure contains the data object for END PROACTIVE SESSION command indication.
+ */
+typedef struct
+{
+       TelSatCommandType_t             commandType;            /**<    proactive command type  */
+} TelSatEndProactiveSessionIndInfo_t;
+
+/**
+ * This structure contains the data objects for PROACTIVE command indication union data.
+ */
+typedef struct
+{
+       union
+       {
+               TelSatMoreTimeIndInfo_t                         moreTime;
+               TelSatDisplayTextIndInfo_t                      displayText;            /**<    Parsed proactive command info from TLV to Telephony data type - display text    */
+               TelSatGetInkeyIndInfo_t                         getInkey;                       /**<    Parsed proactive command info from TLV to Telephony data type - getInkey        */
+               TelSatGetInputIndInfo_t                         getInput;                       /**<    Parsed proactive command info from TLV to Telephony data type - getInput        */
+               TelSatPlayToneIndInfo_t                         playTone;                       /**<    Parsed proactive command info from TLV to Telephony data type - play tone       */
+               TelSatSetupMenuIndInfo_t                        setupMenu;                      /**<    Parsed proactive command info from TLV to Telephony data type - setup menu      */
+               TelSatSelectItemIndInfo_t                       selectItem;                     /**<    Parsed proactive command info from TLV to Telephony data type - select item     */
+               TelSatSendSmsIndInfo_t                          sendSms;                        /**<    Parsed proactive command info from TLV to Telephony data type - send sms        */
+               TelSatSendSsIndInfo_t                           sendSs;                         /**<    Parsed proactive command info from TLV to Telephony data type - send ss */
+               TelSatSendUssdIndInfo_t                         sendUssd;                       /**<    Parsed proactive command info from TLV to Telephony data type - send  ussd      */
+               TelSatSetupCallIndInfo_t                        setupCall;                      /**<    Parsed proactive command info from TLV to Telephony data type - setup call      */
+               TelSatRefreshIndInfo_t                          refresh;                        /**<    Parsed proactive command info from TLV to Telephony data type - refresh */
+               TelSatProvideLocalInfoIndInfo_t         provideLocInfo;         /**<    Parsed proactive command info from TLV to Telephony data type - provide local info      */
+               TelSatLaunchBrowserIndInfo_t            launchBrowser;          /**<    Parsed proactive command info from TLV to Telephony data type - launch browser  */
+               TelSatSetupIdleModeTextIndInfo_t        idleText;                       /**<    Parsed proactive command info from TLV to Telephony data type - setup idle mode text    */
+               TelSatSendDtmfIndInfo_t                         sendDtmf;                       /**<    Parsed proactive command info from TLV to Telephony data type - send dtmf       */
+               TelSatLanguageNotificationIndInfo_t     languageNotification;/**<       Parsed proactive command info from TLV to Telephony data type - language notification   */
+               TelSatSetupEventListIndInfo_t           setupEventList;         /**<    Parsed proactive command info from TLV to Telephony data type - setup event list        */
+               TelSatOpenChannelIndInfo_t                      openChannel;            /**<    Parsed proactive command info from TLV to Telephony data type - open channel    */
+               TelSatCloseChannelIndInfo_t                     closeChannel;           /**<    Parsed proactive command info from TLV to Telephony data type - close channel   */
+               TelSatReceiveDataIndInfo_t                      receiveData;            /**<    Parsed proactive command info from TLV to Telephony data type - receive data    */
+               TelSatSendDataIndInfo_t                         sendData;                       /**<    Parsed proactive command info from TLV to Telephony data type - send data       */
+               TelSatGetChannelStatusIndInfo_t         getChannelStatus;       /**<    Parsed proactive command info from TLV to Telephony data type - get channel status      */
+       }cmdInfo;                                                                                                       /**<    Union   */
+}TelSatProactiveCmdData_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of DISPLAY TEXT proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t      result;                         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatDisplayTextRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET INKEY proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;         /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatTextTypeInfo_t            text;           /**<    inserted key info       */
+       TelSatDurationInfo_t            duration;
+}TelSatGetInkeyRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of PLAY TONE proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatPlayToneRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of MORE TIME proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatMoreTimeRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP MENU proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatSetupMenuRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET INPUT proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;         /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatTextTypeInfo_t            text;           /**<    inserted string info    */
+}TelSatGetInputRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SELECT ITEM proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t              result;                         /**<    result whether current proactive command request was executed successfully or not       */
+       int                                     bOtherInfo;                     /**<    flag to check whether other information is required or not      */
+       unsigned char                   itemIdentifier;         /**<    item identifier */
+}TelSatSelectItemRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of PROVIDE LOCAL INFORMATION proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                                      result;                 /**<    result whether current proactive command request was executed successfully or not       */
+       int                                                             bOtherInfo;             /**<    flag to check whether other information is required or not      */
+       TelSatCmdQualiProvideLocalInfo_t        infoType;               /**<    local info type - e.g. time zone or language info, etc  */
+       union
+       {
+               TelSatDataTimeZoneInfo_t        timeZoneInfo;           /**<    current time zone info  */
+               TelSatLanguageInfo_t            languageInfo;           /**<    current ME language setting info        */
+       }u;                                                                                                     /**<    Union   */
+}TelSatProvideLocalInfoRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP EVENT LIST proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t              result;                                         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatSetupEventListRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND SMS proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                              result;                                                         /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatCallCtrlProblemType_t             additionalCallCtrlProblemInfo;          /**<    call control problem    */
+}TelSatSendSmsRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SET UP CALL proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                                      result;                                         /**<    result whether current proactive command request was executed successfully or not       */
+       int                                                             bOtherInfo;                                     /**<    flag to check whether other information are required or not     */
+       TelSatNetworkProblemType_t                      networkProblem;                         /**<    network problem during setup call       */
+       TelSatCallCtrlProblemType_t                     permanentCallCtrlProblem;       /**<    permanent call control problem  */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;        /**<    call control requested action info      */
+       TelSatResultInfo_t                                      result2;                                        /**<    additional response on general result   */
+       TelSatTextTypeInfo_t                            text;                                           /**<    text string info        */
+       int                                                             bIsTapiCause;                           /**<    flag to check whether tapi makes problem or not */
+       unsigned long                                           tapiCause;                                      /**<    tapi call level cause   */
+       unsigned long                                           tapiSsCause;                            /**<    tapi ss level cause     */
+       }TelSatSetupCallRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND SS proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                                      result;                 /**<    result whether current proactive command request was executed successfully or not       */
+       int                                                             bOtherInfo;             /**<    flag to check whether whether other information is required or not      */
+       TelSatSsProblemType_t                           additionalSsProblemInfo;                /**<    additional ss problem */
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<    additional call control problem */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<    call control requested action info      */
+       TelSatResultInfo_t                                      result2;                /**<    additional response on general result   */
+       TelSatTextTypeInfo_t                            text;                   /**<    text string info        */
+}TelSatSendSsRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND USSD proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                                      result;                 /**<    result whether current proactive command request was executed successfully or not       */
+       int                                                             bOtherInfo;             /**<    flag to check whether other information is required or not      */
+       TelSatUssdProblemType_t                         additionalUssdProblemInfo;              /**<    additional ussd problem */
+       TelSatCallCtrlProblemType_t                     additionalCallCtrlProblemInfo;  /**<    additional call control problem */
+       int                                                             bCallCtrlHasModification;               /**<    flag to check whether modification happens during call control  */
+       TelSatTextTypeInfo_t                            text;                                                   /**<    text string info        */
+       TelSatCallCtrlRequestedActionInfo_t     callCtrlRequestedAction;                /**<    call control requested action info      */
+       TelSatResultInfo_t                                      result2;                /**<    additional response on general result   */
+       TelSatTextTypeInfo_t                            text2;                  /**<    text string info        */
+}TelSatSendUssdRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of REFRESH proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                              result;         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatRefreshRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of GET CHANNEL STATUS proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                         /**<    result whether current proactive command request was executed successfully or not       */
+       int                                             bOtherInfo;                     /**<    flag whether other information are required or not      */
+       TelSatBipProblemType_t  additionalProblemInfo;  /**<    bip specific problem info       */
+       TelSatChannelStatusInfo_t       channelStatus;          /**<    channel Status  */
+}TelSatGetChannelStatusRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of CLOSE CHANNEL proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                                 /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t          additionalProblemInfo;  /**<    bip specific problem info       */
+}TelSatCloseChannelRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of OPEN CHANNEL proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                              result;                                 /**<    result whether current proactive command request was executed successfully or not       */
+       int                                                     bOtherInfo;                             /**<    flag whether other information are required or not */
+       TelSatBearerDescriptionInfo_t   bearerDescription;              /**<    bearerDescription       */
+       TelSatBipProblemType_t          additionalProblemInfo;  /**<    bip specific problem info       */
+       TelSatChannelStatusInfo_t               channelStatus;                  /**<    channelStatus   */
+       TelSatBufferSizeInfo_t                  bufferSize;                             /**<    bufferSize      */
+}TelSatOpenChannelRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of LANGAUGE NOTIFICATION proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                              result;                                 /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatLanguageNotificationRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of LAUNCH BROWSER proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                                      result;                                 /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatLaunchBrowserProblemType_t        additionalProblemInfo;  /**<    browser specific problem info   */
+}TelSatLaunchBrowserRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of RECEIVE DATA proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                                 /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t  additionalProblemInfo;  /**<    bip specific problem info       */
+       int                                                     bOtherInfo;                             /**<    flag whether other information are required or not      */
+       TelSatChannelDataInfo_t         channel_data;                   /**<    channel data    */
+       unsigned char                                   channelDataLen;                 /**<    channel data length     */
+}TelSatReceiveDataRespInfo_t;
+
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND DATA proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                                         /**<    result whether current proactive command request was executed successfully or not       */
+       TelSatBipProblemType_t  additionalProblemInfo;          /**<    bip specific problem info       */
+       unsigned char                           channelDataLen;                         /**<    channel data length     */
+}TelSatSendDataRespInfo_t;
+
+
+/**
+ * This structure contains the data objects for the Terminal Response of SETUP IDLE MODE TEXT proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                                         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatSetupIdlemodeTextRespInfo_t;
+
+/**
+ * This structure contains the data objects for the Terminal Response of SEND DTMF proactive command.
+ */
+typedef struct
+{
+       TelSatResultInfo_t                      result;                                         /**<    result whether current proactive command request was executed successfully or not       */
+}TelSatSendDtmfRespInfo_t;
+
+/**
+ * This contains the data structures to be used to send proactive command response.
+ */
+typedef struct
+{
+       unsigned char                                   commandNumber;          /**<      proactive command number      */
+       TelSatCommandType_t                     commandType;            /**<      proactive command type        */
+       union
+       {
+               TelSatMoreTimeRespInfo_t                                moreTime;
+               TelSatDisplayTextRespInfo_t                             displayText;    /**<    terminal response info from displayText proactive command       */
+               TelSatGetInkeyRespInfo_t                                getInkey;               /**<    terminal response info from getInkey proactive command  */
+               TelSatGetInputRespInfo_t                                getInput;               /**<    terminal response info from getInput proactive command  */
+               TelSatPlayToneRespInfo_t                                playTone;               /**<    terminal response info from playTone proactive command  */
+               TelSatSetupMenuRespInfo_t                               setupMenu;              /**<    terminal response info from setupMenu proactive command */
+               TelSatSelectItemRespInfo_t                              selectItem;             /**<    terminal response info from selectItem proactive command        */
+               TelSatSendSmsRespInfo_t                                 sendSms;                /**<    terminal response info from sendSms proactive command   */
+               TelSatSendSsRespInfo_t                                  sendSs;                 /**<    terminal response info from sendSs proactive command    */
+               TelSatSendUssdRespInfo_t                                sendUssd;               /**<    terminal response info from sendUssd proactive command  */
+               TelSatSetupCallRespInfo_t                               setupCall;              /**<    terminal response info from setupCall proactive command */
+               TelSatRefreshRespInfo_t                                 refresh;                /**<    terminal response info from refresh proactive command   */
+               TelSatProvideLocalInfoRespInfo_t                provideLocInfo; /**<    terminal response info from provide Local Info proactive command        */
+               TelSatLaunchBrowserRespInfo_t                   launchBrowser;  /**<    terminal response info from launch Browser proactive command    */
+               TelSatSetupIdlemodeTextRespInfo_t               idleText;               /**<    terminal response info from setup idle mode text proactive command      */
+               TelSatSendDtmfRespInfo_t                                sendDtmf;               /**<    terminal response info from send Dtmf proactive command */
+               TelSatLanguageNotificationRespInfo_t    languageNotification;   /**<    terminal response info from language Notification proactive command     */
+               TelSatSetupEventListRespInfo_t                  setupEventList;                 /**<    terminal response info from setup Event List proactive command  */
+               TelSatOpenChannelRespInfo_t                             openChannel;                    /**<    terminal response info from openChannel proactive command       */
+       }terminalRespInfo;                                                                                                      /**<    Union   */
+}TelSatRespInfo_t;
+
+/*
+*SAT Icon Data
+*/
+
+typedef  struct{
+  unsigned char                        iconId;
+  unsigned char              imgType;
+  unsigned char                        imgLen;
+  unsigned char              imgData[256];
+} TelSatIconDataResp_t;
+
+typedef  struct{
+  unsigned char                        iconId;
+  unsigned char                        imgType;
+  unsigned char                        fileId[2];
+  unsigned char                        reqDataLen[2];
+  unsigned char                        offset[2];
+}TelsatIconDataGet_t;
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TEL_SAT_PROACTV_CMD_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/common/TelSim.h b/include/common/TelSim.h
new file mode 100644 (file)
index 0000000..809e53b
--- /dev/null
@@ -0,0 +1,2026 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SIM_TAPI        SIM
+* @{
+*
+* @file TelSim.h
+
+     @brief This file serves as a "C" header file defines structures for Tapi SIM Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+*/
+
+#ifndef _TELSIM_H_
+#define _TELSIM_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+/** max length for PIN */
+#define TAPI_SIM_PIN_LENGTH    8
+
+/** maximum MCC code length*/
+#define TAPI_SIM_MCC_CODE_LEN  3
+
+/** maximum MNC Code length*/
+#define TAPI_SIM_MNC_CODE_LEN  2
+
+/** Maximum MSIN code length */
+#define TAPI_SIM_MSIN_CODE_LEN 10
+
+/** Maximum ICCID Length */
+#define TAPI_SIM_ICCID_LEN_MAX 20
+
+/** Maximum Text length for number */
+#define TAPI_SIM_NUM_TEXT_LEN_MAX      256
+
+/** Maximum ECC code length */
+#define TAPI_SIM_ECC_CODE_LEN  3
+
+/** Maximum ECC Alpha string length */
+#define TAPI_SIM_ECC_ALPHA_STRING_LEN_MAX      50
+
+/** Maximum Language indication length */
+#define TAPI_SIM_LP_LEN_MAX    30
+
+/** Maximum group identifier length */
+#define TAPI_SIM_GROUP_IDENTIFIER_LEN_MAX      10
+
+/** Maximum UECC Record count */
+#define TAPI_SIM_UECC_RECORD_COUNT_MAX 15
+
+/** Defines the maximum number of 3G phone book records at a time  */
+#define TAPI_SIM_3G_PB_MAX_RECORD_COUNT 10
+
+/** SIM 3G Phone book EF Max count */
+#define TAPI_SIM_PB_3G_FILE_MAX_COUNT 13
+
+/** Operator Name max length */
+#define TAPI_SIM_CPHS_OPERATOR_NAME_LEN_MAX 25
+
+/** Operator Name short form max length */
+#define TAPI_SIM_CPHS_OPERATOR_NAME_SHORT_FORM_LEN_MAX 10
+
+/** Alpha Id  max length */
+#define TAPI_SIM_XDN_ALPHA_ID_MAX_LEN 30
+
+/** Dialing number max length */
+#define TAPI_SIM_XDN_DIALING_NUMBER_LEN        20
+
+/** CSP profile entry count max length */
+#define TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX 11
+
+/** ISIM authentication code max length */
+#define TAPI_SIM_ISIM_AUTH_MAX_REQ_DATA_LEN 256
+
+/** ISIM authentication response data max length */
+#define TAPI_SIM_ISIM_AUTH_MAX_RESP_DATA_LEN 128
+
+/** SAP Answer to Reset data max length */
+#define TAPI_SIM_SAP_ATR_DATA  256
+
+/** SAP APDU max length */
+#define TAPI_SIM_APDU_MAX_LEN 256+2 // to be fine tuned according to lower layers, 2bytes for SW1 & SW2 should be added
+
+/** EF-SMSP digit length */
+#define TAPI_SIM_SMSP_ADDRESS_LEN 20
+
+/** EF-SMSP alpha id length */
+#define TAPI_SIM_SMSP_ALPHA_ID_LEN_MAX  128
+
+/**< Maximum OPLMNWACT length*/
+#define TAPI_SIM_OPLMNWACT_MAX_LEN 100
+
+/**< Maximum rsim access data length for 1 time*/
+#define TAPI_SIM_DATA_LEN_MAX  256
+
+/** Request Id for Notification */
+#define TAPI_SIM_REQUEST_ID_FOR_NOTI   0xFF
+
+/**< Event status for operation timeout */
+#define TAPI_SIM_OPERATION_TIMEOUT  1234
+
+#define TAPI_SIM_LOCK_TYPE_INFO_MAX  8
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+ * @enum TelSimCardType_t
+ * This enumeration defines the card type.
+ */
+typedef enum
+{
+       TAPI_SIM_CARD_TYPE_UNKNOWN,             /**< Unknown card */
+       TAPI_SIM_CARD_TYPE_GSM,                 /**< SIm(GSM) card*/
+       TAPI_SIM_CARD_TYPE_USIM,                        /**< USIM card */
+
+} TelSimCardType_t;
+
+/**
+ * @enum TelSimFileName_t
+ * This enumeration defines the file id.
+ */
+typedef enum
+{
+    /* common Elementary files */
+       TAPI_SIM_EFILE_DIR                              = 0x2F00,               /**< Root Directory for the USIM */
+       TAPI_SIM_EFILE_ICCID                    = 0x2FE2,               /**< the ICC Identification file        */
+       TAPI_SIM_EFILE_ADN                      = 0x6F3A,               /**< the Abbrv. Dialing Number file */
+       TAPI_SIM_EFILE_FDN                      = 0x6F3B,               /**< the Fixed Dialing Number file  */
+       TAPI_SIM_EFILE_SMS                      = 0x6F3C,               /**< the Short Messages file      */
+       TAPI_SIM_EFILE_CCP                      = 0x6F3D,               /**< the Capab. Config Parameters file */
+       TAPI_SIM_EFILE_IMSI                     = 0x6F07,               /**< the IMSI file                */
+       TAPI_SIM_EFILE_SST                      = 0x6F38,               /**< the SIM Service Table file   */
+       TAPI_SIM_EFILE_EST                      = 0x6F56,               /**< the Enabled Service Table file   */
+       TAPI_SIM_EFILE_ACM                      = 0x6F39,               /**< the Accumul. Call Meter file */
+       TAPI_SIM_EFILE_OPLMN_ACT        = 0x6F61,               /**< the OPLMN List file*/
+       TAPI_SIM_EFILE_MBDN                     = 0x6FC7,               /** < SIM Mail Box Dialing Number file */
+
+       TAPI_SIM_EFILE_GID1                     = 0x6F3E,               /**< the Group Identifier Level 1 */
+       TAPI_SIM_EFILE_GID2                     = 0x6F3F,               /**< the Group Identifier Level 2 */
+
+       /* For PHASE 2 only */
+       TAPI_SIM_EFILE_MSISDN                   = 0x6F40,               /**< the MSISDN file              */
+       TAPI_SIM_EFILE_SMSP                     = 0x6F42,               /**< the Short Msg Srv. Parameters file*/
+       TAPI_SIM_EFILE_SMSS                     = 0x6F43,               /**< the SMS Status               */
+       TAPI_SIM_EFILE_EXT1                     = 0x6F4A,               /**< the Extension 1 file         */
+       TAPI_SIM_EFILE_EXT2                     = 0x6F4B,               /**< the Extension 2 file         */
+       TAPI_SIM_EFILE_ELP                              = 0x2F05,               /**< the Extended Language Preference file */
+       TAPI_SIM_EFILE_LP                       = 0x6F05,               /**< SIM: Language preference */
+       TAPI_SIM_EFILE_ACM_MAX          = 0x6F37,               /**< the ACM maximum value file   */
+       TAPI_SIM_EFILE_PUCT                     = 0x6F41,               /**< the Price per Unit and. file */
+       TAPI_SIM_EFILE_CBMI                     = 0x6F45,               /**< the Cell Brd msg Id sel file */
+       TAPI_SIM_EFILE_PHASE                    = 0x6FAE,               /**< the PHASE identification file*/
+
+       /* For Phase 2+ */
+       TAPI_SIM_EFILE_SDN                      = 0x6F49,               /**< the Service Dialing Numbers */
+       TAPI_SIM_EFILE_EXT3                     = 0x6F4C,               /**< the Extension 3 file         */
+       TAPI_SIM_EFILE_BDN                      = 0x6F4D,               /**< the BDN file                 */
+       TAPI_SIM_EFILE_EXT4                     = 0x6F4E,               /**< the Extension 4 file         */
+       TAPI_SIM_EFILE_ECC                      = 0x6FB7,               /**< the Emergency Call Codes     */
+       TAPI_SIM_EFILE_SPN                      = 0x6F46,               /**< the Service Provider Name    */
+       TAPI_SIM_EFILE_SPDI                     = 0x6FCD,               /**< the Service provider display information*/
+       TAPI_SIM_EFILE_PNN                      = 0x6FC5        ,               /**< the PLMN Network Name File*/
+       TAPI_SIM_EFILE_OPL                      = 0x6FC6        ,               /**< the Operator PLMN List File*/
+
+       /* Contents of files at the DF GRAPHICS level */
+       TAPI_SIM_EFILE_IMG                      = 0x4F20,               /**< image */
+
+       /* 4.2 Contents of files at the SIM ADF (Application DF) level */
+       TAPI_SIM_EFILE_USIM_LI                  = 0x6A05,               /**< USIM: Language Indication */
+       TAPI_SIM_EFILE_USIM_PL                  = 0x2A05,       /**< the Language Preference file of USIM */
+       TAPI_SIM_EFILE_USIM_IMSI                        = 0x6A07,       /**< IMSI */
+       TAPI_SIM_EFILE_USIM_ACM_MAX             = 0x6A37,       /**< ACM maximum value */
+       TAPI_SIM_EFILE_USIM_UST                 = 0x6A38,       /**< USIM Service Table */
+       TAPI_SIM_EFILE_USIM_ACM                 = 0x6A39,       /**< Accumulated Call Meter */
+       TAPI_SIM_EFILE_USIM_SPN                 = 0x6A46,       /**< Service Provider Name */
+       TAPI_SIM_EFILE_USIM_PUCT                        = 0x6A41,       /**< Price per Unit and Currency Table */
+       TAPI_SIM_EFILE_USIM_CBMI                        = 0x6A45,       /**< Cell Broadcaster Message Identifier selection */
+       TAPI_SIM_EFILE_USIM_ECC                 = 0x6AB7,       /**< Emergency Call Codes */
+       TAPI_SIM_EFILE_USIM_FDN                 = 0x6A3B,       /**< Fixed Dialing Number */
+       TAPI_SIM_EFILE_USIM_SMS                 = 0x6A3C,       /**< SMS */
+       TAPI_SIM_EFILE_USIM_MSISDN              = 0x6A40,       /**< My own number */
+       TAPI_SIM_EFILE_USIM_SMSP                        = 0x6A42,       /** < SMS parameter */
+       TAPI_SIM_EFILE_USIM_SMSS                        = 0x6A43,       /** < SMS status */
+       TAPI_SIM_EFILE_USIM_SDN                 = 0x6A49,       /** < Service dialing number */
+       TAPI_SIM_EFILE_USIM_EXT1                        = 0X6A4A,       /** < EXT1 record file */
+       TAPI_SIM_EFILE_USIM_EXT2                        = 0x6A4B,       /** < EXT2 record file */
+       TAPI_SIM_EFILE_USIM_EXT3                        = 0x6A4C,       /** < EXT3 record file */
+       TAPI_SIM_EFILE_USIM_EXT4                        = 0x6A55,       /** < EXT4 record file */
+       TAPI_SIM_EFILE_USIM_EXT5                        = 0x6A4E,       /** < EXT5 record file */
+       TAPI_SIM_EFILE_USIM_EXT6                        = 0x6FC8,       /** < EXT6 record file */
+       TAPI_SIM_EFILE_USIM_EXT7                        = 0x6FCC,       /** < EXT7 record file */
+
+       TAPI_SIM_EFILE_USIM_CCP2                        = 0x6A4F,       /**< Capability Configuration Parameters 2 */
+       TAPI_SIM_EFILE_USIM_HIDDEN_KEY  = 0x6FC3,       /**< Key for hidden phonebook entries */
+       TAPI_SIM_EFILE_USIM_BDN                 = 0x6A4D,       /**< Barred Dialing Numbers */
+
+       TAPI_SIM_EFILE_USIM_MBDN                        = 0x6FC7,       /** < Mailbox dialing number -linear fixed*/
+       TAPI_SIM_EFILE_USIM_MBI                 = 0x6FC9,       /** < Mailbox Identifier -linear fixed*/
+
+       TAPI_SIM_EFILE_USIM_MWIS                        = 0x6FCA,       /** < Message Waiting Indication Status -linear fixed*/
+       TAPI_SIM_EFILE_USIM_CFIS                        = 0x6FCB,       /** < Call forward indication status -linear fixed*/
+
+       TAPI_SIM_EFILE_USIM_APN_ACL             = 0x6F57,       /** < Access point name control list */
+
+       /* Contents of files at USIM ADF PHONEBOOK level */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_PBR       = 0x4FF0,       /**< Phonebook Reference File */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_CCP1      = 0x4FFE,       /**< Capability Configuration Parameters 1 */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_UID       = 0x4FF8,       /**< unique identifier */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_PSC       = 0x4FFF,       /**< phonebook synchronization counter */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_CC        = 0x4FEF,       /**< change counter */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_PUID      = 0x4FEE,       /**< previous unique identifier */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ADN       = 0x4FF1,       /**< Abbreviated Dialing Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_IAP       = 0x4FF2,       /**< Index Administration Phonebook */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_PBC       = 0x4FF3,       /**< Phonebook Control */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_EXT1      = 0x4FFB,       /**< Extension 1 */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_GRP       = 0x4FF7,       /**< Grouping File */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_AAS       = 0x4FFC,       /**< Additional number Alpha String */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_AAS1      = 0x4FFD,       /**< Additional number Alpha String */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_GAS       = 0x4F0E,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_GAS1      = 0x4F0F,       /**< Second Name Entry */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANR       = 0x4FF4,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_SNE       = 0x4FF9,       /**< Second Name Entry */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_EMAIL     = 0x4FFA,       /**< e-mail address */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRA      = 0x4F13,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRB      = 0x4F14,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRC      = 0x4F15,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANR1      = 0x4F16,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRA1     = 0x4F17,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRB1     = 0x4F18,       /**< Additional Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ANRC1     = 0x4F21,       /**< Additional Number */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_ADN1      = 0x4F1A,       /**< Abbreviated Dialing Number */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_PBC1      = 0x4F1B,       /**< Phonebook Control */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_GRP1      = 0x4F1C,       /**< Grouping File */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_SNE1      = 0x4F1D,       /**< Second Name Entry */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_UID1      = 0x4F1E,       /**< unique identifier */
+
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_EMAIL1    = 0x4F1F,       /**< e-mail address */
+       TAPI_SIM_EFILE_USIM_PHONEBOOK_IAP1      = 0x4FF5,       /**< Index Administration Phonebook */
+
+       /* Contents of files at TELECOM DF PHONEBOOK level */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PBR            = 0x4F30,       /**< Phonebook Reference File */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PBR1           = 0x4F29,       /**< Phonebook Reference File 1 */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PBR2           = 0x4F28,       /**< Phonebook Reference File 1 */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_CCP1           = 0x4F3D,       /**< Capability Configuration Parameters 1 */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_UID            = 0x4F00,       /**< unique identifier */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PSC            = 0x4F22,       /**< Phonebook synchronization counter */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_CC             = 0x4F23,       /**< change counter */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PUID           = 0x4F24,       /**< previous unique identifier */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ADN            = 0x4F3A,       /**< Abbreviated Dialing Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_IAP            = 0x4F25,       /**< Index Administration Phonebook */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PBC            = 0x4F09,       /**< Phonebook Control */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_EXT1           = 0x4F4A,       /**< Extension 1 */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_GRP            = 0x4F26,       /**< Grouping File */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_AAS            = 0x4F4B,       /**< Additional number Alpha String */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_GAS            = 0x4F4C,       /**< Additional Number */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANR            = 0x4F11,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_SNE            = 0x4F19,       /**< Second Name Entry */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_EMAIL          = 0x4F50,       /**< e-mail address */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANRA           = 0x4F31,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANRB           = 0x4F32,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANRC           = 0x4F40,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANR1           = 0x4F33,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANRA1  = 0x4F34,       /**< Additional Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ANRB1  = 0x4F35,       /**< Additional Number */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_ADN1           = 0x4F36,       /**< Abbreviated Dialing Number */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_PBC1           = 0x4F37,       /**< Phonebook Control */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_GRP1           = 0x4F38,       /**< Grouping File */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_SNE1           = 0x4F39,       /**< Second Name Entry */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_UID1           = 0x4F3B,       /**< unique identifier */
+
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_EMAIL1 = 0x4F3C,       /**< e-mail address */
+       TAPI_SIM_EFILE_TELECOM_PHONEBOOK_IAP1           = 0x4F3E,       /**< Index Administration Phonebook */
+
+       TAPI_SIM_EFILE_MSG_WAITING_INDICATION_STATUS                    =0x6FCA,                /** < MSG waiting indication  *///WILL BE REMOVED
+
+       /* CPHS FILE ID */
+       TAPI_SIM_EFILE_CPHS_VOICE_MSG_WAITING                                   = 0x6F11,       /** < CPHS voice MSG waiting indication  */
+       TAPI_SIM_EFILE_CPHS_SERVICE_STRING_TABLE                                = 0x6F12,       /** < CPHS service string table  */
+       TAPI_SIM_EFILE_CPHS_CALL_FORWARD_FLAGS                          = 0x6F13,               /** < CPHS call forward flags  */
+       TAPI_SIM_EFILE_CPHS_OPERATOR_NAME_STRING                                = 0x6F14,       /** < CPHS operator name string  */
+       TAPI_SIM_EFILE_CPHS_CUSTOMER_SERVICE_PROFILE                    = 0x6F15,       /** < CPHS customer service profile  */
+       TAPI_SIM_EFILE_CPHS_CPHS_INFO                                                   = 0x6F16,       /** < CPHS information  */
+       TAPI_SIM_EFILE_CPHS_MAILBOX_NUMBERS                                     = 0x6F17,       /** < CPHS mail box numbers  */
+       TAPI_SIM_EFILE_CPHS_OPERATOR_NAME_SHORT_FORM_STRING     = 0x6F18,       /** < CPHS operator name short form string  */
+       TAPI_SIM_EFILE_CPHS_INFORMATION_NUMBERS                         = 0x6F19,       /** < CPHS information numbers  */
+
+       /*  CPHS ALS FILE ID */
+       TAPI_SIM_CPHS_DYNAMICFLAGS                                                              = 0x6F9F,       /** < CPHS Dynamics flags  */
+       TAPI_SIM_CPHS_DYNAMIC2FLAG                                                              = 0x6F92,       /** < CPHS Dynamics2 flags  */
+       TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_LINE2                    = 0x6F98,       /** < CPHS CSP2  */
+
+       /* ISIM files */
+       TAPI_SIM_EFILE_ISIM_IMPI                = 0x6F02,               /** < IMS private user identity   */
+       TAPI_SIM_EFILE_ISIM_DOMAIN      = 0x6F03,               /** < IMS Home Network Domain Name   */
+       TAPI_SIM_EFILE_ISIM_IMPU                = 0x6F04,               /** < IMS public user identity    */
+       TAPI_SIM_EFILE_ISIM_AD          = 0x6FAD,               /** < Administrative data     */  /* NOT implemented */
+       TAPI_SIM_EFILE_ISIM_ARR         = 0x6F06,               /** < Access control file     */  /* NOT implemented */
+
+       /* ID clashes with IMSI file Id so changed to  6FFF - actual Id is 0x6F07 */ /* modem no support ?*/
+       TAPI_SIM_EFILE_ISIM_IST         = 0x6FFF,               /** <ISIM keys     */
+       TAPI_SIM_EFILE_ISIM_KEYS                = 0x6F08,               /** < Access control file     */
+       TAPI_SIM_EFILE_ISIM_PCSCF               = 0x6F09,               /** < PCSCF address     */
+       TAPI_SIM_EFILE_ISIM_GBABP       = 0x6FD5,               /* support from IPC - NO RSIM access */
+
+       /* Root Certificates */
+       TAPI_SIM_EFILE_CA_TOKENINFO     = 0x5032,
+       TAPI_SIM_EFILE_CA_ODF           = 0x5031,
+       TAPI_SIM_EFILE_CA_CDFTRUSTED    = 0x4404,
+       TAPI_SIM_EFILE_CA_TRUSTCERT1    = 0x4424,
+       TAPI_SIM_EFILE_CA_TRUSTCERT2    = 0x4425,
+       TAPI_SIM_EFILE_CA_TRUSTCERT3    = 0x4426,
+       TAPI_SIM_EFILE_CA_DODFPROV      = 0x4407,
+       TAPI_SIM_EFILE_CA_BOOTSTRAP     = 0x4440,
+       TAPI_SIM_EFILE_CA_CONFIG1       = 0x4441,
+
+       /* Invalid File ID, All the file ID are less than this Value*/
+       TAPI_SIM_EFILE_INVALID          =0xFFFF,                /**< Invalid file.*/
+       TAPI_SIM_EFILE_OTHERS   ,                                       /**< Element to indicate an unknown file.*/
+
+} TelSimFileName_t;
+
+/**
+ * @enum TelSimPinStatus_t
+ * This enumeration defines the pin status.
+ */
+typedef enum
+{
+       TAPI_SIM_PIN_STATUS_DISABLED            = 0x00,         /**< Pin1 or Pin2 Disabled */
+       TAPI_SIM_PIN_STATUS_ENABLED                     = 0x01,         /**< Pin1 or Pin2 Enabled */
+       TAPI_SIM_PIN_STATUS_BLOCKED                     = 0x02,         /**< SIM is present, but PIN1 or PIN2  is blocked. need unblocking by PUK or PUK2 */
+       TAPI_SIM_PIN_STATUS_PUK_BLOCKED         = 0x03,         /**< SIM is present, but PUK is blocked. */
+       TAPI_SIM_PIN_STATUS_UNKNOWN             = 0xFF          /**< SIM is in unknown state */
+
+} TelSimPinStatus_t;
+
+/**
+ * @enum TelSimPinOperationResult_t
+ * This enumeration defines the pin operation result from the lower layers.
+ */
+typedef enum
+{
+       TAPI_SIM_PIN_OPERATION_SUCCESS,                 /**< Operation involving PIN (verification/change/enable/disable, etc) is successful.  */
+       TAPI_SIM_BUSY,                                                          /**< SIM is busy  */
+       TAPI_SIM_CARD_ERROR,                                            /**< SIM card error - Permanently blocked and general errors   */
+       TAPI_SIM_INCOMPATIBLE_PIN_OPERATION,    /**< SIM Incompatible pin operation that is in case when invalid SIM command is given or incorrect parameters are supplied to the SIM. */
+       TAPI_SIM_PIN_INCORRECT_PASSWORD,                /**< SIM PIN  Incorrect password */
+       TAPI_SIM_PUK_INCORRECT_PASSWORD,                /**< SIM PUK Incorrect Password */
+       TAPI_SIM_PUK_REQUIRED,                                  /**< PUK Required */
+       TAPI_SIM_PIN_REQUIRED   ,                                       /**< PIN Required */
+       TAPI_SIM_NCK_REQUIRED,                                  /**< Network Control Key Required */
+       TAPI_SIM_NSCK_REQUIRED,                                 /**< Network Subset Control Key Required */
+       TAPI_SIM_SPCK_REQUIRED,                                 /**< Service Provider Control Key Required */
+       TAPI_SIM_CCK_REQUIRED,                                  /**< Corporate Control Key Required */
+       TAPI_SIM_LOCK_REQUIRED,                                 /**<  PH-SIM (phone-SIM) locked state **/
+
+}TelSimPinOperationResult_t;
+
+/**
+ * @enum TelSimAccessResult_t
+ * This enumeration defines the SIM access result from the lower layers.
+ */
+typedef enum
+{
+       TAPI_SIM_ACCESS_SUCCESS,                                                                /**< Access to file successful.  */
+       TAPI_SIM_ACCESS_CARD_ERROR,                                                     /**< SIM card error    */
+       TAPI_SIM_ACCESS_FILE_NOT_FOUND,                                         /**< File not found  */
+       TAPI_SIM_ACCESS_ACCESS_CONDITION_NOT_SATISFIED, /**< Access condition is not fulfilled  */
+       TAPI_SIM_ACCESS_FAILED,                                                         /**< Access failed.  */
+
+}TelSimAccessResult_t;
+
+/**
+ * @enum TelSimPinType_t
+ * This enumeration defines the pin type.
+ */
+typedef enum
+{
+    TAPI_SIM_PTYPE_PIN1                = 0x00,         /**< PIN 1 code */
+    TAPI_SIM_PTYPE_PIN2                = 0x01,         /**< PIN 2 code */
+    TAPI_SIM_PTYPE_PUK1        = 0x02,         /**< PUK 1 code */
+    TAPI_SIM_PTYPE_PUK2        = 0x03,         /**< PUK 2 code */
+    TAPI_SIM_PTYPE_UPIN               = 0x04,          /**< Universal PIN - Unused now */
+    TAPI_SIM_PTYPE_ADM         = 0x05,         /**< Administrator - Unused now */
+    TAPI_SIM_PTYPE_SIM         = 0x06          /**< SIM Lock code */
+} TelSimPinType_t;
+
+/**
+* @enum TelSimPersType_t
+*      This structure gives security lock type information enum values
+*/
+typedef enum
+{
+       TAPI_SIM_PERS_NET               = 0x00, /**< Network Lock */
+       TAPI_SIM_PERS_NS                = 0x01, /**< Network Subset Lock */
+       TAPI_SIM_PERS_SP                = 0x02, /**< Service Provider Lock */
+       TAPI_SIM_PERS_CP                = 0x03, /**< Corporate Lock */
+} TelSimPersType_t;
+
+/**
+ * @enum TelSimTypeOfNum_t
+ * This enumeration defines the type of number.
+ */
+typedef enum
+{
+       TAPI_SIM_TON_UNKNOWN                            = 0,            /**< unknown */
+       TAPI_SIM_TON_INTERNATIONAL                      = 1,            /**< international number */
+       TAPI_SIM_TON_NATIONAL                           = 2,            /**< national number */
+       TAPI_SIM_TON_NETWORK_SPECIFIC           = 3,            /**< network specific number */
+       TAPI_SIM_TON_DEDICATED_ACCESS           = 4,            /**< subscriber number */
+       TAPI_SIM_TON_ALPHA_NUMERIC                      = 5,            /**< alphanumeric, GSM 7-bit default alphabet) */
+       TAPI_SIM_TON_ABBREVIATED_NUMBER = 6,            /**< abbreviated number */
+       TAPI_SIM_TON_RESERVED_FOR_EXT           = 7             /**< reserved for extension */
+} TelSimTypeOfNum_t;
+
+/**
+*  @enum TelSimTextEncrypt_t
+*   This enumeration defines the text encryption types
+*/
+typedef enum
+{
+       TAPI_SIM_TEXT_ENC_ASCII,                /**< ASCII Encoding */
+       TAPI_SIM_TEXT_ENC_GSM7BIT,      /**< GSM 7 Bit Encoding */
+       TAPI_SIM_TEXT_ENC_UCS2,         /**< UCS2 Encoding */
+       TAPI_SIM_TEXT_ENC_HEX,          /**< HEX Encoding */
+}TelSimTextEncrypt_t;
+
+/**
+* @enum TelSimPbFileType_t
+* This enumeration defines  different storage types to be selected in SIM or USIM
+*/
+typedef enum
+{
+       TAPI_SIM_PB_FDN,                                /**< Fixed Dialing Number */
+       TAPI_SIM_PB_LDN,                                /**< last dialed number  - WILL BE REMOVED */
+       TAPI_SIM_PB_MSISDN,                     /**< my own number - MSISDN list */
+       TAPI_SIM_PB_ADN,                                /**< SIM - ADN   */
+       TAPI_SIM_PB_SDN,                             /**< Service Dialing Number  */
+       TAPI_SIM_PB_EN,                         /**< Emergency number  - WILL BE REMOVED*/
+       TAPI_SIM_PB_3GSIM,                      /**< USIM - 3G phone book */
+       TAPI_SIM_PB_AAS,                                /**< Additional number Alpha String */
+       TAPI_SIM_PB_GAS,                                /**< Grouping identifier Alpha String */
+       TAPI_SIM_PB_UNKNOWNN = 0xFF,    /**< Unknown file type */
+}TelSimPbFileType_t;
+
+/**
+ * @enum tapi_pb_storage_field_tag_type_t
+*  This enumeration defines the different storage field types in 3G Phone book.
+*/
+typedef enum
+{
+       /* for 3G phone storage field type */
+       TAPI_PB_3G_NAME         = 0x01,         /**< Name */
+       TAPI_PB_3G_NUMBER,                              /**< Number */
+       TAPI_PB_3G_ANR,                                 /**< Another number */
+       TAPI_PB_3G_EMAIL,                                       /**< Email */
+       TAPI_PB_3G_SNE,                                 /**< Second name entry */
+       TAPI_PB_3G_GRP,                                 /**< Group file */
+       TAPI_PB_3G_PBC,                                 /** <1 byte control info and 1 byte hidden info*/
+       TAPI_PB_3G_ANRA,                                        /**< Another number */
+       TAPI_PB_3G_ANRB,                                        /**< Another number */
+}TelSimPb3GFileType_t;
+
+/**
+ * @enum TelSimNumberingPlanIdentity_t
+ * This enumeration defines the numbering plan identifier.
+ */
+typedef enum {
+       TAPI_SIM_NPI_UNKNOWN                                            = 0,            /**< Unknown */
+       TAPI_SIM_NPI_ISDN_TEL                                           = 1,            /**< ISDN/Telephone numbering plan */
+       TAPI_SIM_NPI_DATA_NUMBERING_PLAN                = 3,            /**< Data numbering plan */
+       TAPI_SIM_NPI_TELEX                                              = 4,            /**< Telex numbering plan */
+       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN             = 5,            /**< Service Center Specific plan */
+       TAPI_SIM_NPI_SVC_CNTR_SPECIFIC_PLAN2    = 6,            /**< Service Center Specific plan */
+       TAPI_SIM_NPI_NATIONAL                                   = 8,            /**< National numbering plan */
+       TAPI_SIM_NPI_PRIVATE                                            = 9,            /**< Private numbering plan */
+       TAPI_SIM_NPI_ERMES_NUMBERING_PLAN               = 10,   /**< ERMES numbering plan */
+       TAPI_SIM_NPI_RESERVED_FOR_EXT                   = 0xF   /**< Reserved for extension */
+} TelSimNumberingPlanIdentity_t;
+
+/**
+ * @enum TelSimEccEmergencyServiceInfo_t
+ * This enumeration defines the emergency service type.
+ */
+typedef enum
+{
+       TAPI_SIM_ECC_ESC_POLICE                 = 0x01, /**< Police */
+       TAPI_SIM_ECC_ESC_AMBULANCE              = 0x02, /**< Ambulance */
+       TAPI_SIM_ECC_ESC_FIREBRIGADE    = 0x04, /**< Fire brigade */
+       TAPI_SIM_ECC_ESC_MARAINEGUARD   = 0x08, /**< Marine guard */
+       TAPI_SIM_ECC_ESC_MOUTAINRESCUE  = 0x10, /**< Mountain rescue */
+       TAPI_SIM_ECC_ESC_SPARE                  = 0x00  /**< Spare */
+ }TelSimEccEmergencyServiceInfo_t;
+
+/**
+ * @enum TelSimPbAccessResult_t
+ * This enumeration defines the Phone book access result
+ */
+typedef enum
+{
+       TAPI_SIM_PB_SUCCESS,                                                            /**< SIM phonebook operation successful. */
+       TAPI_SIM_PB_FAIL,                                                                       /**< SIM phonebook operation failure. */
+       TAPI_SIM_PB_INVALID_INDEX,                                              /**< The index passed was not a valid index. */
+       TAPI_SIM_PB_INVALID_NUMBER_LENGTH,                              /**< The number length is exceeds the max length allowed (or 0). */
+       TAPI_SIM_PB_INVALID_NAME_LENGTH,                                /**< The name length is exceeds the max length allowed (or 0). */
+       TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED,     /**< Access condition for PB file is not satisfied. */
+
+}TelSimPbAccessResult_t;
+
+/**
+ * @enum TelSimLanguagePreferenceCode_t
+ * This enumeration defines the language indication code.
+ */
+typedef enum {
+       TAPI_SIM_LP_GERMAN = 0x00, /**< German */
+       TAPI_SIM_LP_ENGLISH = 0x01,     /**< English */
+       TAPI_SIM_LP_ITALIAN = 0x02,     /**< Italian */
+       TAPI_SIM_LP_FRENCH = 0x03, /**< French */
+       TAPI_SIM_LP_SPANISH = 0x04, /**< Spanish */
+       TAPI_SIM_LP_DUTCH = 0x05, /**< Dutch */
+       TAPI_SIM_LP_SWEDISH = 0x06, /**< Swedish */
+       TAPI_SIM_LP_DANISH = 0x07, /**< Danish */
+       TAPI_SIM_LP_PORTUGUESE = 0x08,  /**< Portuguese */
+       TAPI_SIM_LP_FINNISH = 0x09, /**< Finnish */
+       TAPI_SIM_LP_NORWEGIAN = 0x0A, /**< Norwegian */
+       TAPI_SIM_LP_GREEK = 0x0B, /**< Greek */
+       TAPI_SIM_LP_TURKISH = 0x0C, /**< Turkish */
+       TAPI_SIM_LP_HUNGARIAN = 0x0D, /**< Hungarian */
+       TAPI_SIM_LP_POLISH = 0x0E, /**< Polish */
+       TAPI_SIM_LP_KOREAN = 0x0F, /**< Korean */
+       TAPI_SIM_LP_CHINESE = 0x10,     /**< Chinese */
+       TAPI_SIM_LP_RUSSIAN = 0x11,     /**< Russian */
+       TAPI_SIM_LP_JAPANESE = 0x12, /**< Japanese */
+       TAPI_SIM_LP_LANG_UNSPECIFIED = 0xFF     /**< Unspecified */
+} TelSimLanguagePreferenceCode_t;
+
+/**
+ * @enum TelSimAccessType_t
+ * This enumeration defines the access type information.
+ */
+typedef enum
+{
+       TAPI_SIM_READ_BINARY,                   /**< Read binary file */
+       TAPI_SIM_READ_RECORD,                   /**< Read record */
+       TAPI_SIM_READ_FILE_RAW,         /**< Read file and return raw data */
+       TAPI_SIM_GET_RESPONSE,          /**< Get response */
+       TAPI_SIM_UPDATE_BINARY,         /**< Update binary */
+       TAPI_SIM_UPDATE_RECORD,         /**< Update record */
+}TelSimAccessType_t;
+
+/**
+ * @enum TelSimCardStatus_t
+ * This enumeration defines the SIM card status
+ */
+typedef enum
+{
+       TAPI_SIM_STATUS_CARD_ERROR              = 0x00, /**< Bad card / On the fly SIM gone bad **/
+       TAPI_SIM_STATUS_CARD_NOT_PRESENT                = 0x01, /**<  Card not present **/
+       TAPI_SIM_STATUS_SIM_INITIALIZING                        = 0x02, /**<  SIM is Initializing state **/
+       TAPI_SIM_STATUS_SIM_INIT_COMPLETED              = 0x03, /**<  SIM Initialization ok **/
+       TAPI_SIM_STATUS_SIM_PIN_REQUIRED                = 0x04, /**<  PIN  required state **/
+       TAPI_SIM_STATUS_SIM_PUK_REQUIRED                = 0x05, /**<  PUK required state **/
+       TAPI_SIM_STATUS_CARD_BLOCKED                    = 0x06, /**<  PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) **/
+       TAPI_SIM_STATUS_SIM_NCK_REQUIRED                = 0x07, /**<  Network Control Key required state **/
+       TAPI_SIM_STATUS_SIM_NSCK_REQUIRED               = 0x08, /**<  Network Subset Control Key required state **/
+       TAPI_SIM_STATUS_SIM_SPCK_REQUIRED               = 0x09, /**<  Service Provider Control Key required state **/
+       TAPI_SIM_STATUS_SIM_CCK_REQUIRED                = 0x0a, /**<  Corporate Control Key required state **/
+       TAPI_SIM_STATUS_CARD_REMOVED                    =0x0b,  /**<  Card removed **/
+       TAPI_SIM_STATUS_SIM_LOCK_REQUIRED               = 0x0c  /**<  PH-SIM (phone-SIM) locked state **/
+}TelSimCardStatus_t;
+
+/**
+* @enum TelSimCphsPhaseType_t
+* This enum gives the current CPHS phase of SIM card.
+*/
+typedef enum
+{
+       TAPI_SIM_CPHS_PHASE1            = 0x01, /**< phase1  */
+       TAPI_SIM_CPHS_PHASE2            = 0x02, /**< phase2  */
+       TAPI_SIM_CPHS_PHASE_RFU = 0xff  /**< RFU  */
+
+}TelSimCphsPhaseType_t;
+
+/**
+* @enum TelSimCphsIndexLevelIndicator_t
+* This struct gives CPHS index level indication.
+*/
+typedef enum
+{
+       TAPI_SIM_CPHS_INDEX_LEVEL_ONE   = 0x01, /**< SIM cphs index level one */
+       TAPI_SIM_CPHS_INDEX_LEVEL_TWO   = 0x02, /**< SIM cphs index level two */
+       TAPI_SIM_CPHS_INDEX_LEVEL_THREE = 0x03, /**< SIM cphs index level three */
+       TAPI_SIM_CPHS_INDEX_LEVEL_RFU   = 0xff  /**< SIM cphs index level rfu */
+}TelSimCphsIndexLevelIndicator_t;
+
+/**
+* @enum TelSimCphsCustomerServiceGroup_t
+* This struct gives CPHS group service type information .
+*/
+typedef enum
+{
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_OFFERING                   = 0x01,         /**< Group csp offering*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_RESTRICTION                        = 0x02,         /**< Group csp restriction*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_OTHER_SUPP_SERVICES             = 0x03,         /**< Group csp supplementary services*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CALL_COMPLETION                 = 0x04,         /**< Group csp completion*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_TELESERVICES                            = 0x05,         /**< Group csp teleservices*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_TELESERVICES               = 0x06,         /**< Group csp cphs teleservies*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_CPHS_FEATURES                   = 0x07,         /**< Group csp cphs features*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_NUMBER_IDENTIFIERS              = 0x08,         /**< Group csp number identifiers*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_PHASE_SERVICES                  = 0x09,         /**< Group csp phase services*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_VALUE_ADDED_SERVICES    = 0xC0,         /**< Group csp value added services*/
+       TAPI_SIM_CPHS_CSP_SERVICE_GROUP_INFORMATION_NUMBERS     = 0xD5          /**< Group csp information numbers*/
+}TelSimCphsCustomerServiceGroup_t;
+
+/**
+* @enum TelSimIndicationStatusType_t
+* This struct gives SIM Indication service information.
+*/
+typedef enum
+{
+       TAPI_SIM_INDICATION_MW = 0x00, /**< Message Waiting indication status */
+       TAPI_SIM_INDICATION_CF = 0x01, /**< Call Forwarding indication status */
+}TelSimIndicationStatusType_t;
+
+/**
+* @enum TelSimMsgWaitingGroup_t
+* This struct gives message waiting group type for mailbox,mwis and cfis.
+*/
+typedef enum
+{
+       TAPI_SIM_MWG_NONE       = 0x00,         /**< none*/
+       TAPI_SIM_MWG_VOICE      = 0x01,         /**< voice*/
+       TAPI_SIM_MWG_FAX                = 0x02,         /**< fax*/
+       TAPI_SIM_MWG_EMAIL      = 0x03,         /**< email*/
+       TAPI_SIM_MWG_OTHER      = 0x04,         /**< other*/
+       TAPI_SIM_MWG_VIDEO      = 0x05,         /**< video*/
+       TAPI_SIM_MWG_RFU                = 0xff          /**< rfu*/
+}TelSimMsgWaitingGroup_t;
+
+/**
+* @enum TelSimCallForwardUiIndicatorStatus_t
+* This struct gives call forward ui indicator status.
+*/
+typedef enum
+{
+       TAPI_SIM_CFIS_NONE      = 0x00,         /**< CFIS none*/
+       TAPI_SIM_CFIS_VOICE     = 0x01,         /**< CFIS voice*/
+       TAPI_SIM_CFIS_FAX               = 0x02,         /**< CFIS fax*/
+       TAPI_SIM_CFIS_DATA      = 0x04,         /**< CFIS data*/
+       TAPI_SIM_CFIS_RFU               = 0x08          /**< CFIS rfu*/
+}TelSimCallForwardUiIndicatorStatus_t;
+
+/**
+* @enum TelSimDynamicFlagsSelectedLineId_t
+* This enum gives dynamics flag selected line  information.
+*/
+typedef enum
+{
+       TAPI_SIM_DYNAMIC_FLAGS_LINE1    = 0x01, /**< line 1 */
+       TAPI_SIM_DYNAMIC_FLAGS_LINE2    = 0x00, /**< line 2*/
+       TAPI_SIM_DYNAMIC_FLAGS_RFU              = 0xff  /**< rfu*/
+
+}TelSimDynamicFlagsSelectedLineId_t;
+
+/**
+* @enum tapi_sim_dynamic2_flag_als_status_t
+* This enum gives dynamics2 flag selected line  information.
+*/
+typedef enum
+{
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_LOCKED           = 0x01,   /**< Dynamic flags locked */
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_UNLOCKED = 0x00, /**< Dynamic flags unlocked */
+       TAPI_SIM_PIN2_ACCESSIBLE_FLAGS_RFU                      = 0xff  /**< rfu */
+}TelSimDynamic2FlagAlsStatus_t;
+
+/**
+* @enum TelSimSapMsgId_t
+* This enum gives the SAP message Ids between SAP client and SAP server.
+*/
+typedef enum
+{
+       TAPI_SIM_SAP_CONNECT_REQ                        = 0x00,                         /**< SAP connect request from client to server*/
+       TAPI_SIM_SAP_CONNECT_RESP                       = 0x01,                         /**< SAP connect response from server to client*/
+       TAPI_SIM_SAP_DISCONNECT_REQ                     = 0x02,                         /**< SAP disconnect request from client to server */
+       TAPI_SIM_SAP_DISCONNECT_RESP            = 0x03,                         /**< SAP disconnect response from server to client */
+       TAPI_SIM_SAP_DISCONNECT_IND                     = 0x04,                         /**< SAP disconnect indication from server to client */
+       TAPI_SIM_SAP_TRANSFER_APDU_REQ          = 0x05,                         /**< SAP transfer APDU(application protocol data unit) from client to server */
+       TAPI_SIM_SAP_TRANSFER_APDU_RESP = 0x06,                         /**< SAP response of transfer APDU */
+       TAPI_SIM_SAP_TRANSFER_ATR_REQ           = 0x07,                         /**< SAP Client request about Transfer ATR(Answer to Reset) procedure */
+       TAPI_SIM_SAP_TRANSFER_ATR_RESP          = 0x08,                         /**< SAP Server response after execution of ATR */
+       TAPI_SIM_SAP_POWER_SIM_OFF_REQ          = 0x09,                         /**< SAP Client request about power SIM off in Server */
+       TAPI_SIM_SAP_POWER_SIM_OFF_RESP = 0x0A,                         /**< SAP Server response the result about power SIM off in Server */
+       TAPI_SIM_SAP_POWER_SIM_ON_REQ           = 0x0B,                         /**< SAP Client request about power SIM on in Server */
+       TAPI_SIM_SAP_POWER_SIM_ON_RESP          = 0x0C,                         /**< SAP Server response the result about power SIM on in Server */
+       TAPI_SIM_SAP_RESET_SIM_REQ                      = 0x0D,                         /**< SAP Client request about SIM reset in Server */
+       TAPI_SIM_SAP_RESET_SIM_RESP                     = 0x0E,                         /**< SAP Server response the result about SIM reset in Server */
+       TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_REQ   = 0x0F, /**< SAP request current status about card reader(Client or Server) */
+       TAPI_SIM_SAP_TRANSFER_CARD_READER_STATUS_RESP = 0x10, /**< SAP response current status about card reader(Client or Server) */
+       TAPI_SIM_SAP_STATUS_IND                         = 0x11,                         /**< SAP indication of Server`s current status*/
+       TAPI_SIM_SAP_ERROR_RESP                         = 0x12,                         /**< SAP Server send error message when error occur */
+       TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_REQ = 0x13,         /**< SAP Client request Transport Protocol type(T0 or T1)*/
+       TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP = 0x14         /**< SAP Server response the result after changing Transport Protocol*/
+}TelSimSapMsgId_t;
+
+/**
+ * @enum TelSimSapConnectionStatus_t
+ * This enum gives the SAP connection status information .
+ */
+typedef enum
+{
+       TAPI_SIM_SAP_CONNECTION_STATUS_OK = 0x00,                                       /**< connect successfully */
+       TAPI_SIM_SAP_CONNECTION_STATUS_UNABLE_TO_ESTABLISH,             /**< unable to establish connection */
+       TAPI_SIM_SAP_CONNECTION_STATUS_NOT_SUPPORT_MAX_SIZE,    /**< when server does not support message length that client want send */
+       TAPI_SIM_SAP_CONNECTION_STATUS_TOO_SMALL_MAX_SIZE               /**< when client want to connect with very small message length which is not supported by Server */
+}TelSimSapConnectionStatus_t;
+
+/**
+ * @enum TelSimSapDissconnectType_t
+ * This enum gives the SAP  disconnect type information.
+ */
+typedef enum
+{
+       TAPI_SIM_SAP_DISCONNECT_TYPE_GRACEFUL=0x00,     /**< disconnection procedure ends after finishing current work */
+       TAPI_SIM_SAP_DISCONNECT_TYPE_IMMEDIATE          /**<  disconnection procedure ends immediately*/
+}TelSimSapDissconnectType_t;
+
+/**
+ * @enum TelSimSapStatusInfo_t
+ * This enum gives the SAP current connection status information
+ */
+typedef enum
+{
+        TAPI_SIM_SAP_STATUS_UNKNOWN=0x00,  /**<  SAP server connection status - unknown*/
+        TAPI_SIM_SAP_STATUS_NO_SIM,            /**<  SAP server connection status - no SIM*/
+        TAPI_SIM_SAP_STATUS_NOT_READY,         /**<  SAP server connection status - not ready*/
+        TAPI_SIM_SAP_STATUS_READY,                     /**<  SAP server connection status - ready*/
+        TAPI_SIM_SAP_STATUS_CONNECTED          /**<  SAP server connection status - connected*/
+
+}TelSimSapStatusInfo_t;
+
+/**
+ * @enum TelSimSapCardStatus_t
+ * This enum gives the SIM card status if server`s status changed about connection with subscription module
+ */
+typedef enum
+{
+        TAPI_SIM_SAP_CARD_STATUS_UNKNOWN=0x00, /**<  SAP server status(card reader status) - unknown*/
+        TAPI_SIM_SAP_CARD_STATUS_RESET,                        /**<  SAP server status(card reader status) - reset*/
+        TAPI_SIM_SAP_CARD_STATUS_NOT_ACCESSIBLE,       /**<  SAP server status(card reader status) - not accessible*/
+        TAPI_SIM_SAP_CARD_STATUS_REMOVED,              /**<  SAP server status(card reader status) - removed*/
+        TAPI_SIM_SAP_CARD_STATUS_INSERTED,             /**<  SAP server status(card reader status) - inserted*/
+        TAPI_SIM_SAP_CARD_STATUS_RECOVERED             /**<  SAP server status(card reader status) - recovered*/
+
+}TelSimSapCardStatus_t;
+
+/**
+ * @enum TelSimSapResultCode_t
+ * This enum gives the SAP result information.
+ */
+typedef enum
+{
+         TAPI_SIM_SAP_RESULT_CODE_OK=0x00,                                             /**<  SAP operation result - ok*/
+         TAPI_SIM_SAP_RESULT_CODE_NO_REASON,                                   /**<  SAP operation result - no reason*/
+         TAPI_SIM_SAP_RESULT_CODE_CARD_NOT_ACCESSIBLE,         /**<  SAP operation result - not accessible*/
+         TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_OFF,      /**<  SAP operation result - card already power off*/
+         TAPI_SIM_SAP_RESULT_CODE_CARD_REMOVED,                                /**<  SAP operation result - card removed*/
+         TAPI_SIM_SAP_RESULT_CODE_CARD_ALREADY_POWER_ON,       /**<  SAP operation result - card already power on*/
+         TAPI_SIM_SAP_RESULT_CODE_DATA_NOT_AVAILABLE,          /**<  SAP operation result - data not available*/
+         TAPI_SIM_SAP_RESULT_CODE_NOT_SUPPORT                          /**<  SAP operation result - not support*/
+
+}TelSimSapResultCode_t;
+
+/**
+ * @enum TelSimSapProtocol_t
+ * This enum gives SAP transport protocol type
+ */
+typedef enum
+{
+       TAPI_SIM_SAP_PROTOCOL_T0,       /**< T = 0, character*/
+       TAPI_SIM_SAP_PROTOCOL_T1                /**< T = 1, block*/
+}TelSimSapProtocol_t;
+
+/**
+ * @enum TelSimIsimAuthenticationResult_t
+ * This is used for IMS Authentication Procedure.
+ */
+typedef enum
+{
+       TAPI_SIM_ISIM_NO_ERROR,                                                                 /**< ISIM no error */
+       TAPI_SIM_ISIM_AUTH_CAN_NOT_PERFORM_AUTHENTICATION,      /**< status - can't perform authentication */
+       TAPI_SIM_ISIM_AUTH_SKIP_AUTHENTICATION_RESPONSE,                /**< status - skip authentication response */
+       TAPI_SIM_ISIM_AUTH_SQN_FAILURE                                                  /**< status - authentication SQN failure */
+}TelSimIsimAuthenticationResult_t;
+
+
+/**
+ * @enum TelSimFileType_t
+ * This enumeration defines the file type.
+ */
+typedef enum {
+       TAPI_SIM_FTYPE_DEDICATED = 0x00, /**< Dedicated */
+       TAPI_SIM_FTYPE_TRANSPARENT = 0x01, /**< Transparent -binary type*/
+       TAPI_SIM_FTYPE_LINEAR_FIXED = 0x02, /**< Linear fixed - record type*/
+       TAPI_SIM_FTYPE_CYCLIC = 0x04, /**< Cyclic - record type*/
+       TAPI_SIM_FTYPE_INVALID_TYPE = 0xFF /**< Invalid type */
+} TelSimFileType_t;
+
+
+/**
+ * @enum TelSimLockType_t
+ *     This structure gives security lock type enum values
+ */
+typedef enum {
+       TAPI_SIM_LOCK_READY = 0x00, /**< ME Not locked - No pin verifications for any lock*/
+
+       TAPI_SIM_LOCK_PS, /** < PH-SIM (phone-SIM) locked.Lock Phone to SIM/UICC card
+        *      (MT asks password when other than current SIM/UICC card inserted;
+        *      MT may remember certain amount of previously used cards thus not
+        *      requiring password when they are inserted
+        */
+
+       TAPI_SIM_LOCK_PF, /** < PH-FSIM (phone-first-SIM) Lock Phone to the very
+        * First inserted SIM/UICC card(MT asks password when other than the first SIM/UICC
+        * card is inserted
+        */
+
+       TAPI_SIM_LOCK_SC, /** < SIM Lock (PIN, PIN2, PUK, PUK2) Lock SIM/UICC card ( SIM asks password in ME power-up and
+        *      when this command is issued
+        */
+
+       TAPI_SIM_LOCK_FD, /** < FDN - SIM card or active application in the UICC (GSM or USIM)
+        *      fixed dialing memory feature */
+       TAPI_SIM_LOCK_PN, /**< Network Personalization */
+       TAPI_SIM_LOCK_PU, /** < network subset Personalization */
+       TAPI_SIM_LOCK_PP, /** < service Provider Personalization */
+       TAPI_SIM_LOCK_PC, /** < Corporate Personalization */
+       TAPI_SIM_LOCK_SC2, /**< PIN2 lock*/
+       TAPI_SIM_LOCK_SCPUK2 = 0x0A, /** < PIN2 Unblocking Key */
+       TAPI_SIM_LOCK_ACL = 0x0B, /** < ACL lock */
+
+       TAPI_SIM_NO_SIM = 0x80, /**< SIM not inserted */
+       TAPI_SIM_UNAVAIL = 0x81, /** < SIM interface error - SIM inserted but cannot communicate */
+       TAPI_SIM_INIT_COMPLETE = 0x82, /** < SIM initialization completed */
+       TAPI_SIM_PB_INIT_COMPLETE = 0x83,       /**< PB initialization completed */
+} TelSimLockType_t;
+
+
+/**
+ *     This will be used to get or set locks - PIN, FDN etc.
+ */
+typedef enum {
+       TAPI_SIM_LOCK_MODE_UNLOCK, /**< unlock */
+       TAPI_SIM_LOCK_MODE_LOCK,        /**< lock */
+       TAPI_SIM_LOCK_MODE_GET  /**< get */
+} tapi_sim_sec_lock_mode_t;
+
+
+/**
+ * @enum tapi_sim_acl_t
+ * This enumeration defines the ACL( Access Condition Level).
+ */
+typedef enum {
+       TAPI_SIM_ACL_ALW = 0x00, /**< Allowed */
+       TAPI_SIM_ACL_PIN1 = 0x01, /**< CHV 1 */
+       TAPI_SIM_ACL_PIN2 = 0x02, /**< CHV 2 */
+       TAPI_SIM_ACL_RFU = 0x04, /**< RFU */
+       TAPI_SIM_ACL_ADM = 0x08, /**< Administration */
+       TAPI_SIM_ACL_NEVER = 0xFF /** Never */
+} TelSimAcl_t;
+
+
+/**
+ * @enum TelSimRecordMode_t
+ * This enumeration defines the record mode.
+ */
+typedef enum {
+       TAPI_SIM_RECORD_NONE = 0x00, /**< N/A, meaning the target file isn't a record type */
+       TAPI_SIM_RECORD_ABSOLUTE = 0x01, /**< The specified record will be read or updated */
+       TAPI_SIM_RECORD_CURRENT = 0x02, /**< The current record will be read or updated */
+       TAPI_SIM_RECORD_NEXT = 0x03, /**< The next record will be read or updated */
+       TAPI_SIM_RECORD_PREVIOUS = 0x04, /**< The previous record will be read or updated */
+       TAPI_SIM_RECORD_TO_THE_LAST = 0x05, /**< All records from the record specified by record index to the last one will be read to the last */
+       TAPI_SIM_RECORD_FROM_THE_FIRST = 0x06 /**< All records from the first record to the one specified by record_index will be read from the first */
+} TelSimRecordMode_t;
+
+
+/**
+ * @enum TelSimLockKey_t
+ *     This structure gives security lock key information enum values
+ */
+typedef enum {
+       TAPI_SIM_LOCK_KEY_NOT_NEED = 0x00, /**< key not need */
+       TAPI_SIM_LOCK_KEY_PIN = 0x01, /**< PIN required */
+       TAPI_SIM_LOCK_KEY_PUK = 0x02, /**< PUK required */
+       TAPI_SIM_LOCK_KEY_PIN2 = 0x03, /**< PIN2 required */
+       TAPI_SIM_LOCK_KEY_PUK2 = 0x04, /**< PUK2 required */
+       TAPI_SIM_LOCK_PERM_BLOCKED = 0x05, /**< Permanent block SIM */
+       TAPI_SIM_LOCK_DISABLE = 0x06, /**< Lock disable */
+       TAPI_SIM_LOCK_KEY_SIMLOCK = 0x07,       /**< SIM Lock key required */
+} TelSimLockKey_t;
+
+
+/**
+ * @enum TelSimPbAccessMode_t
+ * This enumeration defines  modes to add, delete, edit for phone book access
+ */
+typedef enum {
+       TAPI_SIM_PB_ACCESS_MODE_ADD = 0x01, /**< Phone Book Access mode - Add entry */
+       TAPI_SIM_PB_ACCESS_MODE_DEL = 0x02,     /**< Phone Book Access mode - Delete entry */
+       TAPI_SIM_PB_ACCESS_MODE_EDIT = 0x03,    /**< Phone Book Access mode - edit entry */
+} TelSimPbAccessMode_t;
+
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/**
+ * This structure contains information about pin data.
+ * SIM PIN DATA. For PIN handling (Change, UnBlock) & for Type of PIN information.
+ */
+typedef struct
+{
+       TelSimPinType_t type;   /**< Pin type */
+       unsigned char*  pw;             /**< PIN code */
+       unsigned int            pw_len; /**< PIN code length*/
+} TelSimSecPw_t;
+
+/**
+ * This structure contains information about personalization data.
+ */
+typedef struct
+{
+       TelSimPersType_t        type;   /**< Personalization type */
+       unsigned char*  pw;             /**< Password */
+       unsigned int            pw_len; /**< Password length*/
+} TelSimPersPw_t;
+
+/**
+ * This data structure defines the data for the Read file result information.
+ */
+typedef struct
+{
+       TelSimFileName_t        file_id;                                /**< rsim access : SIM file id to access */
+       TelSimAccessType_t      rsim_cmd;               /**< rsim access : get response, read, update available*/
+       unsigned char   p1;                                             /**< rsim access : offset(bin), record num(record)*/
+       unsigned char   p2;                                             /**< rsim access : offset low(bin), mode(record)*/
+       unsigned char   p3;                                             /**< Number of bytes to be read(read case) or Length of the subsequent data field(update case) */
+       char* data;                                                     /**< Only update case. Optional*/
+} TelSimRSimReq_t;
+
+/**
+ * This data structure defines the data for the Read file with raw format.
+ */
+typedef struct {
+       unsigned short file_id;
+       char data_len;
+       unsigned char pData[1];
+
+} TelSimReadFileRawData_t;
+
+/**
+ * This data structure defines the data for the Response of request raw format it.
+ */
+typedef struct {
+       unsigned char sw1;
+       unsigned char sw2;
+       unsigned char data_len;
+       unsigned char *pData;
+} TelSimReadFileRawResonse_t;
+
+
+/**
+ * This data structure defines the data for the apdu.
+ */
+typedef struct {
+       unsigned char apdu_len;
+       unsigned char* apdu;
+} TelSimApdu_t;
+
+/**
+ * This data structure defines the data for the Response of sending apdu.
+ */
+typedef struct {
+       unsigned char apdu_resp_len;
+       unsigned char apdu_resp[TAPI_SIM_APDU_MAX_LEN];
+} TelSimApduResp_t;
+
+
+/**
+ * This data structure defines the data for the Response of sending apdu.
+ */
+typedef struct {
+       unsigned char atr_resp_len;
+       unsigned char atr_resp[TAPI_SIM_APDU_MAX_LEN];
+} TelSimAtrResp_t;
+
+
+/**
+ * This structure contains information about File name and path.
+ */
+typedef struct
+{
+       TelSimFileName_t  FileName;             /**< Elementary FileName enumeration */
+       unsigned char   szPath[128];            /**< Absolute szPath of the elementary file. [Null Terminated] */
+
+} TelSimFileID_t;
+
+/**
+ * This data structure defines the response for SIM update file.
+ */
+typedef struct {
+       TelSimFileID_t FileId; /**< SIM file ID */
+       TelSimAccessType_t AccessType; /**< Access type */
+} TelSimFileAccessGeneralResp_t;
+
+
+/**
+ * This structure defines the SIM device Elementary file information read
+ */
+typedef struct {
+       int bValid; /**< Valid or not */
+       TelSimFileID_t FileId; /**< File identifier */
+       TelSimFileType_t FileType; /**< File type and structure */
+       TelSimAcl_t AcRead; /**< Access condition for read operation */
+       TelSimAcl_t AcUpdate; /**< Access condition for update operation */
+       TelSimAcl_t AcInvalidate; /**< Access condition for invalidate operation */
+       TelSimAcl_t AcRehabilitate; /**< Access condition for rehabilitate operation */
+       unsigned long RecordLen; /**< Length of one record in file */
+       unsigned long RecordCount; /**< Number of records in file */
+       unsigned long FileSize; /**< File size */
+} TelSimFileInfo_t;
+
+
+/**
+ * This data structure defines the data for the Read file result information.
+ */
+typedef struct {
+       TelSimFileID_t FileID; /**< SIM file id to read */
+       TelSimFileType_t FileType; /**< SIM file type */
+       unsigned long Offset; /**< Offset if read binary */
+       unsigned long RecordIndex; /**< record index if read record */
+       unsigned long RecordIndexFrom; /**< start index from */
+       unsigned long RecordIndexTo; /**< end index to */
+       TelSimRecordMode_t RecordMode; /**< record mode if read record */
+       unsigned long DataLength; /**< data length to read */
+
+} TelSimReadFileRequestData_t;
+
+
+/*
+ * This is the RAW data sent to Porting Layer after converting it to SIM specific data by Codecs
+ */
+typedef struct {
+       TelSimFileID_t file_id; /* SIM file id to update */
+       TelSimFileType_t file_type; /* SIM file type */
+       unsigned long offset; /* offsset if update binary */
+       unsigned long record_index; /* record index if update record */
+       TelSimRecordMode_t record_mode; /* record mode if update record */
+       unsigned long data_len; /* data length to update */
+       unsigned char pData[1];
+} TelSimUpdateFileReqRawData_t;
+
+
+/**
+ *This data structure defines the data which is provided a unique identification number for the (U)ICC.
+ */
+typedef struct
+{
+       int icc_length; /**< Integrated Circuit Card number length */
+       char icc_num[TAPI_SIM_ICCID_LEN_MAX];   /**< Integrated Circuit Card number */
+} TelSimIccIdInfo_t;
+
+/**
+ * This data structure defines the data for the Imsi information.
+ */
+typedef struct
+{
+       int     bValid;                                         /**< Valid(ACTIVATE) IMSI (TRUE) or Deactivated (FALSE) */
+       char    szMcc[TAPI_SIM_MCC_CODE_LEN+1]; /**< mobile country code */
+       char    szMnc[TAPI_SIM_MNC_CODE_LEN+1]; /**< mobile network code */
+       char    szMsin[TAPI_SIM_MSIN_CODE_LEN+1];       /**< mobile station identification number */
+} TelSimImsiInfo_t;
+
+/**
+ * This data structure defines the data for the PIN Information.
+ */
+typedef struct
+{
+       TelSimPinType_t type;           /**< Specifies the PIN or PUK type.*/
+       int retry_count;        /**< Number of attempts remaining for PIN/PUK verification.*/
+}TelSimSecResult_t;
+
+/**
+ * This data structure defines the data for the PIN Information.
+ */
+typedef struct {
+       TelSimPinType_t PinType; /**< Specifies the PIN or PUK type.*/
+       int RemainingAttempts; /**< Number of attempts remaining for PIN/PUK verification.*/
+} TelSimPinInfo_t;
+
+/**
+ *
+ *     This will be used to get / set lock status of PIN or FDN etc.
+ */
+typedef struct {
+       TelSimLockType_t LockType;
+       tapi_sim_sec_lock_mode_t LockMode;
+} LockStatus_t;
+
+
+/**
+ *
+ * This structure is used to get information about LOCK_TYPE
+ */
+typedef struct {
+       TelSimLockType_t LockType; /**< Lock type */
+       TelSimLockKey_t LockKey; /**< Lock key */
+       unsigned char RemainingAttempts; /**< retry counts */
+} TelSimLockInfoElement_t;
+
+
+/**
+ *
+ *This structure is used to get information about LOCK_TYPE
+ */
+typedef struct {
+       unsigned char LockCount; /**< requested lock count */
+       int ErrorCode; /**< error code */
+       TelSimLockInfoElement_t LockTypeInfo[TAPI_SIM_LOCK_TYPE_INFO_MAX]; /**< Lock info according to Requested Lock Count *//* max of 8 supported */
+} TelSimLockInfo_t;
+
+
+/**
+* This data structure gives the phone book availability of current SIM.
+*/
+typedef struct
+{
+       int b_fdn;      /**< Fixed Dialing Number */
+       int b_msisdn; /**< my own number - MSISDN list */
+       int b_adn;      /**< SIM - ADN(2G phonebook      */
+       int b_sdn;      /**< Service Dialing Number  */
+       int b_3g;               /**< USIM - 3G phonebook */
+       int b_aas;      /**< Additional number Alpha String phonebook */
+       int b_gas;      /**< Grouping information Alpha String phonebook */
+}TelSimPbList_t;
+
+/**
+*  This data struture defines the 2G phone book data storage.
+*/
+typedef struct
+{
+       unsigned short  NumLen;                                                         /**< Number length*/
+       unsigned short  NumType;                                                                /**< Number type [refer to TelSimTypeOfNum_t]*/
+       unsigned short  NameLen;                                                                /**< Name string length*/
+       unsigned short  NameEncryptType;                                                /**< Name string encryption type [refer to TelSimTextEncrypt_t]*/
+       unsigned short  Number[TAPI_SIM_NUM_TEXT_LEN_MAX];              /**< Number data*/
+       unsigned short  Name[TAPI_SIM_NUM_TEXT_LEN_MAX];                /**< Name string*/
+}TelSimPb2GData_t;
+
+/**
+ *
+*   This is union defines either type of number or defines the text encryption types
+*/
+typedef union
+{
+       TelSimTypeOfNum_t NumType;                      /**< Type of number */
+       TelSimTextEncrypt_t EncryptionType;     /**< Encryption type */
+}TelSimPbFileDataType_t;
+
+/**
+ *
+*  if tapi_sim_pb_storage_type_t value is TAPI_SIM_PB_3GSIM(0x0C)
+*  SUB_PARAMETERs are as follows
+*/
+typedef struct
+{
+       TelSimPb3GFileType_t            FileType;                                                               /**< SM PB File */
+       TelSimPbFileDataType_t          FileDataType;                                                   /**< Type of num or encryption type */
+       unsigned short                  FileDataLength;                                                 /**< Length of data*/
+       unsigned char                   AasRecordIdentifier;                                    /**< To be used only for ANR tag type*/
+       unsigned char                           FileData[TAPI_SIM_NUM_TEXT_LEN_MAX];    /**< file data */
+}TelSimPb3GFileDataInfo_t;
+
+/**
+ *
+* This structure is used for tapi_sim_pb_storage_type_t value is TAPI_SIM_PB_AAS(0x0F) or TAPI_SIM_PB_GAS(0x10)
+*  SUB PRAMETERs are as follows
+*/
+typedef struct
+{
+       unsigned short          TextLength;                                                             /**< text length */
+       TelSimTextEncrypt_t     EncryptionType;                                                 /**< Encryption type */
+       unsigned char                   TextData[TAPI_SIM_NUM_TEXT_LEN_MAX];    /**< text data */
+}TelSimPbAdditionalNumString_t;
+
+/**
+ *
+* This structure contains the information about 3g phonebook
+*/
+typedef struct
+{
+       unsigned char                           FileTypeCount;  /**<Number of SIM PB EFs */
+       TelSimPb3GFileDataInfo_t        PbFileDataInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT];  /**< max of 13 array of structures */
+}TelSimPb3GData_t;
+
+/**
+ *
+* This structure contains the information about phonebook contact
+*/
+typedef union
+{
+       TelSimPb2GData_t                                Pb2GData;       /**<2G PB*/
+       TelSimPb3GData_t                                Pb3GData;       /**<3G PB*/
+       TelSimPbAdditionalNumString_t   PbAdditionalNumStringData; /**<Additional number*/
+}TelSimPbContactInfo_t;
+
+/**
+ *
+* This data structure defines the main structure for adding,edit, delete SIM phone book entry
+*/
+typedef struct
+{
+       TelSimPbFileType_t      StorageFileType;        /**< Storage file type */
+       unsigned short          Index;                          /**< Index of the record being read/updated. */
+       unsigned short          NextIndex;                      /**<  used only in read; ignored for write */
+       TelSimPbContactInfo_t   ContactInfo;                    /**< Contact Info can be 2G data or 3G data or AAS, GAS*/
+} TelSimPbRecordData_t;
+
+/**
+ * This enumeration defines the Ecc information.
+ */
+typedef struct
+{
+       char    szEcc1[TAPI_SIM_ECC_CODE_LEN*2 +1];             /**< Emergency Call Code 1 info. ECC is coded in BCD format. Unused bytes is set to 0xFF. */
+       char    szEcc2[TAPI_SIM_ECC_CODE_LEN*2 +1];             /**< Emergency Call Code  2 info ECC is coded in BCD format. Unused bytes is set to 0xFF. */
+       char    szEcc3[TAPI_SIM_ECC_CODE_LEN*2 +1];             /**< Emergency Call Code  3 info ECC is coded in BCD format. Unused bytes is set to 0xFF. */
+       char    szEcc4[TAPI_SIM_ECC_CODE_LEN*2 +1];             /**< Emergency Call Code  4 info ECC is coded in BCD format. Unused bytes is set to 0xFF. */
+       char    szEcc5[TAPI_SIM_ECC_CODE_LEN*2 +1];             /**< Emergency Call Code  5 info ECC is coded in BCD format. Unused bytes is set to 0xFF. */
+
+} TelSimEccInfo_t;
+
+/**
+ * This data structure defines the data for the USim emergency call code information.
+ */
+typedef struct
+{
+       int     bUsed;                                                                  /**< Used or not */
+       char    szEcc[TAPI_SIM_ECC_CODE_LEN*2+1];               /**< Emergency Call Code info-ECC is coded in BCD format. Unused bytes is set to 0xFF.*/
+       unsigned short  EccLen;                                                                 /**< Ecc length */
+       char    szEccAlphaIdentifier[TAPI_SIM_ECC_ALPHA_STRING_LEN_MAX];                /**< Alphabet identifier */
+       TelSimEccEmergencyServiceInfo_t EccEmergencyServiceInfo;        /**< ECC emergency service information */
+} TelUsimEccInfo_t;
+
+/**
+*      This data structure defines the phone book storage count information.
+*/
+typedef struct
+{
+       TelSimPbFileType_t              StorageFileType;        /**< Storage  file type */
+       unsigned short          TotalRecordCount;       /**< Total record count */
+       unsigned short          UsedRecordCount;        /**< Used record count */
+}TelSimPbStorageInfo_t;
+
+/**
+* This data structure gives the phone book entry information.
+*/
+typedef struct
+{
+       TelSimPbFileType_t      StorageFileType;        /**< Storage  file type */
+       unsigned short          PbIndexMin;                     /**< Phone book minimum index*/
+       unsigned short          PbIndexMax;             /**< Phone book maximum index */
+       unsigned short          PbNumLenMax;            /**< Phone number maximum length */
+       unsigned short          PbTextLenMax;           /**< Text maximum length */
+}TelSimPbEntryInfo_t;
+
+/**
+* This data structure gives the phone book update(add/edit/delete) response.
+*/
+typedef struct
+{
+       TelSimPbStorageInfo_t           PbStorageInfo;  /**< Indicates the total and used phonebook entries for the updated storage type (ADN/FDN, etc). */
+       unsigned short                  PbIndex;                /**< Phone book record index that was updated/deleted. */
+}TelSimPbUpdateResp_t;
+
+/**
+ * This data structure defines the data for the Language information.
+ */
+typedef struct
+{
+       unsigned long                                           LpCount;                                        /**< Language preference count; zero indicates that the LP file is not available or it doesn't have any data.*/
+       TelSimLanguagePreferenceCode_t  Lp[TAPI_SIM_LP_LEN_MAX];                /**< Language preference code */
+} TelSimLanguageInfo_t;
+
+/**
+ * This data structure defines the data for the group identifier information.
+ */
+typedef struct
+{
+       unsigned short  GroupIdentifierLen;                                                             /**< Group identifier length */
+       char    szGroupIdentifier[TAPI_SIM_GROUP_IDENTIFIER_LEN_MAX];   /**< Group identifier */
+} TelSimGroupIdentifierInfo_t;
+
+/**
+ * This data structure defines the data for the ECC information.
+ */
+typedef struct
+{
+       TelUsimEccInfo_t        UeccInfo [TAPI_SIM_UECC_RECORD_COUNT_MAX];      /**< USIM Emergency Call Code information structure*/
+       TelSimEccInfo_t EccInfo;                                                                                /**< Emergency Call Code information*/
+}TelSimEccData_t;
+
+/**
+* This structure contains all read SIM elementary file information.
+*/
+typedef struct
+{
+       unsigned char sw1;
+       unsigned char sw2;
+       unsigned char   DataLen;        /**<Data Length*/
+       unsigned char Data[TAPI_SIM_DATA_LEN_MAX];
+} TelSimReadFileRaw_t;
+
+/**
+*      This will be used to get / set lock status of PIN or FDN etc.
+*/
+typedef struct
+{
+       TelSimPersType_t type;
+       int mode;
+}TelSimPersStatus_t;
+
+/**
+ *
+This structure gives 3G phone book capability information.
+*/
+typedef struct
+{
+       TelSimPb3GFileType_t    FileType3G;             /**< 3G phonebook file type */
+       unsigned short          PbIndexMax;     /**< max index */
+       unsigned short          PbTextMax;              /**< max text length */
+       unsigned short          TotalRecordCount;       /**< total record count */
+}TelSimPb3GFileTypeCapabiltyInfo_t;
+
+/**
+ *
+ * This data structure defines the data for the SIM PHONEBOOK & ITS CAPABILITIES information.
+ * It refers to EF_PBR
+ */
+typedef struct
+{
+       unsigned char                                           FileTypeCount;  /**< phonebook file type count */
+       TelSimPb3GFileTypeCapabiltyInfo_t       FileTypeInfo[TAPI_SIM_PB_3G_FILE_MAX_COUNT] ;   /**< phonebook file type information */
+}TelSimPbCapabilityInfo_t;
+
+
+/**CPHS related structs **/
+
+/**
+*      This sturcture gives information of available optional CPHS SIM files.
+*/
+typedef struct
+{
+       /* Byte 2 - bit1 & 2*/
+       int      bCustomerServiceProfile;       /**< Customer Service Profile (CSP)  */
+       /* Byte 2 - bit3 & 4*/
+       int     bServiceStringTable;                    /**< Service String Table (SST) */
+       /* Byte 2 - bit5 & 6*/
+       int     bMailBoxNumbers;                        /**< MailBoxNumbers */
+       /* Byte 2 - bit7 & 8*/
+       int     bOperatorNameShortForm; /**< Short form of operator name */
+       /* Byte 3 - bit1 & 2*/
+       int     bInformationNumbers; /**< Information numbers */
+
+}TelSimCphsServiceTable_t;
+
+/*******************************************************************************
+
+These requirements are additional to the GSM 900 and DCS1800 recommendations.
+They apply to all products which are to be compliant with the CPHS specification.
+
+In addition to those SIM storage fields previously defined in DCS1800 to support
+existing MS features and services, the Association has defined the following fields  :-
+
+1)     Call Forwarding flag                                            (mandatory)
+2)     Voice message waiting flag                                      (mandatory)
+3)     PLMN operator name                                              (mandatory)
+4)     Customer Service Profile (CSP)                          (optional)
+5)     CPHS Information                                                        (mandatory)
+6)     Mailbox Numbers                                                 (optional)
+7)     Information Numbers                                             (optional)
+
+********************************************************************************/
+
+/*******************************************************************************
+DATA FIELD - 6F 16: CPHS INFORMATION
+Access Conditions:
+       READ    CHV1
+       UPDATE  ADM
+********************************************************************************/
+/**
+ *
+*This structure gives CPHS information data.
+*/
+typedef struct
+{
+       TelSimCphsPhaseType_t   CphsPhase;                      /**< CPHS phase type */
+       TelSimCphsServiceTable_t        CphsServiceTable;       /**< CPHS service table */
+}TelSimCphsInfo_t;
+
+/*******************************************************************************
+DATA FIELD - 6F 14: OPERATOR NAME STRING
+Access Conditions:
+       READ    CHV1
+       UPDATE  ADM
+********************************************************************************/
+/**
+ *
+* This struct gives CPHS operator name information.
+*/
+typedef struct
+{
+       unsigned char           NameLength;                                             /**< CPHS operator name length */
+       unsigned char   OperatorName[TAPI_SIM_CPHS_OPERATOR_NAME_LEN_MAX+1]; /**< CPHS operator name */
+}TelSimCphsOperatorName_t;
+
+
+/*******************************************************************************
+DATA FIELD - 6F 18: OPERATOR NAME SHORTFORM
+Access Conditions:
+       READ    CHV1
+       UPDATE  ADM
+********************************************************************************/
+/**
+ *
+* This struct gives CPHS operator short form name information.
+*/
+typedef struct
+{
+       unsigned char           ShortNameLength; /**< CPHS operator short name length */
+       unsigned char           OperatorShortName[TAPI_SIM_CPHS_OPERATOR_NAME_SHORT_FORM_LEN_MAX+1]; /**< CPHS short operator name */
+}TelSimCphsOperatorShortName_t;
+
+
+/*******************************************************************************
+Data field 6F 17 in CPHS, 6F C7 in 3GPP : Mailbox Numbers
+Access Conditions:
+       READ    CHV1
+       UPDATE  CHV1
+********************************************************************************/
+
+/**
+ * This data structure defines the data for the dialing number information.
+ */
+typedef struct {
+       int bUsed; /**< Used or not */
+       unsigned long AlphaIDMaxLength; /**< alpha max length in SIM - READ ONLY*/
+       unsigned long AlphaIdLength; /**< length of alpha identifier */
+       unsigned char AlphaId[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN + 1]; /**< Alpha Identifier */
+       unsigned long DiallingNumMaxLength; /**< max length of dialing number filed in SIM - READ ONLY */
+       unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
+       TelSimTypeOfNum_t TypeOfNumber; /**< TON */
+       TelSimNumberingPlanIdentity_t NumberingPlanIdent; /**< NPI */
+       char DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */
+       unsigned char CapaConfigId; /**< Capability/Configuration Identifier */
+       unsigned char Ext1RecordId; /**< Extensiion1 Record Identifier */
+} TelSimDialingNumberInfo_t;
+
+
+/**
+* This struct gives mailbox number(including CPHS case).
+*/
+typedef struct
+{
+       int b_cphs; /**< current data is from CPHS SIM or not*/
+       TelSimDialingNumberInfo_t voice_line1; /**< voice line1 mailbox number */
+       TelSimDialingNumberInfo_t voice_line2; /**< voice line2 mailbox number (only available in CPHS)*/
+       TelSimDialingNumberInfo_t video; /**< video mailbox number */
+       TelSimDialingNumberInfo_t fax; /**< fax mailbox number */
+       TelSimDialingNumberInfo_t email; /**< email mailbox number */
+}TelSimMailboxNumbers_s;
+
+
+/*******************************************************************************
+DATA FIELD -6F 11: Voice message waiting flag
+Access Conditions:
+       READ    CHV1
+       UPDATE  CHV1
+********************************************************************************/
+/**
+ *
+* This struct gives CPHS voice message waiting flag information .
+*/
+typedef struct
+{
+       int     bWaitVoiceMsgLine1; /**< VoiceMsgLine 1 */
+       int     bWaitVoiceMsgLine2; /**< VoiceMsgLine 2 */
+       int     bWaitFaxMsg; /**< FAX Msg */
+       int     bWaitDataMsg; /**< Data Msg */
+}TelSimCphsVoiceMsgWaitFlagInfo_t;
+
+/*******************************************************************************
+DATA FIELD -6F 13: Call forwarding flags
+Access Conditions:
+       READ    CHV1
+       UPDATE  CHV1
+********************************************************************************/
+/**
+* This struct gives CPHS call forwarding flag information.
+*/
+typedef struct
+{
+       int     bCallForwardUnconditionalLine1; /**< CallForwardUnconditionalLine 1 */
+       int     bCallForwardUnconditionalLine2; /**< CallForwardUnconditionalLine 2 */
+       int     bCallForwardUnconditionalFax; /**< CallForwardUnconditional FAX */
+       int     bCallForwardUnconditionalData; /**<CallForwardUnconditional data*/
+       int     bCallForwardUnconditionalSms; /**< CallForwardUnconditional SMS */
+       int     bCallForwardUnconditionalBearer; /**< CallForwardUnconditional bearer*/
+}TelSimCphsCallForwardingFlagInfo_t;
+
+/*******************************************************************************
+DATA FIELD -6F 19: Information Numbers
+Access Conditions:
+       READ    CHV1
+       UPDATE  CHV1
+********************************************************************************/
+/**
+* This struct gives CPHS information numbers data.
+*/
+typedef struct
+{
+       int     bUsed; /**< SIM CPHS index level one */
+       unsigned char AlphaIdLength; /**< length of alpha identifier */
+
+       TelSimCphsIndexLevelIndicator_t IndexLevelIndicator; /**< SIM CPHS index level one */
+       int     PremiumServiceIndicator; /**< SIM CPHS index level one */
+       int     NetworkSpecificIndicator; /**< SIM CPHS index level one */
+       unsigned char Alpha_id[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN+1]; /**<  Alpha Identifier */
+
+       unsigned long DiallingnumLength; /**< Length of BCD number/SSC contents */
+       TelSimTypeOfNum_t TypeOfNumber; /**< TON */
+       TelSimNumberingPlanIdentity_t NumberingPlanIdentity; /**< NPI */
+       char DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN+1]; /**< dialing Number/SSC String */
+       unsigned char Ext1RecordId; /**< Extensiion1 Record Identifier */
+}TelSimCphsInformationNum_t;
+
+
+/*******************************************************************************
+DATA FIELD- 6F 15: Customer Service Profile (Storing a list of service options which are relevant to that specific customer)
+Access Conditions:
+       READ    CHV1
+       UPDATE  CHV1
+********************************************************************************/
+/**
+ *
+* This struct gives CPHS service call offering information.
+*/
+typedef struct
+{
+       int     bCallForwardingUnconditional;   /**< CallForwarding Unconditional */
+       int     bCallForwardingOnUserBusy;              /**< CallForwarding On UserBusy */
+       int     bCallForwardingOnNoReply;               /**< CallForwarding On NoReply */
+       int     bCallForwardingOnUserNotReachable;      /**< CallForwarding On User Not Reachable */
+       int     bCallTransfer;                                          /**< Call Transfer */
+}TelSimCphsServiceCallOffering_t;
+
+/**
+ *
+* This struct gives CPHS service call restriction information.
+*/
+typedef struct
+{
+       int     bBarringOfAllOutgoingCalls;                                             /**< Barring Of All Outgoing Calls*/
+       int     bBarringOfOutgoingInternationalCalls;                           /**< Barring Of Outgoing International Calls */
+       int     bBarringOfOutgoingInternationalCallsExceptHplmn;        /**< Barring Of Outgoing International Calls Except HPLMN */
+       int     bBarringOfAllIncomingCallsRoamingOutsideHplmn;  /**< Barring Of All Incoming Calls Roaming Outside HPLMN */
+       int     bBarringOfIncomingCallsWhenRoaming;                     /**< Barring Of IncomingCalls When Roaming */
+}TelSimCphsServiceCallRestriction_t;
+
+/**
+ *
+* This struct gives CPHS service SS  information.
+*/
+typedef struct
+{
+       int     bMultiPartyService;     /**< MultiPartyService*/
+       int     bClosedUserGroup;       /**< ClosedUserGroup*/
+       int     bAdviceOfCharge;        /**< AdviceOfCharge*/
+       int     bPreferentialClosedUserGroup;   /**< PreferentialClosedUserGroup*/
+       int     bClosedUserGroupOutgoingAccess; /**< ClosedUserGroupOutgoingAccess*/
+}TelSimCphsServiceOtherSupplimentaryService_t;
+
+/**
+ *
+* This struct gives CPHS service call complete information.
+*/
+typedef struct
+{
+       int     bCallHold;                                              /**< Call Hold*/
+       int     bCallWaiting;                                   /**< Call Waiting*/
+       int     bCompletionOfCallToBusySubscriber;      /**< Completion Of Call To Busy Subscriber*/
+       int     bUserUserSignalling;                                    /**< User User Signaling*/
+}TelSimCphsServiceCallComplete_t;
+
+/**
+ *
+* This struct gives CPHS service teleservices  information.
+*/
+typedef struct
+{
+       int     bShortMessageMobileOriginated;          /**< Short Message Mobile Originated*/
+       int     bShortMessageMobileTerminated;          /**< Short Message Mobile Terminated*/
+       int     bShortMessageCellBroadcast;                     /**< Short Message Cell Broadcast*/
+       int     bShortMessageReplyPath;                 /**< Short  Message Reply Path*/
+       int     bShortMessageDeliveryConf;                      /**< Short Message Delivery Conf*/
+       int     bShortMessageProtocolIdentifier;                /**< Short Message Protocol Identifier*/
+       int     bShortMessageValidityPeriod;                    /**< Short Message Validity Period*/
+}TelSimCphsServiceTeleservices_t;
+
+/**
+ *
+* This struct gives CPHS alternative line service  information.
+*/
+typedef struct
+{
+       int     bAlternativeLineService;   /**< Alternative Line Service*/
+}TelSimCphsServiceCphsTeleservices_t;
+
+/**
+ *
+* This struct gives CPHS string service table information.
+*/
+typedef struct
+{
+       int     bStringServiceTable;    /**< String Service Table*/
+}TelSimCphsServiceCphsFeatures_t;
+
+/**
+ *
+* This struct gives CPHS service number identifier  information.
+*/
+typedef struct
+{
+       int     bCallingLineIdentificationPresent;                      /**< Calling Line Identification Present*/
+       int     bConnectedLineIdentificationRestrict;           /**< Connected Line Identification Restrict*/
+       int     bConnectedLineIdentificationPresent;            /**< Connected Line Identification Present*/
+       int     bMaliciousCallIdentifier;                                       /**< Malicious Call Identifier*/
+       int     bCallingLineIdentificationSend;                 /**< Calling Line Identification Send*/
+       int     bCallingLineIdentificationBlock;                        /**< Calling Line Identification Block*/
+}TelSimCphsServiceNumberIdentifier_t;
+
+/**
+ *
+* This struct gives CPHS service phase services information.
+*/
+typedef struct
+{
+       int     bMenuForGprs;                                                   /**< Menu For GPRS*/
+       int     bMenuForHighSpeedCsd;                                   /**< Menu For HighSpeedCsd*/
+       int     bMenuForVoiceGroupCall;                                 /**< Menu For VoiceGroupCall*/
+       int     bMenuForVoiceBroadcastService;                  /**< Menu For VoiceBroadcastService*/
+       int     bMenuForMultipleSubscriberProfile;              /**< Menu For MultipleSubscriberProfile*/
+       int     bMenuForMultipleBand;                                   /**< Menu For MultipleBand*/
+}TelSimCphsServicePhaseServices_t;
+
+/**
+ *
+* This struct gives CPHS value added service   information.
+*/
+typedef struct
+{
+       int     bRestrictMenuForManualSelection;                /**< RestrictMenu For ManualSelection*/
+       int     bRestrictMenuForVoiceMail;                              /**< RestrictMenu For VoiceMail*/
+       int     bRestrictMenuForMoSmsAndPaging;         /**< RestrictMenu For MoSmsAndPaging*/
+       int     bRestrictMenuForMoSmsWithEmialType;     /**< RestrictMenu For MoSmsWithEmialType*/
+       int     bRestrictMenuForFaxCalls;                               /**< RestrictMenu For FaxCalls*/
+       int     bRestrictMenuForDataCalls;                              /**< RestrictMenu For DataCalls*/
+       int     bRestrictMenuForChangeLanguage;         /**< RestrictMenu For ChangeLanguage*/
+}TelSimCphsServiceValueAddedServices_t;
+
+/**
+ *
+* This struct gives CPHS service information number data.
+*/
+typedef struct
+{
+       int     bInformationNumbers;                                    /**< Information Numbers*/
+}TelSimCphsServiceInformationNumbers_t;
+
+/**
+ *
+* This struct gives CPHS service profile entry  information.
+*/
+typedef struct
+{
+       TelSimCphsCustomerServiceGroup_t                                        CustomerServiceGroup;           /**< customer service group*/
+       union
+       {
+               TelSimCphsServiceCallOffering_t                                 CallOffering;                                   /**< call offering*/
+               TelSimCphsServiceCallRestriction_t                              CallRestriction;                                /**< call restriction*/
+               TelSimCphsServiceOtherSupplimentaryService_t    OtherSuppServices;                      /**< other SS services*/
+               TelSimCphsServiceCallComplete_t                         CallComplete;                           /**< call complete*/
+               TelSimCphsServiceTeleservices_t                                 Teleservices;                           /**< teleservices*/
+               TelSimCphsServiceCphsTeleservices_t                             CphsTeleservices;                       /**< CPHS teleservices*/
+               TelSimCphsServiceCphsTeleservices_t                             CphsFeatures;                           /**< CPHS features*/
+               TelSimCphsServiceNumberIdentifier_t                             NumberIdentifiers;                      /**< number identifiers*/
+               TelSimCphsServicePhaseServices_t                                PhaseServices;                          /**< phase services*/
+               TelSimCphsServiceValueAddedServices_t                   ValueAddedServices;                     /**< value added services*/
+               TelSimCphsServiceInformationNumbers_t                   InformationNumbers;             /**< information numbers*/
+       }u;
+}TelSimCphsCustomerServiceProfileEntry_t;
+
+/**
+ *
+* This struct gives CPHS service profile information.
+*/
+typedef struct
+{
+       TelSimCphsCustomerServiceProfileEntry_t         ServiceProfileEntry[TAPI_SIM_CPHS_CUSTOMER_SERVICE_PROFILE_ENTRY_COUNT_MAX]; /**< service profile entry*/
+}TelSimCphsCustomerServiceProfileInfo_t;
+
+
+/*******************************************************************************
+Identifier: '6FCA'     Structure: linear fixed Optional
+Record length: X bytes, X>=5   Update activity: low
+Access Conditions:
+       READ    PIN
+       UPDATE  PIN
+********************************************************************************/
+/**
+ *
+* This struct gives message waiting indication status information.
+*/
+typedef struct
+{
+       unsigned char           IndicatorType;          /**< Indicator Type*/
+       unsigned char           VoiceMailCount;         /**< VoiceMail Count*/
+       unsigned char           FaxCount;                       /**< FAX Count*/
+       unsigned char           EmailCount;                     /**< Email Count*/
+       unsigned char           OtherCount;                     /**< Other Count*/
+       unsigned char           VideoMailCount;         /**< VideoMail Count*/
+}TelSimMsgWaitingIndicationStatus_t;
+
+
+/*******************************************************************************
+Identifier: '6FCB'     Structure: linear fixed Optional
+Record length: 16 bytes,       Update activity: low
+Access Conditions:
+       READ    PIN
+       UPDATE  PIN
+********************************************************************************/
+/**
+ *
+* This struct gives call forwarding indication  information.
+*/
+typedef struct
+{
+       int                                             bUsed;                          /**< used or not*/
+       unsigned char                                   MspNumber;              /**< MSP number*/
+       unsigned char                                   Status;                         /**< call forwarding indication status*/
+       unsigned long                                   DiallingnumLen;         /**< Length of BCD number/SSC contents*/
+       TelSimTypeOfNum_t                       TypeOfNumber;           /**< TON*/
+       TelSimNumberingPlanIdentity_t   NumberingPlanIdent;     /**< NPI*/
+       char                                                    DiallingNum[TAPI_SIM_XDN_DIALING_NUMBER_LEN+1];/**< Dialing Number/SSC String*/
+}TelSimCallForwardingIndicationStatus_t;
+
+/**
+* This struct gives Call Forwarding Indication information including CPHS case.
+*/
+typedef struct
+{
+       int b_cphs; /**< current data is from CPHS SIM or not*/
+       union{
+               TelSimCphsCallForwardingFlagInfo_t cphs_cf;     /**< information from CPHS SIM*/
+               TelSimCallForwardingIndicationStatus_t cf;      /**< information from 3GPP SIM*/
+       }cf_data_u;
+}TelSimCallForwarding_s;
+
+/**
+* This struct gives Message Waiting Indication information including CPHS case.
+*/
+typedef struct
+{
+       int b_cphs; /**< current data is from CPHS SIM or not*/
+       union{
+               TelSimCphsVoiceMsgWaitFlagInfo_t cphs_mw;       /**< information from CPHS SIM*/
+               TelSimMsgWaitingIndicationStatus_t mw;  /**< information from 3GPP SIM*/
+       }mw_data_u;
+}TelSimMessageWaiting_s;
+
+/**
+ *
+* This struct gives dynamics flag selected line  information.
+*/
+typedef struct
+{
+       TelSimDynamicFlagsSelectedLineId_t       DynamicFlags;  /**< Dynamic flags information */
+}TelSimDynamicFlagsInfo_t;
+
+/**
+ *
+* This struct gives dynamics flag selected line  information.
+*/
+typedef struct
+{
+       TelSimDynamic2FlagAlsStatus_t    Dynamic2Flag;          /**< Dynamic flags status */
+}TelSimDynamic2FlagsInfo_t;
+
+/**
+ *     This data structure represents the CPHS specific information
+ */
+typedef struct
+{
+       int b_used; /**< used or not */
+       TelSimCphsInfo_t cphsinfo;      /**< CPHS information */
+       TelSimCphsCustomerServiceProfileInfo_t csp;     /**< customer service profile */
+       TelSimCphsInformationNum_t infn;        /**< information numbers */
+       TelSimCphsOperatorName_t opname;        /**< operator name */
+       TelSimCphsOperatorShortName_t opshortform;      /**< operator short form */
+       TelSimDynamicFlagsInfo_t dflagsinfo; /**< Dynamic flags */
+       TelSimDynamic2FlagsInfo_t d2flagsinfo; /**< Dynamic2 flags */
+}TelSimCphsLocalInfo_t;
+
+/**
+ *     This data structure represents MSISDN information
+ */
+typedef struct
+{
+       char num[TAPI_SIM_XDN_DIALING_NUMBER_LEN+1]; /**< MSISDN number. If not exist, Null string will be returned*/
+       char name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN+1]; /**< MSISDN name. If not exist, Null string will be returned*/
+}TelSimSubscriberInfo_t;
+
+
+/**
+*GBA - Generic Bootstrapping architecture.
+*This is used for IMS Authentication Procedure.
+*/
+typedef struct
+{
+       unsigned char RandomAccessLength;       /**< AKA Random access length*/
+       unsigned char AuthDataLength; /**< Bootstrapping transaction ID length*/
+       unsigned char RandomAccessData[TAPI_SIM_ISIM_AUTH_MAX_REQ_DATA_LEN];    /**< Random access data */
+       unsigned char   AuthData[TAPI_SIM_ISIM_AUTH_MAX_REQ_DATA_LEN];          /**< Authorized data */
+}TelSimIsimAuthenticationData_t;
+
+/**
+* This struct gives input data for ISIM authentication
+*/
+typedef struct
+{
+       unsigned char AuthenticationResult;                                     /**< authentication result */
+       unsigned char ResponseLength;                                                   /**< response length*/
+       unsigned char   ResponeData[TAPI_SIM_ISIM_AUTH_MAX_RESP_DATA_LEN];      /**< response data */
+       unsigned char AuthenticationStringLenght;                                                                       /**< authentication string length*/
+       unsigned char AuthenticationString[TAPI_SIM_ISIM_AUTH_MAX_RESP_DATA_LEN];       /**< authentication string */
+       unsigned char CipherKeyLength;                                                                          /**< cipher key length */
+       unsigned char CipherKey[TAPI_SIM_ISIM_AUTH_MAX_RESP_DATA_LEN];          /**< cipher key */
+       unsigned char IntegrityKeyLength;                                                                                               /**< integrity key length */
+       unsigned char IntegrityKey[TAPI_SIM_ISIM_AUTH_MAX_RESP_DATA_LEN];                       /**< integrity key */
+}TelSimIsimAuthenticationResponse_t;
+
+
+/**OPLMN list**/
+typedef struct
+{
+       char    szMcc[TAPI_SIM_MCC_CODE_LEN+1];         /**< mobile country code */
+       char    szMnc[TAPI_SIM_MNC_CODE_LEN+1];         /**< mobile network code */
+
+}TelSimOplmnlistInfo_t;
+
+/*OPLMN Access technology Identifiers*/
+typedef struct
+{
+       int bACT_RFU1;  /**<act rfu1 */
+       int bACT_RFU2;  /**<act rfu2 */
+       int bACT_RFU3;  /**<act rfu3 */
+       int bACT_RFU4;  /**<act rfu4 */
+       int bACT_RFU5;  /**<act rfu5 */
+       int bACT_RFU6;  /**<act rfu6 */
+       int bACT_RFU7;  /**<act rfu7 */
+       int bACT_UTRAN;  /**<act UTRAN */
+       int bACT_RFU9;  /**<act rfu9 */
+       int bACT_RFU10;  /**<act rfu10 */
+       int bACT_RFU11;  /**<act rfu11 */
+       int bACT_RFU12;  /**<act rfu12 */
+       int bACT_RFU13;  /**<act rfu13 */
+       int bACT_RFU15;  /**<act rfu15 */
+       int bACT_GSMCOMPACT;  /**<act GSM compact */
+       int bACT_GSM; /**<act GSM */
+}TelSimOplmnActInfo_t;
+
+/*OpLMNWACT  File data*/
+typedef struct
+{
+       TelSimOplmnlistInfo_t           OplmnList;       /**<oplmn list information */
+       TelSimOplmnActInfo_t            ActIdentifier;  /**<act identifier*/
+}TelSimOplmnWactInfo_t;
+
+/* OPLMNWACT  list */
+typedef struct
+{
+       TelSimOplmnWactInfo_t OplmnList[TAPI_SIM_OPLMNWACT_MAX_LEN];    /**<oplmnwact list information */
+       int     OplmnListCnt; /**<oplmnwact list count */
+}TelSimOplmnWactList_t;
+
+
+/* SAP (SIM Access Profile) related interface structures and enum */
+/**
+ *
+ * This struct gives the SAP ATR response data information.
+ */
+typedef struct
+{
+       TelSimSapResultCode_t AtrResult;                                                /**<  SAP result of transfer ATR request */
+       unsigned long                   AtrLength;                                              /**<  SAP ATR response data length */
+       unsigned char                   AtrData[TAPI_SIM_SAP_ATR_DATA]; /**<  SAP ATR response data */
+}TelSimSapAtrInfo_t;
+
+/**
+ *
+ * This data structure gives the SAP ATR response data information.
+ */
+
+typedef struct
+{
+       TelSimSapMsgId_t                                MsgId;                          /**< connect or disconnect request /response */ /* 1 byte  at lower level */
+       TelSimSapConnectionStatus_t     ConnectionStatus;       /**< used only in response from tapi */
+       unsigned short                          MaxMsgSize;                     /**< request from app or set by lower layer*/
+
+}TelSimSapConnect_t;
+
+/* SAP transfer APDU request */
+
+/**
+ *
+ * This data structure gives the SAP APDU data information.
+ */
+typedef struct
+{
+       unsigned char   ApduLength;                                             /**<  SAP APDU length */
+       unsigned char           Apdu[TAPI_SIM_APDU_MAX_LEN];    /**<  SAP APDU data */
+}TelSimSapApduData_t;
+
+/**
+ *
+ * This data structure gives SAP SIM power response
+ */
+typedef struct
+{
+       TelSimSapMsgId_t                        MsgId;                  /**<  SAP operation Id */
+       TelSimSapResultCode_t   SimPowerResult; /**<  SAP result of operation */
+}TelSimSapPower_t;
+
+/**
+ *
+ * This data structure gives SAP SIM card reader status
+ */
+typedef struct
+{
+       TelSimSapResultCode_t   CardReaderResult; /**< SAP result of operation */
+       char                                    CardReaderStatus; /**< bit wise encoded information */
+}TelSimCardReaderStatus_t;
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TELSIM_H_
+
+/**
+* @}
+*/
+
diff --git a/include/common/TelSs.h b/include/common/TelSs.h
new file mode 100644 (file)
index 0000000..3d9abda
--- /dev/null
@@ -0,0 +1,598 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SS_TAPI SS(Supplementary services)
+* @{
+*
+* @file TelSs.h
+
+     @brief This file serves as a "C" header file and defines structures for Tapi Supplementary Services\n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_SS_H_
+#define _TEL_SS_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TelErr.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+/** maximum length of barring password */
+#define TAPI_SS_GSM_BARR_PW_LEN_MAX                            4 /**<Maximum length of barring password */
+
+/** maximum length of dial digit */
+#define TAPI_CALL_DIALDIGIT_LEN_MAX                            82 /**<maximum length of dial digit *///( To Accommodate Unpacked string length, which will be greater than 182, 182* 8 /7 = 208, Packed len = 182* 7/8 = 160)
+#define TAPI_SS_USSD_DATA_SIZE_MAX                             208      /**<User-to-user data maximum size */
+#define TAPI_SS_RECORD_NUM_MAX                                 5 /**< SS record maximum size */
+#define TAPI_SS_AOC_CURRENCY_LEN_MAX                   3 /**< maximum length of AOC currency */
+
+/* Supplementary Svc */
+#define TAPI_SS_ADDRESS_LEN_MAX                                        40
+#define TAPI_SS_CCBS_SIZE_MAX                                  5
+#define TAPI_SS_TELECOMM_SERVCE_SIZE_MAX               13
+#define TAPI_SS_PHONE_NUM_LEN_MAX                              33
+#define TAPI_SS_MMISTRING_LEN_MAX                              33
+#define TAPI_SS_PWD_LEN_MAX                                            5
+#define TAPI_MAX_RELEASE_COMPLETE_DATA_LEN             260
+#define TAPI_MAX_ULONG                                                 0xffffffff
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+ *  This enumeration defines the call forwarding flavor.
+ */
+typedef enum
+{
+       TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV ,                 /**< Unconditional */
+       TAPI_SS_FORWARD_WHEN_BUSY_EV ,                                          /**< When Busy */
+       TAPI_SS_FORWARD_WHEN_NO_ANSWER_EV ,                                     /**< When No Reply */
+       TAPI_SS_FORWARD_WHEN_NOT_REACHABLE_EV ,                         /**< When Not Reachable */
+       TAPI_SS_FORWARD_WHEN_ALL_FORWARDING_EV ,                        /**< Forward All Calls */
+       TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV  ,                      /**< Conditional */
+} TelSsForwardWhen_t;
+
+/**
+ * The various types of call barring. Note, only one type of incoming barring and only one type of outgoing barring may be active at any time.
+ */
+typedef enum
+{
+       TAPI_CALL_BARRING_ALL  ,                                                                /**< Barring all outgoing and incoming calls */
+       TAPI_CALL_BARRING_OUTGOING ,                                                    /**< Barring outgoing call */
+       TAPI_CALL_BARRING_ALL_OUTGOING_CALLS ,                                  /**< Barring all outgoing calls */
+       TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL ,                    /**< Barring all outgoing international calls */
+       TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL_EXCEPT ,     /**< Barring all international outgoing */
+       TAPI_CALL_BARRING_INCOMING ,                                                    /**< Barring the incoming call */
+       TAPI_CALL_BARRING_ALL_INCOMING_CALLS ,                                  /**< Barring all incoming calls */
+       TAPI_CALL_BARRING_ALL_INCOMING_CALLS_ROAMING ,                  /**< Barring all incoming calls while roaming */
+       TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM ,                    /**< Barring Incoming Calls from numbers which is not stored in the SIM memory */
+} TelSsCallBarType_t;
+
+/*
+ * The types of telecommunication services are used for setting the statuses of supplementary services.
+ * They are typically not supported in IS-2000 or IS-136. See GSM 02.30 Annex C and GSM 22.030 Annex C.
+ */
+typedef enum
+{
+       TAPI_SS_TS_NONE = 0x00,                 /**< Teleservice None*/
+
+       TAPI_SS_TS_ALL_TELESERVICES,                                                    /**< All Teleservices */
+       TAPI_SS_TS_ALL_SPEECH ,                                         /**< All Speech Services */
+       TAPI_SS_TS_ALL_DATA_TELESERVICES,                                               /**< All Data Teleservices */
+       TAPI_SS_TS_FACS ,                                                                               /**< All Fax Service */
+       TAPI_SS_TS_SMS ,                                                                        /**< SMS service         */
+
+       TAPI_SS_TS_ALL_TELESERVICES_EXCEPT_SMS,                                 /**< All teleservice except SMS */
+       TAPI_SS_TS_ALL_PLMN_SPEC_TELE,                                          /**< PLMN specific teleservices*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_1,                                            /**< PLMN specific teleservice 1*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_2 ,                                           /**< PLMN specific teleservice 2*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_3 ,                                                   /**< PLMN specific teleservice 3*/
+
+       TAPI_SS_TS_PLMN_SPEC_TELE_4,                                                    /**< PLMN specific teleservice 4*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_5,                                                    /**< PLMN specific teleservice 5*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_6,                                                    /**< PLMN specific teleservice 6*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_7,                                                    /**< PLMN specific teleservice 7*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_8,                                                    /**< PLMN specific teleservice 8*/
+
+       TAPI_SS_TS_PLMN_SPEC_TELE_9,                                                    /**< PLMN specific teleservice 9*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_A,                                                    /**< PLMN specific teleservice 10*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_B,                                                    /**< PLMN specific teleservice 11*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_C,                                                    /**< PLMN specific teleservice 12*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_D,                                                    /**< PLMN specific teleservice 13*/
+
+       TAPI_SS_TS_PLMN_SPEC_TELE_E,                                                    /**< PLMN specific teleservice 14*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_F,                                                    /**< PLMN specific teleservice 15*/
+       TAPI_SS_TS_PLMN_SPEC_TELE_,                                                             /**< PLMN specific teleservice*/
+       TAPI_SS_BS_ALL_BEARER_SERVICES,                                                 /**< All PLMN specific bearer services*/
+       TAPI_SS_BS_ALL_DATA_CDA,                                                        /**< All Data CDA*/
+
+       TAPI_SS_BS_ALL_DATA_CDS,                                                                /**< All Data CDS*/
+       TAPI_SS_BS_ALL_ASYNCHRONOUS,                                                    /**< All  Asynchronous */
+       TAPI_SS_BS_ALL_SYNCHRONOUS,                                                             /**< All  Synchronous */
+       TAPI_SS_BS_DATA_CIRCUIT_SYNC,                                                   /**< All Data Circuit Synchronous */
+       TAPI_SS_BS_DATA_CIRCUIT_ASYNC,                                                  /**< All Data Circuit Asynchronous */
+
+       TAPI_SS_BS_DATA_ALL_PDS,                                                                /**< All Data PDS */
+       TAPI_SS_BS_ALL_DATA_PADCA,                                                              /**< All Data PADCA */
+       TAPI_SS_BS_ALL_PLMN_SPEC_BS,                                                    /**< All PLMN SPEC BS */
+       TAPI_SS_BS_PLMN_SPEC_TELE_1,                                                    /**< PLMN specific bearer service 1*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_2,                                                    /**< PLMN specific bearer service 2*/
+
+       TAPI_SS_BS_PLMN_SPEC_TELE_3,                                                    /**< PLMN specific bearer service 3*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_4,                                                    /**< PLMN specific bearer service 4*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_5,                                                    /**< PLMN specific bearer service 5*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_6,                                                    /**< PLMN specific bearer service 6*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_7,                                                    /**< PLMN specific bearer service 7*/
+
+       TAPI_SS_BS_PLMN_SPEC_TELE_8,                                                    /**< PLMN specific bearer service 8*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_9,                                                    /**< PLMN specific bearer service 9*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_A,                                                    /**< PLMN specific bearer service 10*/
+       TAPI_SS_BS_PLMN_SPEC_TELE_B,                                                    /**< PLMN specific bearer service 11 */
+       TAPI_SS_BS_PLMN_SPEC_TELE_C,                                                    /**< PLMN specific bearer service 12 */
+
+       TAPI_SS_BS_PLMN_SPEC_TELE_D,                                                    /**< PLMN specific bearer service 13 */
+       TAPI_SS_BS_PLMN_SPEC_TELE_E,                                                    /**< PLMN specific bearer service 14 */
+       TAPI_SS_BS_PLMN_SPEC_TELE_F,                                                    /**< PLMN specific bearer service 15*/
+       TAPI_SS_TS_ALL_DATA,                                                                    /**< All Data*/
+       TAPI_SS_TS_DATA_CIRCUIT_SYNC,                                                   /**< Data Circuit Sync*/
+
+       TAPI_SS_TS_MULTIPLE,                                                                    /**< multiple*/
+       TAPI_SS_TS_TELEPHONY,                                                                   /**< Telephony */
+       TAPI_SS_TS_DATA_CIRCUIT_ASYNC,                                                  /**< Data Circuit Async */
+       TAPI_SS_TS_DATA_PACKET,                                                                 /**< Data packet */
+
+       /* CPHS - AUXILIARY SERVICE */
+       TAPI_SS_TS_AUX_VOICE ,                                                  /**< All Auxiliary Voice ( Auxiliary telephony ) */
+
+       TAPI_SS_ALL_TELE_BEARER,                                /**< all tele and bearer services */
+       TAPI_SS_TS_ALL_TELE_AND_BEARER_SERVICES,                                /**< Teleservices & Bearer Services */
+}TelSsTeleService_t;
+
+/**
+ * This enumeration defines the ussd response type
+ */
+typedef enum
+{
+       TAPI_USSD_RES_UNKNOWN_ALPHABET,                                         /**< USSD data is unknown */
+       TAPI_USSD_RES_DISPL_BUSY,                                               /**< USSD Data response is display busy  */
+       TAPI_USSD_RES_OK,                                               /**< USSD Data is encoded and properly propagated */
+       TAPI_USSD_RES_NONE                                              /**< NO USSD Response from client */
+} TelSsUssdRespType_t;
+
+/**
+ * This enumeration defines the ussd Indication Type
+ */
+typedef enum
+{
+       TAPI_USSD_IND_NOTIFY                    = 0x00,                                 /**< notify : to display USSD data to user */
+       TAPI_USSD_IND_NO_ACTION_REQUIRE = 0x01,                                 /**< No further user action required */
+       TAPI_USSD_IND_ACTION_REQUIRE    = 0x02,                                 /**< Further user action required*/
+       TAPI_USSD_IND_TERMINATED_BY_NET = 0x03,                         /**< 0x03 : USSD terminated by network */
+       TAPI_USSD_IND_OTHER_CLIENT              = 0x04,                 /**< 0x04 : other local client has responded */
+       TAPI_USSD_IND_NOT_SUPPORT               = 0x05,                 /**< 0x05 : operation not supported */
+       TAPI_USSD_IND_TIME_OUT                  = 0x06          /**< 0x06 : Time out when there is no response from network */
+}TelSsUssdIndType_t;
+
+/**
+ *
+ * This enum defines the values for USSD type.
+ */
+typedef enum
+{
+       TAPI_USSD_USER_INIT = 0x01,     /**< USSD request type User Initiated. */
+       TAPI_USSD_USER_RSP,                     /**< USSD request type User Response. */
+       TAPI_USSD_USER_REL                      /**< USSD request type User Release. */
+} TelSsUssdType_t;
+
+/**
+ *  This enumeration defines the call barring operation mode .
+ */
+typedef enum
+{
+       TAPI_SS_CALL_BAR_ACTIVATE,              /**< Activate call barring  */
+       TAPI_SS_CALL_BAR_DEACTIVATE,            /**< De Activate call barring */
+}TelSsCallBarOperationMode_t;
+
+/**
+ *  This enumeration defines the call barring operation mode .
+ */
+typedef enum
+{
+       TAPI_SS_CW_ACTIVATE,            /**< Activate call barring  */
+       TAPI_SS_CW_DEACTIVATE,          /**< De Activate call barring */
+}TelSsCallWaitOperationMode_t;
+
+/**
+ *  This enumeration defines the call type .
+ */
+typedef enum
+{
+       TAPI_CALL_TYPE_VOICE_EV ,                               /**< Voice Call */
+       TAPI_CALL_TYPE_DATA_EV ,                                /**< Data Call */
+       TAPI_CALL_TYPE_FAX_EV ,                                 /**< FAX   Call */
+       TAPI_CALL_TYPE_SHORT_MESS_EV ,          /**< Short Message */
+       TAPI_CALL_TYPE_ALL_ASYNC_EV,    /**< All Async services */
+       TAPI_CALL_TYPE_ALL_SYNC_EV,     /**< All sync services */
+       TAPI_CALL_TYPE_DATA_CIRCUIT_SYNC_EV,    /**< Data Circuit Sync */
+       TAPI_CALL_TYPE_ALL_TELE_BEARER, /**< all tele and bearer services */
+       TAPI_CALL_TYPE_ALL_TELE,                /**< All tele services */
+}TelSsCallType_t;
+
+/**
+ *  This enumeration defines the forward mode .
+ */
+typedef enum
+{
+       TAPI_CALL_FORWARD_MODE_DISABLE_EV ,             /**< Deactivate call forwarding  */
+       TAPI_CALL_FORWARD_MODE_ENABLE_EV ,                              /**< Activate call forwarding */
+       TAPI_CALL_FORWARD_MODE_REGISTRATION_EV ,                /**< Register Call forwarding  */
+       TAPI_CALL_FORWARD_MODE_ERASURE_EV ,                             /**< De-register call forwarding */
+
+}TelSsForwardMode_t;
+
+/**
+ *  This enumeration defines the forward type .
+ */
+typedef enum
+{
+       TAPI_CS_FORWARD_TYPE_VOICE_EV =0,                       /**< Voice call forward */
+       TAPI_CS_FORWARD_TYPE_ALL_ASYNC_EV,          /**< All Async services */
+       TAPI_CS_FORWARD_TYPE_ALL_SYNC_EV,                       /**< All sync services */
+       TAPI_CS_FORWARD_TYPE_DATA_EV ,                          /**< Data call forward */
+       TAPI_CS_FORWARD_TYPE_FAX_EV,                            /**< Fax call forward */
+    TAPI_CS_FORWARD_TYPE_ALL_TELE_BEARER,      /**< All tele and bearer services */
+    TAPI_CS_FORWARD_TYPE_ALL_TELE,             /**< All tele services */
+    TAPI_CS_FORWARD_TYPE_AUX_VOICE,            /**< AUX Voice */
+}TelSsForwardType_t;
+
+typedef enum
+{
+       TAPI_SS_CF_NO_REPLY_TIME_5_SECS = 5,                    /**< Timer value set to 5secs*/
+       TAPI_SS_CF_NO_REPLY_TIME_10_SECS        = 10,                   /**< Timer value set to 10secs*/
+       TAPI_SS_CF_NO_REPLY_TIME_15_SECS        = 15,                   /**< Timer value set to 15secs*/
+       TAPI_SS_CF_NO_REPLY_TIME_20_SECS        = 20,                   /**< Timer value set to 20secs*/
+       TAPI_SS_CF_NO_REPLY_TIME_25_SECS        = 25,                   /**< Timer value set to 25secs*/
+       TAPI_SS_CF_NO_REPLY_TIME_30_SECS        = 30,                   /**< Timer value set to 30secs*/
+}TelSsNoReplyTime_t;
+
+/**
+ *  This enumeration type defines the Supplementary service types
+ */
+typedef enum
+{
+       TAPI_SS_TYPE_BARRING,                /**< Barring SS */
+       TAPI_SS_TYPE_FORWARDING,                         /**<  Forward SS  */
+       TAPI_SS_TYPE_WAITING,                            /**<  Waiting SS */
+       TAPI_SS_TYPE_IDENTIFICATION,             /**< Identification SS  */
+       TAPI_SS_TYPE_CNAP,                                       /**< CNAP SS */
+       TAPI_SS_TYPE_USSD,                                       /**<  Unstructured supplementary data SS  */
+       TAPI_SS_TYPE_AOC,                                        /**< AOC SS*/
+}TelSsType_t;
+
+/**
+*  Describes whether a supplementary service request was a success or a failure; and if it failed, why.
+*/
+typedef enum
+{
+ TAPI_SS_SUCCESS ,                                                     /**<  SS operation was successful */
+ TAPI_SS_TIMEREXPIRE ,                                         /**< SS operation timer expired on network. */
+ TAPI_SS_UNKNOWNSUBSCRIBER,                                    /**< SS error indicating unknown/illegal subscriber.  */
+ TAPI_SS_BEARERSERVICENOTPROVISIONED,                  /**<The network returns this error when it is requested to  @n
+                                                                               perform an operation on a supplementary service  */
+ TAPI_SS_TELESERVICENOTPROVISIONED,                    /**<The network returns this error when it is requested to perform  @n
+                                                                       an operation on a supplementary service  */
+ TAPI_SS_ILLEGALSSOPERATION,   /**<This error is returned by the network when it is requested to perform an illegal operation @n
+                                                                               which is defined as not applicable for the relevant supplementary service */
+ TAPI_SS_ERRORSTATUS,          /**<This error is returned by the network when it is requested to perform an operation @n
+                                                                               which is not compatible with the current status of the relevant supplementary service. */
+ TAPI_SS_NOTAVAILABLE,                                         /**< SS not available in network */
+ TAPI_SS_SUBSCRIPTIONVIOLATION,                                /**< SS service subscription violation. */
+ TAPI_SS_INCOMPATIBILITY,                                              /**< This error is returned by the network when it is requested for a supplementary service operation incompatible with the @n
+                                                                                        status of another supplementary service or with the teleservice or bearer service for which the operation is requested */
+ TAPI_SS_SYSTEMFAILURE,                                /**< This error is returned by the network, when it cannot perform an operation because of a failure in the network */
+ TAPI_SS_DATAMISSING,                          /**< This error is returned by the network when an optional parameter is missing in an invoke component @n
+                                                                                       or an inner data structure, while it is required by the context of the request. */
+ TAPI_SS_UNEXPECTEDDATAVALUE,                                  /**< SS error indicating unexpected data value on network side */   /**< SS operation barred.  */
+ TAPI_SS_PWREGISTRATIONFAILURE,                                /**< SS error indicating change password failure. */
+ TAPI_SS_NEGATIVEPWCHECK,                                      /**< SS error indicating negative password check.  */
+ TAPI_SS_FACILITYNOTSUPPORTED,                         /**< SS service facility not supported  */
+ TAPI_SS_RESOURCESNOTAVAILABLE,                                /**< SS error indicating resources not available in network.  */
+ TAPI_SS_MAXNOMPTYEXCEEDED,                                    /**< SS error indicating Maximum MPTY is reached.  */
+ TAPI_SS_CALLBARRED,   /**< This error is returned by the network to the MS when call independent subscriber control procedures are barred by the operator */
+ TAPI_SS_NUMBEROFPWATTEMPTSVIOLATION,                  /**< SS error indicating barring password attempts violated.  */
+ TAPI_SS_ABSENTSUBSCRIBER,                                     /**< This error is returned when the subscriber has activated the detach service or the system detects the absence condition */
+ TAPI_SS_ILLEGALSUBSCRIBER,                                    /**<This error is returned when illegality of the access has been @n
+                                                                               established by use of authentication procedure. */
+ TAPI_SS_ILLEGALEQUIPMENT,                                     /**<This error is returned when the IMEI check procedure has shown that  @n
+                                                                               the IMEI is blacklisted or not whitelisted  */
+ TAPI_SS_USSDBUSY,                                             /**< SS error indicating USSD Busy(Already SS / USSD is ongoing).  */
+ TAPI_SS_UNKNOWNALPHABET,                                      /**< SS error indicating unknown SS data coding of alphabet */
+ TAPI_SS_INVALIDDEFLECTEDTONUMBER,                             /**< SS error indicating the invalid deflected to number.  */
+ TAPI_SS_DEFLECTIONTOSERVEDSUBSCRIBER,                 /**< This error is returned if a diversion to the served  @n
+                                                                               subscriber's number was requested.  */
+ TAPI_SS_SPECIALSERVICECODE,                                   /**< This error is returned if diversion to a special service code was requested.  */
+ TAPI_SS_REJECTEDBYUSER,                                       /**< SS operation rejected by user.  */
+ TAPI_SS_REJECTEDBYNETWORK,                                    /**< SS operation rejected by network.  */
+ TAPI_SS_NET_NOT_ALLOWED_EMERGENCY_CALLS_ONLY, /**< SS operation is not allowed by network.  */
+ TAPI_SS_UNKNOWNERROR  ,                                               /**< SS error indicating unknown error  */
+ TAPI_SS_OEM_NOT_SUPPORTED                                     /**< If oem do not support any of SS requests, then this error will be returned back */
+} TelSsCause_t;
+
+/**
+*   The status of a supplementary service feature (e.g. Call Forwarding or Call Barring). @n
+*   These enumerated values should be used as masks
+*/
+typedef enum
+{
+       TAPI_SS_STATUS_ACTIVE ,                 /**< Provisioned & registered & active */
+       TAPI_SS_STATUS_REGISTERED ,             /**< Provisioned & registered (but not active/active-quiescent */
+       TAPI_SS_STATUS_PROVISIONED ,    /**<Provisioned but not registered (or active/active-quiescent) */
+       TAPI_SS_STATUS_QUIESCENT ,              /**< Provisioned & registered & active but quiescent */
+       TAPI_SS_STATUS_NOTHING                  /**< Not provisioned */
+} TelSsStatus_t;
+
+/**
+* These are the four types of identity presentation / restriction services.
+*/
+typedef enum
+{
+       TAPI_CALLING_LINE_IDENTITY_PRESENTATION  ,      /**< identify the party calling this phone */
+       TAPI_CALLING_LINE_IDENTITY_RESTRICTION,         /**< hide the identity of this phone when calling others */
+       TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION , /**< identify the party to whom the calling party (this phone) is connected */
+       TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION ,      /**< restrict yourself from being identified by incoming calls, such as forwarded calls */
+       TAPI_CALLED_LINE_IDENTITY_PRESENTATION ,        /**< Called line identity presentation  */
+       TAPI_CALLING_NAME_PRESENTATION                          /**< Calling Name Presentation */
+}TelSsLineIdentificationType_t;
+
+/**
+*  This enumeration defines the cli service status .
+*/
+typedef enum{
+       TAPI_CLI_STATUS_NOT_PROVISONED =0x01,           /**<Service not provided by the service provider */
+       TAPI_CLI_STATUS_PROVISIONED,                            /**<Service is provided by the service provider */
+       TAPI_CLI_STATUS_ACTIVATED,                                      /**<Service is activated at the network */
+       TAPI_CLI_STATUS_UNKOWN,                                         /**<Service status is unknown*/
+       TAPI_CLI_STATUS_TEMP_RESTRICTED,                        /**<Service is temporarily restricted */
+       TAPI_CLI_STATUS_TEMP_ALLOWED                            /**<Service is temporarily allowed */
+} TelSsCliStatus_t;
+
+/**
+ *  This enumeration defines the values for Cli service type .
+ */
+typedef enum
+{
+       TAPI_SS_CLI_CLIP = 0x01,        /**< Calling Line Identification Presentation. */
+       TAPI_SS_CLI_CLIR = 0x02,        /**<  Calling Line Identification Restriction. */
+       TAPI_SS_CLI_COLP = 0x03,        /**<  Connected Line Identification Presentation. */
+       TAPI_SS_CLI_COLR = 0x04,        /**<  Connected Line Identification Restriction. */
+       TAPI_SS_CLI_CDIP = 0x05,                /**<  Called Line Identification Presentation. */
+       TAPI_SS_CLI_CNAP = 0x06,        /**<  Calling Name Presentation.*/
+}TelSsCliType_t;
+
+/**
+ * This enum defines the values for AOC type.
+ */
+typedef enum
+{
+       TAPI_SS_AOC_TYPE_RESET  = 0x00, /**< Specifies the Reset MAXACM Value. */
+       TAPI_SS_AOC_TYPE_ACM    = 0x01, /**< Specifies the Accumulated call meter. */
+       TAPI_SS_AOC_TYPE_CCM    = 0x02, /**< Specifies the Current call meter. */
+       TAPI_SS_AOC_TYPE_MAXACM = 0x04, /**< Specifies the Max accumulated call meter. */
+       TAPI_SS_AOC_TYPE_PUC    = 0x08  /**< Specifies the Price per unit and currency.*/
+}TelSsAocType_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+/**
+ *  This structure  defines the different parameters related to forward info.
+ */
+typedef struct
+{
+       TelSsForwardMode_t      Mode;           /**< Forward Mode */
+       TelSsForwardType_t      Type;           /**< Forward Type */
+       TelSsForwardWhen_t      Condition;      /**< Forward Condition */
+       char                            szPhoneNumber[TAPI_CALL_DIALDIGIT_LEN_MAX];     /**< Phone Number*/
+       TelSsNoReplyTime_t      NoReplyConditionTimer;                                          /**< No reply wait time 5-30 secs in intervals of 5. */
+} TelSsForwardInfo_t;
+
+/**
+ *  This structure defines the values for USSD request type.
+ */
+typedef struct
+{
+       int                     UssdStringLength;       /**< USSD  String Length */
+       char                    szUssdString[TAPI_SS_USSD_DATA_SIZE_MAX];       /**< USSD  String */
+}TelSsUssdMsgInfo_t;
+
+/**
+*This structure defines the UssdMessageResponse Information
+*/
+typedef struct {
+       TelSsUssdRespType_t     SsRespType;                     /**< USSD Response Type*/
+       TelSsUssdIndType_t      IndType;                        /**< USSD Indication Type*/
+       TelSsUssdMsgInfo_t  UssdInfo;           /**< USSD Data*/
+}TelSsUssdMsgRspInfo_t;
+
+typedef struct {
+       TelSsUssdIndType_t IndType;     /**< USSD Indication Type*/
+       TelSsUssdMsgInfo_t UssdInfo;    /**< USSD Data */
+} TelSsUssdMsgIndInfo_t;
+
+/**
+ *  This structure  defines the different parameters related to call barring.
+ */
+typedef struct
+{
+       TelSsCallBarOperationMode_t     Mode;           /**< Barring mode  */
+       TelSsCallBarType_t                      Type;           /**< Barring type */
+       TelSsCallType_t                 CallType;       /**< Call type */
+       char                                            szPassword[TAPI_SS_GSM_BARR_PW_LEN_MAX];  /**< password */
+} TelSsCallBarringInfo_t;
+
+/**
+ *  This structure  defines the different parameters related to call waiting.
+ */
+typedef struct
+{
+       TelSsCallWaitOperationMode_t    Mode;           /**< Waiting mode  */
+       TelSsCallType_t                         CallType;       /**< Call type */
+} TelSsWaitingInfo_t;
+
+/**
+* This structure defines the values for Calling line identity service
+*/
+typedef struct
+{
+        TelSsLineIdentificationType_t  IdentificationType;     /**< Various line identification types */
+        TelSsCliStatus_t                               CliStatus;                      /**< Line identification status from network */
+}TelSsCliRecord_t;
+
+/**
+ * This structure defines the release complete message notification type.
+ */
+typedef struct{
+       unsigned char   RelCompMsgLen;                                                                          /**< Specifies the Release complete msg length.*/
+    unsigned char      szRelCompMsg[ TAPI_MAX_RELEASE_COMPLETE_DATA_LEN ];     /**<  Specifies the Release complete msg. */
+} TelSsRelCompMsgInfo_t;
+
+/**
+ * This structure defines the values for AOC request type.
+ */
+
+typedef struct
+{
+    float PPM;
+    unsigned char CharTypeOfCurrency;
+    unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX];
+} TelAocPucInfo_t;
+
+typedef struct
+{
+       TelSsAocType_t AocType;                         /**< Specifies the AOC type. */
+       unsigned int    ACM;                                    /**< Specifies the accumulated call meter value. */
+       unsigned int    MaxAcm;                         /**< Specifies the maximum value of ACM . */
+       float   CCM;                                            /**< Specifies the Current call meter value. */
+       float   PPM;                                            /**< Specifies the Price per unit value. */
+       unsigned char CharTypeOfCurrency;                       /**< Specifies the Char type of currency. */
+       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX];                 /**< Specifies the Currency characters. */
+} TelCallAocInfo_t;
+
+/**
+* This structure defines the values for ss call barring record
+*/
+typedef struct
+{
+       struct{
+       TelSsStatus_t                           Status;                                 /**< SS status  */
+       TelSsCallBarType_t                      Flavour;                                /**< Call barring types providing various barring conditions on that basis call be barred */
+       TelSsTeleService_t                      TeleCommService;                /**<  Teleservice */
+       } rec_class[TAPI_SS_RECORD_NUM_MAX];                            /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
+} TelSsCallBarringRecord_t ;
+
+/**
+* This structure defines the values for ss call forwarding record
+*/
+typedef struct
+{
+      struct{
+       TelSsStatus_t                   Status;                                                 /**< Call forwarding SS status */
+       TelSsForwardWhen_t              ForwardCondition;                               /**< Call forward types providing various conditions when call can be forwarded */
+       TelSsTeleService_t              TeleCommService;                                /**< Teleservice type */
+       int                                             bCallForwardingNumberPresent;   /**< Call forwarding number present or not */
+       unsigned char                   NoReplyWaitTime;
+       unsigned char                   szCallForwardingNumber[TAPI_CALL_DIALDIGIT_LEN_MAX]; /**< forwarded number.[Null Terminated string]*/
+       } rec_class[TAPI_SS_RECORD_NUM_MAX];                                    /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
+
+} TelSsForwardRecord_t;
+
+/**
+* This structure defines the values for ss call waiting record
+*/
+typedef struct
+{
+       struct {
+        TelSsStatus_t                  Status;                  /**< SS status */
+        TelSsTeleService_t             TeleCommService;                 /**< Teleservice */
+        } rec_class[TAPI_SS_RECORD_NUM_MAX];                    /**< Specifies the  Maximum of TAPI_SS_RECORD_NUM_MAX records. */
+} TelSsCallWaitingRecord_t;
+
+/**
+*This structure defines the parameters for SS record type
+*/
+typedef union
+{
+       TelSsCallWaitingRecord_t                WaitingRecord;          /**< Call waiting information */
+       TelSsCallBarringRecord_t                BarringRecord;          /**< Call barring information*/
+       TelSsCliRecord_t                                CliRecord;                      /**< Line identification information */
+       TelSsForwardRecord_t                    ForwardingRecord;       /**< Call forward record information */
+}TelSsRecord_t;
+
+/**
+* related all kind of SS information
+*/
+typedef struct
+{
+       TelSsType_t                             SsType;                         /**< Supplementary service type */
+       TelSsStatus_t                           SsStatus;                       /**<SS status information */
+       unsigned int                            NumberOfRecords;        /**< Number of records present for Call Barring / Call forwarding / Call waiting. In case of any error, this parameter value will be set to zero.*/
+       TelSsRecord_t                           SsRecord;       /**< SS record (Union of Call Barring / Call Forwarding/Call waiting / line identification information). This structure can be Null when number_of_records parameter is zero.*/
+       TelSsTeleService_t                      SsTeleserviceType;      /**< Teleservice type */
+} TelSsInfo_t;
+
+typedef struct
+{
+       float   PPM;                                    /**< Specifies the Price per unit value. */
+       unsigned char CharTypeOfCurrency;                       /**< Specifies the Char type of currency. */
+       unsigned char szCurrency[TAPI_SS_AOC_CURRENCY_LEN_MAX];         /**< Specifies the Currency characters. */
+} TelSsAoc_ppm_info_t;
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _TEL_SS_H_
+
+/**
+* @}
+*/
+
diff --git a/include/common/TelUtility.h b/include/common/TelUtility.h
new file mode 100644 (file)
index 0000000..5831ee2
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  COMMON_TAPI     COMMON
+* @{
+*
+* @file TelUtility.h
+
+     @brief This file serves as a "C" header file defines structures for Utility Services. \n
+      It contains a sample set of constants, enums, structs that would be required by applications.
+ */
+
+#ifndef _TEL_UTILITY_H_
+#define _TEL_UTILITY_H_
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+#define INVALID_REQUEST_ID     -1    /**< Invalid RequestId Value */
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+* @enum TapiResult_t
+* Below enumerations are the return codes of TAPI API's
+*/
+typedef enum
+{
+       TAPI_API_SUCCESS                                                =  0,   /**<No Error occurred */
+       TAPI_API_INVALID_INPUT                                  = -1,   /**<input values are not correct in TAPI Library */
+       TAPI_API_INVALID_PTR                    = -2,   /**<invalid pointer */
+       TAPI_API_NOT_SUPPORTED                  = -3,   /**<The feature corresponding to requested API is not supported. This may be due to market/network/vendor reasons such as the feature is not available in the network. */
+       TAPI_API_DEPRICATED                                             = -4,   /**<This API is deprecated and will be so in future also */
+       TAPI_API_SYSTEM_OUT_OF_MEM                              = -5,   /**<Out of memory */
+       TAPI_API_SYSTEM_RPC_LINK_DOWN                   = -6,   /**<RPC link down */
+       TAPI_API_SERVICE_NOT_READY                              = -7,   /**<Phone was powered on, but yet to receive the power up completed notification */
+       TAPI_API_SERVER_FAILURE         = -8,   /**<error occurred in Telephony server  */
+       TAPI_API_OEM_PLUGIN_FAILURE     = -9,   /**<Plug-in layer failure */
+       TAPI_API_TRANSPORT_LAYER_FAILURE                = -10,  /**<Transport layer Failure*/
+       TAPI_API_INVALID_DATA_LEN                               = -11,  /**<Invalid data length */
+       TAPI_API_REQUEST_MAX_IN_PROGRESS                = -12,  /**<Maximum number of API Request for the same service are already in progress */
+       TAPI_API_OFFLINE_MODE_ERROR                     = -13,  /**<OEM Telephony Provider is in Offline mode. */
+       TAPI_EVENT_CLASS_UNKNOWN                                = -14,  /**<Event class specified is not present in Event Class list. - 20*/
+       TAPI_EVENT_UNKNOWN                              = -15,  /**<Event specified is not present in TAPI Unsolicited Event list. */
+       TAPI_REGISTRATION_OP_FAILED                             = -16,  /**<Callback Registration/De-registration failed */
+       TAPI_API_OPERATION_FAILED                               = -17,  /**<API operation failed*/
+       TAPI_API_INVALID_OPERATION                              = -18,  /**<API Invalid Operation */
+
+       TAPI_API_SYSTEM_RPC_LINK_NOT_EST                = -100, /**< RPC link down */
+       TAPI_API_API_NOT_SUPPORTED                              = -101, /**<API not supported */
+       TAPI_API_SERVER_LAYER_FAILURE                   = -102, /**< Server layer failure*/
+
+       /*      CALL */
+       TAPI_API_INVALID_CALL_ID                                = -200, /**< Invalid call ID*/
+       TAPI_API_CALL_CTXT_OVERFLOW                             = -201, /**<Call context overflow */
+       TAPI_API_COULD_NOT_GET_CALL_CTXT                = -202, /**< Could not get call  context*/
+       TAPI_API_CTXT_SEARCH_RET_NON_CALL_CTXT  = -203, /**< Context search returned non-call context*/
+       TAPI_API_COULD_NOT_DESTROY_CTXT                 = -204, /**< could not destroy context*/
+       TAPI_API_INVALID_LINE_ID                                = -205, /**< invalid line ID*/
+       TAPI_API_INVALID_CALL_HANDLE                    = -206, /**<Invalid call handle  - 35*/
+       TAPI_API_INVALID_CALL_STATE                             = -207, /**<Invalid call state- Newly added. Need to raise a CR for this */
+       TAPI_API_CALL_PRE_COND_FAILED                   = -208, /**<Pre condition like MO call can not be established now.*/
+       TAPI_API_CALL_SAME_REQ_PENDING                  = -209, /**<  Can not accept same request multiple times  */
+
+       /*      POWER   */
+       TAPI_API_MODEM_POWERED_OFF                              = -300, /**<The Modem is powered off */
+       TAPI_API_MODEM_ALREADY_ON                               = -301, /**<Modem already on */
+       TAPI_API_MODEM_ALREADY_OFF                              = -302, /**<Modem already off */
+
+       /* NETTEXT */
+       TAPI_API_NETTEXT_DEVICE_NOT_READY               = -400, /**<Nettext device not ready */
+       TAPI_API_NETTEXT_SCADDR_NOT_SET                 = -401, /**<Nettext SCA address not set */
+       TAPI_API_NETTEXT_INVALID_DATA_LEN               = -402, /**<Nettext Invalid data length */
+       TAPI_NETTEXT_SCADDRESS_NOT_SET                  = -403, /**<Nettext SCA address not set*/
+
+       /* SIM  */
+       TAPI_API_SIM_BUSY                                               = -500, /**<SIM is busy  */
+       TAPI_API_SIM_CARD_PERMANENT_ERROR               = -501, /**<SIM error/blocked state */
+       TAPI_API_SIM_NOT_INITIALIZED                    = -502, /**<SIM has not initialized yet (waiting for PIN verification, etc) */
+       TAPI_API_SIM_NOT_FOUND                                  = -503, /**<SIM is not present / removed */
+       TAPI_API_SIM_SIM_SESSION_FULL                   = -504, /**< SIM session full*/
+       TAPI_API_SIM_INVALID_CARD_TYPE                  = -505, /**< SIM Invalid Application ID*/
+       TAPI_API_SIM_INVALID_SESSION                    = -506, /**<SIM Invalid Session */
+       TAPI_API_SIM_FILE_TYPE_WRONG                    = -507, /**<SIM file type wrong */
+       TAPI_API_SIM_FILE_ENCODE_FAIL                   = -508, /**<SIM file encode fail */
+       TAPI_API_SIM_FILE_DECODE_FAIL                   = -509, /**< SIM file decode fail*/
+       TAPI_API_SIM_FILE_INVALID_ENCODE_LEN    = -510, /**< SIM invalid encode length*/
+       TAPI_API_SIM_INVALID_RECORD_NUM         = -511, /**<SIM Invalid record number */
+       TAPI_API_SIM_CASE_NOT_HANDLED                   = -512, /**< SIM case not handled*/
+       TAPI_API_SIM_OEM_UNKNOWN_SIM_CARD               = -513, /**<SIM OEM unknown SIM card */
+       TAPI_API_SIM_SEC_UKNOWN_PIN_TYPE                = -514, /**<SIM unknown pin type */
+       TAPI_API_SIM_SEC_INVALID_PIN_TYPE               = -515, /**<SIM invalid pin type */
+       TAPI_API_SIM_SEC_LOCK_PERS_ENABLED              = -516, /**<SIM Lock Personalization status(PN/PU/PP/PC) */
+       TAPI_API_SIM_PB_INVALID_STORAGE_TYPE    = -517, /**<SIM phonebook invalid storage type */
+
+       /* SAT  */
+       TAPI_API_SAT_INVALID_COMMAND_ID                 = -600, /**<Command Number Invalid      */
+       TAPI_API_SAT_COMMAND_TYPE_MISMATCH              = -601, /**<    Command Type Mismatch   */
+       TAPI_API_SAT_EVENT_NOT_REQUIRED_BY_USIM = -602, /**< Event Not Requested by USIM*/
+
+       /* Network */
+       TAPI_API_NETWORK_INVALID_CTXT                   = -700, /**< Network invalid context*/
+
+       /*Misc */
+       TAPI_API_MISC_RETURN_NULL                               = -800, /**< MISC return NULL*/
+       TAPI_API_MISC_VALIDITY_ERROR                    = -801, /**< MISC validity error*/
+       TAPI_API_MISC_INPUTPARM_ERROR                   = -802, /**< MISC input parameter error*/
+       TAPI_API_MISC_OUTPARAM_NULL                             = -803, /**< MISC output parameter null*/
+
+} TapiResult_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_TEL_UTILITY_H_
+
+/**
+* @}
+*/
+
diff --git a/include/common/tel_cs_conn.h b/include/common/tel_cs_conn.h
new file mode 100644 (file)
index 0000000..cbd74cc
--- /dev/null
@@ -0,0 +1,354 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TEL_CS_CONN_H_
+#define _TEL_CS_CONN_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+#define TAPI_CS_TYPE_ASYNC                                     (0 << 24)
+#define TAPI_CS_TYPE_SYNC                                      (1 << 24)
+
+#define        TAPI_CS_SERVICE_CALL                            TAPI_EVENT_CLASS_CALL_VOICE     // TAPI_EVENT_CLASS_CALL_DATA
+#define        TAPI_CS_SERVICE_SIM                                     TAPI_EVENT_CLASS_SIM
+#define        TAPI_CS_SERVICE_NETTEXT                         TAPI_EVENT_CLASS_NETTEXT
+#define        TAPI_CS_SERVICE_NETWORK                         TAPI_EVENT_CLASS_NETWORK
+#define        TAPI_CS_SERVICE_SS                                      TAPI_EVENT_CLASS_SS
+#define        TAPI_CS_SERVICE_SIMATK                          TAPI_EVENT_CLASS_SAT
+#define        TAPI_CS_SERVICE_GPRS                            TAPI_EVENT_CLASS_DATA
+#define        TAPI_CS_SERVICE_SOUND                           TAPI_EVENT_CLASS_SOUND
+#define        TAPI_CS_SERVICE_UTIL                            TAPI_EVENT_CLASS_UTIL
+
+// Voice Call/Data Call Service
+#define        TAPI_CS_CALL_SETUP                                      TAPI_EVENT_CALL_SETUP_CNF
+#define        TAPI_CS_CALL_ANSWER                                     TAPI_EVENT_CALL_ANSWER_CNF
+#define        TAPI_CS_CALL_RELEASE                            TAPI_EVENT_CALL_RELEASE_CNF
+#define        TAPI_CS_CALL_RELEASEALL                         TAPI_EVENT_CALL_RELEASE_ALL_CNF
+#define        TAPI_CS_CALL_RELEASEALL_ACTIVE          TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF
+#define        TAPI_CS_CALL_RELEASEALL_HELD            TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF
+#define        TAPI_CS_CALL_DTMF                                       TAPI_EVENT_CALL_SEND_DTMF_CNF
+#define        TAPI_CS_CALL_ACTIVATE                           TAPI_EVENT_CALL_RETRIEVE_CNF
+#define        TAPI_CS_CALL_HOLD                                       TAPI_EVENT_CALL_HOLD_CNF
+#define        TAPI_CS_CALL_SWAP                                       TAPI_EVENT_CALL_SWAP_CNF
+#define        TAPI_CS_CALL_SETUPCONFCALL                      TAPI_EVENT_CALL_SETUPCONFERENCE_CNF
+#define        TAPI_CS_CALL_SPLITCONFCALL                      TAPI_EVENT_CALL_SPLITCONFERENCE_CNF
+#define        TAPI_CS_CALL_TRANSFERCALL                       TAPI_EVENT_CALL_TRANSFER_CNF
+#define        TAPI_CS_CALL_GETACTIVELINE                      TAPI_EVENT_CALL_GET_LINEID_CNF
+#define        TAPI_CS_CALL_SETACTIVELINE                      TAPI_EVENT_CALL_SET_LINEID_CNF
+#define        TAPI_CS_CALL_GETPRIVACYMODE                     TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF
+#define        TAPI_CS_CALL_SETPRIVACYMODE                     TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF
+#define        TAPI_CS_CALL_FLASHINFO                          TAPI_EVENT_CALL_FLASHINFO_CNF
+#define        TAPI_CS_CALL_EXITEMERGENCYMODE          TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF
+#define        TAPI_CS_CALL_GETCALLTIME                        TAPI_EVENT_CALL_TIME_CNF
+
+// should be confirm event
+#define        TAPI_CS_CALL_DEFLECT                            (TAPI_EVENT_CALL_CNF_MAX + 1) // ? undefined confirm
+#define        TAPI_CS_CALL_ACTIVATECCBS                       (TAPI_EVENT_CALL_CNF_MAX + 2) // undefiend confirm - ipc_rx_gencmd.c Not supported.
+// sync API
+#define        TAPI_CS_CALL_GETSTATUS                          (TAPI_CS_TYPE_SYNC+TAPI_EVENT_CALL_CNF_MAX + 3)
+#define        TAPI_CS_CALL_GETDURATION                        (TAPI_CS_TYPE_SYNC+TAPI_EVENT_CALL_CNF_MAX + 4)
+#define        TAPI_CS_CALL_GETCONFERENCELIST          (TAPI_CS_TYPE_SYNC+TAPI_EVENT_CALL_CNF_MAX + 5)
+
+// SIM Service
+#define        TAPI_CS_SIM_EVENT_MAX                           TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF
+#define        TAPI_CS_SIM_GETINDICATIONINFO           TAPI_EVENT_SIM_GET_INDICATION_CNF
+#define        TAPI_CS_SIM_SETINDICATIONINFO           TAPI_EVENT_SIM_SET_INDICATION_CNF
+#define        TAPI_CS_SIM_GETMAILBOXINFO                      TAPI_EVENT_SIM_GET_MAILBOX_CNF
+#define        TAPI_CS_SIM_SETMAILBOXINFO                      TAPI_EVENT_SIM_SET_MAILBOX_CNF
+#define        TAPI_CS_SIM_SETLANGUAGE                         TAPI_EVENT_SIM_SET_LANGUAGE_CNF
+#define        TAPI_CS_SIM_RSIMACCESS                          TAPI_EVENT_SIM_RSIM_ACCESS_CNF
+#define        TAPI_CS_SIM_VERIFYSEC                           TAPI_EVENT_SIM_VERIFY_SEC_CNF
+#define        TAPI_CS_SIM_VERIFYPUK                           TAPI_EVENT_SIM_VERIFY_PUK_CNF
+#define        TAPI_CS_SIM_CHANGEPIN                           TAPI_EVENT_SIM_CHANGE_PINS_CNF
+#define        TAPI_CS_SIM_DISABLESEC                          TAPI_EVENT_SIM_DISABLE_SEC_CNF
+#define        TAPI_CS_SIM_ENABLESEC                           TAPI_EVENT_SIM_ENABLE_SEC_CNF
+#define        TAPI_CS_SIM_GETPERSSTATUS                       TAPI_EVENT_SIM_PERS_STATUS_CNF
+#define        TAPI_CS_SIM_DISABLEPERS                         TAPI_EVENT_SIM_DISABLE_PERS_CNF
+#define        TAPI_CS_SIM_ENABLEPERS                          TAPI_EVENT_SIM_ENABLE_PERS_CNF
+#define        TAPI_CS_SIM_DISABLEFDN                          TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF
+#define        TAPI_CS_SIM_ENABLEFDN                           TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF
+#define        TAPI_CS_SIM_PB_GETCOUNT                         TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF
+#define        TAPI_CS_SIM_PB_GETMETAINFO                      TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF
+#define        TAPI_CS_SIM_PB_READRECORD                       TAPI_EVENT_SIM_PB_ACCESS_READ_CNF
+#define        TAPI_CS_SIM_PB_UPDATERECORD                     TAPI_EVENT_SIM_PB_UPDATE_CNF
+#define        TAPI_CS_SIM_PB_DELETERECORD                     TAPI_EVENT_SIM_PB_DELETE_CNF
+#define        TAPI_CS_SIM_GETPBCAPABILITYINFO         TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF
+#define        TAPI_CS_SIM_SAPCONNECTREQUEST           TAPI_EVENT_SIM_SAP_CONNECT_CNF
+#define        TAPI_CS_SIM_SAPCONNECTSTATUS            TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF
+#define        TAPI_CS_SIM_SAPATRREQUEST                       TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF
+#define        TAPI_CS_SIM_SAPTRANSFERAPDU                     TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF
+#define        TAPI_CS_SIM_SAPSETPROTOCOL                      TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF
+#define        TAPI_CS_SIM_SAPSETSIMPOWER                      TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF
+#define        TAPI_CS_SIM_SAPCARDREADERSTATUS         TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF
+#define        TAPI_CS_SIM_ISIMAUTHENTICATION          TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF
+#define TAPI_CS_SIM_APDU                                       TAPI_EVENT_SIM_APDU_CNF
+#define TAPI_CS_SIM_ATR                                                TAPI_EVENT_SIM_ATR_CNF
+
+// sync API
+#define        TAPI_CS_SIM_GETIMSIINFO                         (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 1)
+#define        TAPI_CS_SIM_GETFDNSTATUS                        (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 2)
+#define        TAPI_CS_SIM_GETECCINFO                          (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 3)
+#define        TAPI_CS_SIM_GETLANGUAGEINFO                     (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 4)
+#define        TAPI_CS_SIM_GETCARDTYPE                         (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 5)
+#define        TAPI_CS_SIM_GETSIMINITINFO                      (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 6)
+#define        TAPI_CS_SIM_GETSECSTATUS                        (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 7)
+#define        TAPI_CS_SIM_GETPBINITINFO                       (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 8)
+#define        TAPI_CS_SIM_GETICCIDINFO                        (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 9)
+#define        TAPI_CS_SIM_GETCFINFO                           (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 10)
+#define        TAPI_CS_SIM_GETMWINFO                           (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 11)
+#define        TAPI_CS_SIM_GETMBINFO                           (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 12)
+#define        TAPI_CS_SIM_GETCPHSINFO                         (TAPI_CS_TYPE_SYNC+TAPI_EVENT_SIM_CNF_MAX + 13)
+
+// SMS Service
+#define        TAPI_CS_NETTEXT_EVENT_MAX                       TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF
+#define        TAPI_CS_NETTEXT_SEND                            TAPI_EVENT_NETTEXT_SENTSTATUS_CNF
+#define        TAPI_CS_NETTEXT_READ                            TAPI_EVENT_NETTEXT_READ_SMS_CNF
+#define        TAPI_CS_NETTEXT_WRITE                           TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF
+#define        TAPI_CS_NETTEXT_DELETE                          TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF
+#define        TAPI_CS_NETTEXT_GETCOUNT                        TAPI_EVENT_NETTEXT_GET_COUNT_CNF
+#define        TAPI_CS_NETTEXT_GETSCA                          TAPI_EVENT_NETTEXT_GET_SCA_CNF
+#define        TAPI_CS_NETTEXT_GETCBCONFIG                     TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF
+#define        TAPI_CS_NETTEXT_GETPREFBEARER           TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF
+#define        TAPI_CS_NETTEXT_SETDELIVERREPORT        TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF
+#define        TAPI_CS_NETTEXT_GETPARAMS                       TAPI_EVENT_NETTEXT_GET_PARAM_CNF
+#define        TAPI_CS_NETTEXT_GETPARAMCNT                     TAPI_EVENT_NETTEXT_PARAM_COUNT_IND
+#define        TAPI_CS_NETTEXT_SEND_EX                         TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF
+
+// Same response
+#define        TAPI_CS_NETTEXT_SETSCA                          (TAPI_EVENT_NETTEXT_CNF_MAX + 1)
+#define        TAPI_CS_NETTEXT_SETCBCONFIG                     (TAPI_EVENT_NETTEXT_CNF_MAX + 2)
+#define        TAPI_CS_NETTEXT_SETMEMSTATUS            (TAPI_EVENT_NETTEXT_CNF_MAX + 3)
+#define        TAPI_CS_NETTEXT_SETPREFBEARER           (TAPI_EVENT_NETTEXT_CNF_MAX + 4)
+#define        TAPI_CS_NETTEXT_SETMSGSTATUS            (TAPI_EVENT_NETTEXT_CNF_MAX + 5)
+#define        TAPI_CS_NETTEXT_SETPARAMS                       (TAPI_EVENT_NETTEXT_CNF_MAX + 6)
+
+// Network Service
+#define        TAPI_CS_NETWORK_EVENT_MAX                       TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF
+#define        TAPI_CS_NETWORK_SEARCH                          TAPI_EVENT_NETWORK_SEARCH_CNF
+#define        TAPI_CS_NETWORK_GETSELECTIONMODE        TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF
+#define        TAPI_CS_NETWORK_SETNETWORKBAND          TAPI_EVENT_NETWORK_SETNWBAND_CNF
+#define        TAPI_CS_NETWORK_GETNETWORKBAND          TAPI_EVENT_NETWORK_GETNWBAND_CNF
+#define        TAPI_CS_NETWORK_SETNETWORKMODE          TAPI_EVENT_NETWORK_SETNWMODE_CNF
+#define        TAPI_CS_NETWORK_GETNETWORKMODE          TAPI_EVENT_NETWORK_GETNWMODE_CNF
+#define        TAPI_CS_NETWORK_SETPREFPLMN                     TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF
+#define        TAPI_CS_NETWORK_GETPREFPLMN                     TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF
+#define        TAPI_CS_NETWORK_SETSERVICEDOMAIN        TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF
+#define        TAPI_CS_NETWORK_GETSERVICEDOMAIN        TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF
+#define        TAPI_CS_NETWORK_SETROAMINGMODE          TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF
+#define        TAPI_CS_NETWORK_GETROAMINGMODE          TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF
+#define        TAPI_CS_NETWORK_SETCDMAHYBRIDMODE       TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF
+#define        TAPI_CS_NETWORK_GETCDMAHYBRIDMODE       TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF
+// Same response
+#define        TAPI_CS_NETWORK_SELECT_AUTOMATIC        (TAPI_EVENT_NETWORK_CNF_MAX + 1)
+#define        TAPI_CS_NETWORK_SELECT_MANUAL           (TAPI_EVENT_NETWORK_CNF_MAX + 2)
+
+// SS Service
+#define        TAPI_CS_SS_EVENT_MAX                            TAPI_EVENT_SS_SET_AOC_CNF
+#define        TAPI_CS_SS_BARRSETREQ                           TAPI_EVENT_SS_BARRING_CNF
+#define        TAPI_CS_SS_BARRCHANGEPWDREQ                     TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF
+#define        TAPI_CS_SS_BARRQUERYSTATUSREQ           TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF
+#define        TAPI_CS_SS_FWDSETREQ                            TAPI_EVENT_SS_FORWARD_CNF
+#define        TAPI_CS_SS_FWDQUERYSTATUSREQ            TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF
+#define        TAPI_CS_SS_WAITSETREQ                           TAPI_EVENT_SS_WAITING_CNF
+#define        TAPI_CS_SS_WAITQUERYSTATUSREQ           TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF
+#define        TAPI_CS_SS_USSDSENDSTRINGREQ            TAPI_EVENT_SS_USSD_CNF
+#define        TAPI_CS_SS_USSDCANCEL                           TAPI_EVENT_SS_USSD_CANCEL_CNF
+#define        TAPI_CS_SS_CLIQUERYSTATUSREQ            TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF
+#define        TAPI_CS_SS_GETCALLCOSTREQ                       TAPI_EVENT_SS_AOC_RSP
+#define        TAPI_CS_SS_SETCALLCOSTREQ                       TAPI_EVENT_SS_SET_AOC_CNF
+#define        TAPI_CS_SS_USSDRSP                                      TAPI_EVENT_SS_USSD_RSP_CNF
+// SAT Service
+#define        TAPI_CS_SIMATK_EVENT_MAX                                        TAPI_EVENT_SAT_MENU_SELECTION_CNF
+#define        TAPI_CS_SIMATK_SEND_MENU_SELECTION_ENVELOPE     TAPI_EVENT_SAT_MENU_SELECTION_CNF
+#define        TAPI_CS_SIMATK_SEND_EVENT_DOWNLOAD                      TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF
+#define        TAPI_CS_UI_DISPLAY_STATUS                                       (TAPI_EVENT_SAT_CNF_MAX + 1)
+#define        TAPI_CS_UI_USER_CONFIRM                                         (TAPI_EVENT_SAT_CNF_MAX + 2)
+#define        TAPI_CS_SIMATK_GET_MAIN_MENU_INFO                       (TAPI_EVENT_SAT_CNF_MAX + 3)
+#define        TAPI_CS_SIMATK_SEND_APP_EXEC_RESULT                     (TAPI_EVENT_SAT_CNF_MAX + 4)
+
+// GPRS Service
+#define        TAPI_CS_GPRS_STARTNETWORK                       TAPI_EVENT_PS_PDP_ACT_RSP
+#define        TAPI_CS_GPRS_PDP_DEACTIVATION_SET       TAPI_EVENT_PS_PDP_DEACT_RSP
+#define        TAPI_CS_GPRS_BTDUN_PINCTRL_GET          (TAPI_EVENT_PS_CNF_MAX + 1)
+
+// Sound Service
+#define        TAPI_CS_SOUND_EVENT_MAX                         TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI
+#define        TAPI_CS_SOUND_VOLUME_GET                        TAPI_EVENT_SOUND_VOLUMECTRL_RSP
+#define        TAPI_CS_SOUND_MIC_MUTE_GET                      TAPI_EVENT_SOUND_MICMUTECTRL_RSP
+#define        TAPI_CS_SOUND_VOLUME_SET                        (TAPI_EVENT_SOUND_CNF_MAX + 1)
+#define        TAPI_CS_SOUND_MIC_MUTE_SET          (TAPI_EVENT_SOUND_CNF_MAX + 2)
+#define        TAPI_CS_SOUND_AUDIO_PATH_CTRL           (TAPI_EVENT_SOUND_CNF_MAX + 3)
+
+#define        TAPI_CS_UTIL_TUNNEL_REQ                         (TAPI_EVENT_UTIL_TUNNEL_CNF)
+
+// Internal
+#define TAPI_CS_INTERNAL                                               (1<<30)
+
+#define        TAPI_CS_SERVICE_DATA                                    TAPI_EVENT_CLASS_CDMA_DATA      //TAPI_EVENT_CLASS_CALL_DATA
+#define        TAPI_CS_SERVICE_MISC                                    TAPI_EVENT_CLASS_MISC
+#define        TAPI_CS_SERVICE_GPS                                             TAPI_EVENT_CLASS_GPS
+#define        TAPI_CS_SERVICE_POWER                                   TAPI_EVENT_CLASS_POWER
+#define        TAPI_CS_SERVICE_CFG                                             TAPI_EVENT_CLASS_CFG
+#define        TAPI_CS_SERVICE_OMADM                                   TAPI_EVENT_CLASS_OMADM
+#define        TAPI_CS_SERVICE_SVCMODE                                 TAPI_EVENT_CLASS_SVCMODE
+#define        TAPI_CS_SERVICE_IMEI                                    TAPI_EVENT_CLASS_IMEI
+#define        TAPI_CS_SERVICE_FACTORY                                 TAPI_EVENT_CLASS_FACTORY
+
+// SMS Service
+#define        TAPI_CS_NETTEXT_DEVICEREADY                             (TAPI_CS_INTERNAL|(TAPI_EVENT_NETTEXT_CNF_MAX+ 1))
+#define        TAPI_CS_NETTEXT_DEVICESTATUS                    (TAPI_CS_INTERNAL|(TAPI_EVENT_NETTEXT_CNF_MAX+ 2))
+
+// Network Service
+#define        TAPI_CS_NETWORK_SETNETWORKORDER                 (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 1))
+#define        TAPI_CS_NETWORK_GETNETWORKORDER                 (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 2))
+#define        TAPI_CS_NETWORK_SETPOWERONATTACH                (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 3))
+#define        TAPI_CS_NETWORK_GETPOWERONATTACH                (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 4))
+#define        TAPI_CS_NETWORK_CANCELMANUALSEARCH              (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 5))
+#define        TAPI_CS_NETWORK_CANCELMANUALSELECTION   (TAPI_CS_INTERNAL|(TAPI_CS_NETWORK_SELECT_MANUAL + 6))
+
+// Sound Service
+#define        TAPI_CS_SOUND_AUDIOLOOPBACK_SET                 (TAPI_CS_INTERNAL|(TAPI_EVENT_SOUND_CNF_MAX + 1))
+#define        TAPI_CS_SOUND_AUDIO_CLOCK_CTRL                  (TAPI_CS_INTERNAL|(TAPI_EVENT_SOUND_CNF_MAX + 2))
+#define        TAPI_CS_SOUND_VOICE_RECORDING_SET               (TAPI_CS_INTERNAL|(TAPI_EVENT_SOUND_CNF_MAX + 3))
+
+// CDMA Data Service
+#define        TAPI_CS_DATA_EVENT_MAX                                  (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_NAI_SETTING_MODE_SET_CNF))
+#define        TAPI_CS_DATA_MOBILE_IP_NAI_SET                  (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_MIP_NAI_SET_CNF))
+#define        TAPI_CS_DATA_MOBILE_IP_NAI_GET                  (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_MIP_NAI_GET_CNF))
+#define        TAPI_CS_DATA_CURRENT_NAI_INDEX_GET              (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_CURRENT_NAI_INDEX_GET_CNF))
+#define        TAPI_CS_DATA_TE2_STATUS_GET                             (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_TE2_STATUS_GET_CNF))
+#define        TAPI_CS_DATA_ROAM_GUARD_SET                             (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_ROAM_GUARD_SET_CNF))
+#define        TAPI_CS_DATA_ROAM_GUARD_GET                             (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_ROAM_GUARD_GET_CNF))
+#define        TAPI_CS_DATA_EVDO_REV_CONFIG_SET                (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_EVDO_REV_CONFIG_SET_CNF))
+#define        TAPI_CS_DATA_EVDO_REV_CONFIG_GET                (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_EVDO_REV_CONFIG_GET_CNF))
+#define        TAPI_CS_DATA_RESTORE_NAI                                (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_RESTORE_NAI_SET_CNF))
+#define        TAPI_CS_DATA_DDTM_CONFIGURATION_SET             (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_DDTM_CONFIGURATION_SET_CNF))
+#define        TAPI_CS_DATA_DDTM_CONFIGURATION_GET             (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_DDTM_CONFIGURATION_GET_CNF))
+#define        TAPI_CS_DATA_MODEM_NAI_SET                              (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_NAI_SETTING_MODE_SET_CNF))
+#define        TAPI_CS_DATA_MODEM_NAI_GET                              (TAPI_CS_INTERNAL|(TAPI_EVENT_DATA_MODEM_NAI_GET_CNF)) // please check with TAPI_EVENT_DATA_NAI_SETTING_MODE_GET_CNF
+// MISC Service
+#define        TAPI_CS_MISC_EVENT_MAX                                  (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_NAM_INFO_NOTI))
+#define        TAPI_CS_MISC_TIMEZONE_GETINFO                   (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_NITZ_GETCNF))
+#define        TAPI_CS_MISC_NAM_INFO_SET                               (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_SET_NAM_INFO_CNF))
+#define        TAPI_CS_MISC_NAM_INFO_GET                               (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_GET_NAM_INFO_CNF))
+#define        TAPI_CS_MISC_TIMEZONE_SETINFO                   (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_CNF_MAX + 1))        // There is no confirm message
+#define        TAPI_CS_MISC_TIMEZONE_CONFIRMINFO               (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_CNF_MAX + 2))        // It is not used and necessary. removed.
+#define        TAPI_CS_MISC_TIMEZONE_GETMODE                   (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_CNF_MAX + 3))
+#define        TAPI_CS_MISC_SERIAL_NUMBER_GET                  (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_CNF_MAX + 4))
+#define        TAPI_CS_MISC_ME_VERSION_GET                             (TAPI_CS_INTERNAL|(TAPI_EVENT_MISC_CNF_MAX + 5))
+
+// GPS Service
+#define        TAPI_CS_GPS_INIT                                                (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_INIT_RESP))
+#define        TAPI_CS_GPS_DEINIT                                              (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_DEINIT_RESP))
+#define        TAPI_CS_GPS_FIX_REQUEST                                 (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_FIX_REQUEST_RESP))
+#define        TAPI_CS_GPS_STOP_SESSION                                (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_STOP_SESSION_RESP))
+#define        TAPI_CS_GPS_GET_PARAMETERS                              (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_PARAMETERS_GET_RESP))
+#define        TAPI_CS_GPS_SET_PARAMETERS                              (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_PARAMETERS_SET_RESP))
+#define        TAPI_CS_GPS_AGPS_PDP_CONN_CNF                   (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_PDP_CONNECTION_IND))
+#define        TAPI_CS_GPS_AGPS_DNS_LOOKUP_CNF                 (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_DNS_LOOKUP_IND))
+#define        TAPI_CS_GPS_SEND_VER_CNF                                (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_VERIFICATION_IND))
+#define        TAPI_CS_GPS_XTRA_INIT                                   (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_XTRA_INIT))
+#define        TAPI_CS_GPS_XTRA_DEINIT                                 (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_XTRA_DEINIT))
+#define        TAPI_CS_GPS_XTRA_ENABLE                                 (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_XTRA_ENABLE_SET_RESP))
+#define        TAPI_CS_GPS_XTRA_DISABLE                                (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_CNF_MAX+1))   // should be fixed
+#define        TAPI_CS_GPS_XTRA_SET_TIMEINFO                   (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_XTRA_SET_TIME_RESP))
+#define        TAPI_CS_GPS_XTRA_SET_DATA                               (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_XTRA_SET_DATA_RESP))
+#define        TAPI_CS_GPS_MEASURE_POS_CNF                             (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_MEASURE_POSITION_CNF))
+#define        TAPI_CS_GPS_SET_FREQ_AIDING                             (TAPI_CS_INTERNAL|(TAPI_EVENT_GPS_FREQ_AIDING_SET_RESP))
+
+// Power Service
+#define        TAPI_CS_POWER_EVENT_MAX                                 (TAPI_CS_INTERNAL|(TAPI_EVENT_POWER_SERVICE_READY_IND))
+#define        TAPI_CS_POWER_FLIGHT_MODE                               (TAPI_CS_INTERNAL|(TAPI_EVENT_POWER_FLIGHT_MODE_RESP))
+#define        TAPI_CS_POWER_PHONE_POWER_ON_OFF                (TAPI_CS_INTERNAL|(TAPI_CS_POWER_EVENT_MAX + 1))
+#define        TAPI_CS_POWER_REBOOT                                    (TAPI_CS_INTERNAL|(TAPI_CS_POWER_EVENT_MAX + 2))
+#define        TAPI_CS_POWER_RAMDUMP                                   (TAPI_CS_INTERNAL|(TAPI_CS_POWER_EVENT_MAX + 3))
+
+// Power Service
+#define        TAPI_CS_CFG_DEFAULTCONFGURATION_EXE             (TAPI_CS_INTERNAL|(TAPI_CFG_EVENT_DEFAULTCFG_IND))
+#define        TAPI_CS_CFG_GET_A_KEY                                   (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_A_KEY_CNF))
+#define        TAPI_CS_CFG_VERIFY_A_KEY                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_VERIFY_A_KEY_CNF))
+#define        TAPI_CS_CFG_GET_MSL_INFO                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_MSL_INFO_CNF))
+#define        TAPI_CS_CFG_SET_VOCODER_OPTION                  (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF))
+#define        TAPI_CS_CFG_GET_VOCODER_OPTION                  (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF))
+#define        TAPI_CS_CFG_SET_HIDDEN_MENU_ACCESS              (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF))
+#define        TAPI_CS_CFG_GET_HIDDEN_MENU_ACCESS              (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF))
+#define        TAPI_CS_CFG_SET_CURRENT_CARRIER                 (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF))
+#define        TAPI_CS_CFG_GET_CURRENT_CARRIER                 (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF))
+#define        TAPI_CS_CFG_SET_SIO_MODE                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_SET_SIO_MODE_CNF))
+#define        TAPI_CS_CFG_GET_SIO_MODE                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_SIO_MODE_CNF))
+#define        TAPI_CS_CFG_GET_ACTIVATION_DATE                 (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF))
+#define        TAPI_CS_CFG_GET_RECONDITIONED_DATE              (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF))
+#define        TAPI_CS_CFG_SET_TTY_MODE                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_SET_TTY_MODE_CNF))
+#define        TAPI_CS_CFG_GET_TTY_MODE                                (TAPI_CS_INTERNAL|(TAPI_EVENT_CFG_GET_TTY_MODE_CNF))
+
+// Omadm Service
+#define        TAPI_CS_OMADM_PRL_SIZE_GET                              (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_PRL_SIZE_GET_CNF))
+#define        TAPI_CS_OMADM_MODEL_NAME_GET                    (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_MODEL_NAME_GET_CNF))
+#define        TAPI_CS_OMADM_OEM_NAME_GET                              (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_OEM_NAME_GET_CNF))
+#define        TAPI_CS_OMADM_SW_VER_GET                                (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_SW_VERSION_GET_CNF))
+#define        TAPI_CS_OMADM_PRL_READ_GET                              (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_PRL_READ_GET_CNF))
+#define        TAPI_CS_OMADM_PRL_WRITE_SET                             (TAPI_CS_INTERNAL|(TAPI_EVENT_OMADM_PRL_WRITE_SET_CNF))
+
+// Svc Service
+#define        TAPI_CS_SVCMODE_EVENT_MAX                               (TAPI_CS_INTERNAL|(TAPI_EVENT_SVCMODE_DEVICE_TEST_NOTI))
+#define        TAPI_CS_SVCMODE_ENTERSVCMODE                    (TAPI_CS_INTERNAL|(TAPI_EVENT_SVCMODE_START_NOTI))
+#define        TAPI_CS_SVCMODE_ENDSVCMODE                              (TAPI_CS_INTERNAL|(TAPI_EVENT_SVCMODE_END_NOTI))
+#define        TAPI_CS_SVCMODE_PROCESS_KEYCODE                 (TAPI_CS_INTERNAL|(TAPI_EVENT_SVCMODE_CNF_MAX + 1))
+#define        TAPI_CS_SVCMODE_DEBUG_DUMP                              (TAPI_CS_INTERNAL|(TAPI_EVENT_SVCMODE_DEBUG_DUMP_CNF))
+#define        TAPI_CS_IMEI_COMPARE_ITEM_IND                   (TAPI_CS_INTERNAL|(TAPI_EVENT_IMEI_COMPAREITEM))
+#define        TAPI_CS_IMEI_STARTFACTORYPROCESS                (TAPI_CS_INTERNAL|(TAPI_EVENT_IMEI_CMLA_IND))
+
+#define TAPI_CS_FACTORY_OMISSION_AVOIDANCE_SET (TAPI_CS_INTERNAL|(TAPI_EVENT_FACTORY_OMISSION_AVOIDANCE_SET_CNF))
+#define TAPI_CS_FACTORY_OMISSION_AVOIDANCE_GET (TAPI_CS_INTERNAL|(TAPI_EVENT_FACTORY_OMISSION_AVOIDANCE_GET_CNF))
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_TEL_CS_CONN_H_ */
+
diff --git a/include/porting/tel_marshaler.h b/include/porting/tel_marshaler.h
new file mode 100644 (file)
index 0000000..48034e1
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 __g_cclosure_user_marshal_MARSHAL_H__
+#define __g_cclosure_user_marshal_MARSHAL_H__
+
+#include       <glib-object.h>
+
+G_BEGIN_DECLS
+
+/* VOID:INT,STRING (mashal.in:1) */
+extern void g_cclosure_user_marshal_VOID__INT_STRING (GClosure     *closure,
+                                                      GValue       *return_value,
+                                                      guint         n_param_values,
+                                                      const GValue *param_values,
+                                                      gpointer      invocation_hint,
+                                                      gpointer      marshal_data);
+
+/* VOID:INT,INT,INT,STRING (mashal.in:2) */
+extern void g_cclosure_user_marshal_VOID__INT_INT_INT_STRING (GClosure     *closure,
+                                                              GValue       *return_value,
+                                                              guint         n_param_values,
+                                                              const GValue *param_values,
+                                                              gpointer      invocation_hint,
+                                                              gpointer      marshal_data);
+
+/* VOID:INT,INT,INT,INT,STRING (mashal.in:3) */
+extern void g_cclosure_user_marshal_VOID__INT_INT_INT_INT_STRING (GClosure     *closure,
+                                                                  GValue       *return_value,
+                                                                  guint         n_param_values,
+                                                                  const GValue *param_values,
+                                                                  gpointer      invocation_hint,
+                                                                  gpointer      marshal_data);
+
+G_END_DECLS
+
+#endif /* __g_cclosure_user_marshal_MARSHAL_H__ */
+
diff --git a/include/tapi/.gitignore b/include/tapi/.gitignore
new file mode 100644 (file)
index 0000000..3c5a81e
--- /dev/null
@@ -0,0 +1 @@
+tapi-lib-proxy.h
diff --git a/include/tapi/ITapiCall.h b/include/tapi/ITapiCall.h
new file mode 100644 (file)
index 0000000..2b0313c
--- /dev/null
@@ -0,0 +1,1878 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup TAPI_CALL       CALL
+ * @{
+ *
+ * @file ITapiCall.h
+ *
+ * Call APIs allow an application to accomplish the following services: @n
+ * - Make a mobile originated Emergency call, Voice call, or Video call. @n
+ * - Accept or Reject incoming calls. @n
+ * - Release Calls. @n
+ * - Call dependent supplementary services such as call hold, retrieve, DTMF. @n
+ * - Multi -party call management, setup conference call, split conference call. @n
+ * - Call information such as get call information, get line identification number. @n
+ * - To verify whether a call (voice / video ) is possible at any given time. @n
+ */
+
+#ifndef _ITAPI_CALL_H_
+#define _ITAPI_CALL_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelCall.h>
+#include <TelUtility.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+ /**
+ * @brief  This function originates MO call setup. This is an asynchronous function. The function completes immediately and
+ * call setup proceeds in background.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -  If call to tel_exe_call_mo() is successful, call handle and request ID are assigned by Telephony Server
+ *     and returned to client by given Call Handle and Request Id parameters. MO call setup continues in
+ *     background. There are multiple states involved in the call setup procedure. Upon request completion
+ *     successful or not, various event notifications are sent to client along with data associated with event
+ *     (Successful data or error information) based on the indication or response received at the Telephony Server.
+ * -  Setting up Emergency call
+ *     - when #TelCallType_t  is voice_call, voice call is setup unless dial_number parameter is an
+ *     emergency number known to telephony FW (like 112 for all 2G and above, other numbers may operator
+ *     specific or device configuration specific, so Telephony FW will read relevant SIM files and refer to internal
+ *     configuration records). If an emergency number is passed and #TelCallType_t  is voice_call, Telephony
+ *     FW shall setup emergency phone call.
+ *     - When #TelCallType_t  is emergency call, emergency call is always set up.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ * @param[in] pParams
+ * - #TelCallSetupParams_t contains the CallType(whether it is a voice call or data call etc) and number.
+ *
+ * @param[out] pCallHandle
+ * - Unique handle for referring the call
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * TAPI_EVENT_CALL_SETUP_CNF is sent to the application when the lower layers get the call originate response.
+ * Asynchronous return status is indicated by #TelCallCause_t and call handle is sent in the event data.
+ * Various asynchronous indications are described in the unsolicited notifications section . [Refer, \ref page8]
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_answer_call tel_release_call
+ * \image html CallSetup.jpg
+ * \image latex CallSetup.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status =0;
+ * unsigned int  pCallHandle;
+ * int pRequestID=0;
+ * TelCallSetupParams_t pParams;
+ *
+ * char normal[16] = "1234";//Called party number
+ * memset(&pParams, 0, sizeof(TelCallSetupParams_t));
+ * pParams.CallType = TAPI_CALL_TYPE_VOICE;
+ * strcpy(pParams.szNumber,normal);
+ *
+ * ret_status = tel_exe_call_mo (&pParams,&pCallHandle,&pRequestID); // outgoing call
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_exe_call_mo(const TelCallSetupParams_t *pParams,  unsigned int  *pCallHandle,  int * pRequestId);
+
+ /**
+ * @brief This function is used to answer the incoming call by accepting or rejecting the call.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ * @param[in] CallHandle
+ * - This is the unique handle for referring the call. This call handle is available to Application through incoming call
+ *   (TAPI_EVENT_CALL_INCOM_IND) event.
+ *
+ * @param[in] AnsType
+ * - Answer type - accept / reject / replace / hold and accept. but, for CDMA, only accept is allowed.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_ANSWER_CNF. Asynchronous return status is
+ *    indicated by #TelCallCause_t and call handle is sent in the event data.
+ * - TAPI_EVENT_CALL_CONNECTED_IND / TAPI_EVENT_CALL_END_IND event will be notified in case of call is accepted/rejected.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Call associated with call handle should be TAPI_CALL_STATE_INCOM state otherwise the API fails and there can be a
+ *     maximum of 1 existing call.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_release_call
+ *
+ * \image html CallIncoming.jpg
+ * \image latex CallIncoming.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int  ret_status ;
+ * unsigned int  pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_answer_call (pCallHandle,&pRequestID); // call answer
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_answer_call(unsigned int CallHandle, TelCallAnswerType_t AnsType, int * pRequestId);
+
+ /**
+ *
+ * @brief This function releases the call identified by Call Handle irrespective of call is hold or active state.
+ * It is used when releasing specific active call in multiparty call.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - In case of MPTY Call handle, Call end event is returned for each call in MPTY.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface
+ *
+ * @param[in] CallHandle
+ * - Unique handle for referring the call.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_RELEASE_CNF and Asynchronous return status
+ *    is indicated by #TelCallCause_t and call handle for the released call is sent in the event data..
+ *
+ * - The event TAPI_EVENT_CALL_END_IND_IND is received as final asynchronous response and the associated data is #TelCallEndInfo_t.
+ *    Asynchronous return status is indicated by #TelCallCause_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Call handle should be valid and there should be an existing call in Active/hold state.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_exe_call_mo tel_answer_call tel_release_call_all tel_release_call_all_active
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_release_call(pCallHandle,&pRequestID); // call release
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_release_call(unsigned int  CallHandle, int * pRequestId);
+
+ /**
+ *
+ * @brief This function releases the all the calls irrespective of the call is hold or active state. Due to this API request,
+ *        lower layers will release the call and END Indication Event will be sent to all the Applications.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - This asynchronous event is received for each call getting released.The event associated with this request is
+ *    TAPI_EVENT_CALL_END_IND_IND and the associated data is #TelCallEndInfo_t. There will be no request id present associated
+ *    with this TAPI_EVENT_CALL_END_IND_IND when this API is called.
+ *    Once all the calls are released, Telephony server will indicate application through TAPI Library by sending
+ *    TAPI_EVENT_CALL_RELEASE_ALL_CNF. Asynchronous return status is indicated by #TelCallCause_t and there is no
+ *    associated event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status;
+ * int pRequestID;
+ *
+ * ret_status = tel_release_call_all(&pRequestID); // release call all
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_release_call_all (int * pRequestId);
+
+ /**
+ *
+ * @brief This function releases the all activate call. Due to this API request,
+ *          lower layers will release the call and END Indication Event will be sent to all the Applications.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *  - None.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status;
+ * int pRequestID;
+ *
+ * ret_status = tel_release_call_all_active(&pRequestID); // release all active call
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_release_call_all_active(int *pRequestId);
+
+ /**
+ *
+ * @brief This function releases the all held call. Due to this API request,
+ *          lower layers will release the call and END Indication Event will be sent to all the Applications.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *  - None.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status;
+ * int pRequestID;
+ *
+ * ret_status = tel_release_call_all_held(&pRequestID); // release all held call
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+ int tel_release_call_all_held(int * pRequestId);
+
+ /**
+ *
+ * @brief This function puts the given call on hold. The call identified by Call Handle should be in active state.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - Call duration for the call will be calculated from the time call has been connected until call is released,
+ *    i.e. Time duration during the call on hold will also be counted.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_HOLD_CNF. Asynchronous return status is
+ *    indicated by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - The call identified by the Call Handle should be in active state.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;//HANDLE OF AN ACTIVE CALL
+ * int pRequestID=0;
+ *
+ * ret_status = tel_hold_call(pCallHandle,&pRequestID); // hold call
+ * @endcode
+ *
+ *
+ * @see tel_retrieve_call
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_hold_call(unsigned int CallHandle, int * pRequestId);
+
+ /**
+ *
+ * @brief This function retrieves the held call. The call identified by Call Handle must be in held state.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - Call duration for the call will be calculated from the moment call has been connected until call is released.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ * - None.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_RETRIEVE_CNF. Asynchronous return status is indicated
+ *    by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Call should be in held state in order to retrieve into active state and no active call present.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_retrieve_call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;//held call handle
+ * int pRequestID=0;
+ *
+ * ret_status = tel_retrieve_call(pCallHandle,&pRequestID); // retrieve call
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_retrieve_call(unsigned int CallHandle, int * pRequestId);
+
+ /**
+ *
+ * @brief Swap calls. This is only for calls you dialed or answered with Telephony.
+ *  Swap is only available for the voice calls.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * During a call, user can place all active calls and accepts the other held call with this function.
+ * If the terminal is not within a call, it will fail.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ * @param[in] CallHandle1
+ *  - This is active call
+ *
+ * @param[in] CallHandle2
+ *  - This is Held call
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle1;
+ * unsigned int  pCallHandle2;
+ * int pRequestID=0;
+ *
+ * ret_status = tel_swap_call(pCallHandle1, pCallHandle2,&pRequestID); // swap call
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_swap_call(unsigned int CallHandle1, unsigned int CallHandle2, int * pRequestId);
+
+ /**
+ *
+ * @brief This function sends one or more DTMF digits during the call.
+ *
+ * @par Notes:
+ * DTMF is abbreviation of Dual-tone-multi-frequency. It is used for telecommunication signaling
+ * over telephone lines in the voice-frequency band between UE and other communications devices.
+ * For example UE send DTMF tone to a server to choose options which the server provides.
+ * If the UE is not within a call, this function will fail with error code. *
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  -There will be a single asynchronous notification for all the DTMF digits sent. If the users of this API need an asynchronous
+ *    response for each DTMF digit then User has to call this API multiple times passing each single DTMF digit in pDtmfString.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] pDtmfString
+ *  - A Null terminated DTMF string to be sent from MS.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SEND_DTMF_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t and call handle is sent in the event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Active call should be present.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ * \image html CallDtmf.jpg
+ * \image latex CallDtmf.jpg
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;
+ * int pRequestID=0;
+ * char DtmfString[10] = {0, };
+ * strcpy(DtmfString, "123456789");//Sample DTMF digits that need to be sent
+ * ret_status= tel_send_call_dtmf(DtmfString,&pRequestID);
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_send_call_dtmf(const char *pDtmfString, int * pRequestId);
+
+ /**
+ *
+ * @brief This function joins the given two calls (one call in active conversation state and other call in held state) into conference.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - Call handle of an active call or held call will be made as MPTY-id, and the other call handle will join in a conference).
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle1
+ *  - The unique handle can be either an active call or held call.
+ *
+ * @param[in] CallHandle2
+ *  - Unique call handle.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SETUPCONFERENCE_CNF. Asynchronous return
+ *    status is indicated by #TelCallCause_t and call handle of the MPTY call is sent in the event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - For a Multiparty call or for joining two calls into conference, there should be one call in active state and another call
+ *    in held state.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_split_call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle1;
+ * unsigned int  pCallHandle2;
+ * int pRequestID=0;
+ *
+ * ret_status= tel_join_call(pCallHandle1, pCallHandle2,&pRequestID); // call join
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ *
+ *
+ */
+ int tel_join_call(unsigned int CallHandle1, unsigned int CallHandle2, int * pRequestId);
+
+ /**
+ *
+ * @brief This function triggers to splits a private call from multiparty call. This API allows creating a private communication
+ *          with one of remote parties in a multiparty session. TAPI client application has to pass the call handle which needs
+ *          to split from the multiparty call.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - The list of call handles present in the conference call is retrieved using #tel_get_call_conf_list API
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Handle of call to be made private. Call handle referring to the call that is to be split from the conference
+ *     (call to be made private).
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SPLITCONFERENCE_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t and call handle for the split call is sent in the event data.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Call should be in multiparty conference call.
+ *
+ * @post
+ *  - Split call will be the active call and the conference will be held call.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_join _call
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;
+ * int pRequestID=0;
+ *
+ * ret_status= tel_split_call(pCallHandle,&pRequestID); // call split
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ *
+ *
+ */
+ int tel_split_call(unsigned int CallHandle, int * pRequestId);
+
+ /**
+ *
+ * @brief Get the current calling line identification number.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * If the USIM card has multiple number, an user can choose which number he use.
+ * For example, a line is for private, the other line is for business.
+ * Using this function, user can get information about which line is currently active.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  NONE
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ * @param [out] ptr_active_line
+ *    current active line id.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_set_call_act_line
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int  pRequestID=0;
+ * ret_status= tel_get_call_act_line(&pRequestID); // get call active line
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_act_line( int * pRequestId);
+
+ /**
+ *
+ * @brief Set the current calling line identification number.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  NONE
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] active_line
+ *  - calling line identification
+ *
+ * @param[out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see tel_get_call_act_line
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * TelCallActiveLine_t g_curLine =TAPI_CALL_ACTIVE_LINE1;
+ * TelCallActiveLine_t active_line ;
+ * int  pRequestID=0;
+ *
+ * ret_status = tel_set_call_act_line (g_curLine,&pRequestID); // set call active line
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_set_call_act_line(TelCallActiveLine_t active_line, int * pRequestId);
+
+ /**
+ *
+ * @brief This function triggers to do an explicit call transfer by connecting the two parties where in one party being
+ *          active (active state) and another party being held (held state).
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Notes:
+ * The ECT supplementary service enables the served mobile subscriber (subscriber A) who has two calls ,
+ * each of which can be an incoming or outgoing call, to connect the other parties in the two calls
+ * and release the served mobile subscribers own connection.
+ * Prior to transfer, the connection shall have been established on the call
+ * between subscriber A and subscriber B. On the call between subscriber A and subscriber C,
+ * either the connection shall have been established prior to transfer, or, as a network option,
+ * transfer can occur while subscriber C is being informed of the call
+ * (i.e. the connection has not yet been established.)
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *  - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Call handle of an active call.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_TRANSFER_CNF. Asynchronous return status is
+ *    indicated by #TelCallCause_t and call handle is sent in the event data. Call handle in event data is active
+ *    call handle which is used in the #tel_exe_call_explicit_transfer request.
+ *
+ * @pre
+ *  - In order to call transfer, Served mobile subscriber should have 2 calls in one in active state and another one Call
+ *    in Held state.
+ *
+ * @post
+ *  - When the request has been completed successfully, Call end indication will be sent to both the calls (active and held).
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @see None.
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int  pCallHandle;//active call
+ * int pRequestID=0;
+ *
+ * ret_status= tel_exe_call_explicit_transfer (pCallHandle,&pRequestID); // explicit transfer
+ * @endcode
+ *
+ * @remarks
+ * -None
+ *
+ *
+ */
+ int tel_exe_call_explicit_transfer(unsigned int CallHandle, int * pRequestId);
+
+
+/**
+ *
+ * @brief This function gets status for the current call identified by Call Handle whenever application wants the call status. Call handle must be valid.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pCallStatus
+ *   - Call status information like destination number, call direction (MO or MT), call type (voice or data etc), whether
+ *      the call is in conference state or not, present call state etc are returned through this parameter.
+ *
+ * @par Async Response Message:
+ *   - None.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int  ret_status ;
+ * unsigned int CallHandle;
+ * TelCallStatus_t     callStatus;
+ *
+ * ret_status= tel_get_call_status(CallHandle,&callStatus); // get call status info
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+
+ int tel_get_call_status(unsigned int CallHandle, TelCallStatus_t * pCallStatus) ;
+
+
+ /**
+ *
+ * @brief This function gets duration of the given call. This is a synchronous function. Duration is accounted from the moment
+ *          the connection is established, i.e. call goes into active state for first time.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pDurationInSecs
+ *   - The total call duration in seconds from the call connecting time to the present time is returned through this parameter.
+ *
+ * @par Async Response Message:
+ *  - None.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int CallHandle;
+ * unsigned int duration;
+ *
+ * ret_status= tel_get_call_duration(CallHandle,&duration); // get call duration
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_duration(unsigned int CallHandle, unsigned int * pDurationInSecs) ;
+
+ /**
+  * \breif Deflect the incoming call to other subscriber
+  *
+  * If informed about an incoming call this call may be redirected to an another destination by
+  * entering the destination Number. The cleint spcifies the dstiantion number to which the current
+  * incoming call needs to be redirected is specifed via info argument.
+  *
+  *
+  * @par Sync (or) Async:
+  * This is an Asynchronous API.
+  *
+  * @par Important Notes:
+  *  - None.
+  *
+  * @warning
+  * Do not use this function. This function is dedicated to the embedded call application only.
+  * Please use its AUL interface instead of this.
+  *
+  * @param[in] CallHandle
+  *  - This is incoming call handle
+  *
+  * @param[out] deflect_info
+  *  - Destination Number
+  *
+  * @param [out] pRequestID
+  *   - Unique identifier for a particular request.
+  *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+  *
+  * @par Async Response Message:
+  * -
+  *
+  * @pre
+  *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+  *  - Register caller's application name with #tel_register_app_name
+  *  - Register telephony events to listen
+  *  - A event loop is running to listen events
+  *
+  * @post
+  *  - None.
+  *
+  * @return Return Type (int) \n
+  * - 0 indicating that the operation has completed successfully. \n
+  * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+  *
+  * @par Prospective Clients:
+  * Embedded call application
+  *
+  * @remarks
+  * - None
+  *
+  * @code
+  * #include <ITapiCall.h>
+  * #include <TelCall.h>
+  *
+  * unsigned int call_handle;
+  * TelCallDeflectDstInfo_t deflect_info;
+  * int req_id;
+  *
+  * tel_deflect_call( call_handel, &deflect_info, req_id); // call deflect
+  *
+  * @endcode
+  *
+  * @see None.
+  *
+  * @remarks
+  * - None
+  *
+  */
+ int tel_deflect_call(unsigned int CallHandle, const TelCallDeflectDstInfo_t *deflect_info, int *pRequestID);
+
+
+  /**
+  *
+  * @brief Activate Call Completion to a Busy Subscriber.
+  *
+  * @par Notes:
+  * When subscriber A encounters a Network Determined User Busy (NDUB) destination B,
+  * subscriber A can request the CCBS supplementary service (i.e. activate a CCBS Request against destination B).
+  * The network will then monitor the wanted destination B for becoming idle.
+  * When the wanted destination B becomes idle, then the network will wait a short time
+  * in order to allow destination B to make an outgoing call.
+  * If destination B does not make any outgoing call within this time,
+  * then the network shall automatically recall subscriber A.
+  * When subscriber A accepts the CCBS recall, within a defined time, then the network will automatically
+  * generate a CCBS call to destination B.
+  *
+  * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+  * However it just means that the API request has been transfered to the CP successfully.
+  * The actual operation result is being delivered in the corresponding event asynchronously.
+  *
+  * @par Sync (or) Async:
+  * This is an Asynchronous API.
+  *
+  * @par Important Notes:
+  *   - None.
+  *
+  * @warning
+  * Do not use this function. This function is dedicated to the embedded call application only.
+  * Please use its AUL interface instead of this.
+  *
+  * @param [in] CallHandle
+  *  - Handle of the call.
+  *
+  * @param [out] pRequestID
+  *   - Unique identifier for a particular request.
+  *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+  *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+  *
+  * @par Async Response Message:
+  * -
+  *
+  * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+  *
+  * @post
+  *  - None.
+  *
+  * @return Return Type (int) \n
+  * - 0 - indicating that the operation has completed successfully. \n
+  * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+  *
+  * @par Prospective Clients:
+  * Embedded call application
+  *
+  * @code
+  * #include <ITapiCall.h>
+  *
+  * int ret;
+  * unsigned int call_handle;
+  * int req_id;
+  *
+  * ret = tel_activate_call_ccbs( call_handle, &req_id ); // ccbs activate
+  * @endcode
+  *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+  */
+ int tel_activate_call_ccbs(unsigned int CallHandle, int * pRequestID);
+
+
+ /**
+ * @brief This is a synchronous function returns all call handles within the given conference call.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - Call should be a Multi-party conference call in order to return actual no of calls and call handles in the conference calls.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Handle of call which is associated with the conference.
+ *
+ * @param [out] pCallList
+ *   - list of call joined in the conference call. In case there is no active conference. The list will be zero and
+ *      number of calls parameter value will also be zero. Maximum number of calls in a conference can be up to 5
+ *      (Based on 3GPP TS 22.084). Memory allocation for call list is integer array of size 5.
+ *
+ * @param [out] pNoOfCalls
+ *   - Number of the calls present in conference.
+ *
+ * @par Async Response Message:
+ *  -None.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  -None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status ;
+ * unsigned int CallHandle;
+ * unsigned int  callList[5];
+ * int  noOfCalls;
+ *
+ * ret_status= tel_get_call_conf_list(CallHandle, callList, &noOfCalls); // get conference call list
+ * @endcode
+ *
+ * @see tel_join_call
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_conf_list (unsigned int CallHandle, const unsigned int * pCallList, int * pNoOfCalls);
+
+
+ /**
+ *
+ * @brief This function gets voice privacy option mode in phone(CDMA only).
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] PrivacyType
+ * - Privacy Type.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF. Asynchronous return status
+ *   is indicated by #TelCallCause_t. #TelCallPrivacyMode_t is included in this event.
+ *
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * Int ReqId=-1;
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallPrivacyType_t privacyType;
+ * privacyType=TAPI_CALL_PRIVACY_TYPE_MS;
+ * ret_status =tel_get_call_privacy_mode (privacyType,&req_id); // get call privacy_mode
+ * @endcode
+ *
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_privacy_mode(TelCallPrivacyType_t PrivacyType, int * pRequestID);
+
+
+ /**
+ *
+ * @brief This function sets voice privacy option mode in phone. It is available only where call exists(CDMA only).
+ *
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] PrivacyInfo
+ * - voice privacy option mode(ENHANCED or STANDARD)
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ *
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ReqId=-1;
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallPrivacyMode_t pPrivacyMode_info={0,};
+ * pPrivacyMode_info = TAPI_CALL_PRIVACY_MODE_STANDARD;
+ *
+ * ret_status = tel_set_call_privacy_mode (pPrivacyMode_info,&reqId); // set call privacy mode
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_set_call_privacy_mode(TelCallVoicePrivacyInfo_t PrivacyInfo, int * pRequestID);
+
+
+/**
+ *
+ * @brief This function requests to send a Flash with Information Message(CDMA only).
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] pDialNumber
+ * - this is the calling number for 3 way call. But in the call waiting, this param should be NULL.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_FLASHINFO_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status = -1;
+ * int api_err;
+ * char const * const pDialNumber = "9999900000";
+ * ret_status = tel_exe_call_flash_info(pDialNumber,&reqId); // call flash info
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_exe_call_flash_info(const char *pDialNumber, int * pRequestID);
+
+
+/**
+ *
+ * @brief This function requests to exit emergency call mode(CDMA only).
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ * @param[out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ * @pre
+ *  - current state is emergency callback mode.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int req_id;
+ * int ret;
+ *
+ * ret = tel_exit_call_emergency_mode ( &req_id ); // emergency call
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_exit_call_emergency_mode(int * pRequestID);
+
+
+/**
+ *
+ * @brief This function is used for querying the information about a call time and call count.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ * Please use its AUL interface instead of this.
+ *
+ *
+ * @param[in] req_mask
+ * - call time request type mask.
+ *
+ * @param[out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_GET_CALL_TIME_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embedded call application
+ *
+ * @code
+ * #include <ITapiCall.h>
+ *
+ * int ret_status = -1;
+ * int api_err;
+ * TelCallTimeMaskType_t mask_byte1 = {0,};
+ * TelCallTimeMaskType_t  mask_byte2 = {0,};
+ * unsigned short mask_type;
+ * mask_byte1 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_CNT;  //masking call type
+ * mask_byte2 = TAPI_CALL_TIME_TYPE_TOTAL_CALL_TIME;
+ *
+ * mask_type = mask_byte1;
+ * mask_type << 8;
+ * mask_type = mask_byte2;
+ *
+ * ret_status = tel_get_call_time(mask_type,&reqId);
+ *
+ * @endcode
+ *
+ * @see None.
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ int tel_get_call_time(unsigned short req_mask, int * pRequestID);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_CALL_H_ */
+
+ /**
+* @}
+*/
+
diff --git a/include/tapi/ITapiCfg.h b/include/tapi/ITapiCfg.h
new file mode 100644 (file)
index 0000000..fea046f
--- /dev/null
@@ -0,0 +1,713 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup CFG_TAPI        CFG
+ * @{
+ *
+ * CFG APIs allow an application to accomplish the following services: @n
+ * - set or get modem configuration. @n
+ */
+
+#ifndef _ITAPI_CFG_H_
+#define _ITAPI_CFG_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelErr.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_CFG_A_KEY_DIGITS_MAX                      26      /**< Maximum length of A-Key Digits */
+#define TAPI_CFG_MSL_CODE_MAX                          6       /**< Maximum length of MSL codes */
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/* DEFAULT_MODE field */
+typedef enum {
+       TAPI_CFG_DEFAULT_FULL = 0x01, /* 0x01 : Full reset */
+       TAPI_CFG_DEFAULT_FACTORY, /* 0x02 : Factory reset */
+       TAPI_CFG_DEFAULT_SERVICE, /* 0x03 : Service reset */
+       TAPI_CFG_DEFAULT_CUSTOM, /* 0x04 : Custom reset */
+       TAPI_CFG_DEFAULT_MODE_MAX
+} TelDefaultCfg_t;
+
+/**
+ * @enum TelCfgAKeyVerifyResult_t
+ *  This enumeration defines the results for verification of A-Key.
+ */
+typedef enum {
+       TAPI_CFG_AKEY_VERIFY_FAIL = 0x00, /**< A-Key verify fail */
+       TAPI_CFG_AKEY_VERIFY_OK /**< A-Key verify success */
+} TelCfgAKeyVerifyResult_t;
+
+/**
+ * @enum TelCfgOtkslFlag_t
+ *  This enumeration defines OTKSL(One Time Key Subsidy Lock) flag.
+ */
+typedef enum {
+       TAPI_CFG_OTKSL_FLAG_OFF = 0x00, /**< otksl flag off */
+       TAPI_CFG_OTKSL_FLAG_ON /**< otksl flag on */
+} TelCfgOtkslFlag_t;
+
+/**
+ * @enum TelCfgVocOption_t
+ *  This enumeration defines vocoder option.
+ */
+typedef enum {
+       TAPI_CFG_VOC_OPTION_DEFAULT = 0x00, /**< vocoder option is default */
+       TAPI_CFG_VOC_OPTION_EVRC, /**< vocoder option is evrc */
+       TAPI_CFG_VOC_OPTION_13K, /**< vocoder option is 13k */
+       TAPI_CFG_VOC_OPTION_8K, /**< vocoder option is 8k */
+       TAPI_CFG_VOC_OPTION_RESERVED /**< vocoder option is reserved */
+} TelCfgVocOption_t;
+
+/**
+ * @enum TelCfgHiddenMenuAccessType_t
+ *  This enumeration defines hidden menu access type.
+ */
+typedef enum {
+       TAPI_CFG_HIDDEN_MENU_DISABLE = 0x00, /**< hidden menu disabled */
+       TAPI_CFG_HIDDEN_MENU_ENABLE /**< hidden menu enabled */
+} TelCfgHiddenMenuAccessType_t;
+
+/**
+ * @enum TelCfgCurrentCarrier_t
+ *  This enumeration defines current carrier code.
+ */
+typedef enum {
+       TAPI_CFG_CARRIER_TEST = 0x00,   /**< TEST */
+       TAPI_CFG_CARRIER_SKT,                   /**< SKT */
+       TAPI_CFG_CARRIER_KTF,                   /**< KTF */
+       TAPI_CFG_CARRIER_LGT,                   /**< LGT */
+       TAPI_CFG_CARRIER_VERIZON,               /**< VERIZON */
+       TAPI_CFG_CARRIER_SPRINT,                /**< SPRINT */
+       TAPI_CFG_CARRIER_ALLTEL,                /**< ALLTEL */
+       TAPI_CFG_CARRIER_TELUS,                 /**< TELUS */
+       TAPI_CFG_CARRIER_BMC,                   /**< BMC */
+       TAPI_CFG_CARRIER_ALIANT,                /**< ALIANT */
+       TAPI_CFG_CARRIER_SASKTEL,               /**< SASKTEL */
+       TAPI_CFG_CARRIER_MTS,                   /**< MTS */
+} TelCfgCurrentCarrier_t;
+
+/**
+ * @enum TelCfgSIOMode_t
+ *  This enumeration defines a SIO mode.
+ */
+typedef enum {
+       TAPI_CFG_SIO_U1_DIAG_USB2_GPS = 0x00, /**< U1_DIAG_USB2_GPS */
+       TAPI_CFG_SIO_U1_HFK_USB2_GPS, /**< U1_HFK_USB2_GPS */
+       TAPI_CFG_SIO_U1_HFK_USB2_DIAG /**< U1_HFK_USB2_DIAG */
+} TelCfgSIOMode_t;
+
+/**
+ * @enum TelCfgUSBPath_t
+ *  This enumeration defines a USB path.
+ */
+typedef enum {
+       TAPI_CFG_USB_PATH_TO_PDA = 0x00, /**< 0x00 : PDA uses USB */
+       TAPI_CFG_USB_PATH_TO_PHONE /**< 0x01 : Phone uses USB */
+} TelCfgUSBPath_t;
+
+/**
+ * @enum TelCfgTTYMode_t
+ *  This enumeration defines a TTY mode
+ */
+typedef enum {
+       TAPI_CFG_TTY_MODE_DISABLE = 0x00, /**< 0x00 : TTY mode off */
+       TAPI_CFG_TTY_MODE_ENABLE_TALK, /**< 0x01 : TTY mode talk */
+       TAPI_CFG_TTY_MODE_ENABLE_HEAR, /**< 0x01 : TTY mode hear */
+       TAPI_CFG_TTY_MODE_ENABLE_FULL /**< 0x01 : TTY mode full */
+} TelCfgTTYMode_t;
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * This structure contains A-Key information.
+ */
+typedef struct {
+       char A_key[TAPI_CFG_A_KEY_DIGITS_MAX + 1]; /**< A-Key */
+} TelCfgAKeyInfo_t;
+
+/**
+ * This structure contains MSL information.
+ */
+typedef struct {
+       char MslCode[TAPI_CFG_MSL_CODE_MAX+1]; /**< MSL(Master Subsidy Lock) code */
+       char OtkslCode[TAPI_CFG_MSL_CODE_MAX+1]; /**< OTKSL(One Time Key Subsidy Lock) code */
+       int bOtksl_flag; /**< default is FALSE. Whenever the one time key is used , it can be changed to TRUE*/
+} TelCfgMSLInfo_t;
+
+/**
+ * This structure contains activation date information.
+ */
+typedef struct {
+       unsigned short year; /**< Year (actual year - 1980) */
+       unsigned char month; /**< Month (1 ~ 12) */
+       unsigned char day; /**< Day (1 ~ 31) */
+       unsigned char hour; /**< Hour (0 ~ 23) */
+       unsigned char minute; /**< Minute (0 ~ 59) */
+       unsigned char second; /**< Second (0 ~ 59) */
+} TelCfgActivationDateInfo_t;
+
+/**
+ * This structure contains reconditioned date information.
+ */
+typedef struct {
+       unsigned char status; /**< Reconditioned Status (0x00 : NO, 0x01 : YES) */
+       unsigned short year; /**< Year (actual year - 1980) */
+       unsigned char month; /**< Month (1 ~ 12) */
+       unsigned char day; /**< Day (1 ~ 31) */
+       unsigned char hour; /**< Hour (0 ~ 23) */
+       unsigned char minute; /**< Minute (0 ~ 59) */
+       unsigned char second; /**< Second (0 ~ 59) */
+} TelCfgReconditionedInfo_t;
+
+/*==================================================================================================
+  FUNCTION PROTOTYPES
+  ==================================================================================================*/
+
+/**
+ * @brief  This function is used to set Modem default configuration,
+ *           Telephony will send Get operation to modem to get the items from Modem.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] bType
+ * - type of default configuration
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_CFG_EVENT_DEFAULTCFG_IND  and the event data is default configuration mode.(Refer #TelDefaultCfg_t)
+ *    Asynchronous return status is always TAPI_API_SUCCESS.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ */
+int tel_set_cfg_default_configuration(TelDefaultCfg_t bType);
+
+/**
+ * @brief  This function is used to get A-Key.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - It can be used in NAM mode.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_CFG_GET_A_KEY_CNF. The event data is A-key.(Refer #TelCfgAKeyInfo_t)
+ *    Asynchronous return status is always TAPI_API_SUCCESS.
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_akey(void);
+
+/**
+ * @brief  it is used to verify A-Key.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - It can be used in NAM mode.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pAKey_info
+ * - A-Key info. Maximum length of A-Key digit is 26.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_VERIFY_A_KEY_CNF. The event data is verification result which is indicated success or not.(Refer #TelCfgAKeyVerifyResult_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_verify_cfg_akey( const TelCfgAKeyInfo_t* pAKey_info);
+
+/**
+ * @brief  It is used to get MSL and OTKSL(CDMA Only).
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - MSL is used to password in NAM mode.
+ * - MSL means Master subside Key code, which is the developer always enter the NAM mode using this code.
+ * - OTKSL means One time Key code, which is the carrier representative only enter the NAM mode one time using this code.
+ * - OTKSL_FLAG default value is false, whenever the one time key is used , it can be changed to TRUE.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_MSL_INFO_CNF. The event data is MSL information.(Refer #TelCfgMSLInfo_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ *
+ */
+int tel_get_cfg_msl_info(void);
+
+/**
+ * @brief  It is used to get vocoder option. (CDMA Only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - It can be used to need a current vocoder option in phone.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF. The event data is vocoder option.(Refer #TelCfgVocOption_t)
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_vocoder_option(void);
+
+/**
+ * @brief  It is used to set vocoder option. (CDMA Only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] option
+ * - vocoder option.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF. There is no event data.
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_set_cfg_vocoder_option(TelCfgVocOption_t option);
+
+/**
+ * @brief  It informs whether is possible or impossible to access hidden menu.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF. The event data is hidden menu access mode.(Refer #TelCfgHiddenMenuAccessType_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_hidden_menu_access(void);
+
+/**
+ * @brief  It is used to set whether to access hidden menu or not.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] type
+ * - hidden menu access type(disable or enable).
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF. There is no event data.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_set_cfg_hidden_menu_access(TelCfgHiddenMenuAccessType_t type);
+
+/**
+ * @brief  It requests a current carrier code.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - none.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF. The event data is type of current carrier.(Refer #TelCfgCurrentCarrier_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ *
+ */
+int tel_get_cfg_serving_carrier(void);
+
+/**
+ * @brief  It sets a current carrier code.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]  Carrier
+ * - current carrier.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF. There is no event data.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_set_cfg_serving_carrier(TelCfgCurrentCarrier_t Carrier);
+
+/**
+ * @brief  It requests a current SIO mode.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - none.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_SIO_MODE_CNF. The event data is sio mode.(Refer #TelCfgSIOMode_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_sio_mode(void);
+
+/**
+ * @brief  It sets a current SIO mode.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]   Mode
+ * - SIO mode.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_SET_SIO_MODE_CNF. There is no event data.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ *
+ *
+ */
+int tel_set_cfg_sio_mode(TelCfgSIOMode_t Mode);
+
+/**
+ * @brief  It requests activation date.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF. The event data is activated date of phone.(Refer #TelCfgActivationDateInfo_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_activated_date_of_phone(void);
+
+/**
+ * @brief  It requests reconditioned status and date.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF. The event is reconditioned date of phone.(Refer #TelCfgReconditionedInfo_t)
+ *
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ *
+ */
+int tel_get_cfg_reconditioned_data_of_phone(void);
+
+/**
+ * @brief  It requests to get tty(text telephone) mode.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_GET_TTY_MODE_CNF. The event data is tty mode.(Refer #TelCfgTTYMode_t)
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_get_cfg_tty_mode(void);
+
+/**
+ * @brief  It requests to set tty(text telephone) mode.(CDMA only)
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in]  Mode
+ * - TTY mode
+ *
+ * @param[out]
+ * - None
+ *
+ * @par Async Response Message:
+ *  - The event associated is TAPI_EVENT_CFG_SET_TTY_MODE_CNF. There is no event data.
+ *
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * - External Apps.
+ */
+int tel_set_cfg_tty_mode(TelCfgTTYMode_t Mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ITAPI_CFG_H_
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiData.h b/include/tapi/ITapiData.h
new file mode 100644 (file)
index 0000000..1f90704
--- /dev/null
@@ -0,0 +1,633 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup           TELEPHONY_API
+ * @addtogroup Data_Service Data Services
+ * @{
+ * @file ITapiData.h
+ *
+ * Data APIs allow an application to accomplish the following services: @n
+ * - process data pin control. @n
+ */
+
+#ifndef _ITAPI_DATA_H_
+#define _ITAPI_DATA_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelUtility.h>
+#include <TelData.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ *
+ * @brief  Request current MIP NAI index
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  pMipNaiIdx
+ * -  Mobile IP NAI Index.
+ *
+ * @param  [in]  pParamMask
+ * -  Parameter mask.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_mobile_ipnai(TelDataNAIIndex_t *pMipNaiIdx, unsigned short *pParamMask, int *pRequestID);
+
+/**
+ *
+ * @brief  Enable the NAI index by the IPC parameter and then set the detail values for NAI
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  pMipNaiParam
+ * -  Mobile IP NAI Parameters.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_mobile_ipnai(TelDataMipNaiParam_t *pMipNaiParam, int *pRequestID);
+
+/**
+ *
+ * @brief Get current NAI index which is now enabled.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_current_nai_index(int *pRequestID);
+
+/**
+ *
+ * @brief MS must report Data Cable(UART/USB/Blue tooth) attachment status whenever the status changed. PDA should reflect this status change on LCD.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_te2_status(int * pRequestID);
+
+/**
+ *
+ * @brief This API gets the roam guard.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_roam_guard(int *pRequestID);
+
+/**
+ *
+ * @brief This API sets a roam guard.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  pRoamGuard
+ * -  Roam guard.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_roam_guard(TelDataRoamGuardMode_t *pRoamGuard, int *pRequestID);
+
+/**
+ *
+ * @brief This API gets a modem NAI.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_nai(int *pRequestID);
+
+/**
+ *
+ * @brief This API sets a modem NAI.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  pModemNai
+ * -  Modem NAI.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_nai(TelDataModemNAIMode_t *pModemNai, int *pRequestID);
+
+/**
+ *
+ * @brief This API sets a data service type
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  pDSType
+ * -  Data service type
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_ds_type(TelDataDSType_t *pDSType, int *pRequestID);
+
+/**
+ *
+ * @brief This API gets EVDO revision config
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_evdo_rev_config(int *pRequestID);
+
+/**
+ *
+ * @brief This API sets EVDO revision config
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  pRevConfig
+ * -  EVDO Revision config information.
+ *
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_evdo_rev_config(TelDataRevConfig_t *pRevConfig, int *pRequestID);
+
+/**
+ *
+ * @brief This API restores NAI
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_restore_data_nai(int *pRequestID);
+
+/**
+ *
+ * @brief This API gets Dedicate Data Transmission Mode setting. When it is set, Modem block the 1X paging
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_data_ddtm_config(int *pRequestID);
+
+/**
+ *
+ * @brief This API sets Dedicate Data Transmission Mode setting. When it is set, Modem block the 1X paging.
+ *
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+
+ * @param  [in]  pDDTMStatus
+ * -  DDTM setting information.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - In case of failure, error code will be returned. (Refer #int).
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_set_data_ddtm_config(TelDataDDTMStatus_t *pDDTMStatus, int *pRequestID);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_DATA_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiGps.h b/include/tapi/ITapiGps.h
new file mode 100644 (file)
index 0000000..0a87fc4
--- /dev/null
@@ -0,0 +1,1852 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup GPS_TAPI                GPS
+ * @{
+ *
+ * @file tapi_gps_interface.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi GPS\n
+ It contains a sample set of function prototypes,enums and structs that would be required by applications.
+ * GPS APIs allow an application to accomplish the following services: @n
+ * - Start a GPS session. @n
+ * - End a GPS session. @n
+ * - Request to initiate XTRA client download. @n
+ * - To set XTRA Auto download. @n
+ * - Set time information for XTRA. @n
+ * - Set SSL for AGPS. @n
+ * - Set AGPS bearer information. @n
+ */
+
+#ifndef _ITAPI_GPS_H_
+#define _ITAPI_GPS_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define        TAPI_GPS_FIX_PARAM_TAG_MAX              0x0F
+#define        TAPI_GPS_PARAMETERS_TAG_MAX             0x11
+#define        TAPI_GPS_ADDR_LEN_MAX                   16
+#define        TAPI_GPS_URL_LEN_MAX                    256
+#define        TAPI_GPS_SECURITY_DATA_MAX              20
+#define        TAPI_GPS_APN_LEN_MAX                    101
+#define        TAPI_GPS_SSD_LEN_MAX                    32
+#define        TAPI_GPS_SSL_LEN_MAX                    32
+#define        TAPI_GPS_XTRA_DATA_LEN_MAX              256
+#define        TAPI_GPS_MAX_SATELLITES                 12
+#define        TAPI_GPS_DNS_LEN_MAX                    256
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+typedef enum {
+       TAPI_GPS_FIX_REQ_SESSION_TYPE                   = 0x01,
+       TAPI_GPS_FIX_REQ_SESSION_OPERATION,
+       TAPI_GPS_FIX_REQ_NUM_FIXES,
+       TAPI_GPS_FIX_REQ_TIME_BTW_FIXES,
+       TAPI_GPS_FIX_REQ_ACCURACY,
+       TAPI_GPS_FIX_REQ_SESSION_TIMEOUT,
+       TAPI_GPS_FIX_REQ_SERVER_OPTION,
+       TAPI_GPS_FIX_REQ_SERVER_ADDR_TYPE,
+       TAPI_GPS_FIX_REQ_SERVER_ADDR_IP,
+       TAPI_GPS_FIX_REQ_SERVER_PORT,
+       TAPI_GPS_FIX_REQ_SERVER_URL,
+       TAPI_GPS_FIX_REQ_SEC_DATA_ID,
+       TAPI_GPS_FIX_REQ_SEC_DATA_LEN,
+       TAPI_GPS_FIX_REQ_SEC_DATA
+} tapi_gps_fix_req_param_type_t;
+
+typedef enum {
+       TAPI_GPS_GET_LATEST_PD_INFO,
+       TAPI_GPS_GET_NEW_POSITION,
+       TAPI_GPS_TRACKING_MODE,
+       TAPI_GPS_DATA_DOWNLOAD
+} tapi_gps_session_type_t;
+
+typedef enum {
+       TAPI_GPS_STANDALONE_ONLY        = 0x01,
+       TAPI_GPS_MSBASED,
+       TAPI_GPS_MSASSISTED,
+       TAPI_GPS_OPTIMAL_SPEED,
+       TAPI_GPS_OPTIMAL_ACCURACY,
+       TAPI_GPS_OPTIMAL_DATA,
+       TAPI_GPS_REF_POSITION
+} tapi_gps_session_operation_t;
+
+typedef enum {
+       TAPI_GPS_SERVER_DEFAULT,
+       TAPI_GPS_SERVER_LOCAL
+} tapi_gps_server_option_t;
+
+typedef enum {
+       TAPI_GPS_SERVER_UMTS,
+       TAPI_GPS_SERVER_1X_PDE,
+       TAPI_GPS_SERVER_1X_MPC
+} tapi_gps_server_type_t;
+
+typedef enum {
+       TAPI_GPS_ADDR_IPV4,
+       TAPI_GPS_ADDR_URL,
+       TAPI_GPS_ADDR_IPV6
+} tapi_gps_server_addr_type_t;
+
+typedef enum {
+       TAPI_GPS_PDSM_PD_EVENT_POSITION         = 0x00000001,
+       TAPI_GPS_PDSM_PD_EVENT_VELOCITY         = 0x00000002,
+       TAPI_GPS_PDSM_PD_EVENT_HEIGHT                   = 0x00000004,
+       TAPI_GPS_PDSM_PD_EVENT_DONE                     = 0x00000008,
+       TAPI_GPS_PDSM_PD_EVENT_END                              = 0x00000010,
+       TAPI_GPS_PDSM_PD_EVENT_BEGIN                    = 0x00000020,
+       TAPI_GPS_PDSM_PD_EVENT_COMM_BEGIN               = 0x00000040,
+       TAPI_GPS_PDSM_PD_EVENT_COMM_CONNECTED   = 0x00000080,
+       TAPI_GPS_PDSM_PD_EVENT_COMM_FAILURE     = 0x00000100,
+       TAPI_GPS_PDSM_PD_EVENT_COMM_DONE                = 0x00000200,
+       TAPI_GPS_PDSM_PD_EVENT_WARM_PROC_BEGIN  = 0x00000400,
+       TAPI_GPS_PDSM_PD_EVENT_WARM                     = 0x00000800,
+       TAPI_GPS_PDSM_PD_EVENT_NOT_WARM         = 0x00001000,
+       TAPI_GPS_PDSM_PD_EVENT_WARM_PROC_DONE   = 0x00002000,
+       TAPI_GPS_PDSM_PD_EVENT_GPS_BEGIN                = 0x00004000,
+       TAPI_GPS_PDSM_PD_EVENT_GPS_DONE         = 0x00008000,
+       TAPI_GPS_PDSM_PD_EVENT_SECURITY         = 0x00100000,
+       TAPI_GPS_PDSM_PD_EVENT_JGPS_PROGRESS    = 0x00200000,
+       TAPI_GPS_PDSM_PD_EVENT_UPDATE_FAILURE   = 0x01000000,
+       TAPI_GPS_PDSM_PD_EVENT_DLOAD_BEGIN              = 0x10000000,
+       TAPI_GPS_PDSM_PD_EVENT_DLOAD                    = 0x20000000,
+       TAPI_GPS_PDSM_PD_EVENT_DLOAD_DONE               = 0x40000000,
+       TAPI_GPS_PDSM_PD_EVENT_DLOAD_END                = 0x80000000
+} tapi_gps_pd_event_t;
+
+typedef enum {
+       TAPI_GPS_END_PHONE_OFFLINE,
+       TAPI_GPS_END_NO_SERVICE,
+       TAPI_GPS_END_NO_CONNECTION,                     /* no connection with PDE */
+       TAPI_GPS_END_NO_DATA_AVAILABLE,
+       TAPI_GPS_END_SESSION_MANAGER_BUSY,
+       TAPI_GPS_END_CDMA_LOCKED,                       /* phone is CDMA locked. */
+       TAPI_GPS_END_GPS_LOCKED,                        /* phone is GPS locked. */
+       TAPI_GPS_END_CONNECTION_FAILURE,        /* connection failure with PDE */
+       TAPI_GPS_END_BY_PDSM,                           /* PDMS ended the session because of error condition. */
+       TAPI_GPS_END_BY_USER,                           /* User ended the session. */
+       TAPI_GPS_END_BY_END_KEY,                        /* End key pressed from UI */
+       TAPI_GPS_END_NETWORK_SESSION_ENDED,
+       TAPI_GPS_END_TIMEOUT,
+       TAPI_GPS_END_CONFLICT,
+       TAPI_GPS_END_NETWORK_CONNECTION_FAIL,
+       TAPI_GPS_END_ERROR_IN_FIX,
+       TAPI_GPS_END_REJECTED,
+       TAPI_GPS_END_BY_TC_EXIT,
+       TAPI_GPS_END_BY_E911_CALL,
+       TAPI_GPS_END_ADDED_PROTOCOL_ERROR,
+       TAPI_GPS_END_STALE_BS_INFO,
+       TAPI_GPS_END_VX_LCS_AGENT_AUTH_FAIL,
+       TAPI_GPS_END_UNKNOWN_SYSTEM_ERROR,
+       TAPI_GPS_END_UNKNOWN_SERVICE_ERROR,
+       TAPI_GPS_END_UNSUPPORTED_SERVICE,
+       TAPI_GPS_END_SUBSCRIPTION_VIOLATION,
+       TAPI_GPS_END_FIX_METHOD_FIALED,
+       TAPI_GPS_END_ANTENNA_SWITCH,
+       TAPI_GPS_END_NO_FIX_REPORTED,
+       TAPI_GPS_END_NORMAL_ENDING,
+       TAPI_GPS_END_NO_ERR_SPECIFIED_BY_NETWORK,
+       TAPI_GPS_END_NO_RESOURCES_ON_NETWORK,
+       TAPI_GPS_END_POSITION_SERVER_UNAVAILABLE,
+       TAPI_GPS_END_UNSUPPORTED_PROTOCOL,
+       TAPI_GPS_END_SS_MOLR_ERROR,
+       TAPI_GPS_END_SS_UNEXPECT_DATA,
+       TAPI_GPS_END_SS_DATA_MISSING,
+       TAPI_GPS_END_SS_NO_FACILITY,
+       TAPI_GPS_END_SS_SUBSCRPIPTION_VIOLATION,
+       TAPI_GPS_END_SS_POSITION_METHOD_FAIL,
+       TAPI_GPS_END_SS_UNDEFINED,
+       TAPI_GPS_END_CP_SMLC_TIMEOUT,
+       TAPI_GPS_END_CP_MT_GUARDTIME_EXPIRATION,
+       TAPI_GPS_END_WAITING_ASSISTANCE
+} tapi_gps_end_status_code;
+
+typedef enum {
+       TAPI_GPS_MASK_ALTITUDE_VALID                    = 0x01,
+       TAPI_GPS_MASK_VELOCITY_VALID                    = 0x02,
+       TAPI_GPS_MASK_UTC_OFFSET_VALID                  = 0x04,
+       TAPI_GPS_MASK_UNCERTAINTY_VAILD                 = 0x08,
+       TAPI_GPS_MASK_EXT_STATUS_VALID                  = 0x10,
+       TAPI_GPS_MASK_MILLISECOND_VALID                 = 0x20,
+       TAPI_GPS_MASK_PM_DATA_AVAILABLE                 = 0x40,
+       TAPI_GPS_MASK_ADDITIONAL_MEASUREMENT    = 0x80
+} tapi_gps_opt_field_mask_t;
+
+typedef enum {
+       TAPI_GPS_POS_SRC_GPS            = 0x01,
+       TAPI_GPS_POS_SRC_CELLID         = 0x02,
+       TAPI_GPS_POS_SRC_AFLT           = 0x04,
+       TAPI_GPS_POS_SRC_HYBRID         = 0x08,
+       TAPI_GPS_POS_SRC_CELL_ERROR     = 0x10,
+       TAPI_GPS_POS_SRC_DEFAULT        = 0x20,
+       TAPI_GPS_POS_SRC_UNKNOWN        = 0x40
+} tapi_gps_pos_source_type_t;
+
+typedef enum {
+       TAPI_GPS_POS_TYPE_INVAILD,
+       TAPI_GPS_POS_TYPE_OLD,
+       TAPI_GPS_POS_TYPE_NEW
+} tapi_gps_pos_type_t;
+
+typedef enum {
+       TAPI_GPS_POS_MODE_MSBASED                       = 0x01,
+       TAPI_GPS_POS_MODE_MSASSISTED,
+       TAPI_GPS_POS_MODE_STANDALONE,
+       TAPI_GPS_POS_MODE_UNKNOWN,
+       TAPI_GPS_POS_MODE_2G_CP_MS_BASED        = 0x08,
+       TAPI_GPS_POS_MODE_2G_CP_MS_ASSISTED     = 0x10,
+       TAPI_GPS_POS_MODE_3G_CP_UE_BASED        = 0x20,
+       TAPI_GPS_POS_MODE_3G_CP_UE_ASSISTED     = 0x40
+} tapi_gps_pos_mode_t;
+
+typedef enum {
+       TAPI_GPS_FIX_TYPE_UNKNOWN,
+       TAPI_GPS_FIX_TYPE_2D,
+       TAPI_GPS_FIX_TYPE_3D
+} tapi_gps_fix_type_t;
+
+typedef enum {
+       TAPI_GPS_FIX_SELECTION_UNKNOWN,
+       TAPI_GPS_FIX_SELECTION_AUTO,
+       TAPI_GPS_FIX_SELECTION_MANUAL
+} tapi_gps_fix_selection_type_t;
+
+typedef enum {
+       TAPI_GPS_FIX_QUALITY_UNKNOWN,
+       TAPI_GPS_FIX_QUALITY_GPS,
+       TAPI_GPS_FIX_QUALITY_DGPS
+} tapi_gps_fix_quality_t;
+
+typedef enum {
+       TAPI_GPS_ENCRYPTION_DISABLED,
+       TAPI_GPS_ENCRYPTION_AES128
+} tapi_gps_encryption_algorithm_t;
+
+typedef enum {
+       TAPI_GPS_SV_STATE_IDLE,
+       TAPI_GPS_SV_STATE_SEARCH,
+       TAPI_GPS_SV_STATE_SEARCH_VERIFY,
+       TAPI_GPS_SV_STATE_BIT_EDGE,
+       TAPI_GPS_SV_STATE_TRACK
+} tapi_gps_sv_state_t;
+
+typedef enum {
+       TAPI_GPS_GPSLOCK_NONE,
+       TAPI_GPS_GPSLOCK_MI,
+       TAPI_GPS_GPSLOCK_MT,
+       TAPI_GPS_GPSLOCK_ALL
+} tapi_gps_gpslock_mode_t;
+
+typedef enum {
+       TAPI_GPS_EPHEMERIS                              = 0x00000001,
+       TAPI_GPS_ALMANAC                                = 0x00000002,
+       TAPI_GPS_POSITION                               = 0x00000004,
+       TAPI_GPS_TIME                                   = 0x00000008,
+       TAPI_GPS_IONO                                   = 0x00000010,
+       TAPI_GPS_UTC                                    = 0x00000020,
+       TAPI_GPS_HEALTH                         = 0x00000040,
+       TAPI_GPS_SVDIR                                  = 0x00000080,
+       TAPI_GPS_SVSTEER                                = 0x00000100,
+       TAPI_GPS_SADATA                         = 0x00000200,
+       TAPI_GPS_RTI                                    = 0x00000400,
+       TAPI_GPS_TIME_UNCERTAINTY               = 0x00000800,
+       TAPI_GPS_POSITION_UNCERTAINTY   = 0x00001000,
+       TAPI_GPS_TIME_OFFSET                    = 0x00002000,
+       TAPI_GPS_POSITION_OFFSET                = 0x00004000,
+       TAPI_GPS_ALMANAC_CORP                   = 0x00008000,
+       TAPI_GPS_FREQ_BIAS                              = 0x00010000
+} tapi_gps_aiding_data_t;
+
+typedef enum {
+       TAPI_GPS_MT_LR_DISABLE,
+       TAPI_GPS_MT_LR_ENABLE
+} tapi_gps_mt_lr_t;
+
+typedef enum {
+       TAPI_GPS_MO_CP,
+       TAPI_GPS_MO_UP,
+} tapi_gps_mo_method_t;
+
+typedef enum {
+       TAPI_GPS_SSL_DISABLE,
+       TAPI_GPS_SSL_ENABLE
+} tapi_gps_ssl_on_off_t;
+
+typedef enum {
+       TAPI_GPS_SSL_VERISIGN                           = 0x00, /* 0x00: Orange France/UK/Spain, SFR, TIM, Telstra */
+       TAPI_GPS_SSL_THAWTE                             = 0x01, /* 0x01: Vodafone Global */
+       TAPI_GPS_SSL_CMCC_OFFICIAL                      = 0x02, /* 0x02: CMCC OFFICIAL */
+       TAPI_GPS_SSL_SPIRENT_TEST_EQUIPMENT = 0x03,     /* 0x03: Spirent Equipment */
+       TAPI_GPS_SSL_THALES_TEST_SERVER = 0x04, /* 0x04: THALES IOT TEST  */
+       TAPI_GPS_SSL_CMCC_TEST_LAB                      = 0x05, /* 0x05: CMCC test lab */
+       TAPI_GPS_SSL_C3_PCA_G3V2                        = 0x06, /* 0x06: DocoMo Test 1 */
+       TAPI_GPS_SSL_CLASS3_PCA_G2_V2           = 0x07, /* 0x07: DocoMo Test 2 */
+       TAPI_GPS_SSL_GOOGLE_CA                          = 0x08, /* 0x08: GOOGLE Server */
+} tapi_gps_cert_type_t;
+
+typedef enum {
+       TAPI_GPS_PRM_MSG_SERVER_TYPE             = 0x01,
+       TAPI_GPS_PRM_MSG_SERVER_ADDR_TYPE,
+       TAPI_GPS_PRM_MSG_SERVER_ADDR_IP,
+       TAPI_GPS_PRM_MSG_SERVER_PORT,
+       TAPI_GPS_PRM_MSG_SERVER_URL,
+       TAPI_GPS_PRM_MSG_GPS_LOCK,
+       TAPI_GPS_PRM_MSG_DEL_AIDING_DATA,
+       TAPI_GPS_PRM_MSG_POSITION_MODE,
+       TAPI_GPS_PRM_MSG_MT_LR,
+       TAPI_GPS_PRM_MSG_MO_METHOD,
+       TAPI_GPS_PRM_MSG_SSD,
+       TAPI_GPS_PRM_MSG_SEC_UPDATE_RATE,
+       TAPI_GPS_PRM_MSG_SSL_ON_OFF,
+       TAPI_GPS_PRM_MSG_SSL,
+} tapi_gps_param_msg_param_type_t;
+
+typedef enum {
+       TAPI_GPS_PD_CMD_GET_POSITION,
+       TAPI_GPS_PD_CMD_END_SESSION,
+       TAPI_GPS_PD_CMD_INJECT_TIME
+} tapi_gps_pd_cmd_t;
+
+typedef enum {
+       TAPI_GPS_PDP_CONNECT,
+       TAPI_GPS_PDP_DISCONNECT
+} tapi_gps_pdp_connection_t;
+
+typedef enum {
+       TAPI_GPS_PDP_TYPE_IP,
+       TAPI_GPS_PDP_TYPE_PPP,
+       TAPI_GPS_PDP_TYPE_IPV6
+} tapi_gps_pdp_type_t;
+
+typedef enum {
+       TAPI_GPS_PDP_CONNECT_SUCESS,
+       TAPI_GPS_PDP_CONNECT_FAIL,
+       TAPI_GPS_PDP_DISCONNECT_SUCCESS,
+       TAPI_GPS_PDP_DISCONNECT_FAIL
+} tapi_gps_pdp_result_t;
+
+typedef enum {
+       TAPI_GPS_DNS_LOOKUP_SUCCESS,
+       TAPI_GPS_DNS_LOOKUP_FAIL
+} tapi_gps_dns_lookup_result_t;
+
+typedef enum {
+       TAPI_GPS_IP_ADDR_TYPE_IPV4,
+       TAPI_GPS_IP_ADDR_TYPE_IPV6,
+} tapi_gps_ip_addr_type_t;
+
+typedef enum {
+       TAPI_GPS_NOTIFY_ONLY,
+       TAPI_GPS_NOTIFY_ALLOW_NORESPONSE,
+       TAPI_GPS_NOTIFY_NOTALLOW_NORESPONSE
+} tapi_gps_verification_notify_t;
+
+typedef enum {
+       TAPI_GPS_SUPL_FORMAT_LOGICAL_NAME,
+       TAPI_GPS_SUPL_FORMAT_EMAIL_ADDRESS,
+       TAPI_GPS_SUPL_FORMAT_MSISDN,
+       TAPI_GPS_SUPL_FORMAT_URL,
+       TAPI_GPS_SUPL_FORMAT_SIP_URL,
+       TAPI_GPS_SUPL_FORMAT_MIN,
+       TAPI_GPS_SUPL_FORMAT_MDN,
+       TAPI_GPS_SUPL_FORMAT_UNKNOWN
+} tapi_gps_supl_format_t;
+
+typedef enum {
+       TAPI_GPS_DCS_ISO646IRV,
+       TAPI_GPS_DCS_ISO8859,
+       TAPI_GPS_DCS_UTF8,
+       TAPI_GPS_DCS_UTF16,
+       TAPI_GPS_DCS_UCS2,
+       TAPI_GPS_DCS_GSM_DEFAULT,
+       TAPI_GPS_DCS_SHIFT_JIS,
+       TAPI_GPS_DCS_JIS,
+       TAPI_GPS_DCS_EUC,
+       TAPI_GPS_DCS_GB2312,
+       TAPI_GPS_DCS_CNS11643,
+       TAPI_GPS_DCS_KSC1001,
+       TAPI_GPS_DCS_GERMAN,
+       TAPI_GPS_DCS_ENGLISH,
+       TAPI_GPS_DCS_ITALIAN,
+       TAPI_GPS_DCS_FRENCH,
+       TAPI_GPS_DCS_SPANISH,
+       TAPI_GPS_DCS_DUTCH,
+       TAPI_GPS_DCS_SWEDISH,
+       TAPI_GPS_DCS_DANISH,
+       TAPI_GPS_DCS_PORTUGUESE,
+       TAPI_GPS_DCS_FINNISH,
+       TAPI_GPS_DCS_NORWEGIAN,
+       TAPI_GPS_DCS_GREEK,
+       TAPI_GPS_DCS_TURKISH,
+       TAPI_GPS_DCS_HUNGARIAN,
+       TAPI_GPS_DCS_POLISH,
+       TAPI_GPS_DCS_LANGUAGE_UNSPEC
+} tapi_gps_data_coding_scheme_t;
+
+typedef enum {
+       TAPI_GPS_RIE_OCTET,
+       TAPI_GPS_RIE_EXN_PROTOCOL_MSG,
+       TAPI_GPS_RIE_ASCII,
+       TAPI_GPS_RIE_IA5,
+       TAPI_GPS_RIE_UNICODE,
+       TAPI_GPS_RIE_SHIFT_JIS,
+       TAPI_GPS_RIE_KOREAN,
+       TAPI_GPS_RIE_LATIN_HEBREW,
+       TAPI_GPS_RIE_LATIN,
+       TAPI_GPS_RIE_GSM
+} tapi_gps_requestor_id_encoding_t;
+
+typedef enum {
+       TAPI_GPS_VER_CNF_YES = 0x00,    /**< Specifies Confirmation yes. */
+       TAPI_GPS_VER_CNF_NO = 0x01,     /**< Specifies Confirmation no. */
+       TAPI_GPS_VER_CNF_NORESPONSE = 0x02, /**< Specifies Confirmation no response. */
+} tapi_gps_verification_cnf_t;
+
+typedef enum {
+       TAPI_GPS_SUPL_INIT                      = 0x01,
+       TAPI_GPS_SUPL_START,
+       TAPI_GPS_SUPL_RESPONSE,
+       TAPI_GPS_SUPL_POS_INIT,
+       TAPI_GPS_SUPL_POS,
+       TAPI_GPS_SUPL_END,
+       TAPI_GPS_SUPL_AUTH_REQ,
+       TAPI_GPS_SUPL_AUTH_RESP,
+       TAPI_GPS_SUPL_TLS_FAILURE,
+       TAPI_GPS_SUPL_FALLBACK_TO_STANDALONE,
+       TAPI_GPS_SUPL_RESPONSE_TIMEOUT,
+       TAPI_GPS_SUPL_OTA_MSG_TIMEOUT
+} tapi_gps_supl_msg_t;
+
+typedef enum {
+       //[Error Indicator]
+       TAPI_GPS_ERR_IND_UNSPECIFIED                             = 0x01,
+       TAPI_GPS_ERR_IND_SYSTEM_FAILURE,
+       TAPI_GPS_ERR_IND_PROTOCOL_ERR,
+       TAPI_GPS_ERR_IND_DATA_MISSING,
+       TAPI_GPS_ERR_IND_UNEXPECTED_DATA_VALUE,
+       TAPI_GPS_ERR_IND_POS_METHOD_FAILURE,
+       TAPI_GPS_ERR_IND_POS_METHOD_MISMATCH,
+       TAPI_GPS_ERR_IND_POS_PROTOCOL_MISMATCH,
+       TAPI_GPS_ERR_IND_TARGETSET_NOT_REACHABLE,
+       TAPI_GPS_ERR_IND_VERSION_NOTSUPPORTED,
+       TAPI_GPS_ERR_IND_RESOURCE_SHORTAGE,
+       TAPI_GPS_ERR_IND_INVALID_SESSION_ID,
+       //[Unexpected Message]
+       TAPI_GPS_UNEXP_MSG_NONPROXYMODE_NOTSUPPORTED,
+       TAPI_GPS_UNEXP_MSG_PROXYMODE_NOTSUPPORTED,
+       TAPI_GPS_UNEXP_MSG_POS_NOT_PERMITTED,
+       TAPI_GPS_UNEXP_MSG_AUTH_NET_FAILURE,
+       TAPI_GPS_UNEXP_MSG_AUTH_SUPLINIT_FAILURE,
+       //[Information Indicator]
+       TAPI_GPS_INFO_IND_CONSENT_DENIED_BY_USER        = 0x65,
+       TAPI_GPS_INFO_IND_CONSENT_GRANTED_BY_USER,
+       TAPI_GPS_ERROR_NONE                                             = 0xFF
+} tapi_gps_supl_status_t;
+
+typedef enum {
+       TAPI_GPS_XTRA_STATUS_FAIL,
+       TAPI_GPS_XTRA_STATUS_SUCCESS
+} tapi_gps_xtra_status_t;
+
+/**
+ * @enum tapi_gps_error_code_t
+ * This enumeration defines error types of telephony gps.
+ */
+typedef enum {
+       TAPI_GPS_ERR_NONE                                               = 0,    /**< Error None */
+       TAPI_GPS_ERR_INIT_FAILED,                                               /**< Session opening failed     */
+       TAPI_GPS_ERR_DEINIT_FAILED,                                             /**< Option setting failed      */
+       TAPI_GPS_ERR_FIX_REQ_FAILED,                                    /**< Session starting failed */
+       TAPI_GPS_ERR_STOP_SESSION_FAILED,                               /**< Serial opening failed      */
+       TAPI_GPS_ERR_PARAMETER_SET_FAILED,                              /**< Creating DPRAM thread failed */
+       TAPI_GPS_ERR_XTRA_INIT_FAILED,                                  /**< Session Closing failed     */
+       TAPI_GPS_ERR_XTRA_DEINIT_FAILED,                                /**< XTRA enable/disable setting failed */
+       TAPI_GPS_ERR_XTRA_ENABLE_FAILED,                                /**< XTRA auto download enable/disable setting failed */
+       TAPI_GPS_ERR_XTRA_SET_TIME_INFO_FAILED,                 /**< SNTP time info injection failed */
+       TAPI_GPS_ERR_XTRA_SET_DATA_INFO_FAILED,                 /**< Query validity of XTRA data failed */
+       TAPI_GPS_ERR_AGPS_SSL_SET_FAILED,                               /**< SSL security setting failed */
+       TAPI_GPS_ERR_AGPS_BEARER_SET_FAILED,                    /**< AGPS bearer setting failed */
+} tapi_gps_error_code_t;
+
+
+/*****************************************************************************************************/
+/*                                    GPS Chipset on AP - START                                      */
+/*****************************************************************************************************/
+
+//GPS CP MO Location
+
+/* MOLR Type */
+typedef enum {
+       TAPI_GPS_MOLR_INVALID,
+       TAPI_GPS_MOLR_LOCATION_ESTIMATE,
+       TAPI_GPS_MOLR_ASSISTANCE_DATA,
+       TAPI_GPS_MOLR_DECIPHERING_KEY
+} tapi_gps_molr_e_type;
+
+/* Response Time Type */
+typedef enum {
+       TAPI_GPS_RESPONSE_TIME_INVALID,
+       TAPI_GPS_RESPONSE_TIME_LOW_DELAY,
+       TAPI_GPS_RESPONSE_TIME_DELAY_TOLERANT
+} tapi_gps_response_time;
+
+/* Location Method Type */
+typedef enum {
+       TAPI_GPS_LOCATION_METHOD_INVALID,
+       TAPI_GPS_LOCATION_METHOD_MSBASED_EOTD,
+       TAPI_GPS_LOCATION_METHOD_MSASSISTED_EOTD,
+       TAPI_GPS_LOCATION_METHOD_ASSISTED_GPS
+} tapi_gps_location_method_e_type;
+
+/* GAD Shape Type */
+typedef enum {
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT,
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT_WITH_UNCERTAINTY_CIRCLE,
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT_WITH_UNCERTAINTY_ELLIPSE,
+       TAPI_GPS_SHAPE_POLYGON,
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT_WITH_ALTITUDE,
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT_WITH_ALTITUDE_AND_UNCERTAINTYELI,
+       TAPI_GPS_SHAPE_ELLIPSOIDPOINT_ARC
+} tapi_gps_gad_shape_e_type;
+
+/* GPS Assistance Data Flags */
+#define GPS_ASSISTANCE_ALMANAC                  0x00000001
+#define GPS_ASSISTANCE_UTC_MODEL                0x00000002
+#define GPS_ASSISTANCE_IONO_MODEL               0x00000004
+#define GPS_ASSISTANCE_NAVI_MODEL               0x00000008
+#define GPS_ASSISTANCE_DGPS_CORRECTION          0x00000010
+#define GPS_ASSISTANCE_REF_LOCATION             0x00000040
+#define GPS_ASSISTANCE_REF_TIME                 0x00000080
+#define GPS_ASSISTANCE_ACQUISITION_ASSISTANCE   0x00000100
+#define GPS_ASSISTANCE_REAL_TIME_INTEGRITY      0x00000200
+
+//GPS Assist Data Message
+
+/* GPS Crrier Type */
+typedef enum {
+       TAPI_GPS_CARRIER_INVALID,
+       TAPI_GPS_CARRIER_GSM,
+       TAPI_GPS_CARRIER_UMTS
+} tapi_gps_carrier_e_type;
+
+/* Utran Sfn Uncertainty */
+typedef enum {
+       TAPI_GPS_UTRAN_SFN_UNCERTAINTY_INVALID,
+       TAPI_GPS_UTRAN_SFN_UNCERTAINTY_LESSTHAN_10,
+       TAPI_GPS_UTRAN_SFN_UNCERTAINTY_MORETHAN_10
+} tapi_gps_sfn_unc_e_type;
+
+/* UTRAN Choice mode Type */
+typedef enum {
+       TAPI_GPS_UTRAN_CHOICE_INVALID,
+       TAPI_GPS_UTRAN_CHOICE_FDD,
+       TAPI_GPS_UTRAN_CHOICE_TDD
+} tapi_gps_utrn_choice_mode_e_type;
+
+/* DGPS Status Type */
+typedef enum {
+       TAPI_GPS_DGPS_INVALID,
+       TAPI_GPS_DGPS_UDRE_SCALE_1_0,
+       TAPI_GPS_DGPS_UDRE_SCALE_0_75,
+       TAPI_GPS_DGPS_UDRE_SCALE_0_5,
+       TAPI_GPS_DGPS_UDRE_SCALE_0_3,
+       TAPI_GPS_DGPS_UDRE_SCALE_0_2,
+       TAPI_GPS_DGPS_UDRE_SCALE_0_1,
+       TAPI_GPS_DGPS_NO_DATA
+} tapi_gps_dgps_status_e_type;
+
+/* Navigation Satellite Status Type*/
+typedef enum {
+       TAPI_GPS_NAVIGATION_MODEL_NEW_SATELLITE_NEW_NAVIGATION,
+       TAPI_GPS_NAVIGATION_MODEL_EXIST_SATELLITE_EXIST_NAVIGATION,
+       TAPI_GPS_NAVIGATION_MODEL_EXIST_SATELLITE_NEW_NAVIGATION,
+       TAPI_GPS_NAVIGATION_MODEL_RESERVED
+} tapi_gps_navigation_sat_status_e_type;
+
+//GPS Measure Position Message
+/* Method Type */
+typedef enum {
+       TAPI_GPS_METHODTYPE_INVALID,
+       TAPI_GPS_METHODTYPE_MS_ASSISTED,
+       TAPI_GPS_METHODTYPE_MS_BASED,
+       TAPI_GPS_METHODTYPE_MS_BASED_PREF,
+       TAPI_GPS_METHODTYPE_MS_ASSISTED_PREF
+} tapi_gps_method_e_type;
+
+/* Use Multiple Sets Type */
+typedef enum {
+       TAPI_GPS_MULTIPLESETS_INVALID,
+       TAPI_GPS_MULTIPLESETS_MULTIPLESETS,
+       TAPI_GPS_MULTIPLESETS_ONESET
+} tapi_gps_use_multi_sets_e_type;
+
+/* Environment Char Type */
+typedef enum {
+       TAPI_GPS_ENVIRONMENT_INVALID,
+       TAPI_GPS_ENVIRONMENT_BAD_AREA,
+       TAPI_GPS_ENVIRONMENT_NOT_BAD_AREA,
+       TAPI_GPS_ENVIRONMENT_MIXED_AREA
+} tapi_gps_env_char_e_type;
+
+/* Cell Timing Wanted Type */
+typedef enum {
+       TAPI_GPS_CELLTIMING_INVALID,
+       TAPI_GPS_CELLTIMING_WANTED,
+       TAPI_GPS_CELLTIMING_NOT_WANTED
+} tapi_gps_cell_timing_wnt_e_type;
+
+/* Additional Assist Request Type */
+typedef enum {
+       TAPI_GPS_ADDITIONAL_ASSISREQ_INVALID,
+       TAPI_GPS_ADDITIONAL_ASSISREQ_REQ,
+       TAPI_GPS_ADDITIONAL_ASSISREQ_NOT_REQ
+} tapi_gps_add_assit_req_e_type;
+
+/* Measure Position Response Type */
+typedef enum {
+       TAPI_GPS_MSR_POS_RES_LOCATION,
+       TAPI_GPS_MSR_POS_RES_GPS_MEASUREMENTS,
+       TAPI_GPS_MSR_POS_RES_AID_REQ,
+       TAPI_GPS_MSR_POS_RES_ERROR
+} tapi_gps_msr_pos_res_e_type;
+
+/* GPS element multi path Type */
+typedef enum {
+       TAPI_GPS_MULTIPATH_NOT_MEASURED,
+       TAPI_GPS_MULTIPATH_LOW,
+       TAPI_GPS_MULTIPATH_MEDIUM,
+       TAPI_GPS_MULTIPATH_HIGH
+}tapi_gps_multi_path_e_type;
+
+/* Accuracy Flag Value */
+#define QOS_PRESENT_HORIZONTAL_ACCURACY 0x01
+#define QOS_PRESENT_VERTICAL_ACCURACY   0x02
+
+//GPS MTLR Notification Message
+/* MTLR Notification Type */
+typedef enum {
+       TAPI_GPS_NO_NOTIFY_NO_VERIFY,
+       TAPI_GPS_USER_NOTIFY_ONLY,     /* Location Notification Allowed */
+       TAPI_GPS_USER_NOTIFY_VERIFY_ALLOW_NO_RESP, /* notify and verify, if no response, Location Notification Allowed */
+       TAPI_GPS_USER_NOTIFY_VERIFY_NOT_ALLOW_NO_RESP, /* notify and verify, if no response, Location Notification Not Allowed */
+       TAPI_GPS_PRIVACY_NEEDED,
+       TAPI_GPS_PRIVACY_OVERRIDE
+} tapi_gps_mtlr_notify_e_type;
+
+/* location estimate Type */
+typedef enum {
+       TAPI_GPS_ESTIMATE_TYPE_CURRENT_LOCATION,        ///< Current Location
+       TAPI_GPS_ESTIMATE_TYPE_CURRENT_OR_LAST_KNOWN_LOCATION,  ///< Current or Last Known Location
+       TAPI_GPS_ESTIMATE_TYPE_INITIAL_LOCATION,                ///< Initial Location
+       TAPI_GPS_ESTIMATE_TYPE_ACTIVATE_DEFERRED_LOC,   ///< Activate Deferred Location
+       TAPI_GPS_ESTIMATE_TYPE_CANCEL_DEFERRED_LOC,     ///< Cancel Deferred Location
+       TAPI_GPS_ESTIMATE_TYPE_NOTIFY_VERIFY_ONLY,              ///< Notification and Verification Only
+       TAPI_GPS_ESTIMATE_TYPE_INVALID
+} tapi_gps_loc_estimate_e_type;
+
+/* ID Format Type */
+typedef enum {
+       TAPI_GPS_FORMAT_IND_LOGICAL_NAME,
+       TAPI_GPS_FORMAT_IND_EMAIL_ADDRESS,
+       TAPI_GPS_FORMAT_IND_MSISDN,
+       TAPI_GPS_FORMAT_IND_URL,
+       TAPI_GPS_FORMAT_IND_SIPURL,
+       TAPI_GPS_FORMAT_IND_IMS_PUBLIC_ID
+} tapi_gps_format_ind_e_type;
+
+/* Verify Response Type */
+typedef enum {
+       TAPI_GPS_VERIFY_RSP_TYPE_DENIED,
+       TAPI_GPS_VERIFY_RSP_TYPE_GRANTED,
+       TAPI_GPS_VERIFY_RSP_TYPE_INVALID
+} tapi_gps_verify_rsp_e_type;
+
+typedef enum {
+       TAPI_GPS_FREQ_AIDING_DISABLE = 0,
+       TAPI_GPS_FREQ_AIDING_ENABLE,
+} tapi_gps_freq_aiding_e_type;
+
+
+/*****************************************************************************************************/
+/*                                     GPS Chipset on AP - END                                       */
+/*****************************************************************************************************/
+
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+typedef struct {
+       unsigned char NumOfRecord;
+       tapi_gps_fix_req_param_type_t ParamType[TAPI_GPS_FIX_PARAM_TAG_MAX];
+       tapi_gps_session_type_t SessionType;
+       tapi_gps_session_operation_t SessionOperation;
+       int TotalFixes;
+       int TimeBtwFixes;
+       int Accuracy;
+       unsigned char GpsSessionTimeout; /* 0~255 secs. */
+       tapi_gps_server_option_t ServerOption;
+       tapi_gps_server_addr_type_t ServerAddressType;
+       char ServerAddressIP[TAPI_GPS_ADDR_LEN_MAX];
+       int ServerPort;
+       char URL[TAPI_GPS_URL_LEN_MAX];
+       unsigned char SecurityDataId;
+       unsigned char SecurityDataLength;
+       char SecurityData[TAPI_GPS_SECURITY_DATA_MAX];
+} tapi_gps_fix_request_msg_t;
+
+typedef struct {
+       unsigned char SpaceVehicleNumber;
+       unsigned char ElevationOfMeasuredSatellite;
+       short AzimuthOfMeasuredSatellite;
+} tapi_gps_sv_info_inview_t;
+
+typedef struct {
+       int sv_num;
+       int elev;
+       int azimuth_snr;
+} tapi_sv_in_view_type_t;
+
+typedef struct {
+       tapi_gps_pd_event_t pd_evnet;
+       tapi_gps_end_status_code end_status;
+       tapi_gps_opt_field_mask_t opt_field_mask;
+       long time_stamp;
+       int utc_offset;
+       tapi_gps_pos_source_type_t positioning_source;
+       tapi_gps_pos_type_t position_type;
+       tapi_gps_pos_mode_t position_mode;
+       int loc_uncertainty_ang;
+       int loc_uncertainty_a;
+       int loc_uncertainty_p;
+       int loc_uncertainty_v;
+       int loc_uncertainty_conf;
+       long long latitude;
+       long long longitude;
+       int altitude;
+       int speed_knot;
+       int speed_kmh;
+       int heading_true;
+       int velocity_include;
+       tapi_gps_fix_type_t fix_type;
+       int hour;
+       int minute;
+       int sec;
+       int date;
+       int h_dop;
+       int p_dop;
+       int v_dop;
+       int sv_in_use;
+       long long magnetic_variation;
+       tapi_gps_fix_selection_type_t selection_type;
+       tapi_gps_fix_quality_t fix_quality;
+       int num_sv_in_view;
+       tapi_sv_in_view_type_t sv[TAPI_GPS_MAX_SATELLITES];
+       int hash_alg;
+       int sec_data_id;
+       int sec_data_len;
+       char sec_data[20];
+       tapi_gps_encryption_algorithm_t crypt_alg;
+       int crypt_data_len;
+       char crypt_data[16];
+} tapi_gps_position_data_noti_t;
+
+typedef struct {
+       int sv_id;
+       int c_no;
+       int latency_ms;
+       int azimuth;
+       int elevation;
+       tapi_gps_sv_state_t sv_state;
+} tapi_meas_report_type_t;
+
+typedef struct {
+       int num_svs;
+       int eph_svmask;
+       int alm_svmask;
+       tapi_meas_report_type_t meas_report[16];
+} tapi_gps_ext_measurement_noti_t;
+
+typedef struct {
+       unsigned char NumOfRecord;
+       tapi_gps_param_msg_param_type_t ParamType[TAPI_GPS_PARAMETERS_TAG_MAX];
+       tapi_gps_server_type_t ServerType;
+       tapi_gps_server_addr_type_t ServerAddressType;
+       char ServerAddressIP[TAPI_GPS_ADDR_LEN_MAX];
+       int ServerPort;
+       char ServerURL[TAPI_GPS_URL_LEN_MAX];
+       tapi_gps_gpslock_mode_t GpsLock;
+       int DelAidingData;
+       tapi_gps_pos_mode_t PositionMode;
+       tapi_gps_mt_lr_t MT_LR;
+       tapi_gps_mo_method_t MO_Method;
+       unsigned char SharedSecretData[TAPI_GPS_SSD_LEN_MAX];
+       int SecurityUpdateRate;
+       tapi_gps_ssl_on_off_t SslOnOff;
+       tapi_gps_cert_type_t SSL;
+} tapi_gps_param_t;
+
+typedef struct {
+       tapi_gps_pdp_result_t Result;
+       unsigned char APN[TAPI_GPS_APN_LEN_MAX];
+} tapi_gps_data_conn_cnf_t;
+
+typedef struct {
+       tapi_gps_pdp_connection_t Connection;
+       tapi_gps_pdp_type_t PdpType;
+} tapi_gps_data_conn_indi_t;
+
+typedef struct {
+       tapi_gps_dns_lookup_result_t Result;
+       tapi_gps_ip_addr_type_t IP_Type;
+       unsigned char IP_Address[TAPI_GPS_ADDR_LEN_MAX];
+       int port;
+} tapi_gps_dns_lookup_cnf_t;
+
+typedef struct {
+       int len_addr;
+       char url[TAPI_GPS_DNS_LEN_MAX];
+} tapi_gps_dns_lookup_indi_t;
+
+typedef struct {
+       tapi_gps_verification_notify_t notify_type; /**< Specifies Notify type refer enum tapi_gps_notify_type_t */
+       tapi_gps_supl_format_t supl_format;
+       tapi_gps_data_coding_scheme_t dcs;
+       tapi_gps_requestor_id_encoding_t requestor_id_encoding; /**< Specifies encoding type refer enum tapi_gps_encoding_type_t */
+       char requestor_id[50]; /**< Specifies Client name */
+       char client_name[50]; /**< Specifies Client name */
+       int resp_time;
+} tapi_gps_verification_indi_t;
+
+/**
+ * This structure defines the values for agps SUPL flow parameter.
+ */
+typedef struct {
+       tapi_gps_supl_msg_t message;
+       tapi_gps_supl_status_t status_code;
+} tapi_gps_suplflow_noti_t;
+
+typedef struct {
+       unsigned long long time_msec; /**< Commulative GPS Time */
+       unsigned long time_unc_msec;
+       unsigned char ref_toutc_Time; /**< Referenced to UTC GPS Time  False :0 True: 1 */
+       unsigned char force_flag; /**< Force Acceptance of Data  False :0 True: 1 */
+       unsigned char status;
+} tapi_gps_xtra_time_info_t;
+
+/**
+ * This structure defines the values for gps xtra time information notification data.
+ */
+typedef struct {
+       unsigned int oneway_delay_failover_thresh; /**< One-way delay threshold for failover backup servers */
+} tapi_gps_xtra_time_noti_t;
+
+typedef struct {
+       unsigned int data_len;
+       unsigned char xtra_data[TAPI_GPS_XTRA_DATA_LEN_MAX];
+       unsigned char part_num;
+       unsigned char total_part;
+       tapi_gps_xtra_status_t status;
+} tapi_gps_xtra_data_info_t;
+
+typedef struct {
+       int max_file_part_size;
+       int max_file_size;
+} tapi_gps_xtra_data_noti_t;
+
+typedef struct {
+       tapi_gps_pd_cmd_t pd_cmd;
+       int pd_cmd_err;
+} tapi_gps_pd_cmd_callback_t;
+
+/*****************************************************************************************************/
+/*                                    GPS Chipset on AP - START                                      */
+/*****************************************************************************************************/
+
+typedef struct {
+       unsigned long int qosFlag;
+       unsigned char horizontalAccuracy;
+       unsigned char verticalCoordinateRequest;
+       unsigned char verticalAccuracy;
+       unsigned char responseTime; //0x01:low delay, 0x02: delay tolerant
+}__attribute__ ((packed)) tapi_gps_qos_t;
+
+typedef struct {
+       unsigned char sat_id;
+       unsigned char iode;
+}__attribute__ ((packed)) tapi_gps_sat_info_t;
+
+typedef struct {
+       unsigned char beginWeek;
+       unsigned char endWeek;
+       unsigned char beginTow;
+       unsigned char endTow;
+}__attribute__ ((packed)) tapi_gps_ext_ephe_chk_t;
+
+typedef struct {
+       unsigned long int assistanceFlag;
+       unsigned short gpsWeek;
+       unsigned char gpsToe;
+       unsigned char nSat;
+       unsigned char toeLimit;
+       tapi_gps_sat_info_t satInfo[15];
+       unsigned char gpsExtendedEphemeris;
+       tapi_gps_ext_ephe_chk_t extEphemerisChk;
+}__attribute__ ((packed)) tapi_gps_assistance_data_t;
+
+typedef struct {
+       tapi_gps_molr_e_type molr_type;
+       tapi_gps_location_method_e_type location_method;
+       tapi_gps_qos_t qos;
+       unsigned char client_id[82];
+       unsigned char mlc_num[82];
+       tapi_gps_assistance_data_t assistance_data;
+       tapi_gps_gad_shape_e_type gad_shape;
+       unsigned char serviceTypeID;
+       unsigned char pseudonymIndicator;
+}__attribute__ ((packed)) tapi_gps_cp_mo_loc_set_t; //APGPS - Control Plane Mo Location - Set
+
+//Measure Position message
+typedef struct {
+       unsigned char satId; //Satellite ID
+       unsigned char cno; // 0~63, unit of dB-Hz
+       signed short doppler; // -32768~32767, Hz and scale factor 0.2
+       unsigned short wholeChips; // 0~1022
+       unsigned short fracChips; // 0~1024
+       unsigned char lcsMultiPath;
+       unsigned char pseuRangeRmsErr; // 0~63
+}__attribute__ ((packed)) tapi_gps_measuremet_element_t;
+
+typedef struct {
+       unsigned long int gpsTow; ///< GPS time of week [msec]
+       unsigned short gpsWeek; ///< GPS week [0 .. 1023]
+       unsigned char nrOfSats; ///< number of satellites [1 .. 16]
+       tapi_gps_measuremet_element_t GpsMeasure[16];
+}__attribute__ ((packed)) tapi_gps_measure_t;
+
+typedef struct {
+       signed long int latitude;
+       signed long int longitude;
+}__attribute__ ((packed)) tapi_gps_ellipsoid_po_t;
+
+typedef struct {
+       tapi_gps_ellipsoid_po_t point;
+       unsigned char uncertainRadius;
+}__attribute__ ((packed)) tapi_gps_po_unc_circle_t;
+
+typedef struct {
+       tapi_gps_ellipsoid_po_t point;
+       unsigned char semiMajorAxis;
+       unsigned char semiMinorAxis;
+       unsigned char orientationAngle;
+       unsigned char confidence;
+}__attribute__ ((packed)) tapi_gps_po_unc_ellipse_t;
+
+typedef struct {
+       tapi_gps_ellipsoid_po_t point;
+       signed short altitude;
+       unsigned char semiMajorAxis;
+       unsigned char semiMinorAxis;
+       unsigned char orientationAngle;
+       unsigned char uncertainAltitude;
+       unsigned char confidence;
+}__attribute__ ((packed)) tapi_gps_po_alt_unc_ellipse_t;
+
+typedef struct {
+       tapi_gps_ellipsoid_po_t point;
+       unsigned short innerRadius;
+       unsigned char uncertainRadius;
+       unsigned char offsetAngle;
+       unsigned char includedAngle;
+       unsigned char confidence;
+}__attribute__ ((packed)) tapi_gps_ellipsoid_arc_t;
+
+typedef struct {
+       tapi_gps_ellipsoid_po_t point;
+       signed short altitude;
+}__attribute__ ((packed)) tapi_gps_ellipsoid_alt_t;
+
+typedef struct {
+       unsigned char noOfPoints;
+       tapi_gps_ellipsoid_po_t points[15];
+}__attribute__ ((packed)) tapi_gps_polygon_t;
+
+typedef struct {
+       unsigned char shape_type;
+       tapi_gps_po_unc_circle_t p_unc_clrcle;
+       tapi_gps_po_unc_ellipse_t p_unc_ellipse;
+       tapi_gps_po_alt_unc_ellipse_t p_alt_unc_ellipse;
+       tapi_gps_ellipsoid_arc_t ellipsoid_arc;
+       tapi_gps_ellipsoid_po_t ellipsoid_po;
+       tapi_gps_ellipsoid_alt_t ellipsoid_alt;
+       tapi_gps_polygon_t polygon;
+}__attribute__ ((packed)) tapi_gps_loc_info_t;
+
+typedef struct {
+       unsigned long int gpsTow; ///< GPS time of week [msec]
+       unsigned short gpsWeek; ///< GPS week [0 .. 1023]
+       unsigned char fixType; ///< Fix type. 2D(0x01) or 3D(0x02)
+       tapi_gps_loc_info_t measured_loc_info;
+}__attribute__ ((packed)) tapi_gps_measure_loc_info_t;
+
+typedef struct {
+       unsigned char valid;
+       unsigned long int cellFrames;
+       unsigned char choice_mode;
+       unsigned long int UtranFdd; //FDD Primary Scrambling Code
+       unsigned long int UtranTdd; // TDD Cell Parameter ID
+       unsigned long int sfn; //SFN
+}__attribute__ ((packed)) tapi_gps_utran_gps_ref_time_t;
+
+typedef struct {
+       unsigned char result; // 0x00 : SUCCESS, 0x01 : Fail
+       tapi_gps_msr_pos_res_e_type response_type; //should be 4 byte
+       tapi_gps_measure_t gps_measure;
+       tapi_gps_measure_loc_info_t loc_info;
+       tapi_gps_assistance_data_t measured_assit_data;
+       tapi_gps_utran_gps_ref_time_t UtranGpsRefTime; // only for 3G
+}__attribute__ ((packed)) tapi_gps_measure_position_confirm_t; //APGPS - Measure Position message - confirm
+
+typedef struct {
+       unsigned char reqId;
+       tapi_gps_verify_rsp_e_type response;
+}__attribute__ ((packed)) tapi_gps_mtlr_notification_confirm_t; //AGPS - MTLR Notification message - confirm
+
+
+/**********************************************************************/
+//RX part
+/**********************************************************************/
+typedef struct {
+       unsigned short arfcn; //ARFCN of GSM network
+       unsigned char bsic; //Base Station Identity Code
+       unsigned char rx_lev; // RX signal level
+       unsigned char ta; //Timing Advance
+}__attribute__ ((packed)) tapi_gps_gsm_extended_radio_signal_info_t; //APGPS - GSM Extended Radio Signal Info - Resp
+
+typedef struct {
+       unsigned long int flag;
+       unsigned char horizontalAccuracy;
+       unsigned char vertcalAccuracy;
+}__attribute__ ((packed)) tapi_gps_accuracy_t;
+
+typedef struct {
+       unsigned char method_type;
+       tapi_gps_accuracy_t accuracy;
+       unsigned char rsp_time;
+       unsigned char use_multi_sets;
+       unsigned char environment_char;
+       unsigned char cell_timing_wnt;
+       unsigned char add_assist_req;
+}__attribute__ ((packed)) tapi_gps_measure_position_indi_t; //APGPS - Measure Position message -indication
+
+typedef struct {
+       unsigned short deferredLocEventType;
+       tapi_gps_mtlr_notify_e_type locEstimateType;
+}__attribute__ ((packed)) tapi_gps_mtlr_loc_t;
+
+typedef struct {
+       unsigned long int length; //Length of APDU
+       unsigned char val[63]; //APDU data
+}__attribute__ ((packed)) tapi_gps_string_t;
+
+typedef struct {
+       unsigned char dcs;
+       tapi_gps_string_t str;
+       tapi_gps_format_ind_e_type format_indicator;
+}__attribute__ ((packed)) tapi_gps_dcs_string_t;
+
+typedef struct {
+       unsigned char dcs;
+       tapi_gps_string_t str;
+}__attribute__ ((packed)) tapi_gps_code_word_t;
+
+typedef struct {
+       unsigned char req_id;
+       tapi_gps_mtlr_notify_e_type notify_type;
+       tapi_gps_mtlr_loc_t loc;
+       unsigned char client_id[82];
+       tapi_gps_dcs_string_t client_name;
+       tapi_gps_dcs_string_t requestor_id;
+       tapi_gps_code_word_t code_word;
+       unsigned char svc_type_id;
+}__attribute__ ((packed)) tapi_gps_mtlr_notification_indi_t; //AGPS - MTLR Notification message - Indication
+
+typedef struct {
+       unsigned char cipherKeyFlag;
+       unsigned char currentDecipherKey[7];
+       unsigned char nextDecipherKey[7];
+}__attribute__ ((packed)) tapi_gps_deciphering_keys_t;
+
+typedef struct {
+       tapi_gps_loc_info_t loc_info;
+       unsigned char no_loc;
+       tapi_gps_deciphering_keys_t decper_keys;
+}__attribute__ ((packed)) tapi_gps_cp_mo_loc_noti_t; //APGPS - Control Plane Mo Location - Notification
+
+typedef struct {
+       unsigned char valid;
+       unsigned short bcchCarrier;
+       unsigned short bsic;
+       unsigned long int frameNumber;
+       unsigned short timeSlot;
+       unsigned short bitNumber;
+}__attribute__ ((packed)) tapi_gps_gsm_time_t;
+
+typedef struct {
+       unsigned char valid;
+       unsigned long int gpsTimeUncertainty;
+}__attribute__ ((packed)) tapi_gps_utran_gps_unc_t;
+
+typedef struct {
+       unsigned char valid;
+       signed long int driftRate;
+}__attribute__ ((packed)) tapi_gps_drift_rate_t;
+
+typedef struct {
+       tapi_gps_utran_gps_ref_time_t UtranGpsRefTime;
+       tapi_gps_utran_gps_unc_t UtranGpsUncertainty;
+       unsigned char UtranSfnUncertainty;
+       tapi_gps_drift_rate_t UtranDriftRate;
+}__attribute__ ((packed)) tapi_gps_utran_time_t;
+
+typedef struct {
+       unsigned short satID;
+       unsigned short tlmWord;
+       unsigned char antiSpoofFlag;
+       unsigned char alertFlag;
+       unsigned char tmlReservedBits;
+}__attribute__ ((packed)) tapi_gps_gps_tow_assist_t;
+
+typedef struct {
+       unsigned long int gpsTow;
+       unsigned long int gpsWeek;
+       unsigned char nrOfSats;
+       union {
+               tapi_gps_gsm_time_t gsm_time;
+               tapi_gps_utran_time_t UtranTime;
+       } networkTimeInfo;
+       tapi_gps_gps_tow_assist_t GpsTowAssist[12];
+}__attribute__ ((packed)) tapi_gps_ref_time_t;
+
+typedef struct {
+       unsigned char shapeType;
+       unsigned char hemisphere;
+       unsigned short altitude;
+       unsigned long int latitude;
+       signed long int longitude;
+       unsigned char directionOfAlt;
+       unsigned char semiMajorUncert;
+       unsigned char semiMinorUncert;
+       unsigned char majorAxis;
+       unsigned char altUncert;
+       unsigned char confidence;
+}__attribute__ ((packed)) tapi_gps_ref_loc_t;
+
+typedef struct {
+       unsigned char satId; //Satellite ID
+       unsigned short iode;
+       unsigned char udre;
+       signed short pseudoRangeCor;
+       signed short rangeRateCor;
+}__attribute__ ((packed)) tapi_gps_dgps_sat_list_t;
+
+typedef struct {
+       unsigned long int gpsTow;
+       unsigned char status;
+       unsigned long int numberOfSat;
+       tapi_gps_dgps_sat_list_t seqOfSatElement[16];
+}__attribute__ ((packed)) tapi_gps_dgps_correction_t;
+
+typedef struct {
+       unsigned long int rsv1; // 0~838860
+       unsigned long int rsv2; // 0~16777215
+       unsigned long int rsv3; // 0~16777215
+       unsigned long int rsv4; // 0~65535
+}__attribute__ ((packed)) tapi_gps_navi_subframe_rsv_t;
+
+typedef struct {
+       unsigned char ephemCodeOnL2; // 0~3
+       unsigned char ephemUra; // 0~15
+       unsigned char ephemSvHealth; // 0~63
+       unsigned short ephemIodc; // 0~1023
+       unsigned char ephemL2PFlag; // 0~1
+       tapi_gps_navi_subframe_rsv_t NavigationSubFrameRsv;
+       signed char ephemTgd; // -128~127
+       unsigned short ephemToc; // 0~37799
+       signed char ephemAf2; // -128~12
+       signed short ephemAf1; // -32768~32767
+       signed long int ephemAf0; // -2097152~2097151
+       signed short ephemCrs; // -32768~32767
+       signed short ephemDeltaN; // -32768~32767
+       signed long int ephemM0; // -2147483648~2147483647
+       signed short ephemCuc; // -32768~32767
+       unsigned long int ephemE; // 0~4294967295
+       signed short ephemCus; // -32768~32767
+       unsigned long int ephemAPowrHalf; // 0~4294967295
+       unsigned short ephemToe; // 0~37799
+       signed char ephemFitFlag; // 0~1
+       unsigned char ephemAoda; // 0~31
+       signed short ephemCic; // -32768~32767
+       signed long int ephemOmegaA0; // -2147483648~2147483647
+       signed short ephemCis; // -32768~32767
+       signed long int ephemI0; // -2147483648~2147483647
+       signed short ephemCrc; // -32768~32767
+       signed long int ephemW; // -2147483648~2147483647
+       signed long int ephemOmegaADot; // -8388608~8388607
+       signed short ephemIDot; // -8192~8191
+}__attribute__ ((packed)) tapi_gps_navi_ephe_t;
+
+typedef struct {
+       unsigned char satId;
+       unsigned char NavigationSatStatus;
+       tapi_gps_navi_ephe_t NavigationEphemeris;
+}__attribute__ ((packed)) tapi_gps_navi_sat_info_t;
+
+typedef struct {
+       unsigned long int numberOfSat;
+       tapi_gps_navi_sat_info_t NavigationSatInfo[16];
+}__attribute__ ((packed)) tapi_gps_navi_model_t;
+
+typedef struct {
+       signed char alfa0; // -128~127
+       signed char alfa1; // -128~127
+       signed char alfa2; // -128~127
+       signed char alfa3; // -128~127
+       signed char beta0; // -128~127
+       signed char beta1; // -128~127
+       signed char beta2; // -128~127
+       signed char beta3; // -128~127
+}__attribute__ ((packed)) tapi_gps_iono_model_t;
+
+typedef struct {
+       signed long int utcA1; // -8388608~8388607
+       signed long int utcA0; // -2147483648~2147483647
+       unsigned char utcTot; // 0~255
+       unsigned char utcWNt; // 0~255
+       signed char utcDeltaTls; // -128~127
+       unsigned char utcWNlsf; // 0~255
+       signed char utcDN; // -128~127
+       signed char utcDeltaTlsf; // -128~127
+}__attribute__ ((packed)) tapi_gps_utc_model_t;
+
+typedef struct {
+       signed char dataId; // only for 3G, 0~3, if this value is -1, it means this value is invalid
+       unsigned char satId;
+       unsigned short almanacE; // 0~65536
+       unsigned char almanacToa; // 0~255
+       signed short almanacKsii; // -32768~3276
+       signed short almanacOmegaDot; // -32768~3276
+       unsigned char almanacSvHealth; // 0~255
+       unsigned long int almanacAPowerHalf; // 0~16777215
+       signed long int almanacOmega0; // -8388608~8388607
+       signed long int almanacW; // -8388608~8388607
+       signed long int almanacM0; // -8388608~8388607
+       signed short almanacAf0; // -1024~1023
+       signed short almanacAf1; // -1024~1023
+}__attribute__ ((packed)) tapi_gps_almanac_sat_info_t;
+
+typedef struct {
+       unsigned char almanacWNa; // 0~255
+       unsigned long int numberOfSat;
+       tapi_gps_almanac_sat_info_t AlmanacSatInfo[64];
+}__attribute__ ((packed)) tapi_gps_almanac_model_t;
+
+typedef struct {
+       tapi_gps_utran_gps_ref_time_t AcqUtranGpsRefTime;
+       tapi_gps_utran_gps_unc_t AcqUtranGpsUncertainty;
+}__attribute__ ((packed)) tapi_gps_acq_utran_time_t;
+
+typedef struct {
+       unsigned char satId;
+       signed short doppler0; // -2048~2047 (real value is from -5120 to 5117.5 by step of 2.5)
+       unsigned char doppler1; // 0~63 (real value is from -0.966 to 0.483 by step of 0.023)
+       unsigned char dopplerUncertainty; // 0~7 (12.5, 25, 50, 100, 200)
+       unsigned short codePhase; // 0~1022
+       unsigned char intCodePhase; // 0~19
+       unsigned char gpsBitNumber; // 0~3
+       unsigned char codePhaseSearchWindow; // 0~15 (1023, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192)
+       unsigned char azimuth; // 0~31, 11.25 degree resolution
+       unsigned char elevation; // 0~7, 11.25 degree resolution
+}__attribute__ ((packed)) tapi_gps_acq_sat_info_t;
+
+typedef struct {
+       unsigned long int gpsTow;
+       union {
+               tapi_gps_gsm_time_t gsm_time;
+               tapi_gps_acq_utran_time_t AcqUtranTime;
+       } acquisitionTimeInfo;
+       unsigned long int numberOfSat;
+       tapi_gps_acq_sat_info_t lcsAcquisitionSatInfo[16];
+}__attribute__ ((packed)) tapi_gps_acq_assist_t;
+
+typedef struct {
+       unsigned char satId[16];
+       unsigned char numOfSat;
+}__attribute__ ((packed)) tapi_gps_r_time_int_t;
+
+typedef struct {
+       unsigned long int flag;
+//     tapi_gps_carrier_e_type cr_type;
+       tapi_gps_ref_time_t ref_time;
+       tapi_gps_ref_loc_t ref_loc;
+       tapi_gps_dgps_correction_t dgps_corrections;
+       tapi_gps_navi_model_t navi_model;
+       tapi_gps_iono_model_t iono_model;
+       tapi_gps_utc_model_t utc_model;
+       tapi_gps_almanac_model_t almanac;
+       tapi_gps_acq_assist_t acq_assist;
+       tapi_gps_r_time_int_t r_time_int;
+}__attribute__ ((packed)) tapi_gps_assist_data_noti_t; //APGPS -  GPS Assist Data Message - Notification
+
+
+/*****************************************************************************************************/
+/*                                     GPS Chipset on AP - END                                       */
+/*****************************************************************************************************/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ *
+ * @brief  This function is invoked to initialize GPS.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_init_gps(void);
+
+/**
+ *
+ * @brief  This function is invoked to deinitialize GPS.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_deinit_gps(void);
+
+/**
+ *
+ * @brief  This function is invoked to set GPS prefix information.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  type
+ *    - tapi_gps_fix_request_msg_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_gps_prefix_info(tapi_gps_fix_request_msg_t *type);
+
+/**
+ *
+ * @brief  This function is invoked to stop GPS session.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_stop_gps_session(void);
+
+/**
+ *
+ * @brief  This function is invoked to get GPS parameters.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_gps_parameters(void);
+
+/**
+ *
+ * @brief  This function is invoked to set GPS parameters.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  gps_params
+ *    - tapi_gps_param_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_gps_parameters(tapi_gps_param_t *gps_params);
+
+/**
+ *
+ * @brief  This function is invoked to confirm GPS data connection.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  pdp_cnf
+ *    - tapi_gps_data_conn_cnf_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_confirm_gps_data_connection(tapi_gps_data_conn_cnf_t *pdp_cnf);
+
+/**
+ *
+ * @brief  This function is invoked to confirm GPS DNS lookup.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  dns_cof
+ *    - tapi_gps_dns_lookup_cnf_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_confirm_gps_dns_lookup(tapi_gps_dns_lookup_cnf_t *dns_cof);
+
+/**
+ *
+ * @brief  This function is invoked to confirm GPS verification.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  result
+ *    - tapi_gps_verification_cnf_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_confirm_gps_verification(tapi_gps_verification_cnf_t result);
+
+/**
+ *
+ * @brief  This function is invoked to initialize GPS XTRA.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_init_gps_xtra(void);
+
+/**
+ *
+ * @brief  This function is invoked to deinit GPS XTRA.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_deinit_gps_xtra(void);
+
+/**
+ *
+ * @brief  This function is invoked to enable GPS XTRA.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_enable_gps_xtra(void);
+
+/**
+ *
+ * @brief  This function is invoked to disable GPS XTRA
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_disable_gps_xtra(void);
+
+/**
+ *
+ * @brief  This function is invoked to set GPS XTRA time
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  time_info
+ *    - tapi_gps_xtra_time_info_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_gps_xtra_time(tapi_gps_xtra_time_info_t *time_info);
+
+/**
+ *
+ * @brief  This function is invoked to set GPS XTRA data.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  data_info
+ *    - tapi_gps_xtra_data_info_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #int for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_gps_xtra_data(tapi_gps_xtra_data_info_t *data_info);
+
+
+int tel_confirm_gps_measure_pos(tapi_gps_measure_position_confirm_t *data);
+
+int tel_set_gps_frequency_aiding(unsigned char state);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_GPS_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiMisc.h b/include/tapi/ITapiMisc.h
new file mode 100644 (file)
index 0000000..8637bf1
--- /dev/null
@@ -0,0 +1,436 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup              TelephonyAPI
+ * @addtogroup   MISC_TAPI       MISC
+ * @{
+ *
+ * @file ITapiMisc.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi Misc Services.\n
+ It contains a sample set of function prototypes that would be required by applications.
+ This header file defines the Telephony - MISC - API's.  These API's will be used by the
+ processing Nitz and RTC time and some MISC functions.
+ */
+#ifndef _ITAPI_MISC_H_
+#define _ITAPI_MISC_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+
+#include <TelDefines.h>
+#include <TelUtility.h>
+#include <TelMisc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ *
+ * @brief  This function is invoked to Confirm Time zone Info.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  timezone_info
+ * -  timezone_info.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_confirm_misc_timezone_Info(tapi_misc_time_zone_info_type *timezone_info);
+
+/**
+ *
+ * @brief  This function is invoked to Get Time zone Mode.
+ *
+ * @par Sync (or) Async:
+ *  This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [out]  bTimezone_valid
+ * -  specifies whether true or false.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_get_misc_timezone_mode(int *bTimezone_valid);
+
+/**
+ *
+ * @brief  This function is invoked to Set Time zone Information
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  timezone_info
+ *    -  specifies the time zone information
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_misc_timezone_info(tapi_misc_time_zone_info_type *timezone_info);
+
+/**
+ *
+ * @brief  This function is invoked to  Get Time zone Information
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]
+ * - None.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_timezone_info(void);
+
+/**
+ *
+ * @brief  This function is invoked to Get ME version information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [out]  ver_info
+ *    - SW,HW version, RF calibration date, product code, model id(CDMA only), PRL/ERI information(CDMA only)
+ *     refer #TelMiscVersionInformation
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_me_version(TelMiscVersionInformation *ver_info);
+
+/**
+ *
+ * @brief  This function is invoked to Get ME IMEI/ESN/MEID for each phone type.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  sn_index
+ *    - serial type which user wants to get from current device. Refer #TelMiscSNIndexType_t
+ *
+ * @param  [out]  sn_info
+ *    - Device Serial number information. IMEI for GSM/UMTS device, ESN or MEID for CDMA device. Refer #TelMiscSNInformation
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_me_sn(TelMiscSNIndexType_t sn_index, TelMiscSNInformation *sn_info);
+
+/**
+ *
+ * @brief  This function is invoked to Get NAM info.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  nam_info_mask, nam_index
+ *    - nam info mask & index
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_nam_info(unsigned short nam_info_mask, TelMiscNamIndex_t nam_index);
+
+/**
+ *
+ * @brief  This function is invoked to Set NAM info.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  nam_info
+ *    - nam info
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_misc_nam_info(TelMiscNamInfo_t *nam_info);
+
+/**
+ *
+ * @brief  This function is used to enable emergency mode
+ * when device goes into emergency mode, user can not use normal call, SMS, and MMS service excepting emergency call.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  mode
+ *    - emergency mode value to request. 0:disable, 1:enable
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_misc_emergency_mode(int mode);
+
+/**
+ *
+ * @brief  This function is used to get current device emergency mode status.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [out] mode
+ *    - current emergency mode
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_misc_emergency_mode(int *mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _ITAPI_MISC_H_
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiNetText.h b/include/tapi/ITapiNetText.h
new file mode 100644 (file)
index 0000000..8a66b96
--- /dev/null
@@ -0,0 +1,1326 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  NetText_TAPI    NetText(SMS)
+* @{
+ *
+* @file ITapiNettext.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Nettext\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+ */
+
+#ifndef _ITAPI_NETTEXT_H_
+#define _ITAPI_NETTEXT_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TapiCommon.h>
+#include <TelNetText.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+ * @enum TelSmsDeviceStatus
+ * This defines the enumeration for device ready value
+ */
+typedef enum {
+       TAPI_NETTEXT_DEVICE_READY = 0x01, /**< device is ready */
+       TAPI_NETTEXT_DEVICE_NOT_READY = 0x02 /**< Device not ready */
+} TelSmsDeviceStatus;
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+/*================================================================================================*/
+ /**
+ * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
+ *             3GPP TS 23.040 (SMS-SUBMIT, SMS-COMMAND) to lower layers. This API allows keeping the dedicated link at lower layers
+ *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
+ *             used for transmission. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pDataPackage
+ *   - Contains SMS-SUBMIT TPDU
+ *
+ * @param [in] bMoreMsgToSend
+ *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
+ *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
+ *
+ * @param [out] pRequestId
+ * - Unique identifier for a particular request.
+ * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_CNF and the event data associated with this event
+ *  is #TelSmsDatapackageInfo_t that has SMS PDU as defined by 3GPP TS 23.040(SMS-SUBMIT-REPORT). Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * TelSmsDatapackageInfo_t *pDataPackage;
+ * int ret_status;
+ * int RequestId = 0;
+ *
+ * pDataPackage = (TelSmsDatapackageInfo_t*) malloc(sizeof(TelSmsDatapackageInfo_t));
+ * // fill the structure appropriately
+ * // Sca parameter is optional. If you don't provide Service center address, you should fill "00" in sca array.
+ * //  MsgLength is length of szData//fill the szData in TelSmsDatapackageInfo_t with SMS-SUBMIT or SMS-COMMAND TPDU.
+ * ret_status = tel_send_sms (pDataPackage, 0, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sms(const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, int *pRequestId);
+
+ /**
+ * @brief  This API is used to send an SMS message to the network.  This API interface allows transmitting SMS PDU as defined by
+ *             3GPP2 C.S0015 (SMS-SUBMIT, SMS-ACK, SMS-CANCEL) to lower layers. This API allows keeping the dedicated link at lower layers
+ *             by passing information as more messages to send in parameters. This will enable not to release if a dedicated connection is
+ *             used for transmission. Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pSmsMsgInfo
+ *   - Contains parameter mask, message type and data.
+ *
+ * @param [in] MoreMsgToSend
+ *   - will be set to TRUE when there are more than one message to be send or Multiple segmented concatenated
+ *      message to be send, otherwise FALSE. This flag indicates OEM that more messages to send.
+ *
+ * @param [out] pRequestId
+ * - Unique identifier for a particular request.
+ * - pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ * - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ *  SMS sent status is returned in this event TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF and the event data associated with this event
+ *  is #TelSmsIs637CauseCode_t. Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int requestId = 0;
+ * TelSmsMsgInfo_t pMsgInfo={0,};
+ * char* diallingNum;
+ * int dialNumLen;
+ * TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+ *
+ * memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+ * pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT; //fill structure appropriately
+ * pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+ *
+ * ret_status = tel_send_sms_msg(pDataPackage, 0 ,&requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, int MoreMsgToSend, int *pRequestId);
+
+ /**
+ * @brief  This function reads a message from SIM card storage. SIM index (index used when storing the SMS) number to be passed to in order
+ *             to read particular SMS message. Total number of messages can be retrieved by #TelTapiSmsGetCount function.
+  *            Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] Index
+ *  -  Index number of the message to be read
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_READ_SMS_CNF and the event data is #TelSmsData_t. Asynchronous return status is indicated
+ *  by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_read_sms_in_sim(0, &RequestId); //index value which is located in SIM
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_read_sms_in_sim(int Index, int* pRequestId);
+
+ /**
+ * @brief  This function writes a message to SIM storage area.
+ *           Access to this API is limited to in-house application and  we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pWriteData
+ *  - SMS message structure.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  TAPI library will send TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF asynchronous event for this request when received from TS.
+ *  The associated data is SIM Index in which the message stored. Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsData_t *pWriteData;
+ * char *msg = "This is an Test SMS";
+ * char *SCA = "821091";
+ *
+ * pWriteData = malloc(sizeof(TelSmsData_t));
+ *
+ * conv_service_center_address(pWriteData->SmsData.Sca, SCA); //convert service center address
+ * conv_msg_into_tpdu(pWriteData->SmsData.szData, pWriteData->SmsData.MsgLength, msg); // convert message into TPDU
+ * pWrite->MsgStatus = TAPI_NETTEXT_STATUS_READ;
+ * pWrite->SimIndex = -1;
+ *
+ * ret_status = tel_write_sms_in_sim (pWriteData, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_write_sms_in_sim(const TelSmsData_t *pWriteData, int *pRequestId);
+
+ /**
+ * @brief  This function deletes a message specified by index (SIM index used when storing the SMS)
+ *           number from the SIM storage area. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] Index
+ *  - Message index to delete.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The asynchronous event associated is TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF and the event data is SIM index from which
+ * the message has been deleted. Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t).\n
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_delete_sms_in_sim(1, &RequestId); //index which is located in SIM
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_delete_sms_in_sim(int Index, int *pRequestId);
+
+ /**
+ * @brief  This function is used to retrieve message count information like Total record count,
+ *  used record count and the indices list for SIM Storage. This is an asynchronous function and
+ *  the response will be sent back by event notification. Access to this API is limited, we recommend you use Message Framework API(MAPI) besides.
+ *  Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_COUNT_CNF and the event data is #TelSmsStoredMsgCountInfo_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * - External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_count (&RequestId); //get sms count in SIM
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_count(int *pRequestId);
+
+ /**
+ * @brief  This function is used to set SMS CB Message Identifiers in the appropriate EF-CBMI/EF-CBMIR file in (U)SIM.
+ *             This function also indicates underlying provider to enable or disable CB Channel on which CB messages are received.
+ *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI) besides.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pCBConfig
+ *  - This structure contains parameters to set SMS CB configuration \n
+ *      (i)  Cell broadcast service state. (Enabled/disabled.) \n
+ *      (ii) Cell broadcast message identifier, which denotes whether all cell broadcast message identifiers are selected or only
+ *           some of those.\n
+ *       (iii) The list count of message identifiers to be set.\n
+ *       (iv) The actual list of message identifiers to be set. Each identifier occupies 2 bytes. And the list ranges from 0x00 to 0xff. \n
+ *    These message identifiers denote the source and type of the CB message. Based on the message identifiers set in the SIM,
+ *    the ME receives CB messages with selected message identifiers.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsCbConfig_t *pCBConfig = NULL;
+ *
+ * pCBConfig = (TelSmsCbConfig_t *)malloc(sizeof(TelSmsCbConfig_t));
+ * pCBConfig->bCBEnabled = 1; //fill structure appropriately
+ * pCBConfig->SelectedId = 0x01;
+ * pCBConfig->MsgIdCount = 0x02;
+ *
+ * pCBConfig->MsgIDs[0] = 0x0c;
+ * pCBConfig->MsgIDs[1] = 0x0c;
+ * pCBConfig->MsgIDs[2] = 0xdf;
+ * pCBConfig->MsgIDs[3] = 0x00;
+ *
+ * ret_status = tel_set_sms_cb_config(pCBConfig, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_cb_config(const TelSmsCbConfig_t *pCBConfig, int *pRequestId);
+
+ /**
+ * @brief  This function is used to retrieve SMS CB configuration options from EFcbmi file in the SIM.
+ *             Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF and the event data is #TelSmsCbConfig_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * - External Apps.\n
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_cb_config (&RequestId); //result will come with async response
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_cb_config(int *pRequestId);
+
+
+ /**
+ * @brief This function is used to set SMS preferred bearer on which SMS has to be transmitted.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] BearerType
+ *  - Specifies the bearer type.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsBearerType_t BearerType = TAPI_NETTEXT_BEARER_PS_ONLY;
+ *
+ * ret_status = tel_set_sms_preferred_bearer(BearerType, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_preferred_bearer(TelSmsBearerType_t BearerType, int *pRequestId);
+
+ /**
+ * @brief  This function is used to get SMS preferred bearer on which SMS has to be transmitted.
+ *  This is an asynchronous function. Access to this API is limited to in-house application and , we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF and the associated event data is #TelSmsBearerType_t.
+ * Asynchronous return status is indicated by #TelSmsCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_preferred_bearer(&RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_preferred_bearer(int *pRequestId);
+
+ /**
+ * @brief This function is used to get the SMS parameters for a particular SMS (sent/received)
+ *  based on the SIM index where it is stored. This is an asynchronous function. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] index
+ *  - SIM index where the SMS is stored
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequest Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_PARAM_CNF and the event data is #TelSmsParams_t. Asynchronous return status
+ * is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_parameters(1, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_parameters(int index, int *pRequestId);
+
+ /**
+ * @brief  This function is used to set the short message service header parameters which are
+ *  used in the origination of MO messages. Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This API updates/sets SMS Parameters in EFsmsp file in the SIM storage
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pSmsSetParameters
+ *  - Contains SMS header Parameter information like service center address, destination address, validity period, protocol identifier,
+ *     data coding scheme.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event. Asynchronous
+ * return status is indicated by #TelSmsCause_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * TelSmsParams_t SmsSetParameters = {0,};
+ *
+ * SmsSetParameters.RecordIndex = 0x01;
+ * SmsSetParameters.RecordLen = 28;
+ * memcpy(SmsSetParameters.TpDestAddr.szDiallingNum, "9986529874", 10);
+ * printf("\ndial no is %s\n", SmsSetParameters.TpDestAddr.szDiallingNum);
+ * SmsSetParameters.TpDestAddr.DialNumLen = 10;
+ * SmsSetParameters.TpDestAddr.Ton = TAPI_SIM_TON_NATIONAL;//national no
+ * SmsSetParameters.TpDestAddr.Npi = TAPI_SIM_NPI_NATIONAL;
+ *
+ * ret_status = tel_set_sms_parameters(SmsSetParameters, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_parameters(const TelSmsParams_t *pSmsSetParameters, int *pRequestId);
+
+ /**
+ * @brief This function is used to send a delivery report for the received incoming SMS to the network.
+ *          Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pDataPackage
+ *  - Contains SMS Data package..
+ *
+ * @param [in] RPCause
+ *  - Indicates the reason for SMS-DELIVER failure
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF and there is no associated event data. Asynchronous return status
+ * is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - SMS-DELIVER-REPORT message structure should be in TPDU format as specified by 3GPP TS 23.040 SMS TPDU.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = 0;
+ * Int requestId = -1;
+ * TelSmsResponse_t RPCause;
+ * TelSmsDatapackageInfo_t *del_report = NULL;
+ *
+ * del_report = malloc(sizeof(TelSmsDatapackageInfo_t));
+ * memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
+ * //Encode Send Delivery Report here
+ * //EncodeSmsDeliveryReportTpdu();
+ *
+ * RPCause = TAPI_NETTEXT_SENDSMS_SUCCESS;
+ * printf("***receive message (Api:SendDeliverreport)****\n");
+ *
+ * ret_status = tel_send_sms_deliver_report(del_report, RPCause, &requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sms_deliver_report(const TelSmsDatapackageInfo_t *pDataPackage, TelSmsResponse_t RPCause, int *pRequestId);
+
+ /**
+ * @brief  This function is used to set SMS Service Centre Address information in order to send the SMS.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This API updates/sets service center address in EFsmsp file in the SIM storage.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pSCA
+ * - Contains the service centre address informations.
+ *
+ * @param [in] Index
+ * - Contains the record index of the Service center address information in the EF.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t).
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status;
+ * int RequestId = 0;
+ * BYTE        scabuf[512];
+ * char        scaNum[TAPI_NETTEXT_SCADDRESS_LEN_MAX];
+ * BYTE        scaNum_len =0;
+ * TelSmsAddressInfo_t *sc_addr = NULL;
+ * BYTE        packet[500];
+ * int idx = 0;
+ * int i;
+ *
+ * printf("***Setting the SCA(Api:SetSCA)****\n");
+ * sc_addr = (TelSmsAddressInfo_t *)malloc(sizeof(TelSmsAddressInfo_t));
+ * memset(sc_addr, 0, sizeof(sc_addr));
+ * memset(scaNum, 0, sizeof(scaNum));
+ * memset(scabuf, 0, sizeof(scabuf));
+ * sprintf(scaNum, "821091");
+ * scaNum_len = strlen(scaNum);
+ * scaNum_len = strlen(scaNum);
+ * scaNum[scaNum_len] = 0;
+ * scaNum_len = scaNum_len - 1;
+ *
+ * //idx = SmsUtilEncodeAddrField(packet, scaNum, scaNum_len, 0x01, 0x01);
+ * //get idx
+ * sc_addr->DialNumLen = idx ;
+ * memcpy(sc_addr->szDiallingNum, packet, (unsigned int)idx);
+ * ret_status = tel_set_sms_sca(sc_addr, 0, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_sca(const TelSmsAddressInfo_t *pSCA, int Index, int *pRequestId);
+
+ /**
+ * @brief  This function is used to get current SMS Service Centre Address information.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] Index
+ * - Contains the record index of the Service center address information in the EF.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETTEXT_GET_SCA_CNF and there is no data associated with this event.
+ * Asynchronous return status is indicated by #TelSmsResponse_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_sca(0, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_sca(int Index, int *pRequestId);
+
+ /**
+ * @brief This function is used by the applications to inform modem about  the memory status of PDA (whether FULL or AVAILABLE) so that modem can inform network .
+ *           Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] memoryStatus
+ *  - Contains Memory Status
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+ *
+ * ret_status = tel_set_sms_memory_status(MemoryStatus, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int  tel_set_sms_memory_status(int memoryStatus, int *pRequestId);
+
+ /**
+ * @brief  This function is used by the applications to set the message status in the SIM EF.
+ *           Access to this API is limited to in-house application and we recommend you use Message Framework API(MAPI).
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] Index
+ *  - Index of the message whose status has to be set.
+ *
+ *
+ * @param [in] msgStatus
+ *  - Status of the message to be set.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_SET_REQUEST_CNF and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ * int index = 1;
+ * int MemoryStatus = TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE;
+ *
+ * ret_status = tel_set_sms_memory_status(index, MemoryStatus, &RequestId); //result will come with async response
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_sms_message_status(int Index, TelSmsMsgStatus_t msgStatus, int *pRequestId);
+
+ /**
+ * @brief This function is used by the applications to get the count of SMS parameter records stored in SIM EF.
+ *           Access to this API is limited to in-house application.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  pRequestId value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_NETTEXT_PARAM_COUNT_IND and there is no associated event data. Asynchronous return status
+ *  is indicated by #TelSmsResponse_t
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetText.h>
+ *
+ * int ret_status = TAPI_API_SUCCESS;
+ * int RequestId = 0;
+ *
+ * ret_status = tel_get_sms_parameter_count (&RequestId); //result will come with async response
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sms_parameter_count(int *pRequestId);
+
+
+/**
+ * @brief This function is used by the applications check the device status (whether ready or not) .
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in]
+ * - None
+ *
+ * @param [out] pDeviceStatus
+ * - Contains Device Status
+ *
+ * @par Async Response Message:
+ *  None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_check_sms_device_status(int *pDeviceStatus);
+
+/**
+ * @brief This function is used by the applications to inform modem about the PDA status(whether PDA is ready to
+ * recieve messages from network or not).
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in]
+ *  - None
+ *
+ * @param [out]
+ *  - None
+ *
+ * @par Async Response Message:
+ *  None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_sms_device_status(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETTEXT_H_ */
+
+/**
+* @}
+*/
+
diff --git a/include/tapi/ITapiNetwork.h b/include/tapi/ITapiNetwork.h
new file mode 100644 (file)
index 0000000..3549457
--- /dev/null
@@ -0,0 +1,1391 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup Network_TAPI    NETWORK
+ * @{
+ *
+ * @file ITapiNetwork.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi Network\n
+ It contains a sample set of function prototypes that would be required by applications.
+ */
+
+#ifndef _ITAPI_NETWORK_H_
+#define _ITAPI_NETWORK_H_
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelErr.h>
+#include <TelDefines.h>
+#include <TelNetwork.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ * @brief  This function requests the lower layers to select the network automatically
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - This function passes the
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
+ * is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ *
+ * // AUTOMATIC MODE
+ * ret_status = tel_select_network_automatic(&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_network_automatic(int *pRequestId);
+
+/**
+ * @brief  This function requests the lower layers to select the network (PLMN) which has been selected by the user from the Network List
+ *           displayed to the User.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - This function passes the .
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] Plmn Identification
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SELECT_CNF and there is no data associated with this event. Asynchronous return status
+ * is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ * unsigned int plmn = 0;
+ *
+ * // MANUAL MODE
+ * plmn = 45454;
+ * ret_status = tel_select_network_manual(Plmn, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_network_manual(unsigned int Plmn, int *pRequestId);
+
+/**
+ * @brief  This function sends a request to do manual network selection to search for the available networks and provide the
+ *           Network List to the User/Application.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SEARCH_CNF and the event data is #TelNetworkPlmnList_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - In the available network list, user can select one of the networks successfully.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestID;
+ *
+ * // NETWORK SEARCH
+ * ret_status = tel_search_network(&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_search_network(int *pRequestId);
+
+/**
+ * @brief  This function requests for the present network selection mode i.e. automatic or manual.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF and the event data is #TelNetworkSelectionMode_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET THE SELECTION MODE
+ * ret_status = tel_get_network_selection_mode (&RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_selection_mode(int *pRequestId);
+
+/**
+ * @brief  This function is called when User/application wants to configure the service domain to only CS or Only PS or Both.
+ * This API triggers the underlying protocol stack to do register with Network for only CS services or only PS services
+ * or both based on the option set using this API.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] ServiceDomain
+ *    -  Specifies the type of Service domain (Packet switch, circuit switch,etc)
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SET_SVC_DOMAIN_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // SET NETWORK SERVICE DOMAIN
+ * TelNetworkServiceDomain_t ServiceDomain = TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC;
+ *
+ * ret_status = tel_set_network_service_domain (ServiceDomain, &RequestId);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_service_domain(TelNetworkServiceDomain_t ServiceDomain,
+               int *pRequestId);
+
+/**
+ * @brief  This function requests for the present network service domain i.e. CS or PS or both or automatic.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GET_SVC_DOMAIN_CNF and the event data is #TelNetworkServiceDomain_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK SERVICE DOMAIN
+ * ret_status = tel_get_network_service_domain (&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_service_domain(int *pRequestId);
+
+/**
+ * @brief  This function allows to configure the Network Mode (Automatic, GSM, WCDMA) at OEM provider based on which lower
+ * layers can scan only those radio access technologies for registering with network.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] NwMode
+ *    - Specifies the network mode i.e. Automatic, WCDMA, GSM, CDMA and WLAN.
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETNWMODE_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ * TelNetworkMode_t NwMode = TAPI_NETWORK_MODE_AUTOMATIC;
+ *
+ * // SET NETWORK MODE
+ * ret_status = tel_set_network_mode(NwMode, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_mode(TelNetworkMode_t NwMode, int *pRequestId);
+
+/**
+ * @brief  This function requests for the present network mode.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETNWMODE_CNF and the event data is #TelNetworkMode_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * ret_status = tel_get_network_mode(&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_mode(int *pRequestId);
+
+/**
+ * @brief  This function is invoked to set the network band and allows the underlying OEM provider to scan the set band.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]  BandMode
+ *    -  Band preference indicates the band provide to be preferred or select the band .
+ * @param[in]  Band
+ *    -  This enumeration defines different network Bands that user can choose.
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETNWBAND_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * TelNetworkBandPreferred_t BandMode = TAPI_NETWORK_BAND_MODE_PREFERRED;
+ * TelNetworkBand_t Band = TAPI_NETWORK_BAND_TYPE_GSM_900_1800;
+ *
+ * // SET NETWORK BAND
+ * ret_status = tel_set_network_band (BandMode, Band, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_band(TelNetworkBandPreferred_t BandMode,
+               TelNetworkBand_t Band, int *pRequestId);
+
+/**
+ * @brief  This function requests for the present network band.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETNWBAND_CNF and the event data is #TelNetworkBand_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK BAND
+ * ret_status = tel_get_network_band(&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_band(int *pRequestId);
+
+/**
+ * @brief  This function is invoked to set the network preferred plmn
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]  Operation
+ *    -  Operation indicates the operation to be done on preferred plmn .
+ * @param[in]  pPreffPlmnInfo
+ *    -  This gives the plmn Info.
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETPREFFPLMN_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * TelNetworkPrefferedPlmnOp_t Operation = TAPI_NETWORK_PREF_PLMN_ADD;
+ * TelNetworkPrefferedPlmnInfo_t PreffPlmnInfo;
+ *
+ * memset(&PreffPlmnInfo, 0, sizeof(TelNetworkPrefferedPlmnInfo_t));
+ * PreffPlmnInfo.Index = 0;
+ * PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+ * unsigned char *plmn = "45454";
+ * memcpy(PreffPlmnInfo.Plmn, plmn, strlen(plmn));
+ *
+ * // SET PREFERRED PLMN
+ * ret_status = tel_set_network_preferred_plmn(Operation, PreffPlmnInfo, &RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_preferred_plmn(TelNetworkPrefferedPlmnOp_t Operation,
+               TelNetworkPrefferedPlmnInfo_t *pPreffPlmnInfo, int *pRequestId);
+
+/**
+ * @brief  This function is invoked to get the preferred plmn list
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETPREFFPLMN_CNF and event data associated with this event  is #TelNetworkPrefferedPlmnList_t
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int RequestId;
+ *
+ * // GET NETWORK PREFERRED PLMN
+ * ret_status = tel_get_network_preferred_plmn(&RequestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_preferred_plmn(int *pRequestId);
+
+/**
+ * @brief  This function is invoked to set the CDMA Roaming Mode
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]  RoamingMode
+ *  -  CDMA Roaming Mode.
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * TelNetworkRoamingMode_t roamingMode;
+ * int ret_status;
+ * int requestId;
+ *
+ * roamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_HOME_ONLY;
+ * roamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_ON;
+ *
+ * // SET NETWORK ROAMING
+ * ret_status = tel_set_network_roaming(&roamingMode, &requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_roaming(TelNetworkRoamingMode_t *RoamingMode,
+               int *pRequestId);
+
+/**
+ * @brief  This function is invoked to get the CDMA Roaming Mode
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF and event data associated with this event  is #TelNetworkRoamingMode_t
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int requestId;
+ *
+ * // GET NETWORK ROAMING MODE
+ * ret_status = tel_get_network_roaming(&requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_roaming(int *pRequestId);
+
+/**
+ * @brief  This function is invoked to set the CDMA Hybrid Mode
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]  CDMAHybridMode
+ *  -  CDMA Hybrid Mode.
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * TelNetworkCDMAHybridMode_t cdmaHybridMode;
+ * int ret_status;
+ * int requestId;
+ *
+ * cdmaHybridMode = TAPI_NETWORK_CDMA_HYBRID;
+ *
+ * // GET NETWORK HYBRID IN CDMA
+ * ret_status = tel_set_network_hybrid_in_cdma(cdmaHybridMode, &requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_set_network_hybrid_in_cdma(TelNetworkCDMAHybridMode_t CDMAHybridMode,
+               int *pRequestId);
+
+/**
+ * @brief  This function is invoked to get the CDMA Hybrid Mode
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF and event data associated with this event  is #TelNetworkCDMAHybridMode_t
+ * and asynchronous  return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiNetwork.h>
+ *
+ * int ret_status;
+ * int requestId;
+ *
+ * // GET NETWORK HYBRID IN CDMA
+ * ret_status = tel_get_network_hybrid_in_cdma(&requestId);
+ *
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ *
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_network_hybrid_in_cdma(int *pRequestId);
+
+/**
+ *
+ * @brief  This API allows lower layers to scan based on preferred network order based options passed.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - If network order list array holds the value "TAPI_NETWORK_MODE_AUTOMATIC" then other following values in the list shall be ignored.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pPrefNwOrder
+ *    -  This parameter is an array of size TAPI_NW_ORDER_MAX(which is defined as 5) of #TelNetworkMode_t type specifies the preferred
+ *        network order for camping.
+ * @param [out]  pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETNWORDER_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_network_acquisition_order(TelNetworkMode_t *pPrefNwOrder,
+               int *pRequestId);
+
+/**
+ *
+ * @brief  This function requests for the present network selection order.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETNWORDER_CNF and the event data is array of size
+ * TAPI_NW_ORDER_MAX(which is defined as 5) of #TelNetworkMode_t.
+ * Asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_network_acquisition_order(int *pRequestId);
+
+/**
+ *
+ * @brief  This function is invoked to set the power on attach.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  PowerOnAttach
+ *    -  Power on attach preference to set .
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_SETPOWERONATTACH_CNF and there is no event data associated with this event and asynchronous
+ * return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_network_power_on_attach(TelNetworkPowerOnAttach_t PowerOnAttach,
+               int *pRequestId);
+
+/**
+ *
+ * @brief  This function is invoked to get the network power on attach status.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_GETPOWERONATTACH_CNF and event data associated with this event is #TelNetworkPowerOnAttach_t
+ * asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_network_power_on_attach(int *pRequestId);
+
+/**
+ * @brief  This function is called to cancel the triggered manual network search.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - Manual network search is already triggered.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * External Apps.
+ *
+ */
+int tel_cancel_network_manual_search(int *pRequestId);
+
+/**
+ *
+ * @brief  This function is called to cancel manual network selection where user has already selected a network from the network list.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[out] pRequestId
+ *     -  Unique identifier for a particular request.
+ *     -  Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *     -  -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_NETWORK_CANCELMANUALSELECTION_CNF and there is no event data associated with this event
+ * and asynchronous return status is indicated by #TelNetworkOperationCause_t.
+ *
+ * @pre
+ *  - User should have selected a network from available network list.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_cancel_network_manual_selection(int *pRequestId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_NETWORK_H_ */
+
+/**
+ * @}
+ */
diff --git a/include/tapi/ITapiOmadm.h b/include/tapi/ITapiOmadm.h
new file mode 100644 (file)
index 0000000..8781377
--- /dev/null
@@ -0,0 +1,352 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup           TELEPHONY_API
+ * @addtogroup OMADM OMA-DM
+ * @{
+ * @file ITapiOmadm.h
+ *
+ * OMA-DM APIs allow an application to accomplish the following services: @n
+ * - Get Model Name. @n
+ */
+
+#ifndef _ITAPI_OMADM_H_
+#define _ITAPI_OMADM_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_OMADM_MAX_PRL_SIZE_LEN            17              /** Maximum length of PRL size string */
+#define TAPI_OMADM_MAX_MODEL_NAME_LEN  17              /** Maximum length of Model name string */
+#define TAPI_OMADM_MAX_OEM_NAME_LEN            65              /** Maximum length of OEM name string */
+#define TAPI_OMADM_MAX_SW_VER_LEN              17              /** Maximum length of SW version string */
+#define TAPI_OMADM_MAX_PRL_DATA_LEN            237             /** Maximum length of PRL data */
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * @enum TelDataSignalType
+ * Data Signal Type
+ */
+typedef enum {
+       TAPI_OMADM_PRL_WRITE_SUCCESS = 0x00, /**< Success */
+       TAPI_OMADM_PRL_WRITE_INVALID_SIZE = 0x01, /**< PRL size is invalid */
+       TAPI_OMADM_PRL_WRITE_FAIL = 0x02 /**< Fail */
+} TelOMADMPRLWriteStatus_t;
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * This structure contains PRL size string.
+ */
+typedef struct {
+       unsigned char prl_size[TAPI_OMADM_MAX_PRL_SIZE_LEN]; /**< PRL size string information */
+} TelOMADMPRLSize_t;
+
+/**
+ * This structure contains Model name string.
+ */
+typedef struct {
+       unsigned char model_name[TAPI_OMADM_MAX_MODEL_NAME_LEN]; /**< model name information */
+} TelOMADMModelName_t;
+
+/**
+ * This structure contains OEM name string.
+ */
+typedef struct {
+       unsigned char oem_name[TAPI_OMADM_MAX_OEM_NAME_LEN]; /**< OEM information */
+} TelOMADMOEMName_t;
+
+/**
+ * This structure contains S/W version string.
+ */
+typedef struct {
+       unsigned char sw_ver[TAPI_OMADM_MAX_SW_VER_LEN]; /**< S/W version information */
+} TelOMADMSWVersion_t;
+
+/**
+ * This structure contains PRL data packet.
+ */
+typedef struct {
+       unsigned int total_size; /**< total size */
+       unsigned short current_size; /**< current size */
+       unsigned char more; /**< more data or not */
+       unsigned char prl_data[TAPI_OMADM_MAX_PRL_DATA_LEN]; /**< PRL data information */
+} TelOMADMPRLData_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ * @brief This function requests PRL size.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_PRL_SIZE_GET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_omadm_prl_size(int *pRequestID);
+
+/**
+ * @brief This function requests Model name.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_MODEL_NAME_GET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_omadm_model_name(int *pRequestID);
+
+/**
+ * @brief This function requests OEM name.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_OEM_NAME_GET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_omadm_oem_name(int *pRequestID);
+
+/**
+ * @brief This function requests SW version.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_SW_VERSION_GET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_omadm_sw_ver(int *pRequestID);
+
+/**
+ * @brief This function requests read PRL data.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_PRL_READ_GET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_read_omadm_ril(int *pRequestID);
+
+/**
+ * @brief This function requests write PRL data.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pPrlData
+ * - PRL data.
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_OMADM_PRL_WRITE_SET_CNF.
+ *
+ * @pre
+ *  - None
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_write_omadm_prl(TelOMADMPRLData_t *pPrlData, int *pRequestID);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_OMADM_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiPS.h b/include/tapi/ITapiPS.h
new file mode 100644 (file)
index 0000000..e522ff6
--- /dev/null
@@ -0,0 +1,579 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @open
+ * @ingroup            TelephonyAPI
+ * @addtogroup GPRS_TAPI       GPRS
+ * @{
+ *
+ * GPRS APIs allow an application to accomplish the following services: @n
+ * - activate , deactivate PDP service @n
+ *
+ */
+
+#ifndef        _ITAPI_PS_H_
+#define _ITAPI_PS_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TelErr.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+/* Defining macros for PSMAN profiles */
+#define TAPI_PDP_ADDR_LEN_MAX          20
+#define TAPI_PDP_APN_LEN_MAX           101
+#define TAPI_PDP_NAME_LEN_MAX          16
+#define TAPI_PDP_MAX_USERNAME_LEN      32
+#define TAPI_PDP_MAX_PASSWORD_LEN      32
+#define TAPI_PDP_MAX_DNS_LEN           16
+#define MAX_PDP_CONTEXTS_ALLOWED       3
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+typedef enum {
+     TAPI_GPRS_DEFINE_PDP_CONTEXT=0x01,                /* 0x01 : Define PDP Context */
+     TAPI_GSM_GPRS_QOS,                                                /* 0x02 : Quality of Service Profile */
+     TAPI_GSM_GPRS_PS,                                         /* 0x03 : PS attach or detach */
+     TAPI_GSM_GPRS_PDP_CONTEXT,                                /* 0x04 : PDP context activate or deactivate */
+     TAPI_GSM_GPRS_ENTER_DATA,                         /* 0x05 : Enter data */
+     TAPI_GSM_GPRS_SHOW_PDP_ADDR,                      /* 0x06 : Show PDP address*/
+     TAPI_GSM_GPRS_MS_CLASS,                                   /* 0x07 : GPRS mobile station class*/
+     TAPI_GSM_GPRS_3G_QUAL_SRVC_PROFILE,               /* 0x08 : 3G Quality of service profile */
+     TAPI_GSM_GPRS_IP_CONFIGURATION,                   /* 0x09 : Multiple PDP context IP configuration */
+     TAPI_GSM_GPRS_DEFINE_SEC_PDP_CONTEXT,             /* 0X0A : AT+CGDSCONT   05.10.07 ky.doo EDIT */
+     TAPI_GSM_GPRS_TFT,                                                        /* 0X0B : AT+CGTFT      05.10.07 ky.doo EDIT */
+     TAPI_GSM_GPRS_HSDPA_STATUS,                               /* 0x0C : HSDPA status */
+     TAPI_GSM_GPRS_CURRENT_SESSION_DATA_COUNTER,/* 0x0D : Current data session tx/rx total bytes */
+     TAPI_GSM_GPRS_DUN_PIN_CTRL ,               /* 0x0F : Dial up Networking Pin Control Message */
+     TAPI_GSM_GPRS_CALL_STATUS,                            /* 0x10 : DS TE2 Data Call result(Multiple PDP) */
+     TAPI_GSM_GPRS_MAX
+} tapi_gprs_type_t;
+
+typedef enum{
+       TAPI_PDP_MODE_ADD = 0x01,                               /*ADD*/
+       TAPI_PDP_MODE_DEL = 0x02                                        /*Delete*/
+} tapi_pdp_mode_type_t;
+
+typedef enum{
+       TAPI_PDP_AUTH_NONE = 0x0,               /* No authentication           */
+       TAPI_PDP_AUTH_PAP  = 0x1,               /* PAP authentication          */
+       TAPI_PDP_AUTH_CHAP = 0x2,               /* CHAP authentication       */
+       TAPI_PDP_AUTH_MAX  = 0xff
+
+} tapi_pdp_auth_type_t;
+
+typedef enum {
+       GPRS_PDP_TYPE_UNKNOWN   = 0x00,
+       GPRS_PDP_TYPE_X25               = 0x01,
+       GPRS_PDP_TYPE_IP                = 0x02,
+       GPRS_PDP_TYPE_IHOSP     = 0x03,
+       GPRS_PDP_TYPE_PPP               = 0x04,
+       GPRS_PDP_TYPE_IPV6              = 0x05,
+} tapi_pdp_type_t;
+
+/* HSDPA Status Variable */
+typedef enum {
+  HSDPA_INACTIVE,
+  HSDPA_ACTIVE
+} tapi_hspda_status_type;
+
+typedef enum {
+       GPRS_SIGNAL_DCD         = 0x01,
+       GPRS_DATA_SIGNAL_DTR    = 0x04,
+       GPRS_DATA_SIGNAL_DSR    = 0x06,
+       GPRS_DATA_SIGNAL_RTS    = 0x07,
+       GPRS_DATA_SIGNAL_CTS    = 0x08,
+       GPRS_DATA_SIGNAL_RI     = 0x09,
+} tapi_ps_btdun_pincontrol_signal;
+
+typedef enum {
+       GPRS_SIGNAL_STATUS_OFF  = 0x00,
+       GPRS_SIGNAL_STATUS_ON   = 0x01,
+} tapi_ps_btdun_pincontrol_status;
+
+typedef enum {
+       TAPI_GPRS_PS_STATUS_DETACH = 0x00,
+       TAPI_GPRS_PS_STATUS_ATTACH = 0x01,
+       TAPI_GPRS_PS_STATUS_MAX
+} tapi_gprs_pdp_status;
+
+typedef enum {
+       TAPI_GPRS_MO_SMS_SVC_CIRCUIT                    = 0x00,
+       TAPI_GPRS_MO_SMS_SVC_GPRS                               = 0x01,
+       TAPI_GPRS_MO_SMS_SVC_CIRCUITPREFERRED   = 0x02,
+       TAPI_GPRS_MO_SMS_SVC_GPRSPREFERRED              = 0x03,
+} tapi_gprs_pdp_mo_sms_service;
+
+typedef enum {
+       TAPI_GPRS_3G_QOS_TYPE_REQUEST                   = 0x01,
+       TAPI_GPRS_3G_QOS_TYPE_MIN_ACCEPT                = 0x02,
+       TAPI_GPRS_3G_QOS_TYPE_NEGOTIATE         = 0x03,
+} tapi_gprs_pdp_3g_qos_type;
+
+typedef enum {
+       TAPI_GPRS_3G_QOS_DELI_ORDER_NO                  = 0x00,
+       TAPI_GPRS_3G_QOS_DELI_ORDER_YES                 = 0x01,
+       TAPI_GPRS_3G_QOS_DELI_ORDER_SUBSCRIBE   = 0x02,
+} tapi_gprs_pdp_3g_qos_deli_order;
+
+typedef enum {
+       DSTATE_OK                       = 0x00,
+       DSTATE_CONNECT,
+       DSTATE_RING,
+       DSTATE_NO_CARRIER,
+       DSTATE_ERROR,
+       DSTATE_NO_DIALTONE,
+       DSTATE_BUSY,
+       DSTATE_NO_ANSWER,
+       DSTATE_RESULT_FDN,
+       DSTATE_MAX,
+} tapi_gprs_data_status;
+
+typedef enum {
+       PDP_ACT_FAILURE_CAUSE_NORMAL                                    = 0x00,                 // 0x00 : Normal Process ( no problem )
+       PDP_ACT_FAILURE_CAUSE_REL_BY_USER                               = 0x01,                 // Call Released by User
+       PDP_ACT_FAILURE_CAUSE_REGULAR_DEACTIVATION              = 0x02,                 // Regular deactivation
+       PDP_ACT_FAILURE_CAUSE_LLC_SNDCP                         = 0x03,                 // LLC SNDCP failure
+       PDP_ACT_FAILURE_CAUSE_INSUFFICIENT_RESOURCE     = 0x04,                 // Insufficient resources
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_APN                               = 0x05,                 // Missing or unknown apn
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_PDP_ADDRESS               = 0x06,         // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_USER_AUTH_FAILED                  = 0x07,         // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_ACT_REJ_GGSN                              = 0x08,                 // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_ACT_REJ_UNSPECIFIED               = 0x09,                 // Unknown PDP address or type
+       PDP_ACT_FAILURE_CAUSE_SVC_OPTION_NOT_SUPPORTED  = 0x0A,         // Service option not supported
+       PDP_ACT_FAILURE_CAUSE_SVC_NOT_SUBSCRIBED                = 0x0B,         // Requested service option not subscribed
+       PDP_ACT_FAILURE_CAUSE_SVC_OPT_OUT_ORDER         = 0x0C,                 // Service out of order
+    PDP_ACT_FAILURE_CAUSE_NSAPI_USED                           = 0x0D,         // NSAPI already used
+       PDP_ACT_FAILURE_CAUSE_QOS_NOT_ACCEPTED                  = 0x0E,         // QoS not accepted
+       PDP_ACT_FAILURE_CAUSE_NETWORK_FAILURE                   = 0x0F,         // Network Failure
+    PDP_ACT_FAILURE_CAUSE_REACT_REQUIRED                       = 0x10,         // Reactivation Required
+       PDP_ACT_FAILURE_CAUSE_REATURE_NOT_SUPPORTED             = 0x11,         // Feature not supported
+       PDP_ACT_FAILURE_CAUSE_TFT_FILTER_ERROR                  = 0x12,         // TFT or filter error
+       PDP_ACT_FAILURE_CAUSE_UNKOWN_PDP_CONTEXT                = 0x13,         // Unknown PDP context
+       PDP_ACT_FAILURE_CAUSE_INVALID_MSG                               = 0x14,         // Invalid MSG
+       PDP_ACT_FAILURE_CAUSE_PROTOCOL_ERROR                    = 0x15,         // Protocol error
+       PDP_ACT_FAILURE_CAUSE_MOBILE_FAILURE_ERROR              = 0x16,         // Mobile failure error
+       PDP_ACT_FAILURE_CAUSE_TIMEOUT_ERROR                             = 0x17,         // Timeout error
+       PDP_ACT_FAILURE_CAUSE_UNKNOWN_ERROR                             = 0x18,         // Unknown error
+       PDP_ACT_FAILURE_CAUSE_MAX ,
+} tapi_gprs_ds_status_reason;
+
+typedef enum {
+       INTERNAL_PS_CALL = 0x00,
+       EXTERNAL_PS_CALL = 0x01
+} tapi_gprs_external_status;
+
+typedef enum {
+       PDP_DEVICE_INFO_GET = 0x00,
+       PDP_DEVICE_INFO_SET = 0x01
+} tapi_gprs_device_info;
+
+typedef enum {
+       TAPI_PDP_STATE_NONE,             /* 0x00 Default state for a given PDP context*/
+    TAPI_PDP_STATE_ACTIVATING,          /* 0x01 TS will be in this state when there is a START PDP Request until it is  activated by modem - This state PDP is not yet UP*/
+    TAPI_PDP_STATE_ACTIVE,           /* 0x02 After PDP activation is completed by modem and sent to PDA - This state PDP is fully UP*/
+    TAPI_PDP_STATE_MODIFYING,        /* 0x03 This state is reserved for future use - When TS support modifying existing PDP*/
+    TAPI_PDP_STATE_DEACTIVATING,     /* 0x04 TS will be in this state when there is STOP PDP request from App until it is deactivated by modem */
+} tapi_gprs_state;
+
+typedef enum {
+       TAPI_PDP_DATA_DORMANCY_SUCCESS,
+       TAPI_PDP_DATA_DORMANCY_FAILED
+} TelTapiGprsDataDormancy_t;
+
+/* Suspend Reason Type */
+typedef enum {
+  TAPI_PDP_SUSPEND_NO_SVC                      = 0x01,
+  TAPI_PDP_SUSPEND_RAT_CHANGE          = 0x02,
+  TAPI_PDP_SUSPEND_GPRS_HOLD           = 0x03,
+  TAPI_PDP_SUSPEND_FLOW_CONTROL        = 0x04,
+  TAPI_PDP_SUSPEND_GPRS_SUSPEND        = 0x05,
+  TAPI_PDP_SUSPEND_RAU                 = 0x06,
+  TAPI_PDP_SUSPEND_LU                      = 0x07,
+  TAPI_PDP_TRANSFER_STATUS_MAX
+} tapi_gprs_suspend_type;
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+typedef struct {
+       tapi_gprs_type_t type;
+       tapi_phone_err_t cause;
+} tapi_gprs_error_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_pdp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_stop_rsp_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_activation_rsp_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+} tapi_ps_net_stop_ind_t;
+
+/*     ps attach response      */
+typedef struct {
+       int     state;
+       int     transfer_status;
+} tapi_ps_attach_response_t;
+
+/*     ps call statistics      */
+typedef struct {
+       unsigned char       cid;        //      call id . for proper bit alignment prefer int than short
+       unsigned long int       rx;     //      total number of bytes received for this cid
+       unsigned long int       tx;             //      total number of bytes transmitted for this cid
+} tapi_ps_call_statistics_t;
+
+typedef struct {
+       tapi_ps_btdun_pincontrol_signal signal;
+       tapi_ps_btdun_pincontrol_status status;
+} tapi_ps_btdun_pincontrol;
+
+/**
+ * This structure defines PDP information.
+ * @see        ps_net_info_t
+ */
+typedef struct {
+   unsigned short      is_primary_cont;                /*Primary or secondary*/
+   int                         primary_cont;                   /*Primary context id, if the is the context is secondary*/
+   char                        apn[TAPI_PDP_APN_LEN_MAX];
+   unsigned char       pdp_address[TAPI_PDP_ADDR_LEN_MAX];
+   unsigned char       username[TAPI_PDP_MAX_USERNAME_LEN ];
+   unsigned char       password[TAPI_PDP_MAX_PASSWORD_LEN ];
+   unsigned char       dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
+   unsigned char       dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
+   tapi_pdp_auth_type_t auth_type;
+   tapi_pdp_type_t             pdp_type;
+} tapi_pdp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_info_t pdp_info;
+} tapi_ps_net_start_req_t;
+
+typedef struct {
+       unsigned short  is_primary_cont;  /*Primary or secondary*/
+       unsigned char           username[TAPI_PDP_MAX_USERNAME_LEN ];
+       unsigned char   password[TAPI_PDP_MAX_PASSWORD_LEN ];
+       unsigned char   dns1[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS1
+       unsigned char   dns2[TAPI_PDP_MAX_DNS_LEN ];               // @field Context activation DNS2
+    tapi_pdp_auth_type_t auth_type;
+} tapi_pdpdeact_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdpdeact_info_t pdp_info;
+} tapi_ps_net_stop_req_t;
+
+typedef struct {
+       unsigned char field_flag;
+       unsigned char ip_address[4];
+       unsigned char primary_dns[4];
+       unsigned char secondary_dns[4];
+       unsigned char gateway[4];
+       unsigned char subnet_mask[4];
+} tapi_pdp_resp_info_t;
+
+typedef struct {
+       int cont_id;
+       tapi_pdp_err_t err;
+       tapi_pdp_resp_info_t pdp_info;
+       char devname[TAPI_PDP_NAME_LEN_MAX];
+} tapi_ps_net_start_rsp_t;
+
+typedef struct tagSetPDPActDeact {
+       int cid;
+       unsigned char username[TAPI_PDP_MAX_USERNAME_LEN ];     // @field Context activation user name
+       unsigned char passwd[TAPI_PDP_MAX_PASSWORD_LEN ];               // @field Context activation password
+       unsigned char dns1[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS1
+       unsigned char dns2[TAPI_PDP_MAX_DNS_LEN ];                              // @field Context activation DNS2
+       tapi_pdp_auth_type_t    auth;
+} tapi_gprs_pdp_act_deact_set;
+
+typedef struct {
+       char cid;
+       tapi_gprs_pdp_status state;
+} tapi_gprs_pdp_status_info;
+
+typedef struct {
+       char num_act;
+       tapi_gprs_pdp_status_info info[3];
+} tapi_gprs_pdp_status_res;
+
+typedef struct {
+       char cid;
+       char address[20];
+} tapi_gprs_pdp_address_res;
+
+typedef struct {
+       unsigned char                           cid;
+       tapi_gprs_data_status           status;
+       tapi_gprs_ds_status_reason      reason;
+       unsigned char                           external;
+} tapi_gprs_pdp_status_reason_info;
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+
+/**
+ * @brief  This API is used to request to Telephony Server to set PDP context define info, PDP activation.
+ *  Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pNet_start_req_info
+ * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_PDP_ACT_RSP  and the event data is #tapi_ps_pdp_info_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_net_start_req_t start_req;
+ *
+ * start_req.cont_id = CONTEXT_ID; //use proper id regarding upper layer usage
+ * strcpy(start_req.pdp_info.apn, APN_ADDRESS);
+ *
+ * ret_status = tel_activate_gprs_pdp (&start_req, &request_id);
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_activate_gprs_pdp(const tapi_ps_net_start_req_t *pNet_start_req_info, int *pRequestID);
+
+/**
+ * @brief  This API is used to request to Telephony Server to deactivate PDP service
+ *  Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] net_stop_req_info
+ * - This input has the PDP context define info, PDP activation info #tapi_ps_net_start_req_t
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_PDP_DEACT_RSP  and the event data is #tapi_ps_pdp_info_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_net_stop_req_t end_req;
+ *
+ * memset(&end_req, 0, sizeof(tapi_ps_net_stop_req_t));
+ *
+ * end_req.cont_id = CONTEXT_ID;
+ *
+ * ret_status = tel_deactivate_gprs_pdp (&end_req, &request_id); //use context id which is used in activate time
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int    tel_deactivate_gprs_pdp(const tapi_ps_net_stop_req_t *net_stop_req_info, int *pRequestID);
+
+/**
+ * @brief  This API is used to request BT Dun enable or disable
+ *         Access to this API is limited, we recommend you use Data Network API
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pincontrol
+ * - This input has the BT Dun pin control information #tapi_ps_btdun_pincontrol
+ *
+ * @param [out] pRequestID
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI or TAPI_EVENT_PS_ERROR_IND.
+ * -In success, the event associated is TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI  and the event data is #tapi_ps_btdun_pincontrol.
+ *   In fail, the event associated is TAPI_EVENT_PS_ERROR_IND  and the event data is #tapi_gprs_error_info_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init or #tel_init_at_ecore_loop
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event or #tel_register_event_at_ecore_loop
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include <ITapiPS.h>
+ *
+ * int ret_status;
+ * int request_id = 0;
+ * tapi_ps_btdun_pincontrol bt_control;
+ *
+ * bt_control.signal = GPRS_SIGNAL_DCD;
+ * bt_control.status = GPRS_SIGNAL_STATUS_OFF;
+ *
+ * ret_status = tel_control_gprs_btdun_pin(bt_control, &request_id); //get control result with async response. current return value means whether request send low layer properly or not
+ * @endcode
+ *
+ * @see
+ *  - None.
+ *
+ * @remarks
+ *  - None.
+ */
+/*================================================================================================*/
+int tel_control_gprs_btdun_pin(tapi_ps_btdun_pincontrol pincontrol, int *pRequestID);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  //_ITAPI_PS_H_
+
+/**
+   *  @}
+   */
+
diff --git a/include/tapi/ITapiPower.h b/include/tapi/ITapiPower.h
new file mode 100644 (file)
index 0000000..2c5e4a1
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup POWER_TAPI      POWER
+ * @{
+ *
+ * These APIs allow an application to accomplish the following services: @n
+ * - Process power command @n
+ * - Reset the phone power (on / off), @n
+ * - Process airplane mode @n
+ */
+
+#ifndef _ITAPI_POWER_H_
+#define _ITAPI_POWER_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelUtility.h>
+#include <TelPower.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ *
+ * @brief  This API is used to turn power off or on the modem.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] cmd
+ * - This index value is the power command as #tapi_power_phone_cmd_t.
+ *
+ * @param [out]
+ *   - None
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_process_power_command(tapi_power_phone_cmd_t cmd);
+
+/**
+ *
+ * @brief  This API is used to enter or leave airplane mode
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] mode
+ * - This mode value is the flight flag #tapi_power_flight_mode_type_t.
+ *
+ * @param [out]
+ *   - None
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_POWER_FLIGHT_MODE_RESP  and the event data is #tapi_power_flight_mode_resp_type_t.
+ * Asynchronous return status is always TAPI_API_SUCCESS.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_set_flight_mode(tapi_power_flight_mode_type_t mode);
+
+/**
+ *
+ * @brief  This API is used to reset modem
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in]
+ * - None
+ *
+ * @param [out]
+ *   - None
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_reset_modem(void);
+
+/**
+ *
+ * @brief  This API is used to get the ramdump file of modem. Modem's ramdump file is created under /opt/media/ramdump/
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in]
+ * - None
+ *
+ * @param [out]
+ *   - None
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+int tel_enforce_ramdump_of_modem(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_POWER_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiProductivity.h b/include/tapi/ITapiProductivity.h
new file mode 100644 (file)
index 0000000..91e8ebe
--- /dev/null
@@ -0,0 +1,604 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+ * @internal
+ * @ingroup            TelephonyAPI
+ * @addtogroup PRODUCTIVITY_TAPI       PRODUCTIVITY_TAPI
+ * @{
+ *
+ * @file ITapiProductivity.h
+
+ @brief This file serves as a "C" header file defines functions for Tapi productivity Services.\n
+ It contains a sample set of function prototypes that would be required by applications.
+ */
+
+#ifndef _ITAPI_SERVICE_MODE_H_
+#define _ITAPI_SERVICE_MODE_H_
+
+/*==================================================================================================
+ INCLUDE FILES
+ ==================================================================================================*/
+#include <TelDefines.h>
+#include <TelErr.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*==================================================================================================
+ CONSTANTS
+ ==================================================================================================*/
+
+/*==================================================================================================
+ MACROS
+ ==================================================================================================*/
+#define TAPI_MAX_SERVICE_LINES         16      /** service information display max length */
+#define TAPI_MAX_LCD_WIDTH                     31      /** LCD max width for display */
+
+#define MAX_FACTORY_OMISSION_AVOIDANCE_DATA_CNT        90
+#define TAPI_FACTORY_WIFI_DATA_PDA_MAX 13      /** wifi data pda max length */
+#define TAPI_FACTORY_WIFI_DATA_PC_MAX  16      /** wifi data pc max length */
+#define TAPI_FACTORY_BT_MACADDRESS_MAX 6       /** BT mac address max length */
+#define TAPI_FACTORY_PIN_CODE_MAX              4       /** pin code max length */
+#define TAPI_FACTORY_LINE_SMS_ADDR_MAX 20      /** line sms address max length */
+#define TAPI_FACTORY_LINE_SMS_DATA_MAX 256     /** line sms data max length */
+#define TAPI_FACTORY_AXIS_MAX                  4       /** axis max length */
+#define TAPI_FACTORY_MEM_TOTAL_SIZE_MAX        8       /** max of memory total size */
+#define TAPI_FACTORY_MEM_USED_SIZE_MAX 8       /** max of used memory size */
+#define TAPI_FACTORY_MEM_FREE_SIZE_MAX 8       /** max of free memory size */
+#define TAPI_FACTORY_TOUCH_STATUS_MAX  4       /** max if touch status */
+
+#define SMS_NUM_SIZE   64      /**< sms number max size for factory dft*/
+#define SMS_DATA_SIZE  255     /**< sms data max size for factory dft*/
+
+/*==================================================================================================
+ ENUMS
+ ==================================================================================================*/
+
+/**
+ * @enum tapi_service_mode_t
+ * This enumeration defines the service mode type for test mode.
+ */
+typedef enum {
+       TAPI_SVC_MODE_TEST_MANUAL = 0x01, /**< 0x01 : Manual test mode */
+       TAPI_SVC_MODE_NAM_EDIT, /**< 0x02 : Full NAM edit mode */
+       TAPI_SVC_MODE_MONITOR, /**<0x03 : Monitor screen mode */
+       TAPI_SVC_MODE_TEST_AUTO, /**< 0x04 : Auto test mode */
+       TAPI_SVC_MODE_NAM_BASIC_EDIT, /**< 0x05 : Basic NAM edit mode */
+       TAPI_SVC_MODE_PHONE_TEST, /**< 0x06 : Phone test mode ( just for the debugging ) */
+       TAPI_SVC_MODE_OPERATOR_SPECIFIC_TEST /**< 0x07: Specific test mode required by operator*/
+} tapi_service_mode_t;
+
+/**
+ * @enum tapi_test_mode_sub_t
+ * This enumeration defines the test mode sub type.
+ */
+typedef enum {
+       TAPI_TESTMODE_ENTER     =       0x1000,                         /**< 0x1000 : Testmode enter */
+       TAPI_TESTMODE_SW_VERSION_ENTER,                         /**< 0x1001 : SW_version enter */
+       TAPI_TESTMODE_FTA_SW_VERSION_ENTER,                     /**< 0x1002 : FTA SW version enter */
+       TAPI_TESTMODE_FTA_HW_VERSION_ENTER,                     /**< 0x1003 : FTA HW version enter */
+       TAPI_TESTMODE_ALL_VERSION_ENTER,                        /**< 0x1004 : All version enter  */
+       TAPI_TESTMODE_BATTERY_INFO_ENTER,                       /**< 0x1005 : Battery Information enter  */
+       TAPI_TESTMODE_CIPHERING_PROTECTION_ENTER,       /**< 0x1006 : Ciphering protection enter */
+       TAPI_TESTMODE_INTEGRITY_PROTECTION_ENTER,       /**< 0x1007 : Integrity protection enter */
+       TAPI_TESTMODE_IMEI_READ_ENTER,                          /**< 0x1008 : IMEI enter */
+       TAPI_TESTMODE_BLUETOOTH_TEST_ENTER,                     /**< 0x1009 : Bluetooth test enter */
+       TAPI_TESTMODE_VIBRATOR_TEST_ENTER,                      /**< 0x100A : Vibrator test enter */
+       TAPI_TESTMODE_MELODY_TEST_ENTER,                        /**< 0x100B : Melody test enter */
+       TAPI_TESTMODE_MP3_TEST_ENTER,                           /**< 0x100C : MP3 test enter */
+       TAPI_TESTMODE_FACTORY_RESET_ENTER,                      /**< 0x100D : Factory test enter */
+       TAPI_TESTMODE_FACTORY_PRECONFIG_ENTER,          /**< 0x100E : Factory preconfig enter */
+       TAPI_TESTMODE_TFS4_EXPLORE_ENTER,                       /**< 0x100F : TFS4 explore enter */
+       TAPI_TESTMODE_RTC_TIME_DISPLAY_ENTER,           /**< 0x1010 : RTC time display enter */
+       TAPI_TESTMODE_RSC_FILE_VERSION_ENTER,           /**< 0x1011 : RSC file version enter */
+       TAPI_TESTMODE_USB_DRIVER_ENTER,                         /**< 0x1012 : USB driver enter */
+       TAPI_TESTMODE_USB_UART_DIAG_CONTROL_ENTER,      /**< 0x1013 : USB UART diag control enter*/
+       TAPI_TESTMODE_RRC_VERSION_ENTER,                        /**< 0x1014 : RRC Version enter */
+       TAPI_TESTMODE_GPSONE_SS_TEST_ENTER,     /**< 0x1015 : GPSone testmode enter */
+       TAPI_TESTMODE_BAND_SEL_ENTER,                           /**< 0x1016 : Band selection mode enter */
+       TAPI_TESTMODE_GCF_TESTMODE_ENTER,                       /**< 0x1017 : GCF Test mode enter */
+       TAPI_TESTMODE_GSM_FACTORY_AUDIO_LB_ENTER,       /**< 0x1018 : GSM Factory Audio Loopback enter */
+       TAPI_TESTMODE_FACTORY_VF_TEST_ENTER,            /**< 0x1019 : VF ADC Test mode enter */
+       TAPI_TESTMODE_TOTAL_CALL_TIME_INFO_ENTER,       /**< 0x101A : Display Total Call time info enter */
+       TAPI_TESTMODE_SELLOUT_SMS_ENABLE_ENTER,         /**< 0x101B : Sell_Out_SMS_Enable_enter */
+       TAPI_TESTMODE_SELLOUT_SMS_DISABLE_ENTER,        /**< 0x101C : Sell_Out_SMS_Disable_enter */
+       TAPI_TESTMODE_SELLOUT_SMS_TEST_MODE_ON,         /**< 0x101D : Sell_Out_SMS_Test_Mode_ON */
+       TAPI_TESTMODE_SELLOUT_SMS_PRODUCT_MODE_ON,      /**< 0x101E : Sell_Out_SMS_Product_Mode_ON */
+       TAPI_TESTMODE_GET_SELLOUT_SMS_INFO_ENTER,       /**< 0x101F Get Sellout SMS info enter  */
+       TAPI_TESTMODE_WCDMA_SET_CHANNEL_ENTER,          /**< 0x1020 WCDMA Set Channel Enter */
+       TAPI_TESTMODE_GPRS_ATTACH_MODEM_ENTER,          /**< 0x1021 GPRS Attach mode Enter */
+
+       /*      In case of  SVC_MODE = SM_NAM  in CDMA  */
+       TAPI_SVC_MODE_NAM_CDMA_EDIT     =       0x2001,         /**< 0x2001 : NAM Full Edit Mode */
+       TAPI_SVC_MODE_NAM_CDMA_BASIC_EDIT,                      /**< 0x2002 : NAM Basic Edit Mode */
+       TAPI_SVC_MODE_NAM_CDMA_ADVANCED_EDIT,           /**< 0x2003 : NAM Advanced Edit Mode */
+
+       TAPI_TESTMODE_SUB_MODE_MAX
+} tapi_test_mode_sub_t;
+
+/**
+ * @enum tapi_service_mode_reset_t
+ * This enumeration defines the reset mode type for test mode.
+ */
+typedef enum {
+       TAPI_SVC_MODE_END_NO_ACTION = 0x00, /**< 0x00 : RESET_NO_ACTION */
+       TAPI_SVC_MODE_END_PHONE_ONLY_RESET, /**< 0x01 : RESET_PHONE_ONLY_REQUIRED */
+       TAPI_SVC_MODE_END_BOTH_RESET /**< 0x02 : RESET_BOTH_REQUIRED */
+} tapi_service_mode_reset_t;
+
+/**
+ * @enum tapi_service_mode_debug_cp_dump_t
+ * This enumeration defines the cp dump type.
+ */
+typedef enum {
+       TAPI_SVC_DBG_CP_DUMP_TARGET_ALL = 0x00, /**< cp dump option - all */
+       TAPI_SVC_DBG_CP_DUMP_TARGET_MSG, /**< cp dump option - message */
+       TAPI_SVC_DBG_CP_DUMP_TARGET_LOG, /**< cp dump option - log */
+       TAPI_SVC_DBG_CP_DUMP_TARGET_LOG2, /**< cp dump option - log2 */
+       TAPI_SVC_DBG_CP_DUMP_TARGET_RAM_DUMP, /**< cp dump option - ram dump */
+       TAPI_SVC_DBG_CP_DUMP_TARGET_MAX /**< RFU */
+} tapi_service_mode_debug_cp_dump_t;
+
+/**
+ * @enum tapi_service_mode_debug_ap_dump_t
+ * This enumeration defines the ap dump type.
+ */
+typedef enum {
+       TAPI_SVC_DBG_AP_DUMP_TARGET_RIL = 0x01, /**< ap dump option - ril */
+       TAPI_SVC_DBG_AP_DUMP_TARGET_SYSTEM, /**< ap dump option - system */
+       TAPI_SVC_DBG_AP_DUMP_TARGET_MAX /**< ap dump -RFU */
+} tapi_service_mode_debug_ap_dump_t;
+
+/**
+ * @enum tapi_device_id_t
+ * This enumeration defines the device information for test mode.
+ */
+typedef enum {
+       TAPI_DEVICE_VIBRATION = 0x01, /**< vibration */
+       TAPI_DEVICE_BACKLIGHT, /**< back light */
+       TAPI_DEVICE_FRONTLCD, /**< front lcd */
+       TAPI_DEVICE_KEYLED, /**< key led */
+       TAPI_DEVICE_ALERTLED /**< alerted */
+} tapi_device_id_t;
+
+/**
+ * @enum tapi_device_status_t
+ * This enumeration defines the device status.
+ */
+typedef enum {
+       TAPI_DEVICE_OFF = 0x00, /**< off */
+       TAPI_DEVICE_ON, /**< on */
+       TAPI_DEVICE_AUTO /**< auto */
+} tapi_device_status_t;
+
+/**
+ * @enum tapi_keypad_t
+ * This enumeration defines the keypad requirement.
+ */
+typedef enum {
+       KEYPAD_NOT_NEEDED = 0x00, /**< keypad required */
+       KEYPAD_NEEDED /**< keypad not required */
+} tapi_keypad_t;
+
+/**
+ * @enum tapi_svcmode_event_t
+ * This enumeration defines the service mode event type for test mode.
+ */
+typedef enum {
+       TAPI_SVCMODE_EVENT_SVCMODE_START = 0, /**< start */
+       TAPI_SVCMODE_EVENT_SVCMODE_END, /**< end */
+       TAPI_SVCMODE_EVENT_SVCMODE_CHANGE, /** changed */
+       TAPI_SVCMODE_EVENT_SVCMODE_SCREEN_CFG, /**< screen config */
+       TAPI_SVCMODE_EVENT_SVCMODE_DISP_SCREEN, /**< display screen */
+       TAPI_SVCMODE_EVENT_SVCMODE_DEVICE_TEST /**< device test */
+} tapi_svcmode_event_t;
+
+/**
+ * @enum TelFactoryDftSmsOption_t
+ * This enumeration defines the service mode type for test mode.
+ */
+typedef enum {
+       TAPI_FACTORY_DFT_SMS_INBOX, /**< sms inbox */
+       TAPI_FACTORY_DFT_SMS_DRAFTS, /**< sms draft */
+       TAPI_FACTORY_DFT_SMS_OUTBOX, /**< sms outbox */
+       TAPI_FACTORY_DFT_SMS_SENTBOX /**< sent box */
+} TelFactoryDftSmsOption_t;
+
+typedef enum {
+       TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_WRITE = 0x01,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_WRITE_FULL,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_LOG_ERASE_FULL,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_WRITE,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_WRITE_FULL,
+} tapi_factory_omission_avoidance_write_cmd_t;
+
+typedef enum {
+       TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_READ = 0x01,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_READ_FULL,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_LOG_READ_FULL,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_READ,
+       TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_READ_FULL,
+} tapi_factory_omission_avoidance_read_cmd_t;
+
+/*==================================================================================================
+ STRUCTURES AND OTHER TYPEDEFS
+ ==================================================================================================*/
+
+/**
+ * This structure contains service mode end information.
+ */
+typedef struct {
+       tapi_service_mode_t service_mode; /**< service mode */
+       tapi_service_mode_reset_t reset; /**< service reset mode */
+} tapi_service_mode_end_t;
+
+/**
+ * This structure contains screen configuration information.
+ */
+typedef struct {
+       int line_number; /**< line number */
+       tapi_keypad_t keypad; /**< keypad requirement */
+} tapi_screen_config_t;
+
+/**
+ * This structure contains string information to display.
+ */
+typedef struct {
+       char line; /**< line to display */
+       char string[TAPI_MAX_LCD_WIDTH + 1 ]; /**< string information */
+       int     reverse; /**< reverse mode */
+} tapi_service_string_info_t;
+
+/**
+ * This structure contains display information.
+ */
+typedef struct
+{
+       char num_of_lines; /**< number of line to display */
+       tapi_service_string_info_t display[ TAPI_MAX_SERVICE_LINES ]; /**< string information */
+} tapi_service_display_info_t;
+
+/**
+ * This structure contains device information for test mode.
+ */
+typedef struct
+{
+       tapi_device_id_t device_id; /**< device id */
+       tapi_device_status_t device_status; /**< device status */
+} tapi_device_info_t;
+
+/**
+ * This structure contains factory dft sms information.
+ */
+typedef struct {
+       TelFactoryDftSmsOption_t option; /**< factory dft sms option */
+       char number[SMS_NUM_SIZE]; /**< number */
+       char data[SMS_DATA_SIZE]; /**< data */
+ }TelFactoryDftSmsInfo_t;
+
+typedef union {
+       tapi_factory_omission_avoidance_write_cmd_t write_cmd;
+       tapi_factory_omission_avoidance_read_cmd_t read_cmd;
+} tapi_factory_omission_avoidance_cmd_t;
+
+typedef struct {
+       unsigned char test_id;
+       unsigned char test_result;
+} tapi_factory_omission_avoidance_data_t;
+
+typedef struct {
+       tapi_factory_omission_avoidance_cmd_t cmd;
+       unsigned int data_cnt;
+       tapi_factory_omission_avoidance_data_t data[MAX_FACTORY_OMISSION_AVOIDANCE_DATA_CNT];
+} tapi_factory_omission_avoidance_info_t;
+
+/*==================================================================================================
+ FUNCTION PROTOTYPES
+ ==================================================================================================*/
+
+/**
+ *
+ * @brief  This function is invoked to start service mode.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  svc_mode, test_sub
+ * -  svc_mode, test_sub. refer #tapi_service_mode_t, #tapi_test_mode_sub_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+TapiResult_t tel_start_svcmode(tapi_service_mode_t svc_mode, tapi_test_mode_sub_t test_sub);
+
+/**
+ *
+ * @brief  This function is invoked to end service mode.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  svc_mode
+ * -  svc_mode. refer #tapi_service_mode_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_end_svcmode(tapi_service_mode_t svc_mode);
+
+/**
+ *
+ * @brief  This function is invoked to process key code in service mode.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  key_code
+ * -  key_code.
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_send_svcmode_keycode(char key_code);
+
+/**
+ *
+ * @brief  This function is invoked to dump cp debug.
+ *
+ * @par Sync (or) Async:
+ *  This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param  [in]  type
+ * -  cp dump type. refer #tapi_service_mode_debug_cp_dump_t
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ * - None.
+ *
+ * @post
+ * - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ *  External Apps.
+ *
+ */
+int tel_request_svcmode_dump(tapi_service_mode_debug_cp_dump_t type);
+
+/**
+ * @brief  This function is used to indicate start factory process to modem,
+ * Telephont will send Get operation to modem to get the items from Modem.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param void
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.(Current, Launcher is)
+ *
+ */
+int tel_start_imei_process(void);
+
+/**
+ * @brief  This function is used to Indicate result for comparison item between PDA and Modem.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param nItemID, bResult
+ * - Index of ItemID and Result after comparison.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_compare_imei_item(unsigned char nItemID, unsigned char bResult);
+
+/**
+ * @brief  This function is used in factory process omission avoidance.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param
+ * - cmd : cmd type
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_get_factory_omission_avoidance(tapi_factory_omission_avoidance_read_cmd_t cmd);
+
+/**
+ * @brief  This function is used in factory process omission avoidance.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param
+ * - info : comman type, test id, test result
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_factory_omission_avoidance(tapi_factory_omission_avoidance_info_t *info);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_ITAPI_SERVICE_MODE_H_*/
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiSat.h b/include/tapi/ITapiSat.h
new file mode 100644 (file)
index 0000000..ed9126a
--- /dev/null
@@ -0,0 +1,427 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SAT_TAPI        SAT
+* @{
+*
+* @file ITapiSat.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Sat Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+      Note: Telephony SAT functionality is message relaying from USIM application to SAT related applications.
+ */
+
+#ifndef _ITAPI_SAT_H_
+#define _ITAPI_SAT_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSat.h>
+#include <TelDefines.h>
+#include <TapiCommon.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                 GLOBAL VARIABLE DECLARATIONS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+
+/*================================================================================================*/
+
+ /**
+ * @breif Sends the user choice of the main menu options to the USIM.
+ *
+ * @par Notes:
+ * A set of possible menu options is supplied by the USIM
+ * using the proactive command SET UP MENU. Telephony server receives the command
+ * and publishes this information.SAT UI application should list the menu when it initially launched.
+ * If the user subsequently chooses an option, then SAT UI application replies
+ * the command with user's choice using this API.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @param [in] pMenuSelect
+ * - #TelSatMenuSelectionReqInfo_t contains information like which SAT menu item has been selected or whether Help is required.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SAT_MENU_SELECTION_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
+ *
+ * @pre
+ *  - This function supposed to be called after getting TAPI_EVENT_SAT_SETUP_MENU_IND event from telephony server\n
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tel_get_sat_main_menu_info
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * int pRequestID=0;
+ * TelSatMenuSelectionReqInfo_t selected_menu;
+ * selected_menu.itemIdentifier = '1'; //selected menu num
+ * selected_menu.bIsHelpRequested = 0;
+ * ret_status = tel_select_sat_menu(&selected_menu, &pRequestId);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_select_sat_menu(const TelSatMenuSelectionReqInfo_t* pMenuSelect, int* pRequestId);
+
+ /**
+ * @brief  Download SAT events to USIM
+ *
+ * @par Notes:
+ * A set of events for the terminal to monitor can be supplied by the USIM using the proactive command SET UP EVENT
+ * LIST. If the USIM has sent this command, and an event which is part of the list subsequently occurs, the terminal
+ * informs the USIM using this function, relevant for that event.
+ * If USIM commands to monitor a browser termination event, the SAT-UI application has to call this function.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @param [in] pEventData
+ * - #TelSatEventDownloadReqInfo_t contains the necessary parameters like event type and information associated with it.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SAT_EVENT_DOWNLOAD_CNF and the Asynchronous return status is indicated by #TelSatEnvelopeResp_t.
+ *
+ * @pre
+ *  - A SET UP EVENT LIST proactive command supplies a set of event to monitor.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * int pRequestID=0;
+ * TelSatEventDownloadReqInfo_t pEventData;
+ * pEventData.eventDownloadType = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+ * pEventData.u.bIdleScreenAvailable = 1; //event occur or not
+ * ret_status = tel_download_sat_event(&pEventData, &pRequestId);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_download_sat_event(const TelSatEventDownloadReqInfo_t*  pEventData, int* pRequestId);
+
+ /**
+ * @brief  Send the UI display status of the alpha identifier of a specific proactive command to Telephony Server.
+ *
+ * When SAT-UI receives a proactive command, SAT-UI should draw a UI for relevant command.
+ * As it completes , SAT-UI inform USIM with this function. Afterwards, USIM is getting ready to send another commands.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [in] commandId
+ * - Specific proactive command id from the Application
+ *
+ * @param [in] status
+ * - #TelSatUiDisplayStatusType_t contain display status(SUCCESS/FAIL).
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - Display request for the alpha identifier of a Proactive Command should be sent by Telephony Server.
+ *
+ * @post
+ *  - If the display status is SUCCESS Telephony Server sends a request to application for Proactive Command Execution.
+ *  - If the display status is FAIL Telephony Server sends Terminal Response for the Proactive Command.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int commandId = 1; //this value should be server given value
+ * ret_status = 0;
+ * ret_status = tel_send_ui_display_status(1, TAPI_SAT_DISPLAY_SUCCESS);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_ui_display_status(int commandId, TelSatUiDisplayStatusType_t status);
+
+ /**
+ * @brief  This function sends the UI User confirmation data for a specific Proactive Command to the Telephony Server.
+ *
+ * In case that the proactive commands need user response, SAT-UI can send it using this function.
+ * The response can be 'OK', 'Cancel', 'Move Back' and 'End Session'. Upon this response, USIM can send
+ * a proactive command subsequently to indicate next UI action.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ *@param [in] pUserConfirmData
+ * -#TelSatUiUserConfirmInfo_t contains Specific user confirmation data.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User Confirmation request for a specific Proactive Command should be sent to application by Telephony Server.
+ *
+ * @post
+ *  - If the User Confirmation is positive Telephony Server sends a request to application for Proactive Command Execution.
+ *  - If the User Confirmation is negative Telephony Server sends Terminal Response for the Proactive Command.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatUiUserConfirmInfo_t cfm_data;
+ * cfm_data.commandId = '1'; //this value should be server given value
+ * cfm_data.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
+ * cfm_data.keyType = TAPI_SAT_USER_CONFIRM_YES;
+ * ret_status = tel_send_sat_ui_user_confirm(&cfm_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sat_ui_user_confirm(TelSatUiUserConfirmInfo_t * pUserConfirmData);
+
+ /**
+ * @brief  This function provides SAT(Sim Application toolkit) Main Menu information for SAT-UI.
+ *
+ * Once the USIM supplies the SET UP MENU proactivae command, telephony server not only publish
+ * TAPI_EVENT_SAT_SETUP_MENU_IND event but also caches the menu information.
+ * The SAT-UI applicatoin can get the menu list using this function.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [out] pMainMenu
+ * - #TelSatSetupMenuInfo_t contain all menu related information which are required like menu title, icon, item count, etc.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - When SAT SIM is inserted. we can get meaningful data. without SAT SIM, Null is returned
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * SAT-UI
+ *
+ * @see tel_select_sat_menu
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatSetupMenuInfo_t menu; //this struct will be pull up with SIM menu info
+ * ret_status = tel_get_sat_main_menu_info(&menu);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_get_sat_main_menu_info(TelSatSetupMenuInfo_t* pMainMenu);
+
+ /**
+ * @brief  This API provides the Operation result(s) for the Proactive Command execution by the Application(s) to the Telephony Server.
+ *
+ * The USIM commands the terminal to do some predefined action, such as sending short message,
+ * making a voice call, launching an Internet browser and so on. Those actions are defined by 3GPP TS31.111.
+ * Once a application executes the requested action by USIM, it reports the operation result to USIM using this function.
+ *
+ * This function makes Dbus method call to Telephony Sever and gets immediate feedback.
+ *
+ * @par Warning:
+ * Do not use this function. This function is dedicated to the SAT UI embedded application only.
+ **
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @param [out] pAppRetInfo
+ * - #TelSatAppsRetInfo_t contains execution result of a specific proactive command by application.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - Proactive Command execution request should be sent by Telephony Server to SAT related applications.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded applications which are predefined by 3GPP TS31.111
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSat.h>
+ * int ret_status =0;
+ * TelSatAppsRetInfo_t app_ret;
+ * app_ret.commandType = TAPI_SAT_CMD_TYPE_SETUP_CALL;
+ * app_ret.commandId = 1; //this value should be server given value
+ * app_ret.appsRet.setupCall.resp = TAPI_SAT_R_SUCCESS;
+ * ret_status = tel_send_sat_app_exec_result(&app_ret);
+ * @endcode
+ *
+ * @remarks None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_sat_app_exec_result(TelSatAppsRetInfo_t* pAppRetInfo);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SAT_H_ */
+
+/**
+ * @}
+ */
+
diff --git a/include/tapi/ITapiSim.h b/include/tapi/ITapiSim.h
new file mode 100644 (file)
index 0000000..8b3e003
--- /dev/null
@@ -0,0 +1,2788 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SIM_TAPI        SIM
+* @{
+*
+* @file ITapiSim.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi SIM Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+*/
+
+#ifndef _ITAPI_SIM_H_
+#define _ITAPI_SIM_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSim.h>
+#include <TelUtility.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+/*================================================================================================*/
+
+/**
+* @brief  This API is used to get SIM Card Initialization status and SIM Card Identification.
+* Most of modules which require SIM data should check SIM status before using it definitely.
+ *
+* @par Sync (or) Async:
+* This is a Synchronous API.
+*
+* @par Important Notes:
+* - Card Identification value is available in TAPI_SIM_STATUS_SIM_INIT_COMPLETED case only.
+*
+* @warning
+* - None.
+*
+* @param [out] sim_status
+* - This parameter returns SIM initialization status from Telephony server boot up time.
+* First, You can find sim existance if returned value are not in TAPI_SIM_STATUS_CARD_NOT_PRESENT and TAPI_SIM_STATUS_CARD_REMOVED.
+*
+* @param [out] card_changed
+* - This parameter returns sim card identification value when sim_status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED.
+* - card_changed value just present whether current inserted SIM card differs with previous SIM or not.
+*
+* @par Async Response Message:
+* - None
+*
+* @pre
+*  - None.
+*
+* @post
+*  - None.
+*
+* @return Return Type (int)
+* - Integer '0' ( same with TAPI_API_SUCCESS ) - indicating that the operation has completed successfully. \n
+* - Negative integer : it provides an error code (Refer #TapiResult_t)
+*
+* @par Prospective Clients:
+* External Apps.
+*
+* @see None
+*
+* @code
+* #include <ITapiSim.h>
+*
+* int err_code = TAPI_API_SUCCESS;
+* TelSimCardStatus_t status = 0x00;
+* int b_card_changed = 0;
+*
+* // GET SIM INIT INFORMATION
+* err_code = tel_get_sim_init_info(&status, &b_card_changed);
+*
+* @endcode
+*
+* @remarks None
+*
+*/
+/*================================================================================================*/
+int tel_get_sim_init_info(TelSimCardStatus_t *sim_status, int *card_changed);
+
+
+/**
+ * @brief  This function performs PIN1/PIN2/SIM LOCK verification. This function performs PIN verification based on the pin type passed along with pin data.
+ * PIN1 code : The SIM card has its own password is to check access permissions
+ * SIM Lock code : Between Device and the SIM card using a SIM password is only available on certain handsets to be used to authorize.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Based on Pin status (PIN/PUK/SIM LOCK) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND is published to Applications on Device boot time.
+ * - if pin status is PUK, you should use #tel_verify_sim_puks instead of this API.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pin_data
+ * -PIN code, entered by the user. you should make all parameters.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_VERIFY_SEC_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ * - This API is used when #TelSimCardStatus_t is TAPI_SIM_STATUS_SIM_PIN_REQUIRED or TAPI_SIM_STATUS_SIM_LOCK_REQUIRED on boot time.
+ * - Currently there`s no proper scenario for PIN2 verification by using this API.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ * char init_pin_val[length] ;
+ *
+ * strcpy(init_pin_val, PIN1_NORMAL);
+ *
+ * TelSimSecPw_t pin_data = {0,};
+ *
+ * pin_data.type = TAPI_SIM_PTYPE_PIN1;
+ * pin_data.pw_len = strlen(init_pin_val);
+ *
+ * printf("pw_len[%d]", pin_data.pw_len);
+ *
+ * pin_data.pw = (char*)malloc(length);
+ * memcpy(pin_data.pw,init_pin_val,length);
+ *
+ * err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_verifiy_sim_pins(const TelSimSecPw_t *pin_data, int *req_id);
+
+
+/**
+ * @brief  This function performs unblock PIN1/PIN2 operation based on PUK information passed along with
+ * unblock information entered by the user.
+ * If you get sim card status(TAPI_SIM_STATUS_SIM_PUK_REQUIRED) by using #tel_get_sim_init_info on boot time
+ * or (TAPI_SIM_PIN_STATUS_BLOCKED) by using #tel_get_sim_security_status after normal initialization for specific operation,
+ * you may unblock PIN1/PIN2.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Based on Pin status (PIN1/PIN2) is blocked, an unsolicited event TAPI_EVENT_SIM_STATUS_IND
+ * is published to Applications on boot time also.
+ *
+ * @warning
+ * - If you fail to unblock PIN til given retry count, Your SIM card be permanent block status.
+ *
+ * @param[in] puk_data
+ * -Specifies unblocking PIN password #TelSimSecPw_t
+ *
+ * @param[in] new_pin_data
+ * -Specifies PIN password which you want to use after unblocking operation #TelSimSecPw_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_VERIFY_PUK_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Verification successes.
+ * If returned status is TAPI_SIM_PUK_INCORRECT_PASSWORD, Verification fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - PIN1 or PIN2 status should be TAPI_SIM_PIN_STATUS_BLOCKED and Card status should be TAPI_SIM_STATUS_SIM_PUK_REQUIRED on boot time.
+ *
+ * @post
+ *  - After Success on unblocking for PIN1 or PIN2, each pin check facility is enabled even if previous facility is disabled.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ *
+ * char init_pin_val[length];
+ * char init_puk_val[length];
+ *
+ * strcpy(init_pin_val, PIN1_NORMAL);
+ * strcpy(init_puk_val, PUK1_NORMAL);
+ *
+ * TelSimSecPw_t puk_data = {0,};
+ * TelSimSecPw_t new_pin_data = {0,};
+ *
+ * puk_data.type = TAPI_SIM_PTYPE_PUK1;   // 0x00
+ * puk_data.pw_len = length;
+ * puk_data.pw_len = strlen(init_puk_val);
+ * printf("pw_len[%d]", puk_data.pw_len);
+ * memcpy(puk_data.pw,init_pin_val,length);
+ *
+ * new_pin_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+ * new_pin_data.pw_len = strlen(init_pin_val);
+ * printf("pw_len[%d]", new_pin_data.pw_len);
+ * new_pin_data.pw = (char*)malloc(length);
+ * memcpy(new_pin_data.pw,init_pin_val,length);
+ *
+ * err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_verify_sim_puks(const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, int *req_id);
+
+
+/**
+ * @brief  This function changes PIN1/PIN2 code based on the pin type passed along with old pin data and new pin data.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - User should fill up pin type equally both old_pin and new_pin.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] old_pin
+ * -Old pin code, entered by the user. #TelSimSecPw_t
+ *
+ * @param[in] new_pin
+ * -New pin code, entered by the user. #TelSimSecPw_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_CHANGE_PINS_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, Change operation finish successfully.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, Change operation fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - PIN which user want to change check facility should be enabled.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ *
+ * int request_id = 0;
+ * err_code = TAPI_API_SUCCESS; // 0
+ * int length = TAPI_SIM_PIN_LENGTH+1;
+ * char init_old_pin_val[length] ;
+ * char init_new_pin_val[length];
+ *
+ * memset(&init_old_pin_val, 0 , length);
+ * memset(&init_new_pin_val, 0 , length);
+ *
+ * TelSimSecPw_t old_pin = {0,};
+ * TelSimSecPw_t new_pin = {0,};
+ *
+ * strcpy(init_old_pin_val, PIN1_ORG);
+ *
+ * old_pin.type = TAPI_SIM_PTYPE_PIN1;
+ * old_pin.pw_len = strlen(init_old_pin_val);
+ * printf("pw_len[%d]", old_pin.pw_len);
+ * old_pin.pw = (char*)malloc(length);
+ * memcpy(old_pin.pw,init_old_pin_val,length);
+ *
+ * strcpy(init_new_pin_val, PIN1_NEW);
+ *
+ * new_pin.type = TAPI_SIM_PTYPE_PIN1;
+ * new_pin.pw_len = strlen(init_new_pin_val);
+ * printf("pw_len[%d]", new_pin.pw_len);
+ * new_pin.pw = (char*)malloc(length);
+ * memcpy(new_pin.pw,init_new_pin_val,length);
+ *
+ * err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_change_sim_pins(const TelSimSecPw_t *old_pin , const TelSimSecPw_t *new_pin, int *req_id);
+
+
+/**
+ * @brief  This function gets the current PIN1/PIN2/SIM LOCK status.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] type
+ * - Security type user wants to get status #TelSimPinType_t
+ *
+ * @param [out] status
+ * This parameter returns the current status about user wants. #TelSimPinStatus_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimPinType_t type = TAPI_SIM_PTYPE_PIN1; //pin type
+ * TelSimPinStatus_t status = -1;
+ * err_code = tel_get_sim_security_status(type, &status);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_security_status(TelSimPinType_t type, TelSimPinStatus_t *status);
+
+
+/**
+ * @brief  This function disables the PIN1/SIM Lock check facility based on the Pin type and pin data passed from Application.
+ * PIN1 code : The SIM card has its own password is to check access permissions
+ * SIM Lock code : Between Device and the SIM card using a SIM password is only available on certain handsets to be used to authorize.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -For PIN2, disabling applies only for 3G USIMs and when PIN2 in NOT mapped to CHV2 of GSM application.
+ * -PIN2 disabling operation is generally not used.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] sec_data
+ * -User entered PIN disable data and pin type. #TelSimSecPw_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_DISABLE_SEC_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, disabling operation finish successfully.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, disabling operation fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - Checking Facility which user wants to disable should be enabled status.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimSecPw_t sec_data = {0,};
+ * sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+ * sec_data.pw_len = 4; // current pw is 4 digit
+ * sec_data.pw = (char*)malloc(length);
+ * memcpy(sec_data.pw,"1111",length);
+ * err_code = tel_disable_sim_security(&sec_data, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_disable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+
+
+/**
+ * @brief  This function enables the PIN1/SIM Lock check facility based on the Pin type and pin data passed from Application.
+ * PIN1 code : The SIM card has its own password is to check access permissions
+ * SIM Lock code : Between Device and the SIM card using a SIM password is only available on certain handsets to be used to authorize.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] sec_data
+ * -User entered PIN enable data and pin type. #TelSimSecPw_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_ENABLE_SEC_CNF  and the event data is #TelSimSecResult_t.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ * If returned status is TAPI_SIM_PIN_OPERATION_SUCCESS, enabling operation finish successfully.
+ * If returned status is TAPI_SIM_PIN_INCORRECT_PASSWORD, enabling operation fails and you can check retry count by using event data  #TelSimSecResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - Checking Facility which user wants to enable should be disabled status.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimSecPw_t sec_data = {0,};
+ * sec_data.type = TAPI_SIM_PTYPE_PIN1;   // 0x00
+ * sec_data.pw_len = 4; // current pw is 4 digit
+ * sec_data.pw = (char*)malloc(length);
+ * memcpy(sec_data.pw,"1111",length);
+ * err_code = tel_enable_sim_security(&sec_data, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_enable_sim_security(TelSimSecPw_t *sec_data, int *req_id);
+
+
+/**
+ *
+ * @brief  This API is used to get lock personalisation information like current network lock status or network subset lock and so on.
+ * Refer '3GPP TS 22.022 - Personalisation of Mobile Equipment (ME)' for more detail.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This functionality should be used only Administrator coverage.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] type
+ * -personalisation type
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SIM_PERS_STATUS_CNF  and the event data is #TelSimPersStatus_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPersType_t type = 0;
+ * type = TAPI_SIM_PERS_NET; //network lock
+ * err_code = tel_get_sim_personalization_status(type, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_personalization_status(TelSimPersType_t type, int *req_id);
+
+
+/**
+ * @brief  This API is used to disable personalisation of network, network subset, corporate, service provider personalisation.
+ * Refer '3GPP TS 22.022 - Personalisation of Mobile Equipment (ME)' for more detail.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This functionality should be used only Administrator coverage.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pers_data
+ * -Personalisation information passed. #TelSimPersPw_t
+ *
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SIM_DISABLE_PERS_CNF.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - Checking Facility which user wants to disable should be enabled status.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPersPw_t lock_pers = {0,};
+ * lock_pers.type = TAPI_SIM_PERS_NET; //network lock case
+ * lock_pers.pw_len =  8; //control key
+ * lock_pers.pw = (char*)malloc(8);
+ * memcpy(lock_pers.pw,"11111111",length);    //temp value
+ * err_code = tel_disable_sim_personalization(&lock_pers, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_disable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+
+
+/**
+ * @brief  This API is used to enable personalisation of network, network subset, corporate, service provider personalisation.
+ * Refer '3GPP TS 22.022 - Personalisation of Mobile Equipment (ME)' for more detail.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - This functionality should be used only Administrator coverage.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pers_data
+ * -Personalisation information passed. #TelSimPersPw_t
+ *
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_EVENT_SIM_ENABLE_PERS_CNF.
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - Checking Facility which user wants to enable should be disabled status.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPersPw_t lock_pers = {0,};
+ * lock_pers.type = TAPI_SIM_PERS_NET; //network lock case
+ * lock_pers.pw_len =  15; //control key
+ * lock_pers.pw = (char*)malloc(15);
+ * memcpy(lock_pers.pw,"111111111111111",length);    //temp value
+ * err_code = tel_enable_sim_personalization(&lock_pers, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_enable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id);
+
+
+/**
+ * @brief  This function is used to get current SIM Phonebook mode whether FDN or not(ADN).
+ * SIM phonebook ADN(or 3G Phonebook) enabled by default and  the FDN can be used if the user selects FDN activation.
+ * ADN and FDN also couldn`t activate the same time.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] fdn_status
+ * This parameter returns the current FDN status whether enabled or disabled.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int fdn_status = 0 ;
+ * err_code = tel_get_sim_fdn_status(&fdn_status); // you can find in fdn_status variable
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_fdn_status(int *fdn_status);
+
+
+/**
+ * @brief  This function disables FDN phonebook mode.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pin2
+ * -User entered pin2 data.
+ *
+ * @param[in] pin2_len
+ * -User entered a length of pin2 data.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF  and event data associated with this event.#TelSimSecResult_t
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - FDN mode sould be enabled.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimSecPw_t sec_data = {0,};
+ * sec_data.type = TAPI_SIM_PTYPE_PIN2;        // pin2
+ * sec_data.pw_len = 4;
+ * sec_data.pw = (char*)malloc(4);
+ * memcpy(sec_data.pw,"2222",length); //temp value
+ * err_code = tel_disable_sim_fdn(sec_data.pw, &sec_data.pw_len, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_disable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+
+
+/**
+ * @brief  This function enables FDN phonebook mode.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pin2
+ * -User entered pin2 data.
+ *
+ * @param[in] pin2_len
+ * -User entered a length of pin2 data.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF  and event data associated with this event.#TelSimSecResult_t
+ * Asynchronous return status is indicated by #TelSimPinOperationResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - FDN mode sould be disabled.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimSecPw_t sec_data = {0,};
+ * sec_data.type = TAPI_SIM_PTYPE_PIN2;        // pin2
+ * sec_data.pw_len = 4;
+ * sec_data.pw = (char*)malloc(4);
+ * memcpy(sec_data.pw,"2222",length); //temp value
+ * err_code = tel_enable_sim_fdn(sec_data.pw, &sec_data.pw_len, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_enable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id);
+
+
+/**
+ * @brief  This function provides common interface for accessing SIM data based on USIM generic command in ETSI TS 102 221
+ * and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
+ * Required to operate the terminal by default, the application (call, sms, setting, network and so on) are using the SIM data
+ * stored in the Telephony server to the user data, and easy to use their API to provide a separate,
+ * but SIM and the user's data is enormous, with some data, the usage of any use to manage all the telephony server is difficult.
+ * Therefore, handling the SIM data can provide a common one API.
+ * Only this API be specified in the ETSI TS 102 221 of the generic command 'SELECT', 'READ BINARY', 'READ RECORD',
+ * 'UPDATE BINARY', 'UPDATE RECORD' command support.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - If you want more generic access, please use #tel_req_sim_apdu
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] rsim_data
+ * -Different parameters should be filled up according to command type,
+ * If user wants to run 'SELECT' command, Only file_id needed. And you can find file type with response data by asynchronous return.
+ * If user wants to run 'READ BINARY' command, should fill up parameter like this(p1:offset, p2:offset low, p3:bytes to be read)
+ * If user wants to run 'READ RECORD' command, should fill up parameter like this(p1:record num, p2:mode, p3:bytes to be read)
+ * If user wants to run 'UPDATE BINARY' command, should fill up parameter like this(p1:offset, p2:offset low, p3:bytes to be updated, data:address of data which will be updated)
+ * If user wants to run 'UPDATE RECORD' command, should fill up parameter like this(p1:record num, p2:mode, p3:bytes to be updated, data:address of data which will be updated)
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_RSIM_ACCESS_CNF  and the event data is #TelSimReadFileRaw_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code =0;
+ * int request_id = 0;
+ * TelSimRSimReq_t rsim = {0,};
+ * rsim.file_id = 0x6F60;
+ * rsim.rsim_cmd = TAPI_SIM_GET_RESPONSE;
+ *
+ * // REQUEST SIM ACCESS
+ * err_code = tel_req_sim_access((const TelSimRSimReq_t*)&rsim, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_access(const TelSimRSimReq_t *rsim_data, int *req_id);
+
+
+/**
+ * @brief  This function provides common interface for accessing SIM data based on USIM generic command in ETSI TS 102 221
+ * and 3GPP TS 31.102 Characteristics of the Universal Subscriber Identity Module (USIM) application.
+ * This API provides only interface to send APDU. User should know well APDU usage.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] rsim_data
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_APDU_CNF  and the event data is #TelSimApduResp_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code =0;
+ * int request_id = 0;
+ * TelSimApdu_t apdu = {0,};
+ * int tmp_apdu[5] = {0xa,5,6,7,8};
+ * apdu.apdu_len = 5; //user should check
+ * apdu.apdu = apdu;
+ *
+ * // REQUEST SIM ACCESS
+ * err_code = tel_req_sim_apdu((const TelSimRSimReq_t*)&rsim, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_apdu(TelSimApdu_t* apdu_data, int *req_id);
+
+
+/**
+ * @brief  This function provides common interface to get SIM ATR(Answer To Reset) value.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_ATR_CNF  and the event data is #TelSimAtrResp_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code =0;
+ * int request_id = 0;
+ *
+ * // REQUEST SIM ATR
+ * err_code = tel_req_sim_atr(&request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_atr(int *req_id);
+
+
+/**
+ * @brief  This function is a synchronous API used to get ECC(SIM) or UECC(USIM) data.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] ecc_data
+ * This parameter returns the SIM emergency call code information like ecc length, service type etc.
+ *
+ * @param [out] ecc_count
+ * Specifies number of ECC records.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int ecc_rec_count = 0; // count in sim card
+ * int err_code = 0;
+ * TelSimEccData_t ecc_info = {{{0,}}};
+ * err_code = tel_get_sim_ecc(&ecc_info, &ecc_rec_count);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_ecc(TelSimEccData_t *ecc_data, int *ecc_count);
+
+
+/**
+ * @brief  This API is used to get the language preference(indication) information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] sim_language
+ * This parameter returns the language preference information.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimLanguageInfo_t li_info = {0,};
+ * err_code = tel_get_sim_language(&li_info); // you can find language info with li_info variable
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_language(TelSimLanguageInfo_t *sim_language);
+
+
+/**
+ * @brief  This API is used to update the language preference information to SIM card.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous function.
+ *
+ * @par Important Notes:
+ * - This function update SIM Language information directly and can effect device language setting. Use carefully.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] language
+ * This parameter returns the language preference information.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_SET_LANGUAGE_CNF.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimLanguagePreferenceCode_t language = 0x00; //init
+ * language = TAPI_SIM_LP_ENGLISH; //language value
+ * err_code = tel_set_sim_language(language, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_set_sim_language(TelSimLanguagePreferenceCode_t language, int *req_id);
+
+
+/**
+ * @brief  This function is a synchronous API which gets the Card Type whether Card is a SIM or a USIM.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] card_type
+ * This parameter returns the SIM card type information like whether it is GSM SIM card or USIM or it is of unknown type.
+ *
+ *  - TAPI_SIM_CARD_TYPE_UNKNOWN
+ *  - TAPI_SIM_CARD_TYPE_GSM
+ *  - TAPI_SIM_CARD_TYPE_USIM
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimCardType_t cardInfo; //unkwon, sim(normally gsm), usim(normally umts)
+ * err_code = tel_get_sim_type(&cardInfo);
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_type(TelSimCardType_t *card_type);
+
+
+/**
+ * @brief  This function is a synchronous API gets the IMSI information.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - IMSI value is the value that security needs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] imsi
+ * This parameter returns the IMSI information. Refer #TelSimImsiInfo_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimImsiInfo_t sim_imsi_info; // mcc, mnc, msisdn
+ * err_code = tel_get_sim_imsi(&sim_imsi_info);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_imsi(TelSimImsiInfo_t* imsi);
+
+
+/**
+ * @brief  This function is a synchronous API gets a Unique identification number of the (U)ICC.
+ * ICC means Integrated Circuit Card.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - IC Card number value is the value that security needs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] iccid
+ * This parameter returns the IC Card number. Refer #TelSimIccIdInfo_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * TelSimIccIdInfo_t icc_data; // this struct consists of number length and number.
+ * err_code = tel_get_sim_iccid(&icc_data);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_iccid(TelSimIccIdInfo_t* iccid);
+
+
+/**
+ * @brief  This API is used to get the SIM mailbox related data(EF-MBDN, MBDI and CPHS case).
+ * this data is required for Mailbox related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] mbox
+ *   - mailbox number information in current inserted SIM card. Refer #TelSimMailboxNumbers_s
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimMailboxNumbers_s mbox;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_mailbox_info(&mbox);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(mbox.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_mailbox_info(TelSimMailboxNumbers_s *mbox);
+
+/**
+ * @brief  This API is used to get the SIM Call forwarding indication related data(EF-CFIS and CPHS case).
+ * this data is required for Call forwarding related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @param [out] cf
+ *  - Callforwarding number information in current inserted SIM card. Refer #TelSimCallForwarding_s
+ *  - User should check 'b_cphs' value first before refer union data struct.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimCallForwarding_s cf_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_callforwarding_info(&cf_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(cf_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_callforwarding_info(TelSimCallForwarding_s *cf);
+
+/**
+ * @brief  This API is used to get the SIM message waiting indication related data(EF-MWIS and CPHS case).
+ * this data is required for Message waiting related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is a synchronous function.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @param [out] mw
+ *  - Message waiting count and type information in current inserted SIM card. Refer #TelSimMessageWaiting_s
+ *  - User should check 'b_cphs' value first before refer union data struct.
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *  - None
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimMessageWaiting_s mw_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_messagewaiting_info(&mw_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(mw_data.b_cphs) { //b_cphs means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_messagewaiting_info(TelSimMessageWaiting_s *mw);
+
+/**
+ * @brief  This API is used to get the SIM CPHS specific data.
+ * this data is required for CPHS related functionality in handset.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @param [out] cphs
+ *   - CPHS specific data(CPHS info table, service number, operator name, etc). Refer #TelSimCphsLocalInfo_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimCphsLocalInfo_t cphs_data;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_cphs_info(&cphs_data);
+ * if(err_code == TAPI_API_SUCCESS) {
+ *   if(cphs_data.b_used) { //b_used means current SIM is for CPHS or not.
+ *     printf("Current SIM is CPHS");
+ *   } else {
+ *     printf("Current SIM is not CPHS but 3GPP");
+ *   }
+ * } else {
+ *   printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_cphs_info(TelSimCphsLocalInfo_t *cphs);
+
+
+/**
+ * @brief  This API is used to get the SIM MSISDN data. Regarding 3GPP specification, Current value is optional.
+ *
+ * @par Sync (or) Async:
+ * This is an Synchronous API.
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None
+ *
+ * @param [out] subscriber
+ *   - subscriber information. if current SIM card does not have, null string will be returned. Refer #TelSimSubscriberInfo_t
+ *
+ * @par Async Response Message:
+ * - None
+ *
+ * @pre
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * TelSimSubscriberInfo_t msisdn;
+ * TapiResult_t err_code = 0;
+ * err_code = tel_get_sim_msisdn(&msisdn);
+ * if(err_code == TAPI_API_SUCCESS)
+ * {
+ *      printf(" ============================================");
+ *      printf("name[%s]",msisdn.name);
+ *      printf("num[%s]",msisdn.num);
+ *      if(msisdn.name == '\0';) //If current SIM does not have, Null string will be returned.
+ *              printf("name is null string");
+ *
+ *      if(msisdn.num == '\0';) //If current SIM does not have, Null string will be returned.
+ *              printf("number is null string");
+ * }
+ * else
+ * {
+ *      printf("TAPI API FAIL: Error Code [0x%x]",err_code);
+ * }
+ *
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_msisdn(TelSimSubscriberInfo_t *subscriber);
+
+/**
+ * @brief  This function is used to get current inserted SIM phonebook init status, available phonebook list and first valid index in case of FDN, ADN, 3G phonebook.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * @par Sync (or) Async:
+ * This is an synchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ * pb_list and first_index value are available at init_completed status is '1' only.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] init_completed
+ *   - phonebook init status. '0' is not init, '1' is init complete to use.
+ *
+ * @param [out] pb_list
+ *   - available SIM phonebook list. This value is valid in phonebook init complete case.
+ *
+ * @param [out] first_index
+ *   - first valid index to use.  only ADN, 3G phonebook and FDN case. This value is valid in phonebook init complete case.
+ *
+ * @par Async Response Message:
+ * - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int valid_index = 0; // usim or sim adn first valid index
+ * TelSimPbList_t pb_list = {0,};
+ * int pPbInitCompleted = 0; // init or not
+ *
+ * // GET SIM PHONEBOOK INIT INFORMATION
+ * err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list, &valid_index);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_init_info(int *init_completed, TelSimPbList_t *pb_list, int *first_index);
+
+
+/**
+ * @brief  This API is used to get number of used records and total records in specific SIM phonebook type.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbFileType_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF  and the event data is #TelSimPbStorageInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPbFileType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_get_sim_pb_count(storage_type, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_count(TelSimPbFileType_t pb_type, int* req_id);
+
+
+/**
+ * @brief  This API is used to get max text length and max number length supported by SIM phone book elementary file.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The max number length includes the storage space provided by the corresponding EXT file for a given Dialling Number file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbFileType_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF  and the event data is #TelSimPbEntryInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimPbFileType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_get_sim_pb_meta_info(storage_type, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_meta_info(TelSimPbFileType_t pb_type, int* req_id);
+
+
+/**
+ * @brief  This API is used to get SIM 3G phonebook supported EFs like ANR, SNE, GRP, EMAIL etc and corresponding EFs max text length, number length and size.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * - The event associated is TAPI_SIM_EVENT_PB_3G_CAPABILITY_INFO_CNF  and the event data is #TelSimPbCapabilityInfo_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * err_code = tel_get_sim_pb_3g_meta_info(&request_id); // you can find result by receiving asynch event response
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_get_sim_pb_3g_meta_info(int *req_id);
+
+
+/**
+ * @brief  This API is used to read SIM phone book entry information from given storage type.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. ##TelSimPbFileType_t
+ *
+ * @param[in] index
+ * -Index for accessing the SIM data.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_ACCESS_READ_CNF  and the event data is #TelSimPbRecordData_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbFileType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_read_sim_pb_record(storage_type, index, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_read_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+
+
+/**
+ * @brief  This API is used to add or edit SIM phone book record entry information.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] req_data
+ * -phonebook data which will be updated or added. #TelSimPbRecordData_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_UPDATE_CNF  and the event data is #TelSimPbUpdateResp_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbRecordData_t data;
+ * data.StorageFileType  = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * data.Index  = 1; // index which will be updated
+ * data.NextIndex  = 0;
+ * //data.ContactInfo will be added
+ * err_code = tel_update_sim_pb_record(&data, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_update_sim_pb_record(const TelSimPbRecordData_t *req_data, int *req_id );
+
+
+/**
+ * @brief  This API is used to delete a SIM phonebook record.
+ *     Access to this API is limited to in-house application and we recommend you use phonebook-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - The index ranges from 1 through to a maximum of 254 for a Linear fixed file and 255 for a cyclic file.
+ * - We recommend to use phonebook-engine APIs for handling phonebook(including SIM phonebook).
+ * If user uses SIM phonebook related APIs directly, it can break device phonebook consistency because all phonebook information managed in phonebook-engine.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] pb_type
+ * -Different storage types to be selected in SIM. #TelSimPbFileType_t
+ *
+ * @param[in] index
+ * -Index of the record to be deleted.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * The event associated is TAPI_EVENT_SIM_PB_DELETE_CNF  and the event data is #TelSimPbUpdateResp_t.
+ * Asynchronous return status is indicated by #TelSimPbAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * unsigned short index = 1;
+ * TelSimPbFileType_t storage_type = 0x00;
+ * storage_type = TAPI_SIM_PB_3GSIM; // usim phonebook
+ * err_code = tel_delete_sim_pb_record(storage_type, index, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_delete_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id );
+
+
+/**
+ * @brief  This function is used to make a connection request to SIM
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] req_data
+ * - This input has the SAP message request to connect. #TelSimSapConnect_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_CONNECT_CNF  and the event data is #TelSimSapConnect_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimSapConnect_t con_req = {0,};
+ * con_req.MsgId = TAPI_SIM_SAP_CONNECT_REQ;   // connection req id
+ * con_req.MaxMsgSize = 10; //temp for testing only - not clear
+ * err_code = tel_req_sap_connection(&con_req, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_connection( TelSimSapConnect_t *req_data, int *req_id);
+
+
+/**
+ * @brief  This function is used to get connection status information
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_CONNECT_STATUS_CNF  and the event data is #TelSimSapConnectionStatus_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * err_code = tel_req_sap_connection_status(&request_id);      //you can find status value by receiving async event value
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_connection_status( int *req_id);
+
+
+/**
+ * @brief  This function is used to get ATR request from SIM
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_TRANSFER_ATR_CNF  and the event data is #TelSimSapAtrInfo_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * err_code = tel_req_sap_transfer_atr(&request_id);   //you can find transfer atr request resut with async event
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transfer_atr( int *req_id);
+
+
+/**
+ * @brief  This function is used to transfer APDU to SIM
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] apdu_data
+ * - This input has the APDU data to be passed to SIM card. #TelSimSapApduData_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_TRANSFER_APDU_CNF  and the event data is #TelSimSapApduData_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * int file_id = TAPI_SIM_EFILE_ICCID;
+ * TelSimSapApduData_t apdu_data;      // for selecting EF ICCID
+ * apdu_data.ApduLength = 7;
+ * apdu_data.Apdu[0] = 0xA0; // class
+ * apdu_data.Apdu[1] = 0xA4; // instruction
+ * apdu_data.Apdu[2] = 0; // p1 = parameter 1
+ * apdu_data.Apdu[3] = 0; // p2 = parameter 2
+ * apdu_data.Apdu[4] = 2; // p3 - parameter 3
+ * memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+ * err_code = tel_req_sap_transfer_apdu(&apdu_data, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transfer_apdu(TelSimSapApduData_t *apdu_data, int *req_id);
+
+
+/**
+ * @brief      This function is used to select either of the protocols.
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] protocol
+ * - This input is the protocol to set in SIM for SAP. #TelSimSapProtocol_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_SET_PROTOCOL_CNF  and the event data is #TelSimSapResultCode_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimSapProtocol_t protocol = TAPI_SIM_SAP_PROTOCOL_T0; // protocol set
+ * err_code = tel_req_sap_transport_protocol(protocol, &request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_transport_protocol(TelSimSapProtocol_t protocol, int *req_id);
+
+
+/**
+ * @brief  This function is used to set the power ON/OFF/RESET the SIM card
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] req_data
+ * - This input is to power on or off the SIM card.#TelSimSapMsgId_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_SET_SIM_POWER_CNF  and the event data is #TelSimSapPower_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimSapMsgId_t    msdId = 0;
+ * msdId = TAPI_SIM_SAP_POWER_SIM_ON_REQ; //power on operation
+ * err_code = tel_req_sap_power_operation(msdId, &request_id);// only for testing
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_power_operation(TelSimSapMsgId_t req_data, int *req_id );
+
+
+/**
+ * @brief  This function is used to transfer card reader status
+ *     Access to this API is limited to in-house application and we recommend you use bluetooth-engine APIs.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - We recommend user does not use SAP related APIs directly. Our SAP APIs are provided as interface between BT-engine and Modem Plugin.
+ * So without BT-engine, you may not get proper operation with these SAP APIs.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_SAP_CARD_READER_STATUS_CNF  and the event data is #TelSimCardReaderStatus_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *  - User can get valid return value or make operations after SIM init complete(card status is TAPI_SIM_STATUS_SIM_INIT_COMPLETED).
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * err_code = tel_req_sap_cardreader_status(&request_id);      //you can find card reader status with async event
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sap_cardreader_status(int *req_id);
+
+
+/**
+ * @brief  This API is used to execute ISIM verification.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * -NONE
+ *
+ * @warning
+ * - None.
+ *
+ * @param[in] authentication_data
+ * - This input has the authentication code to be validated by ISIM application in the SIM card. #TelSimIsimAuthenticationData_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ * -The event associated is TAPI_SIM_EVENT_ISIM_AUTHENTICATION_CNF  and the event data is #TelSimIsimAuthenticationResponse_t.
+ * Asynchronous return status is indicated by #TelSimAccessResult_t.
+ *
+ *
+ * @pre
+ *  - A dbus connection is established with #tel_init
+ *  - The application name is registered with #tel_register_app_name
+ *  - The application is registered events to listen asynchronous response with #tel_register_event
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ * - Negative integer : it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see None
+ *
+ * @code
+ * #include <ITapiSim.h>
+ * int err_code = 0;
+ * int request_id = 0;
+ * TelSimIsimAuthenticationData_t pAuthenticationData;
+ * strcpy((char*)pAuthenticationData.RandomAccessData, "username@operator.com"); //access data
+ * pAuthenticationData.RandomAccessLength= strlen("username@operator.com");
+ * strcpy((char*)pAuthenticationData.AuthData,  "+1-212-555-12345"); // auth data
+ * pAuthenticationData.AuthDataLength = strlen("+1-212-555-12345");
+ * err_code = tel_req_sim_isim_authentication(&pAuthenticationData,&request_id);
+ * @endcode
+ *
+ * @remarks None
+ *
+ */
+/*================================================================================================*/
+int tel_req_sim_isim_authentication( TelSimIsimAuthenticationData_t *authentication_data, int *req_id);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SIM_H_ */
+
+/**
+* @}
+*/
+
diff --git a/include/tapi/ITapiSound.h b/include/tapi/ITapiSound.h
new file mode 100644 (file)
index 0000000..8b506aa
--- /dev/null
@@ -0,0 +1,615 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+ /**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  TAPI_SOUND      SOUND
+* @{
+*
+* @file ITapiSound.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Sound Services.\n
+      It contains a sample set of function prototypes that would be required by applications.
+
+         Note: TAPI sound service API's are used by applications for configuration and control of MIC,SPEAKER and audio path\n
+
+*/
+
+#ifndef        _ITAPI_SOUND_H_
+#define _ITAPI_SOUND_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelDefines.h>
+#include <TelErr.h>
+#include <TelUtility.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+#define TAPI_SOUND_VOLUME_TYPE         20      /**<Sound volume type   length is 20*/
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+/**
+* @enum tapi_sound_type_t
+*Sound type
+*/
+typedef enum {
+       TAPI_SND_VOLUMN_CTRL                    = 0x1,  /**< Sound Volume Control Message */
+       TAPI_SND_MIC_MUTE_CTRL,                 /**< Sound MIC Mute Control Message */
+       TAPI_SND_AUDIO_PATH_CTRL,                       /**< Audio Path Control Message */
+       TAPI_SND_VOICE_RECORDING_CTRL    = 0x06,
+       TAPI_SND_AUDIO_LOOPBACK_CTRL    = 0x10, /**< Audio Loobpack Message */
+       TAPI_SND_MASTER_CLOCK_CTRL,                                     /**< Audio Master Clock Message */
+       TAPI_SND_MAX
+} tapi_sound_type_t;
+
+/**
+* @enum tapi_sound_volume_t
+*Sound volume
+*/
+typedef enum {
+       TAPI_SOUND_MUTE              =0x00,             /**<Sound is mute*/
+       TAPI_SOUND_VOLUME_LEVEL_1=0x01,         /**<Volume level is 1*/
+       TAPI_SOUND_VOLUME_LEVEL_2=0x02,         /**<Volume level is 2*/
+       TAPI_SOUND_VOLUME_LEVEL_3=0x03,         /**<Volume level is 3*/
+       TAPI_SOUND_VOLUME_LEVEL_4=0x04,         /**<Volume level is 4*/
+       TAPI_SOUND_VOLUME_LEVEL_5=0x05,         /**<Volume level is 5*/
+       TAPI_SOUND_VOLUME_LEVEL_6=0x06,         /**<Volume level is 6*/
+       TAPI_SOUND_VOLUME_LEVEL_7=0x07,         /**<Volume level is 7*/
+       TAPI_SOUND_VOLUME_LEVEL_8=0x08,         /**<Volume level is 8*/
+       TAPI_SOUND_VOLUME_LEVEL_9=0x09          /**<Volume level is 9*/
+} tapi_sound_volume_t;
+
+/**
+* @enum tapi_sound_volume_type_t
+* Sound volume Type
+*/
+typedef enum {
+      TAPI_SOUND_VOL_VOICE                     =0x01,  /**< Voice volume*/
+      TAPI_SOUND_VOL_KEYTONE       =0x02,      /**< keytone volume*/
+      TAPI_SOUND_VOL_BELL              =0x03,  /**< bell volume                */
+      TAPI_SOUND_VOL_MESSAGE       =0x04,      /**< message tone volume*/
+      TAPI_SOUND_VOL_ALARM             =0x05,  /**< alarm volume*/
+      TAPI_SOUND_VOL_SPK_PHONE     =0x11,      /**< Voice volume*/
+      TAPI_SOUND_VOL_HFK_VOICE     =0x21,      /**< HFK Voice volume*/
+      TAPI_SOUND_VOL_HFK_KEYTONE    =0x22,     /**< HFK keytone volume*/
+      TAPI_SOUND_VOL_HFK_BELL  =0x23,  /**< HFK bell volume*/
+      TAPI_SOUND_VOL_HFK_MESSAGE       =0x24,  /**< HFK message volume*/
+      TAPI_SOUND_VOL_HFK_ALARM =0x25,  /**< HFK alarm volume*/
+      TAPI_SOUND_VOL_HFK_PDA_MISC   =0x26,     /**< HFK PDA misc volume*/
+      TAPI_SOUND_VOL_HEADSET_VOICE  =0x31,     /**< HFK Voice volume*/
+      TAPI_SOUND_VOL_BT_VOICE  =0x41,  /**< HFK Voice volume*/
+      TAPI_SOUND_VOL_TYPE_ALL  =0xFF,  /**< All volume types*/
+} tapi_sound_volume_type_t;
+
+typedef enum {
+      TAPI_SOUND_MIC_UNMUTE        =0x00,
+      TAPI_SOUND_MIC_MUTE              =0x01,
+} tapi_sound_mic_mute_t;
+
+/**
+* @enum tapi_sound_audio_path_type
+* Sound audio path type
+*/
+typedef enum {
+      TAPI_SOUND_HANDSET                       =0x01,          /**<Audio path is handset*/
+      TAPI_SOUND_HEADSET               =0x02,          /**<Audio path is handset*/
+      TAPI_SOUND_HANDSFREE             =0x03,          /**<Audio path is Handsfree*/
+      TAPI_SOUND_BLUETOOTH             =0x04,  /**<Audio path is bluetooth*/
+      TAPI_SOUND_STEREO_BLUETOOTH   =0x05,     /**<Audio path is stereo bluetooth*/
+      TAPI_SOUND_SPK_PHONE             =0x06,  /**<Audio path is speaker phone*/
+      TAPI_SOUND_HEADSET_3_5PI     =0x07,      /**<Audio path is headset_3_5PI*/
+      TAPI_SOUND_BT_NSEC_OFF       =0x08,
+      TAPI_SOUND_MIC1              =0x09,
+      TAPI_SOUND_MIC2              =0x0A,
+      TAPI_SOUND_HEADSET_HAC       =0x0B,
+} tapi_sound_audio_path_t;
+
+typedef enum {
+      TAPI_SOUND_SOURCE_PHONE  =0x01,  //Audio source is phone
+      TAPI_SOUND_SOURCE_PDA        =0x02,  //Audio source is pda
+} tapi_sound_voice_source_t;
+
+typedef enum {
+       TAPI_SOUND_AUDIO_SOURCE_ON      = 0x01,
+       TAPI_SOUND_AUDIO_SOURCE_OFF
+} tapi_sound_audio_source_type_t;
+
+typedef enum {
+       TAPI_SOUND_VOICE_RECORDING_OFF  = 0x00,
+       TAPI_SOUND_VOICE_RECORDING_ON   = 0x01,
+} tapi_sound_voice_recording_status_t;
+
+typedef enum {
+       TAPI_SOUND_AUDIO_LOOPBACK_OFF,
+       TAPI_SOUND_AUDIO_LOOPBACK_PCM_ON,
+       TAPI_SOUND_AUDIO_LOOPBACK_PACKET_ON,
+       TAPI_SOUND_AUDIO_LOOPBACK_MAX,
+} TelAudioLoopbackStatus_t;
+
+typedef struct {
+       tapi_sound_audio_path_t path;
+       TelAudioLoopbackStatus_t status;
+} TelAudioLoopbackMode_t;
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/**
+* This structure defines sound volume info result control type.
+*/
+typedef struct {
+       tapi_sound_volume_type_t        type;                           /**<volume type*/
+       tapi_sound_volume_t             level;                          /**<volume level*/
+} tapi_sound_volumn_info_res;
+
+/**
+* This structure defines sound volume control result type.
+*/
+typedef struct {
+       char                                            num_record;                                     /**<Number of record*/
+       tapi_sound_volumn_info_res      pinfo[TAPI_SOUND_VOLUME_TYPE];  /**<Volume info result*/
+} tapi_sound_volumn_ctrl_res;
+
+/**
+* This structure defines sound volume control type.
+*/
+typedef struct {
+       tapi_sound_volume_t             volume;                 /**<volume*/
+       tapi_sound_volume_type_t        vol_type;               /**<volume type*/
+} tapi_sound_volume_control_t;
+
+typedef struct {
+       tapi_sound_type_t       type;
+       tapi_phone_err_t        cause;
+} tapi_sound_error_info_t;
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+/**
+ *
+ * @brief  This function is used to send to Telephony Server to get the volume status of the phone.
+ * Application can make use this API.
+ *
+ * This function makes Dbus method call to Telephony Sever and returns immediate value.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered in the corresponding event asynchronously.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ *
+ *
+ * @param[in]  vol_control_type
+ * -#tapi_sound_volume_type_t is the type of sound volume
+ *
+ * @param[out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SOUND_VOLUMECTRL_RSP and the event data is #tapi_sound_volumn_ctrl_res.  Asynchronous return status
+ *  is always success as TAPI_API_SUCCESS.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded call application
+ *
+ * @code
+ * #include <ITapiSound.h>
+ *
+ * int ret_val = 0;
+ * int requestId = -1;
+ * tapi_sound_volume_type_t vol_type = TAPI_SOUND_VOL_VOICE;
+ *
+ * // GET VOLUME INFO
+ * ret_val= tel_get_sound_volume_info (vol_type, &requestId);
+ *
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int    tel_get_sound_volume_info(tapi_sound_volume_type_t vol_control_type, int *pRequestId);
+
+/**
+ *
+ * @brief  This function is used to send to Telephony Server to control the phone volume .
+ * Application can make use this API.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ *
+ *
+ * @param[in]  vol_control
+ * -#tapi_sound_volume_control_t  is the sound volume control type
+ *
+ * @param [out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded call application
+ *
+ * @code
+ * #include <ITapiSound.h>
+ *
+ * int ret_val=0;
+ * int requestId=-1;
+ * tapi_sound_volume_control_t vol_control;
+ * vol_control.volume=TAPI_SOUND_VOLUME_LEVEL_3;
+ * vol_control.vol_type=TAPI_SOUND_VOL_VOICE;
+ *
+ * ret_val= tel_set_sound_volume_info(vol_control,&requestId); // volume level set
+ *
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_set_sound_volume_info(tapi_sound_volume_control_t vol_control, int *pRequestId);
+
+/**
+ * @brief  This function is used to Send to Telephony Server to set voice path .
+ * Application can make use this API.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ *
+ *
+ * @param[in]   vc_path
+ * -#tapi_sound_audio_path_t is the sound audio path
+ *
+ * @param [out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded call application
+ *
+ *
+ * @code
+ * #include <ITapiSound.h>
+ * tapi_sound_audio_path_t  vc_path;
+ *
+ * //VOICE PATH
+ * vc_path=TAPI_SOUND_HANDSET;
+ * ret_val= tel_set_sound_path (vc_path,&requestId); // sound path
+ *
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_set_sound_path(tapi_sound_audio_path_t  vc_path, int *pRequestId);
+
+/**
+ * @brief  This function is used to Send to Telephony Server to control  the microphone as mute during the call.
+ * Application can make use this API.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ *
+ *
+ * @param[in]   micmute_set
+ * -#tapi_sound_mic_mute_t is the status of mic mute
+ *
+ * @param [out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded call application
+ *
+ * @code
+ * #include <ITapiSound.h>
+ *
+ * tapi_sound_mic_mute_t  set_micmute;
+ * set_micmute=TAPI_SOUND_MIC_MUTE;
+ * printf("tel_set_sound_mute_status \n");
+ * ret_val= tel_set_sound_mute_status (set_micmute,&requestId); // set mute status
+ *
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int    tel_set_sound_mute_status(tapi_sound_mic_mute_t micmute_set, int * pRequestId);
+
+/**
+ * @brief  This function is used to Send to Telephony Server to get whether the microphone is muted or not .
+ * Application can make use this API.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * Do not use this function. This function is dedicated to the embedded call application only.
+ *
+ * @param [out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SOUND_MICMUTECTRL_RSP and the event data is #tapi_sound_mic_mute_t.  Asynchronous return status
+ *  is always success as TAPI_API_SUCCESS.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * Embeded call application
+ *
+ * @code
+ * #include <ITapiSound.h>
+ *
+ * // GET MUTE STATUS
+ * ret_val = tel_get_sound_mute_status(&requestId);
+ *
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+int tel_get_sound_mute_status(int *pRequestId);
+
+
+/**
+ *
+ * @brief  This function is invoked to test audio loopback
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  Mode
+ *    -  Audioloopback parameter
+ *
+ * @param  [in]  pRequestId
+ *    -  Request ID
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_sound_loopback(TelAudioLoopbackMode_t *Mode, int *pRequestId);
+
+/**
+ *
+ * @brief  This function is invoked to control audio clock
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param  [in]  bEnable
+ *    -  Enable/Disable
+ *
+ * @param  [in]  pRequestId
+ *    -  Request ID
+ *
+ * @par Async Response Message:
+ * - NA
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ */
+int tel_set_sound_clock(int bEnable, int *pRequestId);
+
+/**
+ * @brief  This function is used to send to Telephony Server to control whether Voice recording is started or not.
+ * Application can make use this API.
+ *
+ * @par Sync (or) Async:
+ * - This is an Asynchronous API
+ *
+ * @par Important Notes:
+ * - None
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] voice_record
+ *    -  tapi_sound_voice_recording_status_t
+ *
+ * @param [out] pRequestId
+ *  - Unique identifier for a particular request.
+ *  (pRequestId value can be any value from 0 to 255. Invalid request_id has value -1)
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Otherwise it provides an error code (Refer #TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ *
+ */
+int tel_control_sound_voice_recording(tapi_sound_voice_recording_status_t voice_record, int *pRequestId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_ITAPI_SOUND_H_
+
+/**
+* @}
+*/
+
diff --git a/include/tapi/ITapiSs.h b/include/tapi/ITapiSs.h
new file mode 100644 (file)
index 0000000..5c06dc2
--- /dev/null
@@ -0,0 +1,1148 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+/**
+* @open
+* @ingroup             TelephonyAPI
+* @addtogroup  SS_TAPI         SS(Supplementary services)
+* @{
+*
+* @file ITapiSs.h
+
+     @brief This file serves as a "C" header file defines functions for Tapi Supplementary services\n
+      It contains a sample set of function prototypes that would be required by applications.
+ */
+
+#ifndef _ITAPI_SS_H_
+#define _ITAPI_SS_H_
+
+ /*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <TelSs.h>
+#include <TelUtility.h>
+#include <TelDefines.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+
+ /**
+ * @brief  This function sends a request to activate/deactivate call barring.
+ *
+ *  This service makes it possible for a mobile subscriber
+ *  to activate barring of certain categories of outgoing or incoming calls according to a barring program which is selected from a set
+ *  of one or more barring programs chosen at provision time and is valid for all outgoing or incoming calls, or just those associated
+ *   with a specific basic service group. Also this API allows deactivating call barring based on categories set.
+ * If the user call this function with wrong password 3 times subsequently, the barring service can be blocked.
+ * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pBarringInfo
+ *   - Contains the information about call barring
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  An asynchronous notification event is returned as a confirmation
+ *  The event associated is TAPI_EVENT_SS_BARRING_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsBarringStatusInfo_t. \n
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_get_ss_barring_status, tel_change_ss_barring_password
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status = -1;
+ * TelSsCallBarringInfo_t  pBarringInfo;// = {0,};
+ * int pRequestId=0;
+ * char bar_pwd[5]="0000";
+ *
+ * pBarringInfo.Mode = TAPI_SS_CALL_BAR_ACTIVATE;
+ * pBarringInfo.Type = TAPI_CALL_BARRING_ALL_OUTGOING_CALLS;
+ * pBarringInfo.CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * strcpy(pBarringInfo.szPassword,bar_pwd);
+ * ret_status = tel_set_ss_barring (&pBarringInfo,&pRequestId);
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+ /*================================================================================================*/
+int   tel_set_ss_barring(const  TelSsCallBarringInfo_t *pBarringInfo,int * req_id);
+
+/**
+ *
+ * @brief  This function gets call barring status.
+ *
+ * The mobile subscriber may determine by subscription of a set of one or more unique barring
+ * programs what kind of outgoing or incoming calls should be barred.
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] BarType
+ *   - Specifies barring type i.e. Outgoing international, outgoing all, Incoming all etc.
+ *
+ * @param [in] CallType
+ *   - Specifies the type of call i.e. Voice call, Video Call etc.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsBarringStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (#TapiResult_t) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_set_ss_barring, tel_change_ss_barring_password
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status;
+ * TelSsCallBarType_t BarType =TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL;
+ * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_get_ss_barring_status(BarType,CallType,&pRequestId); // get barring status
+ * printf ("The return value is %d\n", ret_status);
+ *
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_get_ss_barring_status(TelSsCallBarType_t  BarType, TelSsCallType_t  CallType,int * req_id);
+
+ /**
+ *
+ * @brief  This function allows changing of the barring password in Network.
+ *
+ * User can request network to change his own barring password. If the old password is not same with
+ * what network knows, it will be rejected by network. Also new password should be same with another new password
+ * which is to confirm user input. Otherwise the request must be rejected by Telephony Sever.
+ * If the user call this function with wrong old password 3 times subsequently, the barring service can be blocked.
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service request has been granted or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - Based on 3GPP TS 22.030 section 6.5.4 Registration of New Password. Only one Change Barring Password request is allowed
+ *   at a time and TS might return TAPI_API_REQUEST_MAX_IN_PROGRESS if another request is received.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pOldPassword
+ *   - Old password set for Barring in Network. This is Null terminated string
+ *
+ * @param [in] pNewPassword
+ *   - New password for Barring to be set in Network. This is Null terminated string.
+ *
+ * @param [in] pNewPasswordAgain
+ *   - New password again. This is Null terminated string.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  There is no event data with this event.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @see
+ * - None
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_change_ss_barring_password ("0000","0000","0000",&pRequestId); // change barring password
+ *
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_change_ss_barring_password(const char*  pOldPassword, const char*  pNewPassword, const char * pNewPasswordAgain,int * req_id);
+
+ /**
+ *
+ * @brief  This function allows to set (register/erase/activate/deactivate) call forwarding option at the Network.
+ *
+ * This enables to forward the calls to another party. This service permits a called mobile subscriber
+ * to have the network send all incoming calls, or just those associated with a specific Basic service group,
+ * addressed to the called mobile subscriber's directory number and which meet
+ * various call FORWARD condition to another directory number.
+ * The ability of the served mobile subscriber to originate calls is unaffected.
+ * If the service is activated, a call is forwarded only if under this call forward condition.
+ * Application has to call this API in order to explicitly register/erase/activate/deactivate
+ * the call forwarding. Request will be passed irrespective of whether already
+ * another SS call forward is ongoing.
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] pForwardInfo
+ *   - Contains the Call forward information like forward mode, forward type, etc.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_FORWARD_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data will be #TelSsForwardingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ * \image html CallForward.jpg
+ * \image latex CallForward.jpg
+ *
+ * \see tel_get_ss_forward_status
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int ret_status =0;
+ * int pRequestId=0;
+ * TelSsForwardInfo_t pForwardInfo;
+ * pForwardInfo.Mode =TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+ * pForwardInfo.Type = TAPI_CS_FORWARD_TYPE_VOICE_EV;
+ * pForwardInfo.Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+ * pForwardInfo.NoReplyConditionTimer = 10;
+ * int len;
+ * char cf_number[20]= {"9986529874"};//number to which calles need to be forwarded.
+ *
+ * len = strlen(cf_number);
+ * printf("Length of CF number :%d \n",len);
+ * memcpy(&(pForwardInfo.szPhoneNumber),cf_number,len);
+ *
+ * ret_status = tel_set_ss_forward (&pForwardInfo,&pRequestId);
+ *
+ * @endcode
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_set_ss_forward( const  TelSsForwardInfo_t *pForwardInfo,int * req_id);
+
+ /**
+ *
+ * @brief  This function provides option to get the call forwarding status of different calls from Network.
+ *
+ * The data request procedure enables the mobile subscriber to obtain information about the data stored in the PLMN.
+ * After having requested this procedure the network shall return the following information:
+ * -   in response to a general data request the served mobile subscriber should be given a list of all Basic service groups
+ *     to which call forwarding unconditional is registered, including information whether or not it is active and operative,
+ *     and the associated forwarded-to numbers
+ * -   in response to a specific request concerning one particular Basic service group,
+ *     the served mobile subscriber should be informed whether or not call forwarding unconditional is registered,
+ *     including information whether or not it is active and operative for that Basic service group.
+ *     If CFU is registered, the associated forwarded-to number shall be given.
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] Type
+ *   - Specifying the Forward call type i.e. voice call, Video Call, Data Calls etc.
+ *
+ * @param [in] Condition
+ *   - Used to specify the forward condition i.e. unconditional, When no reply, when busy, when not reachable etc.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsForwardingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_set_ss_forward
+ *
+ * @code
+ * #include<ITapiSS.h>
+ * int  ret_status = 0;
+ * TelSsForwardType_t Type =TAPI_CS_FORWARD_TYPE_VOICE_EV;
+ * TelSsForwardWhen_t  Condition = TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV;
+ * int pRequestId=0;
+ *
+ * ret_status = tel_get_ss_forward_status(Type,Condition,&pRequestId); // get forward status
+ *
+ * @endcode
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_get_ss_forward_status(TelSsForwardType_t Type, TelSsForwardWhen_t  Condition,int * req_id);
+
+ /**
+ *
+ * @brief  This function activates/deactivates the call waiting service.
+ * The call waiting service permits a mobile to be notified of an incoming
+ * call (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
+ * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+ * If this function is called normally, the asynchronous response comes in a few second from network. The response indicates
+ * the service request has been granted or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] waitInfo
+ *   - Specifies the status of call-waiting service i.e. On (TRUE) or off (FALSE)
+ *
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_WAITING_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsWaitingStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_get_ss_waiting_status
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int   ret_status;
+ * TelSsWaitingInfo_t waitInfo;
+ * waitInfo.Mode = TAPI_SS_CW_ACTIVATE;
+ * waitInfo.CallType =TAPI_CALL_TYPE_VOICE_EV;
+ * int RequestID;
+ *
+ * ret_status = tel_set_ss_waiting (&waitInfo,&RequestID); // set call waiting
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_set_ss_waiting( const TelSsWaitingInfo_t *waitInfo, int * req_id);
+
+ /**
+ *
+ * @brief  This function queries the status of call waiting service.
+ *
+ * @par Notes:
+ * The call waiting service permits a mobile to be notified of an incoming call
+ * (as per basic call procedures) while the traffic channel (BM or LM) is not available for the incoming call and the mobile subscriber
+ * is engaged in an active or held call. Subsequently, the subscriber can accept, reject, or ignore the incoming call.
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] CallType
+ *   - TelSsCallType
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelSsWaitingInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_set_ss_waiting
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int   ret_status;
+ * TelSsCallType_t CallType = TAPI_CALL_TYPE_VOICE_EV;
+ * int RequestID;
+ *
+ * ret_status = tel_get_ss_waiting_status ( CallType,&RequestID); // get call waiting info
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_get_ss_waiting_status( const TelSsCallType_t CallType,int * req_id);
+
+ /**
+ *
+ * @brief  This function queries the status of calling line identity service.
+ *
+ * @par Notes:
+ * The group of Line Identification Supplementary Services is divided into the following six Supplementary Services:
+ * CLIP - Calling line identification presentation
+ *        This Supplementary Service provides for the ability to indicate the line identity of the calling party to the called party.
+ *        The network shall deliver the calling line identity to the called party at call set-up time,
+ *        regardless of the terminal capability to handle the information.
+ * CLIR - Calling line identification restriction
+ *       the CLIR Supplementary Service is a Supplementary Service offered to the calling party
+ *       to prevent presentation of the calling party's line identity, to the called party.
+ * COLP - Connected line identification presentation
+ *        This Supplementary Service is not a dialing check but an indication to the calling subscriber
+ *        of the connected line identity in a full ISDN/PLMN environment,
+ *        the connected line identity shall include all the information necessary to unambiguously identify the connected party.
+ *        The network shall deliver the connected line identity to the calling party
+ *        regardless of the terminal capability to handle the information.
+ * COLR - Connected line identification restriction
+ *        The COLR Supplementary Service is a Supplementary Service offered
+ *        to the connected party to prevent presentation of the connected line identity, to the calling party.
+ *        In the case where the calling party has an override category.
+ * CDIP - Called line identification presentation
+ * CNAP - Calling name presentation
+ * This function queries the service status with #TelSsCliType_t
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from network.
+ * The response indicates the service status.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] CliType
+ *   - TelSsCliType_t
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF and asynchronous return status is indicated by #TelSsCause_t.
+ *  The event data is #TelCliStatusInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * int  ret_status = 0;
+ * TelSsCliType_t CliType =TAPI_SS_CLI_CDIP;
+ * int pRequestId;
+ *
+ * ret_status = tel_get_ss_cli_status(CliType,&pRequestId); // get cli info
+ * @endcode
+ *
+ * @see
+ * - None
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int   tel_get_ss_cli_status(TelSsCliType_t CliType,int * req_id);
+
+ /**
+ *
+ * @brief  This function is used to send a USSD string or User response to the Network.
+ *
+ * The unstructured supplementary service data (USSD) mechanism allows the Mobile Station (MS) user and
+ * a PLMN operator defined application to communicate in a way which is transparent
+ * to the MS and to intermediate network entities.
+ * The mechanism allows development of PLMN specific supplementary services.
+ * USSD string is like *109, *109*72348937857623#.
+ * There are two modes of USSD: MMI-mode and application mode.
+ * MMI-mode USSD is for the transparent transport of MMI strings entered by the user to the network using this function
+ * and for the transparent transport of text strings from the network that are displayed
+ * by the mobile for user information.
+ * Application mode USSD is for the transparent transport of data between the network and the UE.
+ * Application mode USSD is intended to be used by applications in the network and their peer applications in the UE.
+ * The peer application in the UE send response with #tel_send_ss_ussd_response
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from the telephony server.
+ * The response indicates whether the sending request is successfully delivered or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is delivered with the async response as below.
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [in] szUssdString
+ *   - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
+ *   - USSD String data length
+ *   - ANSI string passed by the client
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsUssdMsgInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *  - No SS and USSD Transaction should be ongoing. If there an ongoing transaction, new USSD request will be returned to the Application
+ *   with an error (USSD_BUSY)
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see #tel_send_ss_ussd_response, #tel_send_ss_ussd_cancel
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+ * int  ret;
+ *
+ * memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+ * strcpy(ussdString , "*124#");
+ *
+ * ret = tel_send_ss_ussd_request(ussdString, &request_id); // request ussd
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_ss_ussd_request(const TelSsUssdMsgInfo_t *ussd_info, int *req_id);
+
+ /**
+ *
+ * @brief  This function is used to send a USSD User response to the Network.
+ *
+ * @par Notes:
+ * Refer #tel_send_ss_ussd_request. In the application mode, the network initiates USSD string
+ * to the peer application at UE. The UE might reply a USSD string with this function.
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the string is delivered successfully to network or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered asynchronously.
+ * @par Sync (or) Async:
+ *
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] ussdRspRecord
+ *   - Data coding scheme used (GSM 7bit or 8bit default alphabet etc, defined as 3GPP TS 23.038)
+ *   - USSD String data length
+ *   - ANSI string passed by the client
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsUssdMsgInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see #tel_send_ss_ussd_request, #tel_send_ss_ussd_cancel
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ *
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * char ussd_str[25] = {"*123*0#"};
+ * unsigned char len =0;
+ * int ret = 0;
+ * len = strlen(ussd_str);
+ *
+ * TelSsUssdMsgRspInfo_t * ussdRspRecord;
+ * ussdRspRecord = (TelSsUssdMsgRspInfo_t*)malloc(sizeof(TelSsUssdMsgRspInfo_t));
+ * ussdRspRecord->SsRespType=TAPI_USSD_RES_OK;
+ * ussdRspRecord->IndType=TAPI_USSD_IND_NOTIFY;
+ * ussdRspRecord->UssdInfo.Dcs=0x0f;
+ * ussdRspRecord->UssdInfo.RequestedBySAT=0;
+ * strcpy(ussdRspRecord->UssdInfo.szUssdString,ussd_str);
+ * ussdRspRecord->UssdInfo.szUssdString[strlen(ussdRspRecord->UssdInfo.szUssdString)]='\0';
+ * ussdRspRecord->UssdInfo.UssdStringLength=strlen(ussd_str);
+ * int pRequestId=0;
+ *
+ * ret = tel_send_ss_ussd_response( ussdRspRecord,&pRequestId); // send ussd response
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int  tel_send_ss_ussd_response(const TelSsUssdMsgInfo_t *ussd_info, int *req_id);
+
+
+ /**
+ *
+ * @brief  This function is used to send a USSD cancel to release ussd session
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the string is delivered successfully to network or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_USSD_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsUssdMsgInfo_t.
+ *
+ * @pre
+ *  - Initialize Dbus connection with #tel_init or #tel_init_at_ecore_loop
+ *  - Register caller's application name with #tel_register_app_name
+ *  - Register telephony events to listen
+ *  - A event loop is running to listen events
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see #tel_send_ss_ussd_request, #tel_send_ss_ussd_response.
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+ * int  ret;
+ * int request_id;
+ *
+ * memset(ussdString, 0, TAPI_SS_USiSD_DATA_SIZE_MAX);
+ * strcpy(ussdString , "*124#");
+ *
+ * ret= tel_send_ss_ussd_request(ussdString,&request_id);
+ *
+ * ret = tel_send_ss_ussd_cancel(&equestId); // ussd cancel
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int tel_send_ss_ussd_cancel(int *req_id);
+
+ /**
+ *
+ * @brief  This function is used to Read AOC parameter values on the SIM.
+ *
+ * @par Notes
+ * This supplementary service provides the MS with the information to produce an estimate
+ * of the cost of the service used. Charges are indicated for the call(s) in progress
+ * when mobile originated or for the roaming leg only when mobile terminated.
+ * Any charges for non-call related transactions, and for certain supplementary services,
+ * such as Call Forwarding are not indicated.
+ * The MS will receive at the beginning of each call (and as necessary during the call)
+ * a message, the Charge Advice Information. This message contains the elements which together define
+ * the rate at which the call is to be charged, time dependence,
+ * data dependence and for unit increments - see TS 22.024 [3].
+ * The MS shall still indicate appropriate charges even when roaming, based on Home PLMN units.
+ * Where applicable, the volume charge for Packet data service,
+ * in addition to the normal time dependent and incremental charges, shall be indicated.
+ * To indicate the charge per call the Mobile station shall display the units consumed
+ * so far during the present call(s) and maintain this value until the MS is switched off or a new call set-up is attempted.
+ * Where required to indicate the total accumulated charge, the MS shall be able to display,
+ * and the SIM/USIM shall store in the ACM, the running cumulative unit charge.
+ * This value must be stored securely, and all reasonable steps shall be taken to ensure that
+ * the written value cannot be interrupted, reset or corrupted (except resetting under control of the unblocking key).
+ * This function get the AOC configuration information from PLMN
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the query is delivered successfully to network or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] AocType
+ *   - Specifies which type of Advice of charge information to be read namely Maximum ACM,
+ *     Price per unit currency, Current call meter and Accumulated call meter values.
+ *
+ * @param [out] req_id
+ *   - Unique identifier for a particular request.
+ *   - request_id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_AOC_RSP and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelCallAocInfo_t.
+ *
+ * @pre
+ *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
+ *  - Setting of AOC needs PIN2 Verification
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_set_ss_aoc_info
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * TelSsAocType_t AocType = TAPI_SS_AOC_TYPE_ACM;
+ * ret_status = tel_get_ss_aoc_info (AocType,&pRequestId); // get AOC info
+ * @endcode
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int  tel_get_ss_aoc_info( TelSsAocType_t AocType,int * req_id);
+
+ /**
+ *
+ * @brief  This function is used to Read AOC parameter values on the SIM.
+ *
+ * @par Notes:
+ * Refer #tel_get_ss_aoc_info
+ *
+ * If this function is called normally, the asynchronous response comes in a few second from Telephony Server.
+ * The response indicates whether the query is delivered successfully to network or not.
+ *
+ * This API makes Dbus method call to Telephony Sever and gets immediate feedback.
+ * However it just means that the API request has been transfered to the CP successfully.
+ * The actual operation result is being delivered asynchronously.
+ *
+ * @par Sync (or) Async:
+ * This is an Asynchronous API.
+ *
+ * @par Important Notes:
+ * - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param [in] AocSetInfo
+ *   - Specifies which type of Advice of charge information to be set namely Maximum ACM,
+ *     Price per unit currency, Current call meter and Accumulated call meter values.
+ *
+ * @param [out] RequestId
+ *   - Unique identifier for a particular request.
+ *   - RequestId value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.  *
+ *
+ * @par Async Response Message:
+ *  The event associated is TAPI_EVENT_SS_SET_AOC_CNF and asynchronous return status is indicated by #TelSsCause_t. The event data
+ *  is #TelSsErrorInfo_t.
+ *
+ * @pre
+ *  - Advice of charge depends on the SIM for setting or reading AOC parameters.
+ *  - Setting of AOC needs PIN2 Verification
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - TAPI_API_SUCCESS - indicating that the operation has completed successfully. \n
+ * - Refer #TapiResult_t for failure and error code
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ * \see tel_get_ss_aoc_info
+ *
+ *\image html ussd.jpg
+ *\image latex ussd.jpg
+ * @code
+ * #include<ITapiSS.h>
+ *
+ * TelCallAocInfo_t  *pAocSetInfo;
+ * int request_id=0;
+ * pAocSetInfo = (TelCallAocInfo_t *)calloc(1,sizeof(TelCallAocInfo_t));
+ * pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
+ * int ret_status =0;
+ *
+ * ret = tel_set_ss_aoc_info (pAocSetInfo,&request_id); // set aoc info
+ * @endcode
+ *
+ *
+ * @remarks
+ * - None
+ *
+ *
+ */
+/*================================================================================================*/
+int  tel_set_ss_aoc_info( TelCallAocInfo_t * AocSetInfo, int * RequestId);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ITAPI_SS_H_ */
+
+/**
+* @}
+*/
+
diff --git a/include/tapi/tapi_proxy.h b/include/tapi/tapi_proxy.h
new file mode 100644 (file)
index 0000000..6cc5b46
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TAPI_PROXY_H_
+#define _TAPI_PROXY_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <glib-2.0/glib.h>
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+/*
+ * This function is used to check the connection status with telephony server through DBUS.
+ *
+ * @return             True / False
+ * @param[in]          NONE
+ * @param[out] None
+ * @remark
+ * @Refer
+ */
+int tapi_check_dbus_status(void);
+
+ /*
+ *     This function is invoked to start as a thread and this thread will be in gmain loop to serve the
+ *     the requests from clients (Tapi API's).
+ *
+ * @param      None
+ * @return     None
+ * @remark     If this functions exits, then it is an error or crash
+ *
+ */
+int tapi_send_request( int tapi_service, int tapi_service_function,
+                       GArray *in_param1, GArray *in_param2, GArray *in_param3, GArray *in_param4,
+                       GArray **out_param1, GArray **out_param2, GArray **out_param3,GArray **out_param4);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_TAPI_PROXY_H_ */
+
diff --git a/include/tapi/tapi_proxy_internal.h b/include/tapi/tapi_proxy_internal.h
new file mode 100644 (file)
index 0000000..29acefa
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TAPI_PROXY_INTERNAL_H_
+#define _TAPI_PROXY_INTERNAL_H_
+
+/*==================================================================================================
+                                         INCLUDE FILES
+==================================================================================================*/
+#include <glib-2.0/glib.h>
+#include <dbus/dbus-protocol.h>
+#include <dbus/dbus-glib.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*==================================================================================================
+                                           CONSTANTS
+==================================================================================================*/
+
+/*==================================================================================================
+                                            MACROS
+==================================================================================================*/
+
+/*==================================================================================================
+                                             ENUMS
+==================================================================================================*/
+
+/*==================================================================================================
+                                 STRUCTURES AND OTHER TYPEDEFS
+==================================================================================================*/
+
+/*==================================================================================================
+                                     FUNCTION PROTOTYPES
+==================================================================================================*/
+/*
+ * This function is used to check the connection status with telephony server through DBUS.
+ *
+ * @return             True / False
+ * @param[in]          NONE
+ * @param[out] None
+ * @remark
+ * @Refer
+ */
+int tapi_check_dbus_status_internal(void);
+
+ /*
+ *     This function is invoked to start as a thread and this thread will be in gmain loop to serve the
+ *     the internal requests from clients (Tapi API's).
+ *
+ * @param      None
+ * @return     None
+ * @remark     If this functions exits, then it is an error or crash
+ *
+ */
+int tapi_send_request_internal( int tapi_service, int tapi_service_function,
+                       GArray *in_param1, GArray *in_param2, GArray *in_param3, GArray *in_param4,
+                       GArray **out_param1, GArray **out_param2, GArray **out_param3,GArray **out_param4);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*_TAPI_PROXY_H_ */
+
diff --git a/packaging/libslp-tapi.spec b/packaging/libslp-tapi.spec
new file mode 100644 (file)
index 0000000..6cca771
--- /dev/null
@@ -0,0 +1,75 @@
+
+Name:       libslp-tapi
+Summary:    Telephony client API
+Version:    0.5.67
+Release:    1
+Group:      System/Libraries
+License:    LGPLv2
+Source0:    libslp-tapi-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(dbus-1)
+BuildRequires:  pkgconfig(gthread-2.0)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(dbus-glib-1)
+BuildRequires:  pkgconfig(security-server)
+
+%description
+Telephony client API library
+
+
+
+%package devel
+Summary:    Telephony client API (devel)
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+Telephony client API library (devel)
+
+
+%prep
+%setup -q
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+rm -rf %{buildroot}/usr/include/telephony/tapi/.gitignore
+
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+%doc COPYING
+%{_libdir}/*.so.*
+
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/telephony/common/*.h
+%{_includedir}/telephony/tapi/*.h
+%exclude %{_includedir}/telephony/tapi/tapi-lib-proxy.h
+%exclude %{_includedir}/telephony/common/tel_cs_conn.h
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/*.so
+
+
diff --git a/src/common_tapi_lib.c b/src/common_tapi_lib.c
new file mode 100644 (file)
index 0000000..af81b8a
--- /dev/null
@@ -0,0 +1,257 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <security-server.h>
+
+#include <glib-2.0/glib.h>
+
+#include "TelDefines.h"
+#include "tapi-lib-proxy.h"
+#include "tel_cs_conn.h"
+#include "TapiUtility.h"
+#include "tapi_proxy.h"
+
+/* This global stores the proxy connection to dbus */
+DBusGProxy* tapi_cs_proxy = NULL;
+
+extern tapi_dbus_connection_name conn_name;
+
+char *g_cookie_name;
+int g_cookie_size;
+
+/* This global stores error if any during establishing an dbus connection */
+
+static void _dump_cookie(char *data, int size)
+{
+       char buf[255] = { 0, };
+       char tmp[3] = { 0, };
+       int i = 0;
+
+       for (i = 0; i < size; i++) {
+               snprintf(tmp, 3, "%02X", data[i]);
+               strncat(buf, tmp, 3);
+               if ((i + 1) % 8 == 0)
+                       strncat(buf, "  ", 2);
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "cookie=[%s]", buf);
+}
+
+static int _cookie_init(void)
+{
+       int ret;
+
+       ret = security_server_get_cookie_size();
+       if (ret < 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "get_cookie_size() failed. ret=%d", ret);
+               return FALSE;
+       }
+       g_cookie_size = ret;
+
+       g_cookie_name = (char *) calloc(1, g_cookie_size + 1);
+       if (!g_cookie_name) {
+               g_cookie_size = 0;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "cookie alloc failed");
+               return FALSE;
+       }
+       else {
+               ret = security_server_request_cookie(g_cookie_name, g_cookie_size);
+               if (ret < 0) {
+                       free(g_cookie_name);
+                       g_cookie_name = NULL;
+                       g_cookie_size = 0;
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "request_cookie() failed. ret=%d", ret);
+                       return FALSE;
+               }
+
+               _dump_cookie(g_cookie_name, g_cookie_size);
+       }
+
+       return TRUE;
+}
+
+/**
+ *
+ * This function is used to initialise a connnection with telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          NONE
+ * @param[out]         None
+ * @remark
+ * @Refer
+ */
+static int tapi_init_cs()
+{
+       DBusGConnection* tapi_cs_connection = NULL;
+       GError* err = NULL;
+
+       g_type_init();
+
+       tapi_cs_connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &err);
+       TAPI_LIB_DEBUG(LEVEL_ERR, "tapi_cs_connection = %x");
+
+       /*      No need to assert but, need to return FALSE     */
+       if (tapi_cs_connection == NULL) {
+               if (err != NULL) {
+                       fprintf(stderr, "[FAILED]connection to dbus failed: %s\n", err->message);
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "failed to get CS connection with error cause");
+                       g_error_free(err);
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "failed to get CS connection with NULL error cause");
+               }
+               return FALSE;
+       }
+
+       tapi_cs_proxy = dbus_g_proxy_new_for_name(tapi_cs_connection, "org.projectx.telephony", "/org/projectx/app",
+                       "org.projectx.telephony");
+
+       /*      No need to assert but, need to return FALSE     */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_cs_proxy, FALSE);
+
+       return TRUE;
+}
+
+/**
+ *
+ * This function is used to check the connnection status with telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          NONE
+ * @param[out]         None
+ * @remark
+ * @Refer
+ */
+int tapi_check_dbus_status(void)
+{
+       TS_BOOL result = TRUE;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS tapi_check_dbus_status");
+
+       if (tapi_cs_proxy != NULL && dbus_g_proxy_get_interface(tapi_cs_proxy)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS Ready to use");
+               return TRUE;
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS Initializing...");
+               if (tapi_init_cs()) {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS INIT completed");
+                       result = TRUE;
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "FAIL TO DBUS-CS INIT");
+                       result = FALSE;
+               }
+       }
+
+       return result;
+}
+
+/**
+ *
+ * This function is used to send the service request to telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          tapi_service,tapi_service_function,in_param1,in_param2,in_param3,in_param4
+ * @param[out]         out_param1,out_param2,out_param3,out_param4
+ * @remark
+ * @Refer
+ */
+int tapi_send_request(int tapi_service, int tapi_service_function, GArray* in_param1, GArray* in_param2,
+               GArray* in_param3, GArray* in_param4, GArray** out_param1, GArray** out_param2, GArray** out_param3,
+               GArray** out_param4)
+{
+       int error_occurred;
+       TS_BOOL ret = FALSE;
+       TS_BOOL api_ret = TRUE;
+       GError* error = NULL;
+       GArray* in_param5 = ((void *) 0);
+
+       /**
+        * Add d-bus connection name to ALL REQUEST
+        *  - If already appended conn_name to in_param4[0] before tapi_send_request(),
+        *    then append conn_name to in_param4[1] and ignore by telephony-server.
+        */
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+       if (conn_name.length_of_name > 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "conn_name=[%s]", conn_name.name);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "no conn_name. pid=%d", getpid());
+       }
+
+       /**
+        * Add security cookie to ALL REQUEST
+        */
+       if (!g_cookie_name) {
+               if (_cookie_init() != TRUE) {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "no cookie name. pid=%d", getpid());
+                       return FALSE;
+               }
+       }
+
+       in_param5 = g_array_new(FALSE, FALSE, sizeof(gchar));
+       g_array_append_vals(in_param5, g_cookie_name, g_cookie_size + 1);
+
+       /**
+        * D-Bus send
+        */
+       api_ret = org_projectx_telephony_service_request(tapi_cs_proxy, tapi_service, tapi_service_function, in_param1,
+                       in_param2, in_param3, in_param4, in_param5, out_param1, out_param2, out_param3, out_param4, &error_occurred,
+                       &error);
+
+       if (api_ret != TRUE) {
+               // dBUS-RPC is failed
+               ret = FALSE;
+
+               // We can not say only TS is killed. This is dBUS-RPC failure including TS crash case
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "dBUS-RPC is failed %d", api_ret);
+
+               if (error != NULL) {
+                       // dBUS gives error cause
+                       TAPI_LIB_DEBUG(LEVEL_ALERT,
+                                       "D-Bus API failure: errCode[0x%x], message: [%s], service type=%d, service function=0x%x",
+                                       error_occurred, error->message, tapi_service, tapi_service_function);
+
+                       g_error_free(error);
+               }
+               else {
+                       // dBUS does not give error cause even though dBUS-RPC is failed
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "dBUS RPC is failed but error returned was NULL");
+               }
+       }
+       else {
+               // dBUS-RPC is successfully done
+               ret = TRUE;
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "dBUS RPC is successfully done. service type=%d, service function=0x%x",
+                               tapi_service, tapi_service_function);
+       }
+
+       g_array_free(in_param5, TRUE);
+
+       return ret;
+}
diff --git a/src/common_tapi_lib_internal.c b/src/common_tapi_lib_internal.c
new file mode 100644 (file)
index 0000000..c39331c
--- /dev/null
@@ -0,0 +1,246 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include <glib-2.0/glib.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <security-server.h>
+
+#include <TelDefines.h>
+#include <TapiCommon.h>
+
+#include "tapi-lib-proxy.h"
+#include "TapiUtility.h"
+#include "tapi_proxy_internal.h"
+
+/* This global stores the proxy connection to dbus */
+DBusGProxy* tapi_cs_proxy_internal;
+
+static char g_priv_cookie_name[255] = { 0, };
+static int g_priv_cookie_size = 0;
+
+/**
+ *
+ * This function is used to initialise a connnection with telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          NONE
+ * @param[out]         None
+ * @remark
+ * @Refer
+ */
+static int tapi_init_cs_internal()
+{
+       DBusGConnection* tapi_cs_connection = NULL;
+       GError* err = NULL;
+       g_type_init();
+
+       tapi_cs_connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &err);
+       TAPI_LIB_DEBUG(LEVEL_ERR, "tapi_cs_connection = 0x%x");
+
+       /*      No need to assert but, need to return FALSE     */
+       if (tapi_cs_connection == NULL) {
+               if (err != NULL) {
+                       fprintf(stderr, "[FAILED]connection to dbus failed: %s\n", err->message);
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "failed to get CS connection with error cause");
+                       g_error_free(err);
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "failed to get CS connection with NULL error cause");
+               }
+               return FALSE;
+       }
+
+       tapi_cs_proxy_internal = dbus_g_proxy_new_for_name(tapi_cs_connection, "org.projectx.telephony",
+                       "/org/projectx/app", "org.projectx.telephony");
+
+       /*      No need to assert but, need to return FALSE     */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_cs_proxy_internal, FALSE);
+
+       return TRUE;
+}
+
+/**
+ *
+ * This function is used to check the connnection status with telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          NONE
+ * @param[out]         None
+ * @remark
+ * @Refer
+ */
+int tapi_check_dbus_status_internal(void)
+{
+       TS_BOOL result = TRUE;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS tapi_check_dbus_status");
+
+       if (tapi_cs_proxy_internal != NULL && dbus_g_proxy_get_interface(tapi_cs_proxy_internal)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS Ready to use");
+               return TRUE;
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS Initializing...");
+               if (tapi_init_cs_internal()) {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "DBUS-CS INIT completed");
+                       result = TRUE;
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "FAIL TO DBUS-CS INIT");
+                       result = FALSE;
+               }
+       }
+       return result;
+}
+
+static void _dump_cookie(char *data, int size)
+{
+       char buf[255] = { 0, };
+       char tmp[3] = { 0, };
+       int i = 0;
+
+       for (i = 0; i < size; i++) {
+               snprintf(tmp, 3, "%02X", data[i]);
+               strncat(buf, tmp, 3);
+               if ((i + 1) % 8 == 0)
+                       strncat(buf, "  ", 2);
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "cookie=[%s]", buf);
+}
+
+static int _cookie_init(void)
+{
+       int ret;
+
+       ret = security_server_get_cookie_size();
+       if (ret < 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "get_cookie_size() failed. ret=%d", ret);
+               return FALSE;
+       }
+       g_priv_cookie_size = ret;
+
+       ret = security_server_request_cookie(g_priv_cookie_name, g_priv_cookie_size);
+       if (ret < 0) {
+               memset(g_priv_cookie_name, 0, 255);
+               g_priv_cookie_size = 0;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "request_cookie() failed. ret=%d", ret);
+               return FALSE;
+       }
+
+       _dump_cookie(g_priv_cookie_name, g_priv_cookie_size);
+
+       return TRUE;
+}
+/**
+ *
+ * This function is used to send the service request to telephony server through DBUS.
+ *
+ * @return                     True / False
+ * @param[in]          tapi_service,tapi_service_function,in_param1,in_param2,in_param3,in_param4
+ * @param[out]         out_param1,out_param2,out_param3,out_param4
+ * @remark
+ * @Refer
+ */
+
+TS_BOOL tapi_send_request_internal(int tapi_service, int tapi_service_function, GArray* in_param1, GArray* in_param2,
+               GArray* in_param3, GArray* in_param4, GArray** out_param1, GArray** out_param2, GArray** out_param3,
+               GArray** out_param4)
+{
+       TS_BOOL ret = FALSE;
+       int error_occurred;
+       GError* error = NULL;
+       TS_BOOL api_ret = TRUE;
+
+       GArray* in_param5 = ((void *) 0);
+
+       /**
+        * Add d-bus connection name to ALL REQUEST
+        *  - If already appended conn_name to in_param4[0] before tapi_send_request(),
+        *    then append conn_name to in_param4[1] and ignore by telephony-server.
+        */
+       tapi_dbus_connection_name app_name;
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "No dbus connection name (pid=%d)", getpid());
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "conn_name=[%s]", app_name.name);
+       }
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       /**
+        * Add security cookie to ALL REQUEST
+        */
+       if (g_priv_cookie_size == 0) {
+               if (_cookie_init() != TRUE) {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "no cookie name. pid=%d", getpid());
+                       return FALSE;
+               }
+       }
+
+       in_param5 = g_array_new(FALSE, FALSE, sizeof(gchar));
+       g_array_append_vals(in_param5, g_priv_cookie_name, g_priv_cookie_size + 1);
+
+       /**
+        * D-Bus send
+        */
+       api_ret = org_projectx_telephony_service_request_sec(tapi_cs_proxy_internal, tapi_service, tapi_service_function,
+                       in_param1, in_param2, in_param3, in_param4, in_param5, out_param1, out_param2, out_param3, out_param4,
+                       &error_occurred, &error);
+
+       if (api_ret != TRUE) {
+               // dBUS-RPC is failed
+               ret = FALSE;
+
+               // We can not say only TS is killed. This is dBUS-RPC failure including TS crash case
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "dBUS-RPC is failed %d", api_ret);
+
+               if (error != NULL) {
+                       // dBUS gives error cause
+                       TAPI_LIB_DEBUG(LEVEL_ALERT,
+                                       " D-Bus API failure: errCode[0x%x], message:[%s], service type=%d, service function=0x%x",
+                                       error_occurred, error->message, tapi_service, tapi_service_function);
+
+                       g_error_free(error);
+               }
+               else {
+                       // dBUS does not give error cause even though dBUS-RPC is failed
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "dBUS RPC is failed but error returned was NULL ");
+               }
+       }
+       else {
+               // dBUS-RPC is successfully done
+               ret = TRUE;
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "dBUS RPC is successfully done. service type=%d, service function=0x%x",
+                               tapi_service, tapi_service_function);
+       }
+
+       g_array_free(in_param5, TRUE);
+
+       return ret;
+}
diff --git a/src/porting/tel_marshaler.c b/src/porting/tel_marshaler.c
new file mode 100644 (file)
index 0000000..1589480
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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       <glib-object.h>
+
+#ifdef G_ENABLE_DEBUG
+#define g_marshal_value_peek_boolean(v)  g_value_get_boolean (v)
+#define g_marshal_value_peek_char(v)     g_value_get_char (v)
+#define g_marshal_value_peek_uchar(v)    g_value_get_uchar (v)
+#define g_marshal_value_peek_int(v)      g_value_get_int (v)
+#define g_marshal_value_peek_uint(v)     g_value_get_uint (v)
+#define g_marshal_value_peek_long(v)     g_value_get_long (v)
+#define g_marshal_value_peek_ulong(v)    g_value_get_ulong (v)
+#define g_marshal_value_peek_int64(v)    g_value_get_int64 (v)
+#define g_marshal_value_peek_uint64(v)   g_value_get_uint64 (v)
+#define g_marshal_value_peek_enum(v)     g_value_get_enum (v)
+#define g_marshal_value_peek_flags(v)    g_value_get_flags (v)
+#define g_marshal_value_peek_float(v)    g_value_get_float (v)
+#define g_marshal_value_peek_double(v)   g_value_get_double (v)
+#define g_marshal_value_peek_string(v)   (char*) g_value_get_string (v)
+#define g_marshal_value_peek_param(v)    g_value_get_param (v)
+#define g_marshal_value_peek_boxed(v)    g_value_get_boxed (v)
+#define g_marshal_value_peek_pointer(v)  g_value_get_pointer (v)
+#define g_marshal_value_peek_object(v)   g_value_get_object (v)
+#else /* !G_ENABLE_DEBUG */
+/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API.
+ *          Do not access GValues directly in your code. Instead, use the
+ *          g_value_get_*() functions
+ */
+#define g_marshal_value_peek_boolean(v)  (v)->data[0].v_int
+#define g_marshal_value_peek_char(v)     (v)->data[0].v_int
+#define g_marshal_value_peek_uchar(v)    (v)->data[0].v_uint
+#define g_marshal_value_peek_int(v)      (v)->data[0].v_int
+#define g_marshal_value_peek_uint(v)     (v)->data[0].v_uint
+#define g_marshal_value_peek_long(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
+#define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
+#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
+#define g_marshal_value_peek_float(v)    (v)->data[0].v_float
+#define g_marshal_value_peek_double(v)   (v)->data[0].v_double
+#define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
+#define g_marshal_value_peek_param(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_boxed(v)    (v)->data[0].v_pointer
+#define g_marshal_value_peek_pointer(v)  (v)->data[0].v_pointer
+#define g_marshal_value_peek_object(v)   (v)->data[0].v_pointer
+#endif /* !G_ENABLE_DEBUG */
+
+/* VOID:INT,STRING (mashal.in:1) */
+void g_cclosure_user_marshal_VOID__INT_STRING(
+               GClosure *closure,
+               GValue *return_value G_GNUC_UNUSED,
+               guint n_param_values,
+               const GValue *param_values,
+               gpointer invocation_hint G_GNUC_UNUSED,
+               gpointer marshal_data)
+{
+       typedef void (*GMarshalFunc_VOID__INT_STRING)(gpointer data1, gint arg_1, gpointer arg_2, gpointer data2);
+
+       register GMarshalFunc_VOID__INT_STRING callback;
+       register GCClosure *cc = (GCClosure*) closure;
+       register gpointer data1, data2;
+
+       g_return_if_fail (n_param_values == 3);
+
+       if (G_CCLOSURE_SWAP_DATA (closure)) {
+               data1 = closure->data;
+               data2 = g_value_peek_pointer(param_values + 0);
+       }
+       else {
+               data1 = g_value_peek_pointer(param_values + 0);
+               data2 = closure->data;
+       }
+       callback = (GMarshalFunc_VOID__INT_STRING) (marshal_data ? marshal_data : cc->callback);
+
+       callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_string (param_values + 2), data2);
+}
+
+/* VOID:INT,INT,INT,STRING (mashal.in:2) */
+void g_cclosure_user_marshal_VOID__INT_INT_INT_STRING(
+               GClosure *closure,
+               GValue *return_value G_GNUC_UNUSED,
+               guint n_param_values,
+               const GValue *param_values,
+               gpointer invocation_hint G_GNUC_UNUSED,
+               gpointer marshal_data)
+{
+       typedef void (*GMarshalFunc_VOID__INT_INT_INT_STRING)(
+                       gpointer data1,
+                       gint arg_1,
+                       gint arg_2,
+                       gint arg_3,
+                       gpointer arg_4,
+                       gpointer data2);
+
+       register GMarshalFunc_VOID__INT_INT_INT_STRING callback;
+       register GCClosure *cc = (GCClosure*) closure;
+       register gpointer data1, data2;
+
+       g_return_if_fail (n_param_values == 5);
+
+       if (G_CCLOSURE_SWAP_DATA (closure)) {
+               data1 = closure->data;
+               data2 = g_value_peek_pointer(param_values + 0);
+       }
+       else {
+               data1 = g_value_peek_pointer(param_values + 0);
+               data2 = closure->data;
+       }
+       callback = (GMarshalFunc_VOID__INT_INT_INT_STRING) (marshal_data ? marshal_data : cc->callback);
+
+       callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_int (param_values + 2),
+                       g_marshal_value_peek_int (param_values + 3), g_marshal_value_peek_string (param_values + 4), data2);
+}
+
+/* VOID:INT,INT,INT,INT,STRING (mashal.in:3) */
+void g_cclosure_user_marshal_VOID__INT_INT_INT_INT_STRING(
+               GClosure *closure,
+               GValue *return_value G_GNUC_UNUSED,
+               guint n_param_values,
+               const GValue *param_values,
+               gpointer invocation_hint G_GNUC_UNUSED,
+               gpointer marshal_data)
+{
+       typedef void (*GMarshalFunc_VOID__INT_INT_INT_INT_STRING)(
+                       gpointer data1,
+                       gint arg_1,
+                       gint arg_2,
+                       gint arg_3,
+                       gint arg_4,
+                       gpointer arg_5,
+                       gpointer data2);
+
+       register GMarshalFunc_VOID__INT_INT_INT_INT_STRING callback;
+       register GCClosure *cc = (GCClosure*) closure;
+       register gpointer data1, data2;
+
+       g_return_if_fail (n_param_values == 6);
+
+       if (G_CCLOSURE_SWAP_DATA (closure)) {
+               data1 = closure->data;
+               data2 = g_value_peek_pointer(param_values + 0);
+       }
+       else {
+               data1 = g_value_peek_pointer(param_values + 0);
+               data2 = closure->data;
+       }
+       callback = (GMarshalFunc_VOID__INT_INT_INT_INT_STRING) (marshal_data ? marshal_data : cc->callback);
+
+       callback(data1, g_marshal_value_peek_int (param_values + 1), g_marshal_value_peek_int (param_values + 2),
+                       g_marshal_value_peek_int (param_values + 3), g_marshal_value_peek_int (param_values + 4),
+                       g_marshal_value_peek_string (param_values + 5), data2);
+}
+
diff --git a/src/tapi-lib.xml b/src/tapi-lib.xml
new file mode 100644 (file)
index 0000000..4691b40
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<node name="/org/projectx/app">
+  <interface name="org.projectx.telephony">
+    <method name="service_request">
+      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="telephony_service_requests_cb"/>
+      <!-- This parameter is used to identify the tapi service -->
+      <arg type="i" name="tapi_service" direction="in" />
+      <!-- This parameter is used to identify the tapi service function  -->
+      <arg type="i" name="tapi_service_function" direction="in" />
+      <!-- INPUT PARAMS FOR SERVICE FUNCTION  -->
+      <arg type="ay" name="service_func_input_param1" direction="in" />
+      <arg type="ay" name="service_func_input_param2" direction="in" />
+      <arg type="ay" name="service_func_input_param3" direction="in" />
+      <arg type="ay" name="service_func_input_param4" direction="in" /> <!-- connection name -->
+      <arg type="ay" name="service_func_input_param5" direction="in" /> <!-- security cookie -->
+      <!-- OUTPUT PARAMS FOR SERVICE FUNCTION  -->
+            <!-- here we are taking four output params , we may not need 4, for future uses -->
+      <arg type="ay" name="service_func_output_param1" direction="out" />
+      <arg type="ay" name="service_func_output_param2" direction="out" />
+      <arg type="ay" name="service_func_output_param3" direction="out" />
+      <arg type="ay" name="service_func_output_param4" direction="out" />
+      <!-- send error code if any -->
+      <arg type="i" name="error_code" direction="out" />
+    </method>
+
+    <method name="service_request_sec">
+      <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="telephony_service_requests_sec_cb"/>
+      <!-- This parameter is used to identify the tapi service -->
+      <arg type="i" name="tapi_service" direction="in" />
+      <!-- This parameter is used to identify the tapi service function  -->
+      <arg type="i" name="tapi_service_function" direction="in" />
+      <!-- INPUT PARAMS FOR SERVICE FUNCTION  -->
+      <arg type="ay" name="service_func_input_param1" direction="in" />
+      <arg type="ay" name="service_func_input_param2" direction="in" />
+      <arg type="ay" name="service_func_input_param3" direction="in" />
+      <arg type="ay" name="service_func_input_param4" direction="in" /> <!-- connection name -->
+      <arg type="ay" name="service_func_input_param5" direction="in" /> <!-- security cookie -->
+      <!-- OUTPUT PARAMS FOR SERVICE FUNCTION  -->
+      <!-- here we are taking four output params , we may not need 4, for future uses -->
+      <arg type="ay" name="service_func_output_param1" direction="out" />
+      <arg type="ay" name="service_func_output_param2" direction="out" />
+      <arg type="ay" name="service_func_output_param3" direction="out" />
+      <arg type="ay" name="service_func_output_param4" direction="out" />
+      <!-- send error code if any -->
+      <arg type="i" name="error_code" direction="out" />
+    </method>
+  </interface>
+</node>
+
diff --git a/src/tapi_proxy_call.c b/src/tapi_proxy_call.c
new file mode 100644 (file)
index 0000000..4e8b989
--- /dev/null
@@ -0,0 +1,2113 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <string.h>
+
+#include "TelDefines.h"
+#include "TelSs.h"
+#include "TelCall.h"
+#include "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "TapiUtility.h"
+#include "TelUtility.h"
+
+extern tapi_dbus_connection_name conn_name;
+
+/******************************************************************************
+ *******************************************************************************
+ *
+ *                                                     G L O B A L   V A R I A B L E S
+ *
+ ******************************************************************************
+ ******************************************************************************/
+//     None.
+
+
+/******************************************************************************
+ *******************************************************************************
+ *
+ *                                             P R O X Y   C A L  L   A P I's
+ *
+ *
+ ******************************************************************************
+ ******************************************************************************/
+
+/**
+ *
+ * Initiate a new call. Call could be either voice or video.
+ *
+ * The client specifies the telephone number and the desired call parameters via the
+ *
+ * tapi_call_setup_info_t argument. After successful completion of the dial request a call identifier is
+ *
+ * returned back to the client via the ptr_call_handle argument. The call identifier is needed to hold,
+ *
+ * resume, swap, and terminate the call. It is also needed to monitor the status of the call.
+ *
+ * This is an asynchronous API. After successful completion of the request in Phone Alert Event is
+ *
+ * published. otherwise Error event is published.
+ *
+ * @param[in]          * TelCallSetupParams_t          telephone number and desired call parameters.
+ * @param[out]         * pCallHandle , *pRequestID.   Handle of the call. specifies the request identifier.
+ * @Interface          Synchronous.
+ * @return                     int                             API Result Code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    ptr_call_setup_info, and ptr_call_handle can not be NULL.
+ * @see                                See below API's also.
+ *                                     - tel_answer_call(),
+ *                                     - tel_release_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+EXPORT_API int tel_exe_call_mo(const TelCallSetupParams_t *pParams, unsigned int *pCallHandle, int *pRequestID)
+{
+       int num_len = 0;
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /* check for invalid ptr etc etc if applicable.... */
+       TAPI_RET_ERR_NUM_IF_FAIL((pParams && pCallHandle && pRequestID ),
+                       TAPI_API_INVALID_PTR);
+
+       num_len = strlen(pParams->szNumber);
+
+       /* check for invalid ptr etc etc if applicable.... */
+       if ((TAPI_CALL_DIALDIGIT_LEN_MAX < num_len) || (0 >= num_len)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_ : Invalid telephone no length [%+d]", num_len);
+               return TAPI_API_INVALID_INPUT;
+       }
+       else {
+               // Do Nothing........
+       }
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /* check for the RPC link.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       /* Check input range for possible call types */
+       if ((TAPI_CALL_TYPE_VOICE == pParams->CallType) || (TAPI_CALL_TYPE_DATA == pParams->CallType)
+                       || (TAPI_CALL_TYPE_E911 == pParams->CallType)) {
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param1);
+
+               g_array_append_vals(in_param1, pParams, sizeof(TelCallSetupParams_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Setup Call: Call Type [%d], Number [%s]",
+                               pParams->CallType, pParams->szNumber);
+
+               TAPI_PRINT_TIME("tel_exe_call_mo() is called..");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SETUP, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /* API return value */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /* Request ID */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+
+                       /* Call handle */
+                       *pCallHandle = g_array_index(out_param3, unsigned int, 0);
+               }
+               else {
+                       /* RPC API failed, return FALSE to APP */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               /* Invalid input range given by the APP. */
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d] RequestId [%+d] Hanlde [%+d]", api_err, *pRequestID, *pCallHandle);
+
+       return api_err;
+}
+
+/**
+ * Accept or Reject an incoming new call.
+ *
+ * Answering an incoming call is possible only when the call status is incoming or waiting.
+ *
+ * Client can choose to answer an incoming call, even when an active call exists, by specifying argument
+ *
+ * TelCallAnswerType_t.  The TelCallAnswerType_t can be accept a single call, or hold a current call and
+ *
+ * accept the incoming call, or replace the current active call with waiting incoming call, or reject the call.
+ *
+ * @param[in]          CallHandle, a call identifier
+ * @param[in]          TelCallAnswerType_t, accept / reject /hold and accept etc.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API Result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should refer a call state which is in incoming/waiting state.
+ * @see                                See below API's also.
+ *                                     - tel_exe_call_mo(),
+ *                                     - tel_release_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+EXPORT_API int tel_answer_call(unsigned int CallHandle, TelCallAnswerType_t AnsType, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       /* check for invalid ptr etc etc if applicable.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /* Check the call handle value... */
+       if (CallHandle <= 0) {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_ : Invalid Call Handle.");
+               return api_err;
+       }
+
+       /* Check input range for tapi_answer_type_t */
+       if ((TAPI_CALL_ANSWER_ACCEPT <= AnsType) && (TAPI_CALL_ANSWER_HOLD_AND_ACCEPT >= AnsType)) {
+               /* check for the RPC link.... */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param2, &AnsType, sizeof(TelCallAnswerType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, " Answer Call: Answer Type [%d], Call Handle [%d]",
+                               AnsType, CallHandle);
+
+               TAPI_PRINT_TIME("tel_answer_call() is called..");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_ANSWER, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /* Get the API error value as out param 1, from the server. */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /* Get the Request ID as out param 2, from the server. */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /* RPC API failed, return FALSE to APP */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               /* Invalid Input Range */
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid Answer Type");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ * Hangup calls. This is only for calls you dialed or answered with Telephony.
+ *
+ * The client specifies the call handle via the call_handle argument.
+ *
+ * Upon successful completion of Hangup, the information related to this call handle is destroyed.
+ *
+ * client can specify to Hangup a single call, all active calls, or all calls via argument tapi_release_type_t.
+ *
+ * @param[in]          CallHandle              Handle of the call which needs to be Hungup.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int      API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should contain a call handle which is in connected or held state.
+ * @see                                See below API's also.
+ *                                     - tel_exe_call_mo(),
+ *                                     - tel_answer_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+
+EXPORT_API int tel_release_call(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /* check for invalid ptr etc etc if applicable.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Release Call: Call Handle [%d]", CallHandle);
+
+               TAPI_PRINT_TIME("tel_release_call() is called..");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_RELEASE, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /* Get the API error value as out param 1, from the server. */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /* Get the Request ID as out param 2, from the server. */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /* RPC API failed, return FALSE to APP */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               /* Invalid Input Range.. */
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_:: Invalid Call Handle.");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ * Hangup calls. This is only for calls you dialed or answered with Telephony.
+ *
+ * The client specifies the call handle via the call_handle argument.
+ *
+ * Upon successful completion of Hangup, the information related to this call handle is destroyed.
+ *
+ * client can specify to Hangup a single call, all active calls, or all calls via argument tapi_release_type_t.
+ *
+ * @param[in]          NONE.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int     API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should contain a call handle which is in connected or held state.
+ * @see                                See below API's also.
+ *                                     - tel_exe_call_mo(),
+ *                                     - tel_answer_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+
+EXPORT_API int tel_release_call_all(int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /* check for invalid ptr etc etc if applicable.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       /* check for the RPC link.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Release all calls:");
+
+       TAPI_PRINT_TIME("tel_release_call_all() is called..");
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_RELEASEALL, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /* Get the API error value as out param 1, from the server. */
+               api_err = g_array_index(out_param1, int, 0);
+
+               /* Get the Request ID as out param 2, from the server. */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               /* RPC API failed, return FALSE to APP */
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ * Hangup calls. This is only for calls you dialed or answered with Telephony.
+ *
+ * Upon successful completion of Hangup, the information related to this call handle is destroyed.
+ *
+ *
+ * @param[in]          NONE.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should contain a call handle which is in connected or held state.
+ * @see                                See below API's also.
+ *                                     - tel_exe_call_mo(),
+ *                                     - tel_answer_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+EXPORT_API int tel_release_call_all_active(int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Release all active calls:");
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_RELEASEALL_ACTIVE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+
+               /* Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               /*      RPC API failed, return FALSE to APP     */
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+
+}
+
+/**
+ * Hangup all held calls. This is only for calls you dialed or answered with Telephony.
+ *
+ *
+ * Upon successful completion of Hangup, the information related to this call handle is destroyed.
+ *
+ *
+ * @param[in]          NONE.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int                     API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should contain a call handle which is in connected or held state.
+ * @see                                See below API's also.
+ *                                     - tel_exe_call_mo(),
+ *                                     - tel_answer_call(),
+ *                                     - tel_hold_call(),
+ *                                     - tel_retrieve_call(),
+ *                                     .
+ */
+EXPORT_API int tel_release_call_all_held(int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Release all held calls:");
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_RELEASEALL_HELD, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+
+               /* Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               /*      RPC API failed, return FALSE to APP     */
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+
+}
+
+/**
+ *
+ * Places a call on hold. This is only for calls you dialed or answered with Telephony.
+ *
+ * The client specifies the call handle via the call_handle argument.
+ *
+ * @param[in]          CallHandle,     Hndle of active call.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @return                     int             API result code.
+ * @Interface          Asynchronous.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should refer a call which is in ACTIVE state
+ * @see                                See below API's also.
+ *                                     - tel_retrieve_call().
+ *                                     .
+ */
+EXPORT_API int tel_hold_call(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the call handle  value... */
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                               TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Hold Call Handle [%d]", CallHandle);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_HOLD, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Retrieve held calls. This is only for calls you dialed or answered with Telephony.
+ *
+ * The client specifies the call handle via the call_handle argument.
+ *
+ * @param[in]          CallHandle,     Handle of the held call
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_handle should refer a call which is in HELD state..
+ * @see                                None.
+ */
+EXPORT_API int tel_retrieve_call(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the call handle  value... */
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Activate Call Handle [%d]", CallHandle);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_ACTIVATE, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Swap calls. This is only for calls you dialed or answered with Telephony.
+ *
+ * The client specifies the call handles via the active_call and held_call arguments.
+ *
+ * Swap is only available for the voice calls.
+ *
+ * @param[in]          CallHandle1     Handle of the active call.
+ * @param[in]          CallHandle2     Handle of the held call.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_swap_call(unsigned int CallHandle1, unsigned int CallHandle2, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if ((0 < CallHandle1) && (0 < CallHandle2)) {
+               if (CallHandle1 == CallHandle2) {
+                       return TAPI_API_INVALID_CALL_HANDLE;
+               }
+
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle1, sizeof(unsigned int));
+               g_array_append_vals(in_param2, &CallHandle2, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Swap calls with handles [%d], and [%d]",
+                               CallHandle1, CallHandle2);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SWAP, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Setup a conference call.
+ *
+ * The client specifies the call handles via the active_call and held_call arguments.
+ *
+ * Setup a conference call is only available for the voice calls.
+ *
+ * @param[in]          CallHandle1     Handle of the active call.
+ * @param[in]          CallHandle2     Handle of the held call.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_join_call(unsigned int CallHandle1, unsigned int CallHandle2, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((0 < CallHandle1) && (0 < CallHandle2)) {
+               if (CallHandle1 == CallHandle2) {
+                       return TAPI_API_INVALID_CALL_HANDLE;
+               }
+
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle1, sizeof(unsigned int));
+               g_array_append_vals(in_param2, &CallHandle2, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Join Calls with Handles [%d], [%d]",
+                               CallHandle1, CallHandle2);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SETUPCONFCALL, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Split a call from conference call.
+ *
+ * The client specifies the call handle via the call_handle argument.
+ *
+ * Split a conference call is only available for the voice calls.
+ *
+ * @param[in]          CallHandle      Handle of the call which needs to be seperated.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_split_call(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((0 < CallHandle)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                               TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Split Call Handle [%d]", CallHandle);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SPLITCONFCALL, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Transfers a call to another call.
+ *
+ * client specifies the handle  of the calls via active_call, held_call arguments.
+ *
+ * Transfer call is only available for the voice calls.
+ *
+ * @param[in]          CallHandle,     Handle of the active call.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_exe_call_explicit_transfer(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "ECT Call Handle [%d]", CallHandle);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_TRANSFERCALL, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Activate Call Completion to a Busy Subscriber.
+ *
+ * client specifies the handle  of the call via call_handle argument.
+ *
+ * Activate CCBS is only available for the voice calls.
+ *
+ * @param[in]          CallHandle,     Handle of the call.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_activate_call_ccbs(unsigned int CallHandle, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the call handle  value... */
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "CCBS Call Handle [%d]", CallHandle);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_ACTIVATECCBS, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *  Send DTMF digits to the network.
+ *
+ * Client specifies the Handle of the active call via call_handle argument.
+ *
+ * The handle of the call is voice call only.
+ *
+ * @param[in]          tapi_call_dtmf_t        DTMF digits.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    tapi_call_dtmf_t can not be NULL.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_send_call_dtmf(const char *pDtmfString, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int length = 0;
+       int app_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL( (pRequestID && pDtmfString), TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       length = strlen(pDtmfString);
+
+       /*      Check the input value...        */
+       if (length != 0) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Send DTMF digits [%s] and len [%d]",
+                               pDtmfString, length);
+
+               /*      to allocate for null termiated string   */
+               g_array_append_vals(in_param1, pDtmfString, (length + 1));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_DTMF, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       app_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       app_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               app_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]", app_err, *pRequestID);
+
+       return app_err;
+}
+
+/**
+ *
+ * Call Deflection.
+ *
+ * If informed about an incoming call this call may be redirected to an another destination by
+ *
+ * entering the destination Number. The cleint spcifies the dstiantion number to which the current
+ *
+ * incoming call needs to be redirected is specifed via info argument.
+ *
+ * @param[in]          call_handle,                    Incoming call handle.
+ * @param[in]          TelCallDeflectDstInfo_t Destination Number.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    info can not be NULL.
+ * @see                                None.
+ */
+EXPORT_API int tel_deflect_call(unsigned int CallHandle, const TelCallDeflectDstInfo_t *pInfo, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*       check for the input pointer .. */
+       TAPI_RET_ERR_NUM_IF_FAIL( (pRequestID && pInfo), TAPI_API_INVALID_PTR);
+
+       /*      Check the input value...        */
+       if (0 < CallHandle) {
+               /*       check for the RPC link.... */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+               g_array_append_vals(in_param2, pInfo, sizeof(TelCallDeflectDstInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Deflect Call Handle [%d] to [%s]",
+                               CallHandle, pInfo->number);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_DEFLECT, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid CALL HANDLE");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Get the current calling line identification number.
+ *
+ * The line id is returned via the argument ptr_active_line.
+ *
+ * @param[in]          NONE
+ * @param[out]         TelCallActiveLine_t     current active line id, *pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    TelCallActiveLine_t can not be NULL.
+ * @see                                None.
+ */
+EXPORT_API int tel_get_call_act_line(int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL( pRequestID, TAPI_API_INVALID_PTR);
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Get Active Line");
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETACTIVELINE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+
+       }
+       else {
+               /*      RPC API failed, return FALSE to APP     */
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * Set the current calling line identification number.
+ *
+ * Client specifies the desired line id via the argument active_line.
+ *
+ * @param[in]          TelCallActiveLine_t     calling line identification.
+ * @param[out]         pRequestID.   specifies the request identifier.
+ * @Interface          Asynchronous.
+ * @return                     int             API result code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks                    NONE.
+ * @see                                NONE.
+ */
+EXPORT_API int tel_set_call_act_line(TelCallActiveLine_t active_line, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((TAPI_CALL_ACTIVE_LINE1 == active_line) || (TAPI_CALL_ACTIVE_LINE2 == active_line)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &active_line, sizeof(TelCallActiveLine_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Set Active Line ID [%d]", active_line);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SETACTIVELINE, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1,out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ * @brief This function gets status for the current call identified by Call Handle whenever
+ *     application wants the call status. Call handle must be valid.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pCallStatus
+ *   - Call status information like destination number, call direction (MO or MT), call type (voice or data etc), whether
+ *      the call is in conference state or not, present call state etc are returned through this parameter.
+ *
+ * @par Async Response Message:
+ *   - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+EXPORT_API int tel_get_call_status(unsigned int CallHandle, TelCallStatus_t *pCallStatus)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "CallHandle:[%d]\n",CallHandle);
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pCallStatus, TAPI_API_INVALID_PTR);
+
+       if (CallHandle > 0) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Call Service Request: .(Get Call Status)");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETSTATUS, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the call status as out param 3, from the server.    */
+                       *pCallStatus = g_array_index(out_param3, TelCallStatus_t , 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       pCallStatus = NULL;
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               pCallStatus = NULL;
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "#####Invalid Handle");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/*================================================================================================*/
+
+/**
+ * \addtogroup  tel_get_call_duration
+ * @{
+ */
+
+/**
+ * @brief This function gets duration of the given call. This is a synchronous function. Duration is accounted from the moment
+ *          the connection is established, i.e. call goes into active state for first time.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Unique handle for referring the call.
+ *
+ * @param [out] pDurationInSecs
+ *   - The total call duration in seconds from the call connecting time to the present time is returned through this parameter.
+ *
+ * @par Async Response Message:
+ *  - None.
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ *
+ */
+EXPORT_API int tel_get_call_duration(unsigned int CallHandle, unsigned int *pDurationInSecs)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance \n");
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"CallHandle:[%d]\n",CallHandle);
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pDurationInSecs, TAPI_API_INVALID_PTR);
+
+       if (CallHandle > 0) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Call Service Request: .(Get Call Duration)");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETDURATION, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the call durations as out param 3, from the server. */
+                       *pDurationInSecs = g_array_index(out_param3, unsigned int , 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       *pDurationInSecs = 0;
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+       }
+       else {
+               *pDurationInSecs = 0;
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "#####Invalid Handle.");
+       }
+
+       return api_err;
+}
+
+/**
+ * @brief This is a synchronous function returns all call handles within the given conference call.
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Synchronous API.
+ *
+ * @par Important Notes:
+ *  - Call should be a Multi-party conference call in order to return actual no of calls and call handles in the conference calls.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] CallHandle
+ *  - Handle of call which is associated with the conference.
+ *
+ * @param [out] pCallList
+ *   - list of call joined in the conference call. In case there is no active conference. The list will be zero and
+ *      number of calls parameter value will also be zero. Maximum number of calls in a conference can be upto 5
+ *      (Based on 3GPP TS 22.084). Memory allocation for calllist is integer array of size 5.
+ *
+ * @param [out] pNoOfCalls
+ *   - Number of the calls present in conference.
+ *
+ * @par Async Response Message:
+ *  -None.
+ *
+ * @pre
+ *  -None.
+ *
+ * @post
+ *  -None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ */
+EXPORT_API int tel_get_call_conf_list(unsigned int CallHandle, unsigned int *pCallList, int *pNoOfCalls)
+{
+       TS_BOOL ret = FALSE;
+       unsigned int * tempCallList;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"<PROXY> Func Entrance \n");
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"CallHandle:[%d]\n",CallHandle);
+
+       /*       check for the input pointer .. */
+       TAPI_RET_ERR_NUM_IF_FAIL( (pCallList && pNoOfCalls), TAPI_API_INVALID_PTR);
+
+       *pNoOfCalls = 0;
+       *pCallList = 0;
+
+       if (0 < CallHandle) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &CallHandle, sizeof(unsigned int));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Call Service Request: .(Get Conference List)");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETCONFERENCELIST, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the No. of Calls as out param 4, from the server.    */
+                       *pNoOfCalls = g_array_index(out_param4, int , 0);
+
+                       if (*pNoOfCalls > 0) {
+                               /*      Get the Call List as out param 3, from the server.    */
+                               tempCallList = &g_array_index(out_param3, unsigned int , 0);
+                       }
+                       else {
+                               tempCallList = NULL;
+                       }
+
+                       if (tempCallList != NULL)
+                               memcpy(pCallList, tempCallList, sizeof(unsigned int) * (*pNoOfCalls));
+
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+       }
+       else {
+               api_err = TAPI_API_INVALID_CALL_HANDLE;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "#####Invalid Handle.");
+       }
+
+       return api_err;
+}
+
+/**
+ *
+ * @brief This function gets voice privacy option mode in phone(CDMA only).
+ *
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in]
+ * - None.
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t. #TelCallPrivacyMode_t is included in this event.
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ *
+ */
+EXPORT_API int tel_get_call_privacy_mode(TelCallPrivacyType_t PrivacyType, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((TAPI_CALL_PRIVACY_TYPE_MS <= PrivacyType) && (PrivacyType <= TAPI_CALL_PRIVACY_TYPE_CURRENT)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &PrivacyType, sizeof(TelCallPrivacyType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Get Request PrivacyType:[%d]", PrivacyType);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETPRIVACYMODE, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]",api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * @brief This function sets voice privacy option mode in phone. It is available only where call exists(CDMA only).
+ *
+ * Access to this API is limited, we recommand you use Voice Call engine API.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] PrivacyMode
+ * - voice privacy option mode(ENHANCED or STANDARD)
+ *
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ *
+ */
+EXPORT_API int tel_set_call_privacy_mode(TelCallVoicePrivacyInfo_t PrivacyInfo, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (((TAPI_CALL_PRIVACY_TYPE_MS <= PrivacyInfo.PrivacyType) && (TAPI_CALL_PRIVACY_TYPE_CURRENT
+                       >= PrivacyInfo.PrivacyType)) && ((TAPI_CALL_PRIVACY_MODE_STANDARD == PrivacyInfo.PrivacyMode)
+                       || (TAPI_CALL_PRIVACY_MODE_ENHANCED == PrivacyInfo.PrivacyMode))) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &PrivacyInfo, sizeof(TelCallVoicePrivacyInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Set PrivacyType:[%d], PrivacyMode:[%d]", PrivacyInfo.PrivacyType, PrivacyInfo.PrivacyMode);
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_SETPRIVACYMODE, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return FALSE to APP     */
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                               out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_CALL_ERR_: Invalid input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ *
+ * @brief This function requests to send a Flash with Information Message(CDMA only).
+ *
+ * Access to this API is limited, we recommand you use Voice Call engine API.
+ *
+ * @par Sync (or) Async:
+ * This is a Asynchronous API.
+ *
+ * @par Important Notes:
+ *   - None.
+ *
+ * @warning
+ * - None.
+ *
+ *
+ * @param[in] pDialNumber
+ * - this is the calling number for 3 way call. But in the call waiting, this param should be NULL.
+ *
+ *
+ * @param [out] pRequestId
+ *   - Unique identifier for a particular request.
+ *   - Request Id value can be any value from 0 to 255 if the API is returned successfully
+ *   - -1 (INVALID_REQUEST_ID) will be sent in case of failure.
+ *
+ *
+ * @par Async Response Message:
+ * - The event associated with this request is TAPI_EVENT_CALL_FLASHINFO_CNF. Asynchronous return status
+ *    is indicated by #TelCallCause_t.
+ *
+ *
+ * @pre
+ *  - None.
+ *
+ * @post
+ *  - None.
+ *
+ * @return Return Type (int) \n
+ * - 0 - indicating that the operation has completed successfully. \n
+ * - Else it will return failure and error code (Refer Doxygen doc or TapiResult_t)
+ *
+ * @par Prospective Clients:
+ * External Apps.
+ *
+ *
+ *
+ */
+EXPORT_API int tel_exe_call_flash_info(const char *pDialNumber, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int length = 0;
+       int app_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL( pRequestID, TAPI_API_INVALID_PTR);
+
+       if (pDialNumber) {
+               length = strlen(pDialNumber);
+               TAPI_LIB_DEBUG(LEVEL_INFO, "DialNumber: [%s] and len:[%d]", pDialNumber, length);
+       }
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       /*      to allocate for null termiated string   */
+
+       if (length > 0)
+               g_array_append_vals(in_param1, pDialNumber, (length + 1));
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_FLASHINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               app_err = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               /*      RPC API failed, return FALSE to APP     */
+               app_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d], Reuest ID [%+d]",app_err, *pRequestID);
+
+       return app_err;
+}
+
+/**
+ * tel_exit_call_emergency_mode
+ *
+ *
+ */
+EXPORT_API int tel_exit_call_emergency_mode(int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL( pRequestID, TAPI_API_INVALID_PTR);
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_EXITEMERGENCYMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/**
+ * tel_get_call_time
+ *
+ *
+ */
+EXPORT_API int tel_get_call_time(unsigned short req_mask, int *pRequestID)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for invalid ptr etc etc if applicable....        */
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &req_mask, sizeof(unsigned short));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Get Call time req type:[%x]", req_mask);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_CALL, TAPI_CS_CALL_GETCALLTIME, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, TapiResult_t, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               /*      RPC API failed, return FALSE to APP     */
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "_CALL_ERR_ : RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                       out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d], Reuest ID [%+d]", api_err, *pRequestID);
+
+       return api_err;
+}
+
+/*     EOF  */
+
diff --git a/src/tapi_proxy_cfg.c b/src/tapi_proxy_cfg.c
new file mode 100644 (file)
index 0000000..94cc601
--- /dev/null
@@ -0,0 +1,769 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <dlog.h>
+
+#include <TelDefines.h>
+
+#include <ITapiCfg.h>
+#include <TapiUtility.h>
+#include <TelErr.h>
+
+#include "tel_cs_conn.h"
+#include "tapi_proxy_internal.h"
+
+
+/******************************************************************************
+ ******************************************************************************
+ *
+ *                                             P R O X Y   C A L  L   A P I's
+ *
+ ******************************************************************************
+ ******************************************************************************/
+
+/**
+ * Set default configuration to modem.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_default_configuration(TelDefaultCfg_t bType)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       if ((TAPI_CFG_DEFAULT_FULL > bType) || (TAPI_CFG_DEFAULT_CUSTOM < bType)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -Default Configuration");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &bType, sizeof(TelDefaultCfg_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_DEFAULTCONFGURATION_EXE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ * get A-Key.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_akey(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /* check for the RPC link.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_A_KEY,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * verify A-Key.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_verify_cfg_akey(const TelCfgAKeyInfo_t *pAKey_info)
+{
+       TS_BOOL ret = FALSE;
+       int app_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "A-key:[%s]", pAKey_info->A_key);
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, pAKey_info, sizeof(TelCfgAKeyInfo_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_VERIFY_A_KEY,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               app_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               app_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", app_err);
+
+       return app_err;
+}
+
+/**
+ * get MSL_info.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_msl_info(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_MSL_INFO,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get vocoder option.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_vocoder_option(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_VOCODER_OPTION,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * set vocoder option.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_vocoder_option(TelCfgVocOption_t option)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if ((TAPI_CFG_VOC_OPTION_DEFAULT <= option) && (option <= TAPI_CFG_VOC_OPTION_RESERVED)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+               TAPI_GLIB_INIT_PARAMS();
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &option, sizeof(TelCfgVocOption_t));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "option:[%d]", option);
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_SET_VOCODER_OPTION,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               /*      RPC API failed, return FALSE to APP     */
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, " Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get hidden menu access.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_hidden_menu_access(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_HIDDEN_MENU_ACCESS,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * set hidden menu access.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_hidden_menu_access(TelCfgHiddenMenuAccessType_t type)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if ((TAPI_CFG_HIDDEN_MENU_DISABLE <= type) && (type <= TAPI_CFG_HIDDEN_MENU_ENABLE)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+               TAPI_GLIB_INIT_PARAMS();
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &type, sizeof(TelCfgHiddenMenuAccessType_t));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "type:[%d]", type);
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_SET_HIDDEN_MENU_ACCESS,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               /*      RPC API failed, return FALSE to APP     */
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get current carrier.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_serving_carrier(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_CURRENT_CARRIER,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * set current carrier.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_serving_carrier(TelCfgCurrentCarrier_t Carrier)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if ((TAPI_CFG_CARRIER_TEST <= Carrier) && (Carrier <= TAPI_CFG_CARRIER_MTS)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+               TAPI_GLIB_INIT_PARAMS();
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &Carrier, sizeof(TelCfgCurrentCarrier_t));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Carrier:[%d]", Carrier);
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_SET_CURRENT_CARRIER,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               /*      RPC API failed, return FALSE to APP     */
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, " Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get sio mode.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_sio_mode(void) {
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_SIO_MODE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * set sio mode.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_sio_mode(TelCfgSIOMode_t Mode)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if ((TAPI_CFG_SIO_U1_DIAG_USB2_GPS <= Mode) && (Mode <= TAPI_CFG_SIO_U1_HFK_USB2_DIAG)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+               TAPI_GLIB_INIT_PARAMS();
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &Mode, sizeof(TelCfgSIOMode_t));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "Mode:[%d]", Mode);
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_SET_SIO_MODE,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               /*      RPC API failed, return FALSE to APP     */
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, " Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get activation date.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_activated_date_of_phone(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_ACTIVATION_DATE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get reconditioned status and date.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_reconditioned_data_of_phone(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_RECONDITIONED_DATE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * get tty mode. CDMA only
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_get_cfg_tty_mode(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_GET_TTY_MODE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       /*      RPC API failed, return FALSE to APP     */
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**
+ * Set tty mode. CDMA only
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_cfg_tty_mode(TelCfgTTYMode_t Mode)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if ((Mode >= TAPI_CFG_TTY_MODE_DISABLE) && (Mode <= TAPI_CFG_TTY_MODE_ENABLE_FULL)) {
+               /*       check for the RPC link....     */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+               TAPI_GLIB_INIT_PARAMS();
+               TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+               g_array_append_vals(in_param1, &Mode, sizeof(TelCfgTTYMode_t));
+
+               TAPI_LIB_DEBUG(LEVEL_INFO, "TTY Mode:[%d]", Mode);
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_CFG, TAPI_CS_CFG_SET_TTY_MODE,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               /*      RPC API failed, return FALSE to APP     */
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC link is down");
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, " Invalid Input");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+//eof
diff --git a/src/tapi_proxy_common.c b/src/tapi_proxy_common.c
new file mode 100644 (file)
index 0000000..3263cd0
--- /dev/null
@@ -0,0 +1,588 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus.h>
+
+#include <vconf.h>
+
+#include "TelDefines.h"
+#include "tel_cs_conn.h"
+#include "TapiUtility.h"
+#include "TelUtility.h"
+#include "TapiCommon.h"
+#include "tapi_proxy.h"
+
+#include "tel_marshaler.h"
+
+enum {
+       TAPI_SIGNAL0,
+       TAPI_SIGNAL1,
+       TAPI_SIGNAL2,
+       TAPI_SIGNAL3,
+       TAPI_SIGNAL_MAX
+};
+
+static char *_evt_sig_members[] = {
+       TAPI_SIGNAL_MEMBER_ARG0,
+       TAPI_SIGNAL_MEMBER_ARG2,
+       TAPI_SIGNAL_MEMBER_ARG4,
+       TAPI_SIGNAL_MEMBER_ARG5,
+};
+
+extern char *g_cookie_name;
+extern int g_cookie_size;
+
+tapi_dbus_connection_name conn_name;
+
+typedef enum {
+       TAPI_EVTMODE_NONE,
+       TAPI_EVTMODE_GLIB,
+       TAPI_EVTMODE_ECORE,
+} TelTapiEvtMode_t;
+
+typedef struct GDBusEvtItem_t {
+       unsigned int id;
+       DBusGProxy *robj;
+       GCallback cb[4];
+       void *data;
+} GDBusEvtItem_t;
+
+typedef struct {
+       void *data;
+       TelAppCallback cb;
+} UserData_t;
+
+typedef GCallback (*GDBusConnSig_t)(DBusGProxy *, const char *, void *);
+
+static GCallback gdbus_conn_signal0(DBusGProxy *robj, const char *member, void *data);
+static GCallback gdbus_conn_signal2(DBusGProxy *robj, const char *member, void *data);
+static GCallback gdbus_conn_signal4(DBusGProxy *robj, const char *member, void *data);
+static GCallback gdbus_conn_signal5(DBusGProxy *robj, const char *member, void *data);
+
+static GDBusConnSig_t GDBusConnSig[TAPI_SIGNAL_MAX] = { gdbus_conn_signal0, gdbus_conn_signal2, gdbus_conn_signal4,
+               gdbus_conn_signal5 };
+
+static DBusGConnection *GDBusHandle = NULL;
+
+static int _tapi_init_ref_count = 0;
+
+static GSList *EvtList = NULL;
+static long int EvtId = 0;
+
+static TelTapiEvtMode_t EvtMode = TAPI_EVTMODE_NONE;
+
+#define CHK_EVENT_MODE(MODE) \
+       if (EvtMode != MODE) { \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Event MODE check failed (current: %d)", EvtMode); \
+               return TAPI_API_OPERATION_FAILED; \
+       }
+
+#define CHK_EVENT_INIT_MODE(MODE) \
+       if (EvtMode != MODE && EvtMode != TAPI_EVTMODE_NONE) { \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Event MODE check failed (current: %d)", EvtMode); \
+               return TAPI_API_OPERATION_FAILED; \
+       }
+
+#define EVENT_DUMP(Event) \
+       { \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, " Received group is :0x%x", Event.EventClass); \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, " received event type is :0x%x", Event.EventType); \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, " received requestid is :0x%x", Event.RequestId); \
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, " received status is :%d", Event.Status); \
+       } \
+
+static void on_gdbus_event_receive0(DBusGProxy *proxy, void *local_data)
+{
+       TelTapiEvent_t Event;
+
+       Event.EventClass = -1;
+       Event.EventType = 0;
+       Event.RequestId = -1;
+       Event.Status = 0;
+       Event.pData = NULL;
+       Event.pDataLen = 0;
+
+       EVENT_DUMP(Event);
+
+       /* Contents of parameters is defined by every notification. */
+       UserData_t *user_data;
+       user_data = (UserData_t *) local_data;
+       user_data->cb(&Event, user_data->data);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG," Application Callback Invoked successfully ");
+}
+
+static void on_gdbus_event_receive2(DBusGProxy *proxy, int type, const char *data, void *local_data)
+{
+       TelTapiEvent_t Event;
+       guchar *result = NULL;
+       size_t out_len;
+
+       Event.EventClass = -1;
+       Event.EventType = type;
+       Event.RequestId = -1;
+       Event.Status = 0;
+       Event.pData = NULL;
+
+       EVENT_DUMP(Event);
+
+       TAPI_BASE64_DECODE(data, result, &out_len);
+       if (out_len > 0)
+               Event.pData = result;
+       Event.pDataLen = out_len;
+
+       /* Contents of parameters is defined by every notification. */
+       UserData_t *user_data;
+       user_data = (UserData_t *) local_data;
+       user_data->cb(&Event, user_data->data);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG," Application Callback Invoked successfully ");
+
+       if (result)
+               g_free(result);
+}
+
+static void on_gdbus_event_receive4(
+               DBusGProxy *proxy,
+               int grp,
+               int type,
+               int status,
+               const char *data,
+               void *local_data)
+{
+       TelTapiEvent_t Event;
+       guchar *result = NULL;
+       size_t out_len;
+
+       Event.EventClass = grp;
+       Event.EventType = type;
+       Event.RequestId = -1;
+       Event.Status = status;
+       Event.pData = NULL;
+
+       EVENT_DUMP(Event);
+
+       TAPI_BASE64_DECODE(data, result, &out_len);
+       if (out_len > 0)
+               Event.pData = result;
+       Event.pDataLen = out_len;
+
+       /* Contents of parameters is defined by every notification. */
+       UserData_t *user_data;
+       user_data = (UserData_t *) local_data;
+       user_data->cb(&Event, user_data->data);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG," Application Callback Invoked successfully ");
+       if (result)
+               g_free(result);
+}
+
+static void on_gdbus_event_receive5(
+               DBusGProxy *proxy,
+               int grp,
+               int type,
+               int req_id,
+               int status,
+               const char *data,
+               void *local_data)
+{
+       TelTapiEvent_t Event;
+       guchar *result = NULL;
+       size_t out_len = 0;
+
+       Event.EventClass = grp;
+       Event.EventType = type;
+       Event.RequestId = req_id;
+       Event.Status = status;
+       Event.pData = NULL;
+
+       EVENT_DUMP(Event);
+
+
+       TAPI_BASE64_DECODE(data, result, &out_len);
+       Event.pData = result;
+       if (result == NULL){
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "result =0x%p", result);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "out_len =%d", out_len);
+               Event.pDataLen = 0;
+       }
+       else{
+               Event.pDataLen = out_len;
+       }
+
+       /* Contents of parameters is defined by every notification. */
+       UserData_t *user_data;
+       user_data = (UserData_t *) local_data;
+
+       user_data->cb(&Event, user_data->data);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG," Application Callback Invoked successfully ");
+       if (result)
+               g_free(result);
+}
+
+static GCallback gdbus_conn_signal0(DBusGProxy *robj, const char *member, void *data)
+{
+       dbus_g_proxy_add_signal(robj, member, G_TYPE_INVALID);
+       dbus_g_proxy_connect_signal(robj, member, G_CALLBACK(on_gdbus_event_receive0), data, NULL);
+       return G_CALLBACK(on_gdbus_event_receive0);
+}
+
+static GCallback gdbus_conn_signal2(DBusGProxy *robj, const char *member, void *data)
+{
+       dbus_g_proxy_add_signal(robj, member, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INVALID);
+       dbus_g_proxy_connect_signal(robj, member, G_CALLBACK(on_gdbus_event_receive2), data, NULL);
+       return G_CALLBACK(on_gdbus_event_receive2);
+}
+
+static GCallback gdbus_conn_signal4(DBusGProxy *robj, const char *member, void *data)
+{
+       dbus_g_proxy_add_signal(robj, member, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INVALID);
+       dbus_g_proxy_connect_signal(robj, member, G_CALLBACK(on_gdbus_event_receive4), data, NULL);
+       return G_CALLBACK(on_gdbus_event_receive4);
+}
+
+static GCallback gdbus_conn_signal5(DBusGProxy *robj, const char *member, void *data)
+{
+       dbus_g_proxy_add_signal(robj, member, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INVALID);
+       dbus_g_proxy_connect_signal(robj, member, G_CALLBACK(on_gdbus_event_receive5), data, NULL);
+       return G_CALLBACK(on_gdbus_event_receive5);
+}
+
+static void gdbus_del_signal(GDBusEvtItem_t *it)
+{
+       int i;
+       for (i = 0; i < TAPI_SIGNAL_MAX; i++) {
+               dbus_g_proxy_disconnect_signal(it->robj, _evt_sig_members[i], G_CALLBACK(it->cb[i]), it->data);
+       }
+       if (it->data) {
+               free(it->data);
+       }
+       g_free(it);
+}
+
+static GDBusEvtItem_t *gdbus_add_signal(const char *event_string, void *data)
+{
+       GDBusEvtItem_t *it = NULL;
+       DBusGProxy *robj;
+       int i;
+
+       robj = dbus_g_proxy_new_for_name(GDBusHandle, TAPI_SIGNAL_SENDER, TAPI_SIGNAL_OBJPATH, event_string);
+       if (!robj) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"failed to get proxy for iface: %s", event_string);
+               return it;
+       }
+
+       it = (GDBusEvtItem_t *) g_malloc0(sizeof(GDBusEvtItem_t));
+       if (!it) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"failed to allocate item memory");
+               return it;
+       }
+
+       it->id = EvtId;
+       it->robj = robj;
+       it->data = data;
+
+       if ((EvtList = g_slist_append(EvtList, it)) == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "failed to event info append");
+               g_free(it);
+               return NULL;
+       }
+
+       for (i = 0; i < TAPI_SIGNAL_MAX; i++)
+               it->cb[i] = GDBusConnSig[i](robj, _evt_sig_members[i], data);
+
+       return it;
+}
+
+static void _cookie_deinit(void)
+{
+       if (g_cookie_name)
+               free(g_cookie_name);
+
+       g_cookie_name = NULL;
+       g_cookie_size = 0;
+}
+
+EXPORT_API int tel_init(void)
+{
+       DBusGConnection *conn;
+       GError *err = NULL;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "TelTapiInit");
+
+       if (++_tapi_init_ref_count > 1) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Already initialized. (ref_count=%d)", _tapi_init_ref_count);
+               return TAPI_API_SUCCESS;
+       }
+
+       CHK_EVENT_INIT_MODE(TAPI_EVTMODE_GLIB);
+       EvtMode = TAPI_EVTMODE_GLIB;
+
+       if (GDBusHandle)
+               return TAPI_API_SUCCESS;
+
+       g_type_init();
+
+       conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &err);
+       if (conn == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "dbus_bus_get failed: %s", (char *)err->message);
+               EvtMode = TAPI_EVTMODE_NONE;
+               return TAPI_API_OPERATION_FAILED;
+       }
+       GDBusHandle = conn;
+
+       EvtId = 0;
+
+       dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__INT_INT_INT_INT_STRING, G_TYPE_NONE, G_TYPE_INT,
+                       G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INVALID);
+
+       dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__INT_INT_INT_STRING, G_TYPE_NONE, G_TYPE_INT,
+                       G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INVALID);
+
+       dbus_g_object_register_marshaller(g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, G_TYPE_INT, G_TYPE_STRING,
+                       G_TYPE_INVALID);
+
+       /* Check TAPI READY vconf */
+       int ts_status = 0;
+       int ret_val;
+
+       ret_val = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, &ts_status);
+       if (ret_val < 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "[%s] vconf key default set (value=%d)",
+                               VCONFKEY_TELEPHONY_TAPI_STATE,
+                               VCONFKEY_TELEPHONY_TAPI_STATE_NONE);
+               vconf_set_int(VCONFKEY_TELEPHONY_TAPI_STATE, VCONFKEY_TELEPHONY_TAPI_STATE_NONE);
+       }
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_register_event(int EventType, unsigned int *SubscriptionId, TelAppCallback AppCallBack, void *data)
+{
+       char event_string[IF_NAME_MAX];
+       GDBusEvtItem_t *it = NULL;
+
+       CHK_EVENT_MODE(TAPI_EVTMODE_GLIB);
+
+       /*      CHECK THE INPUT */
+       TAPI_RET_ERR_NUM_IF_FAIL(AppCallBack, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(SubscriptionId, TAPI_API_INVALID_PTR);
+       /*
+        if ((EventType < TAPI_EVENT_CALL_SETUP_CNF) || (EventType > TAPI_EVENT_TYPE_MAX)) {
+        TAPI_LIB_DEBUG(LEVEL_DEBUG,"Unknown EventClass");
+        return TAPI_EVENT_CLASS_UNKNOWN;
+        }
+        */
+       UserData_t *user_data;
+       user_data = (UserData_t *) malloc(sizeof(UserData_t));
+       user_data->data = data;
+       user_data->cb = AppCallBack;
+
+       TAPI_GET_EVENT_NAME(EventType, event_string);
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"PROXY COMMON EVENT STRING=%s", event_string);
+       it = gdbus_add_signal(event_string, (void *) user_data);
+       if (!it) {
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       *SubscriptionId = EvtId++;
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Noti Subscribe Successful with id %d", *SubscriptionId);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_deregister_event(unsigned int SubscriptionId)
+{
+       GSList *iter;
+       GDBusEvtItem_t *it;
+       CHK_EVENT_MODE(TAPI_EVTMODE_GLIB);
+       for (iter = EvtList; iter != NULL; iter = iter->next) {
+               it = (GDBusEvtItem_t *) iter->data;
+               if (it->id == SubscriptionId) {
+                       gdbus_del_signal(it);
+                       EvtList = g_slist_delete_link(EvtList, iter);
+                       return TAPI_API_SUCCESS;
+               }
+       }
+
+       return TAPI_API_INVALID_INPUT;
+}
+
+static void _tel_remove_signal(gpointer data, gpointer user_data)
+{
+       GDBusEvtItem_t *it;
+       it = (GDBusEvtItem_t *) data;
+       if (it) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "TEL_REGI deletenode it=0x%x id=%d",it, it->id);
+               gdbus_del_signal(it);
+       }
+}
+
+EXPORT_API int tel_deinit(void)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "TelTapiDeinit");
+
+       if (--_tapi_init_ref_count > 0) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "no work. (ref_count=%d)", _tapi_init_ref_count);
+               return TAPI_API_SUCCESS;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "remove all signal");
+
+       g_slist_foreach(EvtList, _tel_remove_signal, NULL);
+       EvtList = NULL;
+       EvtId = 0;
+       EvtMode = TAPI_EVTMODE_NONE;
+       g_slist_free(EvtList);
+
+       _cookie_deinit();
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_register_app_name(char *name)
+{
+       if (name == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "The 1st parameter, the connection name, is NULL\n");
+               return TAPI_API_INVALID_PTR;
+       }
+
+       DBusConnection *dbus_connection = NULL;
+       DBusError err;
+       dbus_error_init(&err);
+
+       if (GDBusHandle) {
+               dbus_connection = dbus_g_connection_get_connection(GDBusHandle);
+               if (dbus_bus_request_name(dbus_connection, name, DBUS_NAME_FLAG_DO_NOT_QUEUE, &err) < 0) {
+                       TAPI_LIB_DEBUG(LEVEL_ERR, "Fail to request dbus connection name\n");
+                       return TAPI_API_INVALID_OPERATION;
+               }
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No valid dbus connection\n");
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Request connection name = %s", name );
+       snprintf(conn_name.name, 255, "%s", name);
+       conn_name.length_of_name = strlen(conn_name.name);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_app_name(tapi_dbus_connection_name *app_name)
+{
+       if (app_name == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "The 1st parameter, the application name, is NULL\n");
+               return TAPI_API_INVALID_PTR;
+       }
+
+       snprintf(app_name->name, TAPI_DBUS_CONNECTION_NAME_LEN_MAX, "%s", conn_name.name);
+       app_name->length_of_name = strlen(app_name->name);
+
+       return TAPI_API_SUCCESS;
+}
+
+/*
+ This Api interacts with Telephony servers STATUS library to get the ready status
+ According to Lee this new code will be opened only in rel 1.0. Ramu is the author.
+ */
+EXPORT_API int tel_check_service_ready(int *bStatus)
+{
+       int ts_status = 0;
+       int ret_val = 0;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(bStatus, TAPI_API_INVALID_PTR);
+
+       ret_val = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, (int*) &ts_status);
+       if (ret_val == 0) {
+               ret_val = 1;
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL] GET VCONFKEY_TELEPHONY_TAPI_STATE");
+               ret_val = -1;
+       }
+
+       /*      for testing     */
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "NEW: Status Check value is %d", ts_status);
+
+       if (ret_val != 1) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "GETTING STATUS_TAPI_STATE Failed............\n");
+               return TAPI_API_SERVER_LAYER_FAILURE;
+       }
+       else {
+               *bStatus = ts_status;
+               return TAPI_API_SUCCESS;
+       }
+       return api_err;
+}
+
+EXPORT_API int tel_request_tunnel(const TelTunnelInfo_t *pTunnelInfo, int *pRequestId)
+{
+       int ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(pTunnelInfo, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pTunnelInfo, sizeof(TelTunnelInfo_t));
+       g_array_append_vals(in_param2, (unsigned char *) (pTunnelInfo->pTunnelData), pTunnelInfo->TunnelDataLen);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_EVENT_CLASS_UTIL, TAPI_CS_UTIL_TUNNEL_REQ, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               returnStatus = g_array_index(out_param1, int , 0);
+               *pRequestId = g_array_index(out_param2, int , 0);
+       }
+       else {
+               *pRequestId = -1;
+               returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Tunnel Request: Return Status : %d", returnStatus);
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "RequestId: %d", *pRequestId);
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return returnStatus;
+}
+
+/*     EOF     */
+
diff --git a/src/tapi_proxy_data.c b/src/tapi_proxy_data.c
new file mode 100644 (file)
index 0000000..69ee00e
--- /dev/null
@@ -0,0 +1,569 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "TapiUtility.h"
+#include "ITapiData.h"
+#include "TelUtility.h"
+#include "tapi_proxy_internal.h"
+
+EXPORT_API int tel_get_data_mobile_ipnai (TelDataNAIIndex_t *pMipNaiIdx, unsigned short *pParamMask, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pMipNaiIdx && pParamMask && pRequestID ), TAPI_API_INVALID_PTR);
+
+       if(*pMipNaiIdx < TAPI_DATA_FACTORY_NAI || *pMipNaiIdx > TAPI_DATA_CUSTOM_NAI)
+               return TAPI_API_INVALID_INPUT;
+
+       if(*pParamMask == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                                                  out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, pMipNaiIdx, sizeof(TelDataNAIIndex_t));
+       g_array_append_vals(in_param2, pParamMask, sizeof(unsigned short));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_MOBILE_IP_NAI_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_set_data_mobile_ipnai(TelDataMipNaiParam_t *pMipNaiParam, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pMipNaiParam && pRequestID ), TAPI_API_INVALID_PTR);
+
+       if(pMipNaiParam->naiIndex < TAPI_DATA_FACTORY_NAI || pMipNaiParam->naiIndex  > TAPI_DATA_CUSTOM_NAI)
+               return TAPI_API_INVALID_INPUT;
+
+       if(pMipNaiParam->paramMask == 0)
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pMipNaiParam, sizeof(TelDataMipNaiParam_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_MOBILE_IP_NAI_SET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_current_nai_index (int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_CURRENT_NAI_INDEX_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_te2_status (int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_TE2_STATUS_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_roam_guard (int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_ROAM_GUARD_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_set_data_roam_guard (TelDataRoamGuardMode_t *pRoamGuard, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pRoamGuard && pRequestID), TAPI_API_INVALID_PTR);
+
+       if(*pRoamGuard < TAPI_DATA_ROAM_GUARD_DEFAULT || *pRoamGuard > TAPI_DATA_ROAM_ROAM_GUARD_ON)
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pRoamGuard, sizeof(TelDataRoamGuardMode_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_ROAM_GUARD_SET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                             out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_nai(int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_MODEM_NAI_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_set_data_nai(TelDataModemNAIMode_t *pModemNai, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pModemNai && pRequestID), TAPI_API_INVALID_PTR);
+
+       if(*pModemNai < TAPI_DATA_MODEM_NAI_OFF || *pModemNai > TAPI_DATA_MODEM_NAI_ON)
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pModemNai, sizeof(TelDataModemNAIMode_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_MODEM_NAI_SET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_evdo_rev_config(int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret=tapi_send_request_internal( TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_EVDO_REV_CONFIG_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_set_data_evdo_rev_config (TelDataRevConfig_t *pRevConfig, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pRevConfig &&pRequestID), TAPI_API_INVALID_PTR);
+
+       if(*pRevConfig < TAPI_DATA_REVA || *pRevConfig > TAPI_DATA_REV0)
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pRevConfig, sizeof(TelDataRevConfig_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_EVDO_REV_CONFIG_SET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_restore_data_nai(int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret=tapi_send_request_internal( TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_RESTORE_NAI,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_data_ddtm_config (int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_DDTM_CONFIGURATION_GET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_set_data_ddtm_config(TelDataDDTMStatus_t *pDDTMStatus, int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL((pDDTMStatus && pRequestID), TAPI_API_INVALID_PTR);
+
+       if(*pDDTMStatus < TAPI_DATA_DDTM_MODE_OFF || *pDDTMStatus > TAPI_DATA_DDTM_MODE_ON)
+               return TAPI_API_NOT_SUPPORTED;
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pDDTMStatus, sizeof(TelDataDDTMStatus_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_DATA,TAPI_CS_DATA_DDTM_CONFIGURATION_SET,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
diff --git a/src/tapi_proxy_gprs.c b/src/tapi_proxy_gprs.c
new file mode 100644 (file)
index 0000000..727bd58
--- /dev/null
@@ -0,0 +1,239 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "ITapiPS.h"
+#include "TapiUtility.h"
+#include "TelUtility.h"
+#include "tapi_proxy.h"
+
+extern tapi_dbus_connection_name conn_name;
+
+/**
+ * Sends a request to Telephony Server to set pdp context define info, pdp activation
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          tapi_ps_net_start_req_t
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_activate_gprs_pdp(const tapi_ps_net_start_req_t *net_start_req_info, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_RETURN_VAL_IF_FAIL((pRequestID&&net_start_req_info) , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /* cont_id: 1,2,..MAX_PDP_CONTEXTS_ALLOWED */
+       if (net_start_req_info->cont_id <= 0 || net_start_req_info->cont_id > MAX_PDP_CONTEXTS_ALLOWED) {
+               ret_val = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR, " Invalid GPRS context id");
+               return ret_val;
+       }
+
+       if (net_start_req_info->pdp_info.auth_type >= TAPI_PDP_AUTH_NONE
+                       && net_start_req_info->pdp_info.auth_type < TAPI_PDP_AUTH_MAX) {
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1, out_param2,out_param3,out_param4);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Connection Name=%s",conn_name.name);
+
+               g_array_append_vals(in_param1, net_start_req_info, sizeof(tapi_ps_net_start_req_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_GPRS, TAPI_CS_GPRS_STARTNETWORK, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %d ",ret_val);
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               ret_val = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid PTR  =%d ",ret_val);
+       }
+
+       return ret_val;
+}
+
+/**
+ * Sends  to Telephony Server to deactivate the pdp service
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]  tapi_ps_net_stop_req_t
+ * @param[out] None
+ * @Interface  Asynchronous.
+ * @remark
+ * @Refer              tel_activate_gprs_pdp
+ *
+ */
+EXPORT_API int tel_deactivate_gprs_pdp(const tapi_ps_net_stop_req_t *net_stop_req_info, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_RETURN_VAL_IF_FAIL((pRequestID&&net_stop_req_info) , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (net_stop_req_info->pdp_info.auth_type >= TAPI_PDP_AUTH_NONE
+                       && net_stop_req_info->pdp_info.auth_type < TAPI_PDP_AUTH_MAX) {
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, net_stop_req_info, sizeof(tapi_ps_net_stop_req_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_GPRS, TAPI_CS_GPRS_PDP_DEACTIVATION_SET, in_param1, in_param2,
+                               in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Proxy error =%d ",ret_val);
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               ret_val = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid PTR  =%d ",ret_val);
+       }
+
+       return ret_val;
+}
+
+/**
+ * Sends  to Telephony Server to know whether Signal line is on or net
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]  tapi_ps_btdun_pincontrol
+ * @param[out] None
+ * @Interface  Asynchronous.
+ * @remark             This means that the MS is ready to start Data Service using DPRAM.
+ * @Refer
+ *
+ */
+EXPORT_API int tel_control_gprs_btdun_pin(tapi_ps_btdun_pincontrol pincontrol, int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestID, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       switch (pincontrol.signal) {
+               case GPRS_SIGNAL_DCD:
+               case GPRS_DATA_SIGNAL_DTR:
+               case GPRS_DATA_SIGNAL_DSR:
+               case GPRS_DATA_SIGNAL_RTS:
+               case GPRS_DATA_SIGNAL_CTS:
+               case GPRS_DATA_SIGNAL_RI:
+                       break;
+
+               default:
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "invalid signal(%d:0x%x)", pincontrol.signal, pincontrol.signal);
+                       ret_val = TAPI_API_INVALID_INPUT;
+       }
+
+       switch (pincontrol.status) {
+               case GPRS_SIGNAL_STATUS_OFF:
+               case GPRS_SIGNAL_STATUS_ON:
+                       break;
+
+               default:
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "invalid status(%d:0x%x)", pincontrol.status, pincontrol.status);
+                       ret_val = TAPI_API_INVALID_INPUT;
+       }
+
+       if (ret_val != TAPI_API_SUCCESS) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "failed. ret_val = %d", ret_val);
+               return ret_val;
+       }
+
+       if ((pincontrol.signal >= GPRS_SIGNAL_DCD && pincontrol.signal <= GPRS_DATA_SIGNAL_RI)
+                       && (pincontrol.status >= GPRS_SIGNAL_STATUS_OFF && pincontrol.status <= GPRS_SIGNAL_STATUS_ON)) {
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &pincontrol, sizeof(tapi_ps_btdun_pincontrol));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_GPRS, TAPI_CS_GPRS_BTDUN_PINCTRL_GET, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+                       *pRequestID = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Proxy error =%d ",ret_val);
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+
+       return ret_val;
+}
diff --git a/src/tapi_proxy_gps.c b/src/tapi_proxy_gps.c
new file mode 100644 (file)
index 0000000..6da05b7
--- /dev/null
@@ -0,0 +1,632 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "TapiUtility.h"
+#include "ITapiGps.h"
+#include "TelDefines.h"
+#include "tapi_proxy_internal.h"
+
+EXPORT_API int tel_init_gps(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_INIT,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_deinit_gps(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_DEINIT,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_gps_prefix_info(tapi_gps_fix_request_msg_t *type)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (!type)
+       {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter gps_session_params as in_param1*/
+       g_array_append_vals(in_param1, type, sizeof(tapi_gps_fix_request_msg_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_FIX_REQUEST,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+    return api_err;
+}
+
+EXPORT_API int tel_stop_gps_session(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_STOP_SESSION,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_gps_parameters(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_GET_PARAMETERS,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_gps_parameters(tapi_gps_param_t *gps_params)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (!gps_params) {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*
+       if(!tapi_gps_check_param(gps_params))
+               return TAPI_API_INVALID_INPUT;
+       */
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter gps_session_params as in_param1*/
+       g_array_append_vals(in_param1, gps_params, sizeof(tapi_gps_param_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_SET_PARAMETERS,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_confirm_gps_data_connection(tapi_gps_data_conn_cnf_t *pdp_cnf)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (!pdp_cnf)
+       {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, pdp_cnf, sizeof(tapi_gps_data_conn_cnf_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_AGPS_PDP_CONN_CNF,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_confirm_gps_dns_lookup(tapi_gps_dns_lookup_cnf_t *dns_cof)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (!dns_cof) {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, dns_cof, sizeof(tapi_gps_dns_lookup_cnf_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_AGPS_DNS_LOOKUP_CNF,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+       return api_err;
+}
+
+EXPORT_API int tel_confirm_gps_verification(tapi_gps_verification_cnf_t result)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (result == TAPI_GPS_VER_CNF_NO||result == TAPI_GPS_VER_CNF_YES||result == TAPI_GPS_VER_CNF_NORESPONSE) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                          out_param1,out_param2,out_param3,out_param4);
+
+               /* Passing parameter gps_session_params as in_param1*/
+               g_array_append_vals(in_param1, &result, sizeof(tapi_gps_verification_cnf_t));
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_SEND_VER_CNF,
+                                                        in_param1,in_param2,in_param3,in_param4,
+                                                        &out_param1,&out_param2,&out_param3,&out_param4);
+
+               if (ret) {
+                       api_err = g_array_index(out_param1, int, 0);
+               }
+               else {
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                     out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               api_err = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"##### Received Invalid Input ####");
+       }
+
+       return api_err;
+}
+
+EXPORT_API int tel_init_gps_xtra(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_INIT,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_deinit_gps_xtra(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_DEINIT,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_enable_gps_xtra(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_ENABLE,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_disable_gps_xtra(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_DISABLE,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_gps_xtra_time(tapi_gps_xtra_time_info_t *time_info)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (!time_info) {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, time_info, sizeof(tapi_gps_xtra_time_info_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_SET_TIMEINFO,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_gps_xtra_data(tapi_gps_xtra_data_info_t *data_info)
+{
+       TS_BOOL ret = FALSE;
+       int             api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (!data_info)
+       {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, data_info, sizeof(tapi_gps_xtra_data_info_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_XTRA_SET_DATA,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_confirm_gps_measure_pos(tapi_gps_measure_position_confirm_t *data)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (!data) {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, data, sizeof(tapi_gps_measure_position_confirm_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_MEASURE_POS_CNF,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_gps_frequency_aiding(unsigned char state)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       if (state != 1 && state != 0) {
+               return TAPI_API_INVALID_PTR;
+       }
+
+       /*      Check if D-Bus service is available. If Failed then return FALSE        */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter time_info as in_param1*/
+       g_array_append_vals(in_param1, &state, sizeof(unsigned char));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_GPS,TAPI_CS_GPS_SET_FREQ_AIDING,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
diff --git a/src/tapi_proxy_misc.c b/src/tapi_proxy_misc.c
new file mode 100644 (file)
index 0000000..5d3022d
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <vconf.h>
+
+#include <TapiUtility.h>
+#include <TelErr.h>
+#include <ITapiMisc.h>
+
+#include "tel_cs_conn.h"
+#include "tapi_proxy_internal.h"
+
+
+static int _tel_check_tapi_state()
+{
+       int vconf_ret = 0;
+       int tapi_state = 0;
+
+       vconf_ret = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, (int *) &tapi_state);
+
+       if (vconf_ret != 0 || tapi_state != 1) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "FAIL TO GET VCONFKEY_TELEPHONY_TAPI_STATE or SERVICE NOT READY");
+               return TAPI_API_SERVICE_NOT_READY;
+       }
+
+       return 0;
+}
+
+TS_BOOL __tel_check_misc_valid(tapi_misc_time_zone_info_type *zone_info)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (0x00 > zone_info->time_zone_valid || zone_info->time_zone_valid > 0x04)
+               return FALSE;
+
+       if (1 > zone_info->month || zone_info->month > 12)
+               return FALSE;
+       if (1 > zone_info->day || zone_info->day > 31)
+               return FALSE;
+       if (0 > (int) zone_info->hour || (int) zone_info->hour > 23)
+               return FALSE;
+       if ((int) zone_info->minute > 59)
+               return FALSE;
+       if ((int) zone_info->second > 59)
+               return FALSE;
+
+       //no need check  (TS_UINT8)zone_info->time_zone
+
+       if (0x00 > zone_info->daylight_adjust || zone_info->daylight_adjust > 0x02)
+               return FALSE;
+       if (0x00 > zone_info->day_of_week || zone_info->day_of_week > 0x06)
+               return FALSE;
+
+       return TRUE;
+}
+
+EXPORT_API int tel_get_misc_timezone_mode(int* bTimezone_valid)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_TIMEZONE_GETMODE,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               *bTimezone_valid = g_array_index(out_param3,int ,0);
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_misc_timezone_info(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_TIMEZONE_GETINFO,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_misc_timezone_info(tapi_misc_time_zone_info_type *timezone_info)
+{
+       TS_BOOL bValid = FALSE;
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(timezone_info, TAPI_API_MISC_INPUTPARM_ERROR);
+
+       //check validity of variable.
+       bValid = __tel_check_misc_valid(timezone_info);
+       if (bValid == FALSE) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "TAPI_API_MISC_VALIDITY_ERROR");
+               return TAPI_API_MISC_VALIDITY_ERROR;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, timezone_info, sizeof(tapi_misc_time_zone_info_type));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_TIMEZONE_SETINFO,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_confirm_misc_timezone_Info(tapi_misc_time_zone_info_type *timezone_info)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(timezone_info, TAPI_API_MISC_INPUTPARM_ERROR);
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, timezone_info, sizeof(tapi_misc_time_zone_info_type));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_TIMEZONE_CONFIRMINFO,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_misc_me_version(TelMiscVersionInformation* ver_info)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_ME_VERSION_GET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+
+               if (api_err == TAPI_API_SUCCESS) {
+                       *ver_info = g_array_index(out_param2, TelMiscVersionInformation, 0);
+
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "ver_mask[0x%02x]", ver_info->ver_mask);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szHwVersion[%s]", ver_info->szHwVersion);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szSwVersion[%s]", ver_info->szSwVersion);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szRfCalDate[%s]", ver_info->szRfCalDate);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szProductCode[%s]", ver_info->szProductCode);
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "api_err[%d]", api_err);
+               }
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "tapi_send_request_internal fail");
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_misc_me_sn(TelMiscSNIndexType_t sn_index, TelMiscSNInformation* sn_info)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &sn_index, sizeof(TelMiscSNIndexType_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_SERIAL_NUMBER_GET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+
+               if (api_err == TAPI_API_SUCCESS) {
+                       *sn_info = g_array_index(out_param2, TelMiscSNInformation, 0);
+
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "sn_index[%d]", sn_info->sn_index);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "sn_len[%d]", sn_info->sn_len);
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szNumber[%s]", sn_info->szNumber);
+               }
+               else {
+                       TAPI_LIB_DEBUG(LEVEL_DEBUG, "api_err[%d]", api_err);
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_misc_nam_info(unsigned short nam_info_mask, TelMiscNamIndex_t nam_index)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &nam_info_mask, sizeof(unsigned short));
+       g_array_append_vals(in_param2, &nam_index, sizeof(TelMiscNamIndex_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_NAM_INFO_GET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_misc_nam_info(TelMiscNamInfo_t *nam_info)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, nam_info, sizeof(TelMiscNamInfo_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_MISC, TAPI_CS_MISC_NAM_INFO_SET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = TAPI_API_SUCCESS;
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_misc_emergency_mode(int mode) {
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance with request mode[%d]", mode);
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (mode != 0 && mode != 1)
+               return TAPI_API_INVALID_INPUT;
+
+       if (vconf_set_int("db/telephony/emergency", mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]UPDATE db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_misc_emergency_mode(int *mode) {
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (vconf_get_int("db/telephony/emergency", mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode[%d]", *mode);
+       return TAPI_API_SUCCESS;
+}
diff --git a/src/tapi_proxy_nettext.c b/src/tapi_proxy_nettext.c
new file mode 100644 (file)
index 0000000..2a4ebf8
--- /dev/null
@@ -0,0 +1,1239 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/**
+ * @ingroup            TAPI
+ * @defgroup   NetText
+ * @{
+ *
+ * NetText APIs allow a client to accomplish the following features: @n
+ * - Send,Recieve ,Save,Delete,Read short messages  @n
+ * - Set and Get information like Service Center Address, Cell Broadcast configuration,Preferred Bearer, SMS parameters @n
+ * - Retrieve information like Current Memory selected, NetTextCount related to the messages @n
+ * - Set delivery report @n
+ */
+
+#include "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "TelNetText.h"
+#include "TapiUtility.h"
+
+#include <vconf.h>
+
+extern tapi_dbus_connection_name conn_name;
+
+/**
+ *
+ * This function enables the applications to send nettext to the network.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]         pDataPackage - SMS-SUBMIT TPDU or SMS-COMMAND, and its length have to be passed in this structure.
+ *                             tapi_sms_more_to_send_t parameter denotes whether the sms is short or concatenated.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_nettext_datapackage, tapi_sms_more_to_send_t.
+ */
+EXPORT_API int tel_send_sms(const TelSmsDatapackageInfo_t *pDataPackage, int bMoreMsgToSend, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int emergency_mode = 0;
+
+       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       if (emergency_mode) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode on");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage ,TAPI_API_INVALID_PTR);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pDataPackage, sizeof(TelSmsDatapackageInfo_t));
+       g_array_append_vals(in_param2, &bMoreMsgToSend, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SEND, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the deliver report for an incoming message(MT).
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]         pDataPackage - SMS-DELIVER-REPORT, and its length have to be passed in this structure.
+ * @param[in]          RPCause - the result cause
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer             tapi_nettext_deliver_report
+ */
+EXPORT_API int tel_send_sms_deliver_report(
+               const TelSmsDatapackageInfo_t *pDataPackage,
+               TelSmsResponse_t RPCause,
+               int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pDataPackage , TAPI_API_INVALID_PTR);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pDataPackage, sizeof(TelSmsDatapackageInfo_t));
+       g_array_append_vals(in_param2, &RPCause, sizeof(TelSmsResponse_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETDELIVERREPORT, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to read nettext from the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be read
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark             tapi_nettext_selmem_set is to be called always to select the
+ *                             preferred memory before calling this api.
+ * @Refer
+ */
+EXPORT_API int tel_read_sms_in_sim(int Index, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (Index < 0) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Invalid Input -Read Nettext %d",Index);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Index, sizeof(unsigned int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_READ, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to write/save nettext to the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be saved, msg_status will denote the status
+ *                             of the message whether Sent, Unsent, Read, Unread, Unknown.
+ *                             pDataPackage- the SMS-SUBMIT PDU or SMS-DELIVER,SMS-STATUSREPORT
+ *                             being passed to be saved in memory.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @Refer              tapi_nettext_datapackage, tapi_nettext_status_type.
+ */
+EXPORT_API int tel_write_sms_in_sim(const TelSmsData_t *pWriteData, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pWriteData ,TAPI_API_INVALID_PTR);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((pWriteData->MsgStatus < TAPI_NETTEXT_STATUS_READ) || (pWriteData->MsgStatus > TAPI_NETTEXT_STATUS_RESERVED)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Invalid Input -Write Nettext %d",pWriteData->MsgStatus);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pWriteData, sizeof(TelSmsData_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_WRITE, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to delete nettext to the preferred storage.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be deleted. if index is -1, all sms in the sim are deleted.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark             tapi_nettext_selmem_set has to be called always before calling this API
+ * @Refer
+ */
+EXPORT_API int tel_delete_sms_in_sim(int Index, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if ((Index < 0) || (Index > TAPI_NETTEXT_MAX_INDEX)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Index, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_DELETE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to get the count of the messages stored in the memory
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]  None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *              Its value can be any value from 0 to 255 if the API is returned successfully
+ *                 -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface  Asynchronous
+ * @remark             The requested memory details come in response API
+ * @Refer          None
+ */
+EXPORT_API int tel_get_sms_count(int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETCOUNT, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+
+}
+
+/**
+ *
+ * This function enables the application to set the status of a message
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          index - the message to be changed
+ *                             msgStatus -SMS message status
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_nettext_memory_type,tapi_nettext_status_type
+ */
+EXPORT_API int tel_set_sms_message_status(int Index, TelSmsMsgStatus_t msgStatus, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((Index < 0) || (Index > TAPI_NETTEXT_MAX_INDEX) || (msgStatus < TAPI_NETTEXT_STATUS_READ) || (msgStatus
+                       > TAPI_NETTEXT_STATUS_RESERVED)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -MsgStatus Set Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Index, sizeof(int));
+       g_array_append_vals(in_param2, &msgStatus, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETMSGSTATUS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the phone memory status whether full or available
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          memory_status whether full or available
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_nettext_memstatus_type
+ */
+EXPORT_API int tel_set_sms_memory_status(int memoryStatus, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((memoryStatus < TAPI_NETTEXT_PDA_MEMORY_STATUS_AVAILABLE) || (memoryStatus
+                       > TAPI_NETTEXT_PDA_MEMORY_STATUS_FULL)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -MemoryStatus Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &memoryStatus, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETMEMSTATUS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the configuration for cell broadcast messages
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          tapi_nettext_cb_config the configuration details to be set
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_nettext_cb_config
+ */
+EXPORT_API int tel_set_sms_cb_config(const TelSmsCbConfig_t *pCBConfig, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pCBConfig , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, " CBEnabled(%d)",pCBConfig->bCBEnabled);
+
+       if ((pCBConfig->SelectedId >= 3) || (pCBConfig->MsgIdCount < 0)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -SelectedId(%d)",pCBConfig->SelectedId);
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -MsgIdCount(%d)",pCBConfig->MsgIdCount);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pCBConfig, sizeof(TelSmsCbConfig_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETCBCONFIG, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the configuration for cell broadcast messages
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             None
+ */
+EXPORT_API int tel_get_sms_cb_config(int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETCBCONFIG, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the service center address in the SIM storage
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          pSCA - the service center address that is to be set in the SIM storage
+ *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
+ *                             index - the index that is to be set in the SIM storage
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark
+ * @Refer             tapi_nettext_sms_addr_info
+ */
+EXPORT_API int tel_set_sms_sca(const TelSmsAddressInfo_t *pSCA, int Index, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pSCA , TAPI_API_INVALID_PTR);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((Index < 0) || (Index > TAPI_NETTEXT_MAX_INDEX)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Index Input");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pSCA, sizeof(TelSmsAddressInfo_t));
+       g_array_append_vals(in_param2, &Index, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETSCA, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to get the service center address from the SIM storage
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          pSCA - the service center address that is to be set in the SIM storage
+ *                                         refer to 3GPP TS 23.040:9.1.2.5 Address fields
+ *                             index - the index that is to be set in the SIM storage
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_nettext_sms_addr_info
+ */
+EXPORT_API int tel_get_sms_sca(int Index, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((Index < 0) || (Index > TAPI_NETTEXT_MAX_INDEX)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -SMS Param Get Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Index, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETSCA, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to set the preferred bearer
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          service option ie the bearer type to be set
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer             tapi_nettext_bearer_type
+ */
+EXPORT_API int tel_set_sms_preferred_bearer(TelSmsBearerType_t BearerType, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((TAPI_NETTEXT_BEARER_PS_ONLY > BearerType) || (TAPI_NETTEXT_NO_PREFERRED_BEARER < BearerType)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Invalid Input -PrefBearer Set Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &BearerType, sizeof(TelSmsBearerType_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETPREFBEARER, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function is used to get SMS preferred bearer on which SMS has to be transmitted. This is a synchronous function
+ *
+ * @return             TRUE in case of success and FALSE in case of error .
+ * @param[in]        None
+ *
+ * @param[out] requestId-Unique identifier for a particular request
+ *                          Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_preferred_bearer(int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETPREFBEARER, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameter count from the EFsmsp file.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark             Requested details come in response API
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_parameter_count(int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETPARAMCNT, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameters
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          record index of the record in which the sms parameters are stored in the EFsmsp file
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark             Requested details come in response API
+ * @Refer
+ */
+EXPORT_API int tel_get_sms_parameters(int index, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((index < 0) || (index > TAPI_NETTEXT_MAX_INDEX)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input -SMS Param Get Nettext");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &index, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_GETPARAMS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables to application to get the sms parameters
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          tapi_smsp_set_param_t sms parameters to be set in the EFsmsp file
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ * @Interface          ASynchronous.
+ * @remark
+ * @Refer             tapi_smsp_set_param_t
+ */
+EXPORT_API int tel_set_sms_parameters(const TelSmsParams_t *pSmsSetParameters, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_RETURN_VAL_IF_FAIL(pSmsSetParameters, TAPI_API_INVALID_PTR);
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pSmsSetParameters, sizeof(TelSmsParams_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SETPARAMS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ *  This API is used to send an SMS message to the network. This API allows keeping
+ *  the dedicated link at lower layers by passing information as more messages to send in parameters.
+ * This will enable not to release if a dedicated connection is used for transmission.
+ *
+ * @return             TRUE in case of success and FALSE in case of error .
+ * @param[in]          TelSmsMsgInfo_t - SMS_SUBMIT/ACK/CANCEL and its length have to be passed in this structure.
+ *
+ *                             unsigned int MoreMsgToSend will be set to TRUE when there are more than one message to be
+ *                         send or Multiple segmented concatenated message to be send, otherwise FALSE. This flag
+ *                         indicates OEM that more messages to send.
+ *
+ * @param[out] RequestId-Unique identifier for a particular request
+ *                         Its value can be any value from 0 to 255 if the API is returned successfully
+ *                          -1 (INVALID_REQUEST_ID) will be sent in case of failure
+ *
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSmsMsgInfo_t.
+ */
+EXPORT_API int tel_send_sms_msg(const TelSmsMsgInfo_t *pSmsMsgInfo, unsigned int MoreMsgToSend, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int emergency_mode = 0;
+
+       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       if (emergency_mode) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode on");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pSmsMsgInfo ,TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pSmsMsgInfo, sizeof(TelSmsMsgInfo_t));
+       g_array_append_vals(in_param2, &MoreMsgToSend, sizeof(unsigned int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_SEND_EX, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables the applications to check the device status
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ *
+ * @param[out] Device status whether Ready or Not Ready
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_check_sms_device_status(int *pDeviceStatus)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pDeviceStatus, TAPI_API_INVALID_PTR);
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_DEVICESTATUS,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pDeviceStatus = g_array_index(out_param3, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * This function enables to application to set that the device is ready to recieve messages from network.
+ *
+ * @return             Returns appropriate error code. Refer TapiResult_t .
+ * @param[in]          None
+ *
+ * @param[out] None
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_set_sms_device_status(void)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETTEXT, TAPI_CS_NETTEXT_DEVICEREADY,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+//eof
diff --git a/src/tapi_proxy_network.c b/src/tapi_proxy_network.c
new file mode 100644 (file)
index 0000000..699be35
--- /dev/null
@@ -0,0 +1,1021 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "ITapiNetwork.h"
+#include "TelNetwork.h"
+#include "TapiUtility.h"
+
+#include <vconf.h>
+
+extern tapi_dbus_connection_name conn_name;
+
+static int _tel_check_tapi_state()
+{
+       int vconf_ret = 0;
+       int tapi_state = 0;
+
+       vconf_ret = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, (int*) &tapi_state);
+
+       if (vconf_ret != 0 || tapi_state !=1) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT,"FAIL TO GET VCONFKEY_TELEPHONY_TAPI_STATE or SERVICE NOT READY");
+               return TAPI_API_SERVICE_NOT_READY;
+       }
+       return 0;
+}
+
+EXPORT_API int tel_select_network_automatic(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SELECT_AUTOMATIC, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_select_network_manual(unsigned int Plmn, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Plmn, sizeof(unsigned int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SELECT_MANUAL, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_search_network(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SEARCH, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_selection_mode(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETSELECTIONMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_preferred_plmn(
+               TelNetworkPrefferedPlmnOp_t Operation,
+               TelNetworkPrefferedPlmnInfo_t *pPreffPlmnInfo,
+               int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance : Operation[%d]", Operation);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(pPreffPlmnInfo ,TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((Operation > TAPI_NETWORK_PREF_PLMN_DELETE) || (Operation < TAPI_NETWORK_PREF_PLMN_ADD)
+                       || (pPreffPlmnInfo->SystemType > TAPI_NETWORK_SYSTEM_HSDPA) || (pPreffPlmnInfo->SystemType
+                       <= TAPI_NETWORK_SYSTEM_NO_SRV)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "INVALID INPUT [%d],[%d]", Operation, pPreffPlmnInfo->SystemType);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &Operation, sizeof(TelNetworkPrefferedPlmnOp_t));
+       g_array_append_vals(in_param2, pPreffPlmnInfo, sizeof(TelNetworkPrefferedPlmnInfo_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETPREFPLMN, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_preferred_plmn(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETPREFPLMN, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_band(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETNETWORKBAND, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_band(TelNetworkBandPreferred_t BandMode, TelNetworkBand_t Band, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance Band Mode[%d] Band[%d]",BandMode, Band);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((BandMode > TAPI_NETWORK_BAND_MODE_ONLY) || (BandMode < TAPI_NETWORK_BAND_MODE_PREFERRED) || (Band
+                       > TAPI_NETWORK_BAND_TYPE_GSM_850_1900) || (Band < TAPI_NETWORK_BAND_TYPE_ANY)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "INVALID INPUT [%d],[%d]", BandMode, Band);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &BandMode, sizeof(TelNetworkBandPreferred_t));
+       g_array_append_vals(in_param2, &Band, sizeof(TelNetworkBand_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETNETWORKBAND, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_service_domain(TelNetworkServiceDomain_t ServiceDomain, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance : Service Domain[%d]", ServiceDomain);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((ServiceDomain > TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC) || (ServiceDomain
+                       < TAPI_NETWORK_SERVICE_DOMAIN_COMBINED)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "INVALID INPUT [%d]", ServiceDomain);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &ServiceDomain, sizeof(TelNetworkServiceDomain_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETSERVICEDOMAIN, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, TapiResult_t, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_service_domain(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETSERVICEDOMAIN, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_mode(TelNetworkMode_t NwMode, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance : Network Mode[%d]", NwMode);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((NwMode > TAPI_NETWORK_MODE_WLAN) || (NwMode <= TAPI_NETWORK_MODE_NONE)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "INVALID INPUT [%d]", NwMode);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter network_mode as in_param1*/
+       g_array_append_vals(in_param1, &NwMode, sizeof(TelNetworkMode_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETNETWORKMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_mode(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETNETWORKMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_roaming(TelNetworkRoamingMode_t *RoamingMode, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(RoamingMode , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((RoamingMode->pref_net_type > TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY) || (RoamingMode->pref_net_type
+                       < TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       /* Passing parameter service_domain as in_param1*/
+       g_array_append_vals(in_param1, RoamingMode, sizeof(TelNetworkRoamingMode_t));
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETROAMINGMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_roaming(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETROAMINGMODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_hybrid_in_cdma(TelNetworkCDMAHybridMode_t CDMAHybridMode, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance : Hybrid Mode[%d]", CDMAHybridMode);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((CDMAHybridMode > TAPI_NETWORK_CDMA_EVDO_ONLY) || (CDMAHybridMode < TAPI_NETWORK_CDMA_HYBRID)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &CDMAHybridMode, sizeof(TelNetworkCDMAHybridMode_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETCDMAHYBRIDMODE, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_hybrid_in_cdma(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId , TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETCDMAHYBRIDMODE, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_acquisition_order(TelNetworkMode_t *pPrefNwOrder, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pPrefNwOrder, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       /* Passing parameter network_order as in_param1*/
+       g_array_append_vals(in_param1, pPrefNwOrder, (sizeof(TelNetworkMode_t) * TAPI_NETWORK_ORDER_MAX));
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETNETWORKORDER,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_acquisition_order(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETNETWORKORDER,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_set_network_power_on_attach(TelNetworkPowerOnAttach_t PowerOnAttach, int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance Power On Attach[%d]", PowerOnAttach);
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((PowerOnAttach > TAPI_NETWORK_POWERON_ATTACH_ENABLE) || (PowerOnAttach < TAPI_NETWORK_POWERON_ATTACH_DISABLE)) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "INVALID INPUT [%d]", PowerOnAttach);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &PowerOnAttach, sizeof(TelNetworkPowerOnAttach_t));
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_SETPOWERONATTACH,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_network_power_on_attach(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_GETPOWERONATTACH,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_cancel_network_manual_search(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_CANCELMANUALSEARCH,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_cancel_network_manual_selection(int *pRequestId)
+{
+       int api_err = TAPI_API_SUCCESS;
+       TS_BOOL ret;
+       tapi_dbus_connection_name app_name;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+       if (_tel_check_tapi_state() != 0)
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       tel_get_app_name(&app_name);
+       if (app_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param4, &app_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_NETWORK, TAPI_CS_NETWORK_CANCELMANUALSELECTION,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
diff --git a/src/tapi_proxy_omadm.c b/src/tapi_proxy_omadm.c
new file mode 100644 (file)
index 0000000..5a6d751
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "TapiUtility.h"
+#include "ITapiOmadm.h"
+#include "TelUtility.h"
+#include "tapi_proxy_internal.h"
+
+EXPORT_API int tel_get_omadm_prl_size(int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_PRL_SIZE_GET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                          &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_omadm_model_name(int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_MODEL_NAME_GET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                          &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_omadm_oem_name(int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_OEM_NAME_GET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                          &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_get_omadm_sw_ver(int *pRequestID)
+{
+       TS_BOOL ret;
+       int ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_SW_VER_GET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                          &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int tel_read_omadm_ril(int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_PRL_READ_GET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                  &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
+
+EXPORT_API int  tel_write_omadm_prl(TelOMADMPRLData_t *pPrlData, int *pRequestID)
+{
+       TS_BOOL ret;
+       int     ret_val;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RET_ERR_NUM_IF_FAIL(pPrlData, TAPI_API_INVALID_PTR);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pPrlData, sizeof(TelOMADMPRLData_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_OMADM, TAPI_CS_OMADM_PRL_WRITE_SET,
+                                          in_param1, in_param2, in_param3, in_param4,
+                                          &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               /*      Get the API error value as out param 1, from the server.        */
+               ret_val = g_array_index(out_param1, int, 0);
+
+               /*      Get the Request ID as out param 2, from the server.    */
+               *pRequestID = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"RPC link is down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%d], Reuest ID [%d]",ret_val, *pRequestID);
+
+       return ret_val;
+}
diff --git a/src/tapi_proxy_power.c b/src/tapi_proxy_power.c
new file mode 100644 (file)
index 0000000..cf2058d
--- /dev/null
@@ -0,0 +1,207 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "TelDefines.h"
+#include "TelPower.h"
+#include "TapiUtility.h"
+#include "TelErr.h"
+#include "ITapiPower.h"
+#include "tapi_proxy_internal.h"
+
+/**
+ *
+ * Turn Off or Turn On the Modem.
+ *
+ * @param[in]          tapi_power_phone_cmd_t  Turn ON or OFF.
+ * @param[out] NONE
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks            None.
+ * @see                        tapi_power_phone_cmd_t, TapiResult_t.
+ */
+EXPORT_API int tel_process_power_command(tapi_power_phone_cmd_t cmd)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       if ((cmd < TAPI_PHONE_POWER_OFF) || (cmd > TAPI_PHONE_POWER_RESET)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input [%d]", cmd);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &cmd, sizeof(tapi_power_phone_cmd_t));
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Power Service Request: Power Off /On/Reset..[ %d ]", cmd);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_POWER, TAPI_CS_POWER_PHONE_POWER_ON_OFF, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * Enter in to or Leave from Flight Mode.
+ *
+ * @param[in]  Enable (if 1, Enable and if 0, Disable)
+ * @param[out] NONE
+ * @return             TapiResult_t      API result code. Either Success or some Error Code.
+ * @exception  In case of exceptions return value contains appropriate error code.
+ * @remarks            None
+ * @see                        None.
+ */
+EXPORT_API int tel_set_flight_mode(tapi_power_flight_mode_type_t mode)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       /*       check for the RPC link.... */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       if ((mode < TAPI_POWER_FLIGHT_MODE_ENTER) || (mode >= TAPI_POWER_FLIGHT_MODE_MAX)) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Invalid Input [%d]", mode);
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &mode, sizeof(tapi_power_flight_mode_type_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_POWER, TAPI_CS_POWER_FLIGHT_MODE, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * Reset the Modem.
+ *
+ * @param[in]          NONE
+ * @param[out] NONE
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @exception          In case of exceptions return value contains appropriate error code.
+ * @remarks            None.
+ * @see                        TapiResult_t.
+ */
+EXPORT_API int tel_reset_modem(void)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_POWER, TAPI_CS_POWER_REBOOT, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * Enforce ramdump of phone.
+ *
+ * @param[in]  NONE
+ * @param[out] NONE
+ * @return             TapiResult_t      API result code. Either Success or some Error Code.
+ * @exception  In case of exceptions return value contains appropriate error code.
+ * @remarks            None
+ * @see                        None.
+ */
+EXPORT_API int tel_enforce_ramdump_of_modem(void)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Enterance.");
+
+       TS_BOOL ret = FALSE;
+
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_POWER, TAPI_CS_POWER_RAMDUMP, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_ERR, "_COMMON_ERR_: Phone Service Down");
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/*     EOF     */
diff --git a/src/tapi_proxy_productivity.c b/src/tapi_proxy_productivity.c
new file mode 100644 (file)
index 0000000..25c2c09
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "ITapiProductivity.h"
+#include "TapiUtility.h"
+#include "TelErr.h"
+#include "tapi_proxy_internal.h"
+
+/**********************************************************************************************
+ *
+ *                      NEW API
+ *
+***********************************************************************************************/
+
+
+/**********************************************************************************************
+ *
+ * This function is used to start the service mode.
+ *
+ * @param      svc_mode    tapi_service_mode_t , test_sub     tapi_test_mode_sub_t
+ * @return     enum type TapiResult_t
+ * @remark     NONE
+ *
+***********************************************************************************************/
+EXPORT_API int tel_start_svcmode(tapi_service_mode_t svc_mode, tapi_test_mode_sub_t test_sub)
+{
+       TS_BOOL ret;
+       int     ret_val = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &svc_mode, sizeof(tapi_service_mode_t));
+       g_array_append_vals(in_param2, &test_sub, sizeof(tapi_test_mode_sub_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SVCMODE,TAPI_CS_SVCMODE_ENTERSVCMODE,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to end the service mode.
+ *
+ * @param      svc_mode    tapi_service_mode_t
+ * @return     enum type TapiResult_t
+ * @remark     NONE
+ *
+***********************************************************************************************/
+EXPORT_API int tel_end_svcmode(tapi_service_mode_t  svc_mode)
+{
+       TS_BOOL ret;
+       int     ret_val = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &svc_mode, sizeof(tapi_service_mode_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SVCMODE,TAPI_CS_SVCMODE_ENDSVCMODE,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to process the code enterred when service mode is running.
+ *
+ * @param      key_code  char type
+ * @return     enum type TapiResult_t
+ * @remark     NONE
+ *
+***********************************************************************************************/
+EXPORT_API int tel_send_svcmode_keycode(char key_code)
+{
+       TS_BOOL ret;
+       int     ret_val = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &key_code, sizeof(char));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SVCMODE,TAPI_CS_SVCMODE_PROCESS_KEYCODE,
+                                               in_param1,in_param2,in_param3,in_param4,
+                                               &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (ret) {
+                       ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+                       ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**********************************************************************************************
+ *
+ * This function is invoked to dump cp debug.
+ *
+ * @param      tapi_service_mode_debug_cp_dump_t [in] type  - cp dump type. refer #tapi_service_mode_debug_cp_dump_t
+ * @return     Return Type (int) \n
+ *             - Integer '0' ( same with TAPI_API_SUCCESS )  - indicating that the operation has completed successfully. \n
+ *             - Negative integer : it provides an error code (Refer #TapiResult_t)
+ * @remark     NONE
+ *
+***********************************************************************************************/
+EXPORT_API int tel_request_svcmode_dump(tapi_service_mode_debug_cp_dump_t type)
+{
+       TS_BOOL ret = FALSE;
+       int ret_val = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &type, sizeof(tapi_service_mode_debug_cp_dump_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SVCMODE, TAPI_CS_SVCMODE_DEBUG_DUMP,
+                                       in_param1, in_param2, in_param3, in_param4,
+                                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4,
+                                 out_param1, out_param2, out_param3, out_param4);
+
+       return ret_val;
+}
+
+/**
+ * Process the starting Factory Process.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_start_imei_process(void)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_IMEI,TAPI_CS_IMEI_STARTFACTORYPROCESS,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ * Process the tapi_imei_CompareItemIND
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_compare_imei_item(unsigned char nItemID, unsigned char bResult)
+{
+       TS_BOOL ret = FALSE;
+       int     api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                  out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &nItemID, sizeof(unsigned char));
+       g_array_append_vals(in_param2, &bResult, sizeof(unsigned char));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_IMEI,TAPI_CS_IMEI_COMPARE_ITEM_IND,
+                                                in_param1,in_param2,in_param3,in_param4,
+                                                &out_param1,&out_param2,&out_param3,&out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                                                 out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_factory_omission_avoidance(tapi_factory_omission_avoidance_read_cmd_t cmd)
+{
+       int ret = 0;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       /*      Check input range for tele service type and call barring flavour        */
+       if ((cmd >= TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_READ)
+                       && (cmd <= TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_READ_FULL)) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &cmd, sizeof(tapi_factory_omission_avoidance_read_cmd_t));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func");
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_FACTORY, TAPI_CS_FACTORY_OMISSION_AVOIDANCE_GET,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       ret = g_array_index(out_param1, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       ret = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               /*      Invalid input range given by the APP.   */
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               ret = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", ret);
+
+       return ret;
+}
+
+EXPORT_API int tel_set_factory_omission_avoidance(tapi_factory_omission_avoidance_info_t *info)
+{
+       int ret = 0;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       /*      Check input range for tele service type and call barring flavour        */
+       if ((info->cmd.write_cmd >= TAPI_FACTORY_OMISSION_AVOIDANCE_ITEM_WRITE)
+                       && (info->cmd.write_cmd <= TAPI_FACTORY_OMISSION_AVOIDANCE_FAILDATA_WRITE_FULL)) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, info, sizeof(tapi_factory_omission_avoidance_info_t));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func");
+
+               ret = tapi_send_request_internal(TAPI_CS_SERVICE_FACTORY, TAPI_CS_FACTORY_OMISSION_AVOIDANCE_SET,
+                               in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       ret = g_array_index(out_param1, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       ret = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               /*      Invalid input range given by the APP.   */
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               ret = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", ret);
+
+       return ret;
+}
+
+//eof
diff --git a/src/tapi_proxy_sat.c b/src/tapi_proxy_sat.c
new file mode 100644 (file)
index 0000000..34aadef
--- /dev/null
@@ -0,0 +1,384 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <string.h>
+
+#include <vconf.h>
+
+#include "TelDefines.h"
+#include "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "TelUtility.h"
+#include "TapiUtility.h"
+#include "TelSat.h"
+
+extern tapi_dbus_connection_name conn_name;
+
+/**
+ *
+ * To send envelope command (MENU SELECTION) to USIM.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatMenuSelectionReqInfo_t    menu selection evelope data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatMenuSelectionReqInfo_t
+ */
+EXPORT_API int tel_select_sat_menu(TelSatMenuSelectionReqInfo_t *pMenuSelect, int *pRequestId)
+{
+       int ret_val;
+       TS_BOOL ret = FALSE;
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (pMenuSelect == NULL)
+               return TAPI_API_INVALID_PTR;
+
+       if (pRequestId == NULL)
+               return TAPI_API_INVALID_PTR;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pMenuSelect, sizeof(TelSatMenuSelectionReqInfo_t));
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " Send env cmd... menu selection");
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_SIMATK_SEND_MENU_SELECTION_ENVELOPE, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               *pRequestId = INVALID_REQUEST_ID;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " ret: %d \n", ret);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " ret_val: %d \n", ret_val);
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**
+ *
+ * API to send event download to SIM.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatEventDownloadReqInfo_t    event download data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatEventDownloadReqInfo_t
+ */
+EXPORT_API int tel_download_sat_event(TelSatEventDownloadReqInfo_t *pEventData, int *pRequestId)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Enter");
+
+       int ret_val;
+       TS_BOOL ret = FALSE;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (pEventData == NULL){
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Error: 1st param is NULL");
+               return TAPI_API_INVALID_PTR;
+       }
+
+       if (pRequestId == NULL){
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Error: 2nd param is NULL");
+               return TAPI_API_INVALID_PTR;
+       }
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "Error: No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pEventData, sizeof(TelSatEventDownloadReqInfo_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " event download: event=0x%x", pEventData->eventDownloadType);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_SIMATK_SEND_EVENT_DOWNLOAD, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+       //prevent 2223
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               *pRequestId = INVALID_REQUEST_ID;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**
+ *
+ * API to get main menu information.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[out]         TelSatSetupMenuInfo_t   main menu data.
+ * @Interface          Synchronous.
+ * @remark
+ * @Refer              TelSatSetupMenuInfo_t
+ */
+EXPORT_API int tel_get_sat_main_menu_info(TelSatSetupMenuInfo_t *pMainMenu)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " Get Main Menu Information");
+       int ret_val;
+       TS_BOOL ret = FALSE;
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (pMainMenu == NULL)
+               return TAPI_API_INVALID_PTR;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pMainMenu, sizeof(TelSatSetupMenuInfo_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_SIMATK_GET_MAIN_MENU_INFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+               if (ret_val == TAPI_API_SUCCESS)
+                       *pMainMenu = g_array_index(out_param2,TelSatSetupMenuInfo_t,0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**
+ *
+ * API to send application excution result.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatAppsRetInfo_t     application result information data.
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatAppsRetInfo_t
+ */
+EXPORT_API int tel_send_sat_app_exec_result(TelSatAppsRetInfo_t *pAppRetInfo)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " tel_send_sat_app_exec_result");
+       int ret_val;
+       TS_BOOL ret = FALSE;
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (pAppRetInfo == NULL)
+               return TAPI_API_INVALID_PTR;
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pAppRetInfo, sizeof(TelSatAppsRetInfo_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_SIMATK_SEND_APP_EXEC_RESULT, in_param1, in_param2,
+                       in_param3, in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**
+ *
+ * API to send UI display status.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          TelSatUiDisplayStatusType_t     display status data.
+ command_id    command identifier
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              TelSatUiDisplayStatusType_t
+ */
+EXPORT_API int tel_send_ui_display_status(int commandId, TelSatUiDisplayStatusType_t status)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " tel_send_ui_display_status");
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"status [%d]\n", status);
+       int ret_val;
+       TS_BOOL ret = FALSE;
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (commandId < 0) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"command id should be positive");
+               return TAPI_API_SAT_INVALID_COMMAND_ID;
+       }
+
+       if ((status != TAPI_SAT_DISPLAY_SUCCESS) && (status != TAPI_SAT_DISPLAY_FAIL)) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"invalid status sent");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &commandId, sizeof(int));
+       g_array_append_vals(in_param1, &status, sizeof(TelSatUiDisplayStatusType_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_UI_DISPLAY_STATUS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return ret_val;
+}
+
+/**
+ *
+ * API to send UI user confirmation data.
+ *
+ * @return             values in enum TapiResult_t.
+ * @param[in]          command_id      command identifier
+ command_type          command type
+ key_type                      user confirmation value
+ addtional_data                addtional data
+ data_len                      data length
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+EXPORT_API int tel_send_sat_ui_user_confirm(TelSatUiUserConfirmInfo_t *pUserConfirmData)
+{
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, " tel_send_sat_ui_user_confirm");
+       int ret_val;
+       TS_BOOL ret = FALSE;
+       TelSatTextInfo_t add_data;
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (pUserConfirmData == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, " pUserConfirmData is NULL");
+               return TAPI_API_INVALID_PTR;
+       }
+
+       if (pUserConfirmData->commandId < 0) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"command id should be positive");
+               return TAPI_API_SAT_INVALID_COMMAND_ID;
+       }
+
+       if (pUserConfirmData->dataLen < 0) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"data length should not be negative [%d]", pUserConfirmData->dataLen);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((pUserConfirmData->keyType < TAPI_SAT_USER_CONFIRM_YES) || (pUserConfirmData->keyType
+                       > TAPI_SAT_USER_CONFIRM_TIMEOUT)) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"invalid key type");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((pUserConfirmData->pAdditionalData == NULL && pUserConfirmData->dataLen != 0)) {
+               TAPI_LIB_DEBUG(LOG_DEBUG,"essential data(pAdditionalData or dataLen) is absent");
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &pUserConfirmData->commandId, sizeof(int));
+       g_array_append_vals(in_param1, &pUserConfirmData->commandType, sizeof(int));
+       g_array_append_vals(in_param1, &pUserConfirmData->keyType, sizeof(int));
+       g_array_append_vals(in_param1, &pUserConfirmData->dataLen, sizeof(int));
+
+       if (pUserConfirmData->pAdditionalData != NULL && pUserConfirmData->dataLen != 0) {
+               memset(&add_data, 0x00, sizeof(TelSatTextInfo_t));
+               memcpy(add_data.string, pUserConfirmData->pAdditionalData, pUserConfirmData->dataLen);
+               add_data.stringLen = pUserConfirmData->dataLen;
+               g_array_append_vals(in_param2, &add_data, sizeof(TelSatTextInfo_t));
+       }
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIMATK, TAPI_CS_UI_USER_CONFIRM, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+       if (TRUE == ret) {
+               ret_val = g_array_index(out_param1, int, 0);
+       }
+       else {
+               ret_val = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       if (ret_val == TAPI_API_SUCCESS) {
+               return TRUE;
+       }
+
+       return FALSE;
+}
diff --git a/src/tapi_proxy_sim.c b/src/tapi_proxy_sim.c
new file mode 100644 (file)
index 0000000..8d26dfa
--- /dev/null
@@ -0,0 +1,2141 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <string.h>
+
+#include <vconf.h>
+
+#include "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "TelDefines.h"
+#include "TelUtility.h"
+#include "TelSim.h"
+#include "TapiUtility.h"
+
+extern tapi_dbus_connection_name conn_name;
+
+static int _tel_check_tapi_state()
+{
+       int vconf_ret = 0;
+       int tapi_state = 0;
+
+       vconf_ret = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, (int*) &tapi_state);
+
+       if (vconf_ret != 0 || tapi_state !=1) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT,"FAIL TO GET VCONFKEY_TELEPHONY_TAPI_STATE or SERVICE NOT READY");
+               return TAPI_API_SERVICE_NOT_READY;
+       }
+       return 0;
+}
+
+EXPORT_API int tel_get_sim_init_info(TelSimCardStatus_t *sim_status, int *card_changed)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int vconf_ret = 0;
+       TelSimCardStatus_t CardStatus = 0;
+
+       TAPI_RETURN_VAL_IF_FAIL(sim_status, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       /* for reducing dbus connection request on boot time - start */
+       vconf_ret = vconf_get_int(VCONFKEY_TELEPHONY_SIM_CHV, (int*) &CardStatus);
+
+       if (vconf_ret != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ALERT,"FAIL TO GET VCONFKEY_TELEPHONY_SIM_CHV ");
+               return TAPI_API_SERVICE_NOT_READY;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT,"VCONFKEY_TELEPHONY_SIM_CHV api ret[%d], return value[%d] ",vconf_ret,CardStatus);
+
+       if (CardStatus != TAPI_SIM_STATUS_SIM_INIT_COMPLETED) {
+               *sim_status = CardStatus;
+
+               if (card_changed != NULL)
+                       *card_changed = 0;
+
+               return api_err;
+       }
+       /* for reducing dbus connection request on boot time - end */
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETSIMINITINFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *sim_status = g_array_index(out_param2, TelSimCardStatus_t ,0);
+
+               if (card_changed != NULL)
+                       *card_changed = g_array_index(out_param3, int ,0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_verifiy_sim_pins(const TelSimSecPw_t *pin_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pin_data , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pin_data->pw , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Type [%d]", pin_data->type);
+
+       if (pin_data->type != TAPI_SIM_PTYPE_PIN1 && pin_data->type != TAPI_SIM_PTYPE_PIN2 && pin_data->type
+                       != TAPI_SIM_PTYPE_SIM) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Code [%s]", pin_data->pw);
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Code length[%d]", pin_data->pw_len);
+
+       if (((pin_data->type == TAPI_SIM_PTYPE_PIN1) || (pin_data->type == TAPI_SIM_PTYPE_PIN2) || (pin_data->type
+                       == TAPI_SIM_PTYPE_SIM)) && ((pin_data->pw_len < 4) || (pin_data->pw_len > 8))) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pin_data, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param2, pin_data->pw, pin_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_VERIFYSEC, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_verify_sim_puks(const TelSimSecPw_t *puk_data, const TelSimSecPw_t *new_pin_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((puk_data != NULL && new_pin_data != NULL), TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((puk_data->pw != NULL && new_pin_data->pw != NULL), TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Unblock PIN Type [%d]", puk_data->type);
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "New PIN Type [%d]", new_pin_data->type);
+
+       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 && puk_data->type != TAPI_SIM_PTYPE_PUK2) || (new_pin_data->type
+                       != TAPI_SIM_PTYPE_PIN1 && new_pin_data->type != TAPI_SIM_PTYPE_PIN2)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((puk_data->type != TAPI_SIM_PTYPE_PUK1 || new_pin_data->type != TAPI_SIM_PTYPE_PIN1) && (puk_data->type
+                       != TAPI_SIM_PTYPE_PUK2 || new_pin_data->type != TAPI_SIM_PTYPE_PIN2)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       //pin and puk code length validation check
+       if ((puk_data->pw_len < 4) || (puk_data->pw_len > 8) || (new_pin_data->pw_len < 4) || (new_pin_data->pw_len > 8)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Unblock PIN Code [%s]", puk_data->pw);
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "New PIN Code [%s]", new_pin_data->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, puk_data, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param1, new_pin_data, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param2, puk_data->pw, puk_data->pw_len);
+       g_array_append_vals(in_param3, new_pin_data->pw, new_pin_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_VERIFYPUK, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_change_sim_pins(const TelSimSecPw_t *old_pin, const TelSimSecPw_t *new_pin, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((old_pin != NULL && new_pin != NULL) , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL((old_pin->pw != NULL && new_pin->pw != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "old_pin->type[%d], new_pin->type[%d]",old_pin->type, new_pin->type);
+
+       if ((old_pin->type != TAPI_SIM_PTYPE_PIN1) && (old_pin->type != TAPI_SIM_PTYPE_PIN2) && (new_pin->type
+                       != TAPI_SIM_PTYPE_PIN1) && (new_pin->type != TAPI_SIM_PTYPE_PIN2)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (old_pin->type != new_pin->type) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       //Old Pin code length check
+       if ((old_pin->pw_len < 4) || (old_pin->pw_len > 8)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       //New Pin code length check
+       if ((new_pin->pw_len < 4) || (new_pin->pw_len > 8)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Old PIN Code [%s]", old_pin->pw);
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "New PIN Code [%s]", new_pin->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, old_pin, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param1, new_pin, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param2, old_pin->pw, sizeof(unsigned char) * (old_pin->pw_len));
+       g_array_append_vals(in_param3, new_pin->pw, sizeof(unsigned char) * new_pin->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_CHANGEPIN, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_security_status(TelSimPinType_t type, TelSimPinStatus_t *status)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(status, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       if ((type != TAPI_SIM_PTYPE_PIN1) && (type != TAPI_SIM_PTYPE_PIN2) && (type != TAPI_SIM_PTYPE_SIM)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &type, sizeof(TelSimPinType_t));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETSECSTATUS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *status = g_array_index(out_param2,TelSimPinStatus_t ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "api_err[%d],PIN type[%d], Status[%d]",api_err, type,*status);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_disable_sim_security(TelSimSecPw_t *sec_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((sec_data != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(sec_data->pw, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Type [%d]", sec_data->type);
+
+       if ((sec_data->type != TAPI_SIM_PTYPE_PIN1) && (sec_data->type != TAPI_SIM_PTYPE_SIM)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((sec_data->pw_len < 4) || (sec_data->pw_len > 8)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Code [%s]", sec_data->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, sec_data, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param2, sec_data->pw, sec_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_DISABLESEC, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_enable_sim_security(TelSimSecPw_t *sec_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((sec_data != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(sec_data->pw , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Type [%d]", sec_data->type);
+
+       if ((sec_data->type != TAPI_SIM_PTYPE_PIN1) && (sec_data->type != TAPI_SIM_PTYPE_SIM)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((sec_data->pw_len < 4) || (sec_data->pw_len > 8)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Code [%s]", sec_data->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, sec_data, sizeof(TelSimSecPw_t));
+       g_array_append_vals(in_param2, sec_data->pw, sec_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_ENABLESEC, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_personalization_status(TelSimPersType_t type, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       if ((type != TAPI_SIM_PERS_NET) && (type != TAPI_SIM_PERS_NS) && (type != TAPI_SIM_PERS_SP) && (type
+                       != TAPI_SIM_PERS_CP)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &type, sizeof(TelSimPersType_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETPERSSTATUS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_disable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(pers_data, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pers_data->pw, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "PIN Type [%d]", pers_data->type);
+
+       if ((pers_data->type != TAPI_SIM_PERS_NET) && (pers_data->type != TAPI_SIM_PERS_NS) && (pers_data->type
+                       != TAPI_SIM_PERS_SP) && (pers_data->type != TAPI_SIM_PERS_CP)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       //personalization code length check - need to fix
+       if ((pers_data->pw_len < 6)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Personalization Password[%s]", pers_data->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pers_data, sizeof(TelSimPersPw_t));
+       g_array_append_vals(in_param2, pers_data->pw, pers_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_DISABLEPERS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_enable_sim_personalization(TelSimPersPw_t *pers_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(pers_data, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pers_data->pw , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "personalization type[%d]", pers_data->type);
+
+       if ((pers_data->type != TAPI_SIM_PERS_NET) && (pers_data->type != TAPI_SIM_PERS_NS) && (pers_data->type
+                       != TAPI_SIM_PERS_SP) && (pers_data->type != TAPI_SIM_PERS_CP)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       //personalization password length check - need to fix
+       if ((pers_data->pw_len < 6)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "personalization password[%s]", pers_data->pw);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pers_data, sizeof(TelSimPersPw_t));
+       g_array_append_vals(in_param2, pers_data->pw, pers_data->pw_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_ENABLEPERS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_fdn_status(int *fdn_status)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(fdn_status , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETFDNSTATUS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *fdn_status = g_array_index(out_param2,TS_BOOL ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "FDN Status [%d]", *fdn_status);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+       return api_err;
+}
+
+EXPORT_API int tel_disable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((pin2 != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (*pin2_len < 4 || *pin2_len > 8) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "password [%s]", pin2);
+
+       ret = tapi_check_dbus_status();
+
+       if (FALSE == ret) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pin2, *pin2_len);
+       g_array_append_vals(in_param2, pin2_len, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_DISABLEFDN, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_enable_sim_fdn(const unsigned char *pin2, int *pin2_len, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((pin2 != NULL && pin2_len != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (*pin2_len < 4 || *pin2_len > 8) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "password [%s]", pin2);
+
+       ret = tapi_check_dbus_status();
+
+       if (FALSE == ret) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, pin2, *pin2_len);
+       g_array_append_vals(in_param2, pin2_len, sizeof(int));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_ENABLEFDN, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sim_access(const TelSimRSimReq_t *rsim_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(rsim_data , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      input param validation check    */
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, rsim_data, sizeof(TelSimRSimReq_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       if ((rsim_data->rsim_cmd == TAPI_SIM_UPDATE_BINARY) || (rsim_data->rsim_cmd == TAPI_SIM_UPDATE_RECORD)) {
+               g_array_append_vals(in_param2, rsim_data->data, sizeof(char*) * rsim_data->p3);
+       }
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_RSIMACCESS, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sim_apdu(TelSimApdu_t* apdu_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(apdu_data , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      input param validation check    */
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, apdu_data, sizeof(TelSimApdu_t));
+       g_array_append_vals(in_param2, apdu_data->apdu, apdu_data->apdu_len);
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_APDU, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sim_atr(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      input param validation check    */
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_ATR, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+
+EXPORT_API int tel_get_sim_ecc(TelSimEccData_t *ecc_data, int *ecc_count)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((ecc_data != NULL && ecc_count != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETECCINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *ecc_data = g_array_index(out_param2, TelSimEccData_t ,0);
+               *ecc_count = g_array_index(out_param3, int ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "ECC count [%d]", *ecc_count);
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "1st ECC data is  [%s]", ecc_data->EccInfo.szEcc1);
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "1st UECC data is  [%s]", ecc_data->UeccInfo[0].szEcc);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_language(TelSimLanguageInfo_t *sim_language)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(sim_language, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETLANGUAGEINFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *sim_language = g_array_index(out_param2, TelSimLanguageInfo_t ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Language count [%lu]", sim_language->LpCount);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+       return api_err;
+}
+
+EXPORT_API int tel_set_sim_language(TelSimLanguagePreferenceCode_t language, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ( language > TAPI_SIM_LP_JAPANESE )
+               return TAPI_API_INVALID_INPUT;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &language, sizeof(TelSimLanguagePreferenceCode_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SETLANGUAGE, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_type(TelSimCardType_t *card_type)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(card_type, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETCARDTYPE, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *card_type = g_array_index(out_param2,int ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "Card type [%d]", *card_type);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_imsi(TelSimImsiInfo_t *imsi)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(imsi , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETIMSIINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *imsi = g_array_index(out_param2, TelSimImsiInfo_t ,0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "IMSI valid [%d]", imsi->bValid);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_iccid(TelSimIccIdInfo_t *iccid)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(iccid , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETICCIDINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                       *iccid = g_array_index(out_param2, TelSimIccIdInfo_t ,0);
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "ICCID length[%d]", iccid->icc_length);
+               }
+               else
+               {
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "api_err[%d]",api_err);
+               }
+       }
+       else
+       {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_mailbox_info(TelSimMailboxNumbers_s *mbox)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(mbox , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETMBINFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *mbox = g_array_index(out_param2, TelSimMailboxNumbers_s ,0);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "chps?[%d]",mbox->b_cphs);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_callforwarding_info(TelSimCallForwarding_s *cf)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(cf , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETCFINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *cf = g_array_index(out_param2, TelSimCallForwarding_s ,0);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "chps?[%d]",cf->b_cphs);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_messagewaiting_info(TelSimMessageWaiting_s *mw)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(mw , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETMWINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *mw = g_array_index(out_param2, TelSimMessageWaiting_s ,0);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "chps?[%d]",mw->b_cphs);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_cphs_info(TelSimCphsLocalInfo_t *cphs)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(cphs , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETCPHSINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *cphs = g_array_index(out_param2, TelSimCphsLocalInfo_t ,0);
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "chps?[%d]",cphs->b_used);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+
+EXPORT_API int tel_get_sim_msisdn(TelSimSubscriberInfo_t *subscriber)
+{
+       char *t_name, *t_num;
+       int name_len, num_len;
+       TAPI_RETURN_VAL_IF_FAIL(subscriber, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       t_name = vconf_get_str(VCONFKEY_TELEPHONY_SUBSCRIBER_NAME);
+       t_num = vconf_get_str(VCONFKEY_TELEPHONY_SUBSCRIBER_NUMBER);
+
+       if (t_name == NULL || t_num == NULL) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "FAIL TO GET VCONFKEY");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       name_len = strlen(t_name);
+       num_len = strlen(t_num);
+
+       if (name_len > TAPI_SIM_XDN_ALPHA_ID_MAX_LEN) {
+               strncpy(subscriber->name, t_name, TAPI_SIM_XDN_ALPHA_ID_MAX_LEN);
+               subscriber->name[TAPI_SIM_XDN_ALPHA_ID_MAX_LEN] = '\0';
+       } else {
+               strncpy(subscriber->name, t_name, name_len);
+               subscriber->name[name_len] = '\0';
+       }
+
+       if (num_len > TAPI_SIM_XDN_DIALING_NUMBER_LEN) {
+               strncpy(subscriber->num, t_num, TAPI_SIM_XDN_DIALING_NUMBER_LEN);
+               subscriber->num[TAPI_SIM_XDN_DIALING_NUMBER_LEN] = '\0';
+       } else {
+               strncpy(subscriber->num, t_num, num_len);
+               subscriber->num[num_len] = '\0';
+       }
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "MSISDN name[%s]num[%s]",subscriber->name,subscriber->num);
+
+       return TAPI_API_SUCCESS;
+}
+
+EXPORT_API int tel_get_sim_pb_init_info(int *init_completed, TelSimPbList_t *pb_list, int *first_index)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int vconf_ret = 0;
+       int vconf_val = 0;
+
+       TAPI_RETURN_VAL_IF_FAIL((init_completed != NULL && pb_list != NULL && first_index != NULL), TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       vconf_ret = vconf_get_int(VCONFKEY_TELEPHONY_SIM_PB_INIT, &vconf_val);
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT,"VCONFKEY_TELEPHONY_SIM_PB_INIT api ret[%d], return value[%d] ",vconf_ret,vconf_val);
+
+       if (vconf_val != 1) {
+               *init_completed = 0;
+               memset(pb_list, 0x00, sizeof(TelSimPbList_t));
+               *first_index = 0x00;
+               return api_err;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETPBINITINFO, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *init_completed = g_array_index(out_param2, int, 0);
+               *pb_list = g_array_index(out_param3, TelSimPbList_t, 0);
+               *first_index = g_array_index(out_param4, int, 0);
+
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "PB INIT Completed[%d]", *init_completed);
+               TAPI_LIB_DEBUG(LEVEL_ALERT, "First Valid Index [%d]", *first_index);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+       return api_err;
+
+}
+
+EXPORT_API int tel_get_sim_pb_count(TelSimPbFileType_t pb_type, int* req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Storage type [%d]", pb_type);
+
+       if ((pb_type != TAPI_SIM_PB_EN) && (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_LDN) && (pb_type
+                       != TAPI_SIM_PB_MSISDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN) && (pb_type
+                       != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &pb_type, sizeof(TelSimPbFileType_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_PB_GETCOUNT, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_pb_meta_info(TelSimPbFileType_t pb_type, int* req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Storage type [%d]", pb_type);
+
+       if ((pb_type != TAPI_SIM_PB_EN) && (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_LDN) && (pb_type
+                       != TAPI_SIM_PB_MSISDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN) && (pb_type
+                       != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &pb_type, sizeof(TelSimPbFileType_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_PB_GETMETAINFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_get_sim_pb_3g_meta_info(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_GETPBCAPABILITYINFO, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_read_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Storage type [%d]", pb_type);
+       TAPI_LIB_DEBUG(LEVEL_ALERT, "Record Index [%d]", index);
+
+       if (index == 0) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((pb_type != TAPI_SIM_PB_EN) && (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_LDN) && (pb_type
+                       != TAPI_SIM_PB_MSISDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN) && (pb_type
+                       != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS)) {
+
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &pb_type, sizeof(TelSimPbFileType_t));
+       g_array_append_vals(in_param2, &index, sizeof(unsigned short));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_PB_READRECORD, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_update_sim_pb_record(const TelSimPbRecordData_t *req_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((req_data != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Storage type [%d]", req_data->StorageFileType);
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Record Index [%d]", req_data->Index);
+
+       if (req_data->Index == 0) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((req_data->StorageFileType != TAPI_SIM_PB_EN) && (req_data->StorageFileType != TAPI_SIM_PB_FDN)
+                       && (req_data->StorageFileType != TAPI_SIM_PB_LDN) && (req_data->StorageFileType != TAPI_SIM_PB_MSISDN)
+                       && (req_data->StorageFileType != TAPI_SIM_PB_ADN) && (req_data->StorageFileType != TAPI_SIM_PB_SDN)
+                       && (req_data->StorageFileType != TAPI_SIM_PB_3GSIM) && (req_data->StorageFileType != TAPI_SIM_PB_AAS)
+                       && (req_data->StorageFileType != TAPI_SIM_PB_GAS)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, req_data, sizeof(TelSimPbRecordData_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_PB_UPDATERECORD, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_delete_sim_pb_record(TelSimPbFileType_t pb_type, unsigned short index, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       *req_id = INVALID_REQUEST_ID;
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "pb_type [%d]", pb_type);
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Record Index [%d]", index);
+
+       if ((pb_type != TAPI_SIM_PB_EN) && (pb_type != TAPI_SIM_PB_FDN) && (pb_type != TAPI_SIM_PB_LDN) && (pb_type
+                       != TAPI_SIM_PB_MSISDN) && (pb_type != TAPI_SIM_PB_ADN) && (pb_type != TAPI_SIM_PB_SDN) && (pb_type
+                       != TAPI_SIM_PB_3GSIM) && (pb_type != TAPI_SIM_PB_AAS) && (pb_type != TAPI_SIM_PB_GAS)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (index == 0) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &pb_type, sizeof(TelSimPbFileType_t));
+       g_array_append_vals(in_param2, &index, sizeof(unsigned short));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_PB_DELETERECORD, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_connection(TelSimSapConnect_t *req_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((req_data != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Msg Id [%d]", req_data->MsgId);
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Msg Max Size [%d]", req_data->MaxMsgSize);
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Msg Connection status [%d]", req_data->ConnectionStatus);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, req_data, sizeof(TelSimSapConnect_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPCONNECTREQUEST, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_connection_status(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPCONNECTSTATUS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_transfer_atr(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPATRREQUEST, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_transfer_apdu(TelSimSapApduData_t *apdu_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL((apdu_data != NULL && req_id != NULL) , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "APDU length [%d]", apdu_data->ApduLength);
+       TAPI_LIB_DEBUG(LEVEL_INFO, "APDU data [%s]", apdu_data->Apdu);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, apdu_data, sizeof(TelSimSapApduData_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPTRANSFERAPDU, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_transport_protocol(TelSimSapProtocol_t protocol, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "SAP Protocol [%d]", protocol);
+
+       if ((TAPI_SIM_SAP_PROTOCOL_T0 != protocol) && (TAPI_SIM_SAP_PROTOCOL_T1 != protocol)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &protocol, sizeof(TelSimSapProtocol_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPSETPROTOCOL, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_power_operation(TelSimSapMsgId_t req_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "SAP Power Msg Id [%d]", req_data);
+
+       if ((req_data < TAPI_SIM_SAP_CONNECT_REQ) || (req_data > TAPI_SIM_SAP_SET_TRANSPORT_PROTOCOL_RESP)) {
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &req_data, sizeof(TelSimSapMsgId_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPSETSIMPOWER, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sap_cardreader_status(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_SAPCARDREADERSTATUS, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+EXPORT_API int tel_req_sim_isim_authentication(TelSimIsimAuthenticationData_t *authentication_data, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_RETURN_VAL_IF_FAIL(req_id , TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(authentication_data , TAPI_API_INVALID_PTR);
+
+       if(_tel_check_tapi_state() != 0 )
+               return TAPI_API_SERVICE_NOT_READY;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, " AuthDataLength [%d]", authentication_data->AuthDataLength);
+       TAPI_LIB_DEBUG(LEVEL_INFO, " AuthData [%s]", authentication_data->AuthData);
+       TAPI_LIB_DEBUG(LEVEL_INFO, " RandomAccessLength [%d]", authentication_data->RandomAccessLength);
+       TAPI_LIB_DEBUG(LEVEL_INFO, " RandomAccessData [%s]", authentication_data->RandomAccessData);
+
+       if (FALSE == tapi_check_dbus_status()) {
+               return TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, authentication_data, sizeof(TelSimIsimAuthenticationData_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SIM, TAPI_CS_SIM_ISIMAUTHENTICATION, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int ,0);
+               *req_id = g_array_index(out_param2, int ,0);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       *req_id = INVALID_REQUEST_ID;
+               }
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
diff --git a/src/tapi_proxy_sound.c b/src/tapi_proxy_sound.c
new file mode 100644 (file)
index 0000000..cb7ed7f
--- /dev/null
@@ -0,0 +1,485 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "ITapiSound.h"
+#include "TapiUtility.h"
+#include "TelErr.h"
+#include "TelUtility.h"
+
+extern tapi_dbus_connection_name conn_name;
+
+/**
+ *
+ * send to Telephony Server to get the volume status of the phone
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          tapi_sound_volume_type_t
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_sound_volume_control_set
+ *
+ */
+EXPORT_API int tel_get_sound_volume_info(tapi_sound_volume_type_t vol_control_type, int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if ((vol_control_type != TAPI_SOUND_VOL_VOICE)
+                       && (vol_control_type != TAPI_SOUND_VOL_KEYTONE)
+                       && (vol_control_type != TAPI_SOUND_VOL_BELL)
+                       && (vol_control_type != TAPI_SOUND_VOL_MESSAGE)
+                       && (vol_control_type != TAPI_SOUND_VOL_ALARM)
+                       && (vol_control_type != TAPI_SOUND_VOL_SPK_PHONE)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_VOICE)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_KEYTONE)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_BELL)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_MESSAGE)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_ALARM)
+                       && (vol_control_type != TAPI_SOUND_VOL_HFK_PDA_MISC)
+                       && (vol_control_type != TAPI_SOUND_VOL_HEADSET_VOICE)
+                       && (vol_control_type != TAPI_SOUND_VOL_BT_VOICE)
+                       && (vol_control_type != TAPI_SOUND_VOL_TYPE_ALL)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid Input for vol_control_type = %x", vol_control_type);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &vol_control_type, sizeof(tapi_sound_volume_type_t));
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_VOLUME_GET, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * send to Telephony Server to control the phone voulume
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          tapi_sound_volume_control_t
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_sound_volume_control_get
+ *
+ */
+EXPORT_API int tel_set_sound_volume_info(tapi_sound_volume_control_t vol_control, int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if ((vol_control.volume > TAPI_SOUND_VOLUME_LEVEL_9) || (vol_control.volume < TAPI_SOUND_MUTE)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid Input for vol_control.volume = %x", vol_control.volume);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if ((vol_control.vol_type != TAPI_SOUND_VOL_VOICE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_KEYTONE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_BELL)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_MESSAGE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_ALARM)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_SPK_PHONE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_VOICE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_KEYTONE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_KEYTONE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_MESSAGE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_ALARM)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HFK_PDA_MISC)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_HEADSET_VOICE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_BT_VOICE)
+                       && (vol_control.vol_type != TAPI_SOUND_VOL_TYPE_ALL)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid Input for vol_control.vol_type = %x", vol_control.vol_type);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &vol_control, sizeof(tapi_sound_volume_control_t));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_VOLUME_SET, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * Send to Telephony Server to set voice path
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          tapi_sound_audio_path_t
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ *
+ **/
+EXPORT_API int tel_set_sound_path(tapi_sound_audio_path_t vc_path, int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if ((vc_path > TAPI_SOUND_HEADSET_HAC) || (vc_path < TAPI_SOUND_HANDSET)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid Input for vc_path = %x", vc_path);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &vc_path, sizeof(tapi_sound_audio_path_t));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_AUDIO_PATH_CTRL, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * Send to Telehpny Server to control  the microphone as mute during the call.
+ *
+ * @param      tapi_sound_mic_mute_t
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @return     enum type TapiResult_t
+ * @remark
+ *
+ * @Refer              tapi_sound_micmute_control_get
+ */
+EXPORT_API int tel_set_sound_mute_status(tapi_sound_mic_mute_t micmute_set, int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance... mic mute [%s] ", micmute_set? "MUTE" : "UNMUTE");
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if ((micmute_set > TAPI_SOUND_MIC_MUTE) || (micmute_set < TAPI_SOUND_MIC_UNMUTE)) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Invalid Input for micmute_get = %x", micmute_set);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(),
+                       TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param1, &micmute_set, sizeof(tapi_sound_mic_mute_t));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_MIC_MUTE_SET, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ", api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * send to Telephony Server to get the status whether mic mute or not
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          None
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_sound_micgain_control_set
+ *
+ */
+EXPORT_API int tel_get_sound_mute_status(int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance ");
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+
+       /*       check for the RPC link....     */
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_MIC_MUTE_GET, in_param1, in_param2, in_param3,
+                       in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return api_err;
+}
+
+
+/**
+ * Process the starting Audio Loopback test.
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_sound_loopback(TelAudioLoopbackMode_t *Mode, int *pRequestId)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if (Mode->path > TAPI_SOUND_HEADSET_3_5PI || Mode->path < TAPI_SOUND_HANDSET) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Invalid Input for path = %x", Mode->path);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       if (Mode->status > TAPI_SOUND_AUDIO_LOOPBACK_PACKET_ON || Mode->status < TAPI_SOUND_AUDIO_LOOPBACK_OFF) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Invalid Input for status = %x", Mode->status);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, Mode, sizeof(TelAudioLoopbackMode_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_AUDIOLOOPBACK_SET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ * Process the control of audio clock
+ *
+ * @return             TapiResult_t            API result code. Either Success or some Error Code.
+ * @param[in]
+ * @param[out]
+ * @Changes
+ */
+EXPORT_API int tel_set_sound_clock(int bEnable, int *pRequestId)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance ");
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if (bEnable > TRUE || bEnable < FALSE) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Invalid Input for bEnable = %x", bEnable);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &bEnable, sizeof(int));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_AUDIO_CLOCK_CTRL,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (TRUE == ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ",api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+/**
+ *
+ * send to Telephony Server to control the voice call recording
+ *
+ * @return             TAPI_API_SUCCESS on success and one of the enum types of  TapiResult_t on failure
+ * @param[in]          None
+ * @param[out] None
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer              tapi_sound_micgain_control_set
+ *
+ */
+EXPORT_API int tel_control_sound_voice_recording(tapi_sound_voice_recording_status_t voice_record, int *pRequestId)
+{
+       TS_BOOL ret;
+       int api_err;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "Func Entrance... voice_record [%d] ", voice_record);
+
+       TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status_internal(), TAPI_API_SYSTEM_RPC_LINK_NOT_EST);
+       TAPI_RETURN_VAL_IF_FAIL(pRequestId, TAPI_API_INVALID_PTR);
+
+       if (voice_record < TAPI_SOUND_VOICE_RECORDING_OFF || voice_record > TAPI_SOUND_VOICE_RECORDING_ON) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "Invalid Input for voice recoring = %x", voice_record);
+               return TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_GLIB_INIT_PARAMS();
+       TAPI_GLIB_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       g_array_append_vals(in_param1, &voice_record, sizeof(tapi_sound_voice_recording_status_t));
+
+       ret = tapi_send_request_internal(TAPI_CS_SERVICE_SOUND, TAPI_CS_SOUND_VOICE_RECORDING_SET,
+                       in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               api_err = g_array_index(out_param1, int, 0);
+               *pRequestId = g_array_index(out_param2, int, 0);
+       }
+       else {
+               api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"proxy error = %x ", api_err);
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param1, out_param2, out_param3, out_param4);
+
+       return api_err;
+}
+
+// eof
diff --git a/src/tapi_proxy_ss.c b/src/tapi_proxy_ss.c
new file mode 100644 (file)
index 0000000..3ec1e70
--- /dev/null
@@ -0,0 +1,926 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdio.h>
+#include <string.h>
+
+#include "tel_cs_conn.h"
+#include "tapi_proxy.h"
+#include "TapiUtility.h"
+#include "TelDefines.h"
+#include "TelSs.h"
+
+#include <vconf.h>
+
+extern tapi_dbus_connection_name conn_name;
+
+/**********************************************************************************************
+ *
+ * This function is used to Activate or Deactivate the call barring feature.
+ *
+ * @param      barringInfo[IN] of type TelSsCallBarringInfo_t Specifies the Teleservice and barring flavour and CB password.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark     Call barring password must be known to activate or to deactivate.
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_barring(const TelSsCallBarringInfo_t *barringInfo, int *req_id)
+{
+
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(barringInfo, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for tele service type and call barring flavour        */
+       if (((barringInfo->CallType >= TAPI_CALL_TYPE_VOICE_EV) && (barringInfo->CallType <= TAPI_CALL_TYPE_ALL_TELE))
+                       && ((barringInfo->Type >= TAPI_CALL_BARRING_ALL) && (barringInfo->Type <= TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM))
+                       && ((barringInfo->Mode >= TAPI_SS_CALL_BAR_ACTIVATE) && (barringInfo->Mode <= TAPI_SS_CALL_BAR_DEACTIVATE))
+                       && (strnlen(barringInfo->szPassword, 4) == TAPI_SS_GSM_BARR_PW_LEN_MAX)) {
+               /*       Check for the RPC link.        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, barringInfo, sizeof(TelSsCallBarringInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_BARRSETREQ, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Activate or Deactivate the call barring feature.
+ *
+ * @param      barType[IN] of type TelSsCallBarType_t Specifies the  barring flavour.
+ * @param      callType[IN] of type TelSsCallType_t Specifies the teleservice type.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_barring_status(TelSsCallBarType_t barType, TelSsCallType_t callType, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for tele service type and call barring flavour        */
+       if (((barType >= TAPI_CALL_BARRING_ALL) && (barType <= TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM))
+                       && ((callType >= TAPI_CALL_TYPE_VOICE_EV) && (callType <= TAPI_CALL_TYPE_ALL_TELE))) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &barType, sizeof(TelSsCallBarType_t));
+               g_array_append_vals(in_param2, &callType, sizeof(TelSsCallType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_BARRQUERYSTATUSREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               /*      Invalid input range given by the APP.   */
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to change call barring password.
+ *
+ * @param      pOldPassword[IN] of type char* Specifies the Old Call Barring Password.
+ * @param      pNewPassword[IN] of type char* Specifies the New Call Barring Password.
+ * @param      pNewPasswordAgain[IN] of type char* Specifies the New Call Barring Password for Confirm.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_change_ss_barring_password(
+               const char *pOldPassword,
+               const char *pNewPassword,
+               const char *pNewPasswordAgain,
+               int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(pOldPassword, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pNewPassword, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(pNewPasswordAgain, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       // check should be done at APP
+       if ((strlen(pOldPassword) == TAPI_SS_GSM_BARR_PW_LEN_MAX) && (strlen(pNewPassword) == TAPI_SS_GSM_BARR_PW_LEN_MAX)) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, pOldPassword, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+               g_array_append_vals(in_param2, pNewPassword, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+               g_array_append_vals(in_param3, pNewPasswordAgain, TAPI_SS_GSM_BARR_PW_LEN_MAX);
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_BARRCHANGEPWDREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               /*      Invalid input range given by the APP.   */
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input  - Password length error");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Activate or Deactivate the call forwarding feature.
+ *
+ * @param      forwardInfo[IN] of type TelSsForwardInfo_t which specifies the Teleservice and CF flavour, Forwarded to number.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_forward(const TelSsForwardInfo_t *forwardInfo, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(forwardInfo, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szPhoneNumber is [%s]", forwardInfo->szPhoneNumber);
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "szPhoneNumber Length is [%d]", strlen(forwardInfo->szPhoneNumber));
+
+       /*      Check input range for tele service type and call forwarding flavour     */
+       if (((forwardInfo->Condition >= TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV) && (forwardInfo->Condition <= TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV))
+                       && ((forwardInfo->Mode >= TAPI_CALL_FORWARD_MODE_DISABLE_EV) && (forwardInfo->Mode <= TAPI_CALL_FORWARD_MODE_ERASURE_EV))
+                       && ((forwardInfo->Type >= TAPI_CS_FORWARD_TYPE_VOICE_EV) && (forwardInfo->Type <= TAPI_CS_FORWARD_TYPE_ALL_TELE))
+                       && (strnlen(forwardInfo->szPhoneNumber, (TAPI_CALL_DIALDIGIT_LEN_MAX)) < (TAPI_CALL_DIALDIGIT_LEN_MAX))) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, forwardInfo, sizeof(TelSsForwardInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_FWDSETREQ, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of call forwarding feature.
+ *
+ * @param      forwardType[IN] of type TelSsForwardType_t which specifies the telecommunication service.
+ * @param      condition[IN]   is of type TelSsForwardWhen_t specified the CF flavour
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_forward_status(TelSsForwardType_t forwardType, TelSsForwardWhen_t condition, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for tele service type and call forwarding flavour     */
+       if (((condition >= TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV)
+                       && (condition <= TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV))
+                       && ((forwardType >= TAPI_CS_FORWARD_TYPE_VOICE_EV) && (forwardType <= TAPI_CS_FORWARD_TYPE_ALL_TELE))) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &forwardType, sizeof(TelSsForwardType_t));
+               g_array_append_vals(in_param2, &condition, sizeof(TelSsForwardWhen_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_FWDQUERYSTATUSREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Activate or dectivate call waiting feature.
+ *
+ * @param      waitInfo[IN] of type TelSsWaitingInfo_t which specifies the telecommunication service and mode.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_waiting(const TelSsWaitingInfo_t *waitInfo, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(waitInfo, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       /*      Check input range for tele service type and call forwarding flavour     */
+       if (((waitInfo->Mode >= TAPI_SS_CW_ACTIVATE)
+                       && (waitInfo->Mode <= TAPI_SS_CW_DEACTIVATE))
+                       && ((waitInfo->CallType >= TAPI_CALL_TYPE_VOICE_EV) && (waitInfo->CallType <= TAPI_CALL_TYPE_ALL_TELE))) {
+
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, waitInfo, sizeof(TelSsWaitingInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_WAITSETREQ, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of call waiting feature.
+ *
+ * @param      CallType[IN] of type TelSsCallType_t which specifies the telecommunication service .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+
+EXPORT_API int tel_get_ss_waiting_status(const TelSsCallType_t CallType, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for tele service type */
+       if ((CallType >= TAPI_CALL_TYPE_VOICE_EV) && (CallType <= TAPI_CALL_TYPE_ALL_TELE)) {
+
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &CallType, sizeof(TelSsCallType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_WAITQUERYSTATUSREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               returnStatus = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", returnStatus);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to interrogate the status of CLI services feature.
+ *
+ * @param      CliType[IN] of type TelSsCliType_t which specifies the CLI service .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_cli_status(TelSsCliType_t CliType, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for CLI service type  */
+       if ((CliType >= TAPI_SS_CLI_CLIP) && (CliType <= TAPI_SS_CLI_CNAP)) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &CliType, sizeof(TelSsCliType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_CLIQUERYSTATUSREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input ");
+               api_err = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+EXPORT_API int tel_send_ss_ussd_request(const TelSsUssdMsgInfo_t *ussd_info, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+       int emergency_mode = 0;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (vconf_get_int("db/telephony/emergency", &emergency_mode) != 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "[FAIL]GET db/telephony/emergency");
+               return TAPI_API_OPERATION_FAILED;
+       }
+       if (emergency_mode) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "emergency mode on");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(ussd_info, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if (((ussd_info->UssdStringLength > 0) && (ussd_info->UssdStringLength < TAPI_SS_USSD_DATA_SIZE_MAX))) {
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"--- USSD STR(%s),length = %d", ussd_info->szUssdString,ussd_info->UssdStringLength);
+
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, ussd_info, sizeof(TelSsUssdMsgInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_USSDSENDSTRINGREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input -USSD  length Error ");
+               api_err = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to send a USSD Rsp.
+ *
+ * @param      ussdRspRecord, req_id
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_send_ss_ussd_response(const TelSsUssdMsgInfo_t *ussd_rsp, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(ussd_rsp, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       if (((ussd_rsp->UssdStringLength > 0) && (ussd_rsp->UssdStringLength < TAPI_SS_USSD_DATA_SIZE_MAX))) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, ussd_rsp, sizeof(TelSsUssdMsgInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG, "SS Service Request:(Send USSD string req)");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_USSDRSP, in_param1, in_param2, in_param3, in_param4,
+                               &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       returnStatus = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               returnStatus = TAPI_API_INVALID_INPUT;
+               TAPI_LIB_DEBUG(LEVEL_ERR,"INVALID INPUT TYPE  \n");
+               TAPI_LIB_DEBUG(LEVEL_ERR, "##### Invalid Response Type ......");
+       }
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to send a USSD cancel to release ussd session.
+ *
+ * @param      req_id
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_send_ss_ussd_cancel(int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int returnStatus = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /* Check the input ptr. If NULL then return FALSE */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /* Check if D-Bus service is available. If Failed then return FALSE */
+       TAPI_RETURN_VAL_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+       TAPI_GLIB_INIT_PARAMS();
+
+       TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG, "SS Service Request:(Send USSD cancel)");
+       g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+       ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_USSDCANCEL, in_param1, in_param2, in_param3, in_param4,
+                       &out_param1, &out_param2, &out_param3, &out_param4);
+
+       if (ret) {
+               returnStatus = g_array_index(out_param1, int, 0);
+               *req_id = g_array_index(out_param2, int ,0);
+       }
+       else {
+               returnStatus = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+       }
+
+       TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                       out_param1,out_param2,out_param3,out_param4);
+
+       return returnStatus;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Sets AOC information.
+ *
+ * @param      AocType[IN] of type TelSsAocType_t which specifies the which AOC type to read.
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_get_ss_aoc_info(TelSsAocType_t AocType, int *req_id)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(req_id, TAPI_API_INVALID_PTR);
+
+       /*      Check input range for Aoc type  */
+       if ((AocType == TAPI_SS_AOC_TYPE_ACM)
+                       || (AocType == TAPI_SS_AOC_TYPE_PUC)
+                       || (AocType == TAPI_SS_AOC_TYPE_MAXACM)
+                       || (AocType == TAPI_SS_AOC_TYPE_CCM)) {
+               /*      Check if D-Bus service is available. If Failed then return FALSE        */
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, &AocType, sizeof(TelSsAocType_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_GETCALLCOSTREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+                       *req_id = g_array_index(out_param2, int ,0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input - Invalid AOC type");
+               api_err = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/**********************************************************************************************
+ *
+ * This function is used to Sets AOC information.
+ *
+ * @param      AocSetInfo[IN] of type TelCallAocInfo_t which specifies the AOC info parameters .
+ * @return     enum type TapiResult_t Specifies the API's Return result.
+ * @remark
+ *
+ ***********************************************************************************************/
+EXPORT_API int tel_set_ss_aoc_info(TelCallAocInfo_t *AocSetInfo, int *RequestId)
+{
+       TS_BOOL ret = FALSE;
+       int api_err = TAPI_API_SUCCESS;
+
+       TAPI_LIB_DEBUG(LEVEL_DEBUG,"Func Entrance");
+
+       if (conn_name.length_of_name == 0) {
+               TAPI_LIB_DEBUG(LEVEL_ERR, "No dbus connection name");
+               return TAPI_API_OPERATION_FAILED;
+       }
+
+       /*      Check the input ptr. If NULL then return FALSE  */
+       TAPI_RETURN_VAL_IF_FAIL(AocSetInfo, TAPI_API_INVALID_PTR);
+       TAPI_RETURN_VAL_IF_FAIL(RequestId , TAPI_API_INVALID_PTR);
+
+       if ((AocSetInfo->PPM) < ((float) (TAPI_MAX_ULONG / 1000))) {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Valid ... Input PPM smaller than MAX");
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"INVALID.... INPUT greater than MAX");
+       }
+
+       /*      Check input range for Aoc type  */
+       if ((AocSetInfo->PPM < (float) (TAPI_MAX_ULONG / 1000))
+                       && ((AocSetInfo->AocType == TAPI_SS_AOC_TYPE_RESET)
+                               || (AocSetInfo->AocType == TAPI_SS_AOC_TYPE_PUC)
+                               || (AocSetInfo->AocType == TAPI_SS_AOC_TYPE_MAXACM) )) {
+               TAPI_RET_ERR_NUM_IF_FAIL(tapi_check_dbus_status(), TAPI_API_SYSTEM_RPC_LINK_DOWN);
+               TAPI_GLIB_INIT_PARAMS();
+
+               TAPI_GLIB_ALLOC_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+
+               g_array_append_vals(in_param1, AocSetInfo, sizeof(TelCallAocInfo_t));
+               g_array_append_vals(in_param4, &conn_name, sizeof(tapi_dbus_connection_name));
+
+               TAPI_LIB_DEBUG(LEVEL_DEBUG,"Calling Call Back func ");
+
+               ret = tapi_send_request(TAPI_CS_SERVICE_SS, TAPI_CS_SS_SETCALLCOSTREQ, in_param1, in_param2, in_param3,
+                               in_param4, &out_param1, &out_param2, &out_param3, &out_param4);
+
+               if (TRUE == ret) {
+                       /*      Get the API error value as out param 1, from the server.        */
+                       api_err = g_array_index(out_param1, int, 0);
+
+                       /*      Get the Request ID as out param 2, from the server.    */
+                       *RequestId = g_array_index(out_param2, int, 0);
+               }
+               else {
+                       /*      RPC API failed, return err to APP       */
+                       TAPI_LIB_DEBUG(LEVEL_ALERT, "RPC Link is down");
+                       api_err = TAPI_API_SYSTEM_RPC_LINK_DOWN;
+               }
+
+               TAPI_GLIB_FREE_PARAMS(in_param1,in_param2,in_param3,in_param4,
+                               out_param1,out_param2,out_param3,out_param4);
+       }
+       else {
+               TAPI_LIB_DEBUG(LEVEL_ERR,"Received Invalid Input -Invalid AOC type ");
+               api_err = TAPI_API_INVALID_INPUT;
+       }
+
+       TAPI_LIB_DEBUG(LEVEL_INFO, "Returning TapiResult_t [%+d]", api_err);
+
+       return api_err;
+}
+
+/*     EOF  */
diff --git a/src/test_apps/Makefile b/src/test_apps/Makefile
new file mode 100644 (file)
index 0000000..6c0cd14
--- /dev/null
@@ -0,0 +1,37 @@
+export PKG_CONFIG_PATH=/usr/lib/pkgconfig\r
+\r
+TARGET := TAPITest\r
+\r
+SRCS   := \\r
+       tapi_call_test.c \\r
+       tapi_test_app.c \\r
+       tapi_nw_test.c \\r
+       tapi_power_test.c \\r
+       tapi_gps_test.c \\r
+       tapi_misc_test.c \\r
+       tapi_ps_test.c \\r
+       tapi_svc_test.c \\r
+       tapi_sms_util.c \\r
+       tapi_sim_test.c \\r
+       tapi_sms_test.c \\r
+       tapi_cdma_data_test.c \\r
+       tapi_cfg_test.c \\r
+       tapi_sound_test.c\r
+\r
+OBJS   := $(SRCS:.c=.o)\r
+CC             := gcc\r
+PKGS   := glib-2.0 dbus-1 dbus-glib-1 tapi dlog\r
+CFLAGS := -Wall -g `pkg-config --cflags $(PKGS)`\r
+LIBS   := `pkg-config --libs $(PKGS)`\r
+\r
+\r
+all: $(TARGET)\r
+\r
+$(TARGET): $(OBJS)\r
+       $(CC) $(OBJS) $(LIBS) -o $(TARGET)\r
+\r
+.c.o: $(SRCS)\r
+       $(CC) $(CFLAGS) -c $^ -o $@\r
+\r
+clean:\r
+       rm -f $(OBJS) $(TARGET)\r
diff --git a/src/test_apps/tapi_call_test.c b/src/test_apps/tapi_call_test.c
new file mode 100644 (file)
index 0000000..a44b7e7
--- /dev/null
@@ -0,0 +1,2202 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include "assert.h"
+#include "glib.h"
+#include "unistd.h"
+
+#include "TelErr.h"
+#include "ITapiPower.h"
+#include "ITapiCall.h"
+#include "TapiCommon.h"
+#include "TelCall.h"
+#include "vconf.h"
+
+#ifndef false
+       #define false 0
+#endif
+#ifndef true
+       #define true  !0
+#endif
+#ifndef bool
+       #define bool  char
+#endif
+
+#define _CALL_TEST_KOREA_FMT_          4
+#define _CALL_TEST_INDIA_FMT_          10
+
+#define TEST_DEBUG(frmt, args...)      \
+       {do { fprintf(stderr, "[Call Test][%s:%04d] " frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+#define AUTO_LOG(frmt, args...)
+
+
+#define MAX_BURST_DTMF_STRLEN          32
+
+extern int EvtDeliveryHandle ;
+
+
+typedef struct
+{
+       TS_UINT handle;
+       TelTapiCallInfo_t       info;
+       TS_BOOL                 used;
+       int                             index;
+} call_ctxt_t;
+
+// same as tapi event
+typedef struct
+{
+       int group;
+       int type;
+       int ID;
+       int status;
+       void *dst;
+}data_t;
+
+int error_code;
+static TelCallActiveLine_t             _glob_test_curr_line = 0x00;
+//static TS_UINT               endHCall = -1;
+static long    __call_test_auto_mo = 0;
+static long    __call_test_auto_ans = 0;
+static long     _timer_exp_count = 0;
+
+call_ctxt_t            ctxt[TAPI_CONTEXT_CALL_SIZE_MAX];
+TelCallStatus_t        gcallStatus[TAPI_CONTEXT_CALL_SIZE_MAX];
+TS_UINT        incoming_handle= -1;
+TS_UINT        curr_handle= -1;
+int requestID;
+
+FILE *log_fd;
+
+TelCallSetupParams_t _glob_setup_info;
+
+struct sigaction sa;
+struct itimerval timer;
+
+/*     Success returns 0       */
+extern pthread_t         __glob_tapi_keypad_thread;
+
+//static int  _country_spc_num_ = 0;
+char pre_string[16] = {0, };
+int _auto_dtmf_send_count = 0;
+int _auto_dtmf_cnf_count = 0;
+
+static unsigned int *  CALL_subscription_id;
+
+void __PrintCallType(char* str, TelCallType_t eCallType)
+{
+       switch(eCallType)
+       {
+               case TAPI_CALL_TYPE_VOICE:
+                       fprintf(stderr, "%s [TAPI_CALL_TYPE_VOICE]", str);
+                       break;
+               case TAPI_CALL_TYPE_DATA:
+                       fprintf(stderr, "%s [TAPI_CALL_TYPE_DATA]", str);
+                       break;
+               case TAPI_CALL_TYPE_E911:
+                       fprintf(stderr, "%s [TAPI_CALL_TYPE_E911]", str);
+                       break;
+               default:
+                       fprintf(stderr, "%s Undefined Call Type:[0x%x]", str, eCallType);
+                       break;
+       }
+}
+
+void __PrintActiveCallState(char* str, TelCallActiveState_t eCallActiveState)
+{
+       switch(eCallActiveState)
+       {
+               case TAPI_CALL_CONNECT_IDLE:
+                       fprintf(stderr, "%s [TAPI_CALL_CONNECT_IDLE]", str);
+                       break;
+               case TAPI_CALL_CONNECT_ACTIVE:
+                       fprintf(stderr, "%s [TAPI_CALL_CONNECT_ACTIVE]", str);
+                       break;
+               case TAPI_CALL_CONNECT_HELD:
+                       fprintf(stderr, "%s [TAPI_CALL_CONNECT_HELD]", str);
+                       break;
+               default:
+                       fprintf(stderr, "%s Undefined Call Active State", str);
+                       break;
+       }
+}
+
+void __PrintCallState(char* str, TelCallStates_t eCallState)
+{
+       switch(eCallState)
+       {
+               case TAPI_CALL_STATE_IDLE:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_IDLE]", str);
+                       break;
+               case TAPI_CALL_STATE_ORIG:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_ORIG]", str);
+                       break;
+               case TAPI_CALL_STATE_SETUPIND:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_SETUPIND]", str);
+                       break;
+               case TAPI_CALL_STATE_CONNECTING:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_CONNECTING]", str);
+                       break;
+               case TAPI_CALL_STATE_ALERT:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_ALERT]", str);
+                       break;
+               case TAPI_CALL_STATE_INCOM:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_INCOM]", str);
+                       break;
+               case TAPI_CALL_STATE_ANSWER:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_ANSWER]", str);
+                       break;
+               case TAPI_CALL_STATE_CONV:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_CONV]", str);
+                       break;
+               case TAPI_CALL_STATE_ENDING:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_ENDING]", str);
+                       break;
+               case TAPI_CALL_STATE_INVALID:
+                       fprintf(stderr, "%s [TAPI_CALL_STATE_INVALID]", str);
+                       break;
+               default:
+                       fprintf(stderr, "%s Undefined Call State", str);
+                       break;
+       }
+}
+
+void __PrintCallFwType(char* str, TelCallForwardType_t eCallFwType)
+{
+       switch(eCallFwType)
+       {
+               case TAPI_CALL_OUTGOING_FWDED:
+                       fprintf(stderr, "%s [TAPI_CALL_OUTGOING_FWDED]", str);
+                       break;
+               case TAPI_CALL_INCOMMING_FWDED:
+                       fprintf(stderr, "%s [TAPI_CALL_INCOMMING_FWDED]", str);
+                       break;
+               default:
+                       fprintf(stderr, "%s Undefined Call ForwardType", str);
+                       break;
+       }
+}
+
+
+int call_test_ret_first_free_index(void);
+
+
+
+void timer_handler (int signum)
+{
+       TEST_DEBUG("Timer Expired [%ld] times", ++_timer_exp_count);
+
+       /*      Free the current call context   */
+
+}
+
+
+void timer_reset()
+{
+        /* Configure the timer to expire after 250 msec... */
+        timer.it_value.tv_sec = 60;
+        timer.it_value.tv_usec = 0;
+        /* ... and every 250 msec after that. */
+        timer.it_interval.tv_sec = 0;
+        timer.it_interval.tv_usec = 0;
+}
+
+
+void timer_start()
+{
+        /* Start a virtual timer. It counts down whenever this process is
+          executing. */
+        setitimer (ITIMER_REAL, &timer, NULL);
+}
+
+
+
+void call_test_auto_hold(void)
+{
+       TapiResult_t    api_err;
+
+       TEST_DEBUG("Request to Auto Hold call with Handle [%d]", curr_handle);
+
+       api_err = tel_hold_call(curr_handle, &requestID);
+
+       TEST_DEBUG("Tapi API Err Code [%x], Auto MO Count [%ld]", api_err, __call_test_auto_mo);
+       AUTO_LOG("API: tel_hold_call:-IN Handle [%d], Return [%d]", curr_handle, api_err);
+  }
+
+
+
+void call_test_auto_act(void)
+{
+       TapiResult_t    api_err;
+
+       TEST_DEBUG("Request to Auto Activate Call with Handle [%d]", curr_handle);
+
+       api_err = tel_retrieve_call(curr_handle, &requestID);
+
+       TEST_DEBUG("Tapi API Err Code [%x], Auto Count [%ld]", api_err, __call_test_auto_ans);
+       AUTO_LOG("API: tel_retrieve_call:-IN Handle [%d], Return [%d]", curr_handle, api_err);
+  }
+
+
+void call_test_auto_ans(void)
+{
+       TapiResult_t    api_err;
+
+       TEST_DEBUG("Request to Auto Ans call with Handle [%d]", incoming_handle);
+
+       __call_test_auto_ans++;
+
+       api_err = tel_answer_call(incoming_handle, TAPI_CALL_ANSWER_ACCEPT, &requestID);
+
+       TEST_DEBUG("Tapi API Err Code [%x], Auto Count [%ld]", api_err, __call_test_auto_ans);
+
+       AUTO_LOG("API: tel_answer_call:- IN Hanlde [%d] Return [%d]", incoming_handle, api_err);
+  }
+
+
+
+
+
+void call_test_auto_mo(void)
+{
+       int     free_id;
+       TapiResult_t    api_err;
+       int RequestId=0;
+
+       TEST_DEBUG("Request to Auto Setup call with Number ...%s", _glob_setup_info.szNumber);
+
+       __call_test_auto_mo++;
+
+       api_err = tel_exe_call_mo(&_glob_setup_info, &curr_handle, &RequestId);
+
+       TEST_DEBUG("After calling tel_exe_call_mo : Handle [%d]", curr_handle);
+
+       TEST_DEBUG("Tapi API Err Code [%x], Auto Count [%ld]", api_err, __call_test_auto_mo);
+
+       if(api_err == TAPI_API_SUCCESS)
+       {
+               free_id = call_test_ret_first_free_index();
+
+               if (free_id == -1)
+               {
+                       TEST_DEBUG("No Free Context ...");
+               }
+
+               else
+               {
+                       memcpy(&ctxt[free_id].info.callNumber, _glob_setup_info.szNumber, sizeof( _glob_setup_info.szNumber));
+                       ctxt[free_id].info.callState = TAPI_CALL_STATE_ORIG;
+                       ctxt[free_id].info.activeState = TAPI_CALL_CONNECT_IDLE;
+                       ctxt[free_id].info.isMobileOriginated = true;
+                       ctxt[free_id].handle = curr_handle;
+               }
+
+               AUTO_LOG("API: tel_exe_call_mo:- Return [%d], Handle [%d]", api_err, curr_handle);
+
+       }
+
+
+  }
+
+
+
+void call_test_count_mo()
+{
+       if (__call_test_auto_mo)
+               call_test_auto_mo();
+       else
+               TEST_DEBUG("Non Automated testing...");
+}
+
+
+void call_test_count_ans()
+{
+       if (__call_test_auto_ans)
+               call_test_auto_ans();
+       else
+               TEST_DEBUG("Non Automated testing...");
+}
+
+void call_test_auto_dtmf()
+{
+       int api_err = 0;
+       int RequestID;
+
+       api_err = tel_send_call_dtmf("9\0", &RequestID);
+    TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+    _auto_dtmf_send_count++;
+       AUTO_LOG("API: tel_send_call_dtmf: Send Count [%d]", _auto_dtmf_send_count);
+}
+
+
+TS_UINT  call_test_ret_handle_by_active_state(void)
+{
+       int start = 0;
+       int max = TAPI_CONTEXT_CALL_SIZE_MAX;
+
+       for (start = 0; start < max; start++)
+       {
+               if (ctxt[start].info.activeState == TAPI_CALL_CONNECT_ACTIVE)
+               {
+                       TEST_DEBUG("Current Active Call Handle is [%d]", ctxt[start].handle);
+                       return ctxt[start].handle;
+               }
+               else
+               {
+                       //
+               }
+       }
+
+       if (start == max)
+       {
+               TEST_DEBUG("Could not find Call with Active State")
+       }
+
+       return -1;
+
+}
+
+
+
+
+int call_test_ret_index_by_handle(TS_UINT handle)
+{
+       int start = 0;
+       int max = TAPI_CONTEXT_CALL_SIZE_MAX;
+
+       for (start = 0; start < max; start++)
+       {
+               if (ctxt[start].handle == handle)
+               {
+                       return start;
+               }
+               else
+               {
+                       //
+               }
+       }
+
+       if (start == max)
+       {
+               TEST_DEBUG("Could not find CTXT")
+       }
+
+       return -1;
+
+}
+
+
+
+int call_test_ret_first_free_index(void)
+{
+       int start = 0;
+       int max = TAPI_CONTEXT_CALL_SIZE_MAX;
+
+       for (start = 0; start < max; start++)
+       {
+               /*      by default they are free        */
+               if (ctxt[start].used == false)
+               {
+                       //TEST_DEBUG("Creating a Context with Index [%d]", start);
+
+                       ctxt[start].used = true;
+                       ctxt[start].index = start;
+
+                       return start;
+               }
+               else
+               {
+                       //
+               }
+       }
+
+       if (start == max)
+       {
+               TEST_DEBUG("Could not find FREE CTXT")
+       }
+
+       return -1;
+
+}
+
+
+/*     Create a context and populate the data  */
+void call_test_process_incom_ind(void *data)
+{
+       int free_id = -1;
+       TelCallIncomingCallInfo_t       IncomingInfo = {0, };
+       int len;
+
+       free_id = call_test_ret_first_free_index();
+
+       if (free_id == -1)
+       {
+               //
+       }
+       else
+       {
+               memcpy(&IncomingInfo, data, sizeof(TelCallIncomingCallInfo_t));
+
+               ctxt[free_id].handle = IncomingInfo.CallHandle;
+
+               len = strlen(IncomingInfo.szCallingPartyNumber);
+
+               memcpy(&ctxt[free_id].info.callNumber, IncomingInfo.szCallingPartyNumber, len);
+
+               ctxt[free_id].info.callState = TAPI_CALL_STATE_INCOM;
+               ctxt[free_id].info.callType = IncomingInfo.CallType;
+               //ctxt[free_id].info.CliCause = IncomingInfo.CliCause;
+
+               TEST_DEBUG("Incoming Call Information: call handle:[%d], Number [%s], Type [0x%x]",
+                       ctxt[free_id].handle, ctxt[free_id].info.callNumber, ctxt[free_id].info.callType);
+
+               TEST_DEBUG("No CLI Cause [0x%x]",  IncomingInfo.CliCause);
+
+               incoming_handle = ctxt[free_id].handle;
+
+               AUTO_LOG("EVENT: INCOMING IND:- Hanlde [%d], Number [%s]",
+                       incoming_handle, ctxt[free_id].info.callNumber);
+
+               /*      if the test is automated, then call ans api     */
+               call_test_count_ans();
+
+       }
+
+}
+
+//static void  call_test_process_events (TelTapiEventClass_t eventClass, int eventType, void * param2)
+static void  call_async_event_callback(TelTapiEvent_t  *event, void *data)
+{
+       TS_UINT temp_handle = -1;
+       int     RequestId=0;
+
+       TEST_DEBUG("EVENT TYPE:[0x%x], STATUS:[0x%x]", event->EventType, event->Status);
+
+       int *userdata;
+       userdata = (int *)data;
+
+       switch(event->EventClass)
+       {
+               case TAPI_EVENT_CLASS_CALL_VOICE:
+                       switch(event->EventType)
+                       {
+                               case TAPI_EVENT_CALL_SWAP_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_SWAP_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_ANSWER_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_ANSWER_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_RELEASE_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_ALL_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_RELEASE_ALL_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF:
+                               {
+                                               TEST_DEBUG("TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF");
+                                       TelCallVoicePrivacyInfo_t vp_info={0,};
+                                       memcpy(&vp_info, event->pData, sizeof(TelCallVoicePrivacyInfo_t));
+                                       switch(vp_info.PrivacyType)
+                                       {
+                                               case TAPI_CALL_PRIVACY_TYPE_MS:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_MS");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_TYPE_BS:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_BS");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_TYPE_CURRENT:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_CURRENT");
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                                       switch(vp_info.PrivacyMode)
+                                       {
+                                               case TAPI_CALL_PRIVACY_MODE_STANDARD:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_MODE_STANDARD");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_MODE_ENHANCED:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_MODE_ENHANCED");
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_PRIVACYMODE_IND:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_PRIVACYMODE_IND");
+                                       TelCallVoicePrivacyInfo_t vp_info={0,};
+                                       memcpy(&vp_info, event->pData, sizeof(TelCallVoicePrivacyInfo_t));
+                                       switch(vp_info.PrivacyType)
+                                       {
+                                               case TAPI_CALL_PRIVACY_TYPE_MS:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_MS");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_TYPE_BS:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_BS");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_TYPE_CURRENT:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_TYPE_CURRENT");
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                                       switch(vp_info.PrivacyMode)
+                                       {
+                                               case TAPI_CALL_PRIVACY_MODE_STANDARD:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_MODE_STANDARD");
+                                                       break;
+                                               case TAPI_CALL_PRIVACY_MODE_ENHANCED:
+                                                       TEST_DEBUG("TAPI_CALL_PRIVACY_MODE_ENHANCED");
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_FLASHINFO_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_FLASHINFO_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_EMERGENCYMODE_IND:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_EMERGENCYMODE_IND");
+                                       TelCallEmergecyMode_t mode= 0;
+                                       memcpy(&mode, event->pData, sizeof(TelCallEmergecyMode_t));
+                                       switch(mode)
+                                       {
+                                               case TAPI_CALL_EMERGENCY_MODE_EXIT:
+                                                       TEST_DEBUG("TAPI_CALL_EMERGENCY_MODE_EXIT");
+                                                       break;
+                                               case TAPI_CALL_EMERGENCY_MODE_ENTER:
+                                                       TEST_DEBUG("TAPI_CALL_EMERGENCY_MODE_ENTER");
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_TIME_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_TIME_CNF");
+                                       TelCallTimeInfo_t calltime_info={0,};
+                                       memcpy(&calltime_info, event->pData, sizeof(TelCallTimeInfo_t));
+                                       TEST_DEBUG("req_type_mask = [0x%x]",calltime_info.req_type_mask);
+                                       TEST_DEBUG("TotalCallCnt = [%ld]",calltime_info.TotalCallCnt);
+                                       TEST_DEBUG("OutgoingCallCnt = [%ld]",calltime_info.OutgoingCallCnt);
+                                       TEST_DEBUG("IncomingCallCnt = [%ld]",calltime_info.IncomingCallCnt);
+                                       TEST_DEBUG("TotalCallTime = [%ld]",calltime_info.TotalCallTime);
+                                       TEST_DEBUG("OutgoingCallTime = [%ld]",calltime_info.OutgoingCallTime);
+                                       TEST_DEBUG("IncomingCallTime = [%ld]",calltime_info.IncomingCallTime);
+                                       TEST_DEBUG("LastCallTime = [%ld]",calltime_info.LastCallTime);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_TIME_IND:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_TIME_IND");
+                                       TelCallTimeInfo_t calltime_info={0,};
+                                       memcpy(&calltime_info, event->pData, sizeof(TelCallTimeInfo_t));
+                                       TEST_DEBUG("req_type_mask = [%d]",calltime_info.req_type_mask);
+                                       TEST_DEBUG("TotalCallCnt = [%ld]",calltime_info.TotalCallCnt);
+                                       TEST_DEBUG("OutgoingCallCnt = [%ld]",calltime_info.OutgoingCallCnt);
+                                       TEST_DEBUG("IncomingCallCnt = [%ld]",calltime_info.IncomingCallCnt);
+                                       TEST_DEBUG("TotalCallTime = [%ld]",calltime_info.TotalCallTime);
+                                       TEST_DEBUG("OutgoingCallTime = [%ld]",calltime_info.OutgoingCallTime);
+                                       TEST_DEBUG("IncomingCallTime = [%ld]",calltime_info.IncomingCallTime);
+                                       TEST_DEBUG("LastCallTime = [%ld]",calltime_info.LastCallTime);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_OTA_PROGRESS_IND:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_OTA_PROGRESS_IND");
+                                       TelCallOtaProgressInfo_t ota_info={0,};
+                                       memcpy(&ota_info, event->pData, sizeof(TelCallOtaProgressInfo_t));
+                                       switch(ota_info.OtaType)
+                                       {
+                                               case TAPI_CALL_OTATYPE_OTASP:
+                                               {
+                                                       TEST_DEBUG("TAPI_CALL_OTATYPE_OTASP");
+
+                                                       switch(ota_info.OtaspStatus)
+                                                       {
+                                                               case TAPI_CALL_OTASP_OK_SPL_UNLOCKED:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_SPL_UNLOCKED");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_AKEY_EXCESS:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_AKEY_EXCESS");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_SSD_UPDATE:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_SSD_UPDATE");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_NAM_DWNLD:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_NAM_DWNLD");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_MDN_DWNLD:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_MDN_DWNLD");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_IMSI_DWNLD:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_IMSI_DWNLD");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_PRL_DWNLD:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_PRL_DWNLD");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_COMMIT:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_COMMIT");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_PROGRAMMING:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_PROGRAMMING");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_SUCCESS:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_SUCCESS");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_UNSUCCESS:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_UNSUCCESS");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_OK_OTAPA_VERIFY:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_OK_OTAPA_VERIFY");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_PROGRESS:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_PROGRESS");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_FAILURES_EXCESS_SPC:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_FAILURES_EXCESS_SPC");
+                                                                       break;
+                                                               case TAPI_CALL_OTASP_LOCK_CODE_PW_SET:
+                                                                       TEST_DEBUG("TAPI_CALL_OTASP_LOCK_CODE_PW_SET");
+                                                                       break;
+                                                               default:
+                                                                       TEST_DEBUG("NONE");
+                                                                       break;
+                                                       }
+
+                                               }
+                                                       break;
+                                               case TAPI_CALL_OTATYPE_OTAPA:
+                                               {
+                                                       TEST_DEBUG("TAPI_CALL_OTATYPE_OTAPA");
+
+                                                       switch(ota_info.OtapaStatus)
+                                                       {
+                                                               case TAPI_CALL_OTAPA_STOP:
+                                                                       TEST_DEBUG("TAPI_CALL_OTAPA_STOP");
+                                                                       break;
+                                                               case TAPI_CALL_OTAPA_START:
+                                                                       TEST_DEBUG("TAPI_CALL_OTAPA_START");
+                                                                       break;
+                                                               default:
+                                                                       TEST_DEBUG("NONE");
+                                                                       break;
+                                                       }
+
+                                               }
+                                                       break;
+                                               default:
+                                                       TEST_DEBUG("NONE");
+                                                       break;
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_SETUP_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CALL_SETUP_CNF");
+                                       int     free_id;
+
+                                       if(event->Status == 0)
+                                       {
+                                               memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+                                               TEST_DEBUG("Received Call Setup for call Handle [%d]", temp_handle);
+
+                                               free_id = call_test_ret_first_free_index();
+
+                                               if (free_id == -1)
+                                               {
+                                                       TEST_DEBUG("No Free Context id ...");
+                                               }
+
+                                               else
+                                               {
+                                                       memcpy(&ctxt[free_id].info.callNumber, _glob_setup_info.szNumber, sizeof( _glob_setup_info.szNumber));
+                                                       ctxt[free_id].info.callState = TAPI_CALL_STATE_SETUPIND;
+                                                       ctxt[free_id].info.activeState = TAPI_CALL_CONNECT_IDLE;
+                                                       ctxt[free_id].info.isMobileOriginated = true;
+                                                       ctxt[free_id].handle = temp_handle;
+
+                                               }
+                                       }
+                                       else
+                                               TEST_DEBUG("event->Status is not zero..");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_ALERT_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_ALERT_IND");
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+                                       TEST_DEBUG("Received Alert for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.callState = TAPI_CALL_STATE_ALERT;
+
+                                       AUTO_LOG("EVENT: ALERT_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_INCOM_IND:
+                               {
+                                       TEST_DEBUG("\n$$$$$$$$$$$$$$    TAPI_EVENT_CALL_INCOM_IND       $$$$$$$$$$$$$$\n");
+                                       call_test_process_incom_ind(event->pData);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_WAITING_IND:
+                                       TEST_DEBUG("TAPI_EVENT_CALL_WAITING_IND");
+                                       break;
+
+                               case TAPI_EVENT_CALL_END_IND:
+                               {
+                                       int     index;
+                                       TelCallEndInfo_t EndInfo = {0, };
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_END_IND");
+
+                                       memcpy(&EndInfo, event->pData, sizeof(TelCallEndInfo_t));
+
+                                       TEST_DEBUG("Call Handle [%d], End Reason [%x]",
+                                               EndInfo.pCallHandle, EndInfo.CallEndCause);
+
+                                       index = call_test_ret_index_by_handle(EndInfo.pCallHandle);
+
+                                       /*      Free this context..     */
+                                       ctxt[index].used = false;
+
+                                       memset(&ctxt[index].info, 0, sizeof(TelTapiCallInfo_t));
+
+                                       AUTO_LOG("EVENT: END_IND:- Handle [%d] CauseX [%x]",
+                                               EndInfo.pCallHandle, EndInfo.CallEndCause);
+
+                                       /*      Continue Auto MO Call   */
+                                       call_test_count_mo();
+                               }
+
+                               break;
+
+                               case TAPI_EVENT_CALL_CONNECTED_IND:
+                               {
+                                       int     index;
+                                       //TapiResult_t  api_err = TAPI_API_SUCCESS;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_CONNECTED_IND");
+
+                                       /*      Stop the Timer..        */
+                                       //timer_reset();
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Connected Event  for call Handle [%d]", temp_handle);
+
+                                       curr_handle =  temp_handle;
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.callState = TAPI_CALL_STATE_CONV;
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_ACTIVE;
+
+                                       AUTO_LOG("EVENT: CONNECTED_IND:- Handle [%d]", temp_handle);
+
+                                       /*      Hold the Call after 10 sec      */
+                                       if(__call_test_auto_mo)
+                                       {
+                                               sleep(10);
+
+                                               call_test_auto_hold();
+                                       }
+
+                               }
+                                       break;
+
+
+                               case TAPI_EVENT_CALL_RETRIEVE_CNF:
+                               {
+                                       int             index;
+                                       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_RETRIEVE_CNF");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Activate Cnf Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_ACTIVE;
+
+                                       AUTO_LOG("EVENT: RETRIEVE_CNF:- Handle [%d]", temp_handle);
+
+                                       if(__call_test_auto_mo)
+                                       {
+                                               sleep(3);
+
+                                               TEST_DEBUG("### Drop the Call with handle [%d]", incoming_handle);
+
+                                               api_err = tel_release_call(temp_handle, &RequestId);
+
+                                               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+                                               AUTO_LOG("API: tel_release_call:- Handle [%d], Return [%d]", temp_handle, api_err);
+                                       }
+
+                               }
+                                       break;
+
+
+                               case TAPI_EVENT_CALL_HOLD_CNF:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_HOLD_CNF");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Hold Cnf Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_HELD;
+
+                                       AUTO_LOG("EVENT: HOLD_CNF:- Handle [%d]", temp_handle);
+
+                                       if(__call_test_auto_mo)
+                                       {
+                                               sleep(5);
+
+                                               call_test_auto_act();
+                                       }
+
+                               }
+                                       break;
+
+
+
+                               case TAPI_EVENT_CALL_SETUPCONFERENCE_CNF:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_SETUPCONFERENCE_CNF");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Conf Setup Cnf Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.conferenceState = TAPI_CALL_CONFERENCE_ACTIVE;
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_HELD;
+
+                                       AUTO_LOG("EVENT: SETUPCONFERENCE_CNF:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+
+
+                               case TAPI_EVENT_CALL_SPLITCONFERENCE_CNF:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_SPLITCONFERENCE_CNF");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+
+                                       TEST_DEBUG("Received Conf Split Cnf Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.conferenceState = TAPI_CALL_CONFERENCE_IDLE;
+                                       AUTO_LOG("EVENT: SPLITCONFERENCE_CNF:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+
+
+                               case TAPI_EVENT_CALL_TRANSFER_CNF:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_TRANSFER_CNF");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Tansfer Cnf Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.callState = TAPI_CALL_STATE_ENDING;
+                                       AUTO_LOG("EVENT: TRANSFER_CNF:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+
+                               case TAPI_EVENT_CALL_FORWARD_IND:
+                               {
+                                       int     index;
+                                       TelCallForwardType_t    type;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_FORWARD_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       memcpy(&type, event->pData+sizeof(TS_UINT), sizeof(TelCallForwardType_t ));
+
+                                       TEST_DEBUG("Received Fw Ind Event  for call Handle [%d]", temp_handle);
+                                       __PrintCallFwType("CallFwType: ", type);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+                                       AUTO_LOG("EVENT: FORWARD_IND::- Handle [%d]", temp_handle);
+                               }
+
+                                       break;
+
+                               case TAPI_EVENT_CALL_RETRIEVE_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_RETRIEVE_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Act Ind Event for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_ACTIVE;
+                                       AUTO_LOG("EVENT: RETRIEVE_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_HOLD_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_HOLD_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+
+                                       TEST_DEBUG("Received Held Ind Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+
+                                       ctxt[index].info.activeState = TAPI_CALL_CONNECT_HELD;
+                                       AUTO_LOG("EVENT: HOLD_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_TRANSFER_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_TRANSFER_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Tansfer Ind Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+                                       AUTO_LOG("EVENT: TRANSFER_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_SETUPCONFERENCE_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_SETUPCONFERENCE_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Conf Setup Ind Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+                                       AUTO_LOG("EVENT: SETUPCONFERENCE_IND:- Handle [%d]", temp_handle);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_BARRING_IND:
+                               {
+                                       int     index;
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_BARRING_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       TEST_DEBUG("Received Barr Ind Event  for call Handle [%d]", temp_handle);
+
+                                       index = call_test_ret_index_by_handle(temp_handle);
+                                       AUTO_LOG("EVENT: BARRING_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+
+
+                               case TAPI_EVENT_CALL_SEND_DTMF_CNF:
+                               {
+                                       TEST_DEBUG("Received TAPI_EVENT_CALL_SEND_DTMF_CNF");
+                                       AUTO_LOG("EVENT: DTMF_CNF: Cnf Count [%d]", _auto_dtmf_cnf_count++);
+                                       if((_auto_dtmf_send_count > 0) && (_auto_dtmf_send_count < 100))
+                                               call_test_auto_dtmf();
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_SET_LINEID_CNF:
+                               {
+                                       TEST_DEBUG("Received TAPI_EVENT_CALL_SET_LINEID_CNF");
+                                       AUTO_LOG("EVENT: SET_LINEID_CNF:");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_GET_LINEID_CNF:
+                               {
+                                       TEST_DEBUG("Received TAPI_EVENT_CALL_GET_LINEID_CNF");
+                                       AUTO_LOG("EVENT: GET_LINEID_CNF:");
+                               }
+                                       break;
+
+
+                               case TAPI_EVENT_CALL_AOCINFO_IND:
+                               {
+                                       TelCallAocInfo_t        info = {0, };
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_AOCINFO_IND");
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       memcpy(&info, event->pData+sizeof(TS_UINT), sizeof(TelCallAocInfo_t));
+
+                                       TEST_DEBUG("Received AOC Info Ind Event for call Handle [%d], acm [%u], max acm [%u]",
+                                               temp_handle, info.ACM, info.MaxAcm);
+                                       AUTO_LOG("EVENT: AOCINFO_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND:
+                               {
+                                       TelCallConnectedNumberInfo_t    info = {0, };
+
+                                       TEST_DEBUG("TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND");
+
+                                       memcpy(&temp_handle, event->pData, sizeof(TS_UINT));
+
+                                       memcpy(&info, event->pData+sizeof(TS_UINT), sizeof(TelCallConnectedNumberInfo_t));
+
+                                       TEST_DEBUG("Received SS Info Ind Event for call Handle [%d],  cli cause [%d], name mode [%d]",
+                                               temp_handle, info.no_cli_cause, info.name_mode);
+                                       AUTO_LOG("EVENT: CONNECTEDNUMBERINFO_IND:- Handle [%d]", temp_handle);
+                               }
+                                       break;
+
+
+                               default:
+                                       TEST_DEBUG("Undefined Event Type [%d] Received", event->EventType);
+                                       AUTO_LOG("EVENT: UNDEFINED EVENT:-TYPE [%d]", event->EventType);
+                                       break;
+
+                       }
+
+                       break;
+
+               default:
+                       TEST_DEBUG("*** Other TAPI EVENT received : class=%x type=%x ****",event->EventClass, event->EventType);
+                       break;
+
+       }
+       TEST_DEBUG("****************** End event *****************************");
+
+}
+
+int call_test_subscribe_tapi_events (void)
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfCALLEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int CALLEvtList[] =
+       {
+               TAPI_EVENT_CALL_SETUP_CNF,  /**<0x0000, This event indicates the Call Setup request triggered */
+               TAPI_EVENT_CALL_ALERT_IND,                      /**<    This event indicates the Call is in Alerting stage*/
+               TAPI_EVENT_CALL_CONNECTING_IND, /**<    This event indicates the Call is in Connecting stage*/
+               TAPI_EVENT_CALL_CONNECTED_IND,  /**<    This event indicates the Call is Connected */
+               TAPI_EVENT_CALL_INCOM_IND    ,          /**<    This event indicates Incoming Call indication to Application*/
+               TAPI_EVENT_CALL_ANSWER_CNF,     /**<    Incoming call was answered*/
+               TAPI_EVENT_CALL_RETRIEVE_CNF,   /**<    This event indicates Call is retrieved from held state*/
+               TAPI_EVENT_CALL_RETRIEVE_IND,   /**<    This event indicates that other party has retrieved the call from hold*/
+               TAPI_EVENT_CALL_HOLD_IND,               /**<    This event indicates that other party is has put the call on hold*/
+               TAPI_EVENT_CALL_HOLD_CNF ,              /**<    This event indicates is call is put on hold*/
+               TAPI_EVENT_CALL_TRANSFER_CNF,   /**<    This event indicates is call is explicitly transferred*/
+               TAPI_EVENT_CALL_TRANSFER_IND,   /**<    Call Transfer Indication*/
+               TAPI_EVENT_CALL_SETUPCONFERENCE_CNF,            /**<    This event indicates that Call is joined in a conference*/
+               TAPI_EVENT_CALL_SETUPCONFERENCE_IND,            /**<    Conference setup indication*/
+               TAPI_EVENT_CALL_SPLITCONFERENCE_CNF,            /**<    This event indicates Call is split from conference*/
+               TAPI_EVENT_CALL_SEND_DTMF_CNF,  /**<    This event indicates the confirmation for sending DTMF Digits to the network*/
+               TAPI_EVENT_CALL_WAITING_IND,                    /**<    Call waiting indication*/
+               TAPI_EVENT_CALL_FORWARD_IND,            /**<    This event indication for Call is forwarded */
+               TAPI_EVENT_CALL_RELEASE_CNF,            /**<    This event is indicated when a specific call is released requested by the application*/
+               TAPI_EVENT_CALL_RELEASE_ALL_CNF,        /**<    This event is indicated when all the calls released requested by the application*/
+               TAPI_EVENT_CALL_RELEASE_ALL_ACTIVE_CNF, /**<    This event is indicated when all the active calls released requested by the application*/
+               TAPI_EVENT_CALL_RELEASE_ALL_HELD_CNF,           /**<    This event is indicated when all the held calls released requested by the application*/
+               TAPI_EVENT_CALL_END_IND,                         /**<   This event indicates the Call is Ended. This event can be solicited/unsolicited.*/
+               TAPI_EVENT_CALL_GET_LINEID_CNF, /**<    Error in Get Line ID    */
+               TAPI_EVENT_CALL_SET_LINEID_CNF, /**<            Error in Set Line Id            */
+               TAPI_EVENT_CALL_SWAP_CNF, /**< Call Swap Confirmation */
+               TAPI_EVENT_CALL_GET_PRIVACYMODE_CNF,    /**<    Get Privacy mode        */
+               TAPI_EVENT_CALL_SET_PRIVACYMODE_CNF, /**<               Set Privacy mode        */
+               TAPI_EVENT_CALL_PRIVACYMODE_IND,        /**<    Privacy mode Indication */
+               TAPI_EVENT_CALL_FLASHINFO_CNF, /**<             Flash info      */
+               TAPI_EVENT_CALL_EXIT_EMERGENCYMODE_CNF, /**<            Exit Emergency mode     cnf */
+               TAPI_EVENT_CALL_EMERGENCYMODE_IND, /**<          Emergency mode ind */
+               TAPI_EVENT_CALL_TIME_CNF, /**<           call time cnf */
+               TAPI_EVENT_CALL_TIME_IND, /**<           call time ind */
+               TAPI_EVENT_CALL_OTA_PROGRESS_IND, /**<           ota progress ind */
+               TAPI_EVENT_CALL_DISPLAY_INFO_IND, /**<           display info ind */
+               TAPI_EVENT_CALL_BARRING_IND,                    /**<    This event indicates the Call is Barred*/
+               TAPI_EVENT_CALL_FORWARDED_INFO_IND,     /**<    This event indicates the MT call is Forwarded*/
+               TAPI_EVENT_CALL_AOCINFO_IND,    /**<    This event indicates the AOC Information*/
+               TAPI_EVENT_CALL_CALLINGNAMEINFO_IND,    /**<    This event indicates the Calling Name Information*/
+               TAPI_EVENT_CALL_CONNECTEDNUMBERINFO_IND,        /**<    This event indicates the Connected Number Information*/
+               TAPI_EVENT_CALL_CLISUPRESSIONREJ_IND,   /**<    This event indicates the CLI Suppression Indication*/
+               TAPI_EVENT_CALL_DEFLECTED_IND,  /**<    This event indicates the Call is Deflected*/
+               TAPI_EVENT_CALL_UNCOND_FORWARDING_IND,  /**<    This event indicates the Call is unconditionally forwarded*/
+               TAPI_EVENT_CALL_COND_FORWARDING_IND,    /**<    This event indicates the Call is conditionally forwarded*/
+               TAPI_EVENT_CALL_CONNECTED_ECT_REMOTE_IND,       /**<    This event indicates the ECT remote connection  */
+               TAPI_EVENT_CALL_ON_HOLD_RELEASED_IND,   /**<    This event indicates the Call on hold is released*/
+               TAPI_EVENT_CALL_ALERT_ECT_REMOTE_IND,   /**<    This event indicates the ECT remote alert*/
+               TAPI_EVENT_CALL_SS_FORWARDED_MSG_RXED_IND,      /**<    This event indicates that the forwarded msg has been received*/
+       };
+
+       iNumOfCALLEvt = sizeof(CALLEvtList)/sizeof(int);
+       CALL_subscription_id = (unsigned int *) calloc (iNumOfCALLEvt, sizeof (unsigned int));
+
+
+
+       for( i=0 ; i< iNumOfCALLEvt; i++ )
+       {
+               api_err = tel_register_event(CALLEvtList[i], &CALL_subscription_id[i],(TelAppCallback)&call_async_event_callback,NULL );
+               if(api_err != TAPI_API_SUCCESS)
+               {
+                       TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", CALLEvtList[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+
+
+
+#if 0
+       char *videocallEvents[] = {
+                       "Telephony.Call.Video.SetupCnf",
+                       "Telephony.Call.Video.AlertInd",
+                       "Telephony.Call.Video.ConnectedInd",
+                       "Telephony.Call.Video.IncomingInd",
+                       "Telephony.Call.Video.AnswerCnf",
+                       "Telephony.Call.Video.ForwardInd",
+                       "Telephony.Call.Video.ReleaseCnf",
+                       "Telephony.Call.Video.EndInd",
+                        "Telephony.Call.Video.BarringInd",
+                        "Telephony.Call.Video.ForwardedInfoInd",
+                        "Telephony.Call.Video.AocInfoInd",
+                       "Telephony.Call.Video.ConnectedNumberInfoInd",
+                       "Telephony.Call.Video.UncondforwardingActiveInd",
+                        "Telephony.Call.Video.CondforwardingActiveInd",
+                        "Telephony.Call.Video.ConnectedEctRemoteInd",
+       };
+
+       for(count =0;count  <  (sizeof(videocallEvents)/sizeof(*videocallEvents)) ; count++)
+       {
+               error_code = EvtSysEventSubscribe (
+                               EvtDeliveryHandle,
+                               videocallEvents[count],                         /* notification ID */
+                               NULL,                                           /*      filter expression       */
+                               (EvtSysEventCb)call_test_noti_cb,               /* notification handler */
+                               (void *)&sdata,                         /* local data */
+                               &subscription_id2                       /* subscription ID */
+                               );
+               if (error_code )
+               {
+                       TEST_DEBUG( " EvtSysEventSubscribe(): error [%#X] for event [%s]", error_code , videocallEvents[count]);
+               }
+       }
+
+
+       return 0;
+#endif
+}
+
+
+int call_test_exit(void)
+{
+       int result = 0;
+       return result;
+}
+
+
+
+int call_test_get_request(void)
+{
+       //char ch;
+       int ret;
+       //char callId=0;
+       //unsigned short len;
+       char buf[256];
+       char dtmfStr[16] = "1000103001";
+       //char normal[16] = "+91";
+       //unsigned short error;
+       TapiResult_t            api_err = TAPI_API_SUCCESS;
+       int index;
+       int RequestID;
+       _auto_dtmf_send_count = 0;
+       _auto_dtmf_cnf_count = 0;
+
+       for(index=0; index<TAPI_CONTEXT_CALL_SIZE_MAX; index++)
+       {
+               if(ctxt[index].used == true)
+               {
+                       api_err = tel_get_call_status( ctxt[index].handle, &gcallStatus[index]);
+
+                       if(api_err != TAPI_API_SUCCESS)
+                       {
+                               TEST_DEBUG("Get Call Status Failed: returnStatus value is [%x] for handle[%d] ", api_err, ctxt[index].handle);
+                       }
+               }
+       }
+
+
+       printf("\n -----------------------------------------------------------------------------");
+       printf("\n ############  For gsm/wcdma/cdma ############ ");
+       printf("\n tel_exe_call_mo              :       mo <Number>");
+       printf("\n tel_exe_call_mo (SOS)                                :       sos <Number>");
+       printf("\n tel_answer_call (Accept)             :       ans");
+       printf("\n tel_answer_call (Reject)                     :       rej");
+       printf("\n tel_send_call_dtmf                           :       dtmf <String>");
+       printf("\n tel_release_call                             :       drop <Call handle>");
+       printf("\n tel_release_call_all                         :       rall");
+       printf("\n tel_get_call_status  (SyncAPI)               :       status <Call handle>");
+       printf("\n tel_get_call_duration (SyncAPI)              :       duration <Call handle>");
+       printf("\n Get call state from NPS (SyncAPI)            :       state");
+
+       printf("\n ############  For only gsm/wcdma ############ ");
+       printf("\n tel_answer_call(Hold&Accept)                 :       hna");
+       printf("\n tel_answer_call(Replace)                     :       rep");
+       printf("\n tel_hold_call                                :       hld <Call handle>");
+       printf("\n tel_retrieve_call                            :       act <Call handle>");
+       printf("\n tel_swap_call                :       swap <Active Call handle> <Held Call handle>");
+       printf("\n tel_exe_call_explicit_transfer                       :       tran <Active Call handle>");
+       printf("\n tel_join_call                                :       join <Active Call handle> <Held Call handle>");
+       printf("\n tel_split_call                       :       split <Call handle>");
+       printf("\n tel_release_call_all_active                  :       ract");
+       printf("\n tel_release_call_all_held                    :       rhld");
+       printf("\n tel_activate_call_ccbs (not supported)               :       ccbs <Call handle>");
+       printf("\n tel_deflect_call (not supported)             :       defl <Number>");
+       printf("\n tel_get_call_act_line                :       lineg");
+       printf("\n tel_set_call_act_line                :       lines");
+       printf("\n tel_get_call_conf_list(SyncAPI)              :       conflist <Call handle>");
+
+       printf("\n ############  For only cdma ############ ");
+       printf("\n tel_exe_call_flash_info                              :       flash1  ");
+       printf("\n tel_exe_call_flash_info (with Number)                :       flash2 <Number>");
+       printf("\n tel_get_call_privacy_mode                    :       pmodeg <vp_type(1/2/3)>");
+       printf("\n tel_set_call_privacy_mode            :       pmodes <vp_type(1/2/3)> <vp_mode(0/1)>");
+       printf("\n tel_exit_call_emergency_mode                 :       xemer ");
+       printf("\n tel_get_call_time                    :       time <mask(count 1, total time 2 last time 4)>");
+
+       printf("\n\n quit                                               :        quit ");
+       printf("\n -----------------------------------------------------------------------------");
+
+
+       printf("\n########################################################\n\n");
+
+       for(index=0; index<TAPI_CONTEXT_CALL_SIZE_MAX; index++)
+       {
+               if(ctxt[index].used == true)
+               {
+                       fprintf(stderr, " Index:[%d], handle: [%d], [%s], [%s],[%s],",
+                               index, ctxt[index].handle, gcallStatus[index].pNumber, (gcallStatus[index].bMoCall)?"MO":"MT", (gcallStatus[index].bConferenceState)?"Conference":"Single");
+                       __PrintCallType(" ", gcallStatus[index].CallType);
+                       __PrintCallState("\n Call State:", gcallStatus[index].CallState);
+                       __PrintActiveCallState(" Active Call State:", gcallStatus[index].CallActiveState);
+                       fprintf(stderr, "\n");
+               }
+       }
+       printf("\n########################################################\n");
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0) {
+               if (errno == EINTR)
+               perror("read(1)");
+               return -1;
+       } else if (ret == 0) return ret;
+
+
+
+       TEST_DEBUG("Enter the API code: ");
+
+
+       /******************************************************************************
+       *
+       *                                                               C A L L  A P I
+       *
+       *******************************************************************************/
+
+       if(strncmp(buf, "flash1", 6) == 0)
+       {
+               TEST_DEBUG("###flash1 .... ");
+
+               api_err = tel_exe_call_flash_info(NULL,&RequestID);
+
+               TEST_DEBUG(" \n tel_exe_call_flash_info Tapi return returnStatus value is [%x]  RequestID : %d \n ", api_err, RequestID);
+      }
+
+
+       if(strncmp(buf, "flash2", 6) == 0)
+       {
+               char            tempNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               char    DialNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               int             length = 0;
+               strncpy(tempNum, &buf[7], TAPI_CALL_DIALDIGIT_LEN_MAX);
+               length = strlen(tempNum);
+               strncpy(DialNum,tempNum, length-1);  // removing '/n' form the end of the string
+               TEST_DEBUG("### dial number :[%s]", DialNum);
+
+               api_err = tel_exe_call_flash_info(DialNum, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "pmodeg", 6) == 0)
+       {
+               char temp[2];
+               int  vp_type= -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[7], 1);
+               vp_type = atoi(temp);
+
+               TEST_DEBUG("### tel_get_call_privacy_mode: vp_type [%d]", vp_type);
+
+               api_err = tel_get_call_privacy_mode(vp_type,&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "pmodes", 6) == 0)
+       {
+               TEST_DEBUG("### tel_set_call_privacy_mode");
+
+               char temp[2];
+               TelCallVoicePrivacyInfo_t vp_info = { 0, };
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[7], 1);
+               vp_info.PrivacyType = atoi(temp);
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[9], 1);
+               vp_info.PrivacyMode = atoi(temp);
+
+               TEST_DEBUG("### tel_set_call_privacy_mode: vp_type [%d] vp_mode [%d]", vp_info.PrivacyType, vp_info.PrivacyMode);
+
+               api_err = tel_set_call_privacy_mode(vp_info,&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "xemer", 5) == 0)
+       {
+               TEST_DEBUG("###tel_exit_call_emergency_mode");
+
+               api_err = tel_exit_call_emergency_mode(&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if(strncmp(buf, "time", 4) == 0)
+       {
+               TEST_DEBUG("###tel_get_call_time");
+               char temp[2];
+               unsigned short mask= -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[5], 1);
+               mask = atoi(temp);
+
+               TEST_DEBUG("###tel_get_call_time.. req mask type:[0x%x]",mask );
+
+               api_err = tel_get_call_time(mask, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+      }
+//######################################################################
+       if(strncmp(buf, "sos", 3) == 0)
+       {
+//             int     free_id;
+               char    tempNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               int             length = 0;
+
+               strncpy(tempNum, &buf[4], TAPI_CALL_DIALDIGIT_LEN_MAX);
+               length = strlen(tempNum);
+
+               memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+               strncpy(_glob_setup_info.szNumber,tempNum, length-1);  // removing '/n' form the end of the string
+
+       _glob_setup_info.CallType=TAPI_CALL_TYPE_E911;
+
+               TEST_DEBUG("Request to Setup call with Number [%s], type %d",   _glob_setup_info.szNumber, _glob_setup_info.CallType);
+
+               api_err = tel_exe_call_mo(&_glob_setup_info, &curr_handle, &RequestID);
+
+               TEST_DEBUG(" after calling tel_exe_call_mo : Handle [%d]", curr_handle);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+#if 0 // move to call setup cnf event
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                       free_id = call_test_ret_first_free_index();
+
+                       if (free_id == -1)
+                       {
+                               TEST_DEBUG("No Free Context ...");
+                       }
+
+                       else
+                       {
+                               memcpy(&ctxt[free_id].info.callNumber, _glob_setup_info.szNumber, sizeof( _glob_setup_info.szNumber));
+                               ctxt[free_id].info.callState = TAPI_CALL_STATE_ORIG;
+                               ctxt[free_id].info.activeState = TAPI_CALL_CONNECT_IDLE;
+                               ctxt[free_id].info.isMobileOriginated = true;
+                               ctxt[free_id].handle = curr_handle;
+
+                       }
+               }
+#endif
+
+
+      }
+
+#if 0
+       if(strncmp(buf, "automo", 6) == 0)
+       {
+               char temp[16] = {0, };
+
+               memcpy(temp, &buf[7], _country_spc_num_);
+
+
+               memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+               _glob_setup_info.CallType=TAPI_CALL_TYPE_VOICE;
+               strncpy(_glob_setup_info.szNumber, pre_string, sizeof(pre_string));
+
+               strncat(_glob_setup_info.szNumber, temp, _country_spc_num_);
+
+               _glob_setup_info.IdentityMode = TAPI_CALL_IDENTITY_SHOW;
+
+               call_test_auto_mo();
+
+       }
+
+       if(strncmp(buf, "autoans", 7) == 0)
+       {
+               call_test_auto_ans();
+       }
+
+#endif
+       if(strncmp(buf, "vmo", 2) == 0)
+       {
+//             int     free_id;
+               char    tempNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               int             length = 0;
+
+               strncpy(tempNum, &buf[4], TAPI_CALL_DIALDIGIT_LEN_MAX);
+               length = strlen(tempNum);
+
+               memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+               strncpy(_glob_setup_info.szNumber,tempNum, length-1);  // removing '/n' form the end of the string
+
+               _glob_setup_info.CallType=TAPI_CALL_TYPE_DATA;
+
+               TEST_DEBUG("Request to Setup call with Number [%s], type %d",   _glob_setup_info.szNumber, _glob_setup_info.CallType);
+
+               api_err = tel_exe_call_mo(&_glob_setup_info, &curr_handle, &RequestID);
+
+               TEST_DEBUG(" after calling tel_exe_call_mo : Handle [%d]", curr_handle);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+#if 0 // move to call setup cnf event
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                       free_id = call_test_ret_first_free_index();
+
+                       if (free_id == -1)
+                       {
+                               TEST_DEBUG("No Free Context ...");
+                       }
+
+                       else
+                       {
+                               memcpy(&ctxt[free_id].info.callNumber, _glob_setup_info.szNumber, sizeof( _glob_setup_info.szNumber));
+                               ctxt[free_id].info.callState = TAPI_CALL_STATE_ORIG;
+                               ctxt[free_id].info.activeState = TAPI_CALL_CONNECT_IDLE;
+                               ctxt[free_id].info.isMobileOriginated = true;
+                               ctxt[free_id].handle = curr_handle;
+
+                       }
+               }
+#endif
+
+      }
+
+       if(strncmp(buf, "mo", 2) == 0)
+       {
+//             int     free_id;
+               char    tempNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               int             length = 0;
+
+               strncpy(tempNum, &buf[3], TAPI_CALL_DIALDIGIT_LEN_MAX);
+               length = strlen(tempNum);
+
+               memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+               strncpy(_glob_setup_info.szNumber,tempNum, length-1);  // removing '/n' form the end of the string
+
+               _glob_setup_info.CallType=TAPI_CALL_TYPE_VOICE;
+               //_glob_setup_info.Ecc=TAPI_CALL_ECC_DEFAULT;
+
+               TEST_DEBUG("Request to Setup call with Number [%s], type %d",   _glob_setup_info.szNumber, _glob_setup_info.CallType);
+
+               api_err = tel_exe_call_mo(&_glob_setup_info, &curr_handle, &RequestID);
+
+               TEST_DEBUG(" after calling tel_exe_call_mo : Handle [%d]", curr_handle);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+#if 0 // move to call setup cnf event
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                       free_id = call_test_ret_first_free_index();
+
+                       if (free_id == -1)
+                       {
+                               TEST_DEBUG("No Free Context ...");
+                       }
+
+                       else
+                       {
+                               memcpy(&ctxt[free_id].info.callNumber, _glob_setup_info.szNumber, sizeof( _glob_setup_info.szNumber));
+                               ctxt[free_id].info.callState = TAPI_CALL_STATE_ORIG;
+                               ctxt[free_id].info.activeState = TAPI_CALL_CONNECT_IDLE;
+                               ctxt[free_id].info.isMobileOriginated = true;
+                               ctxt[free_id].handle = curr_handle;
+
+                       }
+               }
+#endif
+
+      }
+
+
+       if( strncmp(buf, "ans", 3) == 0 )
+       {
+               TEST_DEBUG("###answer incoming call");
+
+               api_err = tel_answer_call(incoming_handle, TAPI_CALL_ANSWER_ACCEPT, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "hna", 3) == 0 )
+       {
+//             TS_UINT active_handle = -1;
+
+//             active_handle = call_test_ret_handle_by_active_state();
+
+//             TEST_DEBUG("### hold active call [%d] and accept waiting call", active_handle);
+
+               TEST_DEBUG("### hold active call and accept waiting call");
+
+               api_err = tel_answer_call(incoming_handle, TAPI_CALL_ANSWER_HOLD_AND_ACCEPT, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "rep", 3) == 0 )
+       {
+//             TS_UINT active_handle = -1;
+
+//             active_handle = call_test_ret_handle_by_active_state();
+
+//             TEST_DEBUG("### release active call [%d] and accept waiting call", active_handle);
+
+               TEST_DEBUG("### release active call and accept waiting call");
+
+               api_err = tel_answer_call(incoming_handle, TAPI_CALL_ANSWER_REPLACE, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+
+       if( strncmp(buf, "rej", 3) == 0 )
+       {
+               TEST_DEBUG("### reject waiting call ");
+
+               api_err = tel_answer_call(incoming_handle, TAPI_CALL_ANSWER_REJECT, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+//+++++++++++ Release
+       if( strncmp(buf, "rall", 4) == 0 )
+       {
+               TEST_DEBUG("### release all calls. ");
+
+               api_err = tel_release_call_all(&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "rall.e", 6) == 0 )
+       {
+               TEST_DEBUG("### release all calls.with err option ");
+
+               api_err = tel_release_call(curr_handle, &RequestID);
+
+               TEST_DEBUG(" Tapi returned api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "ract", 4) == 0 )
+       {
+               TEST_DEBUG("### release all active calls. ");
+
+               api_err = tel_release_call_all_active( &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "rhld", 4) == 0 )
+       {
+               TEST_DEBUG("### release all held calls. ");
+
+               api_err = tel_release_call_all_held( &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+       if( strncmp(buf, "drop", 4) == 0 )
+       {
+               char temp[2];
+               TS_UINT handle= -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[5], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG("### Drop the Call with handle [%d]", handle);
+
+               api_err = tel_release_call(handle,  &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+      }
+
+
+
+       if( strncmp(buf, "hld", 3) == 0 )
+       {
+               char temp[2];
+               TS_UINT handle= -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[4], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG("### Hold the call No. %d !!", handle);
+
+               api_err = tel_hold_call(handle, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+       }
+
+
+       if( strncmp(buf, "act", 3) == 0 )
+       {
+               char temp[2];
+               TS_UINT handle= -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[4], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG("### Activate the call No. %d !!", handle);
+
+               api_err = tel_retrieve_call(handle, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if( strncmp(buf, "swap", 4) == 0 )
+       {
+               char temp[2];
+               TS_UINT held_handle, active_handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[5], 1);
+               active_handle = atoi(temp);
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[7], 1);
+               held_handle = atoi(temp);
+
+               TEST_DEBUG("### Swap! Active call No, [%d], Hold the call No. [%d]",
+                       active_handle, held_handle);
+
+               api_err = tel_swap_call(active_handle, held_handle, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+
+       if( strncmp(buf, "join", 4) == 0 )
+       {
+               char temp[2];
+               TS_UINT held_handle, active_handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[5], 1);
+               active_handle = atoi(temp);
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[7], 1);
+               held_handle = atoi(temp);
+
+               TEST_DEBUG("Setup a Conference Call with Active & Held Handles [%d] [%d]",
+                       active_handle, held_handle);
+
+               api_err = tel_join_call(active_handle,  held_handle, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+       }
+
+
+       if( strncmp(buf, "split", 5) == 0 )
+       {
+               char temp[2];
+               TS_UINT  handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(temp, &buf[6], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG("Split Call Handle [%d] from Conference call", handle);
+
+               api_err = tel_split_call(handle, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "conflist", 8) == 0)
+       {
+               unsigned int  callList[10];
+               int  noOfCalls;
+               char temp[2];
+               int i=0;
+               TS_UINT  handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(temp, &buf[9], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG("Get Conference List for call handle [%d]", handle);
+
+               api_err = tel_get_call_conf_list(handle, callList, &noOfCalls);
+
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                   TEST_DEBUG(" Get Conference List () - call handle : %d   No.of Calls %d",handle, noOfCalls );
+
+                   for(i=0;i<noOfCalls;i++)
+                   {
+                       TEST_DEBUG("Voice Test: Call Handle %d  : %d\n", i+1, callList[i]);
+                   }
+               }
+               else
+               {
+                   TEST_DEBUG("Voice Test: Get Conference List  Failed: returnStatus value is [%d]", api_err);
+               }
+
+       }
+
+
+       if(strncmp(buf, "status", 6) == 0)
+       {
+               TelCallStatus_t callStatus;
+               char temp[2];
+               TS_UINT  handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(temp, &buf[7], 1);
+               handle = atoi(temp);
+
+               TEST_DEBUG(" Get Call Status informaiton for call handle %d", handle);
+
+               api_err = tel_get_call_status(handle, &callStatus);
+
+               if(api_err == TAPI_API_SUCCESS)
+               {
+                       fprintf(stderr, "\n\t CallNumber             : %s",callStatus.pNumber);
+                       fprintf(stderr, "\n\t Is Mobile Originated   : %d(1:true, 0:false)", callStatus.bMoCall);
+                       __PrintCallType("\n\t CallType               :", callStatus.CallType);
+                       __PrintActiveCallState("\n\t CallActiveState        :", callStatus.CallActiveState);
+                       __PrintCallState("\n\t CallState              :", callStatus.CallState);
+                       fprintf(stderr, "\n\t isConferenceState : %d(1:true, 0:false)\n",callStatus.bConferenceState);
+               }
+               else
+               {
+                   TEST_DEBUG("Get Call Status Failed: returnStatus value is [%x] ", api_err);
+               }
+
+       }
+
+       if( strncmp(buf, "duration", 8) == 0 )
+       {
+               char temp[2];
+               unsigned int duration;
+               TS_UINT  handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(temp, &buf[9], 1);
+               handle = atoi(temp);
+
+
+               TEST_DEBUG("### Get Duration for  the call handle. %d !!", handle);
+
+               api_err = tel_get_call_duration(handle, &duration);
+               TEST_DEBUG("Call Duration for the Call handle [%d] is: [%d] sec  \n", handle, duration);
+       }
+
+
+       if(strncmp(buf, "tran", 4) == 0)
+       {
+               char temp[2];
+               TS_UINT active_handle = -1;
+
+               memset(temp, 0, 2);
+               memcpy(&temp, &buf[5], 1);
+               active_handle = atoi(temp);
+
+
+               TEST_DEBUG("Transfer calls with handles [%d]", active_handle);
+
+               api_err = tel_exe_call_explicit_transfer(active_handle,  &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+      }
+
+       if(strncmp(buf, "dtmf", 4) == 0)
+       {
+               char            tempStr[MAX_BURST_DTMF_STRLEN] ={0,};
+               char    str[MAX_BURST_DTMF_STRLEN] = {0,};
+               int             length = 0;
+               strncpy(tempStr, &buf[5], MAX_BURST_DTMF_STRLEN);
+               length = strlen(tempStr);
+               strncpy(str,tempStr, length-1);  // removing '/n' form the end of the string
+               TEST_DEBUG("### Send DTMF - [%s]", str);
+
+               api_err = tel_send_call_dtmf(str, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+       if(strncmp(buf, "clir", 4) == 0)
+       {
+//             int     free_id;
+               char    tempNum[TAPI_CALL_DIALDIGIT_LEN_MAX+1];
+               int             length = 0;
+
+               strncpy(tempNum, &buf[5], TAPI_CALL_DIALDIGIT_LEN_MAX);
+               length = strlen(tempNum);
+
+               memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+               strncpy(_glob_setup_info.szNumber,tempNum, length-1);  // removing '/n' form the end of the string
+
+               _glob_setup_info.CallType=TAPI_CALL_TYPE_VOICE;
+
+               TEST_DEBUG("Request to Setup CLIR call with Number [%s], type %d",      _glob_setup_info.szNumber, _glob_setup_info.CallType);
+
+               api_err = tel_exe_call_mo(&_glob_setup_info, &curr_handle, &RequestID);
+
+               TEST_DEBUG(" after calling tel_exe_call_mo : Handle [%d]", curr_handle);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+      }
+
+       if(strncmp(buf, "adtmf", 5) == 0)
+       {
+               char DtmfString[10] = {0, };
+               unsigned char length;
+
+                strcpy(DtmfString, "1234\0");
+                length = strlen(DtmfString);
+
+                TEST_DEBUG("Send DTMF digits [%s], length %d", DtmfString, length);
+
+               api_err = tel_send_call_dtmf(DtmfString, &RequestID);
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+               _auto_dtmf_send_count++;
+       }
+
+       if(strncmp(buf, "ds", 2) == 0)
+       {
+               strncat(dtmfStr, &buf[3], 16);
+               strncpy(_glob_setup_info.szNumber, dtmfStr, TAPI_CALL_DIALDIGIT_LEN_MAX);
+               TEST_DEBUG("### make a call for DTMF test....%s", _glob_setup_info.szNumber);
+
+               api_err=tel_exe_call_mo( &_glob_setup_info, &curr_handle,&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+      }
+
+
+       if(strncmp(buf, "lineg", 5) == 0)
+       {
+               TEST_DEBUG("### Get Current Active Line.");
+
+               api_err = tel_get_call_act_line(&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+               TEST_DEBUG("### Current Active Line : %d", _glob_test_curr_line);
+       }
+
+       if(strncmp(buf, "lines", 5) == 0)
+       {
+               TEST_DEBUG("### Set Current Active Line.");
+
+               if(_glob_test_curr_line == TAPI_CALL_ACTIVE_LINE1)
+                       _glob_test_curr_line = TAPI_CALL_ACTIVE_LINE2;
+
+               else
+                       _glob_test_curr_line = TAPI_CALL_ACTIVE_LINE1;
+
+               api_err = tel_set_call_act_line(_glob_test_curr_line,&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "ccbs", 4) == 0)
+       {
+               TEST_DEBUG("### Activate ccbs  call handle[%d]", curr_handle);
+
+               api_err = tel_activate_call_ccbs(curr_handle,&RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+       }
+
+       if(strncmp(buf, "defl", 4) == 0)
+       {
+               int             len1;
+               char    str[TAPI_CALL_DIALDIGIT_LEN_MAX] = {0, };
+               TelCallDeflectDstInfo_t dst;
+
+               memset(&dst, 0, sizeof(dst));
+
+               strncpy(str, &buf[5], TAPI_CALL_DIALDIGIT_LEN_MAX);
+
+               len1 = strlen(str);
+
+               strncpy((char*)dst.number, &str[0], (len1-1));
+
+               TEST_DEBUG("Deflect Call Handle [%d] to [%s]", incoming_handle, dst.number);
+
+               api_err = tel_deflect_call(incoming_handle,&dst, &RequestID);
+
+               TEST_DEBUG(" Tapi return api_err value is [%x] ", api_err);
+
+       }
+
+       if(strncmp(buf, "quit", 4) == 0)
+       {
+               TEST_DEBUG("quit..... ");
+
+               return -1;
+      }
+
+       /******************************************************************************
+       *
+       *                                       C O M M O N  A P I
+       *
+       *******************************************************************************/
+
+       if(strncmp(buf, "tapi", 4) == 0)
+        {
+       TS_BOOL status = FALSE;
+
+               api_err = tel_check_service_ready(&status);
+
+               TEST_DEBUG(" Current status of TAPI is:%d, api_err value is [%x]", status, api_err);
+        }
+
+
+       if(strncmp(buf, "state", 5) == 0)
+        {
+       unsigned char           call_state = 0;
+       api_err = vconf_get_int(VCONFKEY_TELEPHONY_CALL_STATE, (int*)&call_state);
+       TEST_DEBUG(" Current call state is:%s, api_err value is [%x]", call_state? "CONV" : "IDLE", api_err);
+        }
+
+       if(strncmp(buf, "menu", 4) == 0)
+        {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu\n");
+               //call_test_exit();
+               return -1;
+               //exit(0);
+        }
+
+       memset(buf, '\0', 256);
+
+    return ret;
+
+}
+
+
+void call_test_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+                ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+
+               if (ret)
+               {
+                   if (FD_ISSET(0, &readfds))
+                       {
+                                 if(call_test_get_request()<0)
+                                       break;
+                         }
+               }
+       }
+
+}
+
+void call_test_init(void)
+{
+       int count;
+
+       TEST_DEBUG("Please press enter...\n");
+
+       for( count = 0; count < TAPI_CONTEXT_CALL_SIZE_MAX; count++)
+       {
+               ctxt[count].handle = -1;
+               ctxt[count].used = false;
+       }
+
+       memset(&_glob_setup_info, 0, sizeof(_glob_setup_info));
+
+       _glob_setup_info.CallType=TAPI_CALL_TYPE_VOICE;
+       strncpy(_glob_setup_info.szNumber, pre_string, sizeof(pre_string));
+
+       call_test_loop();
+
+}
+
diff --git a/src/test_apps/tapi_cdma_data_test.c b/src/test_apps/tapi_cdma_data_test.c
new file mode 100644 (file)
index 0000000..f7329a2
--- /dev/null
@@ -0,0 +1,926 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <pthread.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include <glib.h>
+
+#include "TelUtility.h"
+#include "TapiEvent.h"
+#include "TapiCommon.h"
+#include "ITapiData.h"
+
+
+
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true  !0
+#endif
+#ifndef bool
+#define bool  char
+#endif
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}data_t;
+
+#define TEST_DEBUG(frmt, args...)      \
+{do { fprintf(stderr, "[CDMA-DATA Test][%s:%04d] "frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+
+#define TAPI_EVENT_CLASS_DATA_MAX_NUM 2
+#define        NUM_OF_CDMA_DATA_EVENT                  39
+
+// Global Variable
+int error_code;
+unsigned int cdma_data_subscription_id[NUM_OF_CDMA_DATA_EVENT] = {0, };
+
+void PrintNaiIndexType(TelDataNAIIndex_t NaiIndex)
+{
+       if(NaiIndex == TAPI_DATA_FACTORY_NAI)
+               printf(" NAI type : FACTORY \n");
+       else if(NaiIndex == TAPI_DATA_CUSTOM_NAI)
+               printf(" NAI type : Custom \n");
+       else
+               printf(" NAI type : Unknown [%d]\n", NaiIndex);
+
+       return;
+}
+
+void PrintPinControlInfo(TelDataPinControlInfo_t *pDsPin)
+{
+       printf(" Signal Type : ");
+       switch(pDsPin->signaltype)
+       {
+               case TAPI_DATA_SIGNAL_DCD:
+                       printf("DCD \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_DTR:
+                       printf("DTR \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_DSR:
+                       printf("DSR \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_RTS:
+                       printf("RTS \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_CTS:
+                       printf("CTS \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_RI:
+                       printf("RI \n");
+                       break;
+               default:
+                       printf("Unknown \n");
+                       break;
+       }
+
+       printf(" Signal Status : ");
+       switch(pDsPin->signalstatus)
+       {
+               case TAPI_DATA_SIGNAL_STATUS_OFF:
+                       printf("OFF \n");
+                       break;
+
+               case TAPI_DATA_SIGNAL_STATUS_ON:
+                       printf("ON \n");
+                       break;
+
+               default:
+                       printf("Unknown \n");
+                       break;
+       }
+
+       return;
+}
+
+void ComposeMobileIPNaiParametr(TelDataMipNaiParam_t *MipNaiParam)
+{
+       MipNaiParam->naiIndex = TAPI_DATA_FACTORY_NAI;
+       MipNaiParam->paramMask =        TAPI_DATA_NAI_MIP_MASK_REVERSE_TUNNEL + TAPI_DATA_NAI_MIP_MASK_HOME_ADDRESS + \
+                                       TAPI_DATA_NAI_MIP_MASK_PRIMARY_HOME_AGENT_IP;
+
+       MipNaiParam->genericInfo.revTunPreference = 0x3;
+       MipNaiParam->genericInfo.homeAddress = 0xA5D5E3E9;
+       MipNaiParam->genericInfo.primaryHaAddress = 0x5A5D3E9E;
+
+       return;
+}
+
+void EvtCurrentNaiIndexGetCnfCB(void *pData)
+{
+       TelDataNAIIndex_t *pNaiIndex;
+       pNaiIndex = (TelDataNAIIndex_t *)pData;
+
+       PrintNaiIndexType(*pNaiIndex);
+
+       return;
+}
+
+void EvtMipNaiGetCnfCB(void *pData)
+{
+       TelDataMipNaiParam_t *pMipNaiParam;
+       int i = 0;
+       pMipNaiParam = (TelDataMipNaiParam_t *)pData;
+
+       PrintNaiIndexType(pMipNaiParam->naiIndex);
+
+       printf(" Mask Value = %x\n", pMipNaiParam->paramMask);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_USER_NAI){
+               printf(" : User NAI Value");
+               for(i=0; i< pMipNaiParam->genericInfo.usrNaiLength; i++)
+                       printf("[0x%x] ", pMipNaiParam->genericInfo.usrNai[i]);
+               printf("\n");
+       }
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_SPI_MN_HA)
+               printf(" Mobile Node Home Agent Secure Parameter Index = [0x%x]\n", pMipNaiParam->genericInfo.mnHaSpi);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_SPI_MN_AAA)
+               printf(" Mobile Node AAA Secure Parameter Index = [0x%x]\n", pMipNaiParam->genericInfo.mnAaaSpi);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_REVERSE_TUNNEL)
+               printf(" Reverse Tunneling Preference = [0x%x]\n", pMipNaiParam->genericInfo.revTunPreference);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_HOME_ADDRESS)
+               printf(" Home Address = [0x%x]\n", pMipNaiParam->genericInfo.homeAddress);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_PRIMARY_HOME_AGENT_IP)
+               printf(" Primary Home Agent IP Address = [0x%x]\n", pMipNaiParam->genericInfo.primaryHaAddress);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_SECONDARY_HOME_AGENT_IP)
+               printf(" Secondary Home Agent IP Address = [0x%x]\n", pMipNaiParam->genericInfo.secondaryHaAddr);
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_MN_AAA_SS){
+               printf(" Mobile Node to AAA Shared Secret\n");
+               for(i=0; i< pMipNaiParam->ssInfo.mnHaSharedSecretLength; i++)
+                       printf("[0x%x] ", pMipNaiParam->ssInfo.mnHaSharedSecret[i]);
+               printf("\n");
+       }
+
+       if(pMipNaiParam->paramMask & TAPI_DATA_NAI_MIP_MASK_MN_HA_SS){
+               printf(" Mobile Node to Home Agent Shared Secret\n");
+               for(i=0; i< pMipNaiParam->ssInfo.mnAaaSharedSecretLength; i++)
+                       printf("[0x%x] ", pMipNaiParam->ssInfo.mnAaaSharedSecret[i]);
+               printf("\n");
+       }
+
+       return;
+}
+
+void EvtMipNaiChangedNotiCB(void *pData)
+{
+       TelDataNaiChangedItem_t *pChangedItem;
+       pChangedItem = (TelDataNaiChangedItem_t *)pData;
+
+       if(*pChangedItem == TAPI_DATA_NAI_GENERIC_INFO_CHANGED)
+               printf("[NAI Information]\n");
+       else if(*pChangedItem == TAPI_DATA_SHARED_SECRET_CHANGED)
+               printf("[Shared Screte]\n");
+
+       return;
+}
+
+void EvtTe2StatusDisplay(void *pData)
+{
+       TelDataTE2Status_t *pTe2Status;
+       pTe2Status= (TelDataTE2Status_t *)pData;
+
+       printf("Type[");
+       if(pTe2Status->type == TAPI_DATA_TE2_TYPE_UART)
+               printf("UART]\t");
+       else if(pTe2Status->type == TAPI_DATA_TE2_TYPE_USB)
+               printf("USB]\t");
+       else if(pTe2Status->type == TAPI_DATA_TE2_TYPE_BLUETOOTH)
+               printf("Bluetooth]\t");
+       else
+               printf("Unknown]\t");
+
+       printf("Status[");
+
+       if(pTe2Status->cable_status == TAPI_DATA_TE2_DETACHED)
+               printf("Detached]\n");
+       else if(pTe2Status->cable_status == TAPI_DATA_TE2_ATTACHED)
+               printf("Atached]\n");
+       else
+               printf("Unknown]\n");
+
+       return;
+}
+
+void EvtBytesCountDisplay(void *pData)
+{
+       TelDataPacketByteCounter_t *pByteCnt = NULL;
+       pByteCnt= (TelDataPacketByteCounter_t *)pData;
+
+       printf("Received Current Packet Bytes[%u]", pByteCnt->rx_curr_packet_bytes);
+       printf("Transmitted Current Packet Bytes[%u]", pByteCnt->tx_curr_packet_bytes);
+       printf("Received Total Packet Bytes[%llu]", pByteCnt->rx_total_packet_bytes);
+       printf("Transmitted Total Packet Bytes[%llu]", pByteCnt->tx_total_packet_bytes);
+
+       return;
+}
+
+void EvtIncomingCallTypeDisplay(void *pData)
+{
+       TelDataCallType_t *pCallType = NULL;
+       pCallType= (TelDataCallType_t *)pData;
+
+       printf("Incoming Call Type :[");
+       switch(*pCallType){
+               case TAPI_DATA_CALL_TYPE_DEFAULT:
+                       printf("Default]");
+                       break;
+               case TAPI_DATA_CALL_TYPE_FAX_FOR_NEXT_CALL:
+                       printf("FAX For Next Call]");
+                       break;
+               case TAPI_DATA_CALL_TYPE_FAX_FOR_ALL_CALLS:
+                       printf("FAX For All Calls]");
+                       break;
+               case TAPI_DATA_CALL_TYPE_ASYNC_FOR_NEXT_CALL:
+                       printf("Async For Next Call]");
+                       break;
+               case TAPI_DATA_CALL_TYPE_ASYNC_FOR_ALL_CALLS:
+                       printf("Async For All Call]");
+                       break;
+               default:
+                       printf("Unknown Incoming Call Type\n");
+                       break;
+       }
+       return;
+}
+
+void EvtDataRateInfoDisplay(void*pData)
+{
+       TelDataTE2DataRateInfo_t *pDataRate = NULL;
+       pDataRate= (TelDataTE2DataRateInfo_t *)pData;
+
+       printf("Transmitted Bytes[%u]", pDataRate->tx_bytes);
+       printf("Received Bytes[%u]", pDataRate->rx_bytes);
+       printf("Report Period [%d]", pDataRate->report_period);
+       printf("Channel Number [%d]", pDataRate->channel_num);
+       printf("Tx Number of Bar Level during the reporting period[%d]", pDataRate->tx_bar_level);
+       printf("Rx Number of Bar Level during the reporting period[%d]", pDataRate->rx_bar_level);
+
+       return;
+
+}
+
+void EvtBaudRateDisplay(void*pData)
+{
+       TelDataBaudRate_t *pBaudRate = NULL;
+       pBaudRate= (TelDataBaudRate_t *)pData;
+
+       printf("Baud Rate :[");
+       switch(*pBaudRate){
+               case TAPI_DATA_BAUDRATE_19200_BPS:
+                       printf("19200]");
+                       break;
+               case TAPI_DATA_BAUDRATE_38400_BPS:
+                       printf("38400]");
+                       break;
+               case TAPI_DATA_BAUDRATE_57600_BPS:
+                       printf("57600]");
+                       break;
+               case TAPI_DATA_BAUDRATE_115200_BPS:
+                       printf("115200]");
+                       break;
+               case TAPI_DATA_BAUDRATE_230400_BPS:
+                       printf("230400]");
+                       break;
+               default:
+                       printf("Unknown Baud Rate\n");
+                       break;
+       }
+       return;
+}
+
+void EvtRoamGuardDisplay(void *pData)
+{
+       TelDataRoamGuardMode_t *pMode = NULL;
+       pMode= (TelDataRoamGuardMode_t *)pData;
+
+       printf("Roam Guard Mode:[");
+       switch(*pMode){
+               case TAPI_DATA_ROAM_GUARD_DEFAULT:
+                       printf("Default]");
+                       break;
+               case TAPI_DATA_ROAM_GUARD_ALWAYS_ASK:
+                       printf("Always ASK]");
+                       break;
+               case TAPI_DATA_ROAM_ROAM_GUARD_NEVER_ASK:
+                       printf("Never ASK]");
+                       break;
+               case TAPI_DATA_ROAM_ROAM_GUARD_OFF:
+                       printf("OFF]");
+                       break;
+               case TAPI_DATA_ROAM_ROAM_GUARD_ON:
+                       printf("ON]");
+                       break;
+               default:
+                       printf("Unknown Roam Guard\n");
+                       break;
+       }
+       return;
+
+}
+
+void EvtModemNaiDisplay(void *pData)
+{
+       TelDataModemNAIMode_t *pMode = NULL;
+       pMode= (TelDataModemNAIMode_t *)pData;
+
+       printf("Modem NAI Mode:[");
+       switch(*pMode){
+               case TAPI_DATA_MODEM_NAI_OFF:
+                       printf("OFF]");
+                       break;
+               case TAPI_DATA_MODEM_NAI_ON:
+                       printf("ON]");
+                       break;
+               default:
+                       printf("Unknown Modem NAI Mode\n");
+                       break;
+       }
+       return;
+
+}
+
+void EvtModemBtModeDisplay(void *pData)
+{
+       TelDataDSType_t *pType = NULL;
+       pType= (TelDataDSType_t *)pData;
+
+       printf("Data Service Type :");
+       switch(*pType){
+               case TAPI_DATA_DS_TYPE_NORMAL:
+                       printf("DS TYPE : NORMAL");
+                       break;
+               case TAPI_DATA_DS_TYPE_DUN:
+                       printf("DS TYPE : DUN");
+                       break;
+               case TAPI_DATA_DS_TYPE_BTDUN:
+                       printf("DS TYPE : BTDUN");
+                       break;
+               case TAPI_DATA_DS_TYPE_IS:
+                       printf("DS TYPE : IS");
+                       break;
+               case TAPI_DATA_DS_TYPE_MMS:
+                       printf("DS TYPE : MMS");
+                       break;
+               default:
+                       printf("Unknown DS Type\n");
+                       break;
+       }
+       return;
+}
+
+void EvtForceRevAModeDisplay(void *pData)
+{
+       TelDataRevConfig_t *pMode = NULL;
+       pMode= (TelDataRevConfig_t *)pData;
+
+       printf("Forced RevA Mode :[");
+       switch(*pMode){
+               case TAPI_DATA_REVA:
+                       printf("REV-A]");
+                       break;
+               case TAPI_DATA_REV0:
+                       printf("REV-0]");
+                       break;
+               default:
+                       printf("Unknown Forced Rev Mode\n");
+                       break;
+       }
+       return;
+}
+
+void EvtPacketDataCallConfigDisplay(void *pData)
+{
+       TelDataPacketDataCallConfig_t *pPacketData = NULL;
+       TelDataPacketConfigType_t type;
+       TelDataPacketParam_t param;
+       pPacketData= (TelDataPacketDataCallConfig_t *)pData;
+
+       type = pPacketData->type;
+       memcpy(&param, &pPacketData->param, sizeof(TelDataPacketParam_t));
+
+       printf("Packet Data Call Type :");
+       switch(type){
+               case TAPI_DATA_PACKET_DATA_TYPE_QNC:
+                       printf("QNC");
+                       break;
+               case TAPI_DATA_PACKET_DATA_TYPE_MIP:
+                       printf("MIP");
+                       break;
+               case TAPI_DATA_PACKET_DATA_TYPE_CALL_TYPE:
+                       printf("Call Type");
+                       break;
+               case TAPI_DATA_PACKET_DATA_TYPE_PKT_ORIGIN_STRING:
+                       printf("ORG STRING");
+                       break;
+               case TAPI_DATA_PACKET_DATA_TYPE_PAP_USER_ID:
+                       printf("USER ID");
+                       break;
+               case TAPI_DATA_PACKET_DATA_TYPE_PAP_USER_PASSWORD:
+                       printf("USER PASSWORD");
+                       break;
+               default:
+                       printf("\nUnknown Type\n");
+                       break;
+       }
+
+       return;
+}
+
+void  cdma_data_async_event_callback(TelTapiEvent_t* event)
+{
+       printf("\n data_async_event_callback enter\n");
+
+       printf("Request ID : [0x%x]\n", event->RequestId);
+
+       printf("Status : [");
+       switch(event->Status)
+       {
+               case TAPI_DATA_NO_ERR:
+                       printf("No Err]\n");
+                       break;
+
+               case TAPI_DATA_PARAMETER_ERR:
+                       printf("Parameter Err]\n");
+                       break;
+
+               case TAPI_DATA_OFFLINE_ERR:
+                       printf("Phone Off]\n");
+                       break;
+
+               case TAPI_DATA_OTHER_ERR:
+               default:
+                       printf("Unknown Err]\n");
+                       break;
+       }
+
+       printf("event->EventType : %d\n", event->EventType);
+       printf("event->EventType : %d\n", TAPI_EVENT_DATA_PACKET_DATA_CALL_CONFIGURATION_GET_CNF);
+
+       switch(event->EventType)
+       {
+               case    TAPI_EVENT_DATA_MIP_NAI_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_MIP_NAI_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtMipNaiGetCnfCB(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_CURRENT_NAI_INDEX_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_CURRENT_NAI_INDEX_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtCurrentNaiIndexGetCnfCB(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_TE2_STATUS_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_TE2_STATUS_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtTe2StatusDisplay(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_TE2_STATUS_NOTI:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_TE2_STATUS_NOTI]\n");
+                               EvtTe2StatusDisplay(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_BYTES_COUNTER_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_BYTES_COUNTER_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtBytesCountDisplay(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_DS_TE2_DATA_RATE_INFO_NOTI:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_DS_TE2_DATA_RATE_INFO_NOTI]\n");
+                               EvtDataRateInfoDisplay(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_ROAM_GUARD_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_ROAM_GUARD_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtRoamGuardDisplay(event->pData);
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_MODEM_NAI_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_MODEM_NAI_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtModemNaiDisplay(event->pData);
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_EVDO_REV_CONFIG_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_EVDO_REV_CONFIG_GET_CNF]\n");
+                               if(event->Status ==TAPI_DATA_NO_ERR)
+                                       EvtForceRevAModeDisplay(event->pData);
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_DDTM_CONFIGURATION_GET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_DDTM_CONFIGURATION_GET_CNF]\n");
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_MIP_NAI_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_MIP_NAI_SET_CNF]\n");
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_BYTES_COUNTER_RESET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_BYTES_COUNTER_RESET_CNF]\n");
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_HDR_SESSION_CLEAR_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_HDR_SESSION_CLEAR_SET_CNF]\n");
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_ROAM_GUARD_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_ROAM_GUARD_SET_CNF]\n");
+                       }
+                       break;
+
+               case    TAPI_EVENT_DATA_EVDO_REV_CONFIG_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_FORCE_REVA_MODE_SET_CNF]\n");
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_DDTM_CONFIGURATION_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_DDTM_CONFIGURATION_SET_CNF]\n");
+                       }
+                       break;
+               case    TAPI_EVENT_DATA_RESTORE_NAI_SET_CNF:
+                       {
+                               printf("Event Type:  [TAPI_EVENT_DATA_RESTORE_NAI_SET_CNF]\n");
+                       }
+                       break;
+               case TAPI_EVENT_DATA_PACKET_DATA_CALL_CONFIGURATION_GET_CNF:
+                       {
+                               printf("Event Type: [TAPI_EVENT_DATA_PACKET_DATA_CALL_CONFIGURATION_GET_CNF]");
+                               EvtPacketDataCallConfigDisplay(event->pData);
+                       }
+                       break;
+
+               default:
+                       printf("Event Type: unknown event:[%d]\n", event->EventType);
+
+                       break;
+       }
+
+}
+
+
+int cdma_data_read_key_input(void)
+{
+       int ret;
+       char buf[512] = {0, };
+       char msg[512];
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+       int RequestID;
+
+       memset(buf,0, sizeof(buf));
+       memset(msg,0,sizeof(msg));
+
+       printf("*************** CDMA DATA TEST MENU ******************\n");
+       printf("0.  DSPin Control \n");
+       printf("3.  Get Mobile IP NAI \n");
+       printf("4.  Set Mobile IP NAI \n");
+       printf("5.  Get Current NAI Index \n");
+       printf("6.  Get TE2 Status \n");
+       //printf("7.  Reset Data bytes counter \n");
+       //printf("8.  Get Data bytes counter \n");
+       //printf("9.  Get Incoming Call Type \n");
+       //printf("10. Set Incoming Call Type \n");
+       printf("11. Get Data Service Baud Rate\n");
+       printf("12. Set Data Service Baud Rate\n");
+       //printf("13. Set HDR Session Clear\n");
+       printf("14. Get Roam Guard Mode\n");
+       printf("15. Set Roam Guard Mode\n");
+       printf("16. Get Modem NAI\n");
+       printf("17. Set Modem NAI\n");
+       printf("18. Get DS Type\n");
+       printf("19. Set DS Type\n");
+       printf("20. Get EVDO Rev Config\n");
+       printf("21. Set EVDO Rev Config(Rev-A or Rev-0)\n");
+       printf("22. Get Singed In State Mode\n");
+       printf("23. Set Singed In State Mode\n");
+       printf("24. Set the NAI value to factory setting\n");
+       printf("25. Get Dedicated Data Transmission Mode\n");
+       printf("26. Set Dedicated Data Transmission Mode\n");
+       printf("27. Get DSWorking Mode\n");
+       printf("28. Set DSWorking Mode\n");
+       printf("\n  BONUS!! ^^;;\n");
+       printf("29. Get Packet Data Call Configuration\n");
+       printf("29. Set Packet Data Call Configuration\n");
+       printf("q. quit\n");
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+
+       // Get Mobile IP NAI
+       if( memcmp(buf,"3",sizeof("3")-1) == 0 )
+       {
+               TelDataNAIIndex_t MipNaiIdx = TAPI_DATA_FACTORY_NAI;
+               unsigned short ParamMask = TAPI_DATA_NAI_MIP_MASK_REVERSE_TUNNEL + TAPI_DATA_NAI_MIP_MASK_HOME_ADDRESS + \
+                                          TAPI_DATA_NAI_MIP_MASK_PRIMARY_HOME_AGENT_IP;//TAPI_DATA_NAI_MIP_MASK_USER_NAI + TAPI_DATA_NAI_MIP_MASK_SPI_MN_HA + TAPI_DATA_NAI_MIP_MASK_SPI_MN_AAA;
+               ret_val = tel_get_data_mobile_ipnai (&MipNaiIdx, &ParamMask, &RequestID);
+               printf(" \n tel_get_data_mobile_ipnai Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Mobile IP NAI
+       if( memcmp(buf,"4",sizeof("4")-1) == 0 )
+       {
+               TelDataMipNaiParam_t MipNaiParam;
+               ComposeMobileIPNaiParametr(&MipNaiParam);
+               ret_val = tel_set_data_mobile_ipnai (&MipNaiParam, &RequestID);
+               printf(" \n tel_set_data_mobile_ipnai Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Current NAI Index
+       if( memcmp(buf,"5",sizeof("5")-1) == 0 )
+       {
+               ret_val = tel_get_data_current_nai_index(&RequestID);
+               printf(" \n tel_get_data_current_nai_index Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get TE2 Status
+       if( memcmp(buf,"6",sizeof("6")-1) == 0 )
+       {
+               ret_val = tel_get_data_te2_status(&RequestID);
+               printf(" \n tel_get_data_te2_status Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Roam Guard Mode
+       if( memcmp(buf,"14",sizeof("14")-1) == 0 )
+       {
+               ret_val = tel_get_data_roam_guard(&RequestID);
+               printf(" \n tel_get_data_roam_guard Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Roam Guard Mode
+       if( memcmp(buf,"15",sizeof("15")-1) == 0 )
+       {
+               TelDataRoamGuardMode_t RoamGuard = TAPI_DATA_ROAM_GUARD_DEFAULT;
+               ret_val = tel_set_data_roam_guard(&RoamGuard, &RequestID);
+               printf(" \n tel_set_data_roam_guard Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Modem NAI
+       if( memcmp(buf,"16",sizeof("16")-1) == 0 )
+       {
+               ret_val = tel_get_data_nai(&RequestID);
+               printf(" \n tel_get_data_nai Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Modem NAI
+       if( memcmp(buf,"17",sizeof("17")-1) == 0 )
+       {
+               TelDataModemNAIMode_t ModemNai = TAPI_DATA_MODEM_NAI_OFF;
+               ret_val = tel_set_data_nai(&ModemNai, &RequestID);
+               printf(" \n tel_set_data_nai Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // 20. Get EVDO Rev Config
+       if( memcmp(buf,"20",sizeof("20")-1) == 0 )
+       {
+               ret_val = tel_get_data_evdo_rev_config(&RequestID);
+               printf(" \n tel_get_data_evdo_rev_config Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set EVDO Rev Config(Rev-A or Rev-0)
+       if( memcmp(buf,"21",sizeof("21")-1) == 0 )
+       {
+               //TelDataRevConfig_t RevConfig = TAPI_DATA_REVA;
+               //ret_val = TelTapiDataSetEVDORevConfig (&RevConfig, &RequestID);
+               //printf(" \n TelTapiDataSetForceRevAMode Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Singed In State Mode
+       if( memcmp(buf,"22",sizeof("22")-1) == 0 )
+       {
+               //ret_val = tel_get_data_signed_in_sate (&RequestID);
+               printf(" \n tel_get_data_signed_in_sate Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Singed In State Mode
+       if( memcmp(buf,"23",sizeof("23")-1) == 0 )
+       {
+               //TelDataSignStatus_t SignStatus = TAPI_DATA_PACKET_NAI_SIGNIN_OUT;
+               //ret_val = tel_set_data_signed_in_sate (&SignStatus, &RequestID);
+               //printf(" \n tel_set_data_signed_in_sate Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set the NAI value to factory setting
+       if( memcmp(buf,"24",sizeof("24")-1) == 0 )
+       {
+               ret_val = tel_restore_data_nai(&RequestID);
+               printf(" \n tel_restore_data_nai Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Dedicated Data Transmission Mode
+       if( memcmp(buf,"25",sizeof("25")-1) == 0 )
+       {
+               ret_val = tel_get_data_ddtm_config(&RequestID);
+               printf(" \n tel_get_data_ddtm_cofig Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Dedicated Data Transmission Mode
+       if( memcmp(buf,"26",sizeof("26")-1) == 0 )
+       {
+               TelDataDDTMStatus_t DDTMStatus= TAPI_DATA_DDTM_MODE_OFF;
+               ret_val = tel_set_data_ddtm_config (&DDTMStatus, &RequestID);
+               printf(" \n tel_set_data_ddtm_cofig Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set DSWorking Mode
+       if( memcmp(buf,"28",sizeof("28")-1) == 0 )
+       {
+               //TelDataDSWorkingMode_t DSWorkingMode = TAPI_DATA_DSWORKING_MODE_OFF;
+               //ret_val = tel_set_data_ds_working_mode (&DSWorkingMode, &RequestID);
+               //printf(" \n tel_set_data_ds_working_mode Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Get Packet Data Call Config
+       if( memcmp(buf,"29",sizeof("29")-1) == 0 )
+       {
+               TelDataPacketConfigType_t Type;
+               int num;
+
+               printf("Select Config Type\n");
+               printf("0. QNC\n");
+               printf("1. Mobile IP\n");
+               printf("2. Packet Data Call Type\n");
+               printf("3. Packet Orig Str\n");
+               printf("4. Pap User ID\n");
+               printf("5. Pap Password\n");
+               printf(">> ");
+               scanf("%d", &num);
+
+               Type = num;
+
+               //ret_val = TelTapiDataGetPacketDataCallConfiguration(&Type, &RequestID);
+               printf(" \n TelTapiDataGetPacketDataCallConfiguration Tapi return returnStatus value is [%x]  RequestID : [%d] \n ", ret_val, RequestID);
+       }
+
+       // Set Packet Data Call Config
+       if( memcmp(buf,"30",sizeof("28")-1) == 0 )
+       {
+               printf("NOT YET\n");
+       }
+       // Exit
+       if( memcmp(buf,"q",sizeof("q")-1) == 0)
+       {
+               return -1;
+       }
+
+       return 0;
+}
+
+
+void cdma_data_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+               {
+                       if (FD_ISSET(0, &readfds))
+                       {
+                               if(cdma_data_read_key_input() < 0)
+                                       break;
+                       }
+               }
+       }
+}
+
+void cdma_data_test_unsubscribe_tapi_event(void)
+{
+       int i = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       for(i=0;i<NUM_OF_CDMA_DATA_EVENT; i++){
+               api_err = tel_deregister_event(cdma_data_subscription_id[i]);
+               if(api_err != TAPI_API_SUCCESS){
+                       TEST_DEBUG("tel_deregister_event isn't unsubscribed. sub id is %d api_err is %d\n",cdma_data_subscription_id[i],api_err);
+                       break;
+               }
+
+       }
+
+       tel_deinit();
+}
+
+void cdma_data_test_subscribe_tapi_events (void)
+{
+       int i = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       int CdmaDataEvt[NUM_OF_CDMA_DATA_EVENT] = {     TAPI_EVENT_DATA_MIP_NAI_GET_CNF,
+               TAPI_EVENT_DATA_MIP_NAI_SET_CNF,
+               TAPI_EVENT_DATA_CURRENT_NAI_INDEX_GET_CNF,
+               TAPI_EVENT_DATA_TE2_STATUS_GET_CNF,
+               TAPI_EVENT_DATA_TE2_STATUS_NOTI,
+               TAPI_EVENT_DATA_BYTES_COUNTER_RESET_CNF,
+               TAPI_EVENT_DATA_BYTES_COUNTER_GET_CNF,
+               TAPI_EVENT_DATA_DS_TE2_DATA_RATE_INFO_NOTI,
+               TAPI_EVENT_DATA_HDR_SESSION_CLEAR_SET_CNF,
+               TAPI_EVENT_DATA_ROAM_GUARD_GET_CNF,
+               TAPI_EVENT_DATA_ROAM_GUARD_SET_CNF,
+               TAPI_EVENT_DATA_MODEM_NAI_GET_CNF,
+               TAPI_EVENT_DATA_EVDO_REV_CONFIG_GET_CNF,
+               TAPI_EVENT_DATA_EVDO_REV_CONFIG_SET_CNF,
+               TAPI_EVENT_DATA_RESTORE_NAI_SET_CNF,
+               TAPI_EVENT_DATA_DDTM_CONFIGURATION_GET_CNF,
+               TAPI_EVENT_DATA_DDTM_CONFIGURATION_SET_CNF,
+               TAPI_EVENT_DATA_PACKET_DATA_CALL_CONFIGURATION_GET_CNF,
+
+       };
+
+       //TEST_DEBUG("########### CDMA DATA TEST #############\n");
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               for(i=0;i<NUM_OF_CDMA_DATA_EVENT; i++){
+                       api_err = tel_register_event(CdmaDataEvt[i], &cdma_data_subscription_id[i],(TelAppCallback)&cdma_data_async_event_callback, NULL);
+
+                       if(api_err != TAPI_API_SUCCESS){
+                               TEST_DEBUG("tel_register_event isn't subscribed. sub id is %d api_err is %d\n",cdma_data_subscription_id[i],api_err);
+                               break;
+                       }
+               }
+       }
+       else {
+
+               TEST_DEBUG("tel_init() failed");
+       }
+
+}
diff --git a/src/test_apps/tapi_cfg_test.c b/src/test_apps/tapi_cfg_test.c
new file mode 100644 (file)
index 0000000..f8a02da
--- /dev/null
@@ -0,0 +1,855 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <assert.h>
+#include <glib.h>
+
+#include "ITapiCfg.h"
+#include "TapiCommon.h"
+#include "TelErr.h"
+#include "TelUtility.h"
+#include "vconf.h"
+#include "TapiEvent.h"
+
+//#include <ipcparam.h>
+
+#define TEST_MAX_CFG_AKEY_LEN 26
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}edata_t;
+
+#define TEST_DEBUG(frmt, args...) \
+       {do { fprintf(stderr, "\n[CFG Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+
+int error_code;
+extern int EvtDeliveryHandle ;
+static unsigned int *  Cfg_subscription_id;
+
+static int _PrintSIOMode(TelCfgSIOMode_t mode)
+{
+       switch(mode)
+       {
+               case TAPI_CFG_SIO_U1_DIAG_USB2_GPS:
+                       TEST_DEBUG("SIO mode: TAPI_CFG_SIO_U1_DIAG_USB2_GPS ");
+                       break;
+               case TAPI_CFG_SIO_U1_HFK_USB2_GPS:
+                       TEST_DEBUG("SIO mode: TAPI_CFG_SIO_U1_HFK_USB2_GPS ");
+                       break;
+               case TAPI_CFG_SIO_U1_HFK_USB2_DIAG:
+                       TEST_DEBUG("SIO mode: TAPI_CFG_SIO_U1_HFK_USB2_DIAG ");
+                       break;
+               default:
+                       TEST_DEBUG("SIO mode: None ");
+                       break;
+       }
+
+       return 0;
+}
+
+static int  tapi_cfg_callback  (TelTapiEvent_t *event)
+{
+       TEST_DEBUG("EVENT STATUS:[0x%x]", event->Status);
+
+       TEST_DEBUG("Status = [0x%x]", event->Status);
+
+       switch(event->EventClass)
+       {
+               case TAPI_EVENT_CLASS_CFG:
+               {
+                       switch(event->EventType)
+                       {
+                               case TAPI_EVENT_CFG_GET_A_KEY_CNF:
+                               {
+                                       TelCfgAKeyInfo_t Akey_info;
+                                       memset(&Akey_info, 0, sizeof(Akey_info));
+
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_A_KEY_CNF");
+
+                                       memcpy(&Akey_info, event->pData, sizeof(TelCfgAKeyInfo_t));
+
+                                       TEST_DEBUG("Akey:[%s]",Akey_info.A_key);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_VERIFY_A_KEY_CNF:
+                               {
+                                       TelCfgAKeyVerifyResult_t result;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_VERIFY_A_KEY_CNF");
+                                       memcpy(&result, event->pData, sizeof(TelCfgAKeyVerifyResult_t));
+                                       switch(result)
+                                       {
+                                               case TAPI_CFG_AKEY_VERIFY_FAIL:
+                                               {
+                                                       TEST_DEBUG("A-Key verify fail");
+                                               }
+                                                       break;
+
+                                               case TAPI_CFG_AKEY_VERIFY_OK:
+                                               {
+                                                       TEST_DEBUG("A-Key verify success");
+                                               }
+                                                       break;
+                                               default :
+                                                       TEST_DEBUG(" Unknown value : [%d] ", result);
+                                                       break;
+                                       }
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_MSL_INFO_CNF:
+                               {
+                                       TelCfgMSLInfo_t msl_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_MSL_INFO_CNF");
+                                       memcpy(&msl_info, event->pData, sizeof(TelCfgMSLInfo_t));
+                                       TEST_DEBUG("msl code:[%s]", msl_info.MslCode);
+                                       TEST_DEBUG("Otksl code:[%s]", msl_info.OtkslCode);
+                                       TEST_DEBUG("Otksl flag:[%d]", msl_info.bOtksl_flag);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF:
+                               {
+                                       TelCfgVocOption_t voc_option;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF");
+                                       memcpy(&voc_option, event->pData, sizeof(TelCfgVocOption_t));
+                                       TEST_DEBUG("vocoder option:[%d]", voc_option);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF:
+                               {
+                                       TelCfgHiddenMenuAccessType_t type;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF");
+                                       memcpy(&type, event->pData, sizeof(TelCfgHiddenMenuAccessType_t));
+                                       TEST_DEBUG("access type:[%d]", type);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF:
+                               {
+                                       TelCfgCurrentCarrier_t carrier;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF");
+                                       memcpy(&carrier, event->pData, sizeof(TelCfgCurrentCarrier_t));
+                                       TEST_DEBUG("carrier:[%d]", carrier);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF:
+                               {
+                                       TelCfgActivationDateInfo_t date_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF");
+                                       memcpy(&date_info, event->pData, sizeof(TelCfgActivationDateInfo_t));
+                                       TEST_DEBUG("year:[%d]", date_info.year);
+                                       TEST_DEBUG("month:[%d]", date_info.month);
+                                       TEST_DEBUG("day:[%d]", date_info.day);
+                                       TEST_DEBUG("hour:[%d]", date_info.hour);
+                                       TEST_DEBUG("minute:[%d]", date_info.minute);
+                                       TEST_DEBUG("second:[%d]", date_info.second);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF:
+                               {
+                                       TelCfgReconditionedInfo_t date_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF");
+                                       memcpy(&date_info, event->pData, sizeof(TelCfgReconditionedInfo_t));
+                                       TEST_DEBUG("status(0:NO, 1:YES):[%d]", date_info.status);
+                                       TEST_DEBUG("year:[%d]", date_info.year);
+                                       TEST_DEBUG("month:[%d]", date_info.month);
+                                       TEST_DEBUG("day:[%d]", date_info.day);
+                                       TEST_DEBUG("hour:[%d]", date_info.hour);
+                                       TEST_DEBUG("minute:[%d]", date_info.minute);
+                                       TEST_DEBUG("second:[%d]", date_info.second);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_SIO_MODE_CNF:
+                               {
+                                       TelCfgSIOMode_t mode;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_SIO_MODE_CNF");
+                                       memcpy(&mode, event->pData, sizeof(TelCfgSIOMode_t));
+                                       _PrintSIOMode(mode);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_SIO_MODE_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_SIO_MODE_CNF");
+                               }
+                                       break;
+                               case TAPI_CFG_EVENT_DEFAULTCFG_IND:
+                               {
+                                       TEST_DEBUG("TAPI_CFG_EVENT_DEFAULTCFG_IND");
+                               }
+                                       break;
+                               default :
+                                       TEST_DEBUG(" Unknown Event : [%d] ", event->EventType);
+                                       break;
+                       }
+                       break;
+               }
+
+               default:
+                       break;
+
+       }
+
+       TEST_DEBUG("###############    event processing is done....###############");
+       return 0;
+}
+
+
+int cfg_read_key_input(void)
+{
+       int ret;
+       char buf[512] = {0, };
+       char msg[512];
+       char  diallingNum[256];
+       int     diallingNum_len=0;
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       memset(buf,0, sizeof(buf));
+       memset(diallingNum,0,sizeof(diallingNum));
+       memset(msg,0,sizeof(msg));
+       diallingNum_len=0;
+
+
+       TEST_DEBUG("*************** CFG TEST MENU     ***************");
+       TEST_DEBUG("1g.TelTapiCfgGetAKey");
+       TEST_DEBUG("1s.TelTapiCfgVerifyAKey");
+       TEST_DEBUG("2g.TelTapiCfgGetMSLInfo");
+       TEST_DEBUG("3g.TelTapiCfgGetVocoderOption");
+       TEST_DEBUG("3s.TelTapiCfgSetVocoderOption               <(default/evrc/13k/8k)>");
+       TEST_DEBUG("4g.TelTapiCfgGetHiddenMenuAccess");
+       TEST_DEBUG("4s.TelTapiCfgSetHiddenMenuAccess    <(disable/enable)>");
+       TEST_DEBUG("5g.TelTapiCfgGetCurrentCarrier");
+       TEST_DEBUG("5s.TelTapiCfgSetCurrentCarrier      <(test/skt/ktf/lgt/verizon/sprint)>");
+       TEST_DEBUG("6g.TelTapiCfgGetActivationDate");
+       TEST_DEBUG("7g.TelTapiCfgGetReconditionedDate");
+       TEST_DEBUG("8g.TelTapiCfgGetSIOMode");
+       TEST_DEBUG("8s.TelTapiCfgSetSIOMode     <mode(0/1/2)>");
+       TEST_DEBUG("9s.tapi_cfg_defaultconfiguration_set        FULL[0]FACTORY[1]SERVICE[2]CUSTOM[3]");
+       TEST_DEBUG("0.exit");
+       TEST_DEBUG("*****************************************************\n");
+
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       if( memcmp(buf,"0",sizeof("0")-1) == 0 )
+       {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu");
+               return -1;
+       }
+       else if( memcmp(buf,"1g",sizeof("1g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_akey....");
+               ret_val = tel_get_cfg_akey();
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"1s",sizeof("1s")-1) == 0 )
+       {
+               char    tempAkey[TAPI_CFG_A_KEY_DIGITS_MAX+1];
+               int             length = 0;
+               TelCfgAKeyInfo_t Akey_info;
+
+               strncpy(tempAkey, &buf[3], TAPI_CFG_A_KEY_DIGITS_MAX);
+
+               length = strlen(tempAkey);
+
+               memset(&Akey_info, 0, sizeof(Akey_info));
+
+               strncpy(Akey_info.A_key,tempAkey, length-1);  // removing '/n' form the end of the string
+
+               TEST_DEBUG("tel_verify_cfg_akey with AKey [%s]",Akey_info.A_key);
+
+               ret_val = tel_verify_cfg_akey(&Akey_info);
+
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"2g",sizeof("2g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_msl_info....");
+               ret_val = tel_get_cfg_msl_info();
+               TEST_DEBUG(" Tapi return value: [0x%x] ", ret_val);
+       }
+       else if( memcmp(buf,"3g",sizeof("3g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_vocoder_option....");
+               ret_val = tel_get_cfg_vocoder_option();
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"3s",sizeof("3s")-1) == 0 )
+       {
+               TelCfgVocOption_t voc_opt = 0;
+               if(memcmp(buf+3,"default",sizeof("default")-1) == 0 )
+                       voc_opt =TAPI_CFG_VOC_OPTION_DEFAULT;
+               else if(memcmp(buf+3,"evrc",sizeof("evrc")-1) == 0 )
+                       voc_opt =TAPI_CFG_VOC_OPTION_EVRC;
+               else if(memcmp(buf+3,"13k",sizeof("13k")-1) == 0 )
+                       voc_opt =TAPI_CFG_VOC_OPTION_13K;
+               else if(memcmp(buf+3,"8k",sizeof("8k")-1) == 0 )
+                       voc_opt =TAPI_CFG_VOC_OPTION_8K;
+               else{
+                       TEST_DEBUG("Unknown vocoder option");
+                       return 0;
+               }
+
+               TEST_DEBUG("tel_set_cfg_vocoder_option....voc_opt:[%d]",voc_opt);
+               ret_val = tel_set_cfg_vocoder_option(voc_opt);
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"4g",sizeof("4g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_hidden_menu_access....");
+               ret_val = tel_get_cfg_hidden_menu_access();
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"4s",sizeof("4s")-1) == 0 )
+       {
+               TelCfgHiddenMenuAccessType_t type = 0;
+               if(memcmp(buf+3,"disable",sizeof("disable")-1) == 0 )
+                       type =TAPI_CFG_HIDDEN_MENU_DISABLE;
+               else if(memcmp(buf+3,"enable",sizeof("enable")-1) == 0 )
+                       type =TAPI_CFG_HIDDEN_MENU_ENABLE;
+               else{
+                       TEST_DEBUG("Unknown type");
+                       return 0;
+               }
+
+               TEST_DEBUG("tel_set_cfg_hidden_menu_access....type:[%d]",type);
+               ret_val = tel_set_cfg_hidden_menu_access(type);
+               TEST_DEBUG(" Tapi return value: [0x%x] ", ret_val);
+       }
+       else if( memcmp(buf,"5g",sizeof("5g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_serving_carrier....");
+               ret_val = tel_get_cfg_serving_carrier();
+               TEST_DEBUG(" Tapi return value: [0x%x] ", ret_val);
+       }
+       else if( memcmp(buf,"5s",sizeof("5s")-1) == 0 )
+       {
+               TelCfgCurrentCarrier_t Carrier = 0;
+               TEST_DEBUG("buf :[%s]....",buf+3);
+               if(memcmp(buf+3,"test",sizeof("test")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_TEST;
+               else if(memcmp(buf+3,"skt",sizeof("skt")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_SKT;
+               else if(memcmp(buf+3,"ktf",sizeof("ktf")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_KTF;
+               else if(memcmp(buf+3,"lgt",sizeof("lgt")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_LGT;
+               else if(memcmp(buf+3,"verizon",sizeof("verizon")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_VERIZON;
+               else if(memcmp(buf+3,"sprint",sizeof("sprint")-1) == 0 )
+                       Carrier =TAPI_CFG_CARRIER_SPRINT;
+               else{
+                       TEST_DEBUG("Unknown Carrier....");
+                       return 0;
+               }
+
+               TEST_DEBUG("tel_set_cfg_serving_carrier....Carrier:[%d]",Carrier);
+               ret_val = tel_set_cfg_serving_carrier(Carrier);
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"6g",sizeof("6g")-1) == 0 )
+       {
+               TEST_DEBUG("TelTapiCfgGetActivationDate....");
+               ret_val = tel_get_cfg_activated_date_of_phone();
+               TEST_DEBUG(" Tapi return value: [0x%x]  ", ret_val);
+       }
+       else if( memcmp(buf,"7g",sizeof("7g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_reconditioned_data_of_phone....");
+               ret_val = tel_get_cfg_reconditioned_data_of_phone();
+               TEST_DEBUG(" Tapi return value: [0x%x]   ", ret_val);
+       }
+       else if( memcmp(buf,"8g",sizeof("8g")-1) == 0 )
+       {
+               TEST_DEBUG("tel_get_cfg_sio_mode....");
+               ret_val = tel_get_cfg_sio_mode();
+               TEST_DEBUG(" Tapi return value: [0x%x] ", ret_val);
+       }
+       else if( memcmp(buf,"8s",sizeof("8s")-1) == 0 )
+       {
+               TelCfgSIOMode_t mode = 0;
+               if(memcmp(buf+3,"0",sizeof("0")-1) == 0 )
+                       mode =TAPI_CFG_SIO_U1_DIAG_USB2_GPS;
+               else if(memcmp(buf+3,"1",sizeof("1")-1) == 0 )
+                       mode =TAPI_CFG_SIO_U1_HFK_USB2_GPS;
+               else if(memcmp(buf+3,"2",sizeof("2")-1) == 0 )
+                       mode =TAPI_CFG_SIO_U1_HFK_USB2_DIAG;
+               else{
+                       TEST_DEBUG("Unknown mode");
+                       return 0;
+               }
+               TEST_DEBUG("tel_set_cfg_sio_mode....mode:[%d]",mode);
+               ret_val = tel_set_cfg_sio_mode(mode);
+               TEST_DEBUG(" Tapi return value: [0x%x] ", ret_val);
+       }
+
+       else if( memcmp(buf,"9s",sizeof("9s")-1) == 0 )
+       {
+               TelDefaultCfg_t bType =0;
+
+               if(memcmp(buf+3,"0",sizeof("0")-1) == 0 )
+                       bType = TAPI_CFG_DEFAULT_FULL;
+               else if(memcmp(buf+3,"1",sizeof("1")-1) == 0 )
+                       bType = TAPI_CFG_DEFAULT_FACTORY;
+               else if(memcmp(buf+3,"2",sizeof("2")-1) == 0 )
+                       bType = TAPI_CFG_DEFAULT_SERVICE;
+               else if(memcmp(buf+3,"3",sizeof("3")-1) == 0 )
+                       bType = TAPI_CFG_DEFAULT_CUSTOM;
+
+               tel_set_cfg_default_configuration(bType);
+       }
+
+       return 0;
+}
+
+
+void cfg_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+               {
+                       if (FD_ISSET(0, &readfds))
+                       {
+                               if(cfg_read_key_input()<0)
+                                       break;
+                       }
+               }
+       }
+}
+
+#if 0
+static int  tapi_cfg_callback  (TelTapiEventClass_t    eventClass,int  eventType, int  param1,void * param2)
+{
+       TEST_DEBUG("EVENT STATUS:[%d]", param1);
+
+       switch(eventClass)
+       {
+               case TAPI_EVENT_CLASS_CFG:
+               {
+                       switch(eventType)
+                       {
+                               case TAPI_EVENT_CFG_GET_A_KEY_CNF:
+                               {
+                                       TelCfgAKeyInfo_t Akey_info;
+                                       memset(&Akey_info, 0, sizeof(Akey_info));
+
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_A_KEY_CNF");
+
+                                       memcpy(&Akey_info, param2, sizeof(TelCfgAKeyInfo_t));
+
+                                       TEST_DEBUG("Akey:[%s]",Akey_info.A_key);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_VERIFY_A_KEY_CNF:
+                               {
+                                       TelCfgAKeyVerifyResult_t result;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_VERIFY_A_KEY_CNF");
+                                       memcpy(&result, param2, sizeof(TelCfgAKeyVerifyResult_t));
+                                       switch(result)
+                                       {
+                                               case TAPI_CFG_AKEY_VERIFY_FAIL:
+                                               {
+                                                       TEST_DEBUG("A-Key verify fail");
+                                               }
+                                                       break;
+
+                                               case TAPI_CFG_AKEY_VERIFY_OK:
+                                               {
+                                                       TEST_DEBUG("A-Key verify success");
+                                               }
+                                                       break;
+                                               default :
+                                                       TEST_DEBUG(" Unknown value : [%d] ", result);
+                                                       break;
+                                       }
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_MSL_INFO_CNF:
+                               {
+                                       TelCfgMSLInfo_t msl_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_MSL_INFO_CNF");
+                                       memcpy(&msl_info, param2, sizeof(TelCfgMSLInfo_t));
+                                       TEST_DEBUG("msl code:[%s]", msl_info.MslCode);
+                                       TEST_DEBUG("Otksl code:[%s]", msl_info.OtkslCode);
+                                       TEST_DEBUG("Otksl flag:[%d]", msl_info.Otksl_flag);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF:
+                               {
+                                       TelCfgVocOption_t voc_option;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF");
+                                       memcpy(&voc_option, param2, sizeof(TelCfgVocOption_t));
+                                       TEST_DEBUG("vocoder option:[%d]", voc_option);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF:
+                               {
+                                       TelCfgHiddenMenuAccessType_t type;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF");
+                                       memcpy(&type, param2, sizeof(TelCfgHiddenMenuAccessType_t));
+                                       TEST_DEBUG("access type:[%d]", type);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF:
+                               {
+                                       TelCfgCurrentCarrier_t carrier;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF");
+                                       memcpy(&carrier, param2, sizeof(TelCfgCurrentCarrier_t));
+                                       TEST_DEBUG("carrier:[%d]", carrier);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF:
+                               {
+                                       TelCfgActivationDateInfo_t date_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF");
+                                       memcpy(&date_info, param2, sizeof(TelCfgActivationDateInfo_t));
+                                       TEST_DEBUG("year:[%d]", date_info.year);
+                                       TEST_DEBUG("month:[%d]", date_info.month);
+                                       TEST_DEBUG("day:[%d]", date_info.day);
+                                       TEST_DEBUG("hour:[%d]", date_info.hour);
+                                       TEST_DEBUG("minute:[%d]", date_info.minute);
+                                       TEST_DEBUG("second:[%d]", date_info.second);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF:
+                               {
+                                       TelCfgReconditionedInfo_t date_info;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF");
+                                       memcpy(&date_info, param2, sizeof(TelCfgReconditionedInfo_t));
+                                       TEST_DEBUG("status(0:NO, 1:YES):[%d]", date_info.status);
+                                       TEST_DEBUG("year:[%d]", date_info.year);
+                                       TEST_DEBUG("month:[%d]", date_info.month);
+                                       TEST_DEBUG("day:[%d]", date_info.day);
+                                       TEST_DEBUG("hour:[%d]", date_info.hour);
+                                       TEST_DEBUG("minute:[%d]", date_info.minute);
+                                       TEST_DEBUG("second:[%d]", date_info.second);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_GET_SIO_MODE_CNF:
+                               {
+                                       TelCfgSIOMode_t mode;
+                                       TEST_DEBUG("TAPI_EVENT_CFG_GET_SIO_MODE_CNF");
+                                       memcpy(&mode, param2, sizeof(TelCfgSIOMode_t));
+                                       _PrintSIOMode(mode);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_CFG_SET_SIO_MODE_CNF:
+                               {
+                                       TEST_DEBUG("TAPI_EVENT_CFG_SET_SIO_MODE_CNF");
+                               }
+                                       break;
+
+                               default :
+                                       TEST_DEBUG(" Unknown Event : [%d] ", eventType);
+                                       break;
+                       }
+                       break;
+               }
+
+               default:
+                       break;
+
+       }
+
+       TEST_DEBUG("###############    event processing is done....###############");
+       return 0;
+}
+
+bool on_cfg_event_received (EvtSysEventSourceId_t src_id, const char* noti_id, GArray* parameters, void* local_data)
+{
+       EvtSysEventProperty_t* e;
+       int len;
+       int group;
+       int type;
+       int reqid;
+       int status;
+
+       assert(parameters->len == 5);
+
+       /*      1 param is      tapi event group   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 0);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       group = e->value.i;
+       //TEST_DEBUG("received group is :%d ", group);
+
+       /*      2 param is      tapi event type   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 1);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       type = e->value.i;
+       //TEST_DEBUG("received event type is :%d ", type);
+
+       /*      3 param is      Response ID   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 2);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       reqid = e->value.i;
+       //TEST_DEBUG("received Request ID is :%d ", reqid);
+
+       /*      4 param is      Status   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 3);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       status = e->value.i;
+       //TEST_DEBUG("status is :%d ", status);
+
+
+       if (status != 0x00)
+       {
+               TEST_DEBUG(" ##### Received Error## status:[%d] for event type[0x%x]", status, type);
+               return true;
+       }
+
+       /*      over allocate this after receiving the len  */
+       char *data;
+       guchar *result;
+       size_t  out_len;
+
+       /*      5 param is      data   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 4);
+       assert(e->type == DBUS_TYPE_STRING);
+
+       data = (char *)e->value.i;
+
+       len = strlen(data);
+
+       TAPI_BASE64_DECODE(data, result, &out_len);
+
+       tapi_cfg_callback(group, type, status, result);
+
+       /* We've done with this notificaiton */
+       return true;
+
+}
+#endif
+
+//int misc_test_subscribe_tapi_events(void)
+int cfg_test_subscribe_tapi_events(void)
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfCfgEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int cfgEvents[] =
+       {
+               TAPI_CFG_EVENT_DEFAULTCFG_IND,
+               TAPI_EVENT_CFG_GET_A_KEY_CNF,                                        /**<     */
+               TAPI_EVENT_CFG_VERIFY_A_KEY_CNF,                                     /**<     */
+               TAPI_EVENT_CFG_GET_MSL_INFO_CNF,                                     /**<     */
+               TAPI_EVENT_CFG_GET_VOCODER_OPTION_CNF,                        /**<     */
+               TAPI_EVENT_CFG_SET_VOCODER_OPTION_CNF,                        /**<     */
+               TAPI_EVENT_CFG_GET_HIDDEN_MENU_ACCESS_CNF,            /**<     */
+               TAPI_EVENT_CFG_SET_HIDDEN_MENU_ACCESS_CNF,            /**<     */
+               TAPI_EVENT_CFG_GET_CURRENT_CARRIER_CNF,                       /**<     */
+               TAPI_EVENT_CFG_SET_CURRENT_CARRIER_CNF,                       /**<     */
+               TAPI_EVENT_CFG_GET_SIO_MODE_CNF,                              /**<     */
+               TAPI_EVENT_CFG_SET_SIO_MODE_CNF,                              /**<     */
+               TAPI_EVENT_CFG_GET_ACTIVATION_DATE_CNF,                       /**<     */
+               TAPI_EVENT_CFG_GET_RECONDITIONED_DATE_CNF,                            /**<     */
+               TAPI_EVENT_CFG_SET_TTY_MODE_CNF,                              /**<     */
+               TAPI_EVENT_CFG_GET_TTY_MODE_CNF,                              /**<     */
+       };
+
+       iNumOfCfgEvt = sizeof(cfgEvents)/sizeof(int);
+//     TAPI_CALLOC(Cfg_subscription_id, iNumOfCfgEvt, unsigned int)
+//#define TAPI_CALLOC(ptr, no_elements, type)
+       Cfg_subscription_id = (unsigned int *) calloc (iNumOfCfgEvt , sizeof (unsigned int));
+       if(Cfg_subscription_id == NULL)
+       {
+               TEST_DEBUG("calloc error -NULL, errno is [%d]", errno);
+       }
+
+
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               for( i=0 ; i< iNumOfCfgEvt; i++ )
+               {
+                       api_err = tel_register_event(cfgEvents[i], &Cfg_subscription_id[i],(TelAppCallback)&tapi_cfg_callback,NULL);
+                       if(api_err != TAPI_API_SUCCESS)
+                       {
+                               TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", cfgEvents[i],api_err);
+                               ret_val = FALSE;
+                               break;
+                       }
+               }
+       }
+       else
+       {
+               TEST_DEBUG("tel_init() failed");
+       }
+       return ret_val;
+
+#if 0
+       //GMainLoop *mainloop;
+       edata_t sdata;
+       noti_subscription_id_t subscription_id;
+       int count;
+
+       char *cfgEvents[] = {
+                                                                       "Telephony.User.Cfg.BtWifiTestInd",
+                                                                       "Telephony.User.Cfg.PdaCalibration",
+                                                                       "Telephony.Cfg.GetAKeyCnf",
+                                                                       "Telephony.Cfg.VerifyAKeyCnf",
+                                                                       "Telephony.Cfg.GetMslInfoCnf",
+                                                                       "Telephony.Cfg.GetVocoderOptionCnf",
+                                                                       "Telephony.Cfg.SetVocoderOptionCnf",
+                                                                       "Telephony.Cfg.GetHiddenMenuAccessCnf",
+                                                                       "Telephony.Cfg.SetHiddenMenuAccessCnf",
+                                                                       "Telephony.Cfg.GetCurrentCarrierCnf",
+                                                                       "Telephony.Cfg.SetCurrentCarrierCnf",
+                                                                       "Telephony.Cfg.GetSioModeCnf",
+                                                                       "Telephony.Cfg.SetSioModeCnf",
+                                                                       "Telephony.Cfg.GetUsbPathCnf",
+                                                                       "Telephony.Cfg.SetUsbPathCnf",
+                                                                       "Telephony.Cfg.GetActivationDateCnf",
+                                                                       "Telephony.Cfg.GetReconditionedDateCnf",
+                                                               };
+
+       for(count =0;count  <  (sizeof(cfgEvents)/sizeof(*cfgEvents)) ; count++)
+       {
+               error_code = EvtSysEventSubscribe (
+                                                                                       EvtDeliveryHandle,
+                                                                                       cfgEvents[count],                               /* notification ID */
+                                                                                       NULL,                                           /*      filter expression       */
+                                                                                       (EvtSysEventCb)on_cfg_event_received,           /* notification handler */
+                                                                                       (void *)&sdata,                         /* local data */
+                                                                                       &subscription_id                        /* subscription ID */
+                                                                               );
+               if (error_code )
+               {
+                       TEST_DEBUG( "[NET TEST] EvtSysEventSubscribe(): error [%#X] for event [%s]", error_code , cfgEvents[count]);
+               }
+       }
+
+       return 0;
+#endif
+}
+
+#if 0
+void tapi_cfg_thread()
+{
+       TEST_DEBUG("start tapi_cfg_thread");
+       cfg_select_loop();
+       fprintf (stderr, " cfg exited");
+       pthread_exit(NULL);
+}
+
+
+int cfg_main(int argc, char *argv[])
+{
+       int ret=0;
+       pthread_t cfg_thread_id;
+
+       TEST_DEBUG("\n\n\n ===== config module test  ver 1.01 =====");
+
+       ret = pthread_create(&cfg_thread_id, NULL, &tapi_cfg_thread, NULL);
+
+       if(ret != 0)
+       {
+               TEST_DEBUG( "Thread for TAPI Events Failed");
+       }
+
+       pthread_join(cfg_thread_id, NULL);
+}
+#endif
diff --git a/src/test_apps/tapi_gps_test.c b/src/test_apps/tapi_gps_test.c
new file mode 100644 (file)
index 0000000..c242d6c
--- /dev/null
@@ -0,0 +1,387 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "TapiCommon.h"
+#include "ITapiGps.h"
+#include "TelErr.h"
+#include "TelUtility.h"
+#include "TapiEvent.h"
+
+static unsigned int GPS_subscription_id;
+
+#define TEST_DEBUG(frmt, args...) \
+{do { fprintf(stderr, "[GPS Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+
+void gps_async_event_callback(TelTapiEvent_t* pGpsEvent)
+{
+       if(pGpsEvent->pData == NULL)
+       {
+               TEST_DEBUG("No Event Data!!");
+               return;
+       }
+
+       TEST_DEBUG("*************** Callback data **********************");
+       TEST_DEBUG("EventClass [%d],EventType [0x%x], Reques Id[%d], Event status [%d], psEvent->pDataLen[%d]",
+               pGpsEvent->EventClass, pGpsEvent->EventType, pGpsEvent->RequestId, pGpsEvent->Status,pGpsEvent->pDataLen);
+
+       // TAPI_EVENT_NONE:
+       switch(pGpsEvent->EventType)
+       {
+               case TAPI_EVENT_GPS_INIT_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_INIT_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_DEINIT_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_DEINIT_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_FIX_REQUEST_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_FIX_REQUEST_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_STOP_SESSION_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_STOP_SESSION_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_PARAMETERS_SET_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_PARAMETERS_SET_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_INIT:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_INIT $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_DEINIT:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_DEINIT $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_ENABLE_SET_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_ENABLE_SET_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_SET_TIME_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_SET_TIME_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_SET_DATA_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_SET_DATA_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_POSITION_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_POSITION_NOTI $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_EXT_POSITION_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_EXT_POSITION_NOTI $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_PARAMETERS_GET_RESP:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_PARAMETERS_GET_RESP $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_PD_CMD_CB_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_PD_CMD_CB_NOTI $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_PDP_CONNECTION_IND:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_PDP_CONNECTION_IND $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_DNS_LOOKUP_IND:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_DNS_LOOKUP_IND $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_VERIFICATION_IND:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_VERIFICATION_IND $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_SUPL_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_SUPL_NOTI $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_TIME_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_TIME_NOTI $$$$$$ ");
+                       }
+                       break;
+               case TAPI_EVENT_GPS_XTRA_DATA_NOTI:
+                       {
+                               TEST_DEBUG("$$$$$$ TAPI_EVENT_GPS_XTRA_DATA_NOTI $$$$$$ ");
+                       }
+                       break;
+
+               default:
+                       TEST_DEBUG("Unhandled pGpsEvent->EventType[0x%x]",pGpsEvent->EventType);
+                       break;
+       }
+       return;
+}
+
+
+int gps_read_key_input()
+{
+       int ret;
+       char buf[512] = {0, };
+       char msg[512];
+       char  diallingNum[256];
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       memset(buf,0, sizeof(buf));
+       memset(diallingNum,0,sizeof(diallingNum));
+       memset(msg,0,sizeof(msg));
+
+       fprintf(stderr,"*************** GPS TEST MENU     ***************\n");
+       fprintf(stderr,"\n  1. INIT GPS\n");
+       fprintf(stderr,"\n  2. DEINIT GPS\n");
+       fprintf(stderr,"\n  3. SEND PARAMETERS\n");
+       fprintf(stderr,"\n  4. SEND FIX REQUEST\n");
+       fprintf(stderr,"\n  5. STOP SESSION\n");
+       fprintf(stderr,"\n  6. GET PARAMETERS\n");
+       fprintf(stderr,"\n  7. XTRA INIT\n");
+       fprintf(stderr,"\n  8. XTRA DEINIT\n");
+       fprintf(stderr,"\n  9. XTRA ENABLE\n");
+       fprintf(stderr,"\n  a. XTRA DISABLE\n");
+       fprintf(stderr,"\n  b. XTRA TIME INFO REQUEST\n");
+       fprintf(stderr,"\n  c. XTRA DATA INFO REQUEST\n");
+       fprintf(stderr,"\n  q. QUIT\n");
+       fprintf(stderr,"*****************************************************\n");
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       if(memcmp(buf, "1", 1) == 0)
+       {
+               ret_val = tel_init_gps();
+               TEST_DEBUG("GPS INIT API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "2", 1) == 0)
+       {
+               ret_val = tel_deinit_gps();
+               TEST_DEBUG("GPS DEINIT API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "3", 1) == 0)
+       {
+               tapi_gps_param_t  param = {0, };
+               int i = 0;
+
+               param.ParamType[i++] = TAPI_GPS_PRM_MSG_SERVER_TYPE;
+               param.ServerType = TAPI_GPS_SERVER_UMTS;
+
+
+               param.ParamType[i++] = TAPI_GPS_PRM_MSG_POSITION_MODE;
+               param.PositionMode = TAPI_GPS_POS_MODE_3G_CP_UE_BASED;
+
+               param.ParamType[i++] = TAPI_GPS_PRM_MSG_MT_LR;
+               param.SslOnOff = TAPI_GPS_MT_LR_DISABLE;
+
+               param.ParamType[i++] = TAPI_GPS_PRM_MSG_MO_METHOD;
+               param.SslOnOff = TAPI_GPS_MO_UP;
+
+               param.ParamType[i++] = TAPI_GPS_PRM_MSG_SSL_ON_OFF;
+               param.SslOnOff = TAPI_GPS_SSL_DISABLE;
+
+
+               param.NumOfRecord = i;
+
+               ret_val = tel_set_gps_parameters(&param);
+               TEST_DEBUG("SET PARAMETERS API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "4", 1) == 0)    // fix request
+       {
+               tapi_gps_fix_request_msg_t fix_req = {0,};
+               int i = 0;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_SESSION_TYPE;
+               fix_req.SessionType = TAPI_GPS_TRACKING_MODE;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_SESSION_OPERATION;
+               fix_req.SessionOperation = TAPI_GPS_STANDALONE_ONLY;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_NUM_FIXES;
+               fix_req.TotalFixes = 99999999;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_TIME_BTW_FIXES;
+               fix_req.TimeBtwFixes = 1;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_ACCURACY;
+               fix_req.Accuracy = 50;
+
+               fix_req.ParamType[i++] = TAPI_GPS_FIX_REQ_SESSION_TIMEOUT;
+               fix_req.GpsSessionTimeout = 2;
+               fix_req.NumOfRecord = i;
+
+               ret_val = tel_set_gps_prefix_info(&fix_req);
+               TEST_DEBUG("GPS FIX REQUEST RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "5", 1) == 0)
+       {
+               ret_val = tel_stop_gps_session();
+               TEST_DEBUG("GPS STOP SESSION RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "6", 1) == 0)
+       {
+               ret_val = tel_get_gps_parameters();
+               TEST_DEBUG("GPS GET PARAMS API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "7", 1) == 0)
+       {
+               ret_val = tel_init_gps_xtra();
+               TEST_DEBUG("GPS XTRA INIT API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "8", 1) == 0)
+       {
+               ret_val = tel_deinit_gps_xtra();
+               TEST_DEBUG("GPS XTRA DEINIT API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "9", 1) == 0)
+       {
+               ret_val = tel_enable_gps_xtra();
+               TEST_DEBUG("GPS XTRA ENABLE API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "a", 1) == 0)
+       {
+               ret_val = tel_disable_gps_xtra();
+               TEST_DEBUG("GPS XTRA DISABLE API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "b", 1) == 0)
+       {
+               tapi_gps_xtra_time_info_t time_info = {0,};
+
+               ret_val = tel_set_gps_xtra_time(&time_info);
+               TEST_DEBUG("GPS XTRA SET TIME API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "c", 1) == 0)
+       {
+               tapi_gps_xtra_data_info_t data_info = {0,};
+
+               ret_val = tel_set_gps_xtra_data(&data_info);
+               TEST_DEBUG("GPS XTRA SET DATA API RETURN VALUE : [%d]\n" , ret_val);
+       }
+       if(memcmp(buf, "q", 1) == 0)
+       {
+               return -1;
+       }
+       return 0;
+}
+
+void gps_select_loop()
+{
+       int ret;
+       fd_set readfds;
+
+       while(1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if(ret)
+               {
+                       if(FD_ISSET(0, &readfds))
+                       {
+                               if(gps_read_key_input()<0)
+                                       break;
+                       }
+               }
+       }
+}
+
+int gps_test_subscribe_tapi_events()
+{
+       int ret_val = TRUE;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       int GpsEvt = TAPI_EVENT_GPS_INIT_RESP;
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               api_err = tel_register_event(GpsEvt, &GPS_subscription_id,(TelAppCallback)&gps_async_event_callback, NULL);
+               if(api_err != TAPI_API_SUCCESS)
+               {
+                       TEST_DEBUG("isn't subscribed. sub id is [%d], api_err is [%d]\n", GPS_subscription_id,api_err);
+                       ret_val = FALSE;
+               }
+       }
+       else
+       {
+               TEST_DEBUG("tel_init() failed");
+       }
+       return ret_val;
+}
+
+void gps_thread_loop()
+{
+       TEST_DEBUG("start gps_thread_loop\n");
+       gps_select_loop();
+       fprintf (stderr, "gps exited\n");
+       pthread_exit(NULL);
+}
+
+void gps_main(int argc, char *argv[])
+{
+       int ret=0;
+       pthread_t gps_thread_id;
+
+       ret = pthread_create(&gps_thread_id, NULL, (void*)&gps_thread_loop, NULL);
+
+       if(ret != 0)
+       {
+               TEST_DEBUG("Thread for TAPI Events Failed\n");
+       }
+
+       pthread_join(gps_thread_id, NULL);
+}
+
+
diff --git a/src/test_apps/tapi_misc_test.c b/src/test_apps/tapi_misc_test.c
new file mode 100644 (file)
index 0000000..ed68000
--- /dev/null
@@ -0,0 +1,535 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "ITapiMisc.h"
+#include "TapiCommon.h"
+#include "TelErr.h"
+#include "vconf.h"
+#include "TelUtility.h"
+#include "TapiEvent.h"
+
+typedef struct {
+       int group;
+       int type;
+       int len;
+       void *dst;
+} edata_t;
+
+#define TEST_DEBUG(frmt, args...) \
+{do { fprintf(stderr, "[MISC Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+int error_code;
+extern int EvtDeliveryHandle;
+
+TelMiscAlarmInfo_t alarm_info;
+static unsigned int * MISC_subscription_id;
+
+void __PrintNAMInfoMASK(char* str, TS_UINT16 nam_info_mask) {
+       switch (nam_info_mask) {
+       case TAPI_MISC_NAM_INFO_MASK_TOTAL:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_TOTAL [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_AUTONAM:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_AUTONAM [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_MCC:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_MCC [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_MNC:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_MNC [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_MIN:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_MIN [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_MDN:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_MDN [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_NAM_NAME:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_NAM_NAME [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_NAM_NUM:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_NAM_NUM [%d]", str, nam_info_mask)
+               ;
+               break;
+       case TAPI_MISC_NAM_INFO_MASK_ALL:
+               TEST_DEBUG("%s TAPI_MISC_NAM_INFO_MASK_ALL [%d]", str, nam_info_mask)
+               ;
+               break;
+       default:
+               TEST_DEBUG("%s Undefined MASK [0x%x]", str, nam_info_mask)
+               ;
+               break;
+       }
+}
+
+//static int  misc_async_event_callback (TelTapiEventClass_t   eventClass,int  eventType, void * param2)
+static void misc_async_event_callback(TelTapiEvent_t *event) {
+       TEST_DEBUG("EVENT TYPE:[0x%x], STATUS:[0x%x]", event->EventType, event->Status);
+
+       switch (event->EventClass) {
+       case TAPI_EVENT_CLASS_MISC: {
+               switch (event->EventType) {
+               case TAPI_EVENT_MISC_NITZ_GETCNF: {
+                       tapi_misc_time_zone_info_type zone_info;
+                       memcpy(&zone_info, (tapi_misc_time_zone_info_type*) event->pData,
+                                       sizeof(tapi_misc_time_zone_info_type));
+
+                       TEST_DEBUG("$$$$$$ TAPI_EVENT_MISC_NITZ_GETCNF $$$$$$ ");
+
+                       TEST_DEBUG("time info valid : [%d](0:invalid, 1:nw, 2:RTC, 3:RTC BACKUP) ",zone_info.time_zone_valid);
+                       TEST_DEBUG("Daylight_valid : [%d] ",zone_info.bDaylight_valid);
+                       TEST_DEBUG("Year : [%d] ",zone_info.year);
+                       TEST_DEBUG("Month : [%d] ",zone_info.month);
+                       TEST_DEBUG("Day : [%d] ",zone_info.day);
+                       TEST_DEBUG("Hour : [%d] ",zone_info.hour);
+                       TEST_DEBUG("Minute : [%d] ",zone_info.minute);
+                       TEST_DEBUG("Second : [%d] ",zone_info.second);
+                       TEST_DEBUG("Time_zone :[%d] ",zone_info.time_zone);
+                       TEST_DEBUG("Daylight_adjust : [%d] ",zone_info.daylight_adjust);
+                       TEST_DEBUG("Day_of_week :[%d] ",zone_info.day_of_week);
+
+                       alarm_info.year = zone_info.year;
+                       alarm_info.month = zone_info.month;
+                       alarm_info.day = zone_info.day;
+                       alarm_info.hour = zone_info.hour;
+                       alarm_info.minute = zone_info.minute;
+                       alarm_info.second = zone_info.second;
+                       alarm_info.time_zone = zone_info.time_zone;
+                       alarm_info.day_of_week = zone_info.day_of_week;
+
+                       break;
+               }
+               case TAPI_EVENT_MISC_SERIAL_NUMBER_IND: {
+                       TelMiscSNInformation SN = { 0, };
+
+                       int index;
+
+                       memcpy(&SN, (char*) event->pData, sizeof(TelMiscSNInformation));
+                       TEST_DEBUG("$$$$$$ TAPI_EVENT_MISC_SERIAL_NUMBER_IND $$$$$$ ");
+                       TEST_DEBUG("Number Len :[%d] ", SN.sn_len);
+                       switch (SN.sn_index) {
+                       case TAPI_MISC_ME_ESN:
+                               TEST_DEBUG("SN Index: ME ESN");
+                               for (index = 0; index < 4; index++) {
+                                       TEST_DEBUG("Number :[0x%x]", SN.szNumber[index]);
+                               }
+                               break;
+                       case TAPI_MISC_ME_MEID:
+                               TEST_DEBUG("SN Index: ME MEID");
+                               for (index = 0; index < 8; index++) {
+                                       TEST_DEBUG("Number :[0x%x]", SN.szNumber[index]);
+                               }
+                               break;
+                       default:
+                               break;
+                       }
+                       break;
+               }
+
+               case TAPI_EVENT_MISC_NAM_INFO_NOTI:
+               case TAPI_EVENT_MISC_GET_NAM_INFO_CNF: {
+                       TelMiscNamInfo_t NAM = { 0, };
+
+                       memcpy(&NAM, (char*) event->pData, sizeof(TelMiscNamInfo_t));
+                       TEST_DEBUG("$$$$$$ TAPI_EVENT_MISC_GET_NAM_INFO_CNF or NAM_INFO_NOTI $$$$$$ ");
+                       __PrintNAMInfoMASK("Nam Info Mask: ", NAM.nam_info_mask);
+                       TEST_DEBUG("Num of Total Nam : %d ", NAM.nam_total);
+                       TEST_DEBUG("Index of Current Selected NAM : %d ", NAM.nam_current_index);
+                       TEST_DEBUG("Index of Request Nam : %d ", NAM.nam_req_index);
+                       TEST_DEBUG("NAM Auto(0:disable / 1:enable) : %d ", NAM.nam_auto);
+                       TEST_DEBUG("NAM MCC : [%s] ", NAM.nam_mcc);
+                       TEST_DEBUG("NAM MNC : [%s] ", NAM.nam_mnc);
+                       TEST_DEBUG("NAM MIN : [%s] ", NAM.nam_min);
+                       TEST_DEBUG("NAM MDN : [%s] ", NAM.nam_mdn);
+                       TEST_DEBUG("NAM NAME : [%s] ", NAM.nam_name);
+
+                       break;
+               }
+
+               default:
+                       TEST_DEBUG(" MISC TEST -----TAPI_MISC EVENT TYPE DEFAULT CASE : [%d] ", event->EventType)
+                       ;
+                       break;
+               }
+               break;
+       }
+
+       default:
+               break;
+
+       }
+
+       TEST_DEBUG(" ########## End of MISC EVENT  ##################");
+
+       return;
+}
+
+int misc_read_key_input(int option) {
+       int ret;
+       char buf[512] = { 0, };
+       char msg[512];
+       char diallingNum[256];
+       int diallingNum_len = 0;
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       memset(buf, 0, sizeof(buf));
+       memset(diallingNum, 0, sizeof(diallingNum));
+       memset(msg, 0, sizeof(msg));
+       diallingNum_len = 0;
+
+       if (option == 10) {
+               TEST_DEBUG("*************** MISC TEST MENU     ***************");
+               TEST_DEBUG("1g.tel_get_misc_timezone_info       (UMTS/CDMA)");
+               TEST_DEBUG("1s.tapi_misc_timezone_setinfo       (UMTS/CDMA)");
+               TEST_DEBUG("4.tel_get_misc_alarm_info   (IPCv3.0)");
+               TEST_DEBUG("5.ME serial number          (UMTS/CDMA)");
+               TEST_DEBUG("6.ME version info   (UMTS/CDMA)");
+               TEST_DEBUG("7.ts_get_misc_nam_info      (CDMA)");
+               TEST_DEBUG("8.emergency mode control (UMTS/CDMA)");
+               TEST_DEBUG("0.exit");
+               TEST_DEBUG("*****************************************************\n");
+
+               ret = read(0, buf, sizeof(buf));
+               if (ret < 0) {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               } else if (ret == 0)
+                       return ret;
+
+               if (memcmp(buf, "0", sizeof("0") - 1) == 0) {
+                       TEST_DEBUG("Finished Testing this module, Going back to Main Menu");
+                       return -1;
+               } else if (memcmp(buf, "1g", sizeof("1g") - 1) == 0) {
+                       TEST_DEBUG("Get time info");
+                       ret_val = tel_get_misc_timezone_info();
+                       TEST_DEBUG("API RETURN VALUE : [%d]" , ret_val);
+               } else if (memcmp(buf, "1s", sizeof("1s") - 1) == 0) {
+                       TEST_DEBUG("Set time info");
+                       tapi_misc_time_zone_info_type timezone_info = { 0, };
+                       timezone_info.bDaylight_valid = 1;
+                       timezone_info.year = 10;
+                       timezone_info.month = 1;
+                       timezone_info.day = 1;
+                       timezone_info.hour = 1;
+                       timezone_info.minute = 1;
+                       timezone_info.second = 1;
+                       timezone_info.time_zone = 36;
+                       timezone_info.time_zone_valid = TAPI_MISC_NITZ_RTC_BKUP_PHONE;
+                       timezone_info.daylight_adjust = TAPI_MISC_NITZ_NOADJUST;
+                       timezone_info.day_of_week = TAPI_MISC_NITZ_DOW_FRI;
+
+                       ret_val = tel_set_misc_timezone_info(&timezone_info);
+
+                       TEST_DEBUG("API RETURN VALUE : [%d]" , ret_val);
+               } else if (memcmp(buf, "2", sizeof("2") - 1) == 0) {
+                       if (memcmp(buf + 1, "a", sizeof("a") - 1) == 0)
+                               alarm_info.minute += 1;
+                       else if (memcmp(buf + 1, "b", sizeof("b") - 1) == 0)
+                               alarm_info.minute += 2;
+                       else if (memcmp(buf + 1, "c", sizeof("c") - 1) == 0)
+                               alarm_info.minute += 3;
+                       else if (memcmp(buf + 1, "d", sizeof("d") - 1) == 0)
+                               alarm_info.minute += 10;
+                       else {
+                               TEST_DEBUG("Wrong Selection!!");
+                               return 0;
+                       }
+               } else if (memcmp(buf, "4", sizeof("4") - 1) == 0) {
+                       TEST_DEBUG("Get current alarm status");
+                       //ret_val = TelTapiMiscGetAlarmInfo();
+                       TEST_DEBUG("API RETURN VALUE : [%d]" , ret_val);
+               } else if (memcmp(buf, "5", sizeof("5") - 1) == 0) {
+                       TelMiscSNIndexType_t sn_index;
+                       TelMiscSNInformation sn_info = { 0, };
+
+                       int iSelect = 0;
+                       TEST_DEBUG("1. IMEI (UMTS)");
+                       TEST_DEBUG("2. ME_ESN (CDMA)");
+                       TEST_DEBUG("3. ME_MEID (CDMA)");
+                       TEST_DEBUG("Select: ");
+                       scanf("%d", &iSelect);
+
+                       switch (iSelect) {
+                       case 1:
+                               sn_index = TAPI_MISC_ME_IMEI;
+                               TEST_DEBUG("Get ME IMEI...!\n")
+                               ;
+                               break;
+                       case 2:
+                               sn_index = TAPI_MISC_ME_ESN;
+                               TEST_DEBUG("Get ME ESN...!\n")
+                               ;
+                               break;
+                       case 3:
+                               sn_index = TAPI_MISC_ME_MEID;
+                               TEST_DEBUG("Get ME MEID...!\n")
+                               ;
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!\n")
+                               ;
+                               return 0;
+                               break;
+                       }
+                       ret_val = tel_get_misc_me_sn(sn_index, &sn_info);
+
+                       if (ret_val == TAPI_API_SUCCESS) {
+                               TEST_DEBUG("sn_index[%d]",sn_info.sn_index);
+                               TEST_DEBUG("sn_len[%d]",sn_info.sn_len);
+                               TEST_DEBUG("szNumber[%s]",sn_info.szNumber);
+                       } else {
+                               TEST_DEBUG("FAIL API RETURN:[%d]",ret_val);
+                       }
+               } else if (memcmp(buf, "6", sizeof("6") - 1) == 0) {
+                       TelMiscVersionInformation ver_info = { 0, };
+                       TEST_DEBUG("ME version info..!");
+                       ret_val = tel_get_misc_me_version(&ver_info);
+                       if (ret_val == TAPI_API_SUCCESS) {
+                               TEST_DEBUG("ver_mask[0x%02x]",ver_info.ver_mask);
+                               TEST_DEBUG("szHwVersion[%s]",ver_info.szHwVersion);
+                               TEST_DEBUG("szSwVersion[%s]",ver_info.szSwVersion);
+                               TEST_DEBUG("szRfCalDate[%s]",ver_info.szRfCalDate);
+                               TEST_DEBUG("szProductCode[%s]",ver_info.szProductCode);
+                       } else {
+                               TEST_DEBUG("FAIL API RETURN:[%d]",ret_val);
+                       }
+               } else if (memcmp(buf, "7", sizeof("7") - 1) == 0) {
+                       TS_WORD nam_info_mask;
+                       TelMiscNamIndex_t nam_index;
+
+                       int iSelect = 0;
+                       TEST_DEBUG("1. The Number of Total NAM");
+                       TEST_DEBUG("2. The Index of current selected NAM");
+                       TEST_DEBUG("3. The Index of request NAM");
+                       TEST_DEBUG("4. Auto NAM");
+                       TEST_DEBUG("5. MCC");
+                       TEST_DEBUG("6. MNC");
+                       TEST_DEBUG("7. MIN");
+                       TEST_DEBUG("8. MDN");
+                       TEST_DEBUG("9. Nam Name");
+                       TEST_DEBUG("10. Nam Change");
+                       TEST_DEBUG("11. Current Nam num");
+                       TEST_DEBUG("12. All parameter");
+
+                       TEST_DEBUG("Select: ");
+                       scanf("%d", &iSelect);
+
+                       switch (iSelect) {
+                       case 1:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_TOTAL;
+                               break;
+                       case 2:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX;
+                               break;
+                       case 3:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX;
+                               break;
+                       case 4:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_AUTONAM;
+                               break;
+                       case 5:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_MCC;
+                               break;
+                       case 6:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_MNC;
+                               break;
+                       case 7:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_MIN;
+                               break;
+                       case 8:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_MDN;
+                               break;
+                       case 9:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_NAM_NAME;
+                               break;
+                       case 10:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_NAM_CHANGE;
+                               break;
+                       case 11:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_NAM_NUM;
+                               break;
+                       case 12:
+                               nam_info_mask = TAPI_MISC_NAM_INFO_MASK_ALL;
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!")
+                               ;
+                               return 0;
+                               break;
+                       }
+
+                       TEST_DEBUG("Select MISC Nam Index(1~5): ");
+                       scanf("%d", &iSelect);
+                       switch (iSelect) {
+                       case 1:
+                               nam_index = TAPI_MISC_NAM_1;
+                               break;
+                       case 2:
+                               nam_index = TAPI_MISC_NAM_2;
+                               break;
+                       case 3:
+                               nam_index = TAPI_MISC_NAM_3;
+                               break;
+                       case 4:
+                               nam_index = TAPI_MISC_NAM_4;
+                               break;
+                       case 5:
+                               nam_index = TAPI_MISC_NAM_5;
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!")
+                               ;
+                               return 0;
+                               break;
+                       }
+
+                       TEST_DEBUG("Current NAM index(1) or Request NAM index(2): ");
+                       scanf("%d", &iSelect);
+                       switch (iSelect) {
+                       case 1:
+                               nam_info_mask |= TAPI_MISC_NAM_INFO_MASK_CURRENT_INDEX;
+                               break;
+                       case 2:
+                               nam_info_mask |= TAPI_MISC_NAM_INFO_MASK_REQUEST_INDEX;
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!")
+                               ;
+                               return 0;
+                               break;
+                       }
+
+                       TEST_DEBUG("You selected nam infomask[0x%x] & index[0x%x]", nam_info_mask, nam_index);
+                       TEST_DEBUG("Get ME NAM Info...!");
+                       ret_val = tel_get_misc_nam_info(nam_info_mask, nam_index);
+                       TEST_DEBUG("API RETURN VALUE : [%d]" , ret_val);
+               }
+
+               else if (memcmp(buf, "8", sizeof("8") - 1) == 0) {
+                       int selection = 0;
+                       int mode = 0;
+                       char dummy;
+                       TEST_DEBUG("device emergency mode control");
+                       TEST_DEBUG("Please select operation: ");
+                       TEST_DEBUG("1:get status, 2:enable, 3:disable");
+                       scanf("%d%c",&selection,&dummy);
+
+                       switch (selection) {
+                       case 1:
+                               ret_val = tel_get_misc_emergency_mode(&mode);
+                               TEST_DEBUG("ret_val[%d], mode[%d]",ret_val,mode);
+                               break;
+                       case 2:
+                               ret_val = tel_set_misc_emergency_mode(1);
+                               TEST_DEBUG("enable ret_val[%d]",ret_val);
+                               break;
+                       case 3:
+                               ret_val = tel_set_misc_emergency_mode(0);
+                               TEST_DEBUG("disable ret_val[%d]",ret_val);
+                               break;
+                       }
+               } else {
+                       TEST_DEBUG("Invalid Selection!\n");
+               }
+
+       }
+
+       return 0;
+}
+
+void misc_select_loop(int option) {
+       int ret;
+       fd_set readfds;
+
+       while (1) {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret) {
+                       if (FD_ISSET(0, &readfds)) {
+                               if (misc_read_key_input(option) < 0)
+                                       break;
+                       }
+               }
+       }
+}
+
+int misc_test_subscribe_tapi_events(void) {
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfMISCEvt = 0;
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       int MISCEvtList[] = { TAPI_EVENT_MISC_NITZ_GETCNF, /**< 0x0A00, */
+                       TAPI_EVENT_MISC_NITZ_NOTIFY, /**<     */
+                       TAPI_EVENT_MISC_NITZ_IND, /**<     */
+                       TAPI_EVENT_MISC_AT_FUS, /**<     */
+                       //              TAPI_EVENT_MISC_ALARM_SETCNF,      /**< alarm set confirm message */
+                       //              TAPI_EVENT_MISC_ALARM_GETCNF,   /**< alarm message */
+                       TAPI_EVENT_MISC_SERIAL_NUMBER_IND,
+                       TAPI_EVENT_MISC_GET_NAM_INFO_CNF, TAPI_EVENT_MISC_SET_NAM_INFO_CNF,
+                       TAPI_EVENT_MISC_NAM_INFO_NOTI };
+
+       iNumOfMISCEvt = sizeof(MISCEvtList) / sizeof(int);
+       MISC_subscription_id = (unsigned int *) calloc(iNumOfMISCEvt,
+                       sizeof(unsigned int));
+
+       for (i = 0; i < iNumOfMISCEvt; i++) {
+               api_err = tel_register_event(MISCEvtList[i], &MISC_subscription_id[i],
+                               (TelAppCallback) &misc_async_event_callback, NULL);
+               if (api_err != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", MISCEvtList[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+}
diff --git a/src/test_apps/tapi_nw_test.c b/src/test_apps/tapi_nw_test.c
new file mode 100644 (file)
index 0000000..b967973
--- /dev/null
@@ -0,0 +1,1286 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "ITapiNetwork.h"
+#include "TapiCommon.h"
+#include "ITapiPS.h"
+#include "TelUtility.h"
+#include "TelSim.h"
+#include "TelErr.h"
+#include "vconf.h"
+#include "TapiEvent.h"
+
+#if 0 //ED based
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}edata_t;
+#endif //ED based
+
+int error_code;
+int iNumOfNwEvt;
+static unsigned int * NW_subscription_id;
+//extern int EvtDeliveryHandle ;
+
+#define SZ_IMEI "user/telephony/szMobileEquipmentSerialNumber"
+
+#define TEST_DEBUG(frmt, args...) \
+{do { fprintf(stderr, "[NW Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+
+void __PrintNWBand(char* str, TelNetworkBand_t tNWBandType)
+{
+       switch(tNWBandType)
+       {
+               case TAPI_NETWORK_BAND_TYPE_ANY:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_ANY [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_GSM850:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM850 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_GSM_900_1800:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM_900_1800 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_GSM1900:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM1900 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_GSM:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_WCDMA:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_WCDMA [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_WCDMA850:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_WCDMA850 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_WCDMA1900:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_WCDMA1900 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+
+               case TAPI_NETWORK_BAND_TYPE_WCDMA2100:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_WCDMA2100 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+               case TAPI_NETWORK_BAND_TYPE_GSM900:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM900 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+               case TAPI_NETWORK_BAND_TYPE_GSM1800:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM1800 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+               case TAPI_NETWORK_BAND_TYPE_GSM_850_1900:
+                       {
+                               TEST_DEBUG("%s TAPI_NETWORK_BAND_TYPE_GSM_850_1900 [0x%x]", str, tNWBandType);
+                       }
+                       break;
+               default:
+                       {
+                               TEST_DEBUG("%s Undefined Storage Type returnted [0x%x]", str, tNWBandType);
+                       }
+                       break;
+       }
+       return;
+}
+
+
+void __PrintGetRoamingModeCnfCB(void *pData)
+{
+       TelNetworkRoamingMode_t* pRoamingMode = NULL;
+
+       pRoamingMode = (TelNetworkRoamingMode_t *)pData;
+
+       switch(pRoamingMode->pref_net_type)
+       {
+               case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC:
+                       TEST_DEBUG("TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC\n");
+                       break;
+               case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A:
+                       TEST_DEBUG("TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A\n");
+                       break;
+               case TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B:
+                       TEST_DEBUG("TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B\n");
+                       break;
+               case TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY:
+                       TEST_DEBUG("TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY\n");
+                       break;
+               case TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY:
+                       TEST_DEBUG("TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY\n");
+                       break;
+               default:
+                       break;
+       }
+
+       switch(pRoamingMode->prl_pref_only)
+       {
+               case TAPI_NETWORK_PRL_PREF_ONLY_OFF:
+                       TEST_DEBUG("TAPI_NETWORK_PRL_PREF_ONLY_OFF\n");
+                       break;
+               case TAPI_NETWORK_PRL_PREF_ONLY_ON:
+                       TEST_DEBUG("TAPI_NETWORK_PRL_PREF_ONLY_ON\n");
+                       break;
+               default:
+                       break;
+       }
+
+       return;
+}
+
+void __PrintGetHybridModeCnfCB(void *pData)
+{
+       TelNetworkCDMAHybridMode_t HybridMode = 0x00;
+
+       memcpy(&HybridMode, pData, sizeof(TelNetworkCDMAHybridMode_t));
+
+       switch(HybridMode){
+               case TAPI_NETWORK_CDMA_HYBRID:
+                       TEST_DEBUG("TAPI_NETWORK_CDMA_HYBRID \n");
+                       break;
+               case TAPI_NETWORK_CDMA_1X_ONLY:
+                       TEST_DEBUG("TAPI_NETWORK_CDMA_1X_ONLY\n");
+                       break;
+               case TAPI_NETWORK_CDMA_EVDO_ONLY:
+                       TEST_DEBUG("TAPI_NETWORK_CDMA_EVDO_ONLY\n");
+                       break;
+               default:
+                       TEST_DEBUG("Unknown Mode\n");
+                       break;
+       }
+       return;
+}
+
+void __PrintGetNetworkInfoCB(void* pData)
+{
+       TelNetworkInfo_t tNetworkInfo ={0,};
+       memcpy(&tNetworkInfo, pData, sizeof(TelNetworkInfo_t));
+
+       TEST_DEBUG("__PrintGetNetworkInfoCB() : PLMN is %lu\n",tNetworkInfo.SysId.SysId);
+
+       if(tNetworkInfo.SysId.bPlmnForbidden== TRUE)
+       {
+               TEST_DEBUG("__PrintGetNetworkInfoCB(): Network Forbidden\n");
+       }
+
+       TEST_DEBUG("Network Service Type : ");
+       switch(tNetworkInfo.SysId.SystemType)
+       {
+
+               case TAPI_NETWORK_SYSTEM_GSM: // GSM
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS: // GPRS
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_GPRS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS: // UTRAN
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_UMTS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EGPRS: // EGPRS
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_EGPRS\n");
+                       break;
+
+               default:
+                       TEST_DEBUG(" DEFAULT IN SYSTEM TYPE\n");
+                       break;
+
+       }
+
+       TEST_DEBUG("Network Service Level : ");
+       switch(tNetworkInfo.ServiceLevel)
+       {
+               case TAPI_NETWORK_SERVICE_LEVEL_NO:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_NO\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_FULL:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_FULL\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_SEARCH:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_SEARCH\n");
+                       break;
+
+               default:
+                       TEST_DEBUG(" Not Defined\n");
+                       break;
+
+       }
+       return;
+}
+
+
+void __PrintSearchNetworkCB(void* pData)
+{
+       TelNetworkList_t tmpNetworkList ={0,};
+       int idx=0;
+
+       memcpy(&tmpNetworkList, pData, sizeof(TelNetworkList_t));
+       TEST_DEBUG("[PHONE CLIENT] ReceiveNetworkList() - entryCount:[%d]\n",tmpNetworkList.NumOfNwAvailable);
+
+       for(idx=0;idx<tmpNetworkList.NumOfNwAvailable;idx++)
+       {
+               TEST_DEBUG("[PHONE CLIENT] NetworkList.systemList[idx].sysid =>%lu\n", tmpNetworkList.SystemList[idx].SysId);
+               //                      TEST_DEBUG("[PHONE CLIENT] NetworkList.systemList[idx].systemType =>%x\n", NetworkList.systemList[idx].systemType  );
+       }
+
+       if(tmpNetworkList.SystemList[0].ServiceType== TAPI_NETWORK_SERVICE_TYPE_COMBINED)
+       {
+               TEST_DEBUG("TAPI_NETWORK_SERVICE_TYPE_COMBINED\n");
+
+       }
+       else if(tmpNetworkList.SystemList[0].ServiceType== TAPI_NETWORK_SERVICE_TYPE_CS)
+       {
+               TEST_DEBUG("TAPI_NETWORK_SERVICE_TYPE_CS\n");
+
+       }
+       else if(tmpNetworkList.SystemList[0].ServiceType== TAPI_NETWORK_SERVICE_TYPE_PS)
+       {
+               TEST_DEBUG("TAPI_NETWORK_SERVICE_TYPE_PS\n");
+       }
+
+}
+
+void __PrintSelectNetworkCB(void* pData)
+{
+       TelNetworkInfo_t tNetworkInfo = {0,};
+       memcpy(&tNetworkInfo, pData, sizeof(TelNetworkInfo_t));
+
+       switch(tNetworkInfo.SysId.SystemType)
+       {
+               case TAPI_NETWORK_SYSTEM_GSM: // GSM
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_GSM\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_GPRS: // GPRS
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_GPRS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_UMTS: // UTRAN
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_UMTS\n");
+                       break;
+
+               case TAPI_NETWORK_SYSTEM_EGPRS: // EGPRS
+                       TEST_DEBUG(" TAPI_NETWORK_SYSTEM_EGPRS\n");
+                       break;
+
+               default:
+                       TEST_DEBUG(" DEFAULT IN SYSTEM TYPE\n");
+                       break;
+
+       }
+
+       switch(tNetworkInfo.SysId.SystemType)
+       {
+
+               case TAPI_NETWORK_SERVICE_TYPE_NO_SVE:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_TYPE_NO_SVE\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_LIMITED:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_TYPE_LIMITED\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_CS:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_TYPE_CS\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_PS:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_TYPE_PS\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_TYPE_COMBINED:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_TYPE_COMBINED\n");
+                       break;
+
+               default:
+                       TEST_DEBUG(" DEFAULT IN SERVICE TYPE\n");
+                       break;
+
+       }
+
+       switch(tNetworkInfo.ServiceLevel)
+       {
+
+               case TAPI_NETWORK_SERVICE_LEVEL_NO:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_NO\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_EMERGENCY\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_FULL:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_FULL\n");
+                       break;
+
+               case TAPI_NETWORK_SERVICE_LEVEL_SEARCH:
+                       TEST_DEBUG(" TAPI_NETWORK_SERVICE_LEVEL_SEARCH\n");
+                       break;
+
+               default:
+                       TEST_DEBUG(" DEFAULT IN SERVICE LEVEL\n");
+                       break;
+
+       }
+
+
+}
+
+void __PrintGetSelectionModeCB(void* pData)
+{
+       TelNetworkSelectionMode_t tSelectionMode = 0x00;
+       memcpy(&tSelectionMode, pData, sizeof(TelNetworkSelectionMode_t));
+
+       if(tSelectionMode == TAPI_NETWORK_SELECTIONMODE_AUTOMATIC)
+       {
+               TEST_DEBUG("__PrintGetSelectionModeCB(): TAPI_MODE_AUTOMATIC\n");
+       }
+       else if(tSelectionMode == TAPI_NETWORK_SELECTIONMODE_MANUAL)
+       {
+               TEST_DEBUG("__PrintGetSelectionModeCB(): TAPI_MODE_MANUAL\n");
+       }
+       else TEST_DEBUG("__PrintGetSelectionModeCB()???");
+
+       return;
+}
+
+
+void nw_async_event_callback(TelTapiEvent_t* pNwEvent, void *data)
+{
+
+       TEST_DEBUG("Func Entrance");
+       TEST_DEBUG("Request ID : [0x%x]\n", pNwEvent->RequestId);
+
+       if(pNwEvent->pData==NULL)
+       {
+               TEST_DEBUG("No Event Data!!");
+//             return;
+       }
+
+       TEST_DEBUG("*************** Callback data **********************");
+       TEST_DEBUG("EventClass [%d],EventType [0x%x], Reques Id[%d], Event status [%d], psEvent->pDataLen[%d]",
+               pNwEvent->EventClass, pNwEvent->EventType, pNwEvent->RequestId, pNwEvent->Status,pNwEvent->pDataLen);
+
+       switch(pNwEvent->EventClass)
+       {
+               case TAPI_EVENT_CLASS_NETWORK:
+                       {
+                               switch(pNwEvent->EventType)
+                               {
+                                       case TAPI_EVENT_NETWORK_RADIO_INFO_IND :
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_RADIO_INFO_IND $$$$$$ \n");
+                                                       //system("cat bark-2.wav > /dev/dsp");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SELECT_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SELECT_CNF $$$$$$");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF $$$$$$");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR)
+                                                               __PrintGetSelectionModeCB(pNwEvent->pData);
+                                               }
+                                               break;
+
+
+                                        case TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF $$$$$$");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkPrefferedPlmnList_t   preff_plmn_list;
+                                                               memcpy(&preff_plmn_list, pNwEvent->pData, sizeof(TelNetworkPrefferedPlmnList_t));
+                                                               unsigned int plmn_count;
+                                                               unsigned int counter ;
+                                                               plmn_count = preff_plmn_list.NumOfPreffPlmns;
+                                                               counter = 0;
+                                                               TEST_DEBUG(" PREFF PLMN COUNT :[%d]\n",preff_plmn_list.NumOfPreffPlmns);
+                                                               while(counter <plmn_count)
+                                                               {
+                                                                       TEST_DEBUG(" INDEX:[%d]\t\t",preff_plmn_list.PreffPlmnRecord[counter].Index);
+                                                                       TEST_DEBUG(" PLMN ID:[%s]\t\t",preff_plmn_list.PreffPlmnRecord[counter].Plmn);
+                                                                       TEST_DEBUG(" SYSTEM TYPE:[%d]\n",preff_plmn_list.PreffPlmnRecord[counter].SystemType);
+                                                                       TEST_DEBUG("");
+                                                                       counter++;
+                                                               }
+                                                       }
+
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_GETPOWERONATTACH_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETPOWERONATTACH_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkPowerOnAttach_t       poweron_attach;
+                                                               memcpy(&poweron_attach, pNwEvent->pData, sizeof(TelNetworkPowerOnAttach_t));
+                                                               if(poweron_attach == TAPI_NETWORK_POWERON_ATTACH_DISABLE)
+                                                               {
+                                                                       TEST_DEBUG(" Power On Attach diable");
+                                                               }
+                                                               else if(poweron_attach == TAPI_NETWORK_POWERON_ATTACH_ENABLE)
+                                                               {
+                                                                       TEST_DEBUG(" Power On Attach enable");
+                                                               }
+                                                               else
+                                                               {
+                                                                       TEST_DEBUG(" Power On Attach status Error");
+                                                               }
+                                                       }
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_SETPOWERONATTACH_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETPOWERONATTACH_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_GETNWBAND_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETNWBAND_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkBand_t band_type;
+                                                               memcpy(&band_type, pNwEvent->pData, sizeof(TelNetworkBand_t));
+                                                               __PrintNWBand(" BAND TYPE: ", band_type);
+                                                       }
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkServiceDomain_t service_type;
+                                                               memcpy(&service_type, pNwEvent->pData, sizeof(TelNetworkServiceDomain_t));
+                                                               TEST_DEBUG(" SERVICE DOMAIN:[%d] 0:combined,1:ps,2:cs,3:auto ", service_type);
+                                                       }
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_GETNWORDER_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETNWORDER_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkMode_t        network_order[TAPI_NETWORK_ORDER_MAX];
+                                                               memcpy(&network_order, pNwEvent->pData, (sizeof(TelNetworkMode_t)* TAPI_NETWORK_ORDER_MAX));
+                                                               TEST_DEBUG(" NETWORK ORDER:[%d] 0:none,1:em,2:auto,3:cdma,4:gsm,5:wcdma,6:wlan ", network_order[0]);
+                                                       }
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_GETNWMODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GETNWMODE_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR){
+                                                               TelNetworkMode_t        network_mode;
+                                                               memcpy(&network_mode, pNwEvent->pData, sizeof(TelNetworkMode_t));
+                                                               TEST_DEBUG(" NETWORK MODE:[%d] 0:none,1:em,2:auto,3:cdma,4:gsm,5:wcdma,6:wlan", network_mode);
+                                                       }
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND $$$$$$ ");
+                                                       TelNetworkLocationCellInfo_t  network_loc_cell_info;
+                                                       memcpy(&network_loc_cell_info, pNwEvent->pData, sizeof(TelNetworkLocationCellInfo_t));
+                                                       TEST_DEBUG(" LAC:[%d] ", network_loc_cell_info.LocationAreaCode);
+                                                       TEST_DEBUG(" CID:[%ld]", network_loc_cell_info.CellId);
+                                               }
+                                               break;
+
+                                        case TAPI_EVENT_NETWORK_DISPLAYINFO_IND:
+                                               {
+                                                       TelNetworkDisplayInfo_t   dispInfo;
+                                                       memcpy(&dispInfo, pNwEvent->pData, sizeof(TelNetworkDisplayInfo_t));
+
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_DISPLAYINFO_IND $$$$$$ ");
+
+                                                       if(dispInfo.DisplayInfo[TAPI_NETWORK_CS_DISP_INDEX] != -1)
+                                                       {
+                                                               TEST_DEBUG("CSTYPE = %d ",dispInfo.DisplayInfo[TAPI_NETWORK_CS_DISP_INDEX]);
+                                                       }
+                                                       if(dispInfo.DisplayInfo[TAPI_NETWORK_PS_DISP_INDEX] != -1)
+                                                       {
+                                                               TEST_DEBUG("PSTYPE = %d ",dispInfo.DisplayInfo[TAPI_NETWORK_PS_DISP_INDEX]);
+                                                       }
+                                                       if(dispInfo.DisplayInfo[TAPI_NETWORK_SVC_DISP_INDEX] != -1)
+                                                       {
+                                                               TEST_DEBUG("SVCTYPE = %d ",dispInfo.DisplayInfo[TAPI_NETWORK_SVC_DISP_INDEX] );
+                                                       }
+                                                       if(dispInfo.DisplayInfo[TAPI_NETWORK_ROAM_DISP_INDEX] != -1)
+                                                       {
+                                                               TEST_DEBUG("ROAM TYPE = %d ", dispInfo.DisplayInfo[TAPI_NETWORK_ROAM_DISP_INDEX]);
+                                                       }
+
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SEARCH_CNF:
+                                               {
+
+                                                       TelNetworkPlmnList_t* ui_network_info;
+                                                       int ui_entry_count=0;
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SEARCH_CNF $$$$$$ ");
+
+                                                       ui_network_info = (TelNetworkPlmnList_t *)calloc(1, sizeof(TelNetworkPlmnList_t));
+
+                                                       memcpy(ui_network_info, pNwEvent->pData, sizeof(TelNetworkPlmnList_t));
+
+                                                       while(ui_entry_count<ui_network_info->networks_count)
+                                                       {
+
+                                                               TEST_DEBUG( "Type_of_plmn[%d] 0:unkwon,1:home,2:available,3:forbidden,  NetworkName[%s]",ui_network_info->network_list[ui_entry_count].type_of_plmn,ui_network_info->network_list[ui_entry_count].network_name);
+                                                               TEST_DEBUG( "ServiceProviderName[%s]",ui_network_info->network_list[ui_entry_count].service_provider_name);
+                                                               TEST_DEBUG( "PLMN ID[%u]",ui_network_info->network_list[ui_entry_count].plmn_id);
+                                                               ui_entry_count++;
+                                                       }
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SPN_INFO:
+                                               {
+                                                       TelNetworkSpnMccMncInfo_t       short_network_name;
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SPN_INFO $$$$$$ ");
+                                                       memcpy(&short_network_name, pNwEvent->pData, sizeof(TelNetworkSpnMccMncInfo_t));
+                                                       TEST_DEBUG(" Display Condition ####     [%d]     ####",short_network_name.bDispCondition);
+                                                       TEST_DEBUG(" RPLMN  NAME ####   [%s]     ####",short_network_name.short_network_name);
+                                                       TEST_DEBUG("SERVICE PROVIDER NAME ####   [%s]    ####",short_network_name.spn_name);
+                                                       TEST_DEBUG("MCC ####    [%d] ####       MNC #### [%d]",short_network_name.mcc , short_network_name.mnc);
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SETNWORDER_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETNWORDER_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SETNWMODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETNWMODE_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SETNWBAND_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETNWBAND_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR)
+                                                               __PrintGetRoamingModeCnfCB(pNwEvent->pData);
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF $$$$$$ ");
+                                               }
+                                               break;
+
+                                       case TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF:
+                                               {
+                                                       TEST_DEBUG("$$$$$$ TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF $$$$$$ ");
+                                                       if(pNwEvent->Status == TAPI_NETWORK_NO_ERR)
+                                                               __PrintGetHybridModeCnfCB(pNwEvent->pData);
+                                               }
+                                               break;
+
+                                       default:
+                                               TEST_DEBUG("Unhandled pNwEvent->EventType[0x%x]",pNwEvent->EventType);
+                                               break;
+                               }
+                       }
+                       break;
+
+               default:
+                       TEST_DEBUG("Unhandled pNwEvent->EventClass[0x%x]",pNwEvent->EventClass);
+                       break;
+       }
+
+       return;
+}
+
+
+int nw_read_key_input(int option)
+{
+       int ret;
+       char buf[512] = {0, };
+       char msg[512];
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       int reqid;
+
+       memset(buf, 0x00, sizeof(buf));
+       memset(msg, 0x00, sizeof(msg));
+
+       fprintf(stderr,"*************** NETWORK TEST MENU     ***************\n");
+       fprintf(stderr,"c.Cancel to Search Network\n");
+       fprintf(stderr,"1.Search Network\n");
+       fprintf(stderr,"2.Select Network [mode(automatic/manual) systemid]\n");
+       fprintf(stderr,"3.Get Selection Mode\n");
+       fprintf(stderr,"4.Set NETWORK MODE --> [a] AUTO \t [b] GSM \t[c] WCDMA\n");
+       fprintf(stderr,"5.Get NETWORK MODE\n");
+       fprintf(stderr,"6 Set NETWORK Preferred Order -->[a] GSM [b] WCDMA [c] AUTO \n");
+       fprintf(stderr,"7 Get NETWORK Preferred Order\n");
+       fprintf(stderr,"8.Set SERVICE DOMAIN -->[a] PS [b] CS [c] AUTO [d] COMBINED\n");
+       fprintf(stderr,"9.Get SERVICE DOMAIN\n");
+       fprintf(stderr,"10.Get Network Information\n");
+       fprintf(stderr,"11.Set Preferred PLMN List \n");
+       fprintf(stderr,"12.Get Preferred PLMN List \n");
+       fprintf(stderr,"13.Set POWER ON ATTACH --> [a] DISABLE [b] ENABLE\n");
+       fprintf(stderr,"14.Get POWER ON ATTACH\n");
+       fprintf(stderr,"15.Set NETWORK BAND \n");
+       fprintf(stderr,"16.Get NETWORK BAND \n");
+       fprintf(stderr,"17.Get Phone Number (from gconf)-not used now(091130) \n");
+       fprintf(stderr,"*****************************************************\n");
+       fprintf(stderr,"1A.Set CDMA Roaming Mode [a]Auto [b]Auto_A [c]Auto_b [d]Home [e]Roam\n");
+       fprintf(stderr,"1B.Get CDMA Roaming Mode \n");
+       fprintf(stderr,"1C.Set CDMA Hybrid Mode [a]Hybrid [b]1x [c]EVDO\n");
+       fprintf(stderr,"1D.Get CDMA Hybrid Mode \n");
+       fprintf(stderr,"*************** VCONF / STATUS TEST MENU ********************\n");
+       fprintf(stderr,"STATUS GET CLASS  : class0(Net), class1(Sim), class2(CPHS), class3(SimDevCtx)\n");
+       fprintf(stderr,"VCONF /STATUS GET MEMBER : mem \n");
+       fprintf(stderr,"*****************************************************\n");
+       fprintf(stderr,"q Quit\n");
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0) return ret;
+
+       if(strncmp(buf, "menu", 4) == 0)
+       {
+               printf("Finished Testing this module, Going back to Main Menu\n");
+               return -1;
+       }
+
+       if( ret == 2 && memcmp(buf,"c",sizeof("c")-1) == 0 )
+       {
+               ret_val = tel_cancel_network_manual_search(&reqid);
+               TEST_DEBUG("TelTapiNwCancelManualSearch API RETURN VALUE : [%d]" , ret_val);
+       }
+
+       if( ret == 2 && memcmp(buf,"1",sizeof("1")-1) == 0 )
+       {
+               ret_val = tel_search_network(&reqid);
+               TEST_DEBUG("tel_search_network API RETURN VALUE : [%d]" , ret_val);
+       }
+
+       if( memcmp(buf,"2",sizeof("2")-1) == 0 )
+       {
+               unsigned int plmn = 45001;
+               TelNetworkSelectionMode_t mode;
+               char tmpPLMN[6]={0, };
+
+               if(memcmp(buf+2, "automatic", sizeof("automatic")-1) == 0){
+                       TEST_DEBUG("Automatic mode \n");
+                       ret_val = tel_select_network_automatic(&reqid);
+               }
+               else if(memcmp(buf+2, "manual", sizeof("manual")-1) == 0){
+                       TEST_DEBUG("Manual mode \t");
+                       mode = TAPI_NETWORK_SELECTIONMODE_MANUAL;
+                       memcpy(tmpPLMN,  buf+3 + sizeof("manual")-1, 6);
+                       plmn=(TS_UINT32)atoi(tmpPLMN);
+                       TEST_DEBUG("PLMN number is [%u]",plmn);
+                       ret_val = tel_select_network_manual(plmn, &reqid);
+               }
+               else{
+                       TEST_DEBUG("Unknown mode \n");
+                       return 0;
+               }
+
+               TEST_DEBUG("tel_select_network_manual API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       else if(memcmp(buf,"3",sizeof("3")-1) == 0)
+       {
+               ret_val = tel_get_network_selection_mode(&reqid);
+               TEST_DEBUG("tel_get_network_selection_mode API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if( memcmp(buf,"4",sizeof("4")-1) == 0 )
+       {
+
+               TelNetworkMode_t networkMode;
+               if(memcmp(buf+1,"a",sizeof("a")-1) == 0 )
+                       networkMode =TAPI_NETWORK_MODE_AUTOMATIC;
+               else if(memcmp(buf+1,"b",sizeof("b")-1) == 0 )
+                       networkMode =TAPI_NETWORK_MODE_GSM;
+               else if(memcmp(buf+1,"c",sizeof("c")-1) == 0 )
+                       networkMode =TAPI_NETWORK_MODE_WCDMA;
+               else{
+                       TEST_DEBUG("Unknown Network mode\n");
+                       return 0;
+               }
+
+               ret_val = tel_set_network_mode(networkMode, &reqid);
+               TEST_DEBUG("tel_set_network_mode API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"5",sizeof("5")-1) == 0 )
+       {
+               ret_val = tel_get_network_mode(&reqid);
+               TEST_DEBUG("tel_get_network_mode API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+
+       if( memcmp(buf,"6",sizeof("6")-1) == 0 )
+       {
+               TelNetworkMode_t networkOrder[5];
+
+               if(memcmp(buf+1,"a",sizeof("a")-1) == 0 )
+                       networkOrder[0] =TAPI_NETWORK_MODE_GSM;
+               else if(memcmp(buf+1,"b",sizeof("b")-1) == 0 )
+                       networkOrder[0] =TAPI_NETWORK_MODE_WCDMA;
+               else if(memcmp(buf+1,"c",sizeof("c")-1) == 0 )
+                       networkOrder[0] =TAPI_NETWORK_MODE_AUTOMATIC;
+
+               ret_val = tel_set_network_acquisition_order(networkOrder, &reqid);
+               TEST_DEBUG("tel_set_network_acquisition_order API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if( memcmp(buf,"7",sizeof("7")-1) == 0 )
+       {
+               ret_val = tel_get_network_acquisition_order(&reqid);
+               TEST_DEBUG("tel_get_network_acquisition_order API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"8",sizeof("8")-1) == 0)
+       {
+               TelNetworkServiceDomain_t serviceDomain;
+
+               if(memcmp(buf+1,"a",sizeof("a")-1) == 0 )
+                       serviceDomain =TAPI_NETWORK_SERVICE_DOMAIN_PS ;
+               else if(memcmp(buf+1,"b",sizeof("b")-1) == 0 )
+                       serviceDomain =TAPI_NETWORK_SERVICE_DOMAIN_CS ;
+               else if(memcmp(buf+1,"c",sizeof("c")-1) == 0 )
+                       serviceDomain =TAPI_NETWORK_SERVICE_DOMAIN_AUTOMATIC ;
+               else if(memcmp(buf+1,"d",sizeof("d")-1) == 0 )
+                       serviceDomain =TAPI_NETWORK_SERVICE_DOMAIN_COMBINED ;
+
+               ret_val = tel_set_network_service_domain(serviceDomain, &reqid);
+               TEST_DEBUG("tel_set_network_service_domain API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"9",sizeof("9")-1) == 0)
+       {
+               ret_val = tel_get_network_service_domain(&reqid);
+               TEST_DEBUG("tel_get_network_service_domain API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"11",sizeof("11")-1) == 0)
+       {
+               TelNetworkPrefferedPlmnInfo_t  PreffPlmnInfo;
+               int index = 0;
+               char dummy;
+               TEST_DEBUG("Plese input index : ");
+               scanf("%d%c",&index,&dummy);
+               PreffPlmnInfo.Index = index;
+               strcpy((char *)PreffPlmnInfo.Plmn, "45454");
+               TEST_DEBUG("Add 45454# to Preferred PLMN");
+               PreffPlmnInfo.SystemType = TAPI_NETWORK_SYSTEM_GSM;
+               ret_val = tel_set_network_preferred_plmn(TAPI_NETWORK_PREF_PLMN_ADD, &PreffPlmnInfo, &reqid);
+               TEST_DEBUG("tel_set_network_preferred_plmn API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"12",sizeof("12")-1) == 0)
+       {
+               ret_val = tel_get_network_preferred_plmn(&reqid);
+               TEST_DEBUG("tel_get_network_preferred_plmn API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"13",sizeof("13")-1) == 0)
+       {
+               if(memcmp(buf+2,"a",sizeof("a")-1) == 0)
+               {
+                       ret_val = tel_set_network_power_on_attach(TAPI_NETWORK_POWERON_ATTACH_DISABLE, &reqid );
+                       TEST_DEBUG("tel_set_network_power_on_attach API[Disable] RETURN VALUE : [%d]\n" , ret_val);
+               }
+               else if(memcmp(buf+2,"b",sizeof("b")-1) == 0)
+               {
+                       ret_val = tel_set_network_power_on_attach(TAPI_NETWORK_POWERON_ATTACH_ENABLE, &reqid);
+                       TEST_DEBUG("tel_set_network_power_on_attach API[Enable] RETURN VALUE : [%d]\n" , ret_val);
+               }
+       }
+
+       if(memcmp(buf,"14",sizeof("14")-1) == 0)
+       {
+               ret_val = tel_get_network_power_on_attach(&reqid);
+               TEST_DEBUG("tel_get_network_power_on_attach API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"15",sizeof("15")-1) == 0)
+       {
+               int iBandMode = 1;
+               int iBand = 1;
+               fprintf(stderr, "1=Preferred, 2=Only\n");
+               fprintf(stderr, "Input Band Mode: ");
+               scanf("%d", &iBandMode);
+               getchar();
+
+               fprintf(stderr, "0=All,1=GSM850 2=GSM900_1800 3=GSM1900 4=GSM_ALL 5=WCDMA 6=WCDMA850 7=WCDMA1900 8=WCDMA2100 9=gsm900 10=gsm1800 11=gsm850_1900\n");
+               fprintf(stderr, "Input Band: ");
+               scanf("%d", &iBand);
+               getchar();
+
+               ret_val = tel_set_network_band(iBandMode, iBand, &reqid);
+               //TelTapiNwSetNetworkBand(TAPI_NETWORK_BAND_MODE_ONLY , TAPI_NETWORK_BAND_TYPE_ANY,&reqid);
+               TEST_DEBUG("tel_set_network_band API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"16",sizeof("16")-1) == 0)
+       {
+               ret_val = tel_get_network_band(&reqid);
+               TEST_DEBUG("tel_get_network_band API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(memcmp(buf,"17",sizeof("17")-1) == 0)
+       {
+#if 0 //not use in slp2.0
+               GConfClient*    gconf_client;
+               char*       strval;
+
+               gconf_client = gconf_client_get_default();
+
+               // get Subscriber No from gconf
+               strval= gconf_client_get_string(gconf_client, "/Services/Telephony/szSubscriberNumber", NULL);
+
+               TEST_DEBUG("Subscriber Number [ %s ] from gconf", strval);
+
+               g_free(strval); //g_free checks for the NULL, so no need to check seperately
+               g_object_unref(gconf_client);
+#endif //not use in slp2.0
+       }
+
+       if( memcmp(buf,"1A",sizeof("1A")-1) == 0 )
+       {
+               TelNetworkRoamingMode_t RoamingMode = {0, };
+               if(memcmp(buf+3,"a",sizeof("a")-1) == 0 )
+               {
+                       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC;
+               }
+               else if(memcmp(buf+3,"b",sizeof("b")-1) == 0 )
+               {
+                       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_A;
+               }
+               else if(memcmp(buf+32,"c",sizeof("c")-1) == 0 )
+               {
+                       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_AUTOMATIC_B;
+               }
+               else if(memcmp(buf+3,"d",sizeof("d")-1) == 0 )
+               {
+                       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_HOME_ONLY;
+               }
+               else if(memcmp(buf+3,"e",sizeof("e")-1) == 0 )
+               {
+                       RoamingMode.pref_net_type = TAPI_NETWORK_PREF_NET_TYPE_ROAM_ONLY;
+               }
+               else
+                       TEST_DEBUG("unknown roam preferred network type \n");
+               RoamingMode.prl_pref_only = TAPI_NETWORK_PRL_PREF_ONLY_OFF;
+
+               TEST_DEBUG("tel_set_network_roaming ..... mode:[%d]\n" , ret_val);
+               ret_val = tel_set_network_roaming(&RoamingMode, &reqid);
+               TEST_DEBUG("tel_set_network_roaming API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if( memcmp(buf,"1B",sizeof("1B")-1) == 0 )
+       {
+               ret_val = tel_get_network_roaming(&reqid);
+               TEST_DEBUG("API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+
+       if( memcmp(buf,"1C",sizeof("1C")-1) == 0 )
+       {
+               TelNetworkCDMAHybridMode_t CDMAHybridMode = 0;
+               if(memcmp(buf+3,"a",sizeof("a")-1) == 0 )
+               {
+                       CDMAHybridMode = TAPI_NETWORK_CDMA_HYBRID;
+               }
+               else if(memcmp(buf+3,"b",sizeof("b")-1) == 0 )
+               {
+                       CDMAHybridMode = TAPI_NETWORK_CDMA_1X_ONLY;
+               }
+               else if(memcmp(buf+3,"c",sizeof("c")-1) == 0 )
+               {
+                       CDMAHybridMode = TAPI_NETWORK_CDMA_EVDO_ONLY;
+               }
+               else
+               {
+                       TEST_DEBUG("unknown roam preferred network type \n");
+               }
+               TEST_DEBUG("tel_set_network_hybrid_in_cdma .... mode:[%d]\n" , CDMAHybridMode);
+               ret_val = tel_set_network_hybrid_in_cdma(CDMAHybridMode, &reqid);
+               TEST_DEBUG("tel_set_network_hybrid_in_cdma API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if( memcmp(buf,"1D",sizeof("1D")-1) == 0 )
+       {
+               ret_val = tel_get_network_hybrid_in_cdma(&reqid);
+               TEST_DEBUG("tel_get_network_hybrid_in_cdma API RETURN VALUE : [%d]\n" , ret_val);
+       }
+
+       if(strncmp(buf, "mem", 3) == 0)
+       {
+               int retValue=0;
+               int apiRet =0;
+               char* spnName = NULL;
+               char* nwName = NULL;
+               char* imei = NULL;
+               char* szImei = NULL;
+               char* szSubNum = NULL;
+               char* szSubName = NULL;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_RSSI, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_RSSI api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_PLMN, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_PLMN api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_LAC, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_LAC api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_CELLID, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_CELLID api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_TAPI_STATE, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_TAPI_STATE api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SVC_ROAM, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SVC_ROAM api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SVC_CS, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SVC_CS api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SVC_PS, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SVC_PS api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_ZONE_TYPE, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_ZONE_TYPE api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SVCTYPE api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_LOW_BATTERY, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_LOW_BATTERY api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SIM_INIT, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SIM_INIT api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SIM_CHV, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SIM_CHV api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SIM_SLOT api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SIM_PB_INIT, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SIM_PB_INIT api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_CALL_STATE, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_CALL_STATE api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_ZONE_ZUHAUSE, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_ZONE_ZUHAUSE api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SAT_IDLE_SCREEN_EVENT, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SAT_IDLE_SCREEN_EVENT api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               apiRet = vconf_get_int(VCONFKEY_TELEPHONY_SPN_DISP_CONDITION, &retValue);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SPN_DISP_CONDITION api ret[%d], return value[%d] ",ret_val,retValue);
+               apiRet = 0;
+               retValue = 0;
+
+               spnName = vconf_get_str(VCONFKEY_TELEPHONY_SPN_NAME);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SPN_NAME:[%s] ",spnName);
+
+               nwName = vconf_get_str(VCONFKEY_TELEPHONY_NWNAME);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_NWNAME:[%s] ",nwName);
+
+               imei = vconf_get_str(VCONFKEY_TELEPHONY_IMEI);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_IMEI:[%s] ",imei);
+
+               szImei = vconf_get_str(SZ_IMEI);
+               TEST_DEBUG("SZ_IMEI:[%s] ",szImei);
+
+               szSubNum= vconf_get_str(VCONFKEY_TELEPHONY_SUBSCRIBER_NUMBER);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SUBSCRIBER_NUMBER:[%s] ",szSubNum);
+
+               szSubName= vconf_get_str(VCONFKEY_TELEPHONY_SUBSCRIBER_NAME);
+               TEST_DEBUG("VCONFKEY_TELEPHONY_SUBSCRIBER_NAME:[%s] ",szSubName);
+       }
+
+       if( memcmp(buf,"q",sizeof("q")-1) == 0 )
+       {
+               return -1;
+       }
+
+       return 0;
+}
+
+
+
+void nw_select_loop(int option)
+{
+       int ret;
+       fd_set readfds;
+
+       while (1) {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret) {
+
+                       if (FD_ISSET(0, &readfds)) {
+                               if(nw_read_key_input(option)<0)
+                                       break;
+                       }
+               }
+       }
+}
+
+void nw_test_thread_loop()
+{
+       TEST_DEBUG("start nw_test_thread_loop\n");
+       nw_select_loop(7);
+       fprintf(stderr," network exited\n");
+       pthread_exit(NULL);
+}
+
+int nw_test_subscribe_tapi_events()
+{
+       int i = 0;
+       int ret_val = TRUE;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       int NwEvtList[] =
+       {
+               TAPI_EVENT_NETWORK_GETNWBAND_CNF,
+               TAPI_EVENT_NETWORK_SETNWBAND_CNF,
+               TAPI_EVENT_NETWORK_GETSERVICEDOMAIN_CNF,
+               TAPI_EVENT_NETWORK_SETSERVICEDOMAIN_CNF,
+               TAPI_EVENT_NETWORK_CANCELMANUALSELECTION_CNF,
+               TAPI_EVENT_NETWORK_CANCELMANUALSEARCH_CNF,
+               TAPI_EVENT_NETWORK_GETNWORDER_CNF,
+               TAPI_EVENT_NETWORK_SETNWORDER_CNF,
+               TAPI_EVENT_NETWORK_GETNWMODE_CNF,
+               TAPI_EVENT_NETWORK_SETNWMODE_CNF,
+               TAPI_EVENT_NETWORK_SELECT_CNF,
+               TAPI_EVENT_NETWORK_SEARCH_CNF,
+               TAPI_EVENT_NETWORK_GETSELECTIONMODE_CNF,
+               TAPI_EVENT_NETWORK_GETPREFFEREDPLMN_CNF,
+               TAPI_EVENT_NETWORK_SETPREFFEREDPLMN_CNF,
+               TAPI_EVENT_NETWORK_GETPOWERONATTACH_CNF,
+               TAPI_EVENT_NETWORK_SETPOWERONATTACH_CNF,
+               TAPI_EVENT_NETWORK_LOCATIONCELLINFO_IND,
+               TAPI_EVENT_NETWORK_CHANGE_IND,
+               TAPI_EVENT_NETWORK_RADIO_INFO_IND,
+               TAPI_EVENT_NETWORK_SPN_INFO,
+               TAPI_EVENT_NETWORK_DISPLAYINFO_IND,
+               TAPI_EVENT_NETWORK_SEARCH_POPUP_ENABLE,
+               TAPI_EVENT_NETWORK_SEARCH_POPUP_DISABLE,
+               TAPI_EVENT_NETWORK_SET_ROAMING_MODE_CNF,
+               TAPI_EVENT_NETWORK_GET_ROAMING_MODE_CNF,
+               TAPI_EVENT_NETWORK_SET_CDMA_HYBRID_MODE_CNF,
+               TAPI_EVENT_NETWORK_GET_CDMA_HYBRID_MODE_CNF,
+       };
+
+       iNumOfNwEvt = sizeof(NwEvtList)/sizeof(int);
+       TEST_DEBUG("Number of NW Event List to be registered: %d", iNumOfNwEvt);
+       NW_subscription_id = (unsigned int *)calloc(iNumOfNwEvt, sizeof(unsigned int));
+
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               for( i=0 ; i< iNumOfNwEvt; i++ )
+               {
+                       api_err = tel_register_event(NwEvtList[i], &NW_subscription_id[i],(TelAppCallback)&nw_async_event_callback, NULL);
+
+                       if(api_err != TAPI_API_SUCCESS)
+                       {
+                               TEST_DEBUG("isn't subscribed. sub id is [%d], api_err is [%d]\n", NW_subscription_id[i],api_err);
+                               ret_val = FALSE;
+                               break;
+                       }
+               }
+       }
+       else
+       {
+               TEST_DEBUG("tel_init() failed");
+       }
+       return ret_val;
+
+}
+
+
+int nw_test_unsubscribe_tapi_events(void)
+{
+       int i = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+       int ret_val = TRUE;
+
+       for(i=0;i<iNumOfNwEvt; i++){
+               api_err = tel_deregister_event(NW_subscription_id[i]);
+               if(api_err != TAPI_API_SUCCESS){
+                       TEST_DEBUG("tel_deregister_event isn't unsubscribed. sub id is [%d] api_err is [%d]\n",NW_subscription_id[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+
+       }
+       tel_deinit();
+       return ret_val;
+}
+
+void nw_main(int argc, char *argv[])
+{
+       int ret=0;
+       pthread_t network_thread_id;
+
+       TEST_DEBUG("===== Network_test  ver 1.01 =====\n");
+
+       ret = pthread_create(&network_thread_id, NULL, (void *)&nw_test_thread_loop, NULL);
+
+       if(ret != 0)
+       {
+               TEST_DEBUG( "Thread for TAPI Events Failed\n");
+       }
+
+       //nw_test_subscribe_tapi_events();
+
+       pthread_join(network_thread_id, NULL);
+}
+
+
diff --git a/src/test_apps/tapi_power_test.c b/src/test_apps/tapi_power_test.c
new file mode 100644 (file)
index 0000000..d2decf8
--- /dev/null
@@ -0,0 +1,381 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <pthread.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <glib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "TapiCommon.h"
+#include "ITapiPower.h"
+#include "TelDisplay.h"
+#include "TapiEvent.h"
+
+#define TEST_DEBUG(frmt, args...)      \
+{do { fprintf(stderr, "[Pow Test][%s:%04d] "frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true  !0
+#endif
+#ifndef bool
+#define bool  char
+#endif
+
+#define        NUM_OF_POWER_EVENT                      4
+
+static unsigned int power_subscription_id[NUM_OF_POWER_EVENT] = {0, };
+
+static unsigned int  display_subscription_id = 0;
+
+void __PrintBatteryStatus(void *pData)
+{
+       tapi_power_battery_status_level_t*  pBattLevel;
+
+       pBattLevel = (tapi_power_battery_status_level_t*)pData;
+       switch(*pBattLevel){
+               case TAPI_POWER_BATT_STAT_POWER_OFF_LEVEL:
+                       TEST_DEBUG("Battery Level  [Power Off]");
+                       break;
+               case TAPI_POWER_BATT_STAT_CRIT_LOW_LEVEL:
+                       TEST_DEBUG("Battery Level [Critical-Low]");
+                       break;
+               case TAPI_POWER_BATT_STAT_LOW_LEVEL:
+                       TEST_DEBUG("Battery Level [Low Battery]");
+                       break;
+               case TAPI_POWER_BATT_STAT_NORMAL_LEVEL:
+                       TEST_DEBUG("Battery Level [Normal Level]");
+                       break;
+               default:
+                       TEST_DEBUG("Unknown Battery Level");
+                       break;
+       }
+
+       return;
+}
+
+void __PrintFlightModeStatus(void *pData)
+{
+       tapi_power_flight_mode_resp_type_t*  pFlightStatus;
+
+       pFlightStatus = (tapi_power_flight_mode_resp_type_t *)pData;
+
+       switch(*pFlightStatus){
+               case TAPI_POWER_FLIGHT_MODE_RESP_ON:
+                       TEST_DEBUG("Flight Mode  [On]");
+                       break;
+               case TAPI_POWER_FLIGHT_MODE_RESP_OFF:
+                       TEST_DEBUG("Flight Mode  [Off]");
+                       break;
+               case TAPI_POWER_FLIGHT_MODE_RESP_FAIL:
+                       TEST_DEBUG("Flight Mode  [Mode Change Fail]");
+                       break;
+               default:
+                       TEST_DEBUG("Unknown Flight Mode");
+                       break;
+       }
+       return;
+}
+
+void __PrintDisplayIconInfo(void *pData)
+{
+       tapi_display_icon_info_t*  pDisplayIcon = NULL;
+
+       pDisplayIcon = (tapi_display_icon_info_t*)pData;
+
+       switch(pDisplayIcon->rssi){
+               case TAPI_DISPLAY_RSSI_0:
+                       TEST_DEBUG("RSSI [0]");
+                       break;
+               case TAPI_DISPLAY_RSSI_1:
+                       TEST_DEBUG("RSSI [1]");
+                       break;
+               case TAPI_DISPLAY_RSSI_2:
+                       TEST_DEBUG("RSSI [2]");
+                       break;
+               case TAPI_DISPLAY_RSSI_3:
+                       TEST_DEBUG("RSSI [3]");
+                       break;
+               case TAPI_DISPLAY_RSSI_4:
+                       TEST_DEBUG("RSSI [4]");
+                       break;
+               case TAPI_DISPLAY_RSSI_5:
+                       TEST_DEBUG("RSSI [5]");
+                       break;
+               case TAPI_DISPLAY_RSSI_6:
+                       TEST_DEBUG("RSSI [6]");
+                       break;
+               default:
+                       TEST_DEBUG("Unknow RSSI Value");
+                       break;
+
+       }
+
+       switch(pDisplayIcon->batt){
+               case TAPI_POWER_PHONE_BATT_LEVEL0:
+                       TEST_DEBUG("Battery Level [0]");;
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL1:
+                       TEST_DEBUG("Battery Level [1]");
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL2:
+                       TEST_DEBUG("Battery Level [2]");
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL3:
+                       TEST_DEBUG("Battery Level [3]");
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL4:
+                       TEST_DEBUG("Battery Level [4]");
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL5:
+                       TEST_DEBUG("Battery Level [5]");
+                       break;
+               case TAPI_POWER_PHONE_BATT_LEVEL_INIT:
+                       TEST_DEBUG("Battery Level [Init]");
+                       break;
+               default:
+                       TEST_DEBUG("Unknow Battery Level Value");
+                       break;
+
+       }
+
+}
+
+void  power_async_event_callback(TelTapiEvent_t* event,void *data )
+{
+
+       TEST_DEBUG("$$$$$$ POWER EVENT NOTIFICATION $$$$$$");
+       TEST_DEBUG("Request ID : [0x%x]", event->RequestId);
+
+       switch(event->EventType)
+       {
+               case TAPI_EVENT_POWER_PHONE_OFF:
+                       TEST_DEBUG("Event Type: [TAPI_EVENT_POWER_PHONE_OFF]");
+                       break;
+               case TAPI_EVENT_POWER_BATT_STAT_IND:
+                       TEST_DEBUG("Event Type: [TAPI_EVENT_POWER_BATT_STAT_IND]");
+                       __PrintBatteryStatus(event->pData);
+                       break;
+               case TAPI_EVENT_POWER_FLIGHT_MODE_RESP:
+                       TEST_DEBUG("Event Type: [TAPI_EVENT_POWER_FLIGHT_MODE_RESP]");
+                       __PrintFlightModeStatus(event->pData);
+                       break;
+               case TAPI_EVENT_DISPLAY_ICON_INFO_IND:
+                       TEST_DEBUG("Event Type: [TAPI_EVENT_DISPLAY_ICON_INFO_IND]");
+                       __PrintDisplayIconInfo(event->pData);
+                       break;
+               default:
+                       TEST_DEBUG("Event Type: unknown event:[%d]", event->EventType);
+                       break;
+       }
+       TEST_DEBUG("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");
+
+}
+
+
+int power_read_key_input(void)
+{
+       int ret;
+       char buf[512] = {0, };
+       char msg[512];
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+       memset(buf,0, sizeof(buf));
+       memset(msg,0,sizeof(msg));
+
+       printf("******* Power & Display Test MENU ******************\n");
+       printf("*************** Asynchronous API *****************\n");
+       printf("Power Off[PwrOff]\n");
+       printf("Power On[PwrOn]\n");
+       printf("Reset [Reset]\n");
+       printf("Flight Mode On[FlightModeOn]  \n");
+       printf("Flight Mode Off[FlightModeOff] \n");
+       printf("Reboot Modem[RebootModem] \n");
+       printf("Ramdump [Ramdump] \n");
+       printf("**************** Synchronous API *****************\n");
+       printf("Get Power status[GetPwrStatus] \n");
+       printf("Quit Power Test[quit] \n");
+       printf("************************************************\n");
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       if(strncmp(buf, "PwrOff", sizeof("PwrOff")-1) == 0)
+       {
+               ret_val = tel_process_power_command(TAPI_PHONE_POWER_OFF);
+               TEST_DEBUG("tel_process_power_command return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "PwrOn", sizeof("PwrOn")-1) == 0)
+       {
+               ret_val = tel_process_power_command(TAPI_PHONE_POWER_ON);
+               TEST_DEBUG("tel_process_power_command return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "Reset", sizeof("Reset")-1) == 0)
+       {
+               ret_val = tel_process_power_command(TAPI_PHONE_POWER_RESET);
+               TEST_DEBUG("tel_process_power_command return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "FlightModeOn", sizeof("FlightModeOn")-1) == 0)
+       {
+               ret_val = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_ENTER);
+               TEST_DEBUG("tel_set_flight_mode return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "FlightModeOff", sizeof("FlightModeOff")-1) == 0)
+       {
+               ret_val = tel_set_flight_mode(TAPI_POWER_FLIGHT_MODE_LEAVE);
+               TEST_DEBUG("tel_set_flight_mode return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "RebootModem", sizeof("RebootModem")-1) == 0)
+       {
+               ret_val = tel_reset_modem();
+               TEST_DEBUG("tel_reset_modem return value is %d \n",ret_val);
+       }
+
+       else if(strncmp(buf, "Ramdump", sizeof("Ramdump")-1) == 0)
+       {
+               ret_val = tel_enforce_ramdump_of_modem();
+               TEST_DEBUG("tel_enforce_ramdump_of_modem return value is %d",ret_val);
+       }
+       else if(strncmp(buf, "quit", sizeof("quit")-1) == 0)
+       {
+               return -1;
+       }
+
+       memset(buf, 0, 512);
+
+       return 0;
+}
+
+
+void power_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+               {
+                       if (FD_ISSET(0, &readfds))
+                       {
+                               if(power_read_key_input() < 0)
+                                       break;
+                       }
+               }
+       }
+       return;
+}
+
+int power_test_unsubscribe_tapi_event(void)
+{
+       int i = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+       int ret_val = TRUE;
+
+       for(i=0;i<NUM_OF_POWER_EVENT; i++){
+               api_err = tel_deregister_event(power_subscription_id[i]);
+               if(api_err != TAPI_API_SUCCESS){
+                       TEST_DEBUG("tel_deregister_event isn't unsubscribed. sub id is %d api_err is %d\n",power_subscription_id[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+
+       }
+
+       tel_deinit();
+
+       return ret_val;
+}
+
+int power_test_subscribe_tapi_events (void)
+{
+       TEST_DEBUG("1");
+
+       int i = 0;
+       int ret_val = TRUE;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       int PowerEvtList[NUM_OF_POWER_EVENT] = {
+               TAPI_EVENT_POWER_PHONE_OFF,
+               TAPI_EVENT_POWER_BATT_STAT_IND,
+               TAPI_EVENT_POWER_FLIGHT_MODE_RESP,
+               TAPI_EVENT_POWER_SERVICE_READY_IND,
+       };
+
+       //TEST_DEBUG("########### Power TEST #############");
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               TEST_DEBUG("2");
+               for(i=0;i<NUM_OF_POWER_EVENT; i++){
+                       TEST_DEBUG("3");
+                       api_err = tel_register_event(PowerEvtList[i], &power_subscription_id[i],(TelAppCallback)&power_async_event_callback,NULL);
+                       TEST_DEBUG("4");
+
+                       if(api_err != TAPI_API_SUCCESS){
+                               TEST_DEBUG("tel_register_event isn't subscribed. sub id is %d api_err is %d\n",power_subscription_id[i],api_err);
+                               ret_val = FALSE;
+                               break;
+                       }
+               }
+
+               TEST_DEBUG("5");
+
+               api_err = tel_register_event(TAPI_EVENT_DISPLAY_ICON_INFO_IND, &display_subscription_id,(TelAppCallback)&power_async_event_callback,NULL);
+               TEST_DEBUG("6");
+               if(api_err != TAPI_API_SUCCESS){
+                       TEST_DEBUG("tel_register_event isn't subscribed. sub id is %d api_err is %d\n",display_subscription_id,api_err);
+                       ret_val = FALSE;
+               }
+       }
+       else {
+
+               TEST_DEBUG("tel_init() failed");
+       }
+       return ret_val;
+}
+
+int power_test_main(int argc, char *argv[])
+{
+       return 0;
+}
diff --git a/src/test_apps/tapi_ps_test.c b/src/test_apps/tapi_ps_test.c
new file mode 100644 (file)
index 0000000..54875c0
--- /dev/null
@@ -0,0 +1,535 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <string.h>
+#include <assert.h>
+#include <glib.h>
+
+#include "ITapiPS.h"
+#include "TapiCommon.h"
+#include "TapiEvent.h"
+
+#define TEST_DEBUG(frmt, args...)      \
+{do { fprintf(stderr, "[PS Test][%s:%04d] "frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+#ifndef false
+       #define false 0
+#endif
+#ifndef true
+       #define true  !0
+#endif
+#ifndef bool
+       #define bool  char
+#endif
+
+int tapi_thread_id;
+//extern int EvtDeliveryHandle ;
+int request_id;
+int iNumOfPSEvt = 0;
+int error_code;
+static unsigned int * PS_subscription_id;
+
+// same as tapievent
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}data_t;
+
+
+void data_async_event_callback(TelTapiEvent_t* psEvent)
+{
+       if(psEvent->pData==NULL)
+       {
+               TEST_DEBUG("No Event Data!!");
+               return;
+       }
+
+       TEST_DEBUG("*************** Callback data **********************");
+       TEST_DEBUG("EventClass [%d],EventType [0x%x], Reques Id[%d], Event status [%d], psEvent->pDataLen[%d]",
+               psEvent->EventClass, psEvent->EventType, psEvent->RequestId, psEvent->Status,psEvent->pDataLen);
+
+       switch(psEvent->EventClass)
+       {
+               case TAPI_EVENT_CLASS_DATA:
+                       switch(psEvent ->EventType)
+                       {
+                               case TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO:
+                                       {
+                                               tapi_ps_net_start_rsp_t  pdp_ip_resp ={0,};
+                                               memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_net_start_rsp_t));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO     ***************");
+                                               TEST_DEBUG("ERR:[%d]",pdp_ip_resp.err);
+                                               TEST_DEBUG("CONTEXT ID:[%d]",pdp_ip_resp.cont_id);
+                                               TEST_DEBUG("PDP INFO FIELD FLAG:[%d]",pdp_ip_resp.pdp_info.field_flag);
+                                               TEST_DEBUG("PDP INFO GATEWAY:[%d.%d.%d.%d]",pdp_ip_resp.pdp_info.gateway[0],pdp_ip_resp.pdp_info.gateway[1],pdp_ip_resp.pdp_info.gateway[2],pdp_ip_resp.pdp_info.gateway[3]);
+                                               TEST_DEBUG("PDP INFO IP ADDRESS:[%d.%d.%d.%d]",pdp_ip_resp.pdp_info.ip_address[0],pdp_ip_resp.pdp_info.ip_address[1],pdp_ip_resp.pdp_info.ip_address[2],pdp_ip_resp.pdp_info.ip_address[3]);
+                                               TEST_DEBUG("PDP INFO PRIMARY DNS:[%d.%d.%d.%d]",pdp_ip_resp.pdp_info.primary_dns[0],pdp_ip_resp.pdp_info.primary_dns[1],pdp_ip_resp.pdp_info.primary_dns[2],pdp_ip_resp.pdp_info.primary_dns[3]);
+                                               TEST_DEBUG("PDP INFO SECONDARY DNS:[%d.%d.%d.%d]",pdp_ip_resp.pdp_info.secondary_dns[0],pdp_ip_resp.pdp_info.secondary_dns[1],pdp_ip_resp.pdp_info.secondary_dns[2],pdp_ip_resp.pdp_info.secondary_dns[3]);
+                                               TEST_DEBUG("PDP INFO SUBNET MASK:[%d.%d.%d.%d]",pdp_ip_resp.pdp_info.subnet_mask[0],pdp_ip_resp.pdp_info.subnet_mask[1],pdp_ip_resp.pdp_info.subnet_mask[2],pdp_ip_resp.pdp_info.subnet_mask[3]);
+                                               TEST_DEBUG("PDP INFO DEVICE NAME:****[%s]****",pdp_ip_resp.devname);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_PDP_ACT_RSP:
+                                       {
+                                               tapi_ps_pdp_info_t  pdp_ip_resp ={0,};
+                                               memcpy(&pdp_ip_resp, psEvent->pData, sizeof(tapi_ps_pdp_info_t));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_PDP_ACT_RSP       ***************");
+                                               TEST_DEBUG("CONTEXT ID:[%d]",pdp_ip_resp.cont_id);
+                                               TEST_DEBUG("ERR:[0x%x](0:normal)",pdp_ip_resp.err);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_PDP_DEACT_RSP:
+                                       {
+                                               tapi_ps_pdp_info_t              stop_resp ={0,};
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_PDP_DEACT_RSP     ***************");
+                                               memcpy(&stop_resp, psEvent->pData, sizeof(tapi_ps_pdp_info_t));
+                                               TEST_DEBUG("CONTEXT ID:[%d]",stop_resp.cont_id);
+                                               TEST_DEBUG("ERR:[0x%x](0:normal)",stop_resp.err);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_PDP_DEACT_IND:
+                                       {
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_PDP_DEACT_IND     ***************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_CALL_STATISTICS:
+                                       {
+                                               tapi_ps_call_statistics_t  call_stats ={0,};
+                                               memcpy(&call_stats, psEvent->pData, sizeof(tapi_ps_call_statistics_t));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_CALL_STATISTICS   ***************");
+                                               TEST_DEBUG("CALL STATS FOR CONTEXT ID:[%d]",call_stats.cid);
+                                               TEST_DEBUG("CALL STATS RX BYTES:[%lu]",call_stats.rx);
+                                               TEST_DEBUG("CALL STATS TX BYTES:[%lu]",call_stats.tx);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_ERROR_IND:
+                                       {
+                                               tapi_gprs_error_info_t error_rsp ={0,};
+                                               memcpy(&error_rsp, psEvent->pData, sizeof(tapi_gprs_error_info_t));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_ERROR_IND ***************");
+                                               TEST_DEBUG("ERROR CAUSE:[%d]",error_rsp.cause);
+                                               TEST_DEBUG("ERROR TYPE:[%d]",error_rsp.type);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_HSDPA_STATUS_NOTI:
+                                       {
+                                               tapi_hspda_status_type hsdpa_status =0x00;
+                                               memcpy(&hsdpa_status, psEvent->pData, sizeof(tapi_hspda_status_type));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_HSDPA_STATUS_NOTI ***************");
+                                               TEST_DEBUG("HSDPA STATUS - (0 -INACTIVE)  (1 -ACTIVE)  (2 -SUSPEND)");
+                                               TEST_DEBUG("CURRENT HSDPA STATUS:[%d]",hsdpa_status);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI:
+                                       {
+                                               tapi_ps_btdun_pincontrol pincontrol ={0,};
+                                               memcpy(&pincontrol, psEvent->pData, sizeof(tapi_ps_btdun_pincontrol));
+                                               TEST_DEBUG("**************      TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI     ***************");
+                                               TEST_DEBUG("SIGNAL :[%d]",pincontrol.signal);
+                                               TEST_DEBUG("STATUS:[%d]",pincontrol.status);
+                                               TEST_DEBUG("*******************************************************");
+                                       }
+                    break;
+
+                               default:
+                                       TEST_DEBUG("***  Default Event  psEvent ->EventType[0x%x] ****", psEvent ->EventType);
+                                       break;
+
+                       }
+
+                       break;
+
+
+               default:
+                       TEST_DEBUG("*** Other TAPI EVENT received : psEvent->EventClass : [0x%x] ****", psEvent->EventClass);
+                       break;
+
+       }
+
+}
+
+int data_test_subscribe_tapi_events()
+{
+       int i = 0;
+       int ret_val = TRUE;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+       int PSEvtList[] =
+       {
+               TAPI_EVENT_PS_PDP_ACT_RSP,
+               TAPI_EVENT_PS_PDP_DEACT_RSP,
+               TAPI_EVENT_PS_PDP_DEACT_IND,
+               TAPI_EVENT_PS_STATUS,
+               TAPI_EVENT_PS_CALL_STATISTICS,
+               TAPI_EVENT_PS_HSDPA_STATUS_NOTI,
+               TAPI_EVENT_PS_BTDUN_PINCONTROL_NOTI,
+               TAPI_EVENT_PS_PDP_ACT_IPCONFIG_INFO,
+               TAPI_EVENT_PS_ERROR_IND,
+               TAPI_EVENT_PS_EXTERNAL_CALL_IND,
+       };
+
+       iNumOfPSEvt = sizeof(PSEvtList)/sizeof(int);
+       TEST_DEBUG("Number of PS Event List to be registered: %d", iNumOfPSEvt);
+       PS_subscription_id = (unsigned int *)calloc(iNumOfPSEvt, sizeof(unsigned int));
+
+               if(tel_init() == TAPI_API_SUCCESS)
+               {
+                       for( i=0 ; i< iNumOfPSEvt; i++ )
+                       {
+                               api_err = tel_register_event(PSEvtList[i], &PS_subscription_id[i],(TelAppCallback)&data_async_event_callback,NULL);
+
+                               if(api_err != TAPI_API_SUCCESS)
+                               {
+                                       TEST_DEBUG("isn't subscribed. sub id is [%d], api_err is [%d]\n", PS_subscription_id[i],api_err);
+                                       ret_val = FALSE;
+                                       break;
+                               }
+                       }
+               }
+               else
+               {
+                       TEST_DEBUG("tel_init() failed");
+               }
+       return ret_val;
+
+}
+
+
+int data_test_unsubscribe_tapi_events(void)
+{
+       int i = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+       int ret_val = TRUE;
+
+       for(i=0;i<iNumOfPSEvt; i++){
+               api_err = tel_deregister_event(PS_subscription_id[i]);
+               if(api_err != TAPI_API_SUCCESS){
+                       TEST_DEBUG("tel_deregister_event isn't unsubscribed. sub id is [%d] api_err is [%d]\n",PS_subscription_id[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+       tel_deinit();
+       return ret_val;
+}
+
+
+void HandleGeneralResponseError(int error)
+{
+       if(error == 0x8000 || error == 0x8100)
+       {
+               TEST_DEBUG("!!Success!!");
+       }
+       else
+       {
+               TEST_DEBUG("!!Fail!! error value : 0x%x", error);
+       }
+}
+
+
+/*
+int get_handle()
+{
+    _handle = TapiRegisterClient(TAPI_EVENT_CLASS_DATA, app_callback, TRUE);
+
+    if( _handle == NULL )
+    {
+
+       TEST_DEBUG("handle get error");
+       return -1;
+    }
+
+    if(!ProtoMgrRegisterLPC())
+    {
+       TEST_DEBUG("LPC  get error - Call");
+       return -1;
+    }
+
+}
+
+
+
+// ravi 10 20 #add server die handler
+int read_phoneserver_pkt(void)
+{
+  int ret;
+
+  ret = lxt_callback(_handle);
+
+  if (ret == -1 )
+  {
+       TEST_DEBUG("Tapi Client: Phone Server Died, Exiting Gracefully");
+       exit(0);
+  }
+
+    return 0;
+}
+
+
+int call_quit(void)
+{
+       int result = 0;
+
+       if (!noti_finish(&error_code))
+       {
+               TEST_DEBUG( "Error: noti_finish() %d", error_code);
+       }
+       else
+       {
+               TEST_DEBUG("### noti was closed");
+       }
+
+       if (!TapiUnregisterClient(_handle))
+       {
+               TEST_DEBUG( "Error: TapiUnregisterClient failed");
+       }
+       else
+       {
+               TEST_DEBUG("### TapiUnregisterClient success");
+       }
+
+       return result;
+
+}
+
+*/
+
+
+int data_read_key_input(void)
+{
+       int ret;
+       char buf[256];
+//     char cid;
+       int requestId;
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+    ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                        perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+
+       TEST_DEBUG("Enter string in square braces: %s", buf);
+
+       TEST_DEBUG("################### PS TEST MENU    ###################");
+       TEST_DEBUG("gprs start          :       [start]");
+       TEST_DEBUG("pdp deactivate      :       [deact]");
+       TEST_DEBUG("BT PIN CTRL         :       [pinon]");
+       TEST_DEBUG("BT PIN CTRL         :       [pinoff]");
+       TEST_DEBUG("quit                :       [quit]");
+
+       TEST_DEBUG("######################################################\n");
+
+
+        if(strncmp(buf, "start", 5) == 0)
+        {
+               tapi_ps_net_start_req_t start_req;
+               int  ctxt_id;
+               memset(&start_req, 0, sizeof(tapi_ps_net_start_req_t));
+
+               TEST_DEBUG("ENTER Context id....");
+               scanf("%d", &ctxt_id);
+               start_req.cont_id = ctxt_id;
+               start_req.pdp_info.pdp_type = GPRS_PDP_TYPE_IP;
+
+               TEST_DEBUG("ENTER APN choice  1. [nate.sktelecom.com],   2. [annam.dyn], 3. [web.vodafone.de], 4. [airtelwap.es]");
+               scanf("%d", &ctxt_id);
+               if(ctxt_id == 1)
+                       strcpy(start_req.pdp_info.apn , "nate.sktelecom.com");
+               if(ctxt_id == 2)
+               {
+                       //strcpy(start_req.pdp_info.apn , "annam.dyn");
+                       strcpy(start_req.pdp_info.apn , "annah.dyn");
+                       //strcpy(start_req.pdp_info.dns1 , "10.8.15.249");
+                       //strcpy(start_req.pdp_info.dns2 , "10.8.15.250");
+                       //strcpy(start_req.pdp_info.password, "mms");
+                       //strcpy(start_req.pdp_info.username, "mms");
+               }
+               if(ctxt_id == 3)
+               {
+                       //strcpy(start_req.pdp_info.apn , "annam.dyn");
+                       strcpy(start_req.pdp_info.apn , "web.vodafone.de");
+                       //strcpy(start_req.pdp_info.dns1 , "10.8.15.249");
+                       //strcpy(start_req.pdp_info.dns2 , "10.8.15.250");
+                       //strcpy(start_req.pdp_info.password, "mms");
+                       //strcpy(start_req.pdp_info.username, "mms");
+               }
+               if(ctxt_id == 4)
+               {
+                       strcpy(start_req.pdp_info.apn, "airtelwap.es");
+               }
+
+               start_req.pdp_info.pdp_type= GPRS_PDP_TYPE_IP;
+
+               ret_val= tel_activate_gprs_pdp(&start_req,&requestId);
+               TEST_DEBUG(" API RETURN VAL:[%d]",ret_val);
+       }
+
+
+       else if(strncmp(buf, "deact", 5) == 0)
+       {
+               tapi_ps_net_stop_req_t stop_req;
+               memset(&stop_req, 0, sizeof(tapi_ps_net_stop_req_t));
+
+               TEST_DEBUG("ENTER Context id....");
+               int  ctxt_id;
+               scanf("%d", &ctxt_id);
+               stop_req.cont_id = ctxt_id;
+
+               ret_val=tel_deactivate_gprs_pdp(&stop_req,&requestId);
+               TEST_DEBUG(" API RETURN VAL:[%d]",ret_val);
+       }
+       else if(strncmp(buf, "pinon", 5) == 0)
+       {
+               tapi_ps_btdun_pincontrol pincontrol;
+
+               memset(&pincontrol, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+               pincontrol.signal=GPRS_DATA_SIGNAL_DTR;
+               pincontrol.status=GPRS_SIGNAL_STATUS_ON;
+
+               ret_val=  tel_control_gprs_btdun_pin(pincontrol,&requestId);
+               TEST_DEBUG(" API RETURN VAL:[%d]",ret_val);
+       }
+       else if(strncmp(buf, "pinoff", 6) == 0)
+       {
+               tapi_ps_btdun_pincontrol pincontrol;
+
+               memset(&pincontrol, 0, sizeof(tapi_ps_btdun_pincontrol));
+
+               pincontrol.signal=GPRS_DATA_SIGNAL_DTR;
+               pincontrol.status=GPRS_SIGNAL_STATUS_OFF;
+
+               ret_val=  tel_control_gprs_btdun_pin(pincontrol,&requestId);
+               TEST_DEBUG(" API RETURN VAL:[%d]",ret_val);
+       }
+
+       /*      Go back to main Menu.   */
+       else if(strncmp(buf, "quit", 4) == 0)
+       {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu");
+               return -1;
+       }
+
+       memset(buf, '\0', 256);
+
+       return 0;
+
+}
+
+
+void data_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+
+    while (1)
+               {
+        FD_ZERO(&readfds);
+        FD_SET(0, &readfds);
+
+
+        ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+        if (ret) {
+
+           if (FD_ISSET(0, &readfds)) {
+                 if(data_read_key_input()<0)
+                       break;
+            }
+        }
+    }
+}
+
+
+
+void* data_test_thread_loop(void* data)
+{
+       TEST_DEBUG( " data_test_thread_loop : called...");
+
+       data_select_loop();
+
+       TEST_DEBUG(" data_test_thread_loop : stdin Loop exited");
+
+       pthread_exit(NULL);
+}
+
+
+int data_main(int argc, char *argv[])
+{
+
+//     int ret = 0;
+//     int count;
+       pthread_t  p_thread;
+
+//     ret = get_handle();
+
+
+       tapi_thread_id = pthread_create(&p_thread, NULL, data_test_thread_loop, NULL);
+
+       if(tapi_thread_id != 0)
+       {
+               TEST_DEBUG( "Failed while creating a thread to read from stdin");
+               return -1;
+       }
+       else
+       {
+               TEST_DEBUG( "a thread was created to read from stdin ..");
+       }
+
+       data_test_subscribe_tapi_events();
+
+       pthread_join(p_thread, NULL);
+
+       TEST_DEBUG("Exiting PS test program bye bye !");
+
+       return 0;
+
+}
+
diff --git a/src/test_apps/tapi_sat_test.c b/src/test_apps/tapi_sat_test.c
new file mode 100644 (file)
index 0000000..3878542
--- /dev/null
@@ -0,0 +1,1640 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <assert.h>
+#include <glib.h>
+
+#include "TelDefines.h"
+#include "ITapiCall.h"
+#include "ITapiSs.h"
+#include "TapiCommon.h"
+#include "TelSim.h"
+#include "TelErr.h"
+#include "TelSatEnvelope.h"
+#include "TelSatObj.h"
+#include "TelSatProactvCmd.h"
+#include "ITapiSat.h"
+#include "TelUtility_ext.h"
+#include "TelUtility.h"
+
+
+TS_UINT g_hCall;
+TelTapiCallInfo_t g_info;
+
+extern int EvtDeliveryHandle ;
+
+
+/***************************/
+int tapi_thread_id;
+
+int error_code;
+unsigned int curr_cmd = 0;
+
+tapi_simatk_select_item_ind_data_t sel_item_data;
+tapi_simatk_resp_data_t tr_data;
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}data_t;
+
+unsigned char *ptrEvnts[] = {
+"Telephony.Sat.UI.DisplayText",
+"Telephony.Sat.UI.GetInKey",
+"Telephony.Sat.UI.GetInputKey",
+"Telephony.Sat.UI.PlayTone",
+"Telephony.Sat.UI.Refresh",
+"Telephony.Sat.UI.SetUpMenu",
+"Telephony.Sat.UI.SelectItem",
+"Telephony.Sat.UI.SendSms",
+"Telephony.Sat.UI.SendSs",
+"Telephony.Sat.UI.SendUssd",
+"Telephony.Sat.UI.SetupCall",
+"Telephony.Sat.ProvideLocalInfo",
+"Telephony.Sat.SetupEventList",
+"Telephony.Sat.SetupIdelMode",
+"Telephony.Sat.UI.SendDtmf",
+"Telephony.Sat.Idle.LanguageNotification",
+"Telephony.Sat.UI.LaunchBrowser",
+"Telephony.Sat.UI.EndProacativeSession",
+"Telephony.Sat.Call.CallControlCnf",
+"Telephony.Sat.SMS.MoSmsControlCnf",
+"Telephony.Sat.SMS.Refresh",
+"Telephony.Sat.Phonebook.Refresh",
+"Telephony.Sat.Idle.Refresh",
+"Telephony.Sat.SMS.SendSms",
+"Telephony.Sat.Call.SetupCall",
+"Telephony.Sat.SS.SendSs",
+"Telephony.Sat.USSD.SendUssd",
+"Telephony.Sat.Idle.SetupText",
+"Telephony.Sat.DTMF.SendDtmf",
+"User.WapBrowser.ESimAtkOpenURL",
+"Telephony.Sat.UI.CmdProcEnd",
+"Telephony.Sat.MenuSelectionCnf",
+"Telephony.Sat.EventDownloadCnf"
+};
+
+
+
+int
+sat_util_pack_7bit( TS_BYTE* pOut, const char* szData, int in_len )
+{
+       int i;
+       int pos;
+       int shift = 0;
+
+       for( pos = 0, i = 0; /*pos < out_len_max &&*/ i < in_len; pos++, i++ )
+       {
+               /* pack the low bits */
+               pOut[pos] = szData[i] >> shift;
+
+               if ( i + 1 < in_len )
+               {
+                       /* pack the high bits using the low bits of the next character */
+                       pOut[pos] |= szData[i+1] << ( 7 - shift );
+
+                       shift++;
+
+                       if( shift == 7 )
+                       {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+
+       /* done */
+       return pos;
+}
+
+
+
+void
+test_send_tr(unsigned char gen_resp)
+{
+//Send TR
+       int ret;
+       unsigned char input;
+
+       tr_data.tr_data.display_txt.result.general_result = gen_resp;
+       tr_data.tr_data.display_txt.result.me_problem = 0x00;
+
+       switch(gen_resp)
+               {
+                       case 0x20:
+                       case 0x21:
+                       case 0x26:
+                       case 0x34:
+                       case 0x35:
+                       case 0x37:
+                       case 0x38:
+                       case 0x39:
+                       case 0x3a:
+                       case 0x3c:
+                       case 0x3d:
+                       {
+                               char scabuf[5] = {0};
+                               printf("additional response 0x00 ~ 0x0a:  0x\n");
+                               ret = read(0, scabuf, sizeof(scabuf));
+                               if (ret < 0)
+                               {
+                                       if (errno == EINTR)
+                                               perror("read(1)");
+                                       return -1;
+                               }
+                               else if (ret == 0)
+                                       return ret;
+
+                               input = (scabuf[0] -'0' )<< 4;
+                               input |= (scabuf[1]-'0')&0x0F;
+                               if(input >= 0x00 && input <= 0x3F)
+                               {
+                                       printf("additional response gen_resp 0x%x - add_resp 0x%x\n", gen_resp, input);
+                                       if(gen_resp == 0x39)
+                                       {
+                                               if(curr_cmd == TAPI_EVENT_SAT_UI_SEND_SS_IND)
+                                                       tr_data.tr_data.send_ss.additional_cc_problem_info = input;
+                                               else if(curr_cmd == TAPI_EVENT_SAT_UI_SEND_USSD_IND)
+                                                       tr_data.tr_data.send_ussd.additional_cc_problem_info = input;
+                                               else
+                                                       tr_data.tr_data.display_txt.result.me_problem = input;
+                                       }
+                                       else if(gen_resp == 0x34)
+                                               tr_data.tr_data.send_ss.additional_ss_problem_info = input;
+                                       else if(gen_resp == 0x37)
+                                               tr_data.tr_data.send_ussd.additional_ussd_problem_info = input;
+                                       else
+                                               tr_data.tr_data.display_txt.result.me_problem = input;
+                               }
+
+                       }
+
+                       default:
+                               break;
+               }
+
+       printf(" [SAT] : test_send_tr ::: send TR. command_number=%d, type=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type);
+       TelTapiSatSendUiUserConfirm(tr_data.command_number ,tr_data.command_type,SAT_ENGINE_USER_CONFIRM_YES,NULL,0);
+}
+
+
+/*
+void
+test_call_control(void)
+{
+       tapi_call_setup_info_t call;
+       unsigned short error;
+       tapi_call_handle  call_handle;
+       unsigned char num_dial[] = "+01234567890123456789";
+
+       call.call_type = TAPI_CALL_TYPE_VOICE;
+       memcpy(call.number,num_dial, sizeof(num_dial));
+       call.identity_mode = 0x01;
+       tapi_call_setup(&call, call_handle, &error);
+}
+*/
+
+void
+test_simatk_proactive_send_dtmf(tapi_simatk_send_dtmf_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : alpha_id present?= %d,  alphaID: %s\n",tst_data->alpha_id.is_present, tst_data->alpha_id.string);
+
+       printf(" [SAT] : DTMF STRING: len = %d, USSD string = %s\n", tst_data->dtmf_string.string_length, tst_data->dtmf_string.dtmf_tone);
+
+       if(tst_data->icon_id.is_present)
+               printf(" \n[SAT] : icon identifier: icon_id=%d, icon_qulaifier = 0x%x\n", tst_data->icon_id.icon_identifier, tst_data->icon_id.icon_qualifier);
+       else
+               printf(" \n[SAT] : icon NOT present\n");
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+}
+
+void
+test_simatk_proactive_play_tone(tapi_simatk_play_tone_ind_data_t* tst_data)
+{
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+       printf(" [SAT] : command qulaifier: Vibrate_alert 0=optional, 1=required, %d\n", tst_data->command_detail.u.cmd_quali_play_tone.vibrate_alert);
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+       printf(" [SAT] : alpha identifier: is_alpha_present=%d, rawdcs=0x%x, str_len=%d, string=%s\n", tst_data->alpha_id.is_present,
+                               tst_data->alpha_id.dcs.raw_dcs, tst_data->alpha_id.string_len, tst_data->alpha_id.string);
+
+       printf(" [SAT] : TONE: requested tone - 0x%02x\n", tst_data->tone.type);
+       printf(" [SAT] : DURATION: interval=0x%x, time unit=0x%x\n",tst_data->duration.time_interval,tst_data->duration.time_unit);
+       printf(" [SAT] : icon: is_icon_present=%d, icon id: %d\n",tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+}
+
+void
+test_simatk_proactive_get_input(tapi_simatk_get_input_ind_data_t* tst_data)
+{
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: is_using_alphabet_set (1=ys, 0=using digits) [%d]\n",tst_data->command_detail.u.cmd_quali_get_input.is_using_alphabet_set);
+
+       printf(" [SAT] : command qualifier: alpha_type = 0x%x, help info available? = %d\n",tst_data->command_detail.u.cmd_quali_get_input.alphabet_type, tst_data->command_detail.u.cmd_quali_get_input.is_help_info_available);
+
+       printf(" [SAT] : command qualifier: is_me_echo_user_input? [%d], unpacked data? [%d]\n",tst_data->command_detail.u.cmd_quali_get_input.is_me_echo_user_input, tst_data->command_detail.u.cmd_quali_get_input.is_user_input_unpacked_format);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : text-dcs: compressed?=%d, alpha_format=0x%x\n",tst_data->text.dcs.is_compressed_format, tst_data->text.dcs.alphabet_format);
+
+       printf(" [SAT] : text: string_length=%d, string=%s\n",tst_data->text.string_length, tst_data->text.string);
+
+       printf(" [SAT] : text: response length: min =%d, max=%d\n",tst_data->response_length.min, tst_data->response_length.max);
+
+       printf(" [SAT] : icon: is_icon_present=%d, icon id: %d\n",tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       printf(" [SAT] : Default Text: string length=%d\n",tst_data->default_text.string_length);
+
+       printf(" [SAT] : Default Text: dcs=0x%02x, default string: %s\n",tst_data->default_text.dcs.alphabet_format, tst_data->default_text.string);
+
+       if(!tst_data->command_detail.u.cmd_quali_get_input.is_user_input_unpacked_format)
+               tr_data.tr_data.get_input.text.dcs.alphabet_format = TAPI_SAT_ALPHABET_FROMAT_SMS_DEFAULT;
+       else
+               tr_data.tr_data.get_input.text.dcs.alphabet_format = TAPI_SIMATK_ALPHABET_FROMAT_8BIT_DATA;
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+
+               if(tst_data->icon_id.is_present)
+               tr_data.tr_data.get_input.result.general_result = TAPI_SAT_R_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED;
+       else
+               tr_data.tr_data.get_input.result.general_result = 0x00;
+
+}
+
+void
+test_simatk_proactive_get_inkey(tapi_simatk_get_inkey_ind_data_t* tst_data)
+{
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: inkey_type 0== using character set, 1== yes/no type [%d]\n",tst_data->command_detail.u.cmd_quali_get_inkey.inkey_type);
+
+       printf(" [SAT] : command qualifier: use_alpha_set? [%d], is_help info available? [%d]\n",tst_data->command_detail.u.cmd_quali_get_inkey.is_using_alphabet_set, tst_data->command_detail.u.cmd_quali_get_inkey.is_help_info_available);
+
+       printf(" [SAT] : command qualifier: immideate response required? [%d], alphabet_type [%d]\n",tst_data->command_detail.u.cmd_quali_get_inkey.is_immediate_response_required, tst_data->command_detail.u.cmd_quali_get_inkey.alphabet_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : text-dcs: compressed?=%d, alpha_format=0x%x, msg_class=0x%x, raw_dcs=%d\n",tst_data->text.dcs.is_compressed_format, tst_data->text.dcs.alphabet_format,tst_data->text.dcs.msg_class, tst_data->text.dcs.raw_dcs);
+
+       printf(" [SAT] : text: string_length=%d, string=%s\n",tst_data->text.string_length, tst_data->text.string);
+
+       printf(" [SAT] : icon: is_icon_present=%d\n",tst_data->icon_id.is_present);
+
+       printf(" [SAT] : DURATION: interval=0x%x, time unit=0x%x\n",tst_data->duration.time_interval,tst_data->duration.time_unit);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+
+       if(tst_data->icon_id.is_present)
+               tr_data.tr_data.get_inkey.result.general_result = TAPI_SAT_R_SUCCESS_BUT_REQUESTED_ICON_NOT_DISPLAYED;
+       else
+               tr_data.tr_data.get_inkey.result.general_result = 0x00;
+}
+
+
+
+void
+test_simatk_event_download(tapi_simatk_event_download_type_t event)
+{
+       TelSatkEventDownloadData_t evt_dl;
+       int requestId = -1;
+
+       memset(&evt_dl, 0x00, sizeof(TelSatkEventDownloadData_t));
+
+       printf(" [SAT] : EVENT DOWNLOAD\n");
+
+       switch(event)
+       {
+               case TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE:
+                       evt_dl.event_download_type = TAPI_EVENT_SAT_DW_TYPE_IDLE_SCREEN_AVAILABLE;
+                       break;
+
+               case TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY:
+                       evt_dl.event_download_type = TAPI_EVENT_SAT_DW_TYPE_USER_ACTIVITY;
+                       break;
+
+               case TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION:
+                       {
+                               char scabuf[5] = {0};
+                               int ret = 0;
+
+                               printf(" en: english\n");
+                               printf(" de: german\n");
+                               ret = read(0, scabuf, sizeof(scabuf));
+                               if (ret < 0)
+                               {
+                                       if (errno == EINTR)
+                                               perror("read(1)");
+                                       return -1;
+                               }
+                               else if (ret == 0)
+                                       return ret;
+
+                               if(strncmp(scabuf, "en", 2) == 0)
+                                       evt_dl.u.language_selection_event_req_Data.language = TAPI_SAT_LP_ENGLISH;
+                               else
+                                       evt_dl.u.language_selection_event_req_Data.language = TAPI_SAT_LP_GERMAN;
+
+                       evt_dl.event_download_type = TAPI_EVENT_SAT_DW_TYPE_LANGUAGE_SELECTION;
+                       }
+                       break;
+
+               case TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION:
+                       evt_dl.event_download_type = TAPI_EVENT_SAT_DW_TYPE_BROWSER_TERMINATION;
+                       evt_dl.u.browser_termination_event_req_Data.browser_termination_cause = TAPI_SAT_BROWSER_TERMINATED_BY_USER;
+                       break;
+
+               default:
+                       break;
+       }
+       TelTapiSatEventDownloadEnvelope(&evt_dl, &requestId);
+}
+
+void
+test_simatk_proactive_lang_noti(tapi_simatk_language_notification_ind_data_t* tst_data)
+{
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : command qualifier: language specified? = %d\n",tst_data->command_detail.u.cmd_quali_language_notification.bSpecificLanguageNotification);
+
+       if(tst_data->command_detail.u.cmd_quali_language_notification.bSpecificLanguageNotification)
+               printf(" [SAT] : command qualifier: language  = %d\n",tst_data->language.language);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+
+}
+
+void
+test_simatk_proactive_provide_local_info(tapi_simatk_provide_local_info_ind_data_t* tst_data)
+{
+
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : command qualifier: requested info = 0x%02x\n",tst_data->command_detail.u.cmd_quali_provide_local_info);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       //tr_data.tr_data.provide_loc_info.other_info = TRUE;
+       tr_data.tr_data.provide_loc_info.info_type = tst_data->command_detail.u.cmd_quali_provide_local_info;
+
+       if(tst_data->command_detail.u.cmd_quali_provide_local_info == TAPI_SIMATK_CMD_QUALI_PROVIDE_LANGUAGE_SETTING)
+       {
+               tr_data.tr_data.provide_loc_info.u.language_info.language = TAPI_SIMATK_LP_ENGLISH;
+       }
+       else if(tst_data->command_detail.u.cmd_quali_provide_local_info == TAPI_SIMATK_CMD_QUALI_PROVIDE_DATE_TIME_AND_TIME_ZONE)
+       {
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.year = 0x80;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.month = 0x50;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.day = 0x70;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.hour = 0x41;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.minute = 0x80;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.second = 0x71;
+               tr_data.tr_data.provide_loc_info.u.time_zone_info.time_zone = 0xFF;
+       }
+}
+
+void
+test_simatk_proactive_setup_idle_mode_text(tapi_simatk_setup_idle_mode_text_ind_data_t* tst_data)
+{
+
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : text-dcs: compressed?=%d, alpha_format=0x%x, msg_class=0x%x, raw_dcs=%d\n",tst_data->text.dcs.is_compressed_format, tst_data->text.dcs.alphabet_format,tst_data->text.dcs.msg_class, tst_data->text.dcs.raw_dcs);
+
+       printf(" [SAT] : text: string_length=%d, string=%s\n",tst_data->text.string_length, tst_data->text.string);
+
+       printf(" [SAT] : icon: is_icon_present=%d\n",tst_data->icon_id.is_present);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+}
+
+void
+test_simatk_proactive_display_text(tapi_simatk_display_text_ind_data_t* tst_data)
+{
+
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: clear=%d, priority=%d\n",tst_data->command_detail.u.cmd_quali_display_text.msg_clear,tst_data->command_detail.u.cmd_quali_display_text.msg_priority);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : text-dcs: compressed?=%d, alpha_format=0x%x, msg_class=0x%x, raw_dcs=%d\n",tst_data->text.dcs.is_compressed_format, tst_data->text.dcs.alphabet_format,tst_data->text.dcs.msg_class, tst_data->text.dcs.raw_dcs);
+
+       printf(" [SAT] : text: string_length=%d, string=%s\n",tst_data->text.string_length, tst_data->text.string);
+
+       printf(" [SAT] : icon: is_icon_present=%d\n",tst_data->icon_id.is_present);
+
+       printf(" [SAT] : DURATION: interval=0x%x, time unit=0x%x\n",tst_data->duration.time_interval,tst_data->duration.time_unit);
+
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+/*     tr_data.tr_data.display_txt.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.display_txt.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.display_txt.result.general_result);
+       tapi_simatk_send_terminal_response(&tr_data);*/
+
+}
+
+void
+test_simatk_send_menu_select_env(TS_BOOL help)
+{
+       TelSatMenuSelectionReqInfo_t env_data;
+       char str[5] = {0,0};
+       int item;
+       char scabuf[5] = {0};
+       int ret;
+       int requestId = -1;
+
+       ret = read(0, scabuf, sizeof(scabuf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       memcpy(str, scabuf, (strlen(scabuf)-1));
+
+               item = atoi(str);
+
+       env_data.item_identifier = item;
+       env_data.is_help_requested = help;
+       printf(" [SAT] : test_simatk_send_menu_select_env ::: MENU SELECT item_id= 0x%x, HELP?=%s\n",
+                                                               env_data.item_identifier,(env_data.is_help_requested)?"Reqd":"NOT Reqd");
+       TelTapiSatMenuSelectionEnvelope(&env_data, &requestId);
+}
+
+void
+test_simatk_proactive_refresh(tapi_simatk_refresh_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: REFRESH MODE=%d\n",tst_data->command_detail.u.cmd_quali_refresh);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : File Count=%d\n", tst_data->file_list.file_count);
+
+       printf(" [SAT] : file ids:");
+       for(i=0; i<tst_data->file_list.file_count;i++)
+               printf("\tfile_#[%d] = 0x%04x",i,tst_data->file_list.file_id[i]);
+
+       printf(" \n");
+
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       /*tr_data.tr_data.refresh.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.refresh.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.refresh.result.general_result);
+       tapi_simatk_send_terminal_response(&tr_data);*/
+}
+
+
+test_simatk_proactive_setup_menu(tapi_simatk_setup_menu_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: selection_pref=%d, help_info=%d\n",tst_data->command_detail.u.cmd_quali_setup_menu.selection_preference,tst_data->command_detail.u.cmd_quali_setup_menu.is_help_info_available);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : alpha identifier: is_alpha_present=%d, rawdcs=0x%x, str_len=%d, string=%s\n", tst_data->alpha_id.is_present,
+                               tst_data->alpha_id.dcs.raw_dcs, tst_data->alpha_id.string_len, tst_data->alpha_id.string);
+
+       printf(" [SAT] : items NAI: list count=%d \n [SAT] : items NAI:",tst_data->item_next_action_ind_list.list_count);
+       for(i=0; i<tst_data->item_next_action_ind_list.list_count;i++)
+               printf("\tnai_ind[%d] = 0x%02x",i, tst_data->item_next_action_ind_list.list[i]);
+
+       printf(" \n[SAT] : icon identifier: is icon present = %d\n",tst_data->icon_id.is_present);
+
+       printf(" [SAT] : setup menu: menu_count = %d\n",tst_data->menu_item_count);
+       for(i=0;i<tst_data->menu_item_count;i++)
+               printf("\tmenu_item[%d]= %s, [menu_item_id = %d]\n",i, tst_data->menu_item[i].text, tst_data->menu_item[i].item_id);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       /*tr_data.tr_data.setup_menu.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.setup_menu.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.setup_menu.result.general_result);
+       tapi_simatk_send_terminal_response(&tr_data);*/
+}
+
+void
+test_simatk_proactive_send_sms(tapi_simatk_send_sms_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : send sms :is_packing_by ME rquired%d\n",tst_data->command_detail.u.cmd_quali_send_sms.is_packing_by_me_required);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : send sms: alpha_id present?= %d,  icon present? = %d, icon_id=%d\n",tst_data->alpha_id.is_present, tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       printf(" [SAT] : send sms: ALPHA Len = %d, Alpha ID: %s\n",tst_data->alpha_id.string_len, tst_data->alpha_id.string);
+       printf(" [SAT] : send sms ADDRESS: ton=0x%x, npi=0x%x\n",tst_data->address.ton,tst_data->address.npi);
+
+       printf(" [SAT] : send sms ADDRESS: len = %d, dialling Number = %s\n", tst_data->address.dialling_number_length, tst_data->address.dialling_number);
+
+       printf(" [SAT] : send sms TPDU: len = %d, tpdu_data:\n",tst_data->sms_tpdu.data_length);
+       for(i=0;i<tst_data->sms_tpdu.data_length;i++)
+               printf("\t0x%02x",tst_data->sms_tpdu.data[i]);
+       printf("\n");
+
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       /*tr_data.tr_data.setup_event_list.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.setup_event_list.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.setup_event_list.result.general_result);
+       tapi_simatk_send_terminal_response(&tr_data);*/
+}
+
+void
+test_simatk_proactive_setup_evt_list(tapi_simatk_setup_event_list_ind_data_t* tst_data)
+{
+
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : setup menu: setup event count = %d\n",tst_data->event_list.event_list_count);
+       for(i=0;i<tst_data->event_list.event_list_count;i++)
+               printf("\t#[%d], [event = 0x%02x]\n",i+1, tst_data->event_list.list[i]);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       /*tr_data.tr_data.setup_event_list.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.setup_event_list.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.setup_event_list.result.general_result);
+       tapi_simatk_send_terminal_response(&tr_data);*/
+}
+
+void
+test_simatk_proactive_send_ussd(tapi_simatk_send_ussd_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : alpha_id present?= %d,  alphaID: %s\n",tst_data->alpha_id.is_present, tst_data->alpha_id.string);
+
+//     printf(" [SAT] : USSD STRING - DCS: alpha format=0x%x, compressed format?=0x%x\n",tst_data->ussd_string.dcs.alphabet_format,tst_data->ussd_string.dcs.is_compressed_format);
+
+       printf(" [SAT] : USSD STRING - DCS: Raw DCS =0x%x\n",tst_data->ussd_string.raw_dcs);
+
+       printf(" [SAT] : USSD STRING: len = %d, USSD string = \n", tst_data->ussd_string.ussd_string_length);
+
+       for(i=0;i<tst_data->ussd_string.ussd_string_length;i++)
+               printf(" 0x%02x\t",tst_data->ussd_string.ussd_string[i]);
+
+       printf(" \n[SAT] : icon identifier: is icon present = %d, icon_id=%d\n",tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+}
+
+void
+test_simatk_proactive_send_ss(tapi_simatk_send_ss_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : alpha_id present?= %d,  alphaID: %s\n",tst_data->alpha_id.is_present, tst_data->alpha_id.string);
+
+       printf(" [SAT] : SS STRING: ton=0x%x, npi=0x%x\n",tst_data->ss_string.ton,tst_data->ss_string.npi);
+
+       printf(" [SAT] : SS STRING: len = %d, ss string = %s\n", tst_data->ss_string.string_length, tst_data->ss_string.string);
+
+       printf(" \n[SAT] : icon identifier: is icon present = %d, icon_id=%d\n",tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+}
+
+void
+test_simatk_proactive_setup_call(tapi_simatk_setup_call_ind_data_t* tst_data)
+{
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : setup call :Qualifier = %d\n",tst_data->command_detail.u.cmd_quali_setup_call);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : user confirmation phase: alpha_id present?= %d,  alphaID: %s\n",tst_data->user_confirm_phase_alpha_id.is_present, tst_data->user_confirm_phase_alpha_id.string);
+
+       printf(" [SAT] : ADDRESS: ton=0x%x, npi=0x%x\n",tst_data->address.ton,tst_data->address.npi);
+
+       printf(" [SAT] : ADDRESS: len = %d, dialling Number = %s\n", tst_data->address.dialling_number_length, tst_data->address.dialling_number);
+
+       printf(" [SAT] : SUB ADDRESS: len = %d, data:\n",tst_data->sub_address.sub_address_len);
+       for(i=0;i<tst_data->sub_address.sub_address_len;i++)
+               printf("\t0x%02x",tst_data->sub_address.sub_address[i]);
+       printf("\n");
+
+       printf(" [SAT] : CCP: len = %d, data:\n",tst_data->ccp.data_length);
+       for(i=0;i<tst_data->ccp.data_length;i++)
+               printf("\t0x%02x",tst_data->ccp.data[i]);
+       printf("\n");
+
+       printf(" [SAT] : DURATION: interval=0x%x, time unit=0x%x\n",tst_data->duration.time_interval,tst_data->duration.time_unit);
+
+       printf(" [SAT] : call setup phase: alpha_id present?= %d,  alphaID: %s\n",tst_data->call_setup_phase_alpha_id.is_present, tst_data->call_setup_phase_alpha_id.string);
+
+       printf(" \n[SAT] : user confirmation phase - icon identifier: is icon present = %d, icon_id=%d\n",tst_data->user_confirm_phase_icon_id.is_present, tst_data->user_confirm_phase_icon_id.icon_identifier);
+
+       printf(" \n[SAT] : call setup phase - icon identifier: is icon present = %d, icon_id=%d\n",tst_data->call_setup_phase_icon_id.is_present, tst_data->call_setup_phase_icon_id.icon_identifier);
+
+       //Send TR
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       /*tr_data.tr_data.setup_event_list.result.general_result = TAPI_SIMATK_R_SUCCESS;
+       tr_data.tr_data.setup_event_list.result.me_problem = 0x00;
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.setup_event_list.result.general_result);
+       //tapi_simatk_send_terminal_response(&tr_data);*/
+}
+
+void
+test_simatk_proactive_select_item_list(tapi_simatk_select_item_ind_data_t* tst_data)
+{
+
+       int i;
+       printf(" [SAT] : command detail: command_num=%d, command_type=0x%x\n",tst_data->command_detail.command_number,tst_data->command_detail.command_type);
+
+       printf(" [SAT] : command qualifier: prez_type = %d, selection_pref=%d, help_info=%d\n",tst_data->command_detail.u.cmd_quali_select_item.presentation_type,
+               tst_data->command_detail.u.cmd_quali_select_item.selection_preference,tst_data->command_detail.u.cmd_quali_select_item.is_help_info_available);
+
+       printf(" [SAT] : device identity: src=0x%x, dest=0x%x\n",tst_data->device_identities.source,tst_data->device_identities.destination);
+
+       printf(" [SAT] : alpha identifier: is_alpha_present=%d, rawdcs=0x%x, str_len=%d, string=%s\n", tst_data->alpha_id.is_present,
+                               tst_data->alpha_id.dcs.raw_dcs, tst_data->alpha_id.string_len, tst_data->alpha_id.string);
+
+       printf(" [SAT] : items NAI: list count=%d \n [SAT] : items NAI:",tst_data->item_next_action_ind_list.list_count);
+       for(i=0; i<tst_data->item_next_action_ind_list.list_count;i++)
+               printf("\tnai_ind[%d] = 0x%02x",i, tst_data->item_next_action_ind_list.list[i]);
+
+       printf(" \n[SAT] : DEFAULT ITEM = %d\n",tst_data->default_item_identifier);
+       printf(" \n[SAT] : icon identifier: is icon present = %d, icon_id=%d\n",tst_data->icon_id.is_present, tst_data->icon_id.icon_identifier);
+
+       printf(" [SAT] : setup menu: item_count = %d\n",tst_data->menu_item_count);
+       for(i=0;i<tst_data->menu_item_count;i++)
+               printf("\tITEM#[%d]= %s, [item_id = %d]\n",i, tst_data->menu_item[i].text, tst_data->menu_item[i].item_id);
+
+       tr_data.command_number = tst_data->command_detail.command_number;
+       tr_data.command_type = tst_data->command_detail.command_type;
+       if(tst_data->command_detail.u.cmd_quali_select_item.is_help_info_available == TRUE)
+               tr_data.tr_data.select_item.item_identifier = 0x01;
+}
+
+void
+test_select_item_send_tr(void)
+{
+       tapi_simatk_resp_data_t tr_data;
+       char str[5] = {0,0};
+       int item;
+       int ret;
+       //Send TR
+       //if(item_id > '0' && item_id <= '9')
+       {
+       char scabuf[5] = {0};
+               ret = read(0, scabuf, sizeof(scabuf));
+               if (ret < 0)
+               {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               }
+               else if (ret == 0)
+                       return ret;
+               memcpy(str, scabuf, (strlen(scabuf)));
+               item = atoi(str);
+
+               if(item == 0)
+               {
+                       tr_data.tr_data.select_item.result.general_result = TAPI_SIMATK_R_PROACTIVE_SESSION_TERMINATED_BY_USER;
+                       tr_data.tr_data.select_item.other_info = FALSE;
+               }
+       /*      else if(sel_item_data.menu_item_count <  item )
+               {
+                       printf(" [SAT] : ***input should be between 1 & %d\n",sel_item_data.menu_item_count);
+                       tr_data.tr_data.select_item.result.general_result = TAPI_SIMATK_R_BACKWARD_MOVE_BY_USER;
+                       tr_data.tr_data.select_item.other_info = FALSE;
+
+               }*/
+               else
+               {
+                       tr_data.tr_data.select_item.result.general_result = TAPI_SIMATK_R_SUCCESS;
+                       tr_data.tr_data.select_item.other_info = TRUE;
+                       tr_data.tr_data.select_item.item_identifier = (unsigned char)item;
+               }
+       }
+       //else
+       //{
+       //      printf(" [SAT] : ***INCORRECT INPUT\n");
+       //              tr_data.tr_data.select_item.result.general_result = TAPI_SIMATK_R_PROACTIVE_SESSION_TERMINATED_BY_USER;
+       //              tr_data.tr_data.select_item.other_info = FALSE;
+       //}
+
+
+       tr_data.command_number = sel_item_data.command_detail.command_number;
+       tr_data.command_type = sel_item_data.command_detail.command_type;
+
+       tr_data.tr_data.select_item.result.me_problem = 0x00;
+
+       printf(" [SAT] : send TR. command_number=%d, type=0x%x, gen_result=0x%x, item_id=%d\n",
+                                                               tr_data.command_number, tr_data.command_type,
+                                                               tr_data.tr_data.select_item.result.general_result, item);
+       TelTapiSatSendUiUserConfirm(tr_data.command_number,tr_data.command_type,SAT_ENGINE_USER_CONFIRM_YES,&tr_data.tr_data.select_item.item_identifier,sizeof(TS_UINT8));
+}
+
+int isServerDied = 0;
+/********************************************************************************/
+
+
+int sat_read_key_input(void)
+{
+       char ch;
+       int ret;
+       char callId=0;
+       unsigned short len;
+       char buf[256];
+       char dtmfStr[16] = "1000103001";
+       char normal[16] = "0103001";
+
+
+
+
+
+    ret = read(0, buf, sizeof(buf));
+    if (ret < 0) {
+      if (errno == EINTR)
+      perror("read(1)");
+      return -1;
+    } else if (ret == 0) return ret;
+
+
+       printf("\n q : quit \n");
+       if(curr_cmd == TAPI_EVENT_SAT_SELECT_ITEM_IND)
+               printf(" si : select item terminal response \n");
+       if(curr_cmd == TAPI_EVENT_SAT_GET_INKEY_IND || curr_cmd == TAPI_EVENT_SAT_GET_INPUT_IND)
+       {
+               printf(" \"inkey\" or \"input\" : get inkey/input response \n");
+               printf(" \"tr\" : to send response other than success \n");
+       }
+       else if(curr_cmd != 0x00)
+               printf(" tr :Send TR for the current command = 0x%x \n",curr_cmd);
+       printf(" smhelp :  envelope cmd help \n");
+       printf(" sm :  envelope cmd select menu \n");
+       printf(" ed: event download\n");
+       printf(" cc: MO call control\n");
+
+       printf("--SAT_key_in : %s\n", buf);
+
+       if(strncmp(buf, "q", 1) == 0){
+               printf("### test program is terminated.\n");
+
+            return -1;
+      }
+
+       if(strncmp(buf, "tr", 2) == 0)
+       {
+               char scabuf[5] = {0};
+               unsigned char input=0x00;
+
+               printf("general response 0x00 ~ 0x3d:  0x\n");
+
+               ret = read(0, scabuf, sizeof(scabuf));
+               if (ret < 0)
+               {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               }
+               else if (ret == 0)
+                       return ret;
+
+               input = (scabuf[0] -'0' )<< 4;
+               input |= (scabuf[1]-'0')&0x0F;
+               if(input >= 0x00 && input <= 0x3d)
+                       test_send_tr(input);
+               else
+                       test_send_tr(0x00);
+       }
+
+
+       else if(strncmp(buf, "smhelp", 6) == 0)
+       {
+               printf("\n select menu for help: \n");
+               test_simatk_send_menu_select_env(TRUE);
+       }
+       else if(strncmp(buf, "sm", 2) == 0)
+       {
+               printf("\n select menu: \n");
+               test_simatk_send_menu_select_env(FALSE);
+       }
+
+       else if(strncmp(buf, "si", 2) == 0)
+       {
+               printf("\n select item: \n");
+               test_select_item_send_tr();
+       }
+       else if(strncmp(buf, "ed", 2) == 0)
+       {
+               char scabuf[5] = {0};
+               printf(" id : idle screen \n");
+               printf(" ua :  user activity \n");
+               printf(" ls: language selection\n");
+               printf(" bt: browser termination\n");
+               ret = read(0, scabuf, sizeof(scabuf));
+               if (ret < 0)
+               {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               }
+               else if (ret == 0)
+                       return ret;
+
+               if(strncmp(scabuf, "id", 2) == 0)
+                       test_simatk_event_download(TAPI_SIMATK_EVENT_DW_TYPE_IDLE_SCREEN_AVAILABLE);
+               else if(strncmp(scabuf, "ua", 2) == 0)
+                       test_simatk_event_download(TAPI_SIMATK_EVENT_DW_TYPE_USER_ACTIVITY);
+               else if(strncmp(scabuf, "ls", 2) == 0)
+                       test_simatk_event_download(TAPI_SIMATK_EVENT_DW_TYPE_LANGUAGE_SELECTION);
+               else if(strncmp(scabuf, "bt", 2) == 0)
+                       test_simatk_event_download(TAPI_SIMATK_EVENT_DW_TYPE_BROWSER_TERMINATION);
+               else
+                       printf("no such event\n");
+
+       }
+       else if((strncmp(buf, "inkey", 5) == 0) ||(strncmp(buf, "input", 5) == 0))
+       {
+               char scabuf[255] = {0};
+               printf(" ONly one character for INKEY, between min and max for INPUT: \n");
+               printf(" plz read the command qualifier and provide the input accordingly... \n");
+               printf(" bk : backward move \n");
+               printf(" end :  end proactive session \n");
+               printf(" INKEY: y OR n: for yes or no input\n");
+               printf(" input char/string:\n");
+
+               ret = read(0, scabuf, sizeof(scabuf));
+               if (ret < 0)
+               {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               }
+               else if (ret == 0)
+                       return ret;
+
+               if((strncmp(scabuf, "y", 1) == 0) || (strncmp(scabuf, "n", 1) == 0))
+               {
+                       //tr_data.tr_data.get_inkey.result.general_result = 0x00;
+                       tr_data.tr_data.get_inkey.text.dcs.msg_class = TAPI_SIMATK_MSG_CLASS_RESERVED;
+                       tr_data.tr_data.get_inkey.text.dcs.alphabet_format = TAPI_SIMATK_ALPHABET_FROMAT_8BIT_DATA;
+                       tr_data.tr_data.get_inkey.text.string_length = 1;
+                       if(strncmp(scabuf, "y", 1) == 0)
+                               tr_data.tr_data.get_inkey.text.string[0] = 0x01; //buf[0];
+                       else
+                               tr_data.tr_data.get_inkey.text.string[0] = 0x00;
+                       tr_data.tr_data.get_inkey.text.string[1] = '\0';
+                       //test_send_tr(tr_data.tr_data.get_inkey.result.general_result);
+               }
+               else if(strncmp(scabuf, "bk", 2) == 0)
+               {
+                       tr_data.tr_data.get_inkey.result.general_result = 0x11;
+               }
+               else if(strncmp(scabuf, "end", 3) == 0)
+               {
+                       tr_data.tr_data.get_inkey.result.general_result = 0x10;
+               }
+               else
+               {
+                       if(strncmp(buf, "inkey", 5) == 0)
+                       {
+                               //tr_data.tr_data.get_inkey.result.general_result = 0x00;
+                               tr_data.tr_data.get_inkey.text.dcs.msg_class = TAPI_SIMATK_MSG_CLASS_RESERVED;
+                               tr_data.tr_data.get_inkey.text.dcs.alphabet_format = TAPI_SIMATK_ALPHABET_FROMAT_8BIT_DATA;
+                       tr_data.tr_data.get_inkey.text.string_length = 1;
+                               tr_data.tr_data.get_inkey.text.string[0] = scabuf[0]; //buf[0];
+                       tr_data.tr_data.get_inkey.text.string[1] = '\0';
+               }
+                       else
+                       {
+                               int i=0;
+
+                               //tr_data.tr_data.get_input.result.general_result = 0x00;
+                               tr_data.tr_data.get_input.text.dcs.msg_class = TAPI_SIMATK_MSG_CLASS_RESERVED;
+                               printf("inkey: input: %s\n",scabuf);
+                               while(scabuf[i] != 0xA)
+                               {
+                                       //printf("%c\n",scabuf[i]);
+                                       i++;
+                               }
+                               if(tr_data.tr_data.get_input.text.dcs.alphabet_format == TAPI_SIMATK_ALPHABET_FROMAT_SMS_DEFAULT)
+                               {
+                                       tr_data.tr_data.get_input.text.string_length = (TS_UINT8)sat_util_pack_7bit(tr_data.tr_data.get_input.text.string, &scabuf[0], i );
+                               }
+                               else
+                               {
+                                       tr_data.tr_data.get_input.text.string_length = i;
+                                       memcpy(tr_data.tr_data.get_input.text.string, &scabuf[0], tr_data.tr_data.get_input.text.string_length);
+                               }
+                       }
+               }
+
+               test_send_tr(tr_data.tr_data.get_inkey.result.general_result);
+       }
+       else if(strncmp(buf, "cc", 2) == 0)
+       {
+               char scabuf[25] = {0};
+               TelCallSetupParams_t si;
+
+               memset(&si, 0, sizeof(si));
+               si.CallType=TAPI_CALL_TYPE_VOICE;
+
+               printf("number to be dialled:\n");
+
+               ret = read(0, scabuf, sizeof(scabuf));
+               if (ret < 0)
+               {
+                       if (errno == EINTR)
+                               perror("read(1)");
+                       return -1;
+               }
+               else if (ret == 0)
+                       return ret;
+
+               memcpy(si.szNumber, &scabuf, strlen(scabuf));
+
+               si.IdentityMode = TAPI_CALL_IDENTITY_SHOW;              //default
+
+               printf("send the call make message to server....%s", si.szNumber);
+
+               //ret = tapi_call_setup(&si, &g_hCall);
+
+               printf(" after calling tapi_call_setup : g_hCall - %d", g_hCall);
+
+               printf(" Tapi return value is %d", ret);
+
+               if(ret)
+               {
+                       memcpy(&g_info.callNumber, si.szNumber, sizeof( si.szNumber));
+               }
+       }
+
+       /*
+       #if 0
+       if(strncmp(buf, "prof", 4) == 0){
+               test_simatk_profile_download();
+      } else if(strncmp(buf, "env", 3) == 0){
+               test_simatk_envelope_send();
+      } else if(strncmp(buf, "ed", 2) == 0){
+               test_simatk_event_send();
+      } else if(strncmp(buf, "sm", 2) == 0) {
+               scanf("%s", buf);
+
+               sendEnvelopeCmd_SetupMenu(FALSE, atoi(buf));
+       } else if(strncmp(buf, "si", 2) == 0) {
+               scanf("%s", buf);
+
+               sendTerminalResponse_SelectItem(0x00, TRUE, atoi(buf), 0, NULL);
+       }
+
+       #endif
+       */
+
+       if(strncmp(buf, "menu", 4) == 0)
+        {
+               printf("Finished Testing this module, Going back to Main Menu\n");
+               //call_test_exit();
+               return -1;
+               //exit(0);
+        }
+
+       memset(buf, '\0', 256);
+
+    return 0;
+}
+
+
+/********************************************************************************/
+static int  app_callback(TelTapiEventClass_t eventClass, TelTapiEventType_t    eventType, /*length*/int  param1,/*pDate*/void * param2)
+{
+       int i;
+       //unsigned char *buf= (unsigned char*) param2;
+
+       //unsigned char *count = buf;
+       int            loop_count;
+
+printf("\n [SAT] app_callback( eventType=0x%02x) \n", eventType);
+#if 0
+printf("   eventClass: %d, eventType: %d[%02x], paramLength = %d\n", eventClass, eventType, eventType, param1);
+
+       for( i=0; i<param1; i++ ) printf("[%02x] ", buf[i]);
+       printf("\n --------------- ------ \n");
+
+       #endif
+
+       switch(eventClass)
+       {
+               case TAPI_EVENT_CLASS_SAT:
+                       switch(eventType)
+                       {
+                               case TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND:
+                                       printf("[SAT]  TAPI_EVENT_SAT_END_PROACTIVE_SESSION_IND.\n");
+                                       break;
+
+                               case TAPI_EVENT_SAT_DISPLAY_TEXT_IND:
+                               {
+                                       tapi_simatk_display_text_ind_data_t  tst_data;
+                                       tapi_simatk_resp_data_t tr_data;
+                                       curr_cmd = eventType;
+
+                                       printf(" [SAT] TAPI_EVENT_SAT_DISPLAY_TEXT_IND: \n");
+                                       //test_display_text_data.data_len = param1;
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_display_text_ind_data_t));
+
+                                       test_simatk_proactive_display_text(&tst_data);
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SETUP_MENU_IND:
+                               {
+                                       tapi_simatk_setup_menu_ind_data_t  tst_data;
+                                       curr_cmd = eventType;
+
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SETUP_MENU_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_setup_menu_ind_data_t));
+
+                                       test_simatk_proactive_setup_menu(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_SIMATK_EVENT_SETUP_EVENT_LIST_IND:
+                               {
+                                       tapi_simatk_setup_event_list_ind_data_t tst_data;
+
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_SIMATK_EVENT_SETUP_EVENT_LIST_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_setup_event_list_ind_data_t));
+
+                                       test_simatk_proactive_setup_evt_list(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_REFRESH_IND:
+                               {
+                                       tapi_simatk_refresh_ind_data_t tst_data;
+
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_REFRESH_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_refresh_ind_data_t));
+
+                                       test_simatk_proactive_refresh(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_SELECT_ITEM_IND:
+                               {
+                                       printf(" [SAT] TAPI_EVENT_SAT_SELECT_ITEM_IND: \n");
+                                       memcpy(&sel_item_data, param2, sizeof(tapi_simatk_select_item_ind_data_t));
+                                       curr_cmd = eventType;
+                                       test_simatk_proactive_select_item_list(&sel_item_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SEND_SMS_IND:
+                               {
+                                       tapi_simatk_send_sms_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SEND_SMS_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_send_sms_ind_data_t));
+
+                                       test_simatk_proactive_send_sms(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SETUP_CALL_IND:
+                               {
+                                       tapi_simatk_setup_call_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SETUP_CALL_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_setup_call_ind_data_t));
+                                       test_simatk_proactive_setup_call(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SEND_SS_IND:
+                               {
+                                       tapi_simatk_send_ss_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SEND_SS_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_send_ss_ind_data_t));
+                                       test_simatk_proactive_send_ss(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SEND_USSD_IND:
+                               {
+                                       tapi_simatk_send_ussd_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SEND_USSD_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_send_ussd_ind_data_t));
+                                       test_simatk_proactive_send_ussd(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_GET_INKEY_IND:
+                                       {
+                                       tapi_simatk_get_inkey_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_GET_INKEY_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_get_inkey_ind_data_t));
+                                       test_simatk_proactive_get_inkey(&tst_data);
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_SAT_GET_INPUT_IND:
+                                       {
+                                       tapi_simatk_get_input_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_GET_INPUT_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_get_inkey_ind_data_t));
+                                       test_simatk_proactive_get_input(&tst_data);
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_SAT_PLAY_TONE_IND :
+                                       {
+                                       tapi_simatk_play_tone_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_PLAY_TONE_IND : \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_play_tone_ind_data_t));
+                                       test_simatk_proactive_play_tone(&tst_data);
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_SAT_UI_SEND_DTMF_IND:
+                                       {
+                                       tapi_simatk_send_dtmf_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_UI_SEND_DTMF_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_send_dtmf_ind_data_t));
+                                       test_simatk_proactive_send_dtmf(&tst_data);
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND:
+                               {
+                                       tapi_simatk_setup_idle_mode_text_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_SETUP_IDLE_MODE_TEXT_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_setup_idle_mode_text_ind_data_t));
+                                       test_simatk_proactive_setup_idle_mode_text(&tst_data);
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND:
+                               {
+                                       tapi_simatk_provide_local_info_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_provide_local_info_ind_data_t));
+                                       test_simatk_proactive_provide_local_info(&tst_data);
+                               }
+
+                                       break;
+
+                               case TAPI_EVENT_SAT_LANGUAGE_NOTIFICATION_IND:
+                               {
+                                       tapi_simatk_language_notification_ind_data_t tst_data;
+                                       curr_cmd = eventType;
+                                       printf(" [SAT] TAPI_EVENT_SAT_PROVIDE_LOCAL_INFO_IND: \n");
+                                       memcpy(&tst_data, param2, sizeof(tapi_simatk_language_notification_ind_data_t));
+                                       test_simatk_proactive_lang_noti(&tst_data);
+                               }
+
+                                       break;
+
+                               case TAPI_EVENT_SAT_CALL_CONTROL_IND:
+                               {
+                                       tapi_simatk_call_control_cnf_data_t cc_result;
+                                       int i;
+                                       memcpy(&cc_result, param2, sizeof(tapi_simatk_call_control_cnf_data_t));
+                                       printf(" [SAT] TAPI_EVENT_SAT_CALL_CONTROL_IND: \n");
+                                       curr_cmd = eventType;
+
+                                       printf(" [SAT] :  call type=0x%x, call control result: 0x%x\n",cc_result.call_type, cc_result.call_control_result);
+
+                                       printf(" [SAT] : alpha_present=%d, alpha_len=%d, alpha_text=%s\n",cc_result.alpha_identifier.is_present, cc_result.alpha_identifier.string_len, cc_result.alpha_identifier.string);
+
+                                       if(cc_result.call_control_result == SIMATK_CALL_CONTROL_R_ALLOWED_WITH_MOD)
+                                       {
+                                               if(cc_result.call_type == TAPI_SIMATK_CALL_TYPE_MO_VOICE)
+                                               {
+                                                       if(cc_result.u.voice_call_data.address.dialling_number_length > 0)
+                                                       {
+                                                               printf(" [SAT] : TON = 0x%x, NPI = 0x%x\n",cc_result.u.voice_call_data.address.ton, cc_result.u.voice_call_data.address.npi);
+                                                               printf(" [SAT] : ADDRESS: len=%d, value =", cc_result.u.voice_call_data.address.dialling_number_length);
+                                                               for(i=0; i<cc_result.u.voice_call_data.address.dialling_number_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.voice_call_data.address.dialling_number[i]);
+                                                       }
+
+                                                       if(cc_result.u.voice_call_data.sub_address.sub_address_len > 0)
+                                                       {
+                                                               printf(" [SAT] : SUBADDRESS: len=%d, value =", cc_result.u.voice_call_data.sub_address.sub_address_len);
+                                                               for(i=0; i<cc_result.u.voice_call_data.sub_address.sub_address_len;i++)
+                                                                       printf("\t0x%02x",cc_result.u.voice_call_data.sub_address.sub_address[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : SUBADDRESS NOT PRESENT ");
+
+                                                       printf(" [SAT] : BC REPEAT IND: %d", cc_result.u.voice_call_data.bc_repeat_indicator);
+
+                                                       if(cc_result.u.voice_call_data.ccp1.data_length > 0)
+                                                       {
+                                                               printf(" [SAT] : CCP1: len=%d, value =", cc_result.u.voice_call_data.ccp1.data_length);
+                                                               for(i=0; i<cc_result.u.voice_call_data.ccp1.data_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.voice_call_data.ccp1.data[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : CCP1 NOT PRESENT ");
+
+                                                       if(cc_result.u.voice_call_data.ccp2.data_length > 0)
+                                                       {
+                                                               printf(" [SAT] : CCP2: len=%d, value =", cc_result.u.voice_call_data.ccp2.data_length);
+                                                               for(i=0; i<cc_result.u.voice_call_data.ccp2.data_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.voice_call_data.ccp2.data[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : CCP2 NOT PRESENT ");
+                                               }
+                                               else
+                                               {
+                                                       if(cc_result.u.ss_data.ss_string.string_length > 0)
+                                                       {
+                                                               printf(" [SAT] : TON = 0x%x, NPI = 0x%x\n",cc_result.u.ss_data.ss_string.ton, cc_result.u.ss_data.ss_string.npi);
+                                                               printf(" [SAT] : ADDRESS: len=%d, value =", cc_result.u.ss_data.ss_string.string_length);
+                                                               for(i=0; i<cc_result.u.ss_data.ss_string.string_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.ss_data.ss_string.string[i]);
+                                                       }
+
+                                                       if(cc_result.u.ss_data.sub_address.sub_address_len > 0)
+                                                       {
+                                                               printf(" [SAT] : SUBADDRESS: len=%d, value =", cc_result.u.ss_data.sub_address.sub_address_len);
+                                                               for(i=0; i<cc_result.u.ss_data.sub_address.sub_address_len;i++)
+                                                                       printf("\t0x%02x",cc_result.u.ss_data.sub_address.sub_address[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : SUBADDRESS NOT PRESENT ");
+
+                                                       printf(" [SAT] : BC REPEAT IND: %d", cc_result.u.ss_data.bc_repeat_indicator);
+
+                                                       if(cc_result.u.ss_data.ccp1.data_length > 0)
+                                                       {
+                                                               printf(" [SAT] : CCP1: len=%d, value =", cc_result.u.ss_data.ccp1.data_length);
+                                                               for(i=0; i<cc_result.u.ss_data.ccp1.data_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.ss_data.ccp1.data[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : CCP1 NOT PRESENT ");
+
+                                                       if(cc_result.u.ss_data.ccp2.data_length > 0)
+                                                       {
+                                                               printf(" [SAT] : CCP2: len=%d, value =", cc_result.u.ss_data.ccp2.data_length);
+                                                               for(i=0; i<cc_result.u.ss_data.ccp2.data_length;i++)
+                                                                       printf("\t0x%02x",cc_result.u.ss_data.ccp2.data[i]);
+                                                       }
+                                                       else
+                                                               printf(" [SAT] : CCP2 NOT PRESENT ");
+                                               }
+                                       }
+                               }
+                                       break;
+                               case TAPI_EVENT_SAT_MO_SMS_CONTROL_IND:
+                               {
+                                       tapi_simatk_call_control_cnf_data_t sm_result;
+                                       int i;
+
+                                       memcpy(&sm_result, param2, sizeof(tapi_simatk_call_control_cnf_data_t));
+                                       printf(" [SAT] TAPI_EVENT_SAT_MO_SMS_CONTROL_IND: \n");
+                                       curr_cmd = eventType;
+
+                                       printf(" [SAT] :  call type=0x%x, MO SM control result: 0x%x\n",sm_result.call_type, sm_result.call_control_result);
+
+                                       printf(" [SAT] : alpha_present=%d, alpha_len=%d, alpha_text=%s\n",sm_result.alpha_identifier.is_present, sm_result.alpha_identifier.string_len, sm_result.alpha_identifier.string);
+
+                                       if(sm_result.u.sms_data.rp_dest_address.dialling_number_length > 0)
+                                       {
+                                               printf(" [SAT] : TON = 0x%x, NPI = 0x%x\n",sm_result.u.sms_data.rp_dest_address.ton, sm_result.u.sms_data.rp_dest_address.npi);
+
+                                               printf(" [SAT] :RPD ADDRESS: len=%d, value =", sm_result.u.sms_data.rp_dest_address.dialling_number_length);
+                                               for(i=0; i<sm_result.u.sms_data.rp_dest_address.dialling_number_length;i++)
+                                                       printf("\t0x%02x",sm_result.u.sms_data.rp_dest_address.dialling_number[i]);
+                                       }
+                                       else
+                                               printf("RP Dest Address Not Present");
+                                       printf(" \n");
+
+                                       if(sm_result.u.sms_data.tp_dest_address.dialling_number_length > 0)
+                                       {
+                                               printf(" [SAT] : TON = 0x%x, NPI = 0x%x\n",sm_result.u.sms_data.tp_dest_address.ton, sm_result.u.sms_data.tp_dest_address.npi);
+
+                                               printf(" [SAT] :TPD ADDRESS: len=%d, value =", sm_result.u.sms_data.tp_dest_address.dialling_number_length);
+                                               for(i=0; i<sm_result.u.sms_data.tp_dest_address.dialling_number_length;i++)
+                                                       printf("\t0x%02x",sm_result.u.sms_data.tp_dest_address.dialling_number[i]);
+                                       }
+                                       else
+                                               printf("TP Dest Address Not Present");
+                                       printf(" \n");
+                               }
+                                       break;
+
+                               default:
+                                       break;
+                               }
+
+
+                       break;
+               default:
+                       printf(" NOT a simatk event\n");
+                       break;
+
+       }
+printf("\n [SAT] end of app_callback(sat_test/main.c) \n");
+
+       return TRUE;
+
+}
+
+
+
+
+/*****************************************************************/
+
+void sat_select_loop(void)
+{
+    int ret;
+    fd_set readfds;
+//     fprintf(stderr,"sat Select Loop!\n");
+
+    while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+                ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+                {
+                    if (FD_ISSET(0, &readfds))
+                        {
+                             if(sat_read_key_input()<0)
+                                       break;
+                       }
+               }
+        }
+}
+
+void tapi_sat_thread()
+{
+    fprintf(stderr,"start tapi_sat_thread\n");
+       sat_select_loop();
+       fprintf (stderr, " sat exited\n");
+       pthread_exit(NULL);
+}
+
+bool on_simatk_event_received (EvtSysEventSourceId_t src_id, const char* noti_id, GArray* parameters, void* local_data)
+{
+       EvtSysEventProperty_t* e;
+       int len;
+       int reqid;
+       int status;
+       int group, type;
+
+       /*      Number of params must be 5      */
+       assert(parameters->len == 5);
+
+       /*      First param is  tapi event group   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 0);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       group = e->value.i;
+       printf("received group is :%d\n", group);
+
+       /*      First param is  tapi event type   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 1);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       type = e->value.i;
+       printf("received event type is :%d\n", type);
+
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 2);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       reqid = e->value.i;
+       printf("received Request ID is :%d\n", reqid);
+
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 3);
+       assert(e->type ==  DBUS_TYPE_INT32);
+       status = e->value.i;
+       printf("received STATUS is :%d\n", status);
+
+       /*      over allocate this after receiving the len  */
+       unsigned char *data;
+       unsigned char *result;
+       size_t  out_len;
+
+       /*      Get the tapi event data  here   */
+       e = &g_array_index (parameters, EvtSysEventProperty_t, 4);
+       assert(e->type == DBUS_TYPE_STRING);
+
+       data = e->value.i;
+
+       len = strlen(data);
+
+       printf("Decoding..\n");
+
+       result = TAPI_BASE64_DECODE(data, len, &out_len);
+
+       app_callback(group, type, len, result);
+       /*      clean the buffer        */
+//     memset(result2, NULL,  (sdata->len*2));
+
+       /* We've done with this notificaiton */
+       return true;
+
+}
+
+
+int sat_test_subscribe_tapi_events(void)
+{
+
+       //GMainLoop *mainloop;
+       data_t sdata;
+       noti_subscription_id_t subscription_id;
+       int count = 0;
+
+       /*
+       fprintf(stderr, " GMAIN LOOP\n");
+
+       if (! noti_init(&error_code))
+       {
+               fprintf(stderr, "Error x_noti_init():%#X \n", error_code);
+               return -1;
+       }
+       printf("receive_tapi_event: noti init success\n");
+
+       */
+       for(count =0;count<sizeof(ptrEvnts)/sizeof(*ptrEvnts);count++)
+       {
+               error_code = EvtSysEventSubscribe (
+                                                                                       EvtDeliveryHandle,
+                                                                                       ptrEvnts[count],                                /* notification ID */
+                                                                                       NULL,                                           /*      filter expression       */
+                                                                                       on_simatk_event_received,               /* notification handler */
+                                                                                       (void *)&sdata,                         /* local data */
+                                                                                       &subscription_id                        /* subscription ID */
+                                                                               );
+               if (error_code )
+               {
+                       fprintf(stderr, "Error x_noti_set_cb():%#X \n", error_code);
+               }
+               else
+                       fprintf(stderr, "SIMATK-not subscribe ok for [%d]\n", count);
+
+#if 0
+
+               if (! noti_subscribe (
+                               ptrEvnts[count],                                /* notification ID */
+                               NULL,                                           /*      filter expression       */
+                               on_simatk_event_received,               /* notification handler */
+                               (void *)&sdata,                         /* local data */
+                               &subscription_id,                               /* subscription ID */
+                               &error_code))
+               {
+                       fprintf(stderr, "Error x_noti_set_cb():%#X \n", error_code);
+               }
+               else
+                       fprintf(stderr, "SIMATK-not subscribe ok for [%d]\n", count);
+
+#endif
+       }
+
+/*
+       printf("receive_tapi_event: noti subscribe is success\n");
+
+       mainloop = g_main_loop_new (NULL, FALSE);
+
+       g_main_loop_run (mainloop);
+
+       printf("receive_tapi_event: finish\n");
+*/
+       return 0;
+
+
+}
+
+
+int sat_main(int argc, char *argv[])
+{
+       int ret=0;
+       pthread_t sat_thread_id;
+
+       printf("\n\n\n ===== SAT TEST main* =====\n");
+
+       //ret=get_handle();
+       //fprintf(stderr,"out of get handle\n");
+
+       ret = pthread_create(&sat_thread_id, NULL, &tapi_sat_thread, NULL);
+
+       if(ret != 0)
+       {
+               fprintf(stderr, "Thread for TAPI Events Failed\n");
+       }
+
+       sat_test_subscribe_tapi_events();
+
+       pthread_join(sat_thread_id, NULL);
+
+}
+
diff --git a/src/test_apps/tapi_sim_test.c b/src/test_apps/tapi_sim_test.c
new file mode 100644 (file)
index 0000000..d9cbe79
--- /dev/null
@@ -0,0 +1,3814 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+
+/* standard header files*/
+#include <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <linux/stat.h>
+#include <assert.h>
+
+/*Dbus header files*/
+#include <glib.h>
+
+#include "ITapiSim.h"
+#include "TelErr.h"
+#include "TapiCommon.h"
+#include "TelUtility.h"
+#include "TapiEvent.h"
+
+#define SIM_APPLICATION_ID  10
+#define _TAPI_DEBUG_ON_SCREEN_
+#define TEST_DEBUG(frmt, args...) \
+{do { fprintf(stderr, "[SIM Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+#ifndef false
+#define false 0
+#endif
+#ifndef true
+#define true  !0
+#endif
+#ifndef bool
+#define bool  char
+#endif
+
+//extern int EvtDeliveryHandle ;
+int request_id;
+int iNumOfSIMEvt = 0;
+int error_code;
+static unsigned int* SIM_subscription_id;
+
+void sim_async_event_callback(TelTapiEvent_t* sim_event);
+
+// same as tapievent
+typedef struct {
+       int group;
+       int type;
+       int ID;
+       int status;
+       void *dst;
+} data_t;
+
+int strlen2(register const char * s) {
+       int count = 0;
+       while (*s++)
+               count++;
+       return count;
+}
+
+int _fgets(register char * digit, int n) {
+
+       if (!fgets(digit, n, stdin)) {
+               return -1;
+       }
+       if (*(digit + (n = strlen2(digit) - 1)) ^ '\n') {
+               n = 0;
+               while (getchar() ^ '\n')
+                       n--;
+               if (n)
+                       return 1;
+
+               return 0;
+       } else
+               *(digit + n) = 0;
+       return 0;
+}
+
+TelSimPbFileType_t __InputStorageType() {
+       TelSimPbFileType_t storage_type = 0;
+
+       int iStorageType = 0;
+       char dummy = 0;
+
+       TEST_DEBUG(" storage types are below : ");
+       TEST_DEBUG(" 2 - Emergency numbers ");
+       TEST_DEBUG(" 3 - Fixed dialing numbers ");
+       TEST_DEBUG(" 4-  Last dialled numbers ");
+       TEST_DEBUG(" 8 - Own numbers ");
+       TEST_DEBUG(" 10 - 2G SIM numbers ");
+       TEST_DEBUG(" 11 - Service dialing numbers ");
+       TEST_DEBUG(" 12 - 3G SIM numbers ");
+       TEST_DEBUG(" 15 - Additional string numbers ");
+       TEST_DEBUG(" 16 - Grouping text string ");
+
+       TEST_DEBUG("Please input storage type: ");
+       scanf("%d%c", &iStorageType, &dummy);
+
+       switch (iStorageType) {
+       case 2: {
+               storage_type = TAPI_SIM_PB_EN;
+       }
+               break;
+
+       case 3: {
+               storage_type = TAPI_SIM_PB_FDN;
+       }
+               break;
+
+       case 4: {
+               storage_type = TAPI_SIM_PB_LDN;
+       }
+               break;
+
+       case 8: {
+               storage_type = TAPI_SIM_PB_MSISDN;
+       }
+               break;
+
+       case 10: {
+               storage_type = TAPI_SIM_PB_ADN;
+       }
+               break;
+
+       case 11: {
+               storage_type = TAPI_SIM_PB_SDN;
+       }
+               break;
+
+       case 12: {
+               storage_type = TAPI_SIM_PB_3GSIM;
+       }
+               break;
+
+       case 15: {
+               storage_type = TAPI_SIM_PB_AAS;
+       }
+               break;
+
+       case 16: {
+               storage_type = TAPI_SIM_PB_GAS;
+       }
+               break;
+
+       default: {
+               storage_type = TAPI_SIM_PB_UNKNOWNN;
+       }
+               break;
+       }
+       return storage_type;
+
+}
+
+void __PrintStorageType(TelSimPbFileType_t tSimPbFileType) {
+       switch (tSimPbFileType) {
+       case TAPI_SIM_PB_EN: {
+               TEST_DEBUG("TAPI_SIM_PB_EN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_FDN: {
+               TEST_DEBUG("TAPI_SIM_PB_FDN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_LDN: {
+               TEST_DEBUG("TAPI_SIM_PB_LDN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_MSISDN: {
+               TEST_DEBUG("TAPI_SIM_PB_MSISDN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_ADN: {
+               TEST_DEBUG("TAPI_SIM_PB_ADN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_SDN: {
+               TEST_DEBUG("TAPI_SIM_PB_SDN [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_3GSIM: {
+               TEST_DEBUG("TAPI_SIM_PB_3GSIM [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_AAS: {
+               TEST_DEBUG("TAPI_SIM_PB_AAS [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       case TAPI_SIM_PB_GAS: {
+               TEST_DEBUG("TAPI_SIM_PB_GAS [0x%x]", tSimPbFileType);
+       }
+               break;
+
+       default: {
+               TEST_DEBUG("Undefined Storage Type returnted [0x%x]", tSimPbFileType);
+       }
+               break;
+       }
+}
+
+void __PrintPbFiledType(TelSimPb3GFileType_t tSimPb3GFileType) {
+       switch (tSimPb3GFileType) {
+       case TAPI_PB_3G_NAME: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_NAME [0x%x]", tSimPb3GFileType);
+               break;
+       }
+
+       case TAPI_PB_3G_NUMBER: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_NUMBER [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_ANR: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_ANR [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_EMAIL: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_EMAIL [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_SNE: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_SNE [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_GRP: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_GRP [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_PBC: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_PBC [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_ANRA: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_ANRA [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       case TAPI_PB_3G_ANRB: {
+               TEST_DEBUG("PB Type: TAPI_PB_3G_ANRB [0x%x]", tSimPb3GFileType);
+               break;
+       }
+       default: {
+               TEST_DEBUG("PB Type: Undefined PB 3G File Type [0x%x]", tSimPb3GFileType);
+       }
+       }
+}
+
+#if 0
+void __PrintLockType(TelSimLockType_t tSimLockType)
+{
+       switch(tSimLockType)
+       {
+               case TAPI_SIM_LOCK_READY:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_READY [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PS:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PS (Phone-Sim Lock) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PF:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PF (Phone first SIM) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_SC:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_SC (PIN, PIN2, PUK, PUK2 Lock)  [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_FD:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_FD (FDN) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PN:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PN (Network Personalization) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PU:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PU (Network Subset Personalization) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PP:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PP (Service Provider Personalization) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_PC:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_PC (Corporate Personalization) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_SC2:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_SC2 (PIN2 Lock) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_SCPUK2:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_SCPUK2 (PIN2 Unblocking Key) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_LOCK_ACL:
+               TEST_DEBUG("Lock Type: TAPI_SIM_LOCK_ACL (ACL Lock) [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_NO_SIM:
+               TEST_DEBUG("Lock Type: TAPI_SIM_NO_SIM [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_UNAVAIL:
+               TEST_DEBUG("Lock Type: TAPI_SIM_UNAVAIL [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_INIT_COMPLETE:
+               TEST_DEBUG("Lock Type: TAPI_SIM_INIT_COMPLETE [0x%x]", tSimLockType);
+               break;
+               case TAPI_SIM_PB_INIT_COMPLETE:
+               TEST_DEBUG("Lock Type: TAPI_SIM_PB_INIT_COMPLETE [0x%x]", tSimLockType);
+               break;
+               default:
+               TEST_DEBUG("Lock Type: Undefined Lcok Type [0x%x]", tSimLockType);
+       }
+}
+
+void __PrintLockKey(TelSimLockKey_t tSimLockKey)
+{
+       switch(tSimLockKey)
+       {
+               case TAPI_SIM_LOCK_KEY_NOT_NEED:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_NOT_NEED [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_KEY_PIN:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_PIN [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_KEY_PUK:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_PUK [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_KEY_PIN2:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_PIN2 [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_KEY_PUK2:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_PUK2 [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_PERM_BLOCKED:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_PERM_BLOCKED [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_DISABLE:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_DISABLE [0x%x]", tSimLockKey);
+               break;
+               case TAPI_SIM_LOCK_KEY_SIMLOCK:
+               TEST_DEBUG(" Lock Key:  TAPI_SIM_LOCK_KEY_SIMLOCK [0x%x]", tSimLockKey);
+               break;
+               default:
+               TEST_DEBUG(" Lock Key:  Undefined Lock key [0x%x]", tSimLockKey);
+       }
+}
+#endif
+
+void __PrintCardStatus(char* str, TelSimCardStatus_t tSimCardStatus) {
+       switch (tSimCardStatus) {
+       case TAPI_SIM_STATUS_CARD_ERROR:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_CARD_ERROR [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_CARD_NOT_PRESENT:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_CARD_NOT_PRESENT [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_INITIALIZING:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_INITIALIZING [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_INIT_COMPLETED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_INIT_COMPLETED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_PIN_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_PIN_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_PUK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_PUK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_CARD_BLOCKED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_CARD_BLOCKED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_NCK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_NCK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_NSCK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_NSCK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_SPCK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_SPCK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_CCK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_CCK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_CARD_REMOVED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_CARD_REMOVED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       case TAPI_SIM_STATUS_SIM_LOCK_REQUIRED:
+               TEST_DEBUG("[%s]TAPI_SIM_STATUS_SIM_LOCK_REQUIRED [0x%x]", str, tSimCardStatus)
+               ;
+               break;
+       default:
+               TEST_DEBUG("[%s]Undefined Card Status [0x%x]", str, tSimCardStatus)
+               ;
+       }
+}
+
+void __PrintPinStatus(char* str, TelSimPinStatus_t tSimPinStatus) {
+       switch (tSimPinStatus) {
+       case TAPI_SIM_PIN_STATUS_DISABLED:
+               TEST_DEBUG("%sTAPI_SIM_PIN_STATUS_DISABLED [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+       case TAPI_SIM_PIN_STATUS_ENABLED:
+               TEST_DEBUG("%sTAPI_SIM_PIN_STATUS_ENABLED [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+       case TAPI_SIM_PIN_STATUS_BLOCKED:
+               TEST_DEBUG("%sTAPI_SIM_PIN_STATUS_BLOCKED [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED:
+               TEST_DEBUG("%sTAPI_SIM_PIN_STATUS_PUK_BLOCKED [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+       case TAPI_SIM_PIN_STATUS_UNKNOWN:
+               TEST_DEBUG("%sTAPI_SIM_PIN_STATUS_UNKNOWN [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+       default:
+               TEST_DEBUG("%sUndefined Pin Status [0x%x]", str, tSimPinStatus)
+               ;
+               break;
+
+       }
+}
+
+void __PrintCardType(char* str, TelSimCardType_t tSimCardType) {
+       switch (tSimCardType) {
+       case TAPI_SIM_CARD_TYPE_UNKNOWN:
+               TEST_DEBUG("%sTAPI_SIM_CARD_TYPE_UNKNOWN [0x%x]", str, tSimCardType)
+               ;
+               break;
+       case TAPI_SIM_CARD_TYPE_GSM:
+               TEST_DEBUG("%sTAPI_SIM_CARD_TYPE_GSM [0x%x]", str, tSimCardType)
+               ;
+               break;
+       case TAPI_SIM_CARD_TYPE_USIM:
+               TEST_DEBUG("%sTAPI_SIM_CARD_TYPE_USIM [0x%x]", str, tSimCardType)
+               ;
+               break;
+       default:
+               TEST_DEBUG("%sUndefined Card Type [0x%x]", str, tSimCardType)
+               ;
+       }
+}
+
+void __PrintECCSvcInfo(TelSimEccEmergencyServiceInfo_t tSimECCSvcInfo) {
+       switch (tSimECCSvcInfo) {
+       case TAPI_SIM_ECC_ESC_POLICE:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_POLICE [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       case TAPI_SIM_ECC_ESC_AMBULANCE:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_AMBULANCE [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       case TAPI_SIM_ECC_ESC_FIREBRIGADE:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_FIREBRIGADE [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       case TAPI_SIM_ECC_ESC_MARAINEGUARD:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_MARAINEGUARD [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       case TAPI_SIM_ECC_ESC_MOUTAINRESCUE:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_MOUTAINRESCUE [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       case TAPI_SIM_ECC_ESC_SPARE:
+               TEST_DEBUG("TAPI_SIM_ECC_ESC_SPARE [0x%x]", tSimECCSvcInfo)
+               ;
+               break;
+       default:
+               TEST_DEBUG("Undefined ECC Sercie Info [0x%x]", tSimECCSvcInfo)
+               ;
+       }
+}
+
+void __PrintUSTData(unsigned long UstLen, unsigned short UstData[]) {
+       int i = 0;
+       fprintf(stderr, "UST Data: ");
+       for (i = 0; i < UstLen; i++) {
+               fprintf(stderr, "0x%x ", UstData[i]);
+       }
+       fprintf(stderr, "\n");
+}
+
+#if 0
+void __PrintUSimSvcTable(TelUSimServiceTable_t tUSimSVCTable)
+{
+       TEST_DEBUG("-------- UST Table -------- (1: On, 0:Off)");
+       TEST_DEBUG("Local Phonebook [%d] ", tUSimSVCTable.bLocalPhoneBook);
+       TEST_DEBUG("FDN [%d] ", tUSimSVCTable.bFdn);
+       TEST_DEBUG("EXT2 [%d] ", tUSimSVCTable.bExtension2);
+       TEST_DEBUG("SDN [%d] ", tUSimSVCTable.bSdn);
+       TEST_DEBUG("EXT3 [%d] ", tUSimSVCTable.bExtension3);
+       TEST_DEBUG("BDN [%d] ", tUSimSVCTable.bBdn);
+       TEST_DEBUG("EXT4 [%d] ", tUSimSVCTable.bExtension4);
+       TEST_DEBUG("OUT Going Call Info. [%d] ", tUSimSVCTable.bOCIOCT);
+       TEST_DEBUG("Call control [%d] ", tUSimSVCTable.bUsimCallControl);
+       TEST_DEBUG("Added more Table as you need");
+       TEST_DEBUG("---------------------------");
+}
+
+void __PrintSimSvcTable(TelSimServiceTable_t tSimSVCTable)
+{
+       TEST_DEBUG("-------- UST Table --------");
+       TEST_DEBUG("FDN [%d] ", tSimSVCTable.bFdn);
+       TEST_DEBUG("EXT2 [%d] ", tSimSVCTable.bExtension2);
+       TEST_DEBUG("SDN [%d] ", tSimSVCTable.bSdn);
+       TEST_DEBUG("EXT3 [%d] ", tSimSVCTable.bExtension3);
+       TEST_DEBUG("BDN [%d] ", tSimSVCTable.bBdn);
+       TEST_DEBUG("EXT4 [%d] ", tSimSVCTable.bExtension4);
+       TEST_DEBUG("PIN1 Disable func. [%d] ", tSimSVCTable.bPIN1DisableFunction );
+       TEST_DEBUG("Adn [%d] ", tSimSVCTable.bAdn);
+       TEST_DEBUG("Added more Table as you need");
+       TEST_DEBUG("---------------------------");
+}
+#endif
+
+void __PrintSSTData(unsigned long SstLen, unsigned short SstData[]) {
+       int i = 0;
+       TEST_DEBUG("SST Data: ");
+       for (i = 0; i < SstLen; i++) {
+               fprintf(stderr, "0x%x ", SstData[i]);
+       }
+}
+
+void __PrintLangInfo(char *str, TelSimLanguagePreferenceCode_t tSimLP) {
+       switch (tSimLP) {
+       case TAPI_SIM_LP_GERMAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_GERMAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_ENGLISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_ENGLISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_ITALIAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_ITALIAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_FRENCH:
+               TEST_DEBUG("%s TAPI_SIM_LP_FRENCH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_SPANISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_SPANISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_DUTCH:
+               TEST_DEBUG("%s TAPI_SIM_LP_DUTCH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_SWEDISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_SWEDISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_DANISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_DANISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_PORTUGUESE:
+               TEST_DEBUG("%s TAPI_SIM_LP_PORTUGUESE", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_FINNISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_FINNISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_NORWEGIAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_NORWEGIAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_GREEK:
+               TEST_DEBUG("%s TAPI_SIM_LP_GREEK", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_TURKISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_TURKISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_HUNGARIAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_HUNGARIAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_POLISH:
+               TEST_DEBUG("%s TAPI_SIM_LP_POLISH", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_KOREAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_KOREAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_CHINESE:
+               TEST_DEBUG("%s TAPI_SIM_LP_CHINESE", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_RUSSIAN:
+               TEST_DEBUG("%s TAPI_SIM_LP_RUSSIAN", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_JAPANESE:
+               TEST_DEBUG("%s TAPI_SIM_LP_JAPANESE", str)
+               ;
+               break;
+
+       case TAPI_SIM_LP_LANG_UNSPECIFIED:
+       default:
+               TEST_DEBUG("%s Undefined Language Preference Code", str)
+               ;
+               break;
+       }
+}
+
+void __PrintPBResult(char *str, TelSimPbAccessResult_t tPBResult) {
+       switch (tPBResult) {
+       case TAPI_SIM_PB_SUCCESS:
+               TEST_DEBUG("%s TAPI_SIM_PB_SUCCESS", str)
+               ;
+               break;
+
+       case TAPI_SIM_PB_FAIL:
+               TEST_DEBUG("%s TAPI_SIM_PB_FAIL", str)
+               ;
+               break;
+
+       case TAPI_SIM_PB_INVALID_INDEX:
+               TEST_DEBUG("%s TAPI_SIM_PB_INVALID_INDEX", str)
+               ;
+               break;
+
+       case TAPI_SIM_PB_INVALID_NUMBER_LENGTH:
+               TEST_DEBUG("%s TAPI_SIM_PB_INVALID_NUMBER_LENGTH", str)
+               ;
+               break;
+
+       case TAPI_SIM_PB_INVALID_NAME_LENGTH:
+               TEST_DEBUG("%s TAPI_SIM_PB_INVALID_NAME_LENGTH", str)
+               ;
+               break;
+
+       case TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED:
+               TEST_DEBUG("%s TAPI_SIM_PB_ACCESS_CONDITION_NOT_SATISFIED", str)
+               ;
+               break;
+
+       default:
+               TEST_DEBUG("%s Undefined PB Access Result", str)
+               ;
+               break;
+       }
+}
+
+void __PrintPBStorageList(char *str, TS_UINT16 StorageList) {
+       if (StorageList & (0x01 << TAPI_SIM_PB_FDN)) {
+               TEST_DEBUG("%s PB_FDN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_LDN)) {
+               TEST_DEBUG("%s PB_LDN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_MSISDN)) {
+               TEST_DEBUG("%s PB_MSISDN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_ADN)) {
+               TEST_DEBUG("%s PB_ADN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_SDN)) {
+               TEST_DEBUG("%s PB_SDN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_EN)) {
+               TEST_DEBUG("%s PB_EN is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_3GSIM)) {
+               TEST_DEBUG("%s PB_3GSIM is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_AAS)) {
+               TEST_DEBUG("%s PB_AAS is in the StorageList", str);
+       }
+
+       if (StorageList & (0x01 << TAPI_SIM_PB_GAS)) {
+               TEST_DEBUG("%s PB_GAS is in the StorageList", str);
+       }
+}
+
+#if 0
+TelSimReadFileRequestData_t __SelectBinary()
+{
+       int iSelect = 0;
+       TelSimReadFileRequestData_t ReadFileReqData = { {0,}};
+
+       ReadFileReqData.Offset = 0; /**< offset if read binary */
+
+       ReadFileReqData.FileType = TAPI_SIM_FTYPE_TRANSPARENT;
+       // if record
+       ReadFileReqData.RecordIndex =0; /**< record index if read record */
+       ReadFileReqData.RecordIndexFrom=0;
+       ReadFileReqData.RecordIndexTo=0;
+       ReadFileReqData.RecordMode=TAPI_SIM_RECORD_NONE; /**< record index if read record */
+
+       TEST_DEBUG("---- EF File List ----");
+       TEST_DEBUG("1: ICCID");
+       TEST_DEBUG("2: SPN");
+       TEST_DEBUG("----------------------");
+       TEST_DEBUG("Select EF File: ");
+
+       scanf("%d", &iSelect);
+       if(iSelect == 1)
+       {
+               ReadFileReqData.FileID.FileName = TAPI_SIM_EFILE_ICCID;
+               ReadFileReqData.DataLength = 0x0A; /* hard code 10 bytes */;
+       }
+       else if(iSelect == 2)
+       {
+               ReadFileReqData.FileID.FileName = TAPI_SIM_EFILE_SPN;
+               ReadFileReqData.DataLength = 17;
+       }
+       else if(iSelect == 2)
+       {
+               ReadFileReqData.FileID.FileName = TAPI_SIM_EFILE_LP;
+       }
+       else
+       {
+               TEST_DEBUG("Invalid Selection!");
+       }
+
+       return ReadFileReqData;
+
+}
+#endif
+
+/**
+ * This function  is used for encoding a ASCII text into UNICODE text
+ *
+ * @return             This function returns a TRUE on Success and FALSE on failure
+ * @param[in]          text_len -input text lenght
+ * @param[in]          text_data - input text data
+ * @param[in]  unicode_text_len - unicode converted tex lenght
+ * @param[in]  unicode_text - unicode text
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+TS_BOOL __encode_text_unicode(char text_len, char *text_data,
+               char *unicode_text_len, char *unicode_text) {
+       int j, i;
+       i = j = 0;
+
+       if (text_len == 0) {
+               TEST_DEBUG("Unicode encoding failed - input text string length is 0!");
+               return FALSE;
+       }
+       /*UNicode conversion*/
+       /* a  = Ascii is 61 and in Unicode it is 0061 but modem expects 6100 */
+       for (j = 0, i = 0; i < text_len * 2; i++) {
+               unicode_text[i++] = text_data[j++];
+               unicode_text[i] = 0x00;
+       }
+       *unicode_text_len = text_len * 2;
+       return TRUE;
+
+}
+
+/**
+ * This function  is used for encoding a ASCII text into GSM7 bit text
+ *
+ * @return             This function returns a TRUE on Success and FALSE on failure
+ * @param[in]          text_len - input text lenght
+ * @param[in]          text_data - input text data
+ * @param[in]  out_len_max - gsm7bit converted text lenght
+ * @param[in]  gsm7bit_text - gsm7bit converted tex data
+ * @return             This function returns a TRUE on Success and FALSE on failure
+ */
+TS_BOOL __encode_gsm_7_bit_chars(char text_len, const char* text_data,
+               char *out_len_max, char* gsm7bit_text) {
+       int i;
+       int pos;
+       TS_UINT16 shift = 0;
+
+       for (pos = 0, i = 0; i < text_len; pos++, i++) {
+               /* pack the low bits - for single char */
+               gsm7bit_text[pos] = text_data[i] >> shift;
+
+               if (i + 1 < text_len) {
+                       /* pack the high bits using the low bits of the next character */
+                       gsm7bit_text[pos] |= text_data[i + 1] << (7 - shift);
+
+                       shift++;
+
+                       if (shift == 7) {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+       *out_len_max = (text_len * 7) / 8;
+
+       /* done */
+       return pos;
+
+}
+
+/**
+ * This function converts unicode to ascii text
+ *
+ * @return             This function returns a 1 on Success and -1 on failure
+ * @param[in]          phone_pb_type
+ * @Interface          Asynchronous.
+ * @remark
+ * @Refer
+ */
+TS_BOOL __decode_unicode_to_asci_str(char text_len, char *text_data,
+               char *ascii_text_len, char *ascii_text) {
+       int i, j;
+       i = j = 0;
+       if (text_len == 0 || text_data == NULL || ascii_text == NULL) {
+               TEST_DEBUG("Unicode Decode Failed as text length is 0");
+               return FALSE;
+       }
+
+       if (0 != (text_len % 2)) {
+               TEST_DEBUG(" ##### Unicode decoding failed due to invalid text length [%d]", text_len );
+               return FALSE;
+       }
+
+       for (i = 0; i < text_len; i++) {
+               ascii_text[i] = text_data[j];
+               j = j + 2;
+       }
+       *ascii_text_len = (text_len / 2);
+       ascii_text[i] = '\0';
+       return TRUE;
+}
+
+int sim_test_subscribe_tapi_events() {
+       int i = 0;
+       int ret_val = TRUE;
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       int SIMEvtList[] = { TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF,
+                       TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF,
+                       TAPI_EVENT_SIM_PB_ACCESS_READ_CNF,
+
+                       TAPI_EVENT_SIM_PB_UPDATE_CNF, TAPI_EVENT_SIM_PB_DELETE_CNF,
+                       TAPI_EVENT_SIM_STATUS_IND, TAPI_EVENT_SIM_FDN_STATUS_IND,
+
+                       TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF,
+                       TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF,
+                       TAPI_EVENT_SIM_SAP_CONNECT_NOTI, TAPI_EVENT_SIM_SAP_CONNECT_CNF,
+                       TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF,
+                       TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF,
+                       TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF,
+                       TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF,
+                       TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF,
+                       TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF, TAPI_EVENT_SIM_APDU_CNF,
+                       TAPI_EVENT_SIM_ATR_CNF,
+
+                       TAPI_EVENT_SIM_GET_INDICATION_CNF,
+                       TAPI_EVENT_SIM_SET_INDICATION_CNF, TAPI_EVENT_SIM_GET_MAILBOX_CNF,
+                       TAPI_EVENT_SIM_SET_MAILBOX_CNF, TAPI_EVENT_SIM_SET_LANGUAGE_CNF,
+                       TAPI_EVENT_SIM_RSIM_ACCESS_CNF, TAPI_EVENT_SIM_VERIFY_SEC_CNF,
+                       TAPI_EVENT_SIM_VERIFY_PUK_CNF, TAPI_EVENT_SIM_CHANGE_PINS_CNF,
+                       TAPI_EVENT_SIM_DISABLE_SEC_CNF, TAPI_EVENT_SIM_ENABLE_SEC_CNF,
+                       TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF,
+                       TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF, TAPI_EVENT_SIM_PERS_STATUS_CNF,
+                       TAPI_EVENT_SIM_DISABLE_PERS_CNF, TAPI_EVENT_SIM_ENABLE_PERS_CNF };
+
+       iNumOfSIMEvt = sizeof(SIMEvtList) / sizeof(int);
+       TEST_DEBUG("Number of SIM Event List to be registered: %d", iNumOfSIMEvt);
+       //TAPI_CALLOC(SIM_subscription_id, iNumOfSIMEvt, unsigned int)
+       //#define TAPI_CALLOC(ptr, no_elements, type)   s
+       SIM_subscription_id = (unsigned int *) calloc(iNumOfSIMEvt,
+                       sizeof(unsigned int));
+       if (SIM_subscription_id == NULL) {
+               TEST_DEBUG("calloc error -NULL, errno is [%d]", errno);
+       }
+
+       for (i = 0; i < iNumOfSIMEvt; i++) {
+               api_err = tel_register_event(SIMEvtList[i], &SIM_subscription_id[i],
+                               (TelAppCallback) &sim_async_event_callback, NULL);
+
+               if (api_err != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("isn't subscribed. sub id is [%d], api_err is [%d]\n", SIM_subscription_id[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+
+}
+
+int sim_test_unsubscribe_tapi_events(void) {
+       int i = 0;
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+       int ret_val = TRUE;
+
+       for (i = 0; i < iNumOfSIMEvt; i++) {
+               api_err = tel_deregister_event(SIM_subscription_id[i]);
+               if (api_err != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TelTapiDeRegister isn't unsubscribed. sub id is [%d] api_err is [%d]\n",SIM_subscription_id[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+
+       }
+
+       return ret_val;
+}
+
+void sim_async_event_callback(TelTapiEvent_t* sim_event)
+{
+       //int i;
+       //static unsigned int fileSize = 0;
+
+       TEST_DEBUG("Func Entrance");
+       TEST_DEBUG("Request ID : [0x%x]\n", sim_event->RequestId);
+
+       if (sim_event->pData == NULL) {
+               TEST_DEBUG("No Event Data!!");
+               //              return;
+       }
+
+       TEST_DEBUG("*************** Callback data **********************");
+       TEST_DEBUG("EventClass [%d],EventType [0x%x], Reques Id[%d], Event status [%d], sim_event->pDataLen[%d]",
+                       sim_event->EventClass, sim_event->EventType, sim_event->RequestId, sim_event->Status,sim_event->pDataLen);
+#if 0
+       if(sim_event->Status != TAPI_SIM_PB_SUCCESS)
+       {
+               __PrintPBResult("SIM Result", sim_event->Status);
+               TEST_DEBUG("TAPI Fail: EventStatus [%d]", sim_event->Status);
+               return;
+       }
+#endif
+
+       if (sim_event->EventClass == TAPI_EVENT_CLASS_SIM) {
+               switch (sim_event->EventType) {
+               case TAPI_EVENT_SIM_STATUS_IND: {
+                       TEST_DEBUG("***********TAPI_EVENT_SIM_STATUS_IND**************");
+
+                       //      TEST_DEBUG("Event status [%d]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_STATUS_CARD_ERROR) {
+                               TEST_DEBUG("SIM CARD ERROR");
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_CARD_NOT_PRESENT) {
+                               TEST_DEBUG("SIM CARD NOT INSERTED");
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_SIM_INITIALIZING) {
+                               TelSimCardType_t CardType =
+                                               *((TelSimCardType_t*) (sim_event->pData));
+
+                               TEST_DEBUG("SIM INITITIALIZING");
+                               __PrintCardType("CardType: ", CardType);
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_SIM_INIT_COMPLETED) {
+                               TEST_DEBUG("SIM INIT COMPLETED");
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_SIM_PIN_REQUIRED) {
+                               TEST_DEBUG("SIM PIN REQUIRED");
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_SIM_PUK_REQUIRED) {
+                               TEST_DEBUG("SIM PUK REQUIRED");
+                       } else if (sim_event->Status == TAPI_SIM_STATUS_CARD_BLOCKED) {
+                               TEST_DEBUG("SIM CARD BLOCKED");
+                       }
+                       TEST_DEBUG("********************************************");
+
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF: {
+                       TEST_DEBUG("*****************TAPI_EVENT_SIM_PB_CAPABILITY_INFO_CNF***************************");
+
+                       //TEST_DEBUG("SIM PB Capability Info event status = [0x%x]", sim_event->Status);
+
+                       TelSimPbCapabilityInfo_t *sim_capability_info =
+                                       (TelSimPbCapabilityInfo_t*) sim_event->pData;
+
+                       int i;
+                       for (i = 0; i < sim_capability_info->FileTypeCount; i++) {
+                               __PrintPbFiledType(
+                                               sim_capability_info->FileTypeInfo[i].FileType3G);
+                               // TEST_DEBUG(" Filed tag type [%d]", sim_capability_info->FileTypeInfo[i].FileType3G);
+                               TEST_DEBUG(" max index [%d]", sim_capability_info->FileTypeInfo[i].PbIndexMax);
+                               TEST_DEBUG(" max entry [%d]", sim_capability_info->FileTypeInfo[i].PbTextMax);
+                               TEST_DEBUG(" used count [%d]", sim_capability_info->FileTypeInfo[i].TotalRecordCount);
+                       }
+
+                       TEST_DEBUG("****************************************************");
+
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF: {
+                       TEST_DEBUG("*****TAPI_EVENT_SIM_PB_STORAGE_COUNT_CNF*****");
+
+                       TelSimPbStorageInfo_t *storageInfo =
+                                       (TelSimPbStorageInfo_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM PB storage count event status = [0x%x]", sim_event->Status);
+
+
+                       __PrintStorageType(storageInfo->StorageFileType);
+                       //TEST_DEBUG("PB_STORAGE_TYPE 0x%x", storageInfo->StorageFileType);
+                       TEST_DEBUG("TOTAL_COUNT = %d", storageInfo->TotalRecordCount);
+                       TEST_DEBUG("USED_COUNT =  %d", storageInfo->UsedRecordCount);
+
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF: {
+                       TEST_DEBUG("**********TAPI_EVENT_SIM_PB_ENTRY_INFO_CNF********");
+
+                       TelSimPbEntryInfo_t *entryInfo =
+                                       (TelSimPbEntryInfo_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM PB entry info event status = [0x%x]", sim_event->Status);
+
+                       //TEST_DEBUG("STORAGE TYPE [%d]", entryInfo->StorageFileType);
+                       __PrintStorageType(entryInfo->StorageFileType);
+                       TEST_DEBUG("PB_INDEX_MIN %d", entryInfo->PbIndexMin);
+                       TEST_DEBUG("PB_INDEX_MAX = %d", entryInfo->PbIndexMax);
+                       TEST_DEBUG("PB_NUM_LEN_MAX =  %d", entryInfo->PbNumLenMax);
+                       TEST_DEBUG("PB_TEXT_LEN_MAX =  %d", entryInfo->PbTextLenMax);
+
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_ACCESS_READ_CNF: {
+                       TEST_DEBUG("*********TAPI_EVENT_SIM_PB_ACCESS_READ_CNF*********");
+
+                       //TEST_DEBUG("SIM PB access read event status = [0x%x]", sim_event->Status);
+
+                       TelSimPbRecordData_t *sim_acces_info =
+                                       (TelSimPbRecordData_t*) sim_event->pData;
+
+                       __PrintStorageType(sim_acces_info->StorageFileType);
+                       //TEST_DEBUG("storaget type is [0x%x]",sim_acces_info->StorageFileType);
+
+                       if (sim_event->Status != TAPI_SIM_PB_SUCCESS) {
+                               TEST_DEBUG(" SIM phone book access error [%d]", sim_event->Status);
+                               break;
+                       }
+
+                       int ascii_text_len = 0;
+                       char ascii_text[256] = { 0, };
+
+                       if (sim_acces_info->StorageFileType == TAPI_SIM_PB_EN
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_FDN
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_LDN
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_MSISDN
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_ADN
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_SDN) {
+                               TEST_DEBUG(" 2G Type SIM phone book access");
+                               TEST_DEBUG(" sim_acces_info->StorageFileType[%d](0-fdn,1-ldn,2-msisdn,3-adn,4-sdn,5-en), number[%s]",sim_acces_info->StorageFileType, (char *)sim_acces_info->ContactInfo.Pb2GData.Number);
+
+                               /* unicode decoding */
+                               if (sim_acces_info->ContactInfo.Pb2GData.NameEncryptType
+                                               == TAPI_SIM_TEXT_ENC_UCS2) {
+                                       TEST_DEBUG("Decoding UCS2 to ASCII");
+                                       if (FALSE
+                                                       == __decode_unicode_to_asci_str(
+                                                                       sim_acces_info->ContactInfo.Pb2GData.NameLen,
+                                                                       (char *) &sim_acces_info->ContactInfo.Pb2GData.Name,
+                                                                       (char *) &ascii_text_len, ascii_text)) {
+                                               TEST_DEBUG(" Deocing to ascii failed ");
+                                               break;
+                                       }
+                               } else if (sim_acces_info->ContactInfo.Pb2GData.NameEncryptType
+                                               == TAPI_SIM_TEXT_ENC_ASCII
+                                               || sim_acces_info->ContactInfo.Pb2GData.NameEncryptType
+                                                               == TAPI_SIM_TEXT_ENC_GSM7BIT) {
+                                       //TAPI_MEMCPY(ascii_text, sim_acces_info->ContactInfo.Pb2GData.Name, 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                       //#define TAPI_MEMCPY(dest , src , dest_len , src_len)
+                                       if (256 >= TAPI_SIM_NUM_TEXT_LEN_MAX) {
+                                               memcpy(ascii_text,
+                                                               sim_acces_info->ContactInfo.Pb2GData.Name,
+                                                               TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                       } else {
+                                               TEST_DEBUG("memcpy FAILURE - dest_len(%d) < src_len(%d)", 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                       }
+                               } else {
+                                       TEST_DEBUG("Name Encryption is not UCS2 / ASCII / unpacked GSM7bit");
+                                       break;
+                               }
+                               TEST_DEBUG("text[%s]", ascii_text);
+                       } else if (sim_acces_info->StorageFileType == TAPI_SIM_PB_3GSIM) {
+                               int i, k;
+                               int tmp_size;
+                               int num_of_pb_rec = 0;
+
+                               TEST_DEBUG(" sim_event->pDataLen [%d]",sim_event->pDataLen);
+                               TEST_DEBUG(" sizeof(TelSimPbRecordData_t)[%d]",sizeof(TelSimPbRecordData_t));
+                               TEST_DEBUG(" strlen(sim_event->pData)[%d]", strlen(sim_event->pData));
+
+                               num_of_pb_rec = (sim_event->pDataLen
+                                               / sizeof(TelSimPbRecordData_t));
+
+                               TEST_DEBUG("Number of Saved Records [%d]",num_of_pb_rec);
+
+                               char * temp = (char*) malloc(sim_event->pDataLen);
+                               memcpy(temp, (char*) sim_event->pData, sim_event->pDataLen);
+
+                               TelSimPbRecordData_t *sim_3g_access_info;
+
+                               for (k = 0; k < num_of_pb_rec; k++) {
+                                       tmp_size = k * sizeof(TelSimPbRecordData_t);
+                                       sim_3g_access_info = (TelSimPbRecordData_t*) (temp
+                                                       + tmp_size);
+
+                                       TEST_DEBUG("****************************************************");
+                                       TEST_DEBUG(" Record Num = [%d], index = [%d], next index = [%d] ",k , sim_3g_access_info->Index,sim_3g_access_info->NextIndex);
+
+                                       TEST_DEBUG(" Num of Fields = [%d]",sim_3g_access_info->ContactInfo.Pb3GData.FileTypeCount);
+                                       for (i = 0; i
+                                                       < sim_3g_access_info->ContactInfo.Pb3GData.FileTypeCount; i++) {
+                                               TEST_DEBUG("-------------------------------------");
+                                               TEST_DEBUG("Field_type = [%d], FiledLen = [%d]",
+                                                               sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType,
+                                                               sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength);
+
+                                               if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                               == TAPI_PB_3G_GRP) {
+                                                       int grp_index;
+                                                       TEST_DEBUG("Number of groups [%d]",sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength );
+
+                                                       for (grp_index = 0; grp_index
+                                                                       < (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength); grp_index++) {
+                                                               TEST_DEBUG(" Groupd Index [%d]",sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData[grp_index]); //ignore data_type byte
+
+                                                       }
+
+                                               } else if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                               == TAPI_PB_3G_NAME
+                                                               || sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                                               == TAPI_PB_3G_EMAIL
+                                                               || sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                                               == TAPI_PB_3G_SNE) {
+                                                       TEST_DEBUG("3G Name or Email or SNE");
+                                                       if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.EncryptionType
+                                                                       == TAPI_SIM_TEXT_ENC_UCS2) {
+                                                               TEST_DEBUG("EncryptionType: UCS2");
+                                                               if (FALSE
+                                                                               == __decode_unicode_to_asci_str(
+                                                                                               sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength,
+                                                                                               (char *) &sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                                                               (char *) &ascii_text_len,
+                                                                                               ascii_text)) {
+                                                                       TEST_DEBUG("Deocing ucs2 to ascii failed ");
+                                                                       break;
+                                                               }
+                                                       } else if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.EncryptionType
+                                                                       == TAPI_SIM_TEXT_ENC_ASCII) {
+                                                               TEST_DEBUG("EncryptionType: ASCII");
+                                                               //TAPI_MEMCPY(ascii_text, sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData, 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               //#define TAPI_MEMCPY(dest , src , dest_len , src_len)
+                                                               if (256 >= TAPI_SIM_NUM_TEXT_LEN_MAX) {
+                                                                       memcpy(
+                                                                                       ascii_text,
+                                                                                       sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                                                       TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               } else {
+                                                                       TEST_DEBUG("memcpy FAILURE - dest_len(%d) < src_len(%d)", 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               }
+
+                                                       } else if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.EncryptionType
+                                                                       == TAPI_SIM_TEXT_ENC_GSM7BIT) {
+                                                               TEST_DEBUG("EncryptionType: GSM7 bit");
+                                                               //TAPI_MEMCPY(ascii_text, sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData, 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               //#define TAPI_MEMCPY(dest , src , dest_len , src_len)
+                                                               if (256 >= TAPI_SIM_NUM_TEXT_LEN_MAX) {
+                                                                       memcpy(
+                                                                                       ascii_text,
+                                                                                       sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                                                       TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               } else {
+                                                                       TEST_DEBUG("memcpy FAILURE - dest_len(%d) < src_len(%d)", 256, TAPI_SIM_NUM_TEXT_LEN_MAX);
+                                                               }
+
+                                                       } else {
+                                                               TEST_DEBUG("Name Encryption is not UCS2 / ASCII / unpacked GSM7bit");
+                                                               break;
+                                                       }
+
+                                                       TEST_DEBUG("Field_data[%s]", ascii_text);
+
+                                               } else {
+                                                       TEST_DEBUG("Number Type[%d]", sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.NumType);
+                                                       TEST_DEBUG("AAS RecID [0x%x]", sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].AasRecordIdentifier);
+
+                                                       if (sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                                       == TAPI_PB_3G_ANR) {
+                                                               TEST_DEBUG("3G ANR Type");
+                                                       } else {
+                                                               TEST_DEBUG("3G Number Type");
+                                                       }
+                                                       TEST_DEBUG("Number_data[%s]",sim_3g_access_info->ContactInfo.Pb3GData.PbFileDataInfo[i].FileData);
+                                               }
+                                       }
+                               }
+
+                       } else if (sim_acces_info->StorageFileType == TAPI_SIM_PB_AAS
+                                       || sim_acces_info->StorageFileType == TAPI_SIM_PB_GAS) {
+                               TEST_DEBUG(" AAS and GAS");
+                               TEST_DEBUG(" index = [%d]",sim_acces_info->Index);
+                               __PrintStorageType(sim_acces_info->StorageFileType);
+                               TEST_DEBUG(" str len = [%d]",sim_acces_info->ContactInfo.PbAdditionalNumStringData.TextLength);
+                               TEST_DEBUG(" encrypt type = [%d]",sim_acces_info->ContactInfo.PbAdditionalNumStringData.EncryptionType);
+                               TEST_DEBUG(" string = [%s]",sim_acces_info->ContactInfo.PbAdditionalNumStringData.TextData);
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_UPDATE_CNF: {
+                       TEST_DEBUG("*****************TAPI_EVENT_SIM_PB_UPDATE_CNF***************************");
+
+                       TelSimPbUpdateResp_t *pUpdateResp =
+                                       (TelSimPbUpdateResp_t*) sim_event->pData;
+
+                       __PrintStorageType(pUpdateResp->PbStorageInfo.StorageFileType);
+                       TEST_DEBUG("Storage Info Total Record cnt [%d]", pUpdateResp->PbStorageInfo.TotalRecordCount);
+                       TEST_DEBUG("Storage File Used Record Cnt [%d]", pUpdateResp->PbStorageInfo.UsedRecordCount);
+                       //TEST_DEBUG(" Storage File Type [%d] ", pUpdateResp->PbStorageInfo.StorageFileType);
+                       TEST_DEBUG("Storage File Index [%d]", pUpdateResp->PbIndex);
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PB_DELETE_CNF: {
+                       TEST_DEBUG("*****************TAPI_EVENT_SIM_PB_DELETE_CNF***************************");
+
+                       TEST_DEBUG("SIM Delete PB event status = [0x%x]", sim_event->Status);
+
+                       TelSimPbUpdateResp_t *pDeleteResp =
+                                       (TelSimPbUpdateResp_t*) sim_event->pData;
+                       TEST_DEBUG(" Storage File Type [%d] ", pDeleteResp->PbStorageInfo.StorageFileType);
+                       TEST_DEBUG(" Storage File Index [%d]", pDeleteResp->PbIndex);
+
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_FDN_STATUS_IND: {
+                       TEST_DEBUG("*****************TAPI_EVENT_SIM_FDN_STATUS_IND***************************");
+
+                       TEST_DEBUG("SIM FDN status event status = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG("********************************************");
+
+               }
+                       break;
+
+                       /** will be tested later **/
+#if 1
+               case TAPI_EVENT_SIM_ISIM_AUTHENTICATION_CNF: {
+                       TEST_DEBUG("*****************IMS Authentication **********************");
+                       TelSimIsimAuthenticationResponse_t *auth_resp =
+                                       (TelSimIsimAuthenticationResponse_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM ISIM authentication event status = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG(" auth resp data [%s]",auth_resp->ResponeData);
+                       TEST_DEBUG("  auth string [%s]",auth_resp->AuthenticationString);
+                       TEST_DEBUG(" auth cipher key [%s]",auth_resp->CipherKey);
+                       TEST_DEBUG(" auth integrity key [%s]",auth_resp->IntegrityKey);
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_CONNECT_CNF: {
+                       TEST_DEBUG("*********** SAP CONNECT RESP *************");
+
+                       TelSimSapConnect_t *sap_conn_resp =
+                                       (TelSimSapConnect_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP connect request event status  = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG(" message id [0x%x]", sap_conn_resp->MsgId);
+                       TEST_DEBUG("connection status [0x%x] ", sap_conn_resp->ConnectionStatus);
+                       TEST_DEBUG("max message size [%d]", sap_conn_resp->MaxMsgSize);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_CONNECT_STATUS_CNF: {
+                       TEST_DEBUG("*********** SAP CONNECT STATUS *************");
+
+                       TEST_DEBUG("SIM SAP connect event status = [0x%x]", sim_event->Status);
+
+                       TelSimSapStatusInfo_t *sap_conn_status =
+                                       (TelSimSapStatusInfo_t*) sim_event->pData;
+                       TEST_DEBUG(" connection status info [0x%x]", *sap_conn_status);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_TRANSFER_ATR_CNF: {
+                       TEST_DEBUG("*********** SAP TRANSFER ATR *************");
+
+                       int i = 0;
+                       TelSimSapAtrInfo_t *sap_transfer_atr =
+                                       (TelSimSapAtrInfo_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP trasfer ATR event status  = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG(" ATR result [0x%x]", sap_transfer_atr->AtrResult);
+                       TEST_DEBUG(" ATR length [%lu]", sap_transfer_atr->AtrLength);
+                       TEST_DEBUG(" ATR data ---> " );
+                       for (i = 0; i < sap_transfer_atr->AtrLength; i++)
+                               TEST_DEBUG(" [0x%x]", sap_transfer_atr->AtrData[i]);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_TRANSFER_APDU_CNF: {
+                       TEST_DEBUG("*********** SAP TRANSFER APDU *************");
+
+                       int i = 0;
+                       TelSimSapApduData_t *sap_transfer_apdu =
+                                       (TelSimSapApduData_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP trasfer APDU event status  = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG(" APDU  length [0x%x]", sap_transfer_apdu->ApduLength);
+                       TEST_DEBUG(" APDU  data ---> " );
+                       for (i = 0; i < sap_transfer_apdu->ApduLength; i++)
+                               TEST_DEBUG(" [0x%x]", sap_transfer_apdu->Apdu[i]);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_SET_PROTOCOL_CNF: {
+                       TEST_DEBUG("*********** SAP SET PROTOCOL  *************");
+
+                       TelSimSapProtocol_t *sap_result_code =
+                                       (TelSimSapProtocol_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP set protocol event status  = [0x%x]", sim_event->Status);
+                       TEST_DEBUG("SAP SET protocol  result [0x%x]", *sap_result_code );
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_SET_SIM_POWER_CNF: {
+                       TEST_DEBUG("*********** SAP SET SIM POWER ON/OFF  *************");
+
+                       TelSimSapPower_t *sap_sim_power =
+                                       (TelSimSapPower_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP set SIM power  event status  = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG("message id [0x%x]", sap_sim_power->MsgId);
+                       TEST_DEBUG(" sim power on/off result [0x%x]", sap_sim_power->SimPowerResult);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SAP_CARD_READER_STATUS_CNF: {
+                       TEST_DEBUG("*********** SAP CARD READER STATUS *************");
+
+                       TelSimCardReaderStatus_t *sap_card_reader_status =
+                                       (TelSimCardReaderStatus_t*) sim_event->pData;
+
+                       TEST_DEBUG("SIM SAP card reader event status  = [0x%x]", sim_event->Status);
+
+                       TEST_DEBUG(" card reader result [0x%x] ", sap_card_reader_status->CardReaderResult);
+                       TEST_DEBUG(" card reader status bitwise encoded data [%d]", sap_card_reader_status->CardReaderStatus);
+
+                       TEST_DEBUG("*****************************************");
+               }
+                       break;
+#endif
+
+                       /******************************************************************************************************************************/
+                       /*                                                                              NEW EVENT                                                                               */
+                       /******************************************************************************************************************************/
+               case TAPI_EVENT_SIM_RSIM_ACCESS_CNF: {
+                       TEST_DEBUG("********NEW*TAPI_EVENT_SIM_RSIM_ACCESS_CNF**********");
+
+                       TelSimReadFileRaw_t * rsim_resp =
+                                       (TelSimReadFileRaw_t*) sim_event->pData;
+
+                       if (sim_event->Status == TAPI_SIM_ACCESS_SUCCESS) {
+                               TEST_DEBUG("rsim_resp->sw1[0x%x]", rsim_resp->sw1);
+                               TEST_DEBUG("rsim_resp->sw2[0x%x]", rsim_resp->sw2);
+                               TEST_DEBUG("rsim_resp->DataLen[%d]", rsim_resp->DataLen);
+                               TEST_DEBUG("rsim_resp->Data[%s]", rsim_resp->Data);
+                       } else {
+                               TEST_DEBUG("OPERATION FAILED");
+                       }
+
+                       TEST_DEBUG("********NEW*TAPI_EVENT_SIM_RSIM_ACCESS_CNF**********");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_VERIFY_SEC_CNF: {
+                       TEST_DEBUG("********NEW*TAPI_EVENT_SIM_VERIFY_SEC_CNF**********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Verify PIN event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_OPERATION_TIMEOUT) {
+                               TEST_DEBUG("TAPI SIM Operation Timeout!!");
+                       } else if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("PIN1 Verification Success!");
+                               } else {
+                                       TEST_DEBUG("PIN2 Vefication Success!");
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PIN Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PUK Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("SIM Lock Verification Failed! - SIM Lock code Required");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_VERIFY_PUK_CNF: {
+                       TEST_DEBUG("**********NEW*TAPI_EVENT_SIM_VERIFY_PUK_CNF********");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Unblock PIN event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("Unblock PIN1 Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("Unblock PIN2 Success!");
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PIN Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PUK Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_CHANGE_PINS_CNF: {
+                       TEST_DEBUG("********NEW*TAPI_EVENT_SIM_CHANGE_PINS_CNF***************************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Change PIN event status = [0x%x], pinType[%d]", sim_event->Status, pPinInfo->PinType);
+                       TEST_DEBUG("PinType[%d]", pPinInfo->type);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("Change PIN1 Success!");
+                               } else {
+                                       TEST_DEBUG("Change PIN2 Success!");
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PIN Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PUK Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_DISABLE_SEC_CNF: {
+                       TEST_DEBUG("****************NEW*TAPI_EVENT_SIM_DISABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Disable SEC event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("Disable PIN1 Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("Disable PIN2 Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("Disable SIM LOCK Success!");
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PIN1Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PUK1 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("SIM LOCK Verification Failed! - SIM LOCK CODE Required ");
+                                       TEST_DEBUG("Remainint attempts [%d] - Useless value", pPinInfo->retry_count);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_SEC_CNF: {
+                       TEST_DEBUG("****************NEW*TAPI_EVENT_SIM_ENABLE_SEC_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM ENABLE SEC event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("Enable PIN1 Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("Enable PIN2 Success!");
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("Enable SIM LOCK Success!");
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PIN1Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK1) {
+                                       TEST_DEBUG("PIN1 Verification Failed! - PUK1 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_SIM) {
+                                       TEST_DEBUG("SIM LOCK Verification Failed! - SIM LOCK CODE Required ");
+                                       TEST_DEBUG("Remainint attempts [%d] - Useless value", pPinInfo->retry_count);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF: {
+                       TEST_DEBUG("****************NEW*TAPI_EVENT_SIM_DISABLE_FDNMODE_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Disable FDN event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("Disable FDN Success!");
+                               } else {
+                                       TEST_DEBUG("Unhandled type[%d]", pPinInfo->type);
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else {
+                                       TEST_DEBUG("Unhandled type[%d]", pPinInfo->type);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF: {
+                       TEST_DEBUG("****************NEW*TAPI_EVENT_SIM_ENABLE_FDNMODE_CNF****************");
+
+                       TelSimSecResult_t *pPinInfo = (TelSimSecResult_t*) sim_event->pData;
+
+                       //TEST_DEBUG("SIM Enable FDN event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("Enable FDN Success!");
+                               } else {
+                                       TEST_DEBUG("Unhandled type[%d]", pPinInfo->type);
+                               }
+                       } else {
+                               if (pPinInfo->type == TAPI_SIM_PTYPE_PIN2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PIN2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else if (pPinInfo->type == TAPI_SIM_PTYPE_PUK2) {
+                                       TEST_DEBUG("PIN2 Verification Failed! - PUK2 Required ");
+                                       TEST_DEBUG("Remainint attempts [%d]", pPinInfo->retry_count);
+                               } else {
+                                       TEST_DEBUG("Unhandled type[%d]", pPinInfo->type);
+                               }
+                       }
+                       TEST_DEBUG("********************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_PERS_STATUS_CNF: {
+                       TelSimPersStatus_t* pers_status =
+                                       (TelSimPersStatus_t*) sim_event->pData;
+
+                       printf(
+                                       "[SIM APP]**********NEW* TAPI_EVENT_SIM_PERS_STATUS_CNF************\n");
+                       printf("[SIM APP]SIM lock personalisation event status = [%x]\n",
+                                       sim_event->Status);
+                       printf(
+                                       "[SIM APP]SIM lock personalisation status - net0-ns1-sp2-cp3  = [%d]\n",
+                                       pers_status->type);
+                       printf(
+                                       "[SIM APP]SIM lock personalisation status - unlock0-lock1  = [%d]\n",
+                                       pers_status->mode);
+                       printf(
+                                       "[SIM APP]***************************************************\n");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_DISABLE_PERS_CNF: {
+                       TelSimPinOperationResult_t opResult =
+                                       (TelSimPinOperationResult_t) sim_event->Status;
+
+                       printf(
+                                       "[SIM APP]*********NEW*TAPI_EVENT_SIM_DISABLE_PERS_CNF************\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n",
+                                       opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               printf("[SIM APP]Disable Personalization Success!\n");
+                       } else {
+                               printf(
+                                               "[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf(
+                                       "\n***************************************************************\n");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_ENABLE_PERS_CNF: {
+                       TelSimPinOperationResult_t opResult =
+                                       (TelSimPinOperationResult_t) sim_event->Status;
+
+                       printf(
+                                       "[SIM APP]*********NEW*TAPI_EVENT_SIM_ENABLE_PERS_CNF************\n");
+                       printf("[SIM APP]Eable Personalization event status = [%x]\n",
+                                       opResult);
+
+                       if (opResult == TAPI_SIM_PIN_OPERATION_SUCCESS) {
+                               printf("[SIM APP]Enable Personalization Success!\n");
+                       } else {
+                               printf(
+                                               "[SIM APP]Verification Failed! - Correct Password Required\n");
+                       }
+                       printf(
+                                       "\n***************************************************************\n");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_SET_LANGUAGE_CNF: {
+                       TEST_DEBUG("*********NEW*TAPI_EVENT_SIM_SET_LANGUAGE_CNF************");
+                       TEST_DEBUG("update event status = [0x%x]", sim_event->Status);
+                       TEST_DEBUG("**********************************************************");
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_APDU_CNF: {
+                       TelSimApduResp_t* apdu_resp = (TelSimApduResp_t*) sim_event->pData;
+                       int i = 0;
+                       TEST_DEBUG("*********NEW*TAPI_EVENT_SIM_APDU_CNF************");
+                       TEST_DEBUG("update event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == 1234) {
+                               TEST_DEBUG("timeout happended. this means, modem didn`t reply");
+                               return;
+                       }
+
+                       if (apdu_resp != NULL) {
+                               TEST_DEBUG("apdu_resp->apdu_resp_len[%d]",apdu_resp->apdu_resp_len);
+
+                               for (i = 0; i < apdu_resp->apdu_resp_len; i++)
+                                       TEST_DEBUG("apdu_resp->apdu_resp[%d]=[0x%x]",i,apdu_resp->apdu_resp[i]);
+
+                       } else {
+                               TEST_DEBUG("atr_resp == NULL");
+                       }
+                       TEST_DEBUG("**********************************************************");;
+               }
+                       break;
+
+               case TAPI_EVENT_SIM_ATR_CNF: {
+                       TelSimAtrResp_t* atr_resp = (TelSimAtrResp_t*) sim_event->pData;
+                       int i = 0;
+
+                       TEST_DEBUG("*********NEW*TAPI_EVENT_SIM_ATR_CNF************");
+                       TEST_DEBUG("update event status = [0x%x]", sim_event->Status);
+
+                       if (sim_event->Status == 1234) {
+                               TEST_DEBUG("timeout happended. this means, modem didn`t reply");
+                               return;
+                       }
+
+                       if (atr_resp != NULL) {
+                               TEST_DEBUG("atr_resp->atr_resp_len[%d]",atr_resp->atr_resp_len);
+
+                               for (i = 0; i < atr_resp->atr_resp_len; i++)
+                                       TEST_DEBUG("atr_resp->atr_resp[%d]=[0x%x]",i,atr_resp->atr_resp[i]);
+                       } else {
+                               TEST_DEBUG("atr_resp == NULL");
+                       }
+                       TEST_DEBUG("**********************************************************");
+               }
+                       break;
+
+#if 0
+
+                       case TAPI_SIM_EVENT_PB_GET_STORAGE_LIST:
+                       {
+                               TEST_DEBUG("****************TAPI_SIM_EVENT_PB_GET_STORAGE_LIST****************************");
+                               char *p = (char*)&sim_event->pData;
+
+                               TEST_DEBUG("SIM phone book storage list Information ");
+                               if(*p & 0x01)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_DC - ME Dailled Call list");
+                               if(*p & 0x02)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_EN - Emergency Number");
+                               if(*p & 0x03)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_FD - Fixed dialing phonebook");
+                               if(*p & 0x04)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_LD - Last dialled phonebook");
+                               if(*p & 0x05)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_MC -Missed call list");
+                               if(*p & 0x06)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_ME - ME phone book");
+                               if(*p & 0x07)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_MT - ME and sim combined phone book");
+                               if(*p & 0x08)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_ON - My own number - MSISDN");
+                               if(*p & 0x09)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_RC - ME Received calls");
+                               if(*p & 0x0A)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_SIM - SIM phone book");
+                               if(*p & 0x0B)
+                               TEST_DEBUG("IPC_PB_STORAGE_TYPE_SDN - Service dailing number");
+
+                               TEST_DEBUG("********************************************");
+                       }
+                       break;
+#endif
+
+               default:
+                       TEST_DEBUG("Undhandled event type [0x%x]",sim_event->EventType)
+                       ;
+               }
+               printf("\n");
+       }//end switch (Type)
+       else {
+               TEST_DEBUG("Undhandled EventClass [0x%x]",sim_event->EventClass);
+       }
+       return;
+
+}// end func
+
+
+int sim_read_key_input(void) {
+       char buf[256] = { 0, };
+       int ret = 0;
+       TapiResult_t err_code = TAPI_API_SUCCESS;
+       char ch;
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+
+       } else if (ret == 0)
+               return ret;
+
+       printf("************************************\n");
+       printf("op : show all OP | q : quit sim test app \n");
+       printf("************************************\n");
+       printf("SIM OP in : %s\n", buf);
+
+       if (memcmp(buf, "op", sizeof("op") - 1) == 0) {
+               printf("***************************** NEW Asynchronous APIs *******************************\n");
+               printf("rsim : rsim \n");
+               printf("pin1 : verify pin1 number \n");
+               printf("pin2 : verify pin2 number\n");
+               printf("sim : verify sim lock number\n");
+               printf("puk1 : Unblocking CHV1 \n");
+               printf("puk2 : Unblocking CHV2 \n");
+               printf("chpin1 : change pin1 number \n");
+               printf("chpin2 : change pin2 number \n");
+               printf("enpin : CHV enable\n");
+               printf("dispin : CHV disable\n");
+               printf("enfdn : FDN enable\n");
+               printf("disfdn : FDN disable\n");
+               printf("ensim : enable sim lock\n");
+               printf("dissim : disable sim lock\n");
+               printf("getpers : Get lock personalisation information \n");
+               printf("medepers : de-personalization test\n");
+               printf("mepers : personalization test\n");
+               printf("setlang : update sim language info\n");
+               printf("apdu : send apdu\n");
+               printf("atr : request atr\n");
+               printf("***************************** Synchronous APIs *******************************\n");
+               printf("siminit : Get SIM init Information\n");
+               printf("getpin1 : Get CHV1 status info\n");
+               printf("getfdn : Get FDN status info\n");
+               printf("getpin2 : Get CHV2 status Info \n");
+               printf("getsim : Get CHV2 status Info \n");
+               printf("gettype : show Sim Card Type\n");
+               printf("getimsi : show Sim IMSI\n");
+               printf("geticcid : show Sim ICCID\n");
+               printf("getlang:Language Indication Info\n");
+               printf("getecc : get SIM ECC\n");
+               printf("getuecc : get USIM ECC\n");
+               printf("getmb : get mailbox number\n");
+               printf("getmw : get message waiting information\n");
+               printf("getcf : get callforwarding information\n");
+               printf("getcphs : get cphs information\n");
+               printf("getmsisdn : get msisdn information\n");
+               printf("******************************* PHONE BOOK ***********************************\n");
+               printf("pbinit : Get pb init info\n");
+               printf("pbcapa : pb capability info \n");
+               printf("pbcnt : phonebook used and total count\n");
+               printf("pbentry : phonebook entry info\n");
+               printf("pbadd : phonebook add\n");
+               printf("pbdel : phonebook delete\n");
+               printf("pbread:phonebook read\n");
+               //              printf("****************************** SAP commands **********************************\n");
+               //              printf("sapconnect: SAP Connect request\n");
+               //              printf("sapstatus : SAP current connection status request \n");
+               //              printf("sapatr: SAP transfer atr request\n");
+               //              printf("sapapdu: SAP transfer apdu request\n");
+               //              printf("sapsetproto: SAP set protocol request\n");
+               //              printf("sapsimpwr: SAP SIM power on/off request\n");
+               //              printf("sapreaderstat: SAP card reader status request\n");
+               //              printf("*****************************************************************************\n");
+       }
+
+       /*NEW API -START*/
+       if (memcmp(buf, "siminit", sizeof("siminit") - 1) == 0) {
+               TelSimCardStatus_t status = 0x00;
+               int b_card_changed = 0;
+
+               err_code = tel_get_sim_init_info(&status, &b_card_changed);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("*************************************************************");
+                       __PrintCardStatus("CardStatus: ", status);
+                       TEST_DEBUG("b_card_changed[%d]\n",b_card_changed);
+                       TEST_DEBUG("*************************************************************");
+               } else {
+                       TEST_DEBUG("TAPI Fail: Error Code [%d]\n",err_code);
+               }
+       } else if (memcmp(buf, "rsim", sizeof("rsim") - 1) == 0) {
+               TEST_DEBUG("rsim....");
+
+               TelSimRSimReq_t rsim = { 0, };
+
+               rsim.file_id = 0x6F60;
+               rsim.rsim_cmd = TAPI_SIM_GET_RESPONSE;
+
+               err_code = tel_req_sim_access((const TelSimRSimReq_t*) &rsim,
+                               &request_id);
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       } else if (memcmp(buf, "pin1", sizeof("pin1") - 1) == 0) {
+               TEST_DEBUG("Pin1 Verification");
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[TAPI_SIM_PIN_LENGTH + 1];
+
+               getchar();
+
+               TEST_DEBUG(" PUT PIN1 CODE: ");
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t pin_data = { 0, };
+
+               pin_data.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               pin_data.pw_len = strlen(init_pin_val);
+
+               TEST_DEBUG("pw_len[%d]", pin_data.pw_len);
+
+               pin_data.pw = (unsigned char*) malloc(length);
+               memcpy(pin_data.pw, init_pin_val, length);
+
+               err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "pin2", sizeof("pin2") - 1) == 0) {
+               TEST_DEBUG("Pin2 Verification");
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[TAPI_SIM_PIN_LENGTH + 1];
+
+               getchar();
+
+               TEST_DEBUG(" PUT PIN2 CODE: ");
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t pin_data = { 0, };
+
+               pin_data.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               pin_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", pin_data.pw_len);
+
+               pin_data.pw = (unsigned char*) malloc(length);
+               memcpy(pin_data.pw, init_pin_val, length);
+
+               err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "sim", sizeof("sim") - 1) == 0) {
+               TEST_DEBUG("sim lock verification");
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[TAPI_SIM_PIN_LENGTH + 1];
+
+               //puts("Flushing input - Enter \ to exit! ");
+               //while ((ch = getchar()) != '\n' && ch != EOF);
+               getchar();
+
+               TEST_DEBUG(" PUT SIM LOCK CODE: 4 DIGIT ");
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t pin_data = { 0, };
+
+               pin_data.type = TAPI_SIM_PTYPE_SIM; // 0x06
+               pin_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", pin_data.pw_len);
+
+               pin_data.pw = (unsigned char*) malloc(length);
+               memcpy(pin_data.pw, init_pin_val, length);
+
+               err_code = tel_verifiy_sim_pins(&pin_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+       // Disable pin1
+       else if (memcmp(buf, "dispin", sizeof("dispin") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("Disable npin1");
+               TEST_DEBUG("Plese input PIN1 CODE: ");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_disable_sim_security(&sec_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // Enable pin1
+       else if (memcmp(buf, "enpin", sizeof("enpin") - 1) == 0) {
+               //TEST_DEBUG("Flushing input - Enter \ to exit!");
+               //while ((ch = getchar()) != '\n' && ch != EOF);
+               getchar();
+
+               TEST_DEBUG("Enable npin1");
+               TEST_DEBUG("Plese input PIN1 CODE: ");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_enable_sim_security(&sec_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // Disable sim lock
+       else if (memcmp(buf, "dissim", sizeof("dissim") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("Disable ndissim");
+               TEST_DEBUG("Plese input SIM LOCK CODE: ");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_SIM; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_disable_sim_security(&sec_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // Enable pin1
+       else if (memcmp(buf, "ensim", sizeof("ensim") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("Enable nensim");
+               TEST_DEBUG("Plese input SIM LOCK CODE: ");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_SIM; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_enable_sim_security(&sec_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // get pin1 status
+       else if (memcmp(buf, "getpin1", sizeof("getpin1") - 1) == 0) {
+               TelSimPinType_t type = TAPI_SIM_PTYPE_PIN1;
+               TelSimPinStatus_t status = -1;
+               TEST_DEBUG("Get pin1 status");
+
+               err_code = tel_get_sim_security_status(type, &status);
+
+               if (err_code == TAPI_API_SUCCESS) {
+
+                       TEST_DEBUG(" *****************************************************");
+                       switch (status) {
+                       case TAPI_SIM_PIN_STATUS_DISABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_DISABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_ENABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_ENABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_PUK_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_UNKNOWN: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_UNKNOWN ");
+                       }
+                               break;
+
+                       default:
+                               TEST_DEBUG(" Default case statment: pin1_status(%d)", status)
+                               ;
+                       }
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+               TEST_DEBUG("*****************************************************");
+       }
+       // get pin2 status
+       else if (memcmp(buf, "getpin2", sizeof("getpin2") - 1) == 0) {
+               TelSimPinType_t type = TAPI_SIM_PTYPE_PIN2;
+               TelSimPinStatus_t status = -1;
+               TEST_DEBUG("Get pin2 status");
+
+               err_code = tel_get_sim_security_status(type, &status);
+
+               if (err_code == TAPI_API_SUCCESS) {
+
+                       TEST_DEBUG(" *****************************************************");
+                       switch (status) {
+                       case TAPI_SIM_PIN_STATUS_DISABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_DISABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_ENABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_ENABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_PUK_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_UNKNOWN: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_UNKNOWN ");
+                       }
+                               break;
+
+                       default:
+                               TEST_DEBUG(" Default case statment: pin2_status(%d)", status)
+                               ;
+                       }
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+               TEST_DEBUG("*****************************************************");
+       } else if (memcmp(buf, "getsim", sizeof("getsim") - 1) == 0) {
+               TelSimPinType_t type = TAPI_SIM_PTYPE_SIM;
+               TelSimPinStatus_t status = -1;
+               TEST_DEBUG("Get SIM LOCK status");
+
+               err_code = tel_get_sim_security_status(type, &status);
+
+               if (err_code == TAPI_API_SUCCESS) {
+
+                       TEST_DEBUG(" *****************************************************");
+                       switch (status) {
+                       case TAPI_SIM_PIN_STATUS_DISABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_DISABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_ENABLED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_ENABLED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_PUK_BLOCKED: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_PUK_BLOCKED ");
+                       }
+                               break;
+
+                       case TAPI_SIM_PIN_STATUS_UNKNOWN: {
+                               TEST_DEBUG("TAPI_SIM_PIN_STATUS_UNKNOWN ");
+                       }
+                               break;
+
+                       default:
+                               TEST_DEBUG(" Default case statment: sim_status(%d)", status)
+                               ;
+                       }
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+               TEST_DEBUG("*****************************************************");
+       }
+       // Enable FDN
+       else if (memcmp(buf, "enfdn", sizeof("enfdn") - 1) == 0) {
+               //puts("Flushing input - Enter \ to exit! ");
+               //while ((ch = getchar()) != '\n' && ch != EOF);
+               getchar();
+
+               TEST_DEBUG("Enable FDN");
+               TEST_DEBUG("Plese input PIN2 CODE: ");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_enable_sim_fdn(sec_data.pw, (int *)&sec_data.pw_len,
+                               &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+       // Disable FDN
+       else if (memcmp(buf, "disfdn", sizeof("disfdn") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("Disable FDN");
+               TEST_DEBUG("Plese input PIN2 CODE");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t sec_data = { 0, };
+               sec_data.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               sec_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", sec_data.pw_len);
+
+               sec_data.pw = (unsigned char*) malloc(length);
+               memcpy(sec_data.pw, init_pin_val, length);
+
+               err_code = tel_disable_sim_fdn(sec_data.pw, (int *)&sec_data.pw_len,
+                               &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+       // get FDN status
+       else if (memcmp(buf, "getfdn", sizeof("getfdn") - 1) == 0) {
+               TEST_DEBUG("Get FDN status");
+               int fdn_status = 0;
+
+               err_code = tel_get_sim_fdn_status(&fdn_status);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       if (fdn_status == 0) {
+                               TEST_DEBUG("*************************");
+                               TEST_DEBUG("FDN disabled ");
+                               TEST_DEBUG("*************************");
+                       } else {
+                               TEST_DEBUG("*************************");
+                               TEST_DEBUG("FDN enabled");
+                               TEST_DEBUG("*************************");
+                       }
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       } else if (memcmp(buf, "gettype", sizeof("gettype") - 1) == 0) {
+               TelSimCardType_t cardInfo;
+               TEST_DEBUG("Get card type !!!");
+               err_code = tel_get_sim_type(&cardInfo);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("*************************************************************");
+                       __PrintCardType("", cardInfo);
+                       TEST_DEBUG("*************************************************************");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       } else if (memcmp(buf, "getimsi", sizeof("getimsi") - 1) == 0) {
+               TelSimImsiInfo_t imsi;
+               TEST_DEBUG("Get IMSI type !!!");
+               err_code = tel_get_sim_imsi(&imsi);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("*************************************************************");
+                       TEST_DEBUG("* imsi.bValid[%d]",imsi.bValid);
+                       TEST_DEBUG("* imsi.szMcc[%s]",imsi.szMcc);
+                       TEST_DEBUG("* imsi.szMnc[%s]",imsi.szMnc);
+                       TEST_DEBUG("* imsi.szMsin[%s]",imsi.szMsin);
+                       TEST_DEBUG("*************************************************************");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       } else if (memcmp(buf, "geticcid", sizeof("geticcid") - 1) == 0) {
+               TelSimIccIdInfo_t iccid;
+               TEST_DEBUG("Get ICCID  !!!");
+               err_code = tel_get_sim_iccid(&iccid);
+               int i = 0;
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("*************************************************************");
+                       TEST_DEBUG("* iccid.icc_length[%d]",iccid.icc_length);
+                       for (i = 0; i < iccid.icc_length; i++) {
+                               TEST_DEBUG("* iccid.icc_num[%c]",iccid.icc_num[i]);
+                       }
+                       TEST_DEBUG("*************************************************************");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getlang", sizeof("getlang") - 1) == 0) {
+               TEST_DEBUG("Language Preference INFO ");
+               int i;
+               TelSimLanguageInfo_t li_info = { 0, };
+
+               err_code = tel_get_sim_language(&li_info);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG("************ LI  INFO ***********************");
+                       TEST_DEBUG("LpCount: [%lu]", li_info.LpCount);
+                       for (i = 0; i < li_info.LpCount; i++) {
+                               fprintf(stderr, "Loop(%d), ", i);
+                               __PrintLangInfo("LpCode: ", li_info.Lp[i]);
+                       }
+                       TEST_DEBUG("============================================");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getecc", sizeof("getecc") - 1) == 0) {
+               TEST_DEBUG(" Get SIM ECC  ");
+               int ecc_rec_count = 0;
+               TelSimEccData_t ecc_info = { { { 0, } } };
+               TelSimEccInfo_t SimEccInfo = { { 0, } };
+
+               err_code = tel_get_sim_ecc(&ecc_info, &ecc_rec_count);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       SimEccInfo = ecc_info.EccInfo;
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" EEC count [%d]", ecc_rec_count);
+                       TEST_DEBUG(" ============================================");
+
+                       if (ecc_rec_count != 0) {
+                               TEST_DEBUG("ECC1 [%s]", SimEccInfo.szEcc1);
+                               TEST_DEBUG("ECC2 [%s]", SimEccInfo.szEcc2);
+                               TEST_DEBUG("ECC3 [%s]", SimEccInfo.szEcc3);
+                               TEST_DEBUG("ECC4 [%s]", SimEccInfo.szEcc4);
+                               TEST_DEBUG("ECC5 [%s]", SimEccInfo.szEcc5);
+                       }
+                       TEST_DEBUG(" ============================================");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getuecc", sizeof("getuecc") - 1) == 0) {
+               int i = 0;
+               int uecc_rec_count = 0;
+
+               TEST_DEBUG(" Get USIM ECC  ");
+
+               TelSimEccData_t uecc_info = { { { 0, } } };
+
+               err_code = tel_get_sim_ecc(&uecc_info, &uecc_rec_count);
+
+               if (err_code == TAPI_API_SUCCESS) {
+
+                       TEST_DEBUG("ECC count [%d]",uecc_rec_count );
+
+                       for (i = 0; i < uecc_rec_count; i++) {
+                               TEST_DEBUG("Loop(%d): ", i);
+                               TEST_DEBUG(" ECC Used [%d]", uecc_info.UeccInfo[i].bUsed);
+                               TEST_DEBUG(" ECC Len [%d]", uecc_info.UeccInfo[i].EccLen);
+
+                               if (NULL != uecc_info.UeccInfo[i].szEcc) {
+                                       TEST_DEBUG("ECC string [%s]", uecc_info.UeccInfo[i].szEcc);
+                               } else {
+                                       TEST_DEBUG("ECC string [null]");
+                               }
+
+                               TEST_DEBUG("ECC alphaID [%s]",uecc_info.UeccInfo[i].szEccAlphaIdentifier);
+                               __PrintECCSvcInfo(uecc_info.UeccInfo[i].EccEmergencyServiceInfo);
+                       }
+
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getimsi", sizeof("getimsi") - 1) == 0) {
+               TEST_DEBUG("Get IMSI INFO ");
+
+               TelSimImsiInfo_t sim_imsi_info;
+
+               err_code = tel_get_sim_imsi(&sim_imsi_info);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" IMSI [mcc,mnc,msin]= ");
+                       TEST_DEBUG(" [%s]",sim_imsi_info.szMcc);
+                       TEST_DEBUG(" [%s]",sim_imsi_info.szMnc);
+                       TEST_DEBUG(" [%s]",sim_imsi_info.szMsin);
+                       TEST_DEBUG(" ============================================");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getmb", sizeof("getmb") - 1) == 0) {
+               TEST_DEBUG("Get MAILBOX INFO ");
+
+               TelSimMailboxNumbers_s mbox;
+
+               err_code = tel_get_sim_mailbox_info(&mbox);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+
+                       if (mbox.b_cphs) {
+                               TEST_DEBUG("Current SIM is CPHS");
+                       } else {
+                               TEST_DEBUG("Current SIM is not CPHS but 3GPP");
+                       }
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" voice_line1.bUsed[%d]",mbox.voice_line1.bUsed);
+                       TEST_DEBUG(" voice_line1.AlphaIdLength[%lu]",mbox.voice_line1.AlphaIdLength);
+                       TEST_DEBUG(" voice_line1.AlphaId[%s]",mbox.voice_line1.AlphaId);
+                       TEST_DEBUG(" voice_line1.DiallingnumLength[%lu]",mbox.voice_line1.DiallingnumLength);
+                       TEST_DEBUG(" voice_line1.DiallingNum[%s]",mbox.voice_line1.DiallingNum);
+                       TEST_DEBUG(" voice_line1.NumberingPlanIdent[%d]",mbox.voice_line1.NumberingPlanIdent);
+                       TEST_DEBUG(" voice_line1.TypeOfNumber[%u]",mbox.voice_line1.TypeOfNumber);
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" voice_line2.bUsed[%d]",mbox.voice_line2.bUsed);
+                       TEST_DEBUG(" voice_line2.AlphaIdLength[%lu]",mbox.voice_line2.AlphaIdLength);
+                       TEST_DEBUG(" voice_line2.AlphaId[%s]",mbox.voice_line2.AlphaId);
+                       TEST_DEBUG(" voice_line2.DiallingnumLength[%lu]",mbox.voice_line2.DiallingnumLength);
+                       TEST_DEBUG(" voice_line2.DiallingNum[%s]",mbox.voice_line2.DiallingNum);
+                       TEST_DEBUG(" voice_line2.NumberingPlanIdent[%d]",mbox.voice_line2.NumberingPlanIdent);
+                       TEST_DEBUG(" voice_line2.TypeOfNumber[%d]",mbox.voice_line2.TypeOfNumber);
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" video.bUsed[%d]",mbox.video.bUsed);
+                       TEST_DEBUG(" video.AlphaIdLength[%lu]",mbox.video.AlphaIdLength);
+                       TEST_DEBUG(" video.AlphaId[%s]",mbox.video.AlphaId);
+                       TEST_DEBUG(" video.DiallingnumLength[%lu]",mbox.video.DiallingnumLength);
+                       TEST_DEBUG(" video.DiallingNum[%s]",mbox.video.DiallingNum);
+                       TEST_DEBUG(" video.NumberingPlanIdent[%d]",mbox.video.NumberingPlanIdent);
+                       TEST_DEBUG(" video.TypeOfNumber[%d]",mbox.video.TypeOfNumber);
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" fax.bUsed[%d]",mbox.fax.bUsed);
+                       TEST_DEBUG(" fax.AlphaIdLength[%lu]",mbox.fax.AlphaIdLength);
+                       TEST_DEBUG(" fax.AlphaId[%s]",mbox.fax.AlphaId);
+                       TEST_DEBUG(" fax.DiallingnumLength[%lu]",mbox.fax.DiallingnumLength);
+                       TEST_DEBUG(" fax.DiallingNum[%s]",mbox.fax.DiallingNum);
+                       TEST_DEBUG(" fax.NumberingPlanIdent[%d]",mbox.fax.NumberingPlanIdent);
+                       TEST_DEBUG(" fax.TypeOfNumber[%d]",mbox.fax.TypeOfNumber);
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG(" email.bUsed[%d]",mbox.email.bUsed);
+                       TEST_DEBUG(" email.AlphaIdLength[%lu]",mbox.email.AlphaIdLength);
+                       TEST_DEBUG(" email.AlphaId[%s]",mbox.email.AlphaId);
+                       TEST_DEBUG(" email.DiallingnumLength[%lu]",mbox.email.DiallingnumLength);
+                       TEST_DEBUG(" email.DiallingNum[%s]",mbox.email.DiallingNum);
+                       TEST_DEBUG(" email.NumberingPlanIdent[%d]",mbox.email.NumberingPlanIdent);
+                       TEST_DEBUG(" email.TypeOfNumber[%d]",mbox.email.TypeOfNumber);
+                       TEST_DEBUG(" ============================================");
+
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getmw", sizeof("getmw") - 1) == 0) {
+               TEST_DEBUG("Get MESSAGE WAITING INFO ");
+
+               TelSimMessageWaiting_s mw;
+
+               err_code = tel_get_sim_messagewaiting_info(&mw);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+
+                       if (mw.b_cphs) {
+                               TEST_DEBUG("Current SIM is CPHS");
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG(" cphs_mw.bWaitVoiceMsgLine1[%d]",mw.mw_data_u.cphs_mw.bWaitVoiceMsgLine1);
+                               TEST_DEBUG(" cphs_mw.bWaitVoiceMsgLine2[%d]",mw.mw_data_u.cphs_mw.bWaitVoiceMsgLine2);
+                               TEST_DEBUG(" cphs_mw.bWaitFaxMsg[%d]",mw.mw_data_u.cphs_mw.bWaitFaxMsg);
+                               TEST_DEBUG(" cphs_mw.bWaitDataMsg[%d]",mw.mw_data_u.cphs_mw.bWaitDataMsg);
+
+                       } else {
+                               TEST_DEBUG("Current SIM is not CPHS but 3GPP");
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG(" mw_data_u.mw.IndicatorType[0x%x]",mw.mw_data_u.mw.IndicatorType);
+                               TEST_DEBUG(" mw_data_u.mw.VoiceMailCount[%d]",mw.mw_data_u.mw.VoiceMailCount);
+                               TEST_DEBUG(" mw_data_u.mw.FaxCount[%d]",mw.mw_data_u.mw.FaxCount);
+                               TEST_DEBUG(" mw_data_u.mw.EmailCount[%d]",mw.mw_data_u.mw.EmailCount);
+                               TEST_DEBUG(" mw_data_u.mw.OtherCount[%d]",mw.mw_data_u.mw.OtherCount);
+                               TEST_DEBUG(" mw_data_u.mw.VideoMailCount[%d]",mw.mw_data_u.mw.VideoMailCount);
+                       }
+                       TEST_DEBUG(" ============================================");
+
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getcf", sizeof("getcf") - 1) == 0) {
+               TEST_DEBUG("Get CALLFORWARDING INFO ");
+
+               TelSimCallForwarding_s cf;
+
+               err_code = tel_get_sim_callforwarding_info(&cf);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+
+                       if (cf.b_cphs) {
+                               TEST_DEBUG("Current SIM is CPHS");
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalLine1[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalLine1);
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalLine2[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalLine2);
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalFax[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalFax);
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalData[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalData);
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalSms[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalSms);
+                               TEST_DEBUG(" cphs_cf.bCallForwardUnconditionalBearer[%d]",cf.cf_data_u.cphs_cf.bCallForwardUnconditionalBearer);
+                       } else {
+                               TEST_DEBUG("Current SIM is not CPHS but 3GPP");
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG(" cf.bUsed[%d]",cf.cf_data_u.cf.bUsed);
+                               TEST_DEBUG(" cf.MspNumber[%d]",cf.cf_data_u.cf.MspNumber);
+                               TEST_DEBUG(" cf.Status[0x%x]",cf.cf_data_u.cf.Status);
+                               TEST_DEBUG(" cf.DiallingnumLen[%lu]",cf.cf_data_u.cf.DiallingnumLen);
+                               TEST_DEBUG(" cf.TypeOfNumber[%d]",cf.cf_data_u.cf.TypeOfNumber);
+                               TEST_DEBUG(" cf.NumberingPlanIdent[%d]",cf.cf_data_u.cf.NumberingPlanIdent);
+                               TEST_DEBUG(" cf.DiallingNum[%s]",cf.cf_data_u.cf.DiallingNum);
+                       }
+                       TEST_DEBUG(" ============================================");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "getcphs", sizeof("getcphs") - 1) == 0) {
+               TEST_DEBUG("Get CPHS INFO ");
+
+               TelSimCphsLocalInfo_t cphs;
+
+               err_code = tel_get_sim_cphs_info(&cphs);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+
+                       if (cphs.b_used) {
+                               TEST_DEBUG("Current SIM is CPHS");
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.cphsinfo.CphsPhase[%d]",cphs.cphsinfo.CphsPhase);
+                               TEST_DEBUG("cphs.cphsinfo.CphsServiceTable.bCustomerServiceProfile[%d]",cphs.cphsinfo.CphsServiceTable.bCustomerServiceProfile);
+                               TEST_DEBUG("cphs.cphsinfo.CphsServiceTable.bServiceStringTable[%d]",cphs.cphsinfo.CphsServiceTable.bServiceStringTable);
+                               TEST_DEBUG("cphs.cphsinfo.CphsServiceTable.bMailBoxNumbers[%d]",cphs.cphsinfo.CphsServiceTable.bMailBoxNumbers);
+                               TEST_DEBUG("cphs.cphsinfo.CphsServiceTable.bOperatorNameShortForm[%d]",cphs.cphsinfo.CphsServiceTable.bOperatorNameShortForm);
+                               TEST_DEBUG("cphs.cphsinfo.CphsServiceTable.bInformationNumbers[%d]",cphs.cphsinfo.CphsServiceTable.bInformationNumbers);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.csp.ServiceProfileEntry[0].CustomerServiceGroup[%d]",cphs.csp.ServiceProfileEntry[0].CustomerServiceGroup);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.infn.bUsed[%d]",cphs.infn.bUsed);
+                               TEST_DEBUG("cphs.infn.AlphaIdLength[%d]",cphs.infn.AlphaIdLength);
+                               TEST_DEBUG("cphs.infn.IndexLevelIndicator[%d]",cphs.infn.IndexLevelIndicator);
+                               TEST_DEBUG("cphs.infn.PremiumServiceIndicator[%d]",cphs.infn.PremiumServiceIndicator);
+                               TEST_DEBUG("cphs.infn.NetworkSpecificIndicator[%d]",cphs.infn.NetworkSpecificIndicator);
+                               TEST_DEBUG("cphs.infn.Alpha_id[%s]",cphs.infn.Alpha_id);
+                               TEST_DEBUG("cphs.infn.DiallingnumLength[%lu]",cphs.infn.DiallingnumLength);
+                               TEST_DEBUG("cphs.infn.TypeOfNumber[%d]",cphs.infn.TypeOfNumber);
+                               TEST_DEBUG("cphs.infn.NumberingPlanIdentity[%d]",cphs.infn.NumberingPlanIdentity);
+                               TEST_DEBUG("cphs.infn.DiallingNum[%s]",cphs.infn.DiallingNum);
+                               TEST_DEBUG("cphs.infn.Ext1RecordId[%d]",cphs.infn.Ext1RecordId);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.opname.NameLength[%d]",cphs.opname.NameLength);
+                               TEST_DEBUG("cphs.opname.OperatorName[%s]",cphs.opname.OperatorName);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.opshortform.ShortNameLength[%d]",cphs.opshortform.ShortNameLength);
+                               TEST_DEBUG("cphs.opshortform.OperatorShortName[%s]",cphs.opshortform.OperatorShortName);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.dflagsinfo.DynamicFlags[%d]",cphs.dflagsinfo.DynamicFlags);
+                               TEST_DEBUG(" ============================================");
+                               TEST_DEBUG("cphs.d2flagsinfo.Dynamic2Flag[%d]",cphs.d2flagsinfo.Dynamic2Flag);
+                       } else {
+                               TEST_DEBUG("Current SIM is not CPHS but 3GPP");
+                               TEST_DEBUG(" ============================================");
+
+                       }
+                       TEST_DEBUG(" ============================================");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "getmsisdn", sizeof("getmsisdn") - 1) == 0) {
+               TEST_DEBUG("Get MSISDN INFO ");
+
+               TelSimSubscriberInfo_t msisdn;
+
+               err_code = tel_get_sim_msisdn(&msisdn);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" ============================================");
+                       TEST_DEBUG("name[%s]",msisdn.name);
+                       TEST_DEBUG("num[%s]",msisdn.num);
+                       if (msisdn.name == '\0')
+                               TEST_DEBUG("name is null string");
+
+                       if (msisdn.num == '\0')
+                               TEST_DEBUG("number is null string");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       } else if (memcmp(buf, "pbinit", sizeof("pbinit") - 1) == 0) {
+               TEST_DEBUG("npbinit status");
+
+               int valid_index = 0;
+               TelSimPbList_t pb_list = { 0, };
+               int pPbInitCompleted = 0;
+
+               err_code = tel_get_sim_pb_init_info(&pPbInitCompleted, &pb_list,
+                               &valid_index);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       if (pPbInitCompleted == 0) {
+                               TEST_DEBUG(" SIM PB INIT NOT completed ");
+                       } else {
+                               TEST_DEBUG("SIM PB INIT completed");
+                               /* if no sim records at all then valid_index = 0xFF */TEST_DEBUG("ADN First index is [%d]",valid_index);
+                               TEST_DEBUG("SIM phone book storage list Information ");
+                               TEST_DEBUG("********************************************");
+                               TEST_DEBUG("pb_list.b_fdn[%d]",pb_list.b_fdn);
+                               TEST_DEBUG("pb_list.b_msisdn[%d]",pb_list.b_msisdn);
+                               TEST_DEBUG("pb_list.b_adn[%d]",pb_list.b_adn);
+                               TEST_DEBUG("pb_list.b_sdn[%d]",pb_list.b_sdn);
+                               TEST_DEBUG("pb_list.b_3g[%d]",pb_list.b_3g);
+                               TEST_DEBUG("pb_list.b_aas[%d]",pb_list.b_aas);
+                               TEST_DEBUG("pb_list.b_gas[%d]",pb_list.b_gas);
+
+                               /*
+                                if(pb_list & 0x01)
+                                TEST_DEBUG("ME dialed calls list stored in NV");
+                                if(pb_list & 0x02)
+                                TEST_DEBUG("SIM(or ME) emergency number");
+                                if(pb_list & 0x03)
+                                TEST_DEBUG("SIM fixed-dialing phonebook");
+                                if(pb_list & 0x04)
+                                TEST_DEBUG("SIM last-dialing phonebook");
+                                if(pb_list & 0x05)
+                                TEST_DEBUG("ME missed calls list");
+                                if(pb_list & 0x06)
+                                TEST_DEBUG("ME phonebook");
+                                if(pb_list & 0x07)
+                                TEST_DEBUG("Combined ME and SIM phonebook");
+                                if(pb_list & 0x08)
+                                TEST_DEBUG("SIM(or ME) own numbers ( MSISDNs) list");
+                                if(pb_list & 0x09)
+                                TEST_DEBUG("ME received calls list stored in NV");
+                                if(pb_list & 0x0A)
+                                TEST_DEBUG("2G SIM phonebook");
+                                if(pb_list & 0x0B)
+                                TEST_DEBUG("Service Dialing Number");
+                                if(pb_list & 0x0C)
+                                TEST_DEBUG("3G SIM phonebook");
+                                if(pb_list & 0x0D)
+                                TEST_DEBUG("Incoming Call Information");
+                                if(pb_list & 0x0E)
+                                TEST_DEBUG("Outgoing Call Information");
+                                if(pb_list & 0x0F)
+                                TEST_DEBUG("Additional Number Alpha String");
+                                if(pb_list & 0x10)
+                                TEST_DEBUG("Grouping Information Alpha String");
+                                */
+                               /*
+                                PB_DC  0x01    ME dialed calls list stored in NV
+                                PB_EN  0x02    SIM(or ME) emergency number
+                                PB_FD  0x03    SIM fixed-dialing phonebook
+                                PB_LD  0x04    SIM last-dialing phonebook
+                                PB_MC  0x05    ME missed calls list
+                                PB_ME  0x06    ME phonebook
+                                PB_MT  0x07    Combined ME and SIM phonebook
+                                PB_ON  0x08    SIM(or ME) own numbers ( MSISDNs) list
+                                PB_RC  0x09    ME received calls list stored in NV
+                                PB_SIM 0x0A    2G SIM phonebook
+                                PB_SDN 0x0B    Service Dialing Number
+                                PB_3GSIM       0x0C    3G SIM phonebook
+                                PB_ICI 0x0D    Incoming Call Information
+                                PB_OCI 0x0E    Outgoing Call Information
+                                PB_AAS 0x0F    Additional Number Alpha String
+                                PB_GAS 0x10    Grouping Information Alpha String
+                                */
+
+                               TEST_DEBUG("********************************************");
+                       }
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       }
+
+       //change pin1 number
+       else if (memcmp(buf, "chpin1", sizeof("chpin1") - 1) == 0) {
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_old_pin_val[length];
+               char init_new_pin_val[length];
+
+               memset(&init_old_pin_val, 0, length);
+               memset(&init_new_pin_val, 0, length);
+
+               TelSimSecPw_t old_pin = { 0, };
+               TelSimSecPw_t new_pin = { 0, };
+
+               getchar();
+
+               TEST_DEBUG("Change PIN1 CODE");
+               TEST_DEBUG("Input Current PIN1 Code: ");
+
+               _fgets(init_old_pin_val, 9);
+
+               old_pin.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               old_pin.pw_len = strlen(init_old_pin_val);
+               TEST_DEBUG("pw_len[%d]", old_pin.pw_len);
+               old_pin.pw = (unsigned char*) malloc(length);
+               memcpy(old_pin.pw, init_old_pin_val, length);
+
+               TEST_DEBUG("Input New PIN1 Code: ");
+
+               _fgets(init_new_pin_val, 9);
+
+               new_pin.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               new_pin.pw_len = strlen(init_new_pin_val);
+               TEST_DEBUG("pw_len[%d]", new_pin.pw_len);
+               new_pin.pw = (unsigned char*) malloc(length);
+               memcpy(new_pin.pw, init_new_pin_val, length);
+
+               err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       //change pin2 number
+       else if (memcmp(buf, "chpin2", sizeof("chpin2") - 1) == 0) {
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_old_pin_val[length];
+               char init_new_pin_val[length];
+
+               memset(&init_old_pin_val, 0, length);
+               memset(&init_new_pin_val, 0, length);
+
+               TelSimSecPw_t old_pin = { 0, };
+               TelSimSecPw_t new_pin = { 0, };
+
+               getchar();
+
+               TEST_DEBUG("Change PIN2 CODE");
+               TEST_DEBUG("Input Current PIN2 Code: ");
+
+               _fgets(init_old_pin_val, 9);
+
+               old_pin.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               old_pin.pw_len = strlen(init_old_pin_val);
+               TEST_DEBUG("pw_len[%d]", old_pin.pw_len);
+               old_pin.pw = (unsigned char*) malloc(length);
+               memcpy(old_pin.pw, init_old_pin_val, length);
+
+               TEST_DEBUG("Input New PIN2 Code: ");
+
+               _fgets(init_new_pin_val, 9);
+
+               new_pin.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               new_pin.pw_len = strlen(init_new_pin_val);
+               TEST_DEBUG("pw_len[%d]", new_pin.pw_len);
+               new_pin.pw = (unsigned char*) malloc(length);
+               memcpy(new_pin.pw, init_new_pin_val, length);
+
+               err_code = tel_change_sim_pins(&old_pin, &new_pin, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // unblock CHV and enter new pin code
+       else if (memcmp(buf, "puk1", sizeof("puk1") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("PUK1 verification");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+               char init_puk_val[length];
+
+               TEST_DEBUG("Plese input PUK CODE: ");
+
+               _fgets(init_puk_val, 9);
+
+               TEST_DEBUG("NEW PIN1 CODE: ");
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t puk_data = { 0, };
+               TelSimSecPw_t new_pin_data = { 0, };
+
+               puk_data.type = TAPI_SIM_PTYPE_PUK1; // 0x00
+               puk_data.pw_len = strlen(init_puk_val);
+               TEST_DEBUG("pw_len[%d]", puk_data.pw_len);
+               puk_data.pw = (unsigned char*) malloc(length);
+               memcpy(puk_data.pw, init_puk_val, length);
+
+               new_pin_data.type = TAPI_SIM_PTYPE_PIN1; // 0x00
+               new_pin_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", new_pin_data.pw_len);
+               new_pin_data.pw = (unsigned char*) malloc(length);
+               memcpy(new_pin_data.pw, init_pin_val, length);
+
+               //  sim pin init
+               TEST_DEBUG("PUKtype Value %d",puk_data.type);
+               TEST_DEBUG("PUK Value %s",puk_data.pw);
+               TEST_DEBUG("New Pin Value %s",new_pin_data.pw);
+
+               err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       // unblock CHV2 and enter new pin2 code
+       else if (memcmp(buf, "puk2", sizeof("puk2") - 1) == 0) {
+               getchar();
+
+               TEST_DEBUG("PUK2 verification");
+
+               int length = TAPI_SIM_PIN_LENGTH + 1;
+               char init_pin_val[length];
+               char init_puk_val[length];
+
+               TEST_DEBUG("Plese input PUK2 CODE: ");
+
+               _fgets(init_puk_val, 9);
+
+               TEST_DEBUG("NEW PIN2 CODE: ");
+               _fgets(init_pin_val, 9);
+
+               TelSimSecPw_t puk_data = { 0, };
+               TelSimSecPw_t new_pin_data = { 0, };
+
+               puk_data.type = TAPI_SIM_PTYPE_PUK2; // 0x00
+               puk_data.pw_len = strlen(init_puk_val);
+               TEST_DEBUG("pw_len[%d]", puk_data.pw_len);
+               puk_data.pw = (unsigned char*) malloc(length);
+               memcpy(puk_data.pw, init_puk_val, length);
+
+               new_pin_data.type = TAPI_SIM_PTYPE_PIN2; // 0x00
+               new_pin_data.pw_len = strlen(init_pin_val);
+               TEST_DEBUG("pw_len[%d]", new_pin_data.pw_len);
+               new_pin_data.pw = (unsigned char*) malloc(length);
+               memcpy(new_pin_data.pw, init_pin_val, length);
+
+               //  sim pin init
+               TEST_DEBUG("PUKtype Value %d",puk_data.type);
+               TEST_DEBUG("PUK Value %s",puk_data.pw);
+               TEST_DEBUG("New Pin Value %s",new_pin_data.pw);
+
+               err_code = tel_verify_sim_puks(&puk_data, &new_pin_data, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "mepers", sizeof("mepers") - 1) == 0) {
+               int tempi;
+               char dummy;
+
+               TelSimPersPw_t lock_pers = { 0, };
+
+               printf("------------------------------ \n");
+               printf("Personalization Type : \n");
+               printf("------------------------------ \n");
+               printf("1 - Network  \n");
+               printf("2 - Network Subset \n");
+               printf("3 - Service Provider \n");
+               printf("4 - Corporate \n");
+               printf("------------------------------ \n");
+
+               printf("\nPlease input type: \n");
+               scanf("%d%c", &tempi, &dummy);
+
+               switch (tempi) {
+               case 1: {
+                       lock_pers.type = TAPI_SIM_PERS_NET;
+               }
+                       break;
+
+               case 2: {
+                       lock_pers.type = TAPI_SIM_PERS_NS;
+               }
+                       break;
+
+               case 3: {
+                       lock_pers.type = TAPI_SIM_PERS_SP;
+               }
+                       break;
+
+               case 4: {
+                       lock_pers.type = TAPI_SIM_PERS_CP;
+               }
+                       break;
+
+               default: {
+                       printf("wrong pers type! exit!\n");
+                       exit(1);
+               }
+                       break;
+               }
+
+               switch (lock_pers.type) {
+               case TAPI_SIM_PERS_NET: {
+                       puts("Flushing input - Enter \\n to exit! ");
+
+                       while ((ch = getchar()) != '\n' && ch != EOF)
+                               ;
+
+                       printf("Lock Personalisation MCC+MNC 5\n");
+                       printf(
+                                       "Plese input Network Lock CODE : length of MCC+MNC, MCC, MNC, NCK\n");
+                       printf(
+                                       "We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), NCK(12345678) => 54500112345678\n");
+
+                       int length = 14 + 1;
+                       char init_password_val[length];
+                       _fgets(init_password_val, 15);
+
+                       lock_pers.pw_len = 14;
+                       lock_pers.pw = (unsigned char*) malloc(length);
+                       memcpy(lock_pers.pw, init_password_val, length);
+
+               }
+                       break;
+
+               case TAPI_SIM_PERS_NS: {
+                       puts("Flushing input - Enter \\n to exit! ");
+
+                       while ((ch = getchar()) != '\n' && ch != EOF)
+                               ;
+
+                       printf(
+                                       "Network Subset Personalisation MCC+MNC 5 byte, subset 2byte \n");
+                       printf(
+                                       "We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), lengthof NSP(2), NSP(11) NSPCK(12345678) => 54500121112345678\n");
+
+                       int length = 17 + 1;
+                       char init_password_val[length];
+                       _fgets(init_password_val, 18);
+
+                       lock_pers.pw_len = 17;
+                       lock_pers.pw = (unsigned char*) malloc(length);
+                       memcpy(lock_pers.pw, init_password_val, length);
+               }
+                       break;
+
+               case TAPI_SIM_PERS_SP: {
+                       puts("Flushing input - Enter \\n to exit! ");
+
+                       while ((ch = getchar()) != '\n' && ch != EOF)
+                               ;
+
+                       printf(
+                                       "Service Provider Personalisation MCC+MNC 5 byte, SP 2byte \n");
+                       printf(
+                                       "We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), SP(11) SPCK(12345678) => 5450011112345678\n");
+
+                       int length = 16 + 1;
+                       char init_password_val[length];
+                       _fgets(init_password_val, 17);
+
+                       lock_pers.pw_len = 16;
+                       lock_pers.pw = (unsigned char*) malloc(length);
+                       memcpy(lock_pers.pw, init_password_val, length);
+               }
+                       break;
+
+               case TAPI_SIM_PERS_CP: {
+                       puts("Flushing input - Enter \\n to exit! ");
+
+                       while ((ch = getchar()) != '\n' && ch != EOF)
+                               ;
+
+                       printf(
+                                       "Corporate Personalisation MCC+MNC 5 byte, SP 2byte CP 2byte \n");
+                       printf(
+                                       "We need to use this for testing : length of MCC+MNC(5), MCC(450), MNC(01), SP(11) CP(11) CPCK(12345678) => 545001111112345678\n");
+
+                       int length = 18 + 1;
+                       char init_password_val[length];
+                       _fgets(init_password_val, 19);
+
+                       lock_pers.pw_len = 18;
+                       lock_pers.pw = (unsigned char*) malloc(length);
+                       memcpy(lock_pers.pw, init_password_val, length);
+               }
+                       break;
+
+               default: {
+                       printf("wrong condition exit\n");
+                       exit(1);
+               }
+                       break;
+               }
+
+               err_code = tel_enable_sim_personalization(&lock_pers, &request_id);
+               printf("Error Code [%x]\n", err_code);
+
+       }
+
+       if (memcmp(buf, "medepers", sizeof("medepers") - 1) == 0) {
+               int tempi;
+               char dummy;
+
+               TelSimPersPw_t lock_pers = { 0, };
+
+               printf("------------------------------ \n");
+               printf("de-Personalization Type : \n");
+               printf("------------------------------ \n");
+               printf("1 - Network  \n");
+               printf("2 - Network Subset \n");
+               printf("3 - Service Provider \n");
+               printf("4 - Corporate \n");
+               printf("------------------------------ \n");
+
+               printf("\nPlease input type: \n");
+               scanf("%d%c", &tempi, &dummy);
+
+               switch (tempi) {
+               case 1: {
+                       lock_pers.type = TAPI_SIM_PERS_NET;
+               }
+                       break;
+
+               case 2: {
+                       lock_pers.type = TAPI_SIM_PERS_NS;
+               }
+                       break;
+
+               case 3: {
+                       lock_pers.type = TAPI_SIM_PERS_SP;
+               }
+                       break;
+
+               case 4: {
+                       lock_pers.type = TAPI_SIM_PERS_CP;
+               }
+                       break;
+
+               default: {
+                       printf("wrong pers type! exit!\n");
+                       exit(1);
+               }
+                       break;
+               }
+
+               puts("Flushing input - Enter \\n to exit! ");
+
+               while ((ch = getchar()) != '\n' && ch != EOF)
+                       ;
+
+               printf("de Personalisation key is 8 byte \n");
+               printf("We need to use this for testing : 12345678\n");
+
+               int length = 8 + 1;
+               char init_password_val[length];
+               _fgets(init_password_val, 9);
+
+               lock_pers.pw_len = 8 /*control key*/;
+               lock_pers.pw = (unsigned char*) malloc(length);
+               memcpy(lock_pers.pw, init_password_val, length);
+
+               err_code = tel_disable_sim_personalization(&lock_pers, &request_id);
+
+               printf("Error Code [%x]\n", err_code);
+
+       }
+
+       if (memcmp(buf, "getpers", sizeof("getpers") - 1) == 0) {
+               int tempi = 0;
+               char dummy = 0;
+
+               TelSimPersType_t type = 0;
+
+               puts("Flushing input - Enter \\n to exit! ");
+
+               while ((ch = getchar()) != '\n' && ch != EOF)
+                       ;
+
+               printf("getpers status\n");
+               printf("Here - 1\n");
+               printf(
+                               "================================================================ \n");
+               printf("TAPI_SIM_PERS_NET               = 0x00, /**< Network Lock */ \n");
+               printf("TAPI_SIM_PERS_NS                = 0x01, /**< Nettwork Subset Lock */\n");
+               printf("TAPI_SIM_PERS_SP                = 0x02, /**< Service Provider Lock */\n");
+               printf("TAPI_SIM_PERS_CP                = 0x03, /**< Coporate Lock */\n");
+               printf(
+                               "================================================================ \n");
+               printf("Plese input Lock type \n");
+
+               scanf("%d%c", &tempi, &dummy);
+               type = tempi;
+
+               err_code = tel_get_sim_personalization_status(type, &request_id);
+               printf("Error Code [%x]\n", err_code);
+
+       } else if (memcmp(buf, "setlang", sizeof("setlang") - 1) == 0) {
+               int tempi;
+               char dummy;
+
+               TelSimLanguagePreferenceCode_t language = 0x00;
+
+               printf("------------------------------ \n");
+               printf("select language which will be updated: \n");
+               printf("------------------------------ \n");
+               printf("should select inside here ( 0.DE / 1.EN / 2.IT / 3.FR ) \n");
+               printf(
+                               "should select inside here ( 4.SPANISH / 5.DUTCH / 6.SWEDISH / 7.DANISH ) \n");
+               printf(
+                               "should select inside here ( 8.PORTUGUESE / 9.FINNISH / 10.NORWEGIAN / 11.GREEK ) \n");
+               printf(
+                               "should select inside here ( 12.TURKISH / 13.HUNGARIAN / 14.POLISH / 15.KOREAN ) \n");
+               printf(
+                               "should select inside here ( 16.CHINESE / 17.RUSSIAN / 18.JAPANESE ) \n");
+               printf("------------------------------ \n");
+
+               printf("\nPlease input type: \n");
+               scanf("%d%c", &tempi, &dummy);
+
+               language = (TelSimLanguagePreferenceCode_t) tempi;
+
+               err_code = tel_set_sim_language(language, &request_id);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API SUCCESS");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "apdu", sizeof("apdu") - 1) == 0) {
+               printf("------------------------------ \n");
+               printf("APDU\n");
+               printf("------------------------------ \n");
+
+               TelSimApdu_t apdu_data = { 0, };
+
+               char tmp_apdu[4] = { 0x41, 0xC0, 0x05, 0x6f };
+
+               apdu_data.apdu_len = 4;
+               apdu_data.apdu = (unsigned char*) &tmp_apdu;
+
+               err_code = tel_req_sim_apdu(&apdu_data, &request_id);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API SUCCESS");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "atr", sizeof("atr") - 1) == 0) {
+               printf("------------------------------ \n");
+               printf("ATR request: \n");
+               printf("------------------------------ \n");
+
+               err_code = tel_req_sim_atr(&request_id);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API SUCCESS");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       }
+
+       ////////////////////////////////////////////////////////////////////////
+       ///////////////////////  Phone Book ///////////////////////////////////
+       ///////////////////////////////////////////////////////////////////////
+       else if (memcmp(buf, "pbcapa", sizeof("pbcapa") - 1) == 0) {
+               TEST_DEBUG("PB capability info");
+
+               err_code = tel_get_sim_pb_3g_meta_info(&request_id);
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "pbcnt", sizeof("pbcnt") - 1) == 0) {
+               TEST_DEBUG("PB storage count info");
+
+               TelSimPbFileType_t storage_type = __InputStorageType();
+
+               __PrintStorageType(storage_type);
+
+               err_code = tel_get_sim_pb_count(storage_type, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "pbentry", sizeof("pbentry") - 1) == 0) {
+               TEST_DEBUG("PB Entry info");
+
+               TelSimPbFileType_t storage_type = __InputStorageType();
+
+               err_code = tel_get_sim_pb_meta_info(storage_type, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       ///////////////////////////////////
+       /*
+        0x01 : ADD
+        0x02 : DELETE
+        0x03 : EDIT
+        0x04 : WRITE (�ش� index�� data ������ ������ unconditional write)
+        0x05 : DELETE ALL (�ش� phone book id�� ���� �����ϴ� ��� �����͸� delete)
+        */
+       else if (memcmp(buf, "pbadd", sizeof("pbadd") - 1) == 0) {
+               TelSimPbRecordData_t pb_add = { 0, };
+               char dummy;
+               char unicode_text[256];
+               int unicode_text_len = 0;
+               int index = 0;
+
+               TelSimPbFileType_t storage_type = __InputStorageType();
+               pb_add.StorageFileType = storage_type;
+
+               TEST_DEBUG("Plese input index : ");
+               scanf("%d%c", &index, &dummy);
+               pb_add.Index = index;
+
+               if (pb_add.StorageFileType == TAPI_SIM_PB_EN || pb_add.StorageFileType
+                               == TAPI_SIM_PB_FDN || pb_add.StorageFileType
+                               == TAPI_SIM_PB_MSISDN || pb_add.StorageFileType
+                               == TAPI_SIM_PB_LDN || pb_add.StorageFileType == TAPI_SIM_PB_ADN
+                               || pb_add.StorageFileType == TAPI_SIM_PB_SDN) {
+                       int tmpInput;
+                       TEST_DEBUG("2g phone book entry");
+
+                       TEST_DEBUG(" Number Types are below ");
+                       TEST_DEBUG(" 1 - INTERNATIONAL");
+                       TEST_DEBUG(" 2 - NATIONAL");
+                       TEST_DEBUG(" 3 - NETWORK");
+                       TEST_DEBUG(" 4 - DEDICATE");
+                       TEST_DEBUG("Select Numer Type: ");
+
+                       scanf("%d%c", &tmpInput, &dummy);
+                       pb_add.ContactInfo.Pb2GData.NumType = tmpInput;
+
+                       TEST_DEBUG("Plese input contact number : ");
+                       _fgets((char *) pb_add.ContactInfo.Pb2GData.Number, 15);
+                       pb_add.ContactInfo.Pb2GData.NumLen = strlen(
+                                       (char*) pb_add.ContactInfo.Pb2GData.Number);
+
+                       TEST_DEBUG(" Encryption Types are below ");
+                       TEST_DEBUG(" 1 - ASCII - DO NOT SUPPORT");
+                       TEST_DEBUG(" 2 - GSM7 Bit");
+                       TEST_DEBUG(" 3 - UCS2");
+                       TEST_DEBUG(" 4 - HEX - DO NOT SUPPORT");
+                       TEST_DEBUG("Select Text Encryption Type: ");
+
+                       scanf("%d%c", &tmpInput, &dummy);
+                       pb_add.ContactInfo.Pb2GData.NameEncryptType = tmpInput - 1;
+
+                       TEST_DEBUG("Plese input contact name : ");
+                       _fgets((char *) pb_add.ContactInfo.Pb2GData.Name, 20);
+
+                       if (pb_add.ContactInfo.Pb2GData.NameEncryptType
+                                       == TAPI_SIM_TEXT_ENC_UCS2) {
+                               TEST_DEBUG("TAPI_SIM_TEXT_ENC_UCS2 Encoding");
+                               /* unicode encoding */
+                               if (FALSE == __encode_text_unicode(
+                                               strlen((char *) pb_add.ContactInfo.Pb2GData.Name),
+                                               (char*) pb_add.ContactInfo.Pb2GData.Name,
+                                               (char *) &unicode_text_len, unicode_text)) {
+                                       TEST_DEBUG("Encoding failed ! ");
+
+                               } else {
+                                       pb_add.ContactInfo.Pb2GData.NameLen = unicode_text_len;
+                                       memcpy(pb_add.ContactInfo.Pb2GData.Name, unicode_text,
+                                                       unicode_text_len);
+                               }
+                       } else {
+                               pb_add.ContactInfo.Pb2GData.NameLen = strlen(
+                                               (char *) pb_add.ContactInfo.Pb2GData.Name);
+                       }
+               } else if (pb_add.StorageFileType == TAPI_SIM_PB_3GSIM) {
+                       int tempi;
+                       char num_field_type;
+                       int i = 0;
+
+                       TEST_DEBUG("3g phone book entry");
+
+                       TEST_DEBUG("Input Nuumber of fields to be entered: ");
+
+                       scanf("%d%c", &tempi, &dummy);
+
+                       num_field_type = tempi;
+
+                       pb_add.ContactInfo.Pb3GData.FileTypeCount = num_field_type;
+
+                       for (i = 0; i < num_field_type; i++) {
+                               TEST_DEBUG(" Field Types are below ");
+                               TEST_DEBUG(" 1 - Contact Name : (EF_ADN)");
+                               TEST_DEBUG(" 2 - Contact Mobile Number (EF_ADN)");
+                               TEST_DEBUG(" 3 - Contact Another Number (EF_ANR)");
+                               TEST_DEBUG(" 4 - Contact Email (EF_EMAIL)");
+                               TEST_DEBUG(" 5 - Contact Nick Name (EF_SNE)");
+                               TEST_DEBUG(" 6 - Contact Group (EF_GRP)");
+                               TEST_DEBUG(" 7 - Contact Hidden entry (EF_PBC) - NOT SUPPORT YET");
+                               TEST_DEBUG(" 8 - Contact Another Number A (EF_ANRA)");
+                               TEST_DEBUG(" 9 - Contact Another Number B (EF_ANRB)");
+
+                               TEST_DEBUG("Select Field type: ");
+
+                               scanf("%d%c", &tempi, &dummy);
+
+                               pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileType = tempi;
+
+                               if (tempi == 1 || tempi == 4 || tempi == 5 || tempi == 6) {
+                                       TEST_DEBUG(" Encryption Types are below ");
+                                       TEST_DEBUG(" 1 - ASCII");
+                                       TEST_DEBUG(" 2 - GSM7 Bit");
+                                       TEST_DEBUG(" 3 - UCS2");
+                                       TEST_DEBUG(" 4 - HEX");
+                                       TEST_DEBUG("Select Text Encryption Type: ");
+
+                                       scanf("%d%c", &tempi, &dummy);
+                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.EncryptionType
+                                                       = tempi - 1;
+
+                               } else {
+                                       TEST_DEBUG(" Number Types are below ");
+                                       TEST_DEBUG(" 1 - INTERNATIONAL");
+                                       TEST_DEBUG(" 2 - NATIONAL");
+                                       TEST_DEBUG(" 3 - NETWORK");
+                                       TEST_DEBUG(" 4 - DEDICATE");
+                                       TEST_DEBUG("Select Numer Type: ");
+
+                                       scanf("%d%c", &tempi, &dummy);
+                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.NumType
+                                                       = tempi;
+                               }
+
+                               if (pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                               == TAPI_PB_3G_GRP) {
+                                       int c, count, k = 0;
+
+                                       TEST_DEBUG("Please input number of index to add in GRP");
+                                       scanf("%d%c", &tempi, &dummy);
+
+                                       count = tempi;
+                                       for (c = 0; c < count; c++) {
+                                               TEST_DEBUG("Please input index of GRP: ");
+                                               scanf("%d%c", &tempi, &dummy);
+
+                                               pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData[k]
+                                                               = tempi;
+                                               k++;
+                                               //pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData[k] = 0;
+                                               //k++;
+                                       }
+                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength
+                                                       = count;
+                               } else if (pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                               == TAPI_PB_3G_NAME
+                                               || pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                               == TAPI_PB_3G_EMAIL
+                                               || pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileType
+                                                               == TAPI_PB_3G_SNE) {
+                                       TEST_DEBUG("Plese input  field string data: ");
+                                       _fgets(
+                                                       (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                       30);
+
+                                       TEST_DEBUG("strlen about input data[%d]",strlen((char *)pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData) );
+
+                                       if (pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataType.EncryptionType
+                                                       == TAPI_SIM_TEXT_ENC_UCS2) {
+                                               /* unicode encoding */
+                                               if (FALSE
+                                                               == __encode_text_unicode(
+                                                                               strlen(
+                                                                                               (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData),
+                                                                               (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                                               (char *) &unicode_text_len,
+                                                                               unicode_text)) {
+                                                       TEST_DEBUG("Encoding failed ! ");
+                                               } else {
+                                                       memcpy(
+                                                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                                       unicode_text, unicode_text_len);
+                                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength
+                                                                       = unicode_text_len;
+                                               }
+                                       } else {
+                                               pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength
+                                                               = strlen(
+                                                                               (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData);
+                                       }
+                               } else {
+                                       TEST_DEBUG("Plese input  field data: ");
+                                       _fgets(
+                                                       (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData,
+                                                       20);
+                                       pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileDataLength
+                                                       = strlen(
+                                                                       (char *) pb_add.ContactInfo.Pb3GData.PbFileDataInfo[i].FileData);
+                               }
+
+                       }
+
+               } else if (pb_add.StorageFileType == TAPI_SIM_PB_AAS
+                               || pb_add.StorageFileType == TAPI_SIM_PB_GAS) {
+                       TEST_DEBUG("additional num Alpha string or Group Alpha string ");
+
+                       TEST_DEBUG("Plese input Alpha name : ");
+                       _fgets(
+                                       (char *) pb_add.ContactInfo.PbAdditionalNumStringData.TextData,
+                                       20);
+#if 0
+                       /* GSM 7bit conversion */
+                       __encode_gsm_7_bit_chars(strlen((char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData) ,
+                                       (char *)pb_add.ContactInfo.PbAdditionalNumStringData.TextData, (char *)&unicode_text_len, unicode_text);
+
+                       memcpy(pb_add.ContactInfo.PbAdditionalNumStringData.TextData, unicode_text, unicode_text_len );
+
+                       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength = unicode_text_len;
+
+                       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType = TAPI_SIM_TEXT_ENC_GSM7BIT; // always 2 for GAS and AAS
+#endif
+                       pb_add.ContactInfo.PbAdditionalNumStringData.TextLength
+                                       = strlen(
+                                                       (char *) pb_add.ContactInfo.PbAdditionalNumStringData.TextData);
+                       pb_add.ContactInfo.PbAdditionalNumStringData.EncryptionType
+                                       = TAPI_SIM_TEXT_ENC_GSM7BIT; // But real type is ASCII (because current GSM7 is GSM7 with bit 8 set to '0')
+
+               } else {
+                       TEST_DEBUG("Undefined Storage File Type [0x%x]", pb_add.StorageFileType);
+
+               }
+
+               err_code = tel_update_sim_pb_record(&pb_add, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "pbdel", sizeof("pbdel") - 1) == 0) {
+               TelSimPbFileType_t storage_type = __InputStorageType();
+
+               TEST_DEBUG(" PB delete ");
+
+               unsigned short index = 0;
+               char dummy = 0;
+               TEST_DEBUG("Plese input index : ");
+               scanf("%d%c", (int *)&index, &dummy);
+
+               err_code = tel_delete_sim_pb_record(storage_type, index, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+
+       } else if (memcmp(buf, "pbread", sizeof("pbread") - 1) == 0) {
+               TEST_DEBUG("PB read");
+
+               unsigned short index = 0;
+               char dummy = 0;
+
+               TelSimPbFileType_t storage_type = __InputStorageType();
+
+               TEST_DEBUG("Plese input index : ");
+               scanf("%d%c", (int *)&index, &dummy);
+
+               err_code = tel_read_sim_pb_record(storage_type, index, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "isimauth", sizeof("isimauth") - 1) == 0) {
+               TEST_DEBUG("ISIM Authentication ");
+
+               getchar();
+
+               TelSimIsimAuthenticationData_t auth_req = { 0, };
+
+               memset(&auth_req, 0, sizeof(TelSimIsimAuthenticationData_t));
+
+               TEST_DEBUG(" Enter  RAND data ");
+               _fgets((char *) &auth_req.RandomAccessData, 20);
+
+               auth_req.RandomAccessLength
+                               = strlen((char *) auth_req.RandomAccessData);
+
+               TEST_DEBUG(" Enter Authentication  data ");
+               _fgets((char *) &auth_req.AuthData, 20);
+
+               auth_req.AuthDataLength = strlen((char *) auth_req.AuthData);
+
+               TEST_DEBUG("TelTapiSimIsimAuthenticationRequest is not tested yet!");
+               /*
+                err_code = TelTapiSimIsimAuthenticationRequest( &auth_req, &request_id);
+
+                if(err_code == TAPI_API_SUCCESS)
+                {
+                TEST_DEBUG("TAPI API SUCCESS");
+                }
+                else
+                {
+                TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+                }
+                */
+
+       }
+
+       else if (memcmp(buf, "sapcon", sizeof("sapcon") - 1) == 0) {
+               TEST_DEBUG("SAP Connect request  ");
+               TelSimSapConnect_t con_req = { 0, };
+               con_req.MsgId = TAPI_SIM_SAP_CONNECT_REQ;
+               con_req.MaxMsgSize = 10; //temp for testing only - not clear
+
+               err_code = tel_req_sap_connection(&con_req, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapdiscon", sizeof("sapdiscon") - 1) == 0) {
+               TEST_DEBUG("SAP Disconnect request  ");
+               TelSimSapConnect_t con_req = { 0, };
+               con_req.MsgId = TAPI_SIM_SAP_DISCONNECT_REQ;
+               con_req.MaxMsgSize = 10; //temp for testing only - not clear
+
+               err_code = tel_req_sap_connection(&con_req, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapstatus", sizeof("sapstatus") - 1) == 0) {
+               TEST_DEBUG("SAP Status request  ");
+
+               err_code = tel_req_sap_connection_status(&request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapatr", sizeof("sapatr") - 1) == 0) {
+               TEST_DEBUG("SAP ATR request  ");
+
+               err_code = tel_req_sap_transfer_atr(&request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapapdu", sizeof("sapapdu") - 1) == 0) {
+               TEST_DEBUG("SAP APDU transfer  ");
+
+               int file_id = TAPI_SIM_EFILE_ICCID;
+
+               /* for selecting EF ICCID */
+               TelSimSapApduData_t apdu_data;
+
+               apdu_data.ApduLength = 7;
+               apdu_data.Apdu[0] = 0xA0; // class
+               apdu_data.Apdu[1] = 0xA4; // instruction
+               apdu_data.Apdu[2] = 0; // p1 = parameter 1
+               apdu_data.Apdu[3] = 0; // p2 = parameter 2
+               apdu_data.Apdu[4] = 2; // p3 - parameter 3
+
+               memcpy(&apdu_data.Apdu[5], &file_id, sizeof(unsigned short));
+
+               err_code = tel_req_sap_transfer_apdu(&apdu_data, &request_id);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API SUCCESS");
+               } else {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapsetproto", sizeof("sapsetproto") - 1) == 0) {
+               TEST_DEBUG("SAP set protocol ");
+               TelSimSapProtocol_t protocol = TAPI_SIM_SAP_PROTOCOL_T0;
+
+               err_code = tel_req_sap_transport_protocol(protocol, &request_id);
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       else if (memcmp(buf, "sapsimpwr", sizeof("sapsimpwr") - 1) == 0) {
+               int tempi = 0;
+               TelSimSapMsgId_t msdId = 0;
+
+               char dummy = 0;
+
+               TEST_DEBUG("SAP SIM power  ");
+
+               TEST_DEBUG("Please input SAP SIM power on(1) / off(!1): ");
+
+               scanf("%d%c", &tempi, &dummy);
+               if (tempi == 1)
+                       msdId = TAPI_SIM_SAP_POWER_SIM_ON_REQ;
+               else
+                       msdId = TAPI_SIM_SAP_POWER_SIM_OFF_REQ;
+
+               err_code = tel_req_sap_power_operation(msdId, &request_id);// only for testing
+
+               if (err_code != TAPI_API_SUCCESS) {
+                       TEST_DEBUG("TAPI API FAIL: Error Code [0x%x]",err_code);
+               }
+       }
+
+       if (memcmp(buf, "close", sizeof("close") - 1) == 0) {
+               TEST_DEBUG(" close reuqest ");
+
+               //      err_code = tapi_sim_close(92);
+
+               //err_code = tapi_sim_close(g_test_hsim);
+               TEST_DEBUG(" ret value from close [0x%x]", err_code);
+
+               if (err_code == TAPI_API_SUCCESS) {
+                       TEST_DEBUG(" sim close OK!");
+               } else {
+                       TEST_DEBUG(" SIM close request returned error [0x%x] !",err_code );
+               }
+               TEST_DEBUG("Request ID [0x%x]", request_id);
+       }
+
+       if (memcmp(buf, "q", sizeof("q") - 1) == 0) {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu");
+               return -1;
+               //exit(0);
+       }
+
+       return 0;
+}
+
+void sim_select_loop(void) {
+       int ret;
+       fd_set readfds;
+
+       while (1) {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret) {
+
+                       if (FD_ISSET(0, &readfds)) {
+                               if (sim_read_key_input() < 0)
+                                       break;
+                       }
+               }
+       }
+}
+
+void* sim_test_thread_loop(void* data) {
+       TEST_DEBUG(" sim_test_thread_loop : called...");
+
+       sim_select_loop();
+
+       TEST_DEBUG(" sim_test_thread_loop : stdin Loop exited");
+
+       pthread_exit(NULL);
+}
+
+int sim_main(int argc, char *argv[]) {
+       pthread_t p_thread;
+
+       p_thread = pthread_create(&p_thread, NULL, sim_test_thread_loop, NULL);
+
+       if (p_thread != 0) {
+               TEST_DEBUG("Failed while creating a thread to read from stdin");
+               return -1;
+       } else {
+               TEST_DEBUG("A thread was created to read from stdin ..");
+       }
+
+       sim_test_subscribe_tapi_events();
+
+       pthread_join(p_thread, NULL);
+
+       TEST_DEBUG("Exiting sim test program bye bye !");
+
+       return 0;
+}
+
diff --git a/src/test_apps/tapi_sms_test.c b/src/test_apps/tapi_sms_test.c
new file mode 100644 (file)
index 0000000..ac25704
--- /dev/null
@@ -0,0 +1,2713 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <glib.h>
+#include <string.h>
+#include <unistd.h>
+#include <assert.h>
+#include <glib.h>
+
+#include "TelUtility.h"
+#include <TapiCommon.h>
+#include <TelNetText.h>
+#include <ITapiNetText.h>
+
+#include "tapi_test_utility.h"
+#include "tapi_sms_test.h"
+
+/******* prototype ******* */
+#include "tapi_sms_util.h"
+
+#define        TAPI_NETTEXT_MSG_SIZE_MAX                               918
+#define        TAPI_NETTEXT_CB_SIZE_MAX                                93
+#define        TAPI_NETTEXT_ADDRESS_LEN_MAX                    20
+#define        TAPI_NETTEXT_SCADDRESS_LEN_MAX                  18
+
+#define TEST_DEBUG(frmt, args...)      \
+{do { fprintf(stderr, "[SMS Test][%s:%04d] "frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+// Global Variable
+static unsigned int *  SMS_subscription_id;
+int                                    dcs_pos =0;
+unsigned int                   SmsMsgId = 0;
+
+// same as tapievent
+typedef struct
+{
+       int group;
+       int type;
+       int requestid;
+       int status;
+       void *dst;
+}data_t;
+
+//extern int EvtDeliveryHandle ;
+//int error_code;
+
+TS_UINT8 tp_mr = 0x00;
+
+
+BOOL EncodeCdmaSmsParamTeleservice(int teleservice_id ,ParamTeleserv_t *ParamTeleserv)
+{
+       BOOL ret = FALSE;
+
+       if(ParamTeleserv == NULL){
+               printf("[EncodeCdmaSmsParamTeleservice] NULL pointer  \n");
+               return ret;
+       }
+
+       switch(teleservice_id){
+               case TELESERVICEID_CPT95:
+               case TELESERVICEID_CMT95:
+               case TELESERVICEID_VMN95:
+               case TELESERVICEID_WAP:
+                       ret = TRUE;
+                       break;
+               default:
+                       ret = FALSE;
+       }
+
+       if(ret == TRUE){
+               ParamTeleserv->param_id = PARAMID_TELESERVICE_ID;
+               ParamTeleserv->param_len = 2;
+               ParamTeleserv->teleserv_id = teleservice_id;
+       }
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamDestAddress(int NumberPlan, char* diallingNum ,ParamAddress_t *ParamAddr)
+{
+       BOOL ret = FALSE;
+       int length = 0;
+
+       if(ParamAddr == NULL || diallingNum == NULL){
+               printf("[EncodeCdmaSmsParamAddress] NULL pointer  \n");
+               return ret;
+       }
+
+       length = strlen(diallingNum); //remove CR
+
+       ParamAddr->param_id = PARAMID_ADDRESS;
+       ParamAddr->len = length;
+       ParamAddr->digit = DIGITMODE_4BITDTMF;
+       ParamAddr->num = NUMMODE_NONE_DATANETWORK;
+       ParamAddr->numtype = NUMBER_TYPE_UNKNOWN;
+       ParamAddr->numplan = NumberPlan;
+
+       strncpy((char *)ParamAddr->CHARi, diallingNum, length);
+
+       length +=5;
+       ParamAddr->param_len = length;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamCallbackAddress(int NumberPlan, char* diallingNum ,ParamCallback_t *ParamCallback)
+{
+       BOOL ret = FALSE;
+       int length = 0;
+
+       if(ParamCallback == NULL || diallingNum == NULL){
+               printf("[EncodeCdmaSmsParamAddress] NULL pointer  \n");
+               return ret;
+       }
+
+       length = strlen(diallingNum); //remove CR
+
+
+       ParamCallback->param_id = PARAMID_CALLBACK;
+       ParamCallback->digit = DIGITMODE_4BITDTMF;
+       ParamCallback->numtype = NUMBER_TYPE_UNKNOWN;
+       ParamCallback->numplan = NumberPlan;
+       ParamCallback->len = length;
+       strncpy((char *)ParamCallback->CHARi, diallingNum, length);
+
+       length +=4;
+       ParamCallback->param_len = length;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamMsgId(int type, ParamMsgId_t *ParamMsg)
+{
+       BOOL ret = FALSE;
+
+       if(ParamMsg == NULL){
+               printf("[EncodeCdmaSmsParamMsgId] NULL pointer  \n");
+               return ret;
+       }
+
+       ParamMsg->param_id = PARAMID_MESSAGE_ID;
+       ParamMsg->param_len =3;
+       ParamMsg->type = type;
+       ParamMsg->msg_id = SmsMsgId++;
+
+
+       ret = TRUE;
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsParamUserData(char* SendTxt, ParamUserData_t *ParamUser)
+{
+       BOOL ret = FALSE;
+       int length = 0;
+
+       if(ParamUser == NULL || SendTxt == NULL){
+               printf("[EncodeCdmaSmsParamUserData] NULL pointer  \n");
+               return ret;
+       }
+
+       length = strlen(SendTxt);
+
+       ParamUser->param_id = PARAMID_USER_DATA;
+       ParamUser->encoding = MSGENCODING_7BIT_ASCII;
+       strncpy((char *)ParamUser->CHARi, SendTxt, length);
+
+       ParamUser->len =  length;
+       length += 2;;
+       ParamUser->param_len = length;
+
+       ret = TRUE;
+
+       return ret;
+}
+
+BOOL EncodeCdmaSmsSubmitTpdu(char* diallingNum, int dialNumLen, char* msgTxt, int msg_len)
+{
+       ParamTeleserv_t ParamTeleserv = {0, };
+       ParamAddress_t ParamAddr = {0, };
+       //ParamCallback_t Paramcallback = {0, };
+       ParamMsgId_t ParamMsg = {0, };
+       ParamUserData_t ParamUser = {0, };
+
+       int i;
+       int requestId = 0;
+       //char CallbackNum[] = "1117908499";
+       TapiResult_t returnStatus;
+
+       TEST_DEBUG("EncodeCdmaSmsSubmitTpdu Func Enter");
+
+       TelSmsMsgInfo_t *pDataPackage = malloc(sizeof(TelSmsMsgInfo_t));
+       memset(pDataPackage, 0, sizeof(TelSmsMsgInfo_t));
+
+       pDataPackage->MsgType = TAPI_NETTEXT_MESSAGETYPE_SUBMIT;
+
+       //1 TeleService Identifier
+       EncodeCdmaSmsParamTeleservice(TELESERVICEID_CMT95, &ParamTeleserv);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_TELESERVICE_MASK;
+       memcpy(&pDataPackage->MsgData.OutSubmit.TeleService, &ParamTeleserv.teleserv_id, sizeof(unsigned short));
+       TEST_DEBUG("teleservice at TEST APP: 0x%x", pDataPackage->MsgData.OutSubmit.TeleService);
+
+       //1 Destination Address
+       diallingNum[dialNumLen] = '\0';
+       EncodeCdmaSmsParamDestAddress(NUMBER_PLAN_UNKNOWN, diallingNum, &ParamAddr);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_ADDRESS_MASK;
+       pDataPackage->MsgData.OutSubmit.DstAddr.Digit = ParamAddr.digit;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberMode = ParamAddr.num;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberType = ParamAddr.numtype;
+       pDataPackage->MsgData.OutSubmit.DstAddr.NumberPlan = ParamAddr.numplan;
+       pDataPackage->MsgData.OutSubmit.DstAddr.szAddrLength = ParamAddr.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.DstAddr.szAddress, ParamAddr.CHARi, ParamAddr.len);
+
+       //1  Message Identifier
+       EncodeCdmaSmsParamMsgId(MESSAGETYPE_SUBMIT, &ParamMsg);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_MESSAGE_ID_MASK;
+       pDataPackage->MsgData.OutSubmit.MsgId = ParamMsg.type;
+       pDataPackage->MsgType = ParamMsg.type;
+
+       //1  bearer
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_BEARER_REPLY_MASK;
+       pDataPackage->MsgData.OutSubmit.ReplySeqNumber = 1;
+
+#if 0
+       //1 Callback Address
+       EncodeCdmaSmsParamCallbackAddress(NUMBER_PLAN_UNKNOWN, CallbackNum, &Paramcallback);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_CALLBACK_MASK;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.Digit = Paramcallback.digit;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.NumberType = Paramcallback.numtype;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.NumberPlan = Paramcallback.numplan;
+       pDataPackage->MsgData.OutSubmit.CallBackNumber.szAddrLength = Paramcallback.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.CallBackNumber.szAddress, Paramcallback.CHARi, Paramcallback.len);
+#endif
+       //1 User Date
+       msgTxt[msg_len - 1] = '\0';
+       EncodeCdmaSmsParamUserData(msgTxt, &ParamUser);
+       pDataPackage->ParamMask |= TAPI_NETTEXT_PARAM_USER_DATA_MASK;
+       pDataPackage->MsgData.OutSubmit.MsgEncoding = ParamUser.encoding;
+       pDataPackage->MsgData.OutSubmit.MsgLength = ParamUser.len;
+       memcpy(pDataPackage->MsgData.OutSubmit.szData, ParamUser.CHARi, ParamUser.len);
+
+       TEST_DEBUG("");
+       TEST_DEBUG("=============== Test App Message =================");
+       TEST_DEBUG(" - MsgType: %d", pDataPackage->MsgType);
+       TEST_DEBUG(" - ParamMask: 0x%08x", pDataPackage->ParamMask);
+       printf("0000: ");
+       for (i = 0; i < sizeof(TelSmsMsgInfo_t); i++) {
+               printf("%02x ", *(((unsigned char *) pDataPackage) + i));
+               if ((i + 1) % 8 == 0)
+                       printf("  ");
+
+               if ((i + 1) % 16 == 0)
+                       printf("\n%04x: ", i+1);
+       }
+       printf("\n");
+       fflush(stdout);
+
+       TEST_DEBUG("==============================================");
+
+       returnStatus = tel_send_sms_msg(pDataPackage, 0x26, &requestId); //more to send is false since it is not concatenated.for concatenated send 1
+
+       TEST_DEBUG("tel_send_sms_msg() returnStatus: %d, requestId: %d", returnStatus, requestId);
+
+       free(pDataPackage);
+
+       return TRUE;
+}
+
+
+BOOL DecodeCellBroadcastMsg(int length,char * pPDU)
+{
+       int                     msgLength;
+       int                     sn = 0; //serial number
+       int                     msgID; //message identifier
+       tapi_nettext_coding_scheme  dcs;
+
+       TS_UINT8        page[2];
+       int                     contents_length;
+       char     contents[TAPI_NETTEXT_CB_SIZE_MAX];
+
+       TS_UINT8        gs;
+       TS_UINT8        msgCode;
+       TS_UINT8        updateNumber;
+
+       if(pPDU == NULL){
+               TEST_DEBUG("pData is Null")
+               return FALSE;
+       }
+
+       TEST_DEBUG("cb msg type is %x",pPDU[0]);
+       TEST_DEBUG("cb msg len is %x",pPDU[1]);
+
+
+       TEST_DEBUG("$$$$$$$$$$$$$$$length of cb msg is %d",length);
+       sn = (pPDU[2] <<8 ) |pPDU[1] ;
+
+       gs = (pPDU[2] & 0xC0) >> 6;  //bit 7, bit 6
+
+       msgCode = (( (pPDU[2] & 0x3F) <<4 ) | pPDU[3] ) & 0xF0 ;
+
+       updateNumber = pPDU[3] & 0x0F;  //bit3, bit2, bit1, bit0
+
+       msgID = pPDU[4] << 4 |pPDU[3];
+
+       SmsUtilDecodeDCS( &dcs, pPDU[6] );
+
+       page[0] = pPDU[7] & 0x0F; //total page
+       page[1] = (pPDU[7] & 0xF0)>>4 ; //current page
+
+
+       msgLength = length -2;
+
+       contents_length = msgLength -6;
+
+       if (dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+       {
+               TS_BYTE inData[TAPI_NETTEXT_CB_SIZE_MAX+1];
+
+               memset( inData, 0x00, TAPI_NETTEXT_CB_SIZE_MAX + 1 );
+
+               memcpy( (void*) inData, (void*) &pPDU[8], contents_length);
+               SmsUtilUnpackGSMCode(contents,  &pPDU[8], msgLength );
+       }
+       else
+       {
+               memcpy( contents, &pPDU[8], msgLength);
+               contents[msgLength] = 0;
+       }
+
+       printf("*************************************\n");
+       printf("serical number : 0x%04x \n" , sn);
+       printf("Geographical Scope: 0x%x\n" , gs);
+       printf("message code : 0x%x\n", msgCode);
+       printf("update Number : 0x%x\n",updateNumber);
+       printf("message identifier :  0x%x\n" , msgID);
+       printf("DCS-Commpressed?: %d (1: true)\n" , dcs.bCompressed);
+       printf("DCS-coding_group_type:  %x\n" , dcs.coding_group_type);
+       printf("contents bytes size : %d\n", contents_length);
+       printf("page : (%d /%d) (page /total ) \n", page[1], page[0] );
+       printf("contents: %s\n", contents);
+       printf("*************************************\n");
+       /*
+          if(dcs.class_type = TAPI_NETTEXT_CLASS_2)
+          {
+          TelSmsDatapackageInfo_t * pDataPackage;
+
+          pDataPackage = malloc(sizeof(TelSmsDatapackageInfo_t));
+
+          pDataPackage->MsgLength =length ;
+          memcpy(pDataPackage->szData, pPDU, pDataPackage->MsgLength);
+
+          returnStatus = TelTapiSmsWrite(0x01, pDataPackage,&requestId);
+          TEST_DEBUG("Write : returnstatus %d requestId :%d",returnStatus,requestId);
+          }
+          */
+       return TRUE;
+}
+
+BOOL EncodeSmsSubmitTpdu(char* diallingNum, int dialNumLen, char* msg, int msg_len)
+{
+
+       TPDU_SMS_SUBMIT tpdu_submit;
+
+       TS_BYTE  packet[TAPI_NETTEXT_MSG_SIZE_MAX];
+
+       TS_BYTE  SCA[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //send SMS �Ҷ� ����ϴ� ���� SCA��
+       int ret = 0;
+
+       //      TS_UINT8 tp_mr = 0x03;
+       tp_mr++;
+       TS_UINT8 tp_pid = 0; //reaplace type (65)
+       TS_UINT8 tp_dcs; //=17; //class_1(17),class_2(18)
+       TS_UINT8 tp_vp;
+
+
+       int index = 0, ScIndex = 0;
+       int i;
+       int requestId=0;
+       unsigned char             sca_len =0;
+       TapiResult_t returnStatus ;
+
+       TelSmsDatapackageInfo_t *pDataPackage= malloc(sizeof(TelSmsDatapackageInfo_t));
+
+       memset(pDataPackage, 0, sizeof(TelSmsDatapackageInfo_t));
+
+       memset(packet, 0, TAPI_NETTEXT_MSG_SIZE_MAX);
+
+       /************SCA ADDRESS GET START**************/
+       /*
+          returnStatus = TelTapiSmsGetSCA(&sc_addr,0);
+          printf("Service center addr returned from TAPI SCA address %s returnStatus %d\n",sc_addr.szDiallingNum,returnStatus);
+          SmsUtilDecodeAddrField(decodeScaAddr, &sc_addr.szDiallingNum[0],&sc_addr.Ton, &sc_addr.Npi);
+          sca_len = strlen( decodeScaAddr );
+
+          memcpy( SCA, decodeScaAddr, sca_len);
+          SCA[sca_len] = '\0';
+          */
+       TEST_DEBUG("Enter SCA: ");
+       memset(SCA,0,sizeof(SCA));
+
+       ret = read(0, SCA, sizeof(SCA));
+
+       if (ret <= 0) {
+               TEST_DEBUG(" NULL msg can NOT be sent ");
+               return -1;
+       }
+
+       sca_len=strlen((char *)SCA)-1;
+
+       TEST_DEBUG("Decode SCA Address =========");
+       TEST_DEBUG("SCA Number :%s, SCA Length :%d ",SCA , sca_len);
+       TEST_DEBUG("========================");
+
+       //SCA ADDRESS GET END
+
+       //SCA
+
+       //TODO : SCA
+
+       //      index +=SmsUtilEncodeAddrField(packet,SCA, strlen(SCA)  ,0x01,0x01);
+       ScIndex  =SmsUtilEncodeAddrField((unsigned char*)pDataPackage->Sca ,(char *)SCA, sca_len  ,0x01,0x01);
+
+
+       TEST_DEBUG("ScIndex is %d", ScIndex);
+
+       // TP-MTI, TP-RD, TP-VPF, TP-SRR, TP_UDHI, TP-RP
+       tpdu_submit.msg_type = SMS_TPDU_SUBMIT;
+       tpdu_submit.rd   =FALSE; //false :accept duplicate msg , true: reject duplicate msg
+       tpdu_submit.vpf = TAPI_NETTEXT_VP_RELATIVE;
+       tpdu_submit.srr  = FALSE;   //false :A status report is not requested , true: A status report is requested
+       tpdu_submit.udhi = FALSE ; //false: contains only the short message , true :a Header in addition to the short message
+       tpdu_submit.rp = FALSE  ; //false :TP Reply Path parameter is not set in this SMS SUBMIT, true : TP Reply Path parameter is set in this SMS SUBMIT
+
+       packet[index] =  tpdu_submit.msg_type;                                                  // SUBMIT: bits 0, 1
+       packet[index] |= tpdu_submit.rd? 0x04 : 0;                                              // bit 2
+       packet[index] |= tpdu_submit.vpf  << 3; // bits 3, 4
+       packet[index] |= tpdu_submit.srr ? 0x20 : 0;                                            // bit 5
+       packet[index] |= tpdu_submit.udhi? 0x40 : 0;                                            // bit 6
+       packet[index] |= tpdu_submit.rp ? 0x80 : 0;                                             // bit 7
+
+       index++;
+       TEST_DEBUG("index of message ref is %d, msgref is %d",index,tp_mr);
+       /* TP-MR */
+       packet[index++] = tp_mr;
+
+       // TP-DA
+       index +=  SmsUtilEncodeAddrField( packet+index, diallingNum, dialNumLen, 0x02, 0x01);
+
+       //TEST_DEBUG("DESTINATTION  ADDR Encoded =========");
+
+       //TP-PID
+       packet[index++] = tp_pid;
+
+       // TP_DCS (Data Coding Scheme)
+
+       tpdu_submit.dcs.bCompressed = FALSE;
+       tpdu_submit.dcs.bmsg_class_set = TRUE;
+       tpdu_submit.dcs.coding_group_type =TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+       tpdu_submit.dcs.alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+       tpdu_submit.dcs.class_type = TAPI_NETTEXT_CLASS_2;
+
+       SmsUtilEncodeDCS(&tp_dcs, &tpdu_submit.dcs);
+
+       packet[index++] = tp_dcs;
+
+       //TEST_DEBUG("DCS Encoded:tp_dcs =%d =========",tp_dcs);
+
+       //TP-VP
+
+       tpdu_submit.vp.vp_rel_type = TAPI_NETTEXT_VP_REL_6H ;
+       tpdu_submit.vp.vp_type = TAPI_NETTEXT_VP_RELATIVE;
+       tpdu_submit.vp.vpValue =0xff ;
+
+       SmsUtilEncodeValidity(&tp_vp,&tpdu_submit.vp);
+
+       //tp_vp =65;
+       packet[index++] = tp_vp;
+       //TEST_DEBUG("Validity Encoded :tp_vp =%d =========",tp_vp);
+
+       // UDL
+       packet[index++] = msg_len;
+
+       // TP-UD
+
+       if (tpdu_submit.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+       {
+               int pos;
+               pos =SmsUtilPackGSMCode( packet + index, msg, msg_len);
+               index += pos;
+       }
+
+       TEST_DEBUG("Send packet to phonseSever[%d] -----", index);
+
+       for(i=0; i< index ; i++ )
+       {
+               TEST_DEBUG("[%02x]", packet[i]);
+               if( i%10 == 9)
+                       TEST_DEBUG("\n");
+       }
+       TEST_DEBUG("\n");
+
+       memcpy( pDataPackage->szData, packet, index);
+       pDataPackage->MsgLength = index;
+
+       TEST_DEBUG("***Sending the Message (Api:SendMsg)***");
+
+       TEST_DEBUG("Length : %d",pDataPackage->MsgLength);
+
+       returnStatus = tel_send_sms( pDataPackage, 0 ,&requestId); //more to send is false since it is not concatenated.for concatenated send 1
+
+       TEST_DEBUG("SendMsg : returnStatus=%d requestId=%d", returnStatus, requestId);
+
+       free(pDataPackage);
+
+       return TRUE;
+
+}
+TS_BOOL DecodeSmsSubmitTpdu(int pdu_len, char * pPDU)
+{
+       TPDU_SMS_SUBMIT         tpdu_submit;
+       TS_BYTE              scaAddr_len =0;
+       int                         destAddr_len = 0;
+       char            diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       char     scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       char        destAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //destination number
+       int         sca_ton, sca_npi, dest_ton,dest_npi;
+       int         position;
+
+       position=0;
+
+       /* SCA_ADDR */
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField(diallingNum, &pPDU[position],&sca_ton, &sca_npi);
+
+       position+=2;  //include Address-Length, Type of Address
+
+       scaAddr_len = strlen( (char *)diallingNum );
+
+       if ( scaAddr_len % 2 )
+               position += scaAddr_len / 2 + 1;
+       else
+               position += scaAddr_len / 2;
+
+
+       if ( sca_ton == SIM_TON_INTERNATIONAL )
+       {
+               scaAddr[0] = '+';
+               memcpy( &scaAddr[1], diallingNum, scaAddr_len );
+               scaAddr[scaAddr_len+1] = '\0';
+       }
+       else
+       {
+               memcpy( scaAddr, diallingNum, scaAddr_len );
+               scaAddr[scaAddr_len] = '\0';
+       }
+
+       //TEST_DEBUG(" sca length: %d , sca # : %s", scaAddr_len, scaAddr);
+
+       /* TP-MTI, TP-RD, TP-VPF,  TP-RP, TP_UDHI, TP-SRR */
+
+       tpdu_submit.msg_type = SMS_TPDU_SUBMIT; // bit 0,1(Message Type Indicator )
+       tpdu_submit.rd = ( pPDU[position] & 0x04 ) ? TRUE : FALSE;// bit 2 (Message Type Indicator)
+       tpdu_submit.vpf =( pPDU[position] & 0x18) >> 3; //  bits 3, 4 ( validity period format)
+       tpdu_submit.srr=( pPDU[position] & 0x20 ) ? TRUE : FALSE;       // bit 5 (Status Report Request)
+       tpdu_submit.udhi=( pPDU[position] & 0x40 ) ? TRUE : FALSE;      // bit 6 (User Data Header Indicator)
+       tpdu_submit.rp = ( pPDU[position] & 0x80 ) ? TRUE : FALSE;      // bit 7 (Reply Path)
+
+       position++ ;
+
+       /* TP-MR */
+       tpdu_submit.mr = pPDU[position];
+
+       position++ ;
+
+       /* TP-DA */
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField(diallingNum, &pPDU[position],&dest_ton, &dest_npi);
+
+       position+=2;
+
+       destAddr_len = strlen( (char*) diallingNum );
+       if ( destAddr_len % 2 )
+               position += destAddr_len / 2 + 1;
+       else
+               position += destAddr_len / 2;
+
+
+       if ( dest_ton == SIM_TON_INTERNATIONAL )
+       {
+               destAddr[0] = '+';
+               memcpy( &destAddr[1], diallingNum, destAddr_len );
+               destAddr[destAddr_len+1] = '\0';
+       }
+       else
+       {
+               memcpy( destAddr, diallingNum, destAddr_len );
+               destAddr[destAddr_len] = '\0';
+       }
+       //TEST_DEBUG(" dest length: %d , dest # : %s", destAddr_len, destAddr);
+
+       tpdu_submit.desAddr.DialNumLen= destAddr_len;
+       memcpy(tpdu_submit.desAddr.szDiallingNum, destAddr , destAddr_len);
+       tpdu_submit.desAddr.Npi = dest_npi;
+       tpdu_submit.desAddr.Ton = dest_ton;
+
+       /* TP-PID */
+
+       tpdu_submit.pId = pPDU[position];
+       position++ ;
+
+       /* TP DCS */
+       SmsUtilDecodeDCS( &tpdu_submit.dcs, pPDU[position] );
+       position ++;
+
+       /* TP VP */
+       tpdu_submit.vp.vp_type = TAPI_NETTEXT_VP_RELATIVE;  //temp
+
+       if(tpdu_submit.vp.vp_type ==  TAPI_NETTEXT_VP_RELATIVE)
+       {
+               tpdu_submit.vp.vpValue = pPDU[position];
+               tpdu_submit.vp.vp_rel_type = TAPI_NETTEXT_VP_REL_1D;
+               position++;
+       }
+       else if (tpdu_submit.vp.vp_type ==  TAPI_NETTEXT_VP_ABSOLUTE || tpdu_submit.vp.vp_type ==  TAPI_NETTEXT_VP_ENHANCED)
+       {
+               position += 7;
+       }
+
+       /* TP UDL */
+       tpdu_submit.udl = pPDU[position] ;
+
+       if ( tpdu_submit.udl> TAPI_NETTEXT_SMDATA_SIZE_MAX )
+               tpdu_submit.udl = TAPI_NETTEXT_SMDATA_SIZE_MAX;
+
+       position++;
+
+       /* TP UD */
+       tpdu_submit.userData = malloc( sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+       memset(tpdu_submit.userData, 0, sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+       if (tpdu_submit.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+       {
+               char    inData[TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
+
+               memset( inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 );
+
+               memcpy( (void*) inData, (void*) &pPDU[position], tpdu_submit.udl );
+
+               SmsUtilUnpackGSMCode((char *)tpdu_submit.userData, inData, (TS_UINT8) tpdu_submit.udl);
+       }
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Msg Type: TPDU_SUBMIT");
+
+       if(tpdu_submit.rd)
+       {
+               TEST_DEBUG("RD: Reject Duplicate")
+       }
+
+       else if(!tpdu_submit.rd)
+       {
+               TEST_DEBUG("RD: Accept Duplicate")
+       }
+
+       if(tpdu_submit.srr)
+       {
+               TEST_DEBUG("SRR: A status report is requested")
+       }
+
+       else if(!tpdu_submit.srr)
+       {
+               TEST_DEBUG("SRR: A status report is not  requested")
+       }
+
+       if(tpdu_submit.udhi)
+       {
+               TEST_DEBUG("UDHI: Contains a Header in addition to the short message.")
+       }
+       else if(!tpdu_submit.udhi)
+       {
+               TEST_DEBUG("UDHI: Only Short Message")
+       }
+
+       if(tpdu_submit.rp)
+       {
+               TEST_DEBUG("RP: Set Reply Path")
+       }
+
+       else if(!tpdu_submit.rp)
+       {
+               TEST_DEBUG("RP: Not set Reply Path")
+       }
+
+       TEST_DEBUG("SCA Addr : %s",scaAddr);
+       TEST_DEBUG("To : %s" ,destAddr);
+       TEST_DEBUG("Message : %s " , tpdu_submit.userData);
+       TEST_DEBUG("*************************************");
+
+       return TRUE;
+}
+
+int   DecodeSmsDeliverTpdu(int tpdu_len , char* pTPDU)
+{
+       TPDU_SMS_DELIVER   tpdu_deliver;
+       TmDateTime                 SCTimeStamp;;
+       int                 orgAddr_len = 0;
+       char        diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       char                orgAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //originating number
+       int                 org_ton,org_npi;
+       int                 position=0;
+
+       /* TP-MTI, TP-MMS, TP-SRI, TP_UDHI, TP-RP */
+       tpdu_deliver.msg_type = SMS_TPDU_DELIVER;
+       tpdu_deliver.mms = ( pTPDU[position] & 0x04 ) ? TRUE : FALSE;// bit 2 (Message Type Indicator)
+       tpdu_deliver.sri =( pTPDU[position] & 0x20 ) ? TRUE : FALSE;    // bit 5 (Status Report Indication)
+       tpdu_deliver.udhi=( pTPDU[position] & 0x40 ) ? TRUE : FALSE;    // bit 6 (User Data Header Indicator)
+       tpdu_deliver.rp = ( pTPDU[position] & 0x80 ) ? TRUE : FALSE;    // bit 7 (Reply Path)
+
+       position++ ;
+
+       /* TP-OA */
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       orgAddr_len = SmsUtilDecodeAddrField(diallingNum, &pTPDU[position],&org_ton, &org_npi);
+
+       position+=2;
+
+       if ( orgAddr_len % 2 )
+               position += orgAddr_len / 2 + 1;
+       else
+               position += orgAddr_len / 2;
+
+       TEST_DEBUG("pos = %d, length = %d",position, orgAddr_len);
+
+       if ( org_ton == SIM_TON_INTERNATIONAL )
+       {
+               orgAddr[0] = '+';
+               memcpy( &orgAddr[1], diallingNum, orgAddr_len );
+               orgAddr[orgAddr_len+1] = '\0';
+       }
+       else
+       {
+               memcpy( orgAddr, diallingNum, orgAddr_len );
+               orgAddr[orgAddr_len] = '\0';
+       }
+
+       /* TP-PID */
+       tpdu_deliver.pId= pTPDU[position];
+
+       position ++;
+
+       /* TP-DCS */
+       SmsUtilDecodeDCS( &tpdu_deliver.dcs, pTPDU[position] );
+       dcs_pos = position;
+       position++;
+
+       /* TP-SCTS */
+       SmsUtilDecodeTimeStamp( &pTPDU[position], & SCTimeStamp );
+
+       position+=7;
+
+       /* TP-UDL */
+       tpdu_deliver.udl = pTPDU[position];
+
+       if ( tpdu_deliver.udl> TAPI_NETTEXT_SMDATA_SIZE_MAX )
+               tpdu_deliver.udl = TAPI_NETTEXT_SMDATA_SIZE_MAX;
+
+       position++;
+
+       /* TP-UD */
+       tpdu_deliver.userData = malloc( sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+       memset(tpdu_deliver.userData, 0, sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+       if (tpdu_deliver.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+       {
+               char    inData[TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
+
+               memset( inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 );
+
+               memcpy( (void*) inData, (void*) &pTPDU[position], tpdu_deliver.udl );
+
+               SmsUtilUnpackGSMCode(tpdu_deliver.userData, inData, (TS_UINT8) tpdu_deliver.udl);
+       }
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Msg Type: TPDU_DELIVER");
+
+       if(tpdu_deliver.rp )
+       {TEST_DEBUG("RP: Set Reply Path")}
+       else if(!tpdu_deliver.rp )
+       {TEST_DEBUG("RP: Not set Reply Path")}
+
+       if(tpdu_deliver.sri)
+       {TEST_DEBUG("SRI: A status report shall be returned to the SME")}
+       else if(!tpdu_deliver.sri)
+       {TEST_DEBUG("SRI: A status report shall be not returned to the SME")}
+
+       if(tpdu_deliver.mms)
+       {TEST_DEBUG("MMS: No more messages are waiting for the MS in this SC")}
+       else if(!tpdu_deliver.mms)
+       {TEST_DEBUG("MMS: More messages are waiting for the MS in this SC")}
+
+       if(tpdu_deliver.udhi)
+       {TEST_DEBUG("UDHI: Contains a Header in addition to the short message.")}
+       else    if(!tpdu_deliver.udhi)
+       {TEST_DEBUG("UDHI: Only short message.")}
+
+                                                                       TEST_DEBUG("DcsClass : %x (4 means Class None) ",tpdu_deliver.dcs.class_type);
+
+
+       TEST_DEBUG("From : %10s" ,orgAddr );
+       TEST_DEBUG("Time : %d-%d-%d  , %d:%d:%d",
+                       SCTimeStamp.year, SCTimeStamp.month, SCTimeStamp.day, SCTimeStamp.hour, SCTimeStamp.minute ,SCTimeStamp.second);
+       TEST_DEBUG("Message : %s " , tpdu_deliver.userData);
+       TEST_DEBUG("*************************************");
+
+
+       return dcs_pos;
+}
+BOOL EncodeSmsDeliverReportTpdu()
+{
+       TPDU_SMS_DELIVER_REPORT deliver_report;
+       unsigned char packet[500];
+       TelSmsDatapackageInfo_t * pDataPackage;
+       TS_BYTE tp_dcs;
+       TS_BYTE mask=0x69;
+       int index=0;
+       int i ;
+
+       TelSmsDatapackageInfo_t  del_report;
+
+
+       memset(&(del_report), 0 , sizeof(TelSmsDatapackageInfo_t));
+
+       pDataPackage = malloc(sizeof(TelSmsDatapackageInfo_t));
+       memset(pDataPackage, 0, sizeof(TelSmsDatapackageInfo_t));
+
+       memset(packet, 0, 500);
+
+
+       /* TP-MTI , TP-UDHI */
+       deliver_report.msg_type = SMS_TPDU_DELIVER_REPORT;
+       deliver_report.udhi = FALSE;
+
+       packet[index] = deliver_report.msg_type;                                                //DELIVER REPORT
+       packet[index] |= deliver_report.udhi? 0x40 : 0; //bit 6
+
+       index ++;
+
+       /* TP-FCS */
+       //if(result==FAIL)
+       //{
+
+
+       //}
+
+
+       /* TP -PI */
+       deliver_report.paraInd = mask;
+       packet[index] = deliver_report.paraInd ;
+
+       if ( ( mask != 0xFF ) && ( mask != 0 ) )
+       {
+               index++;
+               /* TP-PID */
+               if ( mask & 0x01)
+               {
+                       deliver_report.pId = 0x65 ;
+                       packet[index++] = deliver_report.pId;
+               }
+
+               /* TP-DCS */
+               if ( mask & 0x02)
+               {
+                       deliver_report.dcs.bCompressed = FALSE;
+                       deliver_report.dcs.bmsg_class_set = TRUE;
+                       deliver_report.dcs.coding_group_type =TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+                       deliver_report.dcs.alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                       deliver_report.dcs.class_type = TAPI_NETTEXT_CLASS_2;
+
+                       SmsUtilEncodeDCS(&tp_dcs, &deliver_report.dcs);
+                       packet[index++] = tp_dcs;
+               }
+               /* TP-UDL */
+               if ( mask & 0x04)
+               {
+                       deliver_report.udl =0x00;
+                       packet[index++] = deliver_report.udl;
+
+                       /* TP-UD */
+
+                       if (deliver_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+                       {
+                               //SmsUtilPackGSMCode( packet + index, msg, msg_len);
+                       }
+               }
+       }
+       TEST_DEBUG("EncodeSmsDeliverReportTpdu");
+       TEST_DEBUG("Send packet to phonseSever[%d] -----", index);
+
+       for(i=0; i< index ; i++ )
+       {
+               TEST_DEBUG("[%02x]", packet[i]);
+               if( i%10 == 9)
+                       TEST_DEBUG("\n");
+       }
+       TEST_DEBUG("\n");
+       memcpy( del_report.szData, packet, index);
+       del_report.MsgLength = index;
+       TEST_DEBUG("msgLength :%d",del_report.MsgLength);
+       int requestId =0;
+       tel_send_sms_deliver_report(&del_report,0, &requestId);//madhavi
+       TEST_DEBUG("after send deliver report request id is %d",requestId);
+       return TRUE;
+}
+
+
+BOOL DecodeSmsSubmitReportTpdu(int length , char *data)
+{
+
+       TPDU_SMS_SUBMIT_REPORT  submit_report;
+       TmDateTime                              SCTimeStamp;;
+       int                                             position=1;
+       int                                             i=0;
+       TS_BYTE                                         msgRef, tpdu_len;
+       int result=0;
+       TS_BYTE                                 mask;
+
+       /* Result */
+
+       if(data == NULL){
+               TEST_DEBUG("pData is Null")
+               return FALSE;
+       }
+
+       TEST_DEBUG("length :%d",length);
+
+
+       for(i=0;i<length;i++)
+               TEST_DEBUG("[%02x]",data[i]);
+
+
+       result = data[position];
+
+       TEST_DEBUG("In ackrecv (return status) result is %x",result);
+       position ++;
+
+       /* Msg Reference */
+
+       msgRef =  data[position++];
+       TEST_DEBUG("In ackrecv  position :%d msgref is %x",position,msgRef);
+       position ++;
+
+       /* TPDU Length */
+
+       tpdu_len = data[position];
+       TEST_DEBUG("In ackrecv position :%d len is %d",position,tpdu_len);
+
+
+
+       /**** SUBMIT REPORT TPDU PARSING
+        ***/
+
+       /* TP-MTI , TP-UDHI */
+       TEST_DEBUG("before TPDU position value:%d",position);
+
+       submit_report.msg_type = data[position] & 0x03; //bit 0,1
+       submit_report.udhi = data[position] & 0x40 ? TRUE : FALSE;       //bit 6;
+
+       position ++;
+
+       if(result == FAIL)
+       {
+               /* TP-FCS */
+               submit_report.fcs =  data[position] ;
+               position ++;
+       }
+
+       /* TP-PI  - set to a 1 indicates that a particular optional parameter is present in the fields which follow. */
+       /* Masking Bit  - TP -PID (bit 0), TP-DCS(bit 1), TP-UDL(bit 2) */
+
+       submit_report.paraInd = data[position] ;
+       mask =  submit_report.paraInd;
+       position ++;
+
+       //TEST_DEBUG("Parmeter Indication mask =%x", mask);
+
+       /* TP-SCTS */
+
+       SmsUtilDecodeTimeStamp( &data[position], & SCTimeStamp );
+
+       position+=7;
+
+       if( ( mask != 0xFF ) && ( mask != 0 ) )
+       {
+               /* TP-PID */
+               if ( mask & 0x01)
+               {
+                       submit_report.pId= data[position];
+                       position ++;
+                       TEST_DEBUG("TP-PID :%x", submit_report.pId);
+               }
+
+               /* TP-DCS */
+               if ( mask & 0x02)
+               {
+                       SmsUtilDecodeDCS( &submit_report.dcs, data[position] );
+                       position ++;
+                       TEST_DEBUG("TP-DCS :%x",data[position] );
+               }
+
+               if ( mask & 0x04)
+               {
+                       /* TP-UDL */
+                       submit_report.udl = data[position];
+                       position++;
+
+                       TEST_DEBUG("TP-UDL :%x",data[position] );
+
+                       /* TP-UD */
+
+                       submit_report.userData = malloc( sizeof ( TS_BYTE ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+                       memset(submit_report.userData, 0, sizeof ( TS_BYTE ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+                       if (submit_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+                       {
+                               char    inData[TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
+
+                               memset( inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 );
+
+                               memcpy( (void*) inData, (void*) &data[position], submit_report.udl );
+
+                               SmsUtilUnpackGSMCode(submit_report.userData, inData, (TS_UINT8) submit_report.udl);
+                       }
+
+               }
+       }
+
+       TEST_DEBUG("*************************************");
+
+       if(result != 0x00)
+               TEST_DEBUG("SMS SEND FAIL!!")
+       else
+               TEST_DEBUG("SMS SEND SUCCESS!!")
+
+       if(result != 0x00)
+                               TEST_DEBUG("Failure Code : %x",submit_report.fcs)
+
+
+                                       TEST_DEBUG("*************************************");
+
+       return TRUE;
+}
+
+TS_BOOL DecodeSmsStatusReportTpdu(int tpdu_len, char* pTPDU)
+{
+       TPDU_SMS_STATUS_REPORT status_report;
+
+
+       TmDateTime   SCTimeStamp;
+       TmDateTime   DischargeTime;
+
+       int                     rcpAddr_len = 0;
+       char            diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+
+       char                  rcpAddr[TAPI_NETTEXT_ADDRESS_LEN_MAX]; //recipient number
+       int                   rcp_ton,rcp_npi;
+       int                   position=0;
+       TS_UINT               mask;
+
+       /* TP-MTI, TP MMS, TP SRQ, TP_UDHI */
+
+       status_report.msg_type = pTPDU[position] & 0x03; // bit 0,1
+       status_report.mms = pTPDU[position] & 0x04 ? TRUE : FALSE ; // bit 2
+       status_report.srq = pTPDU[position] &  0x20 ? TRUE : FALSE ; //bit 5
+       status_report.udhi = pTPDU[position] & 0x40 ? TRUE : FALSE;      //bit 6
+
+       position ++;
+
+       /* TP-MR */
+       status_report.mr = pTPDU[position];
+       position ++;
+
+       /* TP-RA */
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField(diallingNum, &pTPDU[position],&rcp_ton, &rcp_npi);
+
+       position+=2;
+
+       rcpAddr_len = strlen( (char*) diallingNum );
+       if ( rcpAddr_len % 2 )
+               position += rcpAddr_len / 2 + 1;
+       else
+               position += rcpAddr_len / 2;
+
+
+       if ( rcp_ton == SIM_TON_INTERNATIONAL )
+       {
+               rcpAddr[0] = '+';
+               memcpy( &rcpAddr[1], diallingNum, rcpAddr_len );
+               rcpAddr[rcpAddr_len+1] = '\0';
+       }
+       else
+       {
+               memcpy( rcpAddr, diallingNum, rcpAddr_len );
+               rcpAddr[rcpAddr_len] = '\0';
+       }
+
+       status_report.rcpAddr.DialNumLen= rcpAddr_len;
+       memcpy(status_report.rcpAddr.szDiallingNum, rcpAddr , rcpAddr_len);
+       status_report.rcpAddr.Npi = rcp_npi;
+       status_report.rcpAddr.Ton = rcp_ton;
+
+       /* TP-SCTS */
+       SmsUtilDecodeTimeStamp( &pTPDU[position], & SCTimeStamp );
+       position+=7;
+
+       /* TP-DT */
+       SmsUtilDecodeTimeStamp( &pTPDU[position], & DischargeTime );
+       position+=7;
+
+       /* TP-ST */
+       status_report.status = pTPDU[position];
+       position ++;
+
+       /* TP-PI */
+       status_report.paraInd = pTPDU[position];
+
+       mask = status_report.paraInd  ;
+
+       if ( ( mask != 0xFF ) && ( mask != 0 ) )
+       {
+               /* Increment only if mask is valid */
+               position ++;
+
+               /* TP-PID */
+               if ( mask & 0x01)
+               {
+                       status_report.pId= pTPDU[position];
+                       position ++;
+               }
+               /* TP-DCS */
+               if ( mask & 0x02)
+               {
+                       SmsUtilDecodeDCS( &status_report.dcs, pTPDU[position] );
+                       position ++;
+               }
+               if ( mask & 0x04)
+               {
+                       /* TP-UDL */
+                       status_report.udl = pTPDU[position];
+                       position++;
+
+                       /* TP-UD */
+
+                       status_report.userData = malloc( sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+                       memset(status_report.userData, 0, sizeof ( unsigned char ) * ( TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 ) );
+
+                       if (status_report.dcs.alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )
+                       {
+                               char    inData[TAPI_NETTEXT_SMDATA_SIZE_MAX+1];
+
+                               memset( inData, 0x00, TAPI_NETTEXT_SMDATA_SIZE_MAX + 1 );
+
+                               memcpy( (void*) inData, (void*) &pTPDU[position], status_report.udl );
+
+                               SmsUtilUnpackGSMCode(status_report.userData, inData, (TS_UINT8) status_report.udl);
+                       }
+
+               }
+       }
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Msg Type: STATUS_REPORT");
+       if(status_report.mms)
+       {TEST_DEBUG("MMS: No more messages are waiting for the MS in this SC")}
+       else if(!status_report.mms)
+       {TEST_DEBUG("MMS: More messages are waiting for the MS in this SC")}
+
+       if(status_report.srq)
+       {TEST_DEBUG("SRQ: the result of an SMS COMMAND ")}
+       else if(!status_report.srq)
+       {TEST_DEBUG("SRQ: the result of a SMS SUBMIT.")}
+
+       if(status_report.udhi)
+       {TEST_DEBUG("UDHI: Contains a Header in addition to the short message.")}
+       else if(!status_report.udhi)
+       {TEST_DEBUG("UDHI: Only Short Message")}
+
+       TEST_DEBUG("STATUS:%x",status_report.status);
+       if(status_report.status==0x00)
+               {TEST_DEBUG("STATUS : Short message received by the SME")}
+       else if(status_report.status==0x01)
+       {TEST_DEBUG("STATUS : Short message forwarded by the SC to the SMEbut the SC is unable to confirm delivery")}
+       else if(status_report.status==0x02)
+       {TEST_DEBUG("STATUS : Short message replaced by the SC")}
+
+       TEST_DEBUG("Recipient Number : %s" ,rcpAddr );
+       TEST_DEBUG("SC Time Stamp : %d-%d-%d  , %d:%d:%d",
+                       SCTimeStamp.year, SCTimeStamp.month, SCTimeStamp.day, SCTimeStamp.hour, SCTimeStamp.minute ,SCTimeStamp.second);
+       TEST_DEBUG("Discharge Time : %d-%d-%d  , %d:%d:%d",
+                       DischargeTime.year, DischargeTime.month, DischargeTime.day, DischargeTime.hour, DischargeTime.minute ,DischargeTime.second);
+
+       if(mask & 0x04)
+               TEST_DEBUG("Message : %s " , status_report.userData);
+
+       TEST_DEBUG("*************************************");
+
+       return TRUE;
+}
+
+void MsgCountNotification(int length, char *pData)
+{
+
+       static TelSmsStoredMsgCountInfo_t       *countInfo;
+       int loop_counter = 0;
+       TapiResult_t returnStatus ;
+       int requestId = 0;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+
+       countInfo = (TelSmsStoredMsgCountInfo_t*) pData;
+
+       if( countInfo->UsedCount != 0x00 )      //if used count is not zero
+       {
+               TEST_DEBUG("Index LIST..........");
+               for(loop_counter  = 0; loop_counter < countInfo->UsedCount ; loop_counter++)
+               {
+                       TEST_DEBUG("[%02x]", countInfo->IndexList[loop_counter]);
+                       returnStatus = tel_read_sms_in_sim(countInfo->IndexList[loop_counter],&requestId);
+                       TEST_DEBUG("After read msg: returnstatus %d request id is %d",returnStatus,requestId);
+               }
+               TEST_DEBUG("In MsgCountNotification total cnt is %d, usedcnt is %dapi_err %d",countInfo->TotalCount, countInfo->UsedCount,returnStatus);
+       }
+
+       TEST_DEBUG("In MsgCountNotification total cnt is %d, usedcnt is %d",countInfo->TotalCount, countInfo->UsedCount);
+}//Madhavi
+
+
+void ReadMsgNotification(int length, char *pData)
+{
+       TelSmsData_t  * sim_data;
+       int                scaAddr_len =0;
+       char                * pTPDU;
+       int                 tpdu_len =0;
+       char                diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       char             scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       int                 sca_ton, sca_npi;
+       int                 position;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null");
+               return;
+       }
+
+       scaAddr_len = pData[7];
+
+       int i = 0;
+       for( i=0;i<length ; i++)
+               TEST_DEBUG("[%02x]", pData[i]);
+
+       sim_data = (TelSmsData_t *)pData;
+
+       if(sim_data->MsgStatus== TAPI_NETTEXT_STATUS_UNREAD)
+               TEST_DEBUG("Msg Staus : received unread msg")
+       else if(sim_data->MsgStatus==TAPI_NETTEXT_STATUS_READ)
+               TEST_DEBUG("Msg Staus : received read msg")
+       else if(sim_data->MsgStatus==TAPI_NETTEXT_STATUS_UNSENT)
+               TEST_DEBUG("Msg Staus : unsent msg")
+       else
+               TEST_DEBUG("Msg Staus : [%d]", sim_data->MsgStatus)
+
+       TEST_DEBUG("First Data [%x]", sim_data->SmsData.szData[0]);
+       TEST_DEBUG("Second Data [%x]", sim_data->SmsData.szData[1]);
+       TEST_DEBUG("Third Data [%x]", sim_data->SmsData.szData[2]);
+       TEST_DEBUG("Fourth Data [%x]", sim_data->SmsData.szData[3]);
+
+       //if(sim_data->MsgStatus ==0x01 || sim_data->MsgStatus==0x02)
+       {
+               position=0;
+               // SCA_ADDR
+               memset(diallingNum, 0, sizeof(diallingNum));
+
+               SmsUtilDecodeAddrField(diallingNum, (char *)sim_data->SmsData.Sca, &sca_ton, &sca_npi);
+
+               position+=2;  //include Address-Length, Type of Address
+
+               scaAddr_len = strlen( (char *)diallingNum );
+
+               if ( scaAddr_len % 2 )
+                       position += scaAddr_len / 2 + 1;
+               else
+                       position += scaAddr_len / 2;
+
+
+               if ( sca_ton == SIM_TON_INTERNATIONAL )
+               {
+                       scaAddr[0] = '+';
+                       memcpy( &scaAddr[1], diallingNum, scaAddr_len );
+                       scaAddr[scaAddr_len+1] = '\0';
+               }
+               else
+               {
+                       memcpy( scaAddr, diallingNum, scaAddr_len );
+                       scaAddr[scaAddr_len] = '\0';
+               }
+
+               memcpy(&sim_data->SmsData.MsgLength, &pData[4+7 + position], sizeof(char) );    //position is 7(sca)
+
+               tpdu_len = sim_data->SmsData.MsgLength ;
+
+               memcpy(&sim_data->SmsData.szData, &pData[4+position+4 + 7], tpdu_len );
+
+               TEST_DEBUG("SCA Number : %s tpdu_len is %d",scaAddr,tpdu_len);
+
+               pTPDU = malloc(sizeof(TS_BYTE) * tpdu_len);
+               TEST_DEBUG("bfor memcopy position is %d",position);
+               memcpy(pTPDU, &(sim_data->SmsData.szData[0]), tpdu_len);
+               TEST_DEBUG("after memcpy");
+
+               DecodeSmsDeliverTpdu(tpdu_len, pTPDU);
+
+               free(pTPDU);
+       }
+
+}//Madhavi
+
+void MemoryFullNotification(int length, char *pData)
+{
+       int * memory_ind;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+       memory_ind = (int *)pData;
+       TEST_DEBUG("In memory full notification status %d",*memory_ind);
+
+}//Madhavi
+
+
+void DeleteMsgNotification(int length, char *pData)
+{
+       int *index;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+       index = (int *) pData;
+       TEST_DEBUG("In deletenotifcation the result and index are [%d]", *index);
+
+
+}//madhavi
+
+void SaveMsgNotification(int length, char *pData)
+{
+       int *index;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+       index = (int *)pData;
+       TEST_DEBUG("In savestatus noti, index [%d]", *index);
+
+}
+
+void GetCBNotification(int length, char *pData)
+{
+       TelSmsCbConfig_t * CBConfig;
+       int i =0;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+
+       CBConfig =(TelSmsCbConfig_t *) pData;
+
+
+       TEST_DEBUG("=========CB Configuration=========");
+
+       /*** CB Enable/Diable ***/
+       if(CBConfig->bCBEnabled==TRUE)
+               TEST_DEBUG("Cell Broadcast Msg Enabled...")
+       else
+               TEST_DEBUG("Cell Broadcast Msg Disabled...")
+
+
+                       /*** Selected ID ***/
+                       if(CBConfig->SelectedId == 0x01)
+                               TEST_DEBUG("All CBMI is selected... ")
+                       else if(CBConfig->SelectedId == 0x02)
+                               TEST_DEBUG("There are some selected CBMI...");
+
+       /*** CBMI  Count ***/
+       TEST_DEBUG("CBMI Count: %d \n",CBConfig->MsgIdCount);
+
+       /*** CBMI  List ***/
+
+       if(CBConfig->MsgIdCount !=0)
+       {
+
+               TEST_DEBUG("----- CBMI List -----");
+
+               for(i =0 ; i < CBConfig->MsgIdCount; i++)
+               {
+
+                       TEST_DEBUG("No.%d - [0x%04x]", i,CBConfig->MsgIDs[i]);
+
+               }
+
+       }
+       TEST_DEBUG("==================================");
+
+}
+
+void param_get_noti(int length, char *pData)
+{
+       TelSmsParams_t *smsp_param;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+       smsp_param = (TelSmsParams_t  *)pData;
+
+       TEST_DEBUG("record index is %x",smsp_param->RecordIndex);
+       TEST_DEBUG("record len  is %x",smsp_param->RecordLen);
+       TEST_DEBUG("alpha_id len  is %lu ",smsp_param->AlphaIdLen);
+       TEST_DEBUG("alpha_id is %s ",smsp_param->szAlphaId);
+       TEST_DEBUG("param indicator is  %xn",smsp_param->ParamIndicator);
+       TEST_DEBUG("dest dialling num is %s",smsp_param->TpDestAddr.szDiallingNum);
+       TEST_DEBUG("svcaddr dialling num is %s",smsp_param->TpSvcCntrAddr.szDiallingNum);
+       TEST_DEBUG("pid %x",smsp_param->TpProtocolId);
+       TEST_DEBUG("dcs is %x",smsp_param->TpDataCodingScheme);
+       TEST_DEBUG("validity is %x",smsp_param->TpValidityPeriod);
+}
+
+
+void Device_ReadyNoti(int length, char *pData)
+{
+       int *device_status;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+
+       device_status = (int *)pData;
+
+       if(*device_status == TRUE){
+               TEST_DEBUG("Device Ready");
+       }
+       else if(*device_status  == FALSE){
+               TEST_DEBUG("Device Not Ready");
+       }
+       else{
+               TEST_DEBUG("In device ready noti the result is %d",*device_status );
+       }
+       return;
+}
+
+void Deliver_ReportNoti(int status)
+{
+       if(status == TAPI_NETTEXT_SENDSMS_SUCCESS){
+               TEST_DEBUG("DELIVERY REPORT SUCCESS");
+       }
+       else{
+               TEST_DEBUG("DELIVERY REPORT Fail : Reason[0x%0x]", status);
+       }
+
+       return;
+}
+
+
+void get_preferred_bearer_noti(int length,char *pData)
+
+{
+       TEST_DEBUG("get preferred bearer");
+       int svc=0;
+       TelSmsBearerType_t *bearer;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+
+       bearer=(TelSmsBearerType_t *)pData;
+       TEST_DEBUG("In GetPreferredBearer noti bearer:%d",*bearer);
+       svc=*bearer;
+       TEST_DEBUG("svc:%d",svc);
+
+       if(svc== TAPI_NETTEXT_BEARER_PS_ONLY)
+               TEST_DEBUG("Packet Domain")
+       else if(svc== TAPI_NETTEXT_BEARER_CS_ONLY)
+               TEST_DEBUG("Circuit Switched")
+       else if(svc== TAPI_NETTEXT_BEARER_PS_PREFERRED)
+               TEST_DEBUG("Packet Domain preferred ")
+       else if(svc== TAPI_NETTEXT_BEARER_CS_PREFERRED)
+               TEST_DEBUG("Circuit Switched preferred")
+
+}
+
+void set_request_confirm_noti(int length, char *pData)
+{
+       TEST_DEBUG("***Set Request  confirm Notification*******");
+
+       TelSmsSetResponse *pSetReqConfType;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+       pSetReqConfType = (TelSmsSetResponse *)pData;
+
+       switch(*pSetReqConfType)
+       {
+               case TAPI_NETTEXT_CBSETCONFIG_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_CBSETCONFIG_RSP");
+                       break;
+#if 0
+               case TAPI_NETTEXT_SETPREFERREDBEARER_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETPREFERREDBEARER_RSP");
+                       break;
+#endif
+               case TAPI_NETTEXT_SETPARAMETERS_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETPARAMETERS_RSP");
+                       break;
+
+               case TAPI_NETTEXT_SETMEMORYSTATUS_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETMEMORYSTATUS_RSP");
+                       break;
+
+               case TAPI_NETTEXT_SETMESSAGESTATUS_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETMESSAGESTATUS_RSP");
+                       break;
+
+               case TAPI_NETTEXT_SETDEVICESTATUS_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETDEVICESTATUS_RSP");
+                       break;
+
+               case TAPI_NETTEXT_SETSCADDR_RSP:
+                       TEST_DEBUG("TAPI_NETTEXT_SETSCADDR_RSP");
+                       break;
+
+               default:
+                       TEST_DEBUG("Unknown set request confirm noti");
+                       break;
+
+       }
+
+       TEST_DEBUG("Notification Received Successfully");
+}
+
+void param_count_noti(int length, char *pData)
+{
+       int  * RecordCount;
+
+       if(pData == NULL){
+               TEST_DEBUG("pData is Null")
+               return;
+       }
+
+       RecordCount = (int *)pData;
+
+       TEST_DEBUG("ParamCnt Length[%d]", length);
+       TEST_DEBUG("In param_count_noti the record count is %d", *RecordCount);
+}
+
+int  SendMessage()
+{
+       int     ret;
+       int     msg_len=0;
+       char buf[512];
+       char message[512];
+       //char bearerType[2];
+       char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       int     diallingNum_len=0;
+
+       memset(buf,0, sizeof(buf));
+       memset(diallingNum,0,sizeof(diallingNum));
+       diallingNum_len=0;
+
+       TEST_DEBUG("Enter destination Number: ");
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       diallingNum_len=strlen(diallingNum);
+       memcpy(&diallingNum[diallingNum_len], buf,sizeof(buf));
+
+       diallingNum_len = strlen(diallingNum); //recalculate
+       TEST_DEBUG("dialling num %s and dialling num len is %d",diallingNum,diallingNum_len);
+       diallingNum[diallingNum_len]=0;
+       diallingNum_len =diallingNum_len-1;
+
+       TEST_DEBUG("Enter Message: ");
+       memset(message,0,sizeof(message));
+
+       ret = read(0, message, sizeof(message));
+
+       if (ret <= 0) {
+               TEST_DEBUG(" NULL msg can NOT be sent ");
+               return -1;
+       }
+
+       msg_len=strlen(message);
+
+       TEST_DEBUG("==========================");
+       TEST_DEBUG("To :%s", diallingNum);
+       TEST_DEBUG("Message: %sMsg Length:%d",message, msg_len);
+       TEST_DEBUG("Dialling number Length : %d" ,diallingNum_len);
+       TEST_DEBUG("==========================\n");
+
+       EncodeSmsSubmitTpdu(diallingNum, diallingNum_len,message, msg_len) ;
+       return 1;
+
+}
+
+int SendMessageCDMA()
+{
+       int ret;
+       int msg_len = 0;
+       char buf[512] = {0,};
+       char message[512] = {0,};
+       char diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX] = {0,};
+       int diallingNum_len = 0;
+
+       printf("\n");
+       printf("Enter destination Number:\n>> ");
+       fflush(stdout);
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       diallingNum_len = strlen(diallingNum);
+       memcpy(&diallingNum[diallingNum_len], buf, sizeof(buf));
+
+       diallingNum_len = strlen(diallingNum); //recalculate
+       diallingNum[diallingNum_len] = 0;
+       diallingNum_len = diallingNum_len - 1;
+       printf("dialling num [%s], dialling num len [%d]\n", diallingNum, diallingNum_len);
+
+       printf("Enter Message\n>> ");
+       fflush(stdout);
+
+       ret = read(0, message, sizeof(message));
+       if (ret <= 0) {
+               printf(" NULL msg can NOT be sent \n");
+               return -1;
+       }
+
+       msg_len = strlen(message);
+
+       printf("===========================\n");
+       printf("To: [%s] (len: %d)\n", diallingNum, diallingNum_len);
+       printf("Message: [%s]\nMsg Length: [%d]\n", message, msg_len);
+       printf("===========================\n\n");
+
+       EncodeCdmaSmsSubmitTpdu(diallingNum, diallingNum_len, message, msg_len);
+       //EncodeSmsSubmitTpdu(diallingNum, diallingNum_len,message, msg_len) ;
+
+       return 1;
+}
+
+
+
+
+int ReadMessage()
+{
+       int             menu;
+       int             ret;
+       char    buf[100];
+
+       TapiResult_t returnStatus;
+       int requestId = 0;
+       memset(buf,0, sizeof(buf));
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("1. SIM Message");
+
+       TEST_DEBUG("Select Number:");
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       menu = atoi(buf);
+       TEST_DEBUG("menu in read message(value is 1) is %d ",menu);
+       switch(menu)
+       {
+               case 1:
+
+                       TEST_DEBUG("***Reading the message(Api:GetMsgCount)***");
+                       returnStatus = tel_get_sms_count(&requestId);
+                       TEST_DEBUG("status for read message is %d request Id %d",returnStatus,requestId);
+
+       }
+       return 1;
+}
+
+int DeleteMessage(
+               )
+{
+       int     ret;
+       int     index;
+       char buf[100];
+
+       TapiResult_t returnStatus;
+
+       int requestId = 0;
+
+       memset(buf, 0, sizeof(buf));
+
+       TEST_DEBUG("Enter delete index >>");
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       index=atoi(buf);
+       TEST_DEBUG("index value :%d",index);
+
+
+       TEST_DEBUG("***Deleting the message(Api:DeleteMsg,GetMsgCount)***");
+
+       returnStatus = tel_delete_sms_in_sim(index,&requestId);
+       TEST_DEBUG("returnstatus  delete message  is for delete%d request id %d",returnStatus,requestId);
+       returnStatus = tel_get_sms_count(&requestId);
+       TEST_DEBUG("returnStatus for  delete msg msgcnt  %d requestid %d",returnStatus,requestId);
+
+
+       return 1;
+
+}
+
+int ReceiveMessage(int pdu_len, char * pPDU)
+{
+
+       int                scaAddr_len =0;
+       char                * pTPDU;
+       int                 tpdu_len =0;
+       char                diallingNum[TAPI_NETTEXT_ADDRESS_LEN_MAX];
+       char             scaAddr[TAPI_NETTEXT_SCADDRESS_LEN_MAX]; //service center address
+       int                 sca_ton, sca_npi;
+       int                 position;
+
+       TS_BYTE MTI = 0;
+       TS_BYTE MMS = 0;
+       TS_BYTE SRI = 0;
+       TS_BYTE UDHI = 0;
+       TS_BYTE RP = 0;
+
+       tapi_nettext_coding_scheme dcs;
+       TelSmsDatapackageInfo_t * datapackage;
+       TapiResult_t returnStatus;
+       position=0;
+       int requestId = 0;
+
+       if(pPDU == NULL){
+               TEST_DEBUG("pData is Null")
+               return FALSE;
+       }
+       /*      for debug
+               for( i=0;i<pdu_len ; i++)
+               TEST_DEBUG("[%02x]", pPDU[i]);
+               */
+
+       datapackage = (TelSmsDatapackageInfo_t *)pPDU;
+
+       memset(diallingNum, 0, sizeof(diallingNum));
+
+       SmsUtilDecodeAddrField(diallingNum, (char *)datapackage->Sca, &sca_ton, &sca_npi);
+
+       scaAddr_len = strlen( diallingNum );
+
+       if ( sca_ton == SIM_TON_INTERNATIONAL )
+       {
+               scaAddr[0] = '+';
+               memcpy( &scaAddr[1], diallingNum, scaAddr_len );
+               scaAddr[scaAddr_len+1] = '\0';
+       }
+       else
+       {
+               memcpy( scaAddr, diallingNum, scaAddr_len );
+               scaAddr[scaAddr_len] = '\0';
+       }
+
+       TEST_DEBUG("Sc address in test app is %s",scaAddr);
+
+       RP = datapackage->szData[position] & 0x80;
+       UDHI = datapackage->szData[position] & 0x40;
+       SRI = datapackage->szData[position] & 0x20;
+       MMS = datapackage->szData[position] & 0x04;
+       MTI = datapackage->szData[position] & 0x03;
+
+       TEST_DEBUG("RP [%x]", RP);
+       TEST_DEBUG("UDHI [%x]", UDHI);
+       TEST_DEBUG("SRI [%x]", SRI);
+       TEST_DEBUG("MMS [%x]", MMS);
+       TEST_DEBUG("MTI [%02x]", MTI);
+
+       tpdu_len = datapackage->MsgLength;
+
+       pTPDU = malloc(sizeof(TS_BYTE) * tpdu_len);
+
+       memcpy(pTPDU, &datapackage->szData[position], tpdu_len);
+
+       if(MTI ==SMS_TPDU_DELIVER)
+       {
+               DecodeSmsDeliverTpdu(tpdu_len, pTPDU);
+
+               TEST_DEBUG("dcs_pos : %d", dcs_pos);
+
+               SmsUtilDecodeDCS(&dcs, datapackage->szData[position+dcs_pos]);
+
+               //if(dcs.class_type == TAPI_NETTEXT_CLASS_2)
+               {
+                       TEST_DEBUG("dcs type is of class2");
+                       TelSmsData_t WriteData;
+
+                       memset(&WriteData, 0, sizeof(TelSmsData_t));
+
+                       memcpy(WriteData.SmsData.Sca , datapackage->Sca, TAPI_SIM_SMSP_ADDRESS_LEN);
+
+                       WriteData.SmsData.MsgLength = datapackage->MsgLength;
+
+                       memcpy(WriteData.SmsData.szData, datapackage->szData, datapackage->MsgLength);
+
+                       WriteData.MsgStatus = TAPI_NETTEXT_STATUS_READ;
+
+                       returnStatus = tel_write_sms_in_sim(&WriteData, &requestId);
+
+                       TEST_DEBUG("returnStatus for write  %d requestId :%d",returnStatus,requestId);
+               }
+
+
+       }
+       else if(MTI==SMS_TPDU_STATUS_REPORT)
+       {
+               DecodeSmsStatusReportTpdu(tpdu_len, pTPDU);
+       }
+
+       TelSmsDatapackageInfo_t * del_report= NULL;
+
+       del_report= malloc(sizeof(TelSmsDatapackageInfo_t));
+
+       memset(del_report, 0, sizeof(TelSmsDatapackageInfo_t));
+
+       memcpy(del_report->Sca, datapackage->Sca, TAPI_SIM_SMSP_ADDRESS_LEN);
+
+       del_report->szData[0] = SMS_TPDU_DELIVER_REPORT;        //TP-UDHI[bit6] : 0
+       del_report->szData[1] = 0;      // TP-PI = 0; bit2: TP-UDL bit1: TP-DCS bit0: TP-PID (No option field)
+       del_report->MsgLength = 2;
+
+       TEST_DEBUG("***receive message (Api:SendDeliverreport)****");
+
+
+       returnStatus =tel_send_sms_deliver_report(del_report,TAPI_NETTEXT_SENDSMS_SUCCESS, &requestId);
+
+       TEST_DEBUG("AFter send deliver report request id[%d] & result [0x%x]",requestId,returnStatus);
+
+       free(del_report);
+
+       free(pTPDU);
+
+       return 1;
+}
+
+int GetInformation()
+{
+       int             menu;
+       int             ret;
+       char    buf[100];
+
+       TapiResult_t returnStatus;
+
+       /* Get CB Setting Information */
+       //TS_UINT16 CBChannel[MAX_GSM_SMS_CBMI_LIST_SIZE];
+       int requestId=0;
+
+       memset(buf,0, sizeof(buf));
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("1.Get Service Center Number");
+       TEST_DEBUG("2.Get CB Setting Information");
+       TEST_DEBUG("3.Get SMS Parameters");
+       TEST_DEBUG("4.Get SMS PreferredBearer Information (Not supported)");
+       TEST_DEBUG("5.Get SMS Parameter Count");
+       TEST_DEBUG("6.Get Message Count");
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Select Number:");
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       menu = atoi(buf);
+
+       switch(menu)
+       {
+               case 1:
+                       {
+                               TEST_DEBUG("***Getting the SCA(Api: GetSCA)****");
+                               returnStatus = tel_get_sms_sca(0, &requestId);
+                               TEST_DEBUG("returnstatus for scaddr get %d",returnStatus);
+#if 0
+                               SmsUtilDecodeAddrField(decodeScaAddr, (char*)sc_addr.szDiallingNum, (int *)&sc_addr.Ton, (int *)&sc_addr.Npi);
+
+                               sca_len = strlen( decodeScaAddr );
+
+                               if ( sc_addr.Ton== SIM_TON_INTERNATIONAL )
+                               {
+                                       realScaAddr[0] = '+';
+                                       memcpy( &realScaAddr[1], decodeScaAddr, sca_len );
+                                       realScaAddr[sca_len+1] = '\0';
+                               }
+                               else
+                               {
+                                       memcpy( realScaAddr, decodeScaAddr, sca_len );
+                                       realScaAddr[sca_len] = '\0';
+                               }
+
+                               TEST_DEBUG("===== Decode SCA Address =====");
+                               TEST_DEBUG("SCA Number :%s ",realScaAddr);
+                               TEST_DEBUG("==============================");
+#endif
+                               break;
+                       }
+
+
+               case 2:
+                       {
+
+                               TEST_DEBUG("***Getting the CB Configuration(Api: GetCBConfig)***");
+                               returnStatus =  tel_get_sms_cb_config(&requestId);
+                               TEST_DEBUG("ReturnStatus[%d] Requestid0x%x]",returnStatus,requestId);
+                               break;
+                       }
+
+               case 3:
+                       {
+
+                               TEST_DEBUG("****Getting the parameter(Api:GetParameter)****");
+                               returnStatus = tel_get_sms_parameters(0,&requestId);
+                               TEST_DEBUG("ReturnStatus[%d] Requestid0x%x]",returnStatus,requestId);
+                               break;
+                       }
+               case 4:
+                       {
+
+                               //TEST_DEBUG("***Getting preferrredBearer(Api:GetPreferredBearer)***");
+                               //returnStatus=tel_get_sms_preferred_bearer(&requestId);
+                               //TEST_DEBUG("ReturnStatus[%d] Requestid0x%x]",returnStatus,requestId);
+                               break;
+                       }
+
+               case 5:
+                       {
+                               returnStatus = tel_get_sms_parameter_count(&requestId);
+                               TEST_DEBUG("ReturnStatus[%d] Requestid0x%x]",returnStatus,requestId);
+                               break;
+                       }
+               case 6:
+                       {
+                               returnStatus = tel_get_sms_count(&requestId);
+                               TEST_DEBUG("ReturnStatus[%d] Requestid0x%x]",returnStatus,requestId);
+                               break;
+                       }
+               default:
+                       return -1;
+
+       }
+
+       return 1;
+}
+
+int Setting()
+{
+       int                             settingMenu;
+       int                             ret;
+       char                    buf[512];
+
+       char            MemoryStatus[2]; //2006/8/8
+       char                    bearerType[2];  //2006/8/8
+       char            cbEnable[2];//2006/8/8
+
+       TelSmsCbConfig_t   *pCBConfig;
+
+       int                             memType;
+       int                             index;
+       int                             msgStauts;
+
+       TelSmsParams_t  smsParameters = {0,};
+       TapiResult_t returnStatus;
+       int requestId=0;
+
+       memset(buf,0, sizeof(buf));
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("1.Set Service Center Number");
+       TEST_DEBUG("2.Set PreferredBearer Type");
+       TEST_DEBUG("3.Set Deliver Report");
+       TEST_DEBUG("4.Set CB Enable/Disable");
+       TEST_DEBUG("5.Set SMS Parameters");
+       TEST_DEBUG("6.Set Memory Status");
+       TEST_DEBUG("7.Set Stored MsgStaus");
+       TEST_DEBUG("8.Set Device Ready");
+       TEST_DEBUG("9.Check Device Status");
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Select Number:");
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       settingMenu = atoi(buf);
+
+
+       switch(settingMenu)
+       {
+               case 1:  //Set Service Center Number
+                       {
+                               TEST_DEBUG("***Setting the SCA(Api:SetSCA)****");
+                               TelSmsAddressInfo_t sca;
+
+                               memset(&sca, 0, sizeof(TelSmsAddressInfo_t));
+
+                               sca.DialNumLen = 0x5;
+                               sca.Npi = TAPI_SIM_NPI_ISDN_TEL;
+                               sca.Ton = TAPI_SIM_TON_INTERNATIONAL;
+                               sca.szDiallingNum[0] = 0x28;
+                               sca.szDiallingNum[1] = 0x01;
+                               sca.szDiallingNum[2] = 0x19;
+                               sca.szDiallingNum[3] = 0x11;
+                               sca.szDiallingNum[4] = 0x11;
+
+                               returnStatus =  tel_set_sms_sca(&sca,0,&requestId);
+
+                               TEST_DEBUG("returnstatus after scaddr get is is %d requestId:%d ",returnStatus,requestId);
+
+                               break;
+                       }
+
+               case 2:
+                       {
+                               TEST_DEBUG("****Setting the BearerType(Api:SetPreferredBearer)****");
+
+                               TEST_DEBUG("Enter Bearer Type(1:PD, 2:CS, 3:PDP 4:CSP):");
+
+                               memset(bearerType,0 ,sizeof(bearerType));
+
+                               ret = read(0, bearerType, sizeof(bearerType));
+                               if (ret <= 0) {
+                                       TEST_DEBUG(" NULL msg can NOT be sent ");
+                                       return -1;
+                               }
+                               TEST_DEBUG("Set Preferred Bearer : bearerType =%d ", atoi(bearerType));
+
+                               returnStatus = tel_set_sms_preferred_bearer(atoi(bearerType),&requestId);
+                               TEST_DEBUG("returnStatus  after prefbearer set  is %d, reqid=[%d]",returnStatus,requestId);
+
+                               break;
+                       }
+
+               case 3: //Set Deliver Report
+                       {
+                               TEST_DEBUG("****Setting  Deliver Report(Api:SetDeliverReport)****");
+                               //EncodeSmsDeliverReportTpdu();
+                               break;
+                       }
+               case 4: //Set CB Enable/Disable
+                       {
+                               TEST_DEBUG("****Setting the CB configuration(Api:SetCbConfig)****");
+
+                               TEST_DEBUG("Enter CB ON/OFF (1: Enable, 2:Disable):");
+
+                               memset(cbEnable,0 ,sizeof(cbEnable));
+                               pCBConfig = malloc(sizeof(TelSmsCbConfig_t));
+
+                               ret = read(0, cbEnable, sizeof(cbEnable));
+
+                               if (ret <= 0) {
+                                       TEST_DEBUG(" NULL msg can NOT be sent ");
+                                       return -1;
+                               }
+
+                               pCBConfig->bCBEnabled = atoi(cbEnable);
+                               pCBConfig->SelectedId = 0x01;
+                               pCBConfig->MsgIdCount = 0x02;
+
+                               pCBConfig->MsgIDs[0] = 0x0c;
+                               pCBConfig->MsgIDs[1] = 0x0c;
+                               pCBConfig->MsgIDs[2] = 0xdf;
+                               pCBConfig->MsgIDs[3] = 0x00;
+
+                               TEST_DEBUG("from sms test setting the cb configuration:CBEnabled:%d,selectedId:%d,msgCount:%d,msgId: %d\t %d\t %d\t %d",pCBConfig->bCBEnabled,pCBConfig->SelectedId,pCBConfig->MsgIdCount,pCBConfig->MsgIDs[0],pCBConfig->MsgIDs[1],pCBConfig->MsgIDs[2],pCBConfig->MsgIDs[3]);
+
+                               returnStatus = tel_set_sms_cb_config(pCBConfig,&requestId);
+                               TEST_DEBUG("returnStatus after cbconfig set is is [%d], reqid [%d]",returnStatus,requestId);
+
+                               free(pCBConfig);
+                               break;
+                       }
+
+               case 5:
+                       {
+                               char* name = "Lpg";
+                               char* num = "0103001408";
+                               char* sca = "8210911111";
+
+
+                               TEST_DEBUG("****Setting Parameters(Api:SetParameters)****");
+
+                               smsParameters.RecordIndex = 0x00;
+                               smsParameters.RecordLen = 31;
+                               smsParameters.AlphaIdLen = 3;
+                               memcpy(&smsParameters.szAlphaId,name,strlen(name));
+
+
+                               smsParameters.ParamIndicator = 0xe0;
+                               smsParameters.TpDestAddr.DialNumLen = 10;
+                               smsParameters.TpDestAddr.Ton = 1;
+                               smsParameters.TpDestAddr.Npi = 1;
+
+                               smsParameters.TpSvcCntrAddr.DialNumLen = 10;
+                               smsParameters.TpSvcCntrAddr.Ton = 1;
+                               smsParameters.TpSvcCntrAddr.Npi = 1;
+
+                               memcpy(smsParameters.TpDestAddr.szDiallingNum , num, strlen(num));
+                               memcpy(smsParameters.TpSvcCntrAddr.szDiallingNum, sca, strlen(sca));
+                               smsParameters.TpProtocolId = 3;
+                               smsParameters.TpDataCodingScheme = 2;
+                               smsParameters.TpValidityPeriod = 1;
+
+                               returnStatus = tel_set_sms_parameters(&smsParameters,&requestId);
+                               TEST_DEBUG("returnstatus after sparam set  is %d reqid %d",returnStatus,requestId);
+                               break;
+                       }
+               case 6: //Set Memory Full Notification
+                       {
+                               TEST_DEBUG("Enter Memory Status to be set(1:Memory Available, 2:Memory Full)");
+                               memset(MemoryStatus,0 ,sizeof(MemoryStatus));
+                               ret = read(0, MemoryStatus, sizeof(MemoryStatus));
+                               if (ret <= 0) {
+                                       TEST_DEBUG(" NULL msg can NOT be sent ");
+                                       return -1;
+                               }
+                               TEST_DEBUG("Memory Status type is %d ", atoi(MemoryStatus));
+                               returnStatus =tel_set_sms_memory_status(atoi(MemoryStatus), &requestId);//Set to full 0x02-Full, 0x01-available
+                               TEST_DEBUG("api err after memstatus set is is %d",returnStatus);
+                               break;
+                       }
+               case 7: //Set Stored MsgStaus
+                       {
+                               memType=2;
+                               index=2;
+                               msgStauts =2;
+
+                               //TapiReadNetText(index, &CurMsgStauts, &DataPackage);
+                               returnStatus = tel_read_sms_in_sim(index,&requestId);//To avoid  mismatch of prototypes
+                               TEST_DEBUG("returnStatus after read is is %d",returnStatus);
+
+                               TEST_DEBUG("Before set status : index = %d, CurMsgStauts=%d",index,msgStauts);
+
+                               returnStatus = tel_set_sms_message_status(index,  msgStauts,&requestId);
+                               TEST_DEBUG("returnStatus after msgstatus set is %d",returnStatus);
+
+                               //tapi_nettext_read(index, &CurMsgStauts, &DataPackage);
+                               returnStatus = tel_read_sms_in_sim(index,&requestId);//To avoid  mismatch of prototypes
+                               TEST_DEBUG("returnStatus after read is %d",returnStatus);
+
+                               break;
+                       }
+               case 8:
+                       {
+                               returnStatus =tel_set_sms_device_status();
+                               TEST_DEBUG("returnStatus after read is %d",returnStatus);
+                               break;
+                       }
+               case 9:
+                       {
+                               int status = 0;
+                               returnStatus =tel_check_sms_device_status(&status);
+                               if (status == 1)
+                               {
+                                       TEST_DEBUG("Device Ready");
+                               }
+                               else
+                               {
+                                       TEST_DEBUG("Device Not Ready");
+                               }
+                               TEST_DEBUG("returnStatus after read is %d",returnStatus);
+                               break;
+                       }
+               default:
+                       return -1;
+       }
+       return 1;
+}
+
+
+int sms_read_key_input_cdma(void)
+{
+
+       int     ret;
+       char    buf[512];
+
+       //initialize value
+       memset(buf, 0, sizeof(buf));
+
+       printf("\n");
+       printf("*************************************\n");
+       printf("1.Send New Message\n");
+       printf("2.SMS Exit\n");
+       printf("*************************************\n");
+       printf("Select Number >> ");
+       fflush(stdout);
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0) {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       if (memcmp(buf, "1", sizeof("1") - 1) == 0) {
+               SendMessageCDMA();
+       }
+       if (memcmp(buf, "2", sizeof("2") - 1) == 0) {
+               return -1;
+       }
+
+       return 0;
+}
+
+int sms_read_key_input(void)
+{
+
+       int     ret;
+       char    buf[512];
+       int returnStatus=0;
+
+       //initialize value
+       memset(buf,0, sizeof(buf));
+
+       ret = read(0, buf, sizeof(buf));
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                       perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0)
+               return ret;
+
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("1.Send New Message");
+       TEST_DEBUG("2.Read Message");
+       TEST_DEBUG("3.Delete Message");
+       TEST_DEBUG("4.Delete All Message");
+       TEST_DEBUG("5.Setting");
+       TEST_DEBUG("6.Getting SMS Information");
+       TEST_DEBUG("7.SMS Exit");
+       TEST_DEBUG("*************************************");
+       TEST_DEBUG("Select Number : %s", buf);
+
+       int requestId = 0;
+
+       if( memcmp(buf,"1",sizeof("1")-1) == 0 ){ SendMessage();}
+       if( memcmp(buf,"2",sizeof("2")-1) == 0 ){ ReadMessage();}
+       if( memcmp(buf,"3",sizeof("3")-1) == 0 ){ DeleteMessage();}
+       if( memcmp(buf,"4",sizeof("4")-1) == 0 ){ returnStatus=tel_delete_sms_in_sim(-1,&requestId);TEST_DEBUG("returnStatus:%d,requestId:%d ",returnStatus,requestId);}
+       if( memcmp(buf,"5",sizeof("5")-1) == 0 ){ Setting();}
+       if( memcmp(buf,"6",sizeof("6")-1) == 0 ){ GetInformation();}
+       if( memcmp(buf,"7",sizeof("7")-1) == 0 ){ return -1; }
+
+       return 0;
+}
+
+void SMS_async_event_callback(TelTapiEvent_t* event)
+{
+       //char event_string[IF_NAME_MAX];
+       //char event_string[100];
+       int iSize = 0;
+
+       TEST_DEBUG("Func Entrance");
+       TEST_DEBUG("Request ID : [0x%x]\n", event->RequestId);
+
+//     TAPI_GET_EVENT_NAME(  event->EventType, event_string);
+//     TEST_DEBUG("Event Type [%s]\n", event_string);
+
+       TEST_DEBUG("TAPI Event Status = [0x%0x]", event->Status);
+       if(event->pData==NULL)
+       {
+               TEST_DEBUG("No Event Data!!");
+       }
+       else{
+               iSize = sizeof(event->pData);
+               TEST_DEBUG("Data length:%d", iSize);
+       }
+
+
+       switch(event->EventType)
+       {
+
+               case TAPI_EVENT_NETTEXT_READ_SMS_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$Read Msg Notification $$$");
+                       ReadMsgNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+               case TAPI_EVENT_NETTEXT_GET_COUNT_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$GetMsgCountNotification$$$$");
+                       MsgCountNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ RECEIVE  ACK NOTIFICATION $$$$$$ ");
+                       DecodeSmsSubmitReportTpdu(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_PARAM_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$ GET PARAM NOTI$$$");
+                       param_get_noti(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$Delete Notification$$$");
+                       DeleteMsgNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$Save Status Notification$$");
+                       SaveMsgNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_SET_REQUEST_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$ SET REQUESTCONFIRM NOTI$$$");
+                       set_request_confirm_noti(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$GET CB Config$$$");
+                       GetCBNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF:
+                       TEST_DEBUG("****************************************");
+                       TEST_DEBUG("$$$ GET PREFERRED BEARER$$$");
+                       get_preferred_bearer_noti(iSize, event->pData);
+                       TEST_DEBUG("****************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ DELIVER REPORT NOTI $$$$$$");
+                       Deliver_ReportNoti(event->Status);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_INCOM_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ INCOMING MESSAGE NOTIFICATION $$$$$$ ");
+                       ReceiveMessage(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_CB_INCOM_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ INCOMING CB NOTIFICATION $$$$$$ ");
+                       DecodeCellBroadcastMsg(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ MEMORYF STATUS NOTIFICATION $$$$$$ ");
+                       MemoryFullNotification(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_DEVICE_READY_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$ DEVICE READY NOTI$$$");
+                       Device_ReadyNoti(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_PARAM_COUNT_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$ PARAM COUNT NOTI$$$");
+                       param_count_noti(iSize, event->pData);
+                       TEST_DEBUG("***************************************");
+                       break;
+               case TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF :
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ SENT STATUS EX NOTIFICATION $$$$$$");
+                       TEST_DEBUG("Test appl. is Not implemented yet");
+                       TEST_DEBUG("***************************************");
+                       break;
+               case TAPI_EVENT_NETTEXT_INCOM_EX_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ INCOM EX NOTIFICATION $$$$$$");
+                       TEST_DEBUG("Test appl. is Not implemented yet");
+                       TEST_DEBUG("***************************************");
+                       break;
+               case TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ CB INCOM EX NOTIFICATION $$$$$$");
+                       TEST_DEBUG("Test appl. is Not implemented yet");
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               case TAPI_EVENT_NETTEXT_GET_SCA_CNF:
+                       TEST_DEBUG("***************************************");
+                       TEST_DEBUG("$$$$$$ GET SCA NOTIFICATION $$$$$$");
+                       TEST_DEBUG("Test appl. is Not implemented yet");
+                       TEST_DEBUG("***************************************");
+                       break;
+
+               default:
+                       TEST_DEBUG("Event Type: unknown event:[%d]\n", event->EventType);
+                       break;
+       }
+}
+
+
+int sms_subscribe_tapi_events()
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfSMSEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int SMSEvtList[] =
+       {
+               TAPI_EVENT_NETTEXT_READ_SMS_CNF,
+               TAPI_EVENT_NETTEXT_GET_COUNT_CNF,
+               TAPI_EVENT_NETTEXT_SENTSTATUS_CNF,
+               TAPI_EVENT_NETTEXT_GET_PARAM_CNF,
+               TAPI_EVENT_NETTEXT_DELETE_STATUS_CNF,
+               TAPI_EVENT_NETTEXT_SAVE_STATUS_CNF,
+               TAPI_EVENT_NETTEXT_SET_REQUEST_CNF,
+               TAPI_EVENT_NETTEXT_GET_CB_CONFIG_CNF,
+               TAPI_EVENT_NETTEXT_GET_SMSBEARER_CNF,
+               TAPI_EVENT_NETTEXT_DELIVERY_REPORT_CNF,
+               TAPI_EVENT_NETTEXT_INCOM_IND,
+               TAPI_EVENT_NETTEXT_CB_INCOM_IND,
+               TAPI_EVENT_NETTEXT_MEMORY_STATUS_IND,
+               TAPI_EVENT_NETTEXT_DEVICE_READY_IND,
+               TAPI_EVENT_NETTEXT_PARAM_COUNT_IND,
+               TAPI_EVENT_NETTEXT_SENTSTATUS_EX_CNF,
+               TAPI_EVENT_NETTEXT_INCOM_EX_IND,
+               TAPI_EVENT_NETTEXT_CB_INCOM_EX_IND,
+               TAPI_EVENT_NETTEXT_GET_SCA_CNF,
+       };
+
+       iNumOfSMSEvt = sizeof(SMSEvtList)/sizeof(int);
+       //TAPI_CALLOC(SMS_subscription_id, iNumOfSMSEvt, unsigned int)
+       //#define TAPI_CALLOC(ptr, no_elements, type)   s
+       SMS_subscription_id = (unsigned int *) calloc (iNumOfSMSEvt , sizeof (unsigned int));
+       if(SMS_subscription_id == NULL)
+       {
+               TEST_DEBUG("calloc error -NULL, errno is [%d]", errno);
+       }
+
+
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               for( i=0 ; i< iNumOfSMSEvt; i++ )
+               {
+                       api_err = tel_register_event(SMSEvtList[i], &SMS_subscription_id[i],(TelAppCallback)&SMS_async_event_callback,NULL);
+
+                       if(api_err != TAPI_API_SUCCESS)
+                       {
+                               TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", SMSEvtList[i],api_err);
+                               ret_val = FALSE;
+                               break;
+                       }
+               }
+       }
+       else
+       {
+               TEST_DEBUG("TelTapiInit() failed");
+       }
+       return ret_val;
+}
+
+void sms_select_loop_cdma(void)
+{
+       int ret;
+       fd_set readfds;
+       printf("Select Loop!\nPress enter key\n");
+       fflush(stdout);
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+               {
+                       if (FD_ISSET(0, &readfds))
+                       {
+                               if( sms_read_key_input_cdma() < 0)
+                               {
+                                       return;
+                               }
+                       }
+               }
+       }
+}
+
+void sms_select_loop_wcdma(void)
+{
+       int ret;
+       fd_set readfds;
+       printf("Select Loop!\n");
+
+       while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+               ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+               {
+                       if (FD_ISSET(0, &readfds))
+                       {
+                               if( sms_read_key_input() <0 )
+                               {
+                                       return;
+                               }
+                       }
+               }
+       }
+}
+
+
+
+void sms_select_loop()
+{
+       int iNum;
+       char buf[255];
+
+       while (1) {
+               printf("*************************************\n");
+               printf("1. WCDMA\n");
+               printf("2. CDMA\n");
+               printf("0. Exit\n");
+               printf("*************************************\n");
+               printf("Select Number by Network Type\n>> ");
+
+               fflush(stdout);
+               fflush(stdin);
+
+               memset(buf, 0, 255);
+               fgets(buf, 255, stdin);
+               iNum = atoi(buf);
+
+               if (iNum == 1) {
+                       sms_select_loop_wcdma();
+               }
+               else if (iNum == 2) {
+                       sms_select_loop_cdma();
+               }
+               else if (iNum == 0) {
+                       printf("SMS Program is terminated.\n");
+                       return;
+               }
+               else {
+                       printf("Input wrong number\n");
+               }
+       }
+
+       return;
+}
+
+void tapi_sms_thread()
+{
+       TEST_DEBUG("start tapi_nettext_thread");
+       //select_loop();
+       TEST_DEBUG ("thread exited");
+       pthread_exit(NULL);
+}
+
+void sms_test_main(int argc, char *argv[])
+{
+
+       int ret = 0, subscription_id = 0;
+       pthread_t nettext_thread_id;
+       TapiResult_t api_err = TAPI_API_SUCCESS;
+
+       TEST_DEBUG("\n ===== NETTEXT  ver RAMU =====");
+
+       ret = pthread_create(&nettext_thread_id, NULL, (void *)&tapi_sms_thread, NULL);
+
+       if(ret != 0)
+       {
+               TEST_DEBUG("Thread for TAPI Events Failed");
+       }
+
+       TEST_DEBUG("Before pthread join");
+
+       TEST_DEBUG("after TelTapiRegisterClass sub id is %d api_err is %d",subscription_id,api_err);
+
+       pthread_join(nettext_thread_id, NULL);
+
+       return;
+}
+//eof
+
diff --git a/src/test_apps/tapi_sms_test.h b/src/test_apps/tapi_sms_test.h
new file mode 100644 (file)
index 0000000..03e78b6
--- /dev/null
@@ -0,0 +1,648 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 TAPI_SMS_CDMA_H
+#define TAPI_SMS_CDMA_H
+
+/*
+   typedef unsigned char       INT8;
+   typedef unsigned short      INT16;
+   typedef unsigned int        INT;
+   typedef unsigned long       INT32;
+
+   typedef unsigned char       BYTE;
+   */
+
+typedef int BOOL;
+
+#ifndef packed__
+#define packed__ __attribute__ ((packed))
+#endif
+
+//=============================================================
+//
+//             PARAMETER_ID
+//
+//=============================================================
+#define PARAMID_TELESERVICE_ID                         0x01    /* Teleservice Identifier */
+#define PARAMID_SERVICE_CATEGORY                       0x02    /* Broadcast Service Category */
+#define PARAMID_ADDRESS                                        0x03    /* Address */
+#define PARAMID_SUBADDRESS                             0x04    /* Subaddress */
+#define PARAMID_BEARER_REPLY                           0x05    /* Bearer Reply Option */
+#define PARAMID_CAUSE_CODES                            0x06    /* Cause Codes */
+#define PARAMID_MESSAGE_ID                             0x07    /* Message Identifier */
+#define PARAMID_USER_DATA                                      0x08    /* User Data */
+#define PARAMID_USER_RESPONSE_CODE             0x09    /* User Response Code */
+#define PARAMID_MC_TIME_STAMP                  0x0A    /* Message Center Time Stamp */
+#define PARAMID_VALIDITY_PERIOD_ABS            0x0B    /* Validity Period - Absolute */
+#define PARAMID_VALIDITY_PERIOD_REL            0x0C    /* Validiry Period - Relative */
+#define PARAMID_DEFERRED_DELIVERY_ABS  0x0D    /* Deferred Delivery Time - Absolute */
+#define PARAMID_DEFERRED_DELIVERY_REL  0x0E    /* Deferred Delivery Time - Relative */
+#define PARAMID_PRIORITY                                       0x0F    /* Priority Indicator */
+#define PARAMID_PRIVACY                                        0x10    /* Privacy Indicator */
+#define PARAMID_REPLY_OPTION                           0x11    /* Reply Option */
+#define PARAMID_NUMBER_OF_MESSAGE              0x12    /* Number of Messages : Voice Mail Count */
+#define PARAMID_ALERT_ON_DELIVERY                      0x13    /* Alert on Message Delivery */
+#define PARAMID_LANGUAGE                                       0x14    /* Langauge Indicator */
+#define PARAMID_CALLBACK                                       0x15    /* Call Back Number */
+#define PARAMID_DISPLAY_MODE                           0x16    /* Display Mode */
+#define PARAMID_MULTI_ENCODING_USER_DATA       0x17    /* Multiply Encoding User Data */
+#define PARAMID_MEMORY_INDEX                           0x18    /* Memory address stored in Phone Memory */
+#define PARAMID_BEARER_DATA                            0x19    /* Bearer data - raw data  */
+
+//=============================================================
+//
+//             PARAMETER_DATA
+//
+//=============================================================
+
+//------------------------------------------------------------------------------
+// PARAMID_TELESERVICE_ID                      0x01    /* Teleservice Identifier */
+//------------------------------------------------------------------------------
+/* Common TELESERVICE ID's */
+#define TELESERVICEID_CPT95                            0x1001  /* 4097 : Paging */
+#define TELESERVICEID_CMT95                            0x1002  /* 4098 : Text Message */
+#define TELESERVICEID_VMN95                            0x1003  /* 4099 : Voice Mail Notification */
+#define TELESERVICEID_WAP                                      0x1004  /* WAP Message */
+
+//------------------------------------------------------------------------------
+// PARAMID_BCSERVICECATEGORY           0x02    /* Broadcast Service Category */
+//------------------------------------------------------------------------------
+// The Korean Wireless Service Carrier's do not use below Service Category's
+// Below Service Category's depend on the Carriers.
+#define CATEGORY_UNKNOWN                               0x00
+#define CATEGORY_EMERGENCY                             0x01
+#define CATEGORY_ADMIN                                 0x02
+#define CATEGORY_MAINTENANCE                   0x03
+#define CATEGORY_GEN_NEWS_LOC                  0x04
+#define CATEGORY_GEN_NEWS_REG                  0x05
+#define CATEGORY_GEN_NEWS_NAT                  0x06
+#define CATEGORY_GEN_NEWS_INT                  0x07
+#define CATEGORY_FIN_NEWS_LOC                  0x08
+#define CATEGORY_FIN_NEWS_REG                  0x09
+#define CATEGORY_FIN_NEWS_NAT                  0x0A
+#define CATEGORY_FIN_NEWS_INT                  0x0B
+#define CATEGORY_SPT_NEWS_LOC                  0x0C
+#define CATEGORY_SPT_NEWS_REG                  0x0D
+#define CATEGORY_SPT_NEWS_NAT                  0x0E
+#define CATEGORY_SPT_NEWS_INT                  0x0F
+#define CATEGORY_ENT_NEWS_LOC                  0x10
+#define CATEGORY_ENT_NEWS_REG                  0x11
+#define CATEGORY_ENT_NEWS_NAT                  0x12
+#define CATEGORY_ENT_NEWS_INT                  0x13
+#define CATEGORY_LOC_WEATHER                   0x14
+#define CATEGORY_AREA_TRAFFIC                  0x15
+#define CATEGORY_AIRPORT_SCHED                 0x16
+#define CATEGORY_RESTAURANTS                   0x17
+#define CATEGORY_LODGINGS                              0x18
+#define CATEGORY_RETAILS                               0x19
+#define CATEGORY_ADS                                   0x1A
+#define CATEGORY_STOCK_QUOTES                  0x1B
+#define CATEGORY_JOBS                                  0x1C
+#define CATEGORY_MEDICAL                               0x1D
+#define CATEGORY_TECH_NEWS                             0x1E
+#define CATEGORY_MULTI                                 0x1F
+
+//------------------------------------------------------------------------------
+// PARAMID_ADDRESS                                     0x03    /* Address */
+//------------------------------------------------------------------------------
+
+/* DIGIT MODE : CHARi[] filed�� 4bit dtmf code���� 8bit code������ �ǹ��Ѵ�.
+*/
+#define DIGITMODE_4BITDTMF                     0x00
+#define DIGITMODE_8BITCODE                     0x01
+
+/* NUMBER MODE
+*/
+#define NUMMODE_NONE_DATANETWORK       0x00    /* in ANSI TI.607 */
+#define NUMMODE_DATANETWORK                    0x01
+
+/* NUMBER TYPE
+*/
+/* The following are used when number mode is not data network address.
+*/
+#define NUMBER_TYPE_UNKNOWN                    0x00
+#define NUMBER_TYPE_INTERNATIONAL      0x01
+#define NUMBER_TYPE_NATIONAL           0x02
+#define NUMBER_TYPE_NETWORK                    0x03
+#define NUMBER_TYPE_SUBSCRIBER         0x04
+#define NUMBER_TYPE_RESERVED_5         0x05
+#define NUMBER_TYPE_ABREVIATED         0x06
+#define NUMBER_TYPE_RESERVED_7         0x07
+/* The following are used only when number mode is data network address
+   mode.
+   */
+#define NUMBER_TYPE_IP                         0x01
+#define NUMBER_TYPE_EMAILADDR          0x02
+
+/* NUMBER PLAN
+*/
+#define NUMBER_PLAN_UNKNOWN                    0x00
+#define NUMBER_PLAN_TELEPHONY          0x01    /* CCITT E.164 and E.163,  including ISDN plan */
+#define NUMBER_PLAN_RESERVED_2         0x02
+#define NUMBER_PLAN_DATA                       0x03    /* CCITT X.121 */
+#define NUMBER_PLAN_TELEX                      0x04    /* CCITT F.69 */
+#define NUMBER_PLAN_RESERVED_5         0x05
+#define NUMBER_PLAN_RESERVED_6         0x06
+#define NUMBER_PLAN_RESERVED_7         0x07
+#define NUMBER_PLAN_RESERVED_8         0x08
+#define NUMBER_PLAN_PRIVATE                    0x09
+#define NUMBER_PLAN_RESERVED_10                0x0A
+#define NUMBER_PLAN_RESERVED_11                0x0B
+#define NUMBER_PLAN_RESERVED_12                0x0C
+#define NUMBER_PLAN_RESERVED_13                0x0D
+#define NUMBER_PLAN_RESERVED_14                0x0E
+#define NUMBER_PLAN_RESERVED_15                0x0F
+
+/* NUM_FIELDS
+*/
+/*             MAXLENGTH_SMS_ADDRESS                   Maximum sms destination(or origination ) address /call back number */
+#define        MAXLENGTH_SMS_ADDRESS           20
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_SUBADDRESS                          0x04    /* Subaddress */
+//------------------------------------------------------------------------------
+/* SUB ADDRESS TYPE
+*/
+#define SUBADDR_NSAP                           0x00    /* CCITT X.213 or ISO 8348 AD2 */
+#define SUBADDR_USER_SPECIFIED         0x01    /* e.g. X.25 */
+
+/* ODD  : �̰��� �� �ʿ��Ѱ� ? phone���� ������ 4bit�� �����ϸ� �Ǵ°� �ƴѰ� ?
+*/
+/* If the last CHARi field contains information only in the 4 most significant bits,
+   the ODD field shall be set to '1'.  Otherwise, the ODD field shall be set to '0'.
+   */
+#define SUBADDR_EVEN                           0x00
+#define SUBADDR_ODD                                    0x01
+
+/* NUM_FIELDS
+*/
+
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_BEARER_REPLY                                0x05    /* Bearer Reply Option */
+//------------------------------------------------------------------------------
+/* REPLY_SEQ
+*/
+// Range : 0 - 63
+//      refer to MAXLENGTH_SMS_REPLY_SEQUENCE_NUMBER
+
+//------------------------------------------------------------------------------
+// PARAMID_CAUSE_CODES                         0x06    /* Cause Codes */
+//------------------------------------------------------------------------------
+/* REPLY_SEQ
+*/
+// Range : 0 - 63
+// Refer to MAXLENGTH_SMS_REPLY_SEQUENCE_NUMBER
+
+/* ERROR_CLASS
+*/
+#define ERRORCLASS_NONE                                        0x00    /* No Error */
+#define ERRORCLASS_TEMP                                        0x02    /* Tempory Error */
+#define ERRORCLASS_PERMANENT                   0x03    /* Permanent Error */
+#define ERRORCLASS_INTERNAL                            0x04    /* Phone Internal Error */
+
+/* CAUSE_CODE : defined in IS-41D
+*/
+
+/* A. Network Problems:
+*/
+#define CAUSECODE_ADDRESS_VACANT                                                       0
+#define CAUSECODE_ADDRESS_TRANSLATION_FAILURE                          1
+#define CAUSECODE_NETWORK_RESOURCE_SHORTAGE                                    2
+#define CAUSECODE_NETWORK_FAILURE                                                      3
+#define CAUSECODE_INVALID_TELESERVICE_ID                                       4
+#define CAUSECODE_OTHER_NETWORK_PROBLEM                                                5
+#define CAUSECODE_OTHER_NETWORK_PROBLEM_MORE_FIRST                     6
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_NETWORK_PROBLEM_S   */
+#define IPC_CAUSECODE_OTHER_NETWORK_PROBLEM_MORE_LAST                  31
+
+/* B. Terminal Problems:
+*/
+#define CAUSECODE_NO_PAGE_RESPONSE                                                     32
+#define CAUSECODE_DESTINATION_BUSY                                                     33
+#define CAUSECODE_NO_ACK                                                                       34
+#define CAUSECODE_DESTINATION_RESOURCE_SHORTAGE                                35
+#define CAUSECODE_SMS_DELIVERY_POSTPONED                                       36
+#define CAUSECODE_DESTINATION_OUT_OF_SERVICE                           37
+#define CAUSECODE_DESTINATION_NO_LONGER_AT_THIS_ADDRESS                38
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM                                       39
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM_MORE_FIRST                    40
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_TERMINAL_PROBLEM_S */
+#define CAUSECODE_OTHER_TERMINAL_PROBLEM_MORE_LAST                     47
+#define CAUSECODE_SMS_DELIVERY_POSTPONED_MORE_FIRST                    48
+#define CAUSECODE_SMS_DELIVERY_POSTPONED_MORE_LAST                     63
+
+/* C. Radio Interface Problems:
+*/
+#define CAUSECODE_RADIO_IF_RESOURCE_SHORTAGE                           64
+#define CAUSECODE_RADIO_IF_INCOMPATIBLE                                                65
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM                                       66
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM_MORE_FIRST                    67
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_RADIO_IF_PROBLEM */
+#define CAUSECODE_OTHER_RADIO_IF_PROBLEM_MORE_LAST                     95
+
+/* D. General Problems:
+*/
+#define CAUSECODE_UNEXPECTED_PARM_SIZE                                         96
+#define CAUSECODE_SMS_ORIGINATION_DENIED                                       97
+#define CAUSECODE_SMS_TERMINATION_DENIED                                       98
+#define CAUSECODE_SUPPL_SERVICE_NOT_SUPPORTED                          99
+#define CAUSECODE_SMS_NOT_SUPPORTED                                                    100
+#define CAUSECODE_RESERVED_101                                                         101
+#define CAUSECODE_MISSING_EXPECTED_PARM                                                102
+#define CAUSECODE_MISSING_MANDATORY_PARM                                       103
+#define CAUSECODE_UNRECOGNIZED_PARM_VALUE                                      104
+#define CAUSECODE_UNEXPECTED_PARM_VALUE                                                105
+#define CAUSECODE_USER_DATA_SIZE_ERROR                                         106
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS                                       107
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS_MORE_FIRST                    108
+/* all values within this range are treated as IPC_CAUSECODE_OTHER_GENERAL_PROBLEMS */
+#define CAUSECODE_OTHER_GENERAL_PROBLEMS_MORE_LAST                     255
+
+//------------------------------------------------------------------------------
+// PARAMID_MESSAGE_ID                          0x07    /* Message Identifier */
+//------------------------------------------------------------------------------
+/* MESSAGE_TYPE
+*/
+#define MESSAGETYPE_DELIVER                            0x01
+#define MESSAGETYPE_SUBMIT                             0x02
+#define MESSAGETYPE_CANCEL                             0x03
+#define MESSAGETYPE_DELIVERY_ACK               0x04
+#define MESSAGETYPE_USER_ACK                   0x05
+
+/* MESSAGE_ID
+*/
+// 2 bytes :    Range : 0 - 65535
+
+//------------------------------------------------------------------------------
+// PARAMID_USER_DATA                                   0x08    /* User Data */
+//------------------------------------------------------------------------------
+/* MESSAGE_ENCODING
+*/
+#define MSGENCODING_UNSPECIFIED                                                0x00    /* OCTET */
+#define MSGENCODING_IS91_EXTENDED_PROTOCOL                     0x01    /* */
+#define MSGENCODING_7BIT_ASCII                                         0x02    /* */
+#define MSGENCODING_IA5                                                                0x03    /* */
+#define MSGENCODING_UNICODE                                                    0x04    /* */
+#define MSGENCODING_SHIFT_JIS                                          0x05    /* */
+#define MSGENCODING_KSC5601                                                    0x06    /* Korean */
+#define MSGENCODING_HEBREW                                                     0x07    /* ISO_8859_8 */
+#define MSGENCODING_LATIN                                                      0x08    /* ISO_8859_1 */
+#define MSGENCODING_KSC5601_3PCS                                               0x10    /* Korean Standard */
+
+#define        MAXLENGTH_SMS_USER_DATA                                         160
+//------------------------------------------------------------------------------
+// PARAMID_USER_RESPONSE_CODE          0x09    /* User Response Code */
+//------------------------------------------------------------------------------
+/* USER_RESPONSE_CODE
+*/
+// This field value depends on the Teleservices or the carrier
+// This field had used in the Interactive Teleservices in Korea
+// currently the wireless service carriers adopt the browser( WAP,etc )
+// instead of SMS protocol in order to serve the interactive teleservice.
+
+//------------------------------------------------------------------------------
+// PARAMID_MC_TIME_STAMP                               0x0A    /* Message Center Time Stamp */
+//------------------------------------------------------------------------------
+
+/* YEAR
+*/
+// 4bit BCD Code,  example : if the year is 2002, the YEAR field contains 0x02.
+
+/* MONTH
+*/
+// 1 ~ 12 ( in decimal )
+
+/* DAY
+*/
+// 1 ~ 31( in decimal )
+
+/* HOUR
+*/
+// 0 ~ 23 ( in decimal )
+
+/* MINUTE
+*/
+// 0 ~ 59 ( in decimal )
+
+/* SECOND
+*/
+// 0 ~ 59 ( in decimal )
+
+//------------------------------------------------------------------------------
+// PARAMID_VALIDITY_PERIOD_ABS         0x0B    /* Validity Period - Absolute */
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// PARAMID_VALIDITY_PERIOD_REL         0x0C    /* Validiry Period - Relative */
+//------------------------------------------------------------------------------
+/* VALIDITY
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_DEFERRED_DELIVERY_ABS               0x0D    /* Deferred Delivery Time - Absolute */
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// PARAMID_DEFERRED_DELIVERY_REL               0x0E    /* Deferred Delivery Time - Relative */
+//------------------------------------------------------------------------------
+/* DELIVERY_TIME
+*/
+
+//------------------------------------------------------------------------------
+// PARAMID_PRIORITY                                    0x0F    /* Priority Indicator */
+//------------------------------------------------------------------------------
+#define PRIORITY_NORMAL                                        0x00
+#define PRIORITY_INTERACTIVE                   0x01
+#define PRIORITY_URGENT                                        0x02
+#define PRIORITY_EMERGENCY                             0x03
+
+//------------------------------------------------------------------------------
+// PARAMID_PRIVACY                                     0x10    /* Privacy Indicator */
+//------------------------------------------------------------------------------
+#define PRIVACY_NOT_RESTRICTED                 0x00
+#define PRIVACY_RESTRICTED                             0x01
+#define PRIVACY_CONFIDENTIAL                   0x02
+#define PRIVACY_SECRET                                 0x03
+
+//------------------------------------------------------------------------------
+// PARAMID_REPLY_OPTION                                0x11    /* Reply Option */
+//------------------------------------------------------------------------------
+
+// USER_ACK_REQ : user ack requested
+#define SMS_USER_ACK_NOT_REQUESTED             0x00
+#define SMS_USER_ACK_REQUESTED                 0x01
+
+// DAK_REQ : delivery ack requested
+#define SMS_DELIVERY_ACK_NOT_REQUESTED 0x00
+#define SMS_DELIVERY_ACK_REQUESTED             0x01
+
+//------------------------------------------------------------------------------
+// PARAMID_NUMBER_OF_MESSAGE                   0x12    /* Number of Messages : Voice Mail Count */
+//------------------------------------------------------------------------------
+/* MESSAGE_COUNT : voice mail count ( 0 - 99 )
+*/
+// refer to            MAXLENGTH_SMS_VOICE_MAIL_COUNT          99
+
+//------------------------------------------------------------------------------
+// PARAMID_ALERT_ON_DELIVERY                   0x13    /* Alert on Message Delivery */
+//------------------------------------------------------------------------------
+// IS-637B Feature : not yet adopted
+//             IPC_ALERT_PRIORITY_DEFAULT                      0x00    /* mobile default */
+//             IPC_ALERT_PRIORITY_LOW                          0x01    /* low priority alert: This alert is defined by the mobile station */
+//             IPC_ALERT_PRIORITY_MED                          0x02    /* medium priority alert : This alert is defined by the mobile station */
+//             IPC_ALERT_PRIORITY_HIGH                         0x03    /* high priority alert : This alert is defined by the mobile station */
+
+//------------------------------------------------------------------------------
+// PARAMID_LANGUAGE                                    0x14    /* Langauge Indicator */
+//------------------------------------------------------------------------------
+#define IPC_LANGUAGE_UNKNOWN                           0x00
+#define IPC_LANGUAGE_ENGLISH                           0x01
+#define IPC_LANGUAGE_FRENCH                                    0x02
+#define IPC_LANGUAGE_SPANISH                           0x03
+#define IPC_LANGUAGE_JAPANESE                          0x04
+#define IPC_LANGUAGE_KOREAN                                    0x05
+#define IPC_LANGUAGE_CHINESE                           0x06
+#define IPC_LANGUAGE_HEBREW                                    0x07
+#define IPC_LANGUAGE_KOREAN1                           0x40    /* Used in korean 3 PCS's and STI */
+#define IPC_LANGUAGE_KOREAN_SKT                                0xFE    /* Used in only SKT  */
+
+//------------------------------------------------------------------------------
+// PARAMID_CALLBACK                                    0x15    /* Call Back Number */
+//------------------------------------------------------------------------------
+/* DIGIT_MODE : CHARi[] filed�� 4bit dtmf code���� 8bit code������ �ǹ��Ѵ�.
+*/
+// refer to :
+//             DIGITMODE_4BITDTMF                      0x00
+//             DIGITMODE_8BITCODE                      0x01
+
+/* NUMBER_TYPE
+*/
+// refer to :
+//             NUMBER_TYPE_UNKNOWN                     0x00
+//             NUMBER_TYPE_INTERNATIONAL               0x01
+//             NUMBER_TYPE_NATIONAL                    0x02
+//             NUMBER_TYPE_NETWORK                     0x03
+//             NUMBER_TYPE_SUBSCRIBER          0x04
+//             NUMBER_TYPE_RESERVED_5          0x05
+//             NUMBER_TYPE_ABREVIATED          0x06
+//             NUMBER_TYPE_RESERVED_7          0x07
+
+/* NUMBER_PLAN
+*/
+// refer to :
+//             NUMBER_PLAN_UNKNOWN                     0x00
+//             NUMBER_PLAN_TELEPHONY                   0x01    /* CCITT E.164 and E.163,  including ISDN plan */
+//             NUMBER_PLAN_RESERVED_2          0x02
+//             NUMBER_PLAN_DATA                                0x03    /* CCITT X.121 */
+//             NUMBER_PLAN_TELEX                               0x04    /* CCITT F.69 */
+//             NUMBER_PLAN_RESERVED_5          0x05
+//             NUMBER_PLAN_RESERVED_6          0x06
+//             NUMBER_PLAN_RESERVED_7          0x07
+//             NUMBER_PLAN_RESERVED_8          0x08
+//             NUMBER_PLAN_PRIVATE                     0x09
+//             NUMBER_PLAN_RESERVED_10         0x0A
+//             NUMBER_PLAN_RESERVED_11         0x0B
+//             NUMBER_PLAN_RESERVED_12         0x0C
+//             NUMBER_PLAN_RESERVED_13         0x0D
+//             NUMBER_PLAN_RESERVED_14         0x0E
+//             NUMBER_PLAN_RESERVED_15         0x0F
+
+/* NUM_FIELDS
+*/
+// refer to :
+//             MAXLENGTH_SMS_ADDRESS                   32
+
+/* CHARi
+*/
+
+//------------------------------------------------------------------------------
+// IPC_SMSPARAMID_DISPLAY_MODE                         0x16    /* Display Mode */
+//------------------------------------------------------------------------------
+// IS-637B Feature : not yet adopted
+
+
+//------------------------------------------------------------------------------
+// IPC_SMSPARAMID_MULTI_ENCODING_USER_DATA     0x17    /* Multiply Encoding User Data */
+//------------------------------------------------------------------------------
+// refer to :
+
+// Teleservice Identifier
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT16                       teleserv_id;
+} packed__ ParamTeleserv_t;
+
+// Broadcast Service Category
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT16                       category;
+} packed__ ParamBcServCat_t;
+
+// Address
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        digit;
+       TS_UINT8                        num;
+       TS_UINT8                        numtype;
+       TS_UINT8                        numplan;
+       TS_UINT8                        len;
+       TS_UINT8                        CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamAddress_t;
+
+// Sub-Address
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        type;
+       TS_UINT8                        odd;
+       TS_UINT8                        len;
+       TS_UINT8                        CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamSubAddress_t;
+
+// Bearer Reply Option
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT16                       repyseq;
+} packed__ ParamBearerReplyOption_t;
+
+// Cause Codes
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        repyseq;
+       TS_UINT8                        class;
+       TS_UINT8                        code;
+} packed__ ParamErrorCause_t;
+
+// Message Identifier
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        type;
+       TS_UINT16                       msg_id;
+} packed__ ParamMsgId_t;
+
+// User Data
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        encoding;
+       TS_UINT8                        len;
+       TS_UINT8                        CHARi[MAXLENGTH_SMS_USER_DATA];
+} packed__ ParamUserData_t;
+
+// User Response code
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        code;
+} packed__ ParamUserResp_t;
+
+// Message Center Time Stamp, Validity Period, Deferred Delivery Time
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        year;
+       TS_UINT8                        month;
+       TS_UINT8                        day;
+       TS_UINT8                        hours;
+       TS_UINT8                        minutes;
+       TS_UINT8                        seconds;
+} packed__ ParamValidPeriodA_t, ParamDefDeliverTimeA_t;
+
+// Validity Period - Relative
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        valid;
+} packed__ ParamValidPeriodR_t, ParamDefDeliverTimeR_t;
+
+// Priority Indicator, Alert on Message Delivery
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        priority;
+} packed__ ParamPriority_t, ParamAlertPriority_t;
+
+// Privacy Indicator
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        privacy;
+} packed__ ParamPrivacy_t;
+
+// Reply Option
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        user_ack;
+       TS_UINT8                        delivery_ack;
+} packed__ ParamReplyOption_t;
+
+// Number of Messages
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        count;
+} packed__ ParamNumOfMsg_t;
+
+// Language indicator
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        language;
+} packed__ ParamLangInd_t;
+
+// Message display Mode
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        disply_mode;
+} packed__ ParamMsgDisplayMode_t;
+
+// Address
+typedef struct{
+       TS_UINT8                        param_id;
+       TS_UINT8                        param_len;
+       TS_UINT8                        digit;
+       TS_UINT8                        numtype;
+       TS_UINT8                        numplan;
+       TS_UINT8                        len;
+       TS_UINT8                        CHARi[MAXLENGTH_SMS_ADDRESS];
+} packed__ ParamCallback_t;
+
+typedef struct{
+       TS_UINT32                       index;
+       TS_UINT8                        data[255];
+} packed__ Message_t;
+
+#endif //TAPI_SMS_CDMA_H
+// EOF
+
diff --git a/src/test_apps/tapi_sms_util.c b/src/test_apps/tapi_sms_util.c
new file mode 100644 (file)
index 0000000..5b2ef38
--- /dev/null
@@ -0,0 +1,863 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include "tapi_sms_util.h"
+
+
+void  reverse(char* x, int len)
+{
+       int i, j = len - 1;
+
+       for (i = 0; i < j; i++)
+       {
+               int t = x[i];
+               x[i] = x[j];
+               x[j--] = t;
+       }
+}
+
+char*  AcItoa(int n, char* str, int b)
+{
+       int i = 0;
+
+       do
+               str[i++] = "0123456789ABCDEF"[n%b];
+
+       while ((n /= b) > 0);
+       reverse(str, i);
+       str[i] = '\0';
+
+       return str;
+}
+
+int  AcToupper(int ch)
+{
+       return (('a' <= (ch) && (ch) <= 'z')? ((ch) - ('a'-'A')) : (ch));
+}
+
+char* SmsUtilUnpackGSMCode(char* szData, const char* pIn, int in_len )
+{
+       int i;
+       int pos = 0;
+       int shift = 0;
+
+       /* If the number of fill bits != 0, then it would cause an additional shift */
+       /*
+       if ( shift != 0 )
+               pos = pos + 1;
+
+       if ( shift ==7 )
+               shift = 0;
+       */
+
+       for ( i = 0; i < in_len; i++, pos++ )
+       {
+               szData[i] = ( pIn[pos] << shift ) & 0x7F;
+
+               if ( pos != 0 )
+               {
+                       /* except the first byte, a character contains some bits
+                       ** from the previous byte.
+                       */
+                       szData[i] |= pIn[pos-1] >> (8-shift);
+               }
+
+               shift ++;
+
+               if ( shift == 7 )
+               {
+                       shift = 0;
+
+                       /* a possible extra complete character is available */
+                       i++;
+                       szData[i] = pIn[pos] >> 1;
+
+                       if( szData[i] == 0 )
+                       {
+                               /* this is the end of the input, quit */
+                               break;
+                       }
+               }
+       }
+
+       return szData;
+}
+
+int SmsUtilPackGSMCode( TS_BYTE* pOut, const char* szData, int in_len )
+{
+       int i;
+       int pos;
+       int shift = 0;
+       //shift = fill_bits;
+
+       //  memset( out, 0, out_len_max );
+
+       /* pack the ASCII characters
+       */
+       /*
+       if ( shift == 7 )
+               shift = 0;
+       */
+
+       for( pos = 0, i = 0; /*pos < out_len_max &&*/ i < in_len; pos++, i++ )
+       {
+               /* pack the low bits */
+               pOut[pos] = szData[i] >> shift;
+
+               if ( i + 1 < in_len )
+               {
+                       /* pack the high bits using the low bits of the next character */
+                       pOut[pos] |= szData[i+1] << ( 7 - shift );
+
+                       shift++;
+
+                       if( shift == 7 )
+                       {
+                               shift = 0;
+                               i++;
+                       }
+               }
+       }
+
+       /* done */
+       return pos;
+}
+
+
+void SmsUtilConvertBCD2Digit( char* pDigits, char* pBCD, int digitLen )
+{
+       int             i, bcdLen;
+       char    c[2];
+       unsigned char   higher, lower;
+
+       if ( pBCD == NULL || pDigits == NULL )
+       {
+               printf("__SmsConvertBCD2Digit: pBCD == NULL || pDigits == NULL. return.\n"  );
+               return;
+       }
+
+       if ( digitLen == 0 )
+       {
+               //printf("__SmsConvertBCD2Digit: digitLen == 0. return.\n" );
+
+               pDigits[0] = 0x00;
+
+               return;
+       }
+
+       if ( digitLen % 2 )
+               bcdLen = digitLen / 2 + 1;
+       else
+               bcdLen = digitLen / 2;
+
+       memset( pDigits, 0, bcdLen * 2 );
+
+       for ( i = 0; i < bcdLen; i++ )
+       {
+               lower = pBCD[i] & 0x0F;                                 // get low nibble
+
+               if ( lower == 0x0A )
+                       lower = '*';
+               else if ( lower == 0x0B )
+                       lower = '#';
+               else if ( lower == 0x0C )
+                       lower = 'p';                    //DTMF Control pDigits seperator
+               else if ( lower == 0x0F )
+                       lower = 0;
+               else
+               {
+                       AcItoa( lower, c, 16 );
+                       lower = (char) AcToupper(c[0]);
+               }
+
+               higher = ( pBCD[i] >> 4 ) & 0x0F;                       // get high nibble
+
+               if ( higher == 0x0A )
+                       higher = '*';           // =0x2A
+               else if ( higher == 0x0B )
+                       higher = '#';           // =0x23
+               else if ( higher == 0x0C )
+                       higher = 'p';           // =0x70, DTMF Control pDigits seperator
+               else if ( higher == 0x0F ) // if higher semi-octet is 0x0F, filled bits.
+               {
+                       //higher = 0;
+                       sprintf(pDigits + strlen(pDigits), "%c", lower);
+                       pDigits[/*digitLen-1*/bcdLen*2-1] = '\0';
+
+                       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
+
+                       return;
+               }
+               else
+               {
+                       AcItoa(higher, c, 16);
+                       higher = (char) AcToupper(c[0]);
+               }
+
+               //sprintf(pDigits, "%s%c%c", pDigits, lower, higher);
+               sprintf(pDigits + strlen(pDigits), "%c%c", lower, higher);
+       }
+
+       pDigits[digitLen] = '\0';
+
+       //printf("__SmsConvertBCD2Digit: pDigits [%s].\n", pDigits  );
+}
+
+
+void SmsUtilConvertDigit2BCD( char* pBCD, char* pDigits, int digitLen )
+{
+       int     i, j, digit;
+
+       unsigned char   higher, lower;
+
+       if ( pBCD == NULL || pDigits == NULL )
+               return;
+
+       // 0123456789 -> 1032547698
+       for ( i = 0, j = 0; i < digitLen; i = i + 2, j++ )
+       {
+               if ( pDigits[i] == '*' )
+                       digit = 0x0A;
+               else if ( pDigits[i] == '#' )
+                       digit = 0x0B;
+               else if ( AcToupper( pDigits[i] ) == 'P' )
+                       digit = 0x0C;
+               else
+                       digit = (int) ( pDigits[i] - '0' );
+
+               lower = digit & 0x0F;
+
+               if ( digitLen != i + 1 )
+               {
+                       if ( pDigits[i+1] == '*' )
+                               digit = 0x0A;
+                       else if ( pDigits[i+1] == '#' )
+                               digit = 0x0B;
+                       else if ( AcToupper( pDigits[i+1] ) == 'P' )
+                               digit = 0x0C;
+                       else
+                               digit = (int) ( pDigits[i+1] - '0' );
+
+                       higher = digit & 0x0F;
+               }
+               else
+               {
+                       higher = 0xFF;
+               }
+
+               pBCD[j] = ( higher << 4 ) | lower;
+       }
+}
+
+
+TmDateTime* SmsUtilDecodeTimeStamp(char * pTimeStamp, TmDateTime *tmDateTime )
+{
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       //TS_UINT32     time;
+
+       if ( pTimeStamp == NULL )
+               return NULL;
+
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[0], 2 );
+       tmDateTime->year = atoi( szBuf ) + 2000;
+       if ( ( tmDateTime->year >= 1900 + MAX_YEAR )/* && ( tmDateTime->year < 2000 + BASE_YEAR )*/ )
+               tmDateTime->year -= 100;
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[1], 2 );
+       tmDateTime->month = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[2], 2 );
+       tmDateTime->day = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[3], 2 );
+       tmDateTime->hour = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[4], 2 );
+       tmDateTime->minute = atoi( szBuf );
+       SmsUtilConvertBCD2Digit( szBuf, (char*) &pTimeStamp[5], 2 );
+       tmDateTime->second = atoi( szBuf );
+
+       if ( ( tmDateTime->year < 1900 + BASE_YEAR ) || ( tmDateTime->year > 1900 + MAX_YEAR ) )
+               tmDateTime->year = 1900 + BASE_YEAR;
+
+       /*
+       time = TmDateTimeToSeconds( &tmDateTime );
+       if ( time > MAX_SECONDS )
+               time = MAX_SECONDS;
+
+       */
+
+       return tmDateTime;
+}
+
+unsigned char* SmsUtilEncodeTimeStamp( TmDateTime* tmDateTime, unsigned char* pTimeStamp )
+{
+       //TmDateTime tmDateTime;
+       char szBuf[3];
+       int     year;
+
+       if ( pTimeStamp == NULL )
+               return NULL;
+
+       memset( (void*) pTimeStamp, 0x00, sizeof ( unsigned char ) * 7 );
+
+       //TmSecondsToDateTime( timeStamp, &tmDateTime );
+
+       year = tmDateTime->year - 2000;
+       if ( year < 0 )
+               year += 100;
+       sprintf( szBuf, "%02d", year );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[0], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->month );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[1], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->day );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[2], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->hour );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[3], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->minute );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[4], szBuf, 2 );
+       sprintf( szBuf, "%02d", tmDateTime->second );
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[5], szBuf, 2 );
+
+
+       /*      ignore Time zone (assume it is using 0x00 as default)
+       timeZone = TmGetTimeZoneOffset() /15;
+       if ( timeZone < 0 )
+               absTimeZone = -timeZone;
+       else
+               absTimeZone = timeZone;
+       */
+
+       sprintf( szBuf, "%02d", 0);
+       SmsUtilConvertDigit2BCD( (char*) &pTimeStamp[6], szBuf, 2 );
+
+       //if ( timeZone < 0 )
+       //      pTimeStamp[6] |= 0x80;
+
+       return pTimeStamp;
+}
+
+
+
+int  SmsUtilDecodeAddrField(char *diallingNum, char* pAddrField, int *result_ton, int *result_npi )
+{
+       int index = 0;
+       int  ton,npi;
+       int DialNumLen=0;
+
+       ton = ( pAddrField[index+1] & 0x70 ) >> 4;
+       npi = pAddrField[index+1] & 0x0F;
+
+       if ( ton != SIM_TON_ALPHA_NUMERIC )
+       {
+               // Origination/Destination address �ʵ忡���� length�� ���� address length
+               // origination/destination address �ʵ��� ��� length�� 0 �� ���� number type/plan �ʵ�� 0xFF ���� ���´�.
+               DialNumLen = pAddrField[index++];
+       }
+       else
+       {
+               DialNumLen = ( ( ( pAddrField[index++] + 1 ) / 2 ) * 8 ) / 7;
+       }
+
+
+
+
+       // SIM_SMSP_ADDRESS_LEN ���� address length �� ũ�� SIM_SMSP_ADDRESS_LEN ��ŭ�� ��ȯ�� �Ѵ�.
+
+       if ( DialNumLen > SIM_SMSP_ADDRESS_LEN )
+       {
+               DialNumLen = SIM_SMSP_ADDRESS_LEN;
+       }
+
+       printf(" DialNumLen = %d\n", DialNumLen  );
+
+       index++; /* ignore Type of Address field */
+
+       if (ton != SIM_TON_ALPHA_NUMERIC )
+       {
+               SmsUtilConvertBCD2Digit( diallingNum, (char*) &pAddrField[index],DialNumLen );
+       }
+       else
+       {
+               SmsUtilUnpackGSMCode( diallingNum, &pAddrField[index],DialNumLen );
+       }
+
+       printf(  "__SmsDecodeAddrField: diallingNum [%s].\n", (char*) diallingNum  );
+
+       *result_ton=ton;
+       *result_npi=npi;
+
+       printf("ton %d npi %d\n",ton,npi);
+
+       return DialNumLen;
+
+
+}
+
+int  SmsUtilEncodeAddrField(unsigned char* pAddrField, char* diallingNum, int DialNumLen, int ton, int npi )
+{
+       int index = 0;
+
+       if ( diallingNum == NULL || pAddrField == NULL )
+               return -1;
+
+       if ( ton != SIM_TON_ALPHA_NUMERIC )
+       {
+               // Origination/Destination address �ʵ忡���� length�� ���� address length
+               pAddrField[index++] = (unsigned char)DialNumLen;
+               //printf(" addr len packet: %d\n", pAddrField[index]);
+       }
+       else
+       {
+               pAddrField[index] = (unsigned char) ( ( ( DialNumLen * 7 + 7 ) / 8 ) * 2 );
+
+               // ������ ����Ʈ���� ���� 4��Ʈ�� ������ ������ length �ʵ尪�� -1�� �Ѵ�.
+               if ( ( ( DialNumLen * 7 ) % 8 ) <= 4 )
+                       pAddrField[index]--;
+
+               printf(" addr len packet: %d out of SIM_TON_ALPAHA\n", pAddrField[index]);
+
+               index++;
+
+
+
+       }
+
+       SET_TON_NPI( pAddrField[index], ton, npi );
+
+       index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ����
+
+       if ( ton != SIM_TON_ALPHA_NUMERIC )
+       {
+               SmsUtilConvertDigit2BCD( (char*) &pAddrField[index], (char*) diallingNum, DialNumLen );
+
+               if ( DialNumLen % 2 )
+                       index += DialNumLen / 2 + 1;
+               else
+                       index += DialNumLen / 2;
+       }
+       else
+       {
+               index += SmsUtilPackGSMCode( &pAddrField[index], diallingNum, (int) DialNumLen );
+       }
+
+       return index;
+}
+int SmsUtilDecodeScAddrField( TelSmsAddressInfo_t* pSmsAddrField, TS_BYTE* pAddrField )
+{
+       printf("SmsUtilDecodeScAddrField\n");
+       int index = 0;
+       int length = 0;
+
+       if ( pSmsAddrField == NULL || pAddrField == NULL )
+       {
+               printf( "SmsUtilDecodeScAddrField: pSimAddrField or pAddrField is NULL.\n"  );
+
+               return 0;
+       }
+
+       // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
+       // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
+       length = pAddrField[index];
+       // ������ ���� �޽����� ��쿡�� service center address�� ���� ���� �ִ�.
+       // �� ��쿡 length �� 0 �̸� number type, plan �� ��� ���
+       // length �� 1 �̸� type, plan �� �ִ� ���
+       if ( length > 1 )
+       {
+               pSmsAddrField->DialNumLen = ( pAddrField[index++] - 1 ) * 2; // -1�� TON/API �ʵ�
+
+               // SIM_SMSP_ADDRESS_LEN ���� address length �� ũ�� SIM_SMSP_ADDRESS_LEN ��ŭ�� ��ȯ�� �Ѵ�.
+               if ( pSmsAddrField->DialNumLen > SIM_SMSP_ADDRESS_LEN )
+               {
+                       pSmsAddrField->DialNumLen = SIM_SMSP_ADDRESS_LEN;
+               }
+
+               pSmsAddrField->Ton = ( pAddrField[index] & 0x70 ) >> 4;
+               pSmsAddrField->Npi = pAddrField[index] & 0x0F;
+
+               index++; /* ignore Type of Address field */
+
+               SmsUtilConvertBCD2Digit( (char*) pSmsAddrField->DialNumLen, (char*) &pAddrField[index], pSmsAddrField->DialNumLen );
+
+               printf( "SmsUtilDecodeScAddrField: diallingNum [%s].\n", (char*) pSmsAddrField->DialNumLen  );
+
+               printf( "length=%d , ton %d, npi =%d\n",pSmsAddrField->DialNumLen, pSmsAddrField->Ton,pSmsAddrField->Npi );
+       }
+
+       return ++length;
+}
+
+ int  SmsUtilEncodeScAddrField( TS_BYTE* pAddrField, TelSmsAddressInfo_t * pSmsAddrField )
+{
+       int index = 0;
+
+       if ( pSmsAddrField == NULL || pAddrField == NULL )
+               return -1;
+
+       // Service Center address �ʵ忡���� length�� �ڿ� ������ byte�� ��
+       // -> ���� address ���̴� TON/API ����Ʈ�� �����ϰ� ������ ����Ʈ�� 2�� or 2�� - 1(���� ���̰� Ȧ���ΰ��)
+       if ( pSmsAddrField->DialNumLen % 2 )
+       {
+               pAddrField[index++] = pSmsAddrField->DialNumLen / 2 + 1 + 1; // +1 �� TON/NPI �ʵ�, Ȧ������ ���� ������ ���߱� ���� �ѹ� �� +1
+       }
+       else
+       {
+               pAddrField[index++] = pSmsAddrField->DialNumLen / 2 + 1; // +1 �� TON/NPI �ʵ�
+       }
+
+       SET_TON_NPI( pAddrField[index], pSmsAddrField->Ton, pSmsAddrField->Npi );
+
+       index++; // SET_TON_NPI �� MACRO �̹Ƿ� ���ο��� ������Ű�� ���׹߻�
+
+       SmsUtilConvertDigit2BCD( (char*) &pAddrField[index], (char*) pSmsAddrField->DialNumLen, pSmsAddrField->DialNumLen );
+
+       if ( pSmsAddrField->DialNumLen % 2 )
+               index += pSmsAddrField->DialNumLen / 2 + 1;
+       else
+               index += pSmsAddrField->DialNumLen / 2;
+
+       return index;
+}
+
+void SmsUtilDecodeDCS( tapi_nettext_coding_scheme* pCodingScheme,   unsigned char dcs )
+{
+       assert( pCodingScheme != NULL );
+
+       memset( pCodingScheme, 0, sizeof ( tapi_nettext_coding_scheme ) );
+
+       if ( dcs < 0x40 ) // bits 7..4 = 00xx : general data coding indication
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS;
+
+               if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 ) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                                       break;
+                       }
+               }
+               else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_NONE;
+
+               switch ( dcs & 0x0C ) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_MAX;
+                               break;
+               }
+       }
+       else if ( dcs >= 0x40 && dcs < 0x80 ) // bits 7..4 = 01xx : message marked for automatic deletion group. bits 5..0 are coded exactly the same as group 00xx
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_AUTO_DELETION;
+
+               if ( dcs & 0x20 ) // bit 5 = 1 : indicates the text is compressed
+                       pCodingScheme->bCompressed = TRUE;
+
+               if ( dcs & 0x10 ) // bit 4 = 1 : indicates that bits  1 to 0 have a message class meaning
+               {
+                       pCodingScheme->bmsg_class_set = TRUE;
+
+                       switch ( dcs & 0x03 ) // bits 1 to 0 : message class
+                       {
+                               case 0x00:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                                       break;
+                               case 0x01:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                                       break;
+                               case 0x02:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                                       break;
+                               case 0x03:
+                                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                                       break;
+                       }
+               }
+               else // bit 4 = 0 : indicates that bits 1 to 0 are reserved and have no message class meaning
+                       pCodingScheme->class_type = TAPI_NETTEXT_CLASS_NONE;
+
+               switch ( dcs & 0x0C ) // bits 4 to 3 : character set
+               {
+                       case 0x00:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_DEFAULT;
+                               break;
+                       case 0x04:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+                               break;
+                       case 0x08:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_UCS2;
+                               break;
+                       case 0x0C:
+                               pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_MAX;
+                               break;
+               }
+       }
+       // bits 7..4 = 1000 ~ 1011 : reserved
+       else if ( dcs == 0xC0 ) // bits 7..4 = 1100 : message waiting indication group, discard message
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD;
+       }
+       else if ( dcs < 0xE0 )
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_STORE;
+
+               if ( dcs & 0x08 )
+                       pCodingScheme->bmsg_ind_active = TRUE;
+
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_OTHER_MSG;
+                               break;
+               }
+       }
+       else if ( dcs < 0xF0 )
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2;
+
+               if ( dcs & 0x08 )
+                       pCodingScheme->bmsg_ind_active = TRUE;
+
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_VOICE_MSG;
+                               break;
+                       case 0x01:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_FAX_MSG;
+                               break;
+                       case 0x02:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_EMAIL_MSG;
+                               break;
+                       case 0x03:
+                               pCodingScheme->waiting_type = TAPI_NETTEXT_WAITING_OTHER_MSG;
+                               break;
+               }
+       }
+       else
+       {
+               pCodingScheme->coding_group_type = TAPI_NETTEXT_CODGRP_SM_CLASS_CODING;
+
+               if ( dcs & 0x04 )
+                       pCodingScheme->alphabet_type = TAPI_NETTEXT_ALPHABET_8BIT;
+
+               switch ( dcs & 0x03 )
+               {
+                       case 0x00:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_0;
+                               break;
+                       case 0x01:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_1;
+                               break;
+                       case 0x02:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_2;
+                               break;
+                       case 0x03:
+                               pCodingScheme->class_type = TAPI_NETTEXT_CLASS_3;
+                               break;
+               }
+       }
+}
+
+void SmsUtilEncodeDCS( TS_BYTE* pDCS, tapi_nettext_coding_scheme* pCodingScheme )
+{
+       printf("SmsUtilEncodeDCS Start\n");
+       TS_BYTE dcs = 0x00;
+
+       assert( pCodingScheme != NULL );
+
+       if( pCodingScheme->coding_group_type == TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS ) // bit 7..4 is 00xx
+       {
+               if ( pCodingScheme->bCompressed )
+                               dcs |= 0x20; // bit 5 is 1
+
+                       if ( pCodingScheme->bmsg_class_set )
+                       {
+                               dcs |= 0x10; // bit 4 is 1
+
+                               if( pCodingScheme->class_type== TAPI_NETTEXT_CLASS_0 )
+                                       dcs |= 0x00;
+
+                               else if ( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_1 )
+                                       dcs |= 0x01;
+
+                               else if ( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_2 )
+                                       dcs |= 0x02;
+
+                               else if ( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_3 )
+                                       dcs |= 0x03;
+                       }
+
+                       switch ( pCodingScheme->alphabet_type )
+                       {
+                               case TAPI_NETTEXT_ALPHABET_DEFAULT: // bit 3..2 is 00
+                               {
+                                       dcs |= 0x00;
+                                       break;
+                               }
+                               case TAPI_NETTEXT_ALPHABET_8BIT: // bit 3..2 is 01
+                               {
+                                       dcs |= 0x04;
+                                       break;
+                               }
+                               case TAPI_NETTEXT_ALPHABET_UCS2: // bit 3..2 is 10
+                               {
+                                       dcs |= 0x08;
+                                       break;
+                               }
+                               default: // bit 3..2 is 11
+                               {
+                                       dcs |= 0x0C;
+                                       break;
+                               }
+                       }
+       }
+       else if ( pCodingScheme->coding_group_type == TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD ) // bit 7..4 is 1100
+       {
+               dcs |= 0xC0;
+       }
+       else if ( pCodingScheme->coding_group_type == TAPI_NETTEXT_CODGRP_SM_WAITING_STORE ) // bit 7..4 is 1101
+       {
+               dcs |= 0xD0;
+
+               if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
+                       dcs |= 0x08;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_VOICE_MSG)
+                       dcs |= 0x00;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_FAX_MSG)
+                       dcs |= 0x01;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_EMAIL_MSG) // bit 1..0 is 10
+                       dcs |= 0x02;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_OTHER_MSG) // bit 1..0 is 11
+                       dcs |= 0x03;
+
+       }
+       else if ( pCodingScheme->coding_group_type == TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2 ) // bit 7..4 is 1110
+       {
+               dcs |= 0xE0;
+
+               if ( pCodingScheme->bmsg_ind_active ) // bit 3..2 is 10
+                       dcs |= 0x08;
+
+               if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_VOICE_MSG ) // bit 1..0 is 00
+                       dcs |= 0x00;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_FAX_MSG )
+                       dcs |= 0x01;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_EMAIL_MSG )
+                       dcs |= 0x02;
+
+               else if( pCodingScheme->waiting_type == TAPI_NETTEXT_WAITING_OTHER_MSG )
+                       dcs |= 0x03;
+       }
+       else if ( pCodingScheme->coding_group_type == TAPI_NETTEXT_CODGRP_SM_CLASS_CODING )     // bit 7..4 is 1111
+       {
+               dcs |= 0xF0;
+
+               if( pCodingScheme->alphabet_type == TAPI_NETTEXT_ALPHABET_DEFAULT )     // bit 2 is 0
+                       dcs |= 0x00;
+               else if( pCodingScheme->alphabet_type == TAPI_NETTEXT_ALPHABET_8BIT ) // bit 2 is 1
+                       dcs |= 0x04;
+
+               if( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_0) // bit 1..0 is 00
+                       ;
+
+               else if( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_1) // bit 1..0 is 01
+                       dcs |= 0x01;
+
+               else if( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_2) // bit 1..0 is 10
+                       dcs |= 0x02;
+
+               else if( pCodingScheme->class_type == TAPI_NETTEXT_CLASS_3) // bit 1..0 is 11
+                       dcs |= 0x03;
+       }
+
+       memcpy( pDCS, &dcs, sizeof ( TS_BYTE ) );
+
+       printf("SmsUtilEncodeDCS End\n");
+}
+
+ TS_UINT8 SmsUtilEncodeValidity( TS_BYTE* pValidity, tapi_nettext_vp* pVP )
+{
+       TS_UINT8        pos = 0;
+
+       switch( pVP->vp_type )
+       {
+               case TAPI_NETTEXT_VP_NOT_USED:
+                       break;
+
+               case TAPI_NETTEXT_VP_RELATIVE:
+                       pValidity[pos] = (TS_UINT8) pVP->vpValue;
+                       pos ++;
+                       break;
+
+               case TAPI_NETTEXT_VP_ABSOLUTE:
+                       //TO DO
+                       //SmsUtilEncodeTimeStamp( pValidity, pVP->vpValue );
+                       pos += 7;
+                       break;
+
+               case TAPI_NETTEXT_VP_ENHANCED:
+                       break;
+       }
+
+       return pos;
+}
+
diff --git a/src/test_apps/tapi_sms_util.h b/src/test_apps/tapi_sms_util.h
new file mode 100644 (file)
index 0000000..2f4cdd1
--- /dev/null
@@ -0,0 +1,494 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TelDefines.h"
+#include "TelErr.h"
+#include "ITapiNetText.h"
+
+
+
+
+#define        SIM_TON_UNKNOWN                                 0 //unknown
+#define        SIM_TON_INTERNATIONAL                           1 //international number
+#define        SIM_TON_NATIONAL                                        2 //national number
+#define        SIM_TON_NETWORK_SPECIFIC                        3 //natwork specific number
+#define        SIM_TON_DEDICATED_ACCESS                        4 //subscriber number
+#define        SIM_TON_ALPHA_NUMERIC                           5//alphanumeric, GSM 7-bit default alphabet)
+#define        SIM_TON_ABBREVIATED_NUMBER              6 //abbreviated number
+#define        SIM_TON_RESERVED_FOR_EXT                        7 //reserved for extension
+
+
+#define MAX_UDH_LEN            137
+#define UDH_MAX                                7
+#define SMDATA_SIZE_MAX        160
+
+
+#define FAIL                   0x00
+#define SUCCESS                0x01
+//////////////////////////////////TPDU type////////////////////////////////
+typedef enum
+{
+       SMS_TPDU_DELIVER                                = 0x00, // sc -> ms
+       SMS_TPDU_DELIVER_REPORT         = 0x00, // ms -> sc
+       SMS_TPDU_SUBMIT                         = 0x01, // ms -> sc
+       SMS_TPDU_SUBMIT_REPORT          = 0x01, // sc -> ms
+       SMS_TPDU_STATUS_REPORT          = 0x02, // sc -> ms
+       SMS_TPDU_COMMAND                                = 0x02, // ms -> sc
+       SMS_PDU_INVALID_TYPE
+
+} SmsTPDUType;
+
+typedef enum
+{
+       SMS_DAEMON_UNKNOWN_MESSAGE,
+       SMS_DAEMON_RECEIVED_UNREAD_MESSAGE,
+       SMS_DAEMON_RECEIVED_READ_MESSAGE,
+       SMS_DAEMON_UNSENT_MESSAGE,
+       SMS_DAEMON_STORED_SENT_MESSAGE,
+
+}sd_message_status;
+
+
+/*
+ * tapi_nettext_vp_type
+ * This enumeration defines the validity period type.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_VP_NOT_USED = 0,           /**< validity period not used */
+       TAPI_NETTEXT_VP_RELATIVE = 2,           /**< after a predetermined time period after the service center has received the message */
+       TAPI_NETTEXT_VP_ABSOLUTE = 3,
+       TAPI_NETTEXT_VP_ENHANCED = 1,
+
+       TAPI_NETTEXT_VP_MAX
+} tapi_nettext_vp_type;
+/*
+ * tapi_nettext_coding_group_type
+ This enum defined the different sms coding group types
+ */
+typedef enum
+{
+       TAPI_NETTEXT_CODGRP_SM_GENERAL_DCS,                     /**< Bits 7..4 00xx */
+       TAPI_NETTEXT_CODGRP_CB_GENERAL_LANG,            /**< 0000 */
+       TAPI_NETTEXT_CODGRP_CB_ALPHA,                           /**< 0001 */
+       TAPI_NETTEXT_CODGRP_CB_RES1,                            /**< 0010 */
+       TAPI_NETTEXT_CODGRP_CB_RES2,                            /**< 0011 */
+       TAPI_NETTEXT_CODGRP_SM_AUTO_DELETION,           /**< 01xx Bits 5..0 are coded the same as SM_GENERAL_DCS */
+       TAPI_NETTEXT_CODGRP_CB_GENERAL_DCS,                     /**< 01xx behavior is as SM_GENERAL_DCS */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_DISCARD,         /**< 1100 */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_STORE,           /**< 1101 */
+       TAPI_NETTEXT_CODGRP_SM_WAITING_STORE_UCS2,      /**< 1110 */
+       TAPI_NETTEXT_CODGRP_CB_WAP,                                     /**< 1110 Cell Broadcast */
+       TAPI_NETTEXT_CODGRP_SM_CLASS_CODING,            /**< 1111 */
+       TAPI_NETTEXT_CODGRP_CB_CLASS_CODING,            /**< 1111 Cell Broadcast */
+
+       TAPI_NETTEXT_CODGRP_MAX
+} tapi_nettext_coding_group_type;
+/*
+ *  tapi_nettext_waiting_type
+ Defines different types of waiting indicators
+ */
+typedef enum
+{
+       TAPI_NETTEXT_WAITING_VOICE_MSG,         /**< voice message waiting */
+       TAPI_NETTEXT_WAITING_FAX_MSG,           /**< FAX message waiting */
+       TAPI_NETTEXT_WAITING_EMAIL_MSG,         /**< E-mail waiting */
+       TAPI_NETTEXT_WAITING_OTHER_MSG,         /**< Other message waiting */
+
+       TAPI_NETTEXT_WAITING_MAX
+} tapi_nettext_waiting_type;
+/*
+ * tapi_nettext_alphabet_type
+ Defines different alphabet types of an sms
+ */
+typedef enum
+{
+       TAPI_NETTEXT_ALPHABET_DEFAULT,  /**< GSM alphabet default 7bit */
+       TAPI_NETTEXT_ALPHABET_8BIT,             /**< 8bit */
+       TAPI_NETTEXT_ALPHABET_UCS2,             /**< 16bit ucs2 */
+
+       TAPI_NETTEXT_ALPHABET_KSC5601,  /**< for Korean */
+
+       TAPI_NETTEXT_ALPHABET_MAX
+} tapi_nettext_alphabet_type;
+/*
+ * tapi_nettext_class_type
+ This enum defines the different classes of SMS which indicates the
+ type of storage of the sms.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_CLASS_0,   /**< display immediately */
+       TAPI_NETTEXT_CLASS_1,   /**< may be stored */
+       TAPI_NETTEXT_CLASS_2,   /**< store in SIM */
+       TAPI_NETTEXT_CLASS_3,   /**< transfer to TE */
+       TAPI_NETTEXT_CLASS_NONE,
+
+       TAPI_NETTEXT_CLASS_MAX
+} tapi_nettext_class_type;
+
+/*
+This structure contains the information related to sms coding schemes
+
+*/
+typedef struct
+{
+       TS_BOOL                                                 bCompressed;            /**< if text is compressed this is TRUE */
+       TS_BOOL                                                 bmsg_class_set;         /**< message class indication. if TRUE = bits 1..0, if FALSE = reserved */
+       TS_BOOL                                                 bmsg_ind_active;                /**< message indication group. if TRUE = on, FALSE = off */
+       tapi_nettext_coding_group_type          coding_group_type;      /**< Coding group, GSM 03.38 */
+       tapi_nettext_waiting_type                       waiting_type;           /**< Type of message waiting */
+       tapi_nettext_alphabet_type                      alphabet_type;          /**< How to encode a message. */
+       tapi_nettext_class_type                 class_type;                     /**< The message class */
+} tapi_nettext_coding_scheme;
+
+/*
+ *  tapi_nettext_vp_rel_Value
+ * This structure defines the validity period types.
+ */
+typedef enum
+{
+       TAPI_NETTEXT_VP_REL_1H,         /**< One hour */
+       TAPI_NETTEXT_VP_REL_6H,         /**< Six hours */
+       TAPI_NETTEXT_VP_REL_12H,        /**< Twelve hours */
+       TAPI_NETTEXT_VP_REL_1D,         /**< One day */
+       TAPI_NETTEXT_VP_REL_3D,         /**< Three days */
+       TAPI_NETTEXT_VP_REL_1W,         /**< One week */
+       TAPI_NETTEXT_VP_REL_1M,         /**< One Month */
+       TAPI_NETTEXT_VP_REL_MAX         /**< Max = 63 weeks */
+} tapi_nettext_vp_rel_Value;
+/*
+This structure contains all the information
+related to validity period of a message.
+
+*/
+typedef struct
+{
+       tapi_nettext_vp_type vp_type;                     /**< Validity period format */
+       tapi_nettext_vp_rel_Value vp_rel_type; /**< Validity period value duration the message must retain in the service center while application attempts delivery */
+       TS_UINT32 vpValue;                                                /** Validity period value */
+} tapi_nettext_vp;
+
+
+/* This structure contains the details of delete status notification, which comes after calling
+TelTapiSmsDeleteMsg*/
+typedef struct
+{
+       TS_UINT16 result;
+       TS_UINT8 index;
+}TelTapiSmsDeleteMsg_status_ind;
+
+
+/* This structure contains the details of save status notification, which comes after calling
+TelTapiSmsWriteMsg*/
+
+typedef struct
+{
+       TS_UINT16 result;
+       TS_UINT8 index;
+}tapi_nettext_save_status_ind;
+
+
+typedef struct
+{
+       int             year;
+       int             month;
+       int             day;
+       int             hour;
+       int             minute;
+       int             second;
+
+} TmDateTime;
+
+
+#define BASE_YEAR              70L                                     /* 1970 is the base year */
+#define MAX_YEAR                       130L                                    /* 2030 is the max year */
+
+
+#define        SIM_SMSP_ADDRESS_LEN                                    20      // digit length
+
+#define SET_TON_NPI(dest, ton, npi) {  \
+       dest = 0x80;                                            \
+       dest |= (ton & 0x07) << 4;                      \
+       dest |= npi & 0x0F;                                     \
+}
+
+
+
+
+typedef struct
+{
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType  msg_type ;   //bit 0 ,1
+
+       // reject duplicates [M]
+       TS_BOOL rd ;  // bit 2
+
+       // validity period format [M]
+       tapi_nettext_vp_type vpf ; //  bits 3, 4
+
+       // reply path [M]
+       TS_BOOL rp ; //bit 7
+
+       // user data header indication
+       TS_BOOL udhi ;   //bit 6
+
+       // status report request
+       TS_BOOL  srr ;  // bit 5
+
+       /************BODY************/
+
+       //message reference [M]
+       TS_UINT mr;
+
+       // destination address [M]
+       TelSmsAddressInfo_t desAddr;
+
+       // protocol identifier [M]
+       TS_BYTE pId;
+
+       // data coding scheme [M]
+       tapi_nettext_coding_scheme dcs;
+
+       // validity period
+       tapi_nettext_vp vp;
+
+       // user data length [M]
+       TS_UINT udl;
+
+       // user data
+       TS_BYTE *  userData;
+
+
+}TPDU_SMS_SUBMIT;
+
+typedef struct
+{
+       /************HEADER************/
+
+       // message type [M]
+       SmsTPDUType  msg_type;  //bit 0 ,1
+
+       // user data header indication
+       TS_BOOL udhi ;   //bit 6
+
+       /************BODY************/
+
+       // failure Cause [M]
+        TS_UINT        fcs;
+
+       // parameter indicator [M]
+       TS_BYTE paraInd;
+
+       // service centre time stamp [M]
+       TmDateTime scts;
+
+       // protocol identifier [M]
+       TS_BYTE pId;
+
+       // data coding scheme
+       tapi_nettext_coding_scheme dcs;
+
+       // user data length [M]
+       TS_UINT udl;
+
+       // user data
+       char*  userData;
+
+}TPDU_SMS_SUBMIT_REPORT;
+
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTPDUType msg_type;   //bit 0 ,1
+
+       TS_BOOL mms; // bit 2
+
+       TS_BOOL rp; // bit 7
+
+       TS_BOOL udhi;  //bit 6
+
+       TS_BOOL sri; // bit , 5status_report_indication
+
+       /************BODY************/
+
+       TelSmsAddressInfo_t orgAddr;
+
+       TS_BYTE  pId;
+
+       TmDateTime scts;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       char  * userData;
+
+}TPDU_SMS_DELIVER;
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       TS_BOOL udhi ;  //bit 6
+
+       /************BODY************/
+
+       TS_UINT fcs;
+
+       TS_BYTE paraInd;
+
+       TS_BYTE pId;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+}TPDU_SMS_DELIVER_REPORT;
+
+
+typedef struct
+{
+       /************HEADER************/
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       TS_BOOL udhi ; //bit 6
+
+       TS_BOOL srr; //bit 5, status_report_request
+
+       /************BODY************/
+
+       TS_UINT  mr; //message_ref
+
+       TS_BYTE pId;
+
+       TS_BYTE cmdType;
+
+       TS_BYTE msgNum;
+
+       TelSmsAddressInfo_t destAddr;
+
+       TS_UINT udl;
+
+       TS_BYTE * userData;
+
+}TPDU_SMS_COMMAND;
+
+
+typedef struct
+{
+       /************HEADER************/
+
+       SmsTPDUType msg_type ;   //bit 0 ,1
+
+       TS_BOOL  udhi ; //bit 6
+
+       TS_BOOL mms ; //bit 2
+
+       TS_BOOL srq; //bit 5, status_report_qualifier
+
+       /************BODY************/
+
+       TS_UINT  mr;
+
+       TelSmsAddressInfo_t rcpAddr; //recipient_addr
+
+       TmDateTime scts;
+
+       TmDateTime dt; //discharge_time
+
+        TS_BYTE  status;
+
+        TS_BYTE paraInd;
+
+       TS_BYTE pId;
+
+       tapi_nettext_coding_scheme dcs;
+
+       TS_UINT udl;
+
+       char * userData;
+
+}TPDU_SMS_STATUS_REPORT;
+
+/**************************************************************************************
+*** (main.c) function header****************************************************************
+***************************************************************************************
+***************************************************************************************/
+int SendMessage();
+int ReadMessage();
+int DeleteMessage();
+int ReceiveMessage(int pdu_len, char * pPDU);
+int GetInformation();
+int Setting();
+
+TS_BOOL DecodeCellBroadcastMsg(int length,char * pPDU);
+TS_BOOL EncodeSmsSubmitTpdu(char* diallingNum, int dialNumLen, char* msg, int msg_len) ;
+TS_BOOL DecodeSmsSubmitTpdu(int pdu_len , char * pPDU);
+int  DecodeSmsDeliverTpdu(int pdu_len , char * pPDU);
+TS_BOOL EncodeSmsDeliverReportTpdu();
+TS_BOOL DecodeSmsSubmitReportTpdu(int length , char *data);
+TS_BOOL DecodeSmsStatusReportTpdu(int pdu_len, char * pPDU);
+
+/***************************************************************************************/
+void reverse(char* x, int len);
+char* AcItoa(int n, char* str, int b) ;
+int AcToupper(int ch);
+
+char* SmsUtilUnpackGSMCode(char* szData, const char* pIn, int in_len );
+int SmsUtilPackGSMCode( TS_BYTE* pOut, const char* szData, int in_len );
+
+void SmsUtilConvertBCD2Digit( char* pDigits, char* pBCD, int digitLen );
+void SmsUtilConvertDigit2BCD( char* pBCD, char* pDigits, int digitLen );
+
+TmDateTime* SmsUtilDecodeTimeStamp(char* pTimeStamp, TmDateTime *tmDateTime );
+unsigned char* SmsUtilEncodeTimeStamp( TmDateTime* tmDateTime, unsigned char* pTimeStamp );
+
+
+int  SmsUtilDecodeAddrField(char *diallingNum, char * pAddrField, int *result_ton, int *result_npi );
+int SmsUtilEncodeAddrField( unsigned char* pAddrField, char* diallingNum, int dialnumLen, int ton, int npi );
+
+int SmsUtilDecodeScAddrField( TelSmsAddressInfo_t* pSmsAddrField, TS_BYTE* pAddrField );
+ int  SmsUtilEncodeScAddrField( TS_BYTE* pAddrField, TelSmsAddressInfo_t * pSmsAddrField );
+
+void SmsUtilDecodeDCS( tapi_nettext_coding_scheme* pCodingScheme,   unsigned char dcs );
+void SmsUtilEncodeDCS( TS_BYTE* pDCS, tapi_nettext_coding_scheme* pCodingScheme);
+
+ TS_UINT8 SmsUtilEncodeValidity( TS_BYTE* pValidity, tapi_nettext_vp* pVP );
+
+
+
+
diff --git a/src/test_apps/tapi_sound_test.c b/src/test_apps/tapi_sound_test.c
new file mode 100644 (file)
index 0000000..291a9df
--- /dev/null
@@ -0,0 +1,476 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "assert.h"
+#include "glib.h"
+
+#include "ITapiSound.h"
+#include "TelUtility.h"
+#include "TapiEvent.h"
+#include "TapiCommon.h"
+
+#define TEST_DEBUG(frmt, args...)      \
+       {do { fprintf(stderr, "[SND Test][%s:%04d] " frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+
+#ifndef false
+       #define false 0
+#endif
+#ifndef true
+       #define true  !0
+#endif
+#ifndef bool
+       #define bool  char
+#endif
+
+#define MAX_CALL_INDEX                         6
+
+int data_status_;
+int data_service_;
+int callId;
+
+int tapi_thread_id;
+
+
+// this contains the tapi noti error info
+int error_code;
+
+
+// same as tapievent
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}data_t;
+
+static unsigned int *  SOUND_subscription_id;
+
+extern int  EvtDeliveryHandle;
+
+//static int  sound_app_callback (int group, int action, void* data, int length)
+//static int  sound_async_event_callback  (TelTapiEventClass_t eventClass, int eventType, int  param1,void * param2)
+static int  sound_async_event_callback (TelTapiEvent_t *event)
+{
+       TEST_DEBUG("EVENT TYPE:[0x%x], STATUS:[0x%x]", event->EventType, event->Status);
+
+       switch (event->EventClass)
+       {
+               case TAPI_EVENT_CLASS_SOUND:
+                       switch (event->EventType)
+                       {
+                               case TAPI_EVENT_SOUND_VOLUMECTRL_RSP: {
+                                       TEST_DEBUG("***  TAPI_EVENT_SOUND_MICGAINCTRL_RSP received  ****");
+
+                                       tapi_sound_volumn_ctrl_res vlm_ctrl_info;
+                                       int index;
+
+                                       memcpy(&vlm_ctrl_info, event->pData, sizeof(tapi_sound_volumn_ctrl_res));
+
+                                       TEST_DEBUG("num record:[%d]",vlm_ctrl_info.num_record);
+
+                                       for(index=0;index<vlm_ctrl_info.num_record;index++)
+                                       {
+                                               TEST_DEBUG("index:[%d], vol type:[0x%x]",index, vlm_ctrl_info.pinfo[index].type);
+                                               TEST_DEBUG("index:[%d], vol level:[0x%x]",index, vlm_ctrl_info.pinfo[index].level);
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SOUND_MICMUTECTRL_RSP:
+                                       TEST_DEBUG("***  TAPI_EVENT_SOUND_MICMUTECTRL_RSP received  ****");
+                                       tapi_sound_mic_mute_t *mute_status = NULL;
+                                       mute_status = (tapi_sound_mic_mute_t *)(event->pData);
+                                       if(*mute_status == TAPI_SOUND_MIC_UNMUTE){
+                                               TEST_DEBUG("MIC Unmute");
+                                       }
+                                       else if(*mute_status == TAPI_SOUND_MIC_MUTE){
+                                               TEST_DEBUG("MIC Mute");
+                                       }
+                                       else{
+                                               TEST_DEBUG("Unknown state");
+                                       }
+                                       break;
+
+                               case TAPI_EVENT_SOUND_ERROR_IND:
+                                       TEST_DEBUG("***  TAPI_EVENT_SOUND_ERROR_IND received  ****");
+                                       break;
+
+                               default:
+                                       TEST_DEBUG("***  Default Event  %x ****", event->EventType);
+                                       break;
+
+                       }
+
+                       break;
+
+               default:
+                       TEST_DEBUG("*** Other TAPI EVENT received : class : %x ****", event->EventClass);
+                       break;
+
+       }
+
+       return TRUE;
+}
+
+int sound_test_subscribe_tapi_events (void)
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfSOUNDEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int SOUNDEvtList[] =
+       {
+               TAPI_EVENT_SOUND_VOLUMECTRL_RSP,              /**<     */
+               TAPI_EVENT_SOUND_ERROR_IND,      /**<     */
+               TAPI_EVENT_SOUND_AUDIOPATHCTRL_NOTI,      /**<     */
+               TAPI_EVENT_SOUND_AUDIOSOURCECTRL_NOTI,      /**<     */
+               TAPI_EVENT_SOUND_MICMUTECTRL_RSP,      /**<     */
+       };
+
+       iNumOfSOUNDEvt = sizeof(SOUNDEvtList)/sizeof(int);
+       //TAPI_CALLOC(SOUND_subscription_id, iNumOfSOUNDEvt, unsigned int)
+       //#define TAPI_CALLOC(ptr, no_elements, type)
+       SOUND_subscription_id = (unsigned int *) calloc (iNumOfSOUNDEvt , sizeof (unsigned int));
+       if(SOUND_subscription_id == NULL)\
+       {
+               TEST_DEBUG("calloc error -NULL, errno is [%d]", errno);
+       }
+
+       for( i=0 ; i< iNumOfSOUNDEvt; i++ )
+       {
+               api_err = tel_register_event(SOUNDEvtList[i], &SOUND_subscription_id[i],(TelAppCallback)&sound_async_event_callback,NULL);
+               if(api_err != TAPI_API_SUCCESS)
+               {
+                       TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", SOUNDEvtList[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+}
+
+
+int sound_read_key_input(void)
+{
+       int ret;
+       char buf[256];
+       int requestId;
+       TapiResult_t ret_val = TAPI_API_SUCCESS;
+
+
+       tapi_sound_volume_type_t vol_type;
+       tapi_sound_volume_control_t vol_control;
+       tapi_sound_mic_mute_t micmute_set;
+       tapi_sound_audio_path_t  vc_path;
+       tapi_sound_voice_recording_status_t voice_record ;
+
+
+       memset(&vol_control, 0, sizeof(tapi_sound_volume_type_t));
+       memset(&vol_control, 0, sizeof(tapi_sound_volume_control_t));
+       memset(&micmute_set, 0, sizeof(tapi_sound_mic_mute_t));
+       memset(&vc_path, 0, sizeof(tapi_sound_audio_path_t));
+
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+                        perror("read(1)");
+               return -1;
+        }
+       else if (ret == 0)
+               return ret;
+
+       TEST_DEBUG("*************** SOUND TEST MENU     ***************");
+       TEST_DEBUG("VOLUME CTRL GET:[vlmget]");
+       TEST_DEBUG("VOLUME CTRL SET:[vlmset]");
+       TEST_DEBUG("MIC_MUTE_SET:[mmset] ");
+       TEST_DEBUG("MIC_MUTE_GET:[mmget] ");
+       TEST_DEBUG("VOICE_PATH_SET:[vpathset] ");
+       TEST_DEBUG("AUDIO_LOOPBACK:[loopback] ");
+       TEST_DEBUG("quit Sound test:[quit] ");
+       TEST_DEBUG("Voice Call Recording on test:[vcre] ");
+       TEST_DEBUG("Voice Call Recording off test:[vcrd] ");
+       TEST_DEBUG("*************************************************");
+
+       if(strncmp(buf, "vlmget", 6) == 0)
+       {
+               vol_type =TAPI_SOUND_VOL_VOICE;
+               ret_val= tel_get_sound_volume_info(vol_type,&requestId);
+               TEST_DEBUG("tapi_sound_volume_control_get return value is %d ",ret_val);
+       }
+       else if(strncmp(buf, "vlmset", 6) == 0)
+       {
+               vol_control.volume=TAPI_SOUND_VOLUME_LEVEL_7;
+               vol_control.vol_type=TAPI_SOUND_VOL_VOICE;
+
+               ret_val= tel_set_sound_volume_info(vol_control,&requestId);
+               TEST_DEBUG("tapi_sound_volume_control_set return value is %d ",ret_val);
+        }
+        else if(strncmp(buf, "mmset", 5) == 0)
+       {
+               micmute_set=TAPI_SOUND_MIC_UNMUTE;
+               TEST_DEBUG("micmute set value = TAPI_SOUND_MIC_UNMUTE");
+               ret_val=tel_set_sound_mute_status(micmute_set,&requestId);
+               TEST_DEBUG("tapi_sound_micmute_control_set return value is %d ",ret_val);
+       }
+        else if(strncmp(buf, "mmget", 5) == 0)
+       {
+               micmute_set=TAPI_SOUND_MIC_UNMUTE;
+               TEST_DEBUG("micmute set value = TAPI_SOUND_MIC_UNMUTE");
+               ret_val=tel_get_sound_mute_status(&requestId);
+               TEST_DEBUG("tapi_sound_micmute_control_get return value is %d ",ret_val);
+       }
+       else if(strncmp(buf, "vcre", 4) == 0)
+       {
+               voice_record=TAPI_SOUND_VOICE_RECORDING_ON;
+               TEST_DEBUG("voice_record = TAPI_SOUND_VOICE_RECORDING_ON");
+
+               ret_val=tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_ON,&requestId);
+
+               TEST_DEBUG("tel_control_sound_voice_recording on return value is %d ",ret_val);
+       }
+       else if(strncmp(buf, "vcrd", 4) == 0)
+       {
+               voice_record=TAPI_SOUND_VOICE_RECORDING_OFF;
+               TEST_DEBUG("voice_record = TAPI_SOUND_VOICE_RECORDING_OFF");
+               ret_val=tel_control_sound_voice_recording(TAPI_SOUND_VOICE_RECORDING_OFF,&requestId);
+
+               TEST_DEBUG("tel_control_sound_voice_recording off return value is %d ",ret_val);
+       }
+       else if(strncmp(buf, "vpathset", 8) == 0)
+       {
+               int iSelect = 0;
+               TEST_DEBUG("1. TAPI_SOUND_HANDSET");
+               TEST_DEBUG("2. TAPI_SOUND_HEADSET");
+               TEST_DEBUG("3. TAPI_SOUND_HANDSFREE");
+               TEST_DEBUG("4. TAPI_SOUND_BLUETOOTH");
+               TEST_DEBUG("5. TAPI_SOUND_STEREO_BLUETOOTH");
+               TEST_DEBUG("6. TAPI_SOUND_SPK_PHONE");
+               TEST_DEBUG("7. TAPI_SOUND_HEADSET_3_5PI");
+
+               TEST_DEBUG("Select: ");
+               scanf("%d", &iSelect);
+
+               switch(iSelect)
+               {
+                       case 1:
+                               vc_path = TAPI_SOUND_HANDSET;
+                               TEST_DEBUG("TAPI_SOUND_HANDSET");
+                               break;
+                       case 2:
+                               vc_path = TAPI_SOUND_HEADSET;
+                               TEST_DEBUG("TAPI_SOUND_HEADSET");
+                               break;
+                       case 3:
+                               vc_path = TAPI_SOUND_HANDSFREE;
+                               TEST_DEBUG("TAPI_SOUND_HANDSFREE");
+                               break;
+                       case 4:
+                               vc_path = TAPI_SOUND_BLUETOOTH;
+                               TEST_DEBUG("TAPI_SOUND_BLUETOOTH");
+                               break;
+                       case 5:
+                               vc_path = TAPI_SOUND_STEREO_BLUETOOTH;
+                               TEST_DEBUG("TAPI_SOUND_STEREO_BLUETOOTH");
+                               break;
+                       case 6:
+                               vc_path = TAPI_SOUND_SPK_PHONE;
+                               TEST_DEBUG("TAPI_SOUND_SPK_PHONE");
+                               break;
+                       case 7:
+                               vc_path = TAPI_SOUND_HEADSET_3_5PI;
+                               TEST_DEBUG("TAPI_SOUND_HEADSET_3_5PI");
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!\n");
+                               return 0;
+                               break;
+               }
+
+               ret_val=tel_set_sound_path(vc_path,&requestId);
+               TEST_DEBUG("vc_path:[%d],  return value [%d] ",vc_path, ret_val);
+       }
+
+       else if(strncmp(buf, "loopback", 8) == 0)
+       {
+               TelAudioLoopbackMode_t lpMode;
+               int iSelect = 0;
+
+               TEST_DEBUG("Select Audio Loopback Path");
+               TEST_DEBUG("1. TAPI_SOUND_HANDSET");
+               TEST_DEBUG("2. TAPI_SOUND_HEADSET");
+               TEST_DEBUG("3. TAPI_SOUND_HANDSFREE");
+               TEST_DEBUG("4. TAPI_SOUND_BLUETOOTH");
+               TEST_DEBUG("5. TAPI_SOUND_STEREO_BLUETOOTH");
+               TEST_DEBUG("6. TAPI_SOUND_SPK_PHONE");
+               TEST_DEBUG("7. TAPI_SOUND_HEADSET_3_5PI");
+
+               TEST_DEBUG("Select: ");
+               scanf("%d", &iSelect);
+
+               switch(iSelect)
+               {
+                       case 1:
+                               lpMode.path = TAPI_SOUND_HANDSET;
+                               TEST_DEBUG("TAPI_SOUND_HANDSET");
+                               break;
+                       case 2:
+                               lpMode.path = TAPI_SOUND_HEADSET;
+                               TEST_DEBUG("TAPI_SOUND_HEADSET");
+                               break;
+                       case 3:
+                               lpMode.path = TAPI_SOUND_HANDSFREE;
+                               TEST_DEBUG("TAPI_SOUND_HANDSFREE");
+                               break;
+                       case 4:
+                               lpMode.path = TAPI_SOUND_BLUETOOTH;
+                               TEST_DEBUG("TAPI_SOUND_BLUETOOTH");
+                               break;
+                       case 5:
+                               lpMode.path = TAPI_SOUND_STEREO_BLUETOOTH;
+                               TEST_DEBUG("TAPI_SOUND_STEREO_BLUETOOTH");
+                               break;
+                       case 6:
+                               lpMode.path = TAPI_SOUND_SPK_PHONE;
+                               TEST_DEBUG("TAPI_SOUND_SPK_PHONE");
+                               break;
+                       case 7:
+                               lpMode.path = TAPI_SOUND_HEADSET_3_5PI;
+                               TEST_DEBUG("TAPI_SOUND_HEADSET_3_5PI");
+                               break;
+                       default:
+                               TEST_DEBUG("Wrong Selection!!\n");
+                               return 0;
+                               break;
+               }
+
+               TEST_DEBUG("Enable[1] Disable[0]");
+               scanf("%d", &iSelect);
+
+               if(iSelect == 1){
+                       lpMode.status = TAPI_SOUND_AUDIO_LOOPBACK_PCM_ON;
+               }
+               else if(iSelect == 0){
+                       lpMode.status = TAPI_SOUND_AUDIO_LOOPBACK_OFF;
+               }
+               else{
+                       TEST_DEBUG("Unknown Type loopback status!\n");
+                       return 0;
+               }
+
+               ret_val=tel_set_sound_loopback( &lpMode, &requestId);
+               TEST_DEBUG("audio loopback return value [%d] \n", ret_val);
+       }
+       else if(strncmp(buf, "quit", 4) == 0)
+       {
+               TEST_DEBUG("sound test done ");
+               return -1;
+       }
+       memset(buf, '\0', 256);
+
+       return 0;
+
+}
+
+
+void sound_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+
+    while (1)
+               {
+        FD_ZERO(&readfds);
+        FD_SET(0, &readfds);
+
+
+        ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+        if (ret) {
+
+           if (FD_ISSET(0, &readfds)) {
+                 if(sound_read_key_input()<0)
+                       break;
+            }
+        }
+    }
+}
+
+
+
+void* sound_test_thread_loop(void* data)
+{
+       TEST_DEBUG(" sound_test_thread_loop : called...");
+
+       sound_select_loop();
+
+       TEST_DEBUG(" sound_test_thread_loop : stdin Loop exited");
+
+       pthread_exit(NULL);
+}
+
+#if 0
+int sound_main(int argc, char *argv[])
+{
+
+       pthread_t  p_thread;
+
+//     ret = get_handle();
+
+
+       tapi_thread_id = pthread_create(&p_thread, NULL, sound_test_thread_loop, NULL);
+
+       if(tapi_thread_id != 0)
+       {
+               TEST_DEBUG("Failed while creating a thread to read from stdin");
+               return -1;
+       }
+       else
+       {
+               TEST_DEBUG("a thread was created to read from stdin ..");
+       }
+
+       sound_test_subscribe_tapi_events();
+
+       pthread_join(p_thread, NULL);
+
+       TEST_DEBUG("Exiting PS test program bye bye !");
+
+       return 0;
+
+}
+#endif
+
diff --git a/src/test_apps/tapi_ss_test.c b/src/test_apps/tapi_ss_test.c
new file mode 100644 (file)
index 0000000..91c3129
--- /dev/null
@@ -0,0 +1,1189 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include "assert.h"
+#include "glib.h"
+
+#include "TelErr.h"
+#include "TelUtility_ext.h"
+#include "ITapiMisc.h"
+#include "ITapiSs.h"
+#include "TapiCommon.h"
+#include "ITapiSim.h"
+
+
+#define TEST_DEBUG(frmt, args...)      \
+       {do { fprintf(stderr, "[SS Test][%s:%04d] " frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+
+#ifndef bool
+       #define bool  char
+#endif
+
+// same as tapievent
+typedef struct
+{
+       int group;
+       int type;
+       int ID;
+       int status;
+       void *dst;
+}data_t;
+
+static unsigned int *  SS_subscription_id;
+
+extern int EvtDeliveryHandle ;
+
+
+int ss_strlen2(register const char * s ) {
+       int count = 0 ;
+       while( *s++ ) count ++ ;
+       return count ;
+} // end strlen()
+
+
+int ss_fgets(register char * digit, int n)
+{
+       if( ! fgets( digit , n , stdin ) )  return -1 ;
+
+       if( *(digit + (n = ss_strlen2(digit)-1)) ^ '\n' )  {
+               n = 0 ;
+               while( getchar() ^ '\n' ) n -- ;
+               if( n ) return 1 ;
+
+               return 0;
+       }
+       else
+               *( digit + n ) = 0 ;
+       return 0 ;
+}
+
+static int _PrintTeleCommService(TelSsTeleService_t telservice)
+{
+       switch(telservice)
+       {
+               case TAPI_SS_TS_ALL_TELESERVICES:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_TELESERVICES ");
+                       break;
+               case TAPI_SS_TS_ALL_SPEECH:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_SPEECH ");
+                       break;
+               case TAPI_SS_TS_ALL_DATA_TELESERVICES:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_DATA_TELESERVICES ");
+                       break;
+               case TAPI_SS_TS_FACS:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_FACS ");
+                       break;
+               case TAPI_SS_TS_SMS:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_SMS ");
+                       break;
+               case TAPI_SS_TS_ALL_TELESERVICES_EXCEPT_SMS:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_TELESERVICES_EXCEPT_SMS ");
+                       break;
+               case TAPI_SS_TS_ALL_PLMN_SPEC_TELE:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_PLMN_SPEC_TELE ");
+                       break;
+               case TAPI_SS_BS_ALL_BEARER_SERVICES:
+                       TEST_DEBUG("TeleService: TAPI_SS_BS_ALL_BEARER_SERVICES ");
+                       break;
+               case TAPI_SS_BS_ALL_ASYNCHRONOUS:
+                       TEST_DEBUG("TeleService: TAPI_SS_BS_ALL_ASYNCHRONOUS ");
+                       break;
+               case TAPI_SS_BS_ALL_SYNCHRONOUS:
+                       TEST_DEBUG("TeleService: TAPI_SS_BS_ALL_SYNCHRONOUS ");
+                       break;
+               case TAPI_SS_BS_DATA_CIRCUIT_SYNC:
+                       TEST_DEBUG("TeleService: TAPI_SS_BS_DATA_CIRCUIT_SYNC ");
+                       break;
+               case TAPI_SS_TS_ALL_DATA:
+                       TEST_DEBUG("TeleService: TAPI_SS_TS_ALL_DATA ");
+                       break;
+               case TAPI_SS_ALL_TELE_BEARER:
+                       TEST_DEBUG("TeleService: TAPI_SS_ALL_TELE_BEARER ");
+                       break;
+               default:
+                       TEST_DEBUG("TeleService: %d ", telservice);
+                       break;
+       }
+
+       return 0;
+}
+static int _PrintBarringType(TelSsCallBarType_t BarType)
+{
+       switch(BarType)
+       {
+               case TAPI_CALL_BARRING_ALL:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL ");
+                       break;
+               case TAPI_CALL_BARRING_OUTGOING:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_OUTGOING ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_OUTGOING_CALLS:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_OUTGOING_CALLS ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL_EXCEPT:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_OUTGOING_INTERN_CALL_EXCEPT ");
+                       break;
+               case TAPI_CALL_BARRING_INCOMING:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_INCOMING ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_INCOMING_CALLS:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_INCOMING_CALLS ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_INCOMING_CALLS_ROAMING:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_INCOMING_CALLS_ROAMING ");
+                       break;
+               case TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM:
+                       TEST_DEBUG("BarringType: TAPI_CALL_BARRING_ALL_INCOMING_CALLS_INSIM ");
+                       break;
+               default:
+                       TEST_DEBUG("BarringType: None [%d] ", BarType);
+                       break;
+       }
+
+       return 0;
+}
+
+static int _PrintSsStatus(TelSsStatus_t Status)
+{
+       switch(Status)
+       {
+               case TAPI_SS_STATUS_ACTIVE:
+                       TEST_DEBUG("SS Status: TAPI_SS_STATUS_ACTIVE ");
+                       break;
+               case TAPI_SS_STATUS_REGISTERED:
+                       TEST_DEBUG("SS Status: TAPI_SS_STATUS_REGISTERED (for CF) ");
+                       break;
+               default:
+                       TEST_DEBUG("SS Status: Not Active ");
+                       break;
+       }
+
+       return 0;
+}
+
+static int _PrintSsCliType(TelSsLineIdentificationType_t CliType)
+{
+       switch(CliType)
+       {
+               case TAPI_CALLING_LINE_IDENTITY_PRESENTATION:
+                       TEST_DEBUG("Type: TAPI_CALLING_LINE_IDENTITY_PRESENTATION ");
+                       break;
+               case TAPI_CALLING_LINE_IDENTITY_RESTRICTION:
+                       TEST_DEBUG("Type: TAPI_CALLING_LINE_IDENTITY_RESTRICTION ");
+                       break;
+               case TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION:
+                       TEST_DEBUG("Type: TAPI_CONNECTED_LINE_IDENTITY_PRESENTATION ");
+                       break;
+               case TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION:
+                       TEST_DEBUG("Type: TAPI_CONNECTED_LINE_IDENTITY_RESTRICTION ");
+                       break;
+               case TAPI_CALLED_LINE_IDENTITY_PRESENTATION:
+                       TEST_DEBUG("Type: TAPI_CALLED_LINE_IDENTITY_PRESENTATION ");
+                       break;
+               case TAPI_CALLING_NAME_PRESENTATION:
+                       TEST_DEBUG("Type: TAPI_CALLING_NAME_PRESENTATION ");
+                       break;
+               default:
+                       TEST_DEBUG("Type: None [%d] ", CliType);
+                       break;
+       }
+
+       return 0;
+}
+
+static int _PrintSsCliStatus(TelSsCliStatus_t CliStatus)
+{
+       switch(CliStatus)
+       {
+               case TAPI_CLI_STATUS_NOT_PROVISONED:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_NOT_PROVISONED ");
+                       break;
+               case TAPI_CLI_STATUS_PROVISIONED:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_PROVISIONED ");
+                       break;
+               case TAPI_CLI_STATUS_ACTIVATED:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_ACTIVATED ");
+                       break;
+               case TAPI_CLI_STATUS_UNKOWN:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_UNKOWN ");
+                       break;
+               case TAPI_CLI_STATUS_TEMP_RESTRICTED:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_TEMP_RESTRICTED ");
+                       break;
+               case TAPI_CLI_STATUS_TEMP_ALLOWED:
+                       TEST_DEBUG("CliStatus: TAPI_CLI_STATUS_TEMP_ALLOWED ");
+                       break;
+               default:
+                       TEST_DEBUG("CliStatus: None [%d] ", CliStatus);
+                       break;
+       }
+
+       return 0;
+}
+
+static int _PrintSsUssdRecord(TelSsUssdMsgIndInfo_t ussd_record)
+{
+       switch(ussd_record.IndType)
+       {
+               case TAPI_USSD_IND_NOTIFY:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_NOTIFY ");
+                       break;
+               case TAPI_USSD_IND_NO_ACTION_REQUIRE:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_NO_ACTION_REQUIRE ");
+                       break;
+               case TAPI_USSD_IND_ACTION_REQUIRE:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_ACTION_REQUIRE ");
+                       break;
+               case TAPI_USSD_IND_TERMINATED_BY_NET:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_TERMINATED_BY_NET ");
+                       break;
+               case TAPI_USSD_IND_OTHER_CLIENT:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_OTHER_CLIENT ");
+                       break;
+               case TAPI_USSD_IND_NOT_SUPPORT:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_NOT_SUPPORT ");
+                       break;
+               case TAPI_USSD_IND_TIME_OUT:
+                       TEST_DEBUG("UssdIndType: TAPI_USSD_IND_TIME_OUT ");
+                       break;
+               default:
+                       TEST_DEBUG("UssdIndType: None [%d] ", ussd_record.IndType);
+                       break;
+       }
+
+       TEST_DEBUG("RequestedBySAT:[%d]",ussd_record.UssdInfo.RequestedBySAT);
+       TEST_DEBUG("DCS         : [0x%x]",ussd_record.UssdInfo.Dcs);
+       TEST_DEBUG("ussd length : [%d] ", ussd_record.UssdInfo.UssdStringLength);
+       TEST_DEBUG("ussd string : [\n%s\n] ", ussd_record.UssdInfo.szUssdString);
+
+       return 0;
+}
+
+static int _PrintCFNoReplyWaitTime(TelSsNoReplyTime_t time)
+{
+       switch(time)
+       {
+               case TAPI_SS_CF_NO_REPLY_TIME_5_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_5_SECS ");
+                       break;
+               case TAPI_SS_CF_NO_REPLY_TIME_10_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_10_SECS ");
+                       break;
+               case TAPI_SS_CF_NO_REPLY_TIME_15_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_15_SECS ");
+                       break;
+               case TAPI_SS_CF_NO_REPLY_TIME_20_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_20_SECS ");
+                       break;
+               case TAPI_SS_CF_NO_REPLY_TIME_25_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_25_SECS ");
+                       break;
+               case TAPI_SS_CF_NO_REPLY_TIME_30_SECS:
+                       TEST_DEBUG("CF reply time : TAPI_SS_CF_NO_REPLY_TIME_30_SECS ");
+                       break;
+               default:
+                       TEST_DEBUG("CF reply time: None [%d] ", time);
+                       break;
+       }
+       return 0;
+}
+
+static int _PrintCFCondition(TelSsForwardWhen_t cond)
+{
+       switch(cond)
+       {
+               case TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_UNCONDITIONAL_EV ");
+                       break;
+               case TAPI_SS_FORWARD_WHEN_BUSY_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_BUSY_EV ");
+                       break;
+               case TAPI_SS_FORWARD_WHEN_NO_ANSWER_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_NO_ANSWER_EV ");
+                       break;
+               case TAPI_SS_FORWARD_WHEN_NOT_REACHABLE_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_NOT_REACHABLE_EV ");
+                       break;
+               case TAPI_SS_FORWARD_WHEN_ALL_FORWARDING_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_ALL_FORWARDING_EV ");
+                       break;
+               case TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV:
+                       TEST_DEBUG("CF condition : TAPI_SS_FORWARD_WHEN_ALL_CONDITIONAL_EV ");
+                       break;
+               default:
+                       TEST_DEBUG("CF condition : None [%d] ", cond);
+                       break;
+       }
+       return 0;
+}
+
+//static int  ss_async_event_callback(TelTapiEventClass_t eventClass, int eventType, int  param1,void * param2)
+static int  ss_async_event_callback(TelTapiEvent_t     *event)
+{
+       TEST_DEBUG("EVENT TYPE:[0x%x], STATUS:[0x%x]", event->EventType, event->Status);
+
+       int i = 0;
+
+       switch(event->EventClass)
+       {
+               case TAPI_EVENT_CLASS_SS:
+               {
+                       switch(event->EventType)
+                       {
+                               case TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY:
+                               {
+                                       TelSsRelCompMsgInfo_t      rel_comp_msg;
+                                       memcpy(&rel_comp_msg, (TelSsRelCompMsgInfo_t *)event->pData, sizeof(TelSsRelCompMsgInfo_t));
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY  ##### ");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_WAITING_CNF:
+                               {
+                                       TelSsInfo_t SsInfo = {0,};
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_WAITING_CNF  ##### ");
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("Index:[%d]",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.WaitingRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+                                               }
+                                       }
+                               }
+
+                                       break;
+
+                               case TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF:
+                               {
+                                       TelSsInfo_t SsInfo = {0,};
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF  ##### ");
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("Index:[%d]",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.WaitingRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.WaitingRecord.rec_class[i].TeleCommService);
+                                               }
+                                       }
+                               }
+                                       break;
+                               case TAPI_EVENT_SS_BARRING_CNF:
+                               {
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_BARRING_CNF  ##### ");
+                                       TelSsInfo_t SsInfo = {0,};
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("index:[%d] ",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.BarringRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.BarringRecord.rec_class[i].TeleCommService);
+                                                       _PrintBarringType(SsInfo.SsRecord.BarringRecord.rec_class[i].Flavour);
+
+                                               }
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF:
+                               {
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF  ##### ");
+                                       TelSsInfo_t SsInfo = {0,};
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("index:[%d] ",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.BarringRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.BarringRecord.rec_class[i].TeleCommService);
+                                                       _PrintBarringType(SsInfo.SsRecord.BarringRecord.rec_class[i].Flavour);
+                                               }
+
+                                       }
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_FORWARD_CNF:
+                               {
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_FORWARD_CNF  ##### ");
+                                       TelSsInfo_t SsInfo = {0,};
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("index:[%d] ",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                                       _PrintCFNoReplyWaitTime(SsInfo.SsRecord.ForwardingRecord.rec_class[i].NoReplyWaitTime);
+                                                       _PrintCFCondition(SsInfo.SsRecord.ForwardingRecord.rec_class[i].ForwardCondition);
+                                                       TEST_DEBUG("bCFNumPresent:[%d] ",SsInfo.SsRecord.ForwardingRecord.rec_class[i].bCallForwardingNumberPresent);
+                                                       TEST_DEBUG("bCFNum:[%s] ",SsInfo.SsRecord.ForwardingRecord.rec_class[i].szCallForwardingNumber);
+                                               }
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF:
+                               {
+                                       TEST_DEBUG("####  Received Event :TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF  ##### ");
+                                       TelSsInfo_t SsInfo = {0,};
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+
+                                               TEST_DEBUG("Number of records %d ",SsInfo.NumberOfRecords);
+
+                                               for(i=0;i<SsInfo.NumberOfRecords;i++)
+                                               {
+                                                       TEST_DEBUG("index:[%d] ",i);
+                                                       _PrintSsStatus(SsInfo.SsRecord.ForwardingRecord.rec_class[i].Status);
+                                                       _PrintTeleCommService(SsInfo.SsRecord.ForwardingRecord.rec_class[i].TeleCommService);
+                                                       _PrintCFNoReplyWaitTime(SsInfo.SsRecord.ForwardingRecord.rec_class[i].NoReplyWaitTime);
+                                                       _PrintCFCondition(SsInfo.SsRecord.ForwardingRecord.rec_class[i].ForwardCondition);
+                                                       TEST_DEBUG("bCFNumPresent:[%d] ",SsInfo.SsRecord.ForwardingRecord.rec_class[i].bCallForwardingNumberPresent);
+                                                       TEST_DEBUG("bCFNum:[%s] ",SsInfo.SsRecord.ForwardingRecord.rec_class[i].szCallForwardingNumber);
+                                               }
+                                       }
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF:
+                               {
+                                       TEST_DEBUG("####  Received Event : TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF  ##### ");
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF:
+                               {
+                                       TelSsInfo_t SsInfo = {0,};
+
+                                       TEST_DEBUG("####  Received Event : TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF #### ");
+
+                                       if (event->pData!=NULL)
+                                       {
+                                               memcpy(&SsInfo, (TelSsInfo_t*)event->pData, sizeof(TelSsInfo_t));
+                                                _PrintSsCliType(SsInfo.SsRecord.CliRecord.IdentificationType);
+                                               _PrintSsCliStatus(SsInfo.SsRecord.CliRecord.CliStatus);
+                                       }
+
+                               }
+                                       break;
+
+                               case TAPI_EVENT_SS_USSD_CNF:
+                               {
+                                       TelSsUssdMsgIndInfo_t      ussd_record;
+                                       TEST_DEBUG("####  Received Event : TAPI_EVENT_SS_USSD_CNF #### ");
+
+                                       if (event->pData != NULL)
+                                       {
+                                               memcpy(&ussd_record, (TelSsUssdMsgIndInfo_t *)event->pData, sizeof(TelSsUssdMsgInfo_t));
+                                               _PrintSsUssdRecord(ussd_record);
+                                       }
+                                       else
+                                       {
+                                               TEST_DEBUG("NULL param");
+                                       }
+
+                               }
+                                       break;
+                               //Indication with ACTION_REQUIRE
+                               case TAPI_EVENT_SS_USSD_IND:
+                               {
+                                       TelSsUssdMsgIndInfo_t      ussd_record;
+                                       TEST_DEBUG("####  Received Event : TAPI_EVENT_SS_USSD_IND  ##### ");
+
+                                       if (event->pData != NULL)
+                                       {
+                                               memcpy(&ussd_record, (TelSsUssdMsgInfo_t *)event->pData, sizeof(TelSsUssdMsgInfo_t));
+                                               _PrintSsUssdRecord(ussd_record);
+                                       }
+                                       else
+                                       {
+                                               TEST_DEBUG("NULL param");
+                                       }
+
+                               }
+                               break;
+
+
+                               case TAPI_EVENT_SS_AOC_RSP:
+                               {
+                                       TelCallAocInfo_t aoc_info;
+                                       TEST_DEBUG("####  Received Event : SS -- TAPI_EVENT_SS_AOC_RSP---#### ");
+                                       if(event->Status != 0)
+                                       {
+                                               memcpy(&aoc_info, (TelCallAocInfo_t*)event->pData, sizeof(TelCallAocInfo_t));
+
+                                               TEST_DEBUG("############# AOC TYPE :%d",aoc_info.AocType);
+                                               TEST_DEBUG("Printing ### ACM : [%ld]  MAX_ACM :[%ld] CCM:[%0.4f] Char type:[%d] ",aoc_info.ACM,aoc_info.MaxAcm,aoc_info.CCM,aoc_info.CharTypeOfCurrency);
+                                               TEST_DEBUG("Currency : %c %c %c ",aoc_info.szCurrency[0], aoc_info.szCurrency[1], aoc_info.szCurrency[2]);
+                                       }
+
+                               }
+                                       break;
+                               case TAPI_EVENT_SS_SET_AOC_CNF:
+                                       TEST_DEBUG("####  Received Event : SS -- TAPI_EVENT_SS_SET_AOC_CNF---#### ");
+                                       break;
+                               case TAPI_EVENT_SS_BARRING_TYPE_IND:
+                               {
+                                       TelSsCallBarType_t BarringType;
+                                       TEST_DEBUG("####  Received Event : SS -- TAPI_EVENT_SS_BARRING_TYPE_IND---#### ");
+
+                                       memcpy(&BarringType, (TelSsCallBarType_t*)event->pData, sizeof(TelSsCallBarType_t));
+                                       TEST_DEBUG("########### BarringType received is [%x]",BarringType);
+                               }
+                                       break;
+
+                               default:
+                                       break;
+                       }
+               }
+                       break;
+
+               default:
+                       break;
+       }
+       TEST_DEBUG("###################################################################");
+
+       return 1;
+
+}
+
+
+
+int ss_read_key_input(void)
+{
+       int ret2;
+       char buf[256];
+       int request_id =0;
+       TapiResult_t ret = TAPI_API_SUCCESS;
+
+       ret2 = read(0, buf, sizeof(buf));
+        if (ret2 < 0) {
+         if (errno == EINTR)
+         perror("read(1)");
+         return -1;
+        } else if (ret2 == 0) return ret2;
+
+
+       printf("\n########## SS TEST Application #########\n");
+       printf("########## Supplementary Services  - Options ############\n");
+
+       printf("Call Waiting [1] Call Barring  [2] Call Forwarding [3] \n");
+       printf("Query Status [a]    Activate [b]   Deactivate [c]  Registration [d]  Deregistration [e]\n");
+       printf("Change Call barring Password  Enter - [cbp]\n");
+       printf("Interrogate  the Status of Line Identity Services like CLIP, CLIR etc - Enter [cli]\n");
+       printf("Send USSD String  - Enter [ussd]\n");
+       printf("Test AOC  - First - SimOpen and Enter PIN2 ---[simopen] [pin2]\n");
+       printf("Read AOC Information - Enter [raoc] \n");
+       printf("Set Maximum Cost limit- [5e], Set Price/Unit Currency-[5f], Reset Cost Limit-[5g]\n");
+       printf("quit - [quit]\n");
+
+       printf("##########################################\n");
+       printf("SS Enter key   : %s", buf);
+
+       /* Call waiting */
+       if(strncmp(buf, "1a", 2) == 0 )
+       {
+               char cwType[1];
+               TelSsWaitingInfo_t cwInfo = {0,};
+               TEST_DEBUG("### Interrogate the status of Call Waiting  #### ");
+
+               TEST_DEBUG("Select the Call Waiting Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cwType,2);
+
+               cwInfo.CallType = atoi(cwType);
+
+               TEST_DEBUG("SS CallType:[%d]",cwInfo.CallType);
+
+               ret = tel_get_ss_waiting_status(cwInfo.CallType,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+
+       if(strncmp(buf, "1b", 2) == 0 )
+       {
+               char cwType[1];
+               TEST_DEBUG("### Activate Call Waiting  #### ");
+               TelSsWaitingInfo_t cwInfo = {0,};
+
+               TEST_DEBUG("Select the Call Waiting Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cwType,2);
+
+               cwInfo.CallType = atoi(cwType);
+               cwInfo.Mode = TAPI_SS_CW_ACTIVATE;
+
+               TEST_DEBUG("SS CallType:[%d]",cwInfo.CallType);
+               ret = tel_set_ss_waiting(&cwInfo,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+
+       if(strncmp(buf, "1c", 2) == 0 )
+       {
+               char cwType[1];
+               TEST_DEBUG("### DeActivate Call Waiting  #### ");
+               TelSsWaitingInfo_t cwInfo = {0,};
+
+               TEST_DEBUG("Select the Call Waiting Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cwType,2);
+
+               cwInfo.CallType = atoi(cwType);
+               cwInfo.Mode = TAPI_SS_CW_DEACTIVATE;
+
+               TEST_DEBUG("SS CallType:[%d]",cwInfo.CallType);
+               ret = tel_set_ss_waiting(&cwInfo,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+
+       }
+
+       /* Call barring */
+       if(strncmp(buf, "2a", 2) == 0)
+       {
+               TelSsCallBarringInfo_t  cb_req = {0,};
+               char cbType[1];
+               char cba_fla[10];
+               TEST_DEBUG("####        Interrogate Status of Call barring for Voice Calls              ####");
+
+               TEST_DEBUG("Enter Call Barring Flavor type(BAOC -2, BAIC-6) ");
+               TEST_DEBUG(" All Barring -[0] Out Going calls - [1] All outgoing calls [2] ");
+               TEST_DEBUG(" Outgoing Intl calls -[3] All ougoing intl calls except home[4] - Barring incoming [5]  All Incoming calls [6]");
+               TEST_DEBUG(" All incoming calls in roaming -[7] All incoming calls in Sim [2] ");
+               ss_fgets(cba_fla,5);
+               cb_req.Type = atoi(cba_fla);
+
+               TEST_DEBUG("Select the SS Call Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cbType,2);
+               cb_req.CallType = atoi(cbType);
+
+               TEST_DEBUG("CB type:[%d], SS CallType:[%d]", cb_req.Type, cb_req.CallType);
+
+               ret = tel_get_ss_barring_status(cb_req.Type, cb_req.CallType,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+         }
+
+       if(strncmp(buf, "2b",2) == 0)
+       {
+               TelSsCallBarringInfo_t  cb_req = {0,};
+               char cbType[1];
+               char cba_fla[10];
+               char new_pwd[10];
+
+               TEST_DEBUG("####        Activate the Call Barring for Voice calls.      ####");
+
+               TEST_DEBUG("Enter Call Barring Flavor type(BAOC -2, BAIC-6) ");
+               TEST_DEBUG(" All Barring -[0] Out Going calls - [1] All outgoing calls [2] ");
+               TEST_DEBUG(" Outgoing Intl calls -[3] All ougoing intl calls except home[4] - Barring incoming [5]  All Incoming calls [6]");
+               TEST_DEBUG(" All incoming calls in roaming -[7] All incoming calls in Sim [8] ");
+
+               ss_fgets(cba_fla,5);
+               cb_req.Type = atoi(cba_fla);
+               TEST_DEBUG(" Enter Call Barring  Password - size minimum 4 bytes");
+               ss_fgets(new_pwd,5);
+               memcpy(&cb_req.szPassword,&new_pwd,4);
+               cb_req.Mode =  TAPI_SS_CALL_BAR_ACTIVATE;
+
+               TEST_DEBUG("Select the SS Call Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cbType,2);
+               cb_req.CallType = atoi(cbType);
+
+               TEST_DEBUG("CB type:[%d], SS CallType:[%d]", cb_req.Type, cb_req.CallType);
+
+               ret = tel_set_ss_barring(&cb_req,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+
+       if(strncmp(buf, "2c", 2) == 0)
+       {
+               TelSsCallBarringInfo_t  cb_req = {0,};
+               char cbType[1];
+
+               char cba_fla[10];
+               char new_pwd[10];
+               TEST_DEBUG("Enter Call Barring Flavor type(BAOC -2, BAIC-6) ");
+               TEST_DEBUG(" All Barring -[0] Out Going calls - [1] All outgoing calls [2] ");
+               TEST_DEBUG(" Outgoing Intl calls -[3] All ougoing intl calls except home[4] - Barring incoming [5]  All Incoming calls [6]");
+               TEST_DEBUG(" All incoming calls in roaming -[7] All incoming calls in Sim [8] ");
+
+               ss_fgets(cba_fla,5);
+               cb_req.Type = atoi(cba_fla);
+
+               TEST_DEBUG(" Enter Call Barring  Password - size minimum 4 bytes");
+               ss_fgets(new_pwd,5);
+               memcpy(&cb_req.szPassword,&new_pwd,4);
+
+               TEST_DEBUG("Select the SS Call Type ");
+               TEST_DEBUG(" voice-[0], data circuit sync-[6], all tele bearer-[7]");
+               ss_fgets(cbType,2);
+               cb_req.CallType = atoi(cbType);
+
+               cb_req.Mode =  TAPI_SS_CALL_BAR_DEACTIVATE;
+
+               TEST_DEBUG("CB type:[%d], SS CallType:[%d]", cb_req.Type, cb_req.CallType);
+
+               ret = tel_set_ss_barring(&cb_req,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret, request_id);
+       }
+
+
+       if(strncmp(buf, "3a", 2) == 0)
+       {
+               char flavor[1];
+               char cfType[1];
+
+               TelSsForwardInfo_t  cfReq ={0,};
+
+
+               TEST_DEBUG("### Interrogate the Status of Call forwarding .");
+               TEST_DEBUG("Select the Call Forwarding Flavor ");
+               TEST_DEBUG(" CF-Unconditional -[0]  CF-Busy [1]  CF-No Reply [2]  CF-Not reachable [3] CF -All forwarding[4] All Cond CF [5]  ");
+               ss_fgets(flavor,2);
+               cfReq.Condition = atoi(flavor);
+
+               TEST_DEBUG("Select the Call Forwarding Type ");
+               TEST_DEBUG("voice -[0] data -[3] fax-[4] all_tele and bearer -[5] ");
+               ss_fgets(cfType,2);
+               cfReq.Type = atoi(cfType);
+
+               TEST_DEBUG("CF Flavor:[%d], SS CF CallType:[%d]", cfReq.Condition, cfReq.Type);
+
+               ret = tel_get_ss_forward_status(cfReq.Type,  cfReq.Condition,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+
+       }
+       if(strncmp(buf, "3b", 2) == 0)
+       {
+
+               char cf_number[20];
+               unsigned char len;
+               char flavor[1];
+               char cfType[1];
+
+               TelSsForwardInfo_t  cfActReq ={0,};
+
+               TEST_DEBUG("#### Call Forwarding Activation #### ");
+               TEST_DEBUG("Enter the Call forwarding number ");
+               ss_fgets(cf_number,15);
+               len = strlen(cf_number);
+               TEST_DEBUG("Length of CF number :%d ",len);
+               memcpy(&(cfActReq.szPhoneNumber),cf_number,len);
+
+               TEST_DEBUG("Select the Call Forwarding Flavor ");
+               TEST_DEBUG(" CF-Unconditional -[0]  CF-Busy [1]  CF-No Reply [2]  CF-Not reachable [3] CF -All forwarding[4] All Cond CF [5] ");
+               ss_fgets(flavor,2);
+               cfActReq.Condition = atoi(flavor);
+               TEST_DEBUG("********** flavor=%x ",cfActReq.Condition);
+
+               TEST_DEBUG("Select the Call Forwarding Type ");
+               TEST_DEBUG("voice -[0] data -[3] fax-[4] all_tele and bearer -[5] ");
+               ss_fgets(cfType,2);
+               cfActReq.Type = atoi(cfType);
+
+               cfActReq.NoReplyConditionTimer = TAPI_SS_CF_NO_REPLY_TIME_10_SECS;
+               cfActReq.Mode=  TAPI_CALL_FORWARD_MODE_ENABLE_EV;
+
+               TEST_DEBUG("CF Flavor:[%d], SS CF CallType:[%d]", cfActReq.Condition, cfActReq.Type);
+
+               ret = tel_set_ss_forward(&cfActReq,&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+
+       }
+       if(strncmp(buf, "3c", 2) == 0)
+       {
+               char cf_number[20];
+               unsigned char len;
+               char flavor[1];
+               char cfType[1];
+               TelSsForwardInfo_t  cfActReq ={0,};
+
+               TEST_DEBUG("#### Call Forwarding DEActivation #### ");
+               TEST_DEBUG("Enter the Call forwarding number ");
+               ss_fgets(cf_number,15);
+               len = strlen(cf_number);
+               TEST_DEBUG("Length of CF number :%d ",len);
+               memcpy(&(cfActReq.szPhoneNumber),cf_number,len);
+
+               TEST_DEBUG("Select the Call Forwarding Flavor ");
+               TEST_DEBUG(" CF-Unconditional -[0]  CF-Busy [1]  CF-No Reply [2]  CF-Not reachable [3] CF -All forwarding[4] All Cond CF [5] ");
+
+               ss_fgets(flavor,2);
+               cfActReq.Condition = atoi(flavor);
+               TEST_DEBUG("********** flavor=%x ",cfActReq.Condition);
+
+               TEST_DEBUG("Select the Call Forwarding Type ");
+               TEST_DEBUG("voice -[0] data -[3] fax-[4] all_tele and bearer -[5] ");
+               ss_fgets(cfType,2);
+               cfActReq.Type = atoi(cfType);
+
+               cfActReq .NoReplyConditionTimer = TAPI_SS_CF_NO_REPLY_TIME_10_SECS;
+               cfActReq.Mode=  TAPI_CALL_FORWARD_MODE_DISABLE_EV;
+
+               TEST_DEBUG("CF Flavor:[%d], SS CF CallType:[%d]", cfActReq.Condition, cfActReq.Type);
+
+               ret = tel_set_ss_forward(&cfActReq,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+
+       }
+       if(strncmp(buf, "3d", 2) == 0)
+       {
+
+               char cf_number[20];
+               unsigned char len;
+               char flavor[1];
+               char cfType[1];
+
+               TelSsForwardInfo_t  cfActReq ={0,};
+
+               TEST_DEBUG("#### Call Forwarding Registration #### ");
+               TEST_DEBUG("Enter the Call forwarding number ");
+               ss_fgets(cf_number,15);
+               len = strlen(cf_number);
+               TEST_DEBUG("Length of CF number :%d ",len);
+               memcpy(&(cfActReq.szPhoneNumber),cf_number,len);
+
+               TEST_DEBUG("Select the Call Forwarding Flavor ");
+               TEST_DEBUG(" CF-Unconditional -[0]  CF-Busy [1]  CF-No Reply [2]  CF-Not reachable [3] CF -All forwarding[4] All Cond CF [5] ");
+               ss_fgets(flavor,2);
+
+               cfActReq.Condition = atoi(flavor);
+               TEST_DEBUG("********** flavor=%x ",cfActReq.Condition);
+
+
+               TEST_DEBUG("Select the Call Forwarding Type ");
+               TEST_DEBUG("voice -[0] data -[3] fax-[4] all_tele and bearer -[5] ");
+               ss_fgets(cfType,2);
+
+               cfActReq.Type = atoi(cfType);
+
+               cfActReq.NoReplyConditionTimer = TAPI_SS_CF_NO_REPLY_TIME_10_SECS;
+               cfActReq.Mode=  TAPI_CALL_FORWARD_MODE_REGISTRATION_EV;
+
+               TEST_DEBUG("CF Flavor:[%d], SS CF CallType:[%d]", cfActReq.Condition, cfActReq.Type);
+
+               ret = tel_set_ss_forward(&cfActReq,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+
+
+       }
+       if(strncmp(buf, "3e", 2) == 0)
+       {
+               char cf_number[20];
+               unsigned char len;
+               char flavor[1];
+               char cfType[1];
+               TelSsForwardInfo_t  cfActReq ={0,};
+
+               TEST_DEBUG("#### Call Forwarding Deregistration #### ");
+               TEST_DEBUG("Enter the Call forwarding number ");
+               ss_fgets(cf_number,15);
+               len = strlen(cf_number);
+               TEST_DEBUG("Length of CF number :%d ",len);
+               memcpy(&(cfActReq.szPhoneNumber),cf_number,len);
+
+               TEST_DEBUG("Select the Call Forwarding Flavor ");
+               TEST_DEBUG(" CF-Unconditional -[0]  CF-Busy [1]  CF-No Reply [2]  CF-Not reachable [3] CF -All CF [4] All Cond CF [5]  ");
+               ss_fgets(flavor,2);
+               cfActReq.Condition = atoi(flavor);
+               TEST_DEBUG("********** flavor=%x ",cfActReq.Condition);
+
+               TEST_DEBUG("Select the Call Forwarding Type ");
+               TEST_DEBUG("voice -[0] data -[3] fax-[4] all_tele and bearer -[5] ");
+               ss_fgets(cfType,2);
+
+               cfActReq.Type = atoi(cfType);
+
+               cfActReq.NoReplyConditionTimer = TAPI_SS_CF_NO_REPLY_TIME_10_SECS;
+               cfActReq.Mode=  TAPI_CALL_FORWARD_MODE_ERASURE_EV;
+
+               TEST_DEBUG("CF Flavor:[%d], SS CF CallType:[%d]", cfActReq.Condition, cfActReq.Type);
+
+               ret = tel_set_ss_forward(&cfActReq,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+
+
+       /* Change Call barring password */
+       if(strncmp(buf, "cbp",3) == 0)
+       {
+               char old_pwd[10];
+               char new_pwd[10];
+               char new_pwd_again[10];
+
+               memset(old_pwd, 0, 10);
+               memset(new_pwd, 0, 10);
+               memset(new_pwd_again, 0, 10);
+
+               TEST_DEBUG("####        Change the Call Barring Password        ####");
+               TEST_DEBUG(" Enter Call Barring Old Password - size minimum 4 bytes");
+               ss_fgets(old_pwd,5);
+
+               TEST_DEBUG(" Enter Call Barring New Password - size minimum 4 bytes");
+               ss_fgets(new_pwd,5);
+
+               TEST_DEBUG(" Enter Call Barring New Password Again - size minimum 4 bytes");
+               ss_fgets(new_pwd_again,5);
+
+               ret = tel_change_ss_barring_password(old_pwd, new_pwd, new_pwd_again,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+
+       /* CLI */
+       if(strncmp(buf, "cli", 3) == 0)
+       {
+               char cli_type[1];
+               TEST_DEBUG("####        Interrogate the Status of CLI Services (except CDIP) ####");
+               TEST_DEBUG(" CLIP -[1] CLIR -[2] COLP -[3] COLR-[4] CDIP-[5] CNAP -[6] ");
+               ss_fgets(cli_type,2);
+
+               TEST_DEBUG("CLI type:[%d]", atoi(cli_type));
+
+               ret = tel_get_ss_cli_status(atoi(cli_type),&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret,request_id);
+       }
+       /* USSD */
+       if(strncmp(buf, "ussd", 4) == 0)
+       {
+
+               char ussdString[TAPI_SS_USSD_DATA_SIZE_MAX];
+               int  ret;
+
+               memset(ussdString, 0, TAPI_SS_USSD_DATA_SIZE_MAX);
+               strcpy(ussdString , "*124#");
+
+               TEST_DEBUG("ussd string:[%s],ussd len:[%d]", ussdString, strlen(ussdString));
+               ret= tel_send_ss_ussd_request(ussdString,&request_id);
+               TEST_DEBUG(" API RETURN VAL:[%d]",ret);
+
+       }
+
+    /* Read AOC */
+    if(strncmp(buf, "raoc", 4) == 0)
+       {
+               char aoc_type[1];
+               TEST_DEBUG("Read AOC Information - Select AOC type");
+               TEST_DEBUG("ACM Accumulated Call meter -[1]  CCM -[2]  Cost Limit MAX ACM -[4]  Price per unit currency PUC [8]");
+
+               ss_fgets(aoc_type,2);
+               TEST_DEBUG("Aoc Type :%d",atoi(aoc_type));
+
+               ret = tel_get_ss_aoc_info(atoi(aoc_type),&request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret);
+       }
+
+       /* SIM OPEN */
+       if(strncmp(buf, "simopen", 7) == 0)
+       {
+               int i = 0;
+               TelSimStatusData_t SimOpenData = {0,};
+
+               TEST_DEBUG("********************************************");
+
+               TEST_DEBUG("open sim");
+       }
+
+       /* Enter PIN2 */
+       if(strncmp(buf, "pin2", 4) == 0)
+       {
+               /* nothing */
+       }
+
+       if(strncmp(buf, "5e", 2) == 0)
+       {
+               TEST_DEBUG("########### Setting Maximum Cost Limit -  MAX_ACM Value..############# ");
+               TelCallAocInfo_t pAocSetInfo = {0,};
+               char maxacm_val[10];
+               TEST_DEBUG("Enter the MAX ACM value ");
+               ss_fgets(maxacm_val,5);
+
+               pAocSetInfo.AocType = TAPI_SS_AOC_TYPE_MAXACM;
+
+               pAocSetInfo.MaxAcm =atoi(maxacm_val);
+
+               ret = tel_set_ss_aoc_info(&pAocSetInfo, &request_id);
+
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret, request_id);
+       }
+       if(strncmp(buf, "5f", 2) == 0)
+       {
+               TEST_DEBUG("########### Setting Price/Unit Currency - PPUC Value.############# ");
+               TelCallAocInfo_t *pAocSetInfo;
+               char ppu_curr[10];
+
+               TEST_DEBUG("Enter price per unit currency Characters ");
+               ss_fgets(ppu_curr,3);
+               pAocSetInfo = calloc(1,sizeof(TelCallAocInfo_t));
+
+               pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_PUC;
+
+
+               pAocSetInfo->PPM = 0x02;
+
+               pAocSetInfo->CharTypeOfCurrency = 0x02;
+               pAocSetInfo->szCurrency[0] = ppu_curr[0];
+               pAocSetInfo->szCurrency[1] = ppu_curr[1];
+               pAocSetInfo->szCurrency[2] = ppu_curr[2];
+
+               TEST_DEBUG("Set  AOC Request");
+
+               ret = tel_set_ss_aoc_info(pAocSetInfo,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret, request_id);
+
+               free(pAocSetInfo);
+
+       }
+       if(strncmp(buf, "5g", 2) == 0)
+       {
+               TEST_DEBUG("################## Resetting Total Cost   MAX ACM..################ ");;
+               TelCallAocInfo_t  *pAocSetInfo;
+               pAocSetInfo = calloc(1,sizeof(TelCallAocInfo_t));
+
+               pAocSetInfo->AocType = TAPI_SS_AOC_TYPE_RESET;
+
+               ret = tel_set_ss_aoc_info(pAocSetInfo,&request_id);
+               TEST_DEBUG("Tapi return api_err value is [0x%x]  RequestID:[%d]", ret, request_id);
+
+               free(pAocSetInfo);
+       }
+
+       if(strncmp(buf, "quit", 4) == 0)
+       {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu");
+               return -1;
+       }
+
+       memset(buf, '\0', 256);
+       return 0;
+}
+
+
+/*****************************************************************/
+
+void ss_select_loop(void)
+{
+       int ret;
+       fd_set readfds;
+
+    while (1) {
+        FD_ZERO(&readfds);
+        FD_SET(0, &readfds);
+
+
+        ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+        if (ret) {
+
+           if (FD_ISSET(0, &readfds)) {
+                 if(ss_read_key_input()<0)
+                       break;
+            }
+        }
+    }
+}
+
+int ss_test_subscribe_tapi_events(void)
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfSSEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int SSEvtList[] =
+       {
+               TAPI_EVENT_SS_BARRING_CNF,   /**<0x0400,        This confirmation event is sent when Barring activation/deactivation is requested*/
+               TAPI_EVENT_SS_BARRING_CHANGEPASS_CNF,   /**<    This event is returned as Barring password change confirmation*/
+               TAPI_EVENT_SS_BARRING_QUERYSTATUS_CNF,   /**<   This event is returned  as Barring status query confirmation*/
+               TAPI_EVENT_SS_FORWARD_CNF,   /**<       This event is returned as confirmation for Forward Activation/Deactivation/Registration/Erasure */
+               TAPI_EVENT_SS_FORWARD_QUERYSTATUS_CNF,   /**<   This event is returned as confirmation for Forward Status query confirmation*/
+               TAPI_EVENT_SS_WAITING_CNF,   /**<       This event is returned as confirmation for Call waiting activation/deactivation*/
+               TAPI_EVENT_SS_WAITING_QUERYSTATUS_CNF,   /**<   This event is returned as Call waiting status query confirmation*/
+               TAPI_EVENT_SS_USSD_CNF,   /**<  This event is returned as USSD send confirmation*/
+               TAPI_EVENT_SS_USSD_CANCEL_CNF,  /**<    This event is returned as USSD cancel confirmation      >**/
+               TAPI_EVENT_SS_USSD_IND,   /**<  This is an unsolicited USSD indication*/
+               TAPI_EVENT_SS_CLI_QUERYSTATUS_CNF,   /**<       This event is indicated to the Application for CLI service interrogation*/
+               TAPI_EVENT_SS_REL_COMP_MSG_NOTIFY, /**< This event is indicated to the Application when tapi receives Release complete message notification for any SS transactions*/
+               TAPI_EVENT_SS_AOC_RSP,                          /**<This event is used to send the aoc information */
+               TAPI_EVENT_SS_SET_AOC_CNF,                      /**<This event is used to send the confirmation for setting aoc values */
+               TAPI_EVENT_SS_BARRING_TYPE_IND,         /**<This event is used to send the barring type while making an MO call */
+       };
+
+       iNumOfSSEvt = sizeof(SSEvtList)/sizeof(int);
+       TAPI_CALLOC(SS_subscription_id, iNumOfSSEvt, unsigned int)
+
+
+       for( i=0 ; i< iNumOfSSEvt; i++ )
+       {
+               api_err = tel_register_event(SSEvtList[i], &SS_subscription_id[i],(TelAppCallback)&ss_async_event_callback,NULL);
+               if(api_err != TAPI_API_SUCCESS)
+               {
+                       TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", SSEvtList[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+
+}
diff --git a/src/test_apps/tapi_svc_test.c b/src/test_apps/tapi_svc_test.c
new file mode 100644 (file)
index 0000000..89e288f
--- /dev/null
@@ -0,0 +1,555 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <pthread.h>
+#include <assert.h>
+#include <glib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include "ITapiProductivity.h"
+#include "TapiCommon.h"
+#include "TapiEvent.h"
+
+#define TEST_DEBUG(frmt, args...) \
+{do { fprintf(stderr, "[SVC Test][%s:%04d] "frmt "\n", __func__,__LINE__, ##args); } while (FALSE); }
+
+
+#define SVC_TEST_KEY_END                               0x51
+#define SVC_TEST_KEY_SOFT_RIGHT                0x5C
+#define SVC_TEST_KEY_VALUE_0                   0x30
+#define SVC_TEST_KEY_VALUE_1                   0x31
+#define SVC_TEST_KEY_VALUE_2                   0x32
+#define SVC_TEST_KEY_VALUE_3                   0x33
+#define SVC_TEST_KEY_VALUE_4                   0x34
+#define SVC_TEST_KEY_VALUE_5                   0x35
+#define SVC_TEST_KEY_VALUE_6                   0x36
+#define SVC_TEST_KEY_VALUE_7                   0x37
+#define SVC_TEST_KEY_VALUE_8                   0x38
+#define SVC_TEST_KEY_VALUE_9                   0x39
+
+extern int EvtDeliveryHandle ;
+
+typedef struct
+{
+       int group;
+       int type;
+       int len;
+       void *dst;
+}data_t;
+
+static unsigned int *  SVC_subscription_id;
+
+int error_code;
+
+//static int  svc_async_event_callback  (tapi_svcmode_event_t event ,void * data)
+static int  svc_async_event_callback(TelTapiEvent_t    *event)
+{
+
+       switch(event->EventType)
+       {
+               case TAPI_EVENT_SVCMODE_START_NOTI:
+               {
+                       tapi_service_mode_t  svc_mode;
+                       memcpy(&svc_mode , event->pData , sizeof(tapi_service_mode_t));
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_START $$$$$$ ");
+                       TEST_DEBUG("svc_mode:[%d]", svc_mode);
+               }
+                       break;
+
+               case TAPI_EVENT_SVCMODE_END_NOTI:
+               {
+                       tapi_service_mode_end_t reset_mode;
+                       memcpy(&reset_mode , event->pData , sizeof(tapi_service_mode_end_t));
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_END $$$$$$ ");
+                       TEST_DEBUG("svc_mode:[%d], reset:[%d]", reset_mode.service_mode, reset_mode.reset);
+               }
+                       break;
+
+               case TAPI_EVENT_SVCMODE_CHANGE_NOTI:
+               {
+                       tapi_service_mode_t  svc_mode;
+                       memcpy(&svc_mode , event->pData , sizeof(tapi_service_mode_t));
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_CHANGE $$$$$$ ");
+                       TEST_DEBUG("svc_mode:[%d]", svc_mode);
+               }
+                       break;
+
+               case TAPI_EVENT_SVCMODE_SCREEN_CFG_NOTI:
+               {
+                       tapi_screen_config_t screen_config;
+                       memcpy(&screen_config , event->pData , sizeof(tapi_screen_config_t));
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_SCREEN_CFG $$$$$$ ");
+                       TEST_DEBUG("line num:[%d], keypad:[%d]", screen_config.line_number, screen_config.keypad);
+               }
+                       break;
+
+               case TAPI_EVENT_SVCMODE_DISP_SCREEN_NOTI:
+               {
+                       tapi_service_display_info_t display_screen;
+                       int num_of_lines, line_count;
+
+                       memcpy(&display_screen , event->pData , sizeof(tapi_service_display_info_t));
+
+                       num_of_lines = display_screen.num_of_lines;
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_DISP_SCREEN $$$$$$ ");
+                       TEST_DEBUG("num_of_lines :[%d]", display_screen.num_of_lines);
+
+                       line_count =0;
+
+                       TEST_DEBUG("===================================================");
+                       while(num_of_lines > 0)
+                       {
+                               /* LINE COUNT - LINE NUMBER - LINE REVRES - DISPLAY STRING */
+                               TEST_DEBUG("#[%d-%d-%d]:[%s]", line_count, display_screen.display[line_count].line, display_screen.display[line_count].reverse, display_screen.display[line_count].string);
+                               num_of_lines--;
+                               line_count++;
+                       }
+                       TEST_DEBUG("===================================================");
+
+               }
+                       break;
+
+               case    TAPI_EVENT_SVCMODE_DEVICE_TEST_NOTI:
+               {
+                       tapi_device_info_t  device_info;
+                       memcpy(&device_info , event->pData , sizeof(tapi_device_info_t));
+                       TEST_DEBUG("$$$$$$ TAPI_SVCMODE_EVENT_SVCMODE_DEVICE_TEST $$$$$$ ");
+                       TEST_DEBUG("dev id:[%d], dev status:[%d]",device_info.device_id, device_info.device_status);
+               }
+                       break;
+
+               default:
+                  break;
+       }
+
+    return TRUE;
+}
+
+int svc_read_key_input(void)
+{
+       int ret;
+       char buf[512];
+
+       static tapi_service_mode_t  svc_mode = -1; // staic. (for svc mode end)
+       tapi_test_mode_sub_t test_sub = -1;
+
+
+       memset(buf,0, sizeof(buf));
+
+       printf("\n########################################################\n");
+       printf("1. tel_start_svcmode (main)\n");
+       printf("2a. tel_send_svcmode_keycode (END)\n");
+       printf("2b. tel_send_svcmode_keycode (SOFT RIGHT)\n");
+       printf("2c. tel_send_svcmode_keycode (1~9)\n");
+       printf("3. tel_end_svcmode \n");
+       printf("4. tel_start_svcmode (monitor)\n");
+       printf("quit. QUIT\n");
+       printf("For escape : [2a] -> [3]\n");
+       printf("########################################################\n\n");
+
+       ret = read(0, buf, sizeof(buf));
+
+       if (ret < 0)
+       {
+               if (errno == EINTR)
+               perror("read(1)");
+               return -1;
+       }
+       else if (ret == 0) return ret;
+
+
+       if( memcmp(buf,"1",sizeof("1")-1) == 0 )
+       {
+               TEST_DEBUG("START SERVICE MODE (MAIN)");
+
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_ENTER;
+
+               tel_start_svcmode(svc_mode, test_sub);
+       }
+
+       if( memcmp(buf,"2a",sizeof("2a")-1) == 0 )
+       {
+               TEST_DEBUG("PROCESS KEY CODE (END)");
+
+               tel_send_svcmode_keycode(SVC_TEST_KEY_END);
+       }
+
+       if( memcmp(buf,"2b",sizeof("2b")-1) == 0 )
+       {
+               TEST_DEBUG("PROCESS KEY CODE (SOFT RIGHT)");
+
+               tel_send_svcmode_keycode(SVC_TEST_KEY_SOFT_RIGHT);
+       }
+
+       if( memcmp(buf,"2c",sizeof("2c")-1) == 0 )
+       {
+               int iKey = 0;
+               TEST_DEBUG("INPUT KEY NUMBER:");
+               scanf("%d", &iKey);
+               tel_send_svcmode_keycode(iKey+SVC_TEST_KEY_VALUE_0);
+               getchar();
+       }
+
+       if( memcmp(buf,"3",sizeof("3")-1) == 0 )
+       {
+               TEST_DEBUG("END SERVICE MODE");
+
+               tel_end_svcmode(svc_mode);
+       }
+
+       if( memcmp(buf,"4",sizeof("4")-1) == 0 )
+       {
+               TEST_DEBUG("START SERVICE MODE : MONITOR");
+
+               svc_mode        =       TAPI_SVC_MODE_MONITOR;
+               test_sub        =       TAPI_TESTMODE_ENTER;
+
+               tel_start_svcmode(svc_mode, test_sub);
+       }
+
+
+       if( memcmp(buf,"a",sizeof("a")-1) == 0 )
+       {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_SW_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_SW_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+       }
+
+        if( memcmp(buf,"b",sizeof("b")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_FTA_SW_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_FTA_SW_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"c",sizeof("c")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_FTA_HW_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_FTA_HW_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"d",sizeof("d")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_ALL_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_ALL_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+#if 1
+        if( memcmp(buf,"e",sizeof("e")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_BATTERY_INFO_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_BATTERY_INFO_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"f",sizeof("f")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub                =       TAPI_TESTMODE_CIPHERING_PROTECTION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_CIPHERING_PROTECTION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"g",sizeof("g")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_INTEGRITY_PROTECTION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_INTEGRITY_PROTECTION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"h",sizeof("h")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_IMEI_READ_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_IMEI_READ_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"i",sizeof("i")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_BLUETOOTH_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_BLUETOOTH_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"j",sizeof("j")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_VIBRATOR_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_VIBRATOR_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"k",sizeof("k")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub                =       TAPI_TESTMODE_MELODY_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_MELODY_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"l",sizeof("l")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_MP3_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_MP3_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"m",sizeof("m")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_FACTORY_RESET_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_FACTORY_RESET_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"n",sizeof("n")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_FACTORY_PRECONFIG_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_FACTORY_PRECONFIG_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"o",sizeof("o")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_TFS4_EXPLORE_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_TFS4_EXPLORE_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"p",sizeof("p")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_RTC_TIME_DISPLAY_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_RTC_TIME_DISPLAY_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"q",sizeof("q")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_RSC_FILE_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_RSC_FILE_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+       }
+
+        if( memcmp(buf,"r",sizeof("r")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_USB_DRIVER_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_USB_DRIVER_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"s",sizeof("s")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_USB_UART_DIAG_CONTROL_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_USB_UART_DIAG_CONTROL_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+
+        if( memcmp(buf,"t",sizeof("t")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_RRC_VERSION_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_RRC_VERSION_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"u",sizeof("u")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_GPSONE_SS_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_GPSONE_SS_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"v",sizeof("v")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_BAND_SEL_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_BAND_SEL_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"w",sizeof("w")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_GCF_TESTMODE_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_GCF_TESTMODE_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"x",sizeof("x")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_GSM_FACTORY_AUDIO_LB_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_GSM_FACTORY_AUDIO_LB_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"y",sizeof("y")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_FACTORY_VF_TEST_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_FACTORY_VF_TEST_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+        if( memcmp(buf,"z",sizeof("z")-1) == 0 )
+        {
+               svc_mode        =       TAPI_SVC_MODE_TEST_MANUAL;
+               test_sub        =       TAPI_TESTMODE_TOTAL_CALL_TIME_INFO_ENTER;
+
+               TEST_DEBUG("START SERVICE MODE: TAPI_TESTMODE_TOTAL_CALL_TIME_INFO_ENTER");
+
+               tel_start_svcmode(svc_mode, test_sub);
+        }
+#endif
+       if(strncmp(buf, "quit", 4) == 0)
+        {
+               TEST_DEBUG("Finished Testing this module, Going back to Main Menu\n");
+               return -1;
+        }
+
+    return 0;
+}
+
+
+void svc_select_loop(void)
+{
+    int ret;
+    fd_set readfds;
+
+    while (1)
+       {
+               FD_ZERO(&readfds);
+               FD_SET(0, &readfds);
+
+                ret = select(0 + 1, &readfds, NULL, NULL, NULL);
+               if (ret)
+                {
+                    if (FD_ISSET(0, &readfds))
+                        {
+                             if(svc_read_key_input()<0)
+                                       break;
+                       }
+               }
+        }
+}
+
+int svc_test_subscribe_tapi_events(void)
+{
+       int i = 0;
+       int ret_val = TRUE;
+       int iNumOfSVCEvt = 0;
+       TapiResult_t    api_err = TAPI_API_SUCCESS;
+
+
+       int SVCEvtList[] =
+       {
+        TAPI_EVENT_SVCMODE_START_NOTI,
+        TAPI_EVENT_SVCMODE_END_NOTI,
+        TAPI_EVENT_SVCMODE_CHANGE_NOTI,
+        TAPI_EVENT_SVCMODE_SCREEN_CFG_NOTI,
+        TAPI_EVENT_SVCMODE_DISP_SCREEN_NOTI,
+        TAPI_EVENT_SVCMODE_DEVICE_TEST_NOTI,
+
+       }; // TODO: event updated
+
+       iNumOfSVCEvt = sizeof(SVCEvtList)/sizeof(int);
+       SVC_subscription_id = (unsigned int *)calloc(iNumOfSVCEvt, sizeof(unsigned int));
+
+
+       for( i=0 ; i< iNumOfSVCEvt; i++ )
+       {
+               api_err = tel_register_event(SVCEvtList[i], &SVC_subscription_id[i],(TelAppCallback)&svc_async_event_callback,NULL);
+               if(api_err != TAPI_API_SUCCESS)
+               {
+                       TEST_DEBUG("isn't subscribed. event id is %d, api_err is %d\n", SVCEvtList[i],api_err);
+                       ret_val = FALSE;
+                       break;
+               }
+       }
+
+       return ret_val;
+}
diff --git a/src/test_apps/tapi_test_app.c b/src/test_apps/tapi_test_app.c
new file mode 100644 (file)
index 0000000..9cf3308
--- /dev/null
@@ -0,0 +1,383 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <pthread.h>     /* pthread functions and data structures */
+#include <signal.h>
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <glib.h>
+
+#include "tapi_test_utility.h"
+#include "TapiCommon.h"
+
+#define TAPI_TEST_MAX_LIST             10
+
+#define TAPI_TEST_COMMON_ID            1
+#define TAPI_TEST_PWR_ID               2
+#define TAPI_TEST_CALL_ID              3
+#define TAPI_TEST_SIM_ID               4
+#define TAPI_TEST_SS_ID                        5
+#define TAPI_TEST_SMS_ID               6
+#define TAPI_TEST_NW_ID                        7
+#define TAPI_TEST_SAT_ID               8
+#define TAPI_TEST_DATA_ID              9
+#define TAPI_TEST_MISC_ID              10
+#define TAPI_TEST_SVC_ID               11
+#define TAPI_TEST_GPS_ID               12
+#define TAPI_TEST_SOUND_ID             13
+#define TAPI_TEST_CDMA_DATA_ID 14
+#define TAPI_TEST_CFG_ID               15
+#define TAPI_TEST_QUIT_ID              0
+
+int EvtDeliveryHandle = 0;
+
+/******************************************************************************
+*******************************************************************************
+*
+*                                                      S U B  M O D U L E   A P I's
+*
+******************************************************************************
+******************************************************************************/
+/*     Add the Keyboard Loop Routines here...  */
+void power_select_loop(void);
+int call_test_init(void);
+void sim_select_loop(void);
+void ss_select_loop(void);
+void sms_select_loop();
+void nw_select_loop(int option);
+void gps_select_loop();
+void misc_select_loop(int option);
+void sat_select_loop(void);
+void data_select_loop(void);
+int svc_select_loop(void);
+void sound_select_loop(void);
+void cdma_data_select_loop(void);
+void cfg_select_loop(void);
+
+
+/*     Add the Subscribe routines here....     */
+int power_test_subscribe_tapi_events (void);
+int call_test_subscribe_tapi_events (void);
+int nw_test_subscribe_tapi_events(void);
+int gps_test_subscribe_tapi_events(void);
+int misc_test_subscribe_tapi_events(void);
+int cfg_test_subscribe_tapi_events(void);
+int data_test_subscribe_tapi_events (void);
+int sat_test_subscribe_tapi_events(void);
+int sim_test_subscribe_tapi_events (void);
+int svc_test_subscribe_tapi_events(void);
+int ss_test_subscribe_tapi_events(void);
+int sms_subscribe_tapi_events();
+void cdma_data_test_subscribe_tapi_events (void);
+int sound_test_subscribe_tapi_events(void);
+
+/******************************************************************************
+*******************************************************************************
+*
+*                                                      G L O B A L   V A R I A B L E S
+*
+******************************************************************************
+******************************************************************************/
+
+
+
+/******************************************************************************
+*******************************************************************************
+*
+*                                              T A P I   T E S T   A P I's
+*
+*
+******************************************************************************
+******************************************************************************/
+
+
+//1 GMain Loop Routine.
+
+
+
+/*     Wait in the GMain Loop  to receive notifications   */
+void  tapi_test_app_noti_loop(void)
+{
+       GMainLoop *mainloop;
+
+       mainloop = g_main_loop_new (NULL, FALSE);
+
+       TAPI_TEST_DEBUG("Entering GMain Loop to Receive Notifications....\n");
+
+       g_main_loop_run (mainloop);
+
+       TAPI_TEST_DEBUG("EXITING GMAIN LOOP\n");
+
+       g_main_loop_unref(mainloop);
+
+       tel_deinit();
+}
+
+
+
+
+//2 Call the sub module Key Event Loop sub routines on demand by the User.
+
+
+/*     Call the selected sub module routine..  */
+int tapi_test_app_process_choice(int sub_mod_id)
+{
+       int ret = 1;
+
+       switch(sub_mod_id)
+       {
+               case TAPI_TEST_COMMON_ID:
+               case TAPI_TEST_PWR_ID:
+                       TAPI_TEST_DEBUG("Loading Power Module Test Routines...\n");
+                       power_select_loop();
+                       break;
+               case TAPI_TEST_CALL_ID:
+                       TAPI_TEST_DEBUG("Loading Common/Power&Display/Call Module Test Routines...\n");
+                       call_test_init();
+                       TAPI_TEST_DEBUG(" sub-module testing done.. \n");
+                       break;
+               case TAPI_TEST_SIM_ID:
+                       TAPI_TEST_DEBUG("Loading SIM Module Test Routines...\n");
+                       sim_select_loop();
+                       TAPI_TEST_DEBUG(" SIM sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_SS_ID:
+                       TAPI_TEST_DEBUG("Loading SS Module Test Routines...\n");
+                       //ss_select_loop();
+                       TAPI_TEST_DEBUG(" SS sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_SMS_ID:
+                       TAPI_TEST_DEBUG("Loading SMS module test routines...\n");
+                       sms_select_loop();
+                       TAPI_TEST_DEBUG(" SMS sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_NW_ID:
+                       TAPI_TEST_DEBUG("Loading NW Module Test Routines...\n");
+                       nw_select_loop(TAPI_TEST_NW_ID);
+                       TAPI_TEST_DEBUG("NW sub-module testing done.. \n");
+                       break;
+#if 0
+               case TAPI_TEST_SAT_ID:
+                       TAPI_TEST_DEBUG("Loading SAT Module Test Routines...\n");
+                       sat_select_loop();
+                       TAPI_TEST_DEBUG("SAT sub-module testing done.. \n");
+                       break;
+#endif
+               case TAPI_TEST_DATA_ID:
+                       TAPI_TEST_DEBUG("Loading Data Module Test Routines...\n");
+                       data_select_loop();
+                       TAPI_TEST_DEBUG("Data sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_MISC_ID:
+                       TAPI_TEST_DEBUG("Loading MISC Module Test Routines...\n");
+                       misc_select_loop(TAPI_TEST_MISC_ID);
+                       TAPI_TEST_DEBUG("MISC sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_SVC_ID:
+                       TAPI_TEST_DEBUG("Loading SVC Module Test Routines...\n");
+                       svc_select_loop();
+                       TAPI_TEST_DEBUG("SVC sub-module testing done.. \n");
+                       break;
+
+               case TAPI_TEST_GPS_ID:
+                       TAPI_TEST_DEBUG("Loading GPS Module Test Routines...\n");
+                       gps_select_loop();
+                       TAPI_TEST_DEBUG("GPS sub-module testing done.. ");
+                       break;
+
+               case TAPI_TEST_SOUND_ID:
+                       TAPI_TEST_DEBUG("Loading Sound Module Test Routines...\n");
+                       sound_select_loop();
+                       TAPI_TEST_DEBUG("Sound sub-module testing done.. ");
+                       break;
+
+               case TAPI_TEST_CDMA_DATA_ID:
+                       TAPI_TEST_DEBUG("Loading CDMA Data Module Test Routines...\n");
+                       cdma_data_select_loop();
+                       TAPI_TEST_DEBUG("CDMA Data sub-module testing done.. ");
+                       break;
+
+               case TAPI_TEST_CFG_ID:
+                       TAPI_TEST_DEBUG("Loading CFG Module Test Routines...\n");
+                       TAPI_TEST_DEBUG("CFG sub-module testing done.. ");
+                       break;
+
+               case TAPI_TEST_QUIT_ID:
+                       TAPI_TEST_DEBUG("Quit option selected. Aborting the application execution");
+                       tel_deinit();
+                       exit(0);
+                       break;
+
+               default:
+                       TAPI_TEST_DEBUG("Oops!Invalid Sub Module Id Pressed. Try Again");
+                       ret = -1;
+                       break;
+
+       }
+
+
+       return ret;
+
+}
+
+
+//2 Display the Main Menu Options for the user
+
+
+void tapi_test_app_process_keyboard(void)
+{
+       int     choice = 0;
+       char buf[255];
+
+       while (1)
+       {
+               sleep(1);
+
+               choice = 0;
+
+               printf("\n\nMain Menu: \n\n");
+
+               printf("Avaliable Sub-Modules for API testing...\n");
+
+               printf("\n\n *********************************************************\n\n");
+
+               printf(" 1:\tCommon\n 2:\tPower & Display\n 3:\tCall\n 4:\tSIM\n 5:\tSS\n 6:\tSMS\n 7:\tNW\n 8:\tSAT\n 9:\tGPRS\n 10:\tMISC\n 11:\tSVC\n 12:\tGPS & NPS\n 13:\tSOUND\n 14:\tCDMA-DATA\n 15:\tCFG\n\n");
+
+               printf("\n **********************************************************\n\n");
+
+               printf("Enter the selected sub-module <ID> shown above or <0> to Quit \n");
+
+               memset(buf, 0, 255);
+               fgets(buf, 255, stdin);
+               choice = atoi(buf);
+
+               printf("You have selected %d\n", choice);
+
+               tapi_test_app_process_choice(choice);
+
+       }
+
+}
+
+
+
+
+
+//2  This function calls the subroutines of the sub modules which will subscribe for the
+//2 Notifications. Note that GMain Loop should not be created in the called sub-routines.
+
+
+
+/*     Initialize Notification Manager, Subscribe for Events and then Wait in GMain Loop       */
+void tapi_test_app_noti_thread(void)
+{
+       if(tel_init() == TAPI_API_SUCCESS)
+       {
+               TAPI_TEST_DEBUG("tel_init() succeeded");
+       }
+       else
+       {
+               TAPI_TEST_DEBUG("tel_init() failed");
+       }
+
+       power_test_subscribe_tapi_events ();
+
+       /*      Subscribe for Call, Common, Power & Display Events      */
+       call_test_subscribe_tapi_events();
+
+       nw_test_subscribe_tapi_events();
+
+       gps_test_subscribe_tapi_events();
+
+       misc_test_subscribe_tapi_events();
+
+       data_test_subscribe_tapi_events();
+
+       //sat_test_subscribe_tapi_events();
+
+       sim_test_subscribe_tapi_events();
+
+       svc_test_subscribe_tapi_events();
+
+//     ss_test_subscribe_tapi_events();
+
+       sms_subscribe_tapi_events();
+
+       sound_test_subscribe_tapi_events ();
+
+       tel_register_app_name("org.tizen.tel_test");
+
+       cdma_data_test_subscribe_tapi_events();
+
+       /*      Enter to GMain Loop     */
+       tapi_test_app_noti_loop();
+
+       tel_deinit();
+       fprintf(stderr,"tel_deinit success\n");
+
+}
+
+
+
+/*     Entry point for the Integrated Test Application...      */
+int main(void)
+{
+       pthread_t               p_thread;
+       int                     noti_thread_id;
+
+       /*      Step 1: Version Information */
+       TAPI_TEST_DEBUG("******* Integrated TAPI Test Application: Version 0.4  *****");
+       TAPI_TEST_DEBUG("******* Buid On: %s  %s  ********", __DATE__, __TIME__);
+
+       /*      Step 2: Create a thread for Notifications       */
+       noti_thread_id = pthread_create(&p_thread, NULL,(void *)& tapi_test_app_noti_thread, NULL);
+
+       if(noti_thread_id != 0)
+       {
+               TAPI_TEST_DEBUG( "Failed to create Noti Thread");
+               return -1;
+       }
+       else
+       {
+               TAPI_TEST_DEBUG( "Successfully Created Noti Thread");
+       }
+
+       /*      Step 3: Create and Process Loop for Key Events  */
+       tapi_test_app_process_keyboard();
+
+
+       /*      Main Thread shall wait for the worker (Noti) Thread     */
+       pthread_join(noti_thread_id, NULL);
+
+       return 0;
+
+}
+/*     EOF             */
+
diff --git a/src/test_apps/tapi_test_utility.h b/src/test_apps/tapi_test_utility.h
new file mode 100644 (file)
index 0000000..2dc9765
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * libslp-tapi
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Kyeongchul Kim <kyeongchul.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 _TAPI_TEST_UTILITY_H_
+#define _TAPI_TEST_UTILITY_H_
+
+
+#define AUTO_LOG(frmt, args...) { \
+       {do { fprintf(log_fd, "\n%s: " frmt "\n", __TIME__, ##args); } while (FALSE) ;} \
+       fflush(log_fd); }
+
+#define TAPI_TEST_DEBUG(frmt, args...) \
+       {do { fprintf(stderr, "[TAPI Test][%s:%04d] "frmt "\n", __func__, __LINE__, ##args); } while (FALSE) ;}
+
+#endif
diff --git a/tapi.pc.in b/tapi.pc.in
new file mode 100644 (file)
index 0000000..3a7c9b5
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Telephony Server
+Description: Telephony Framework
+Requires: dbus-1 glib-2.0 vconf dbus-glib-1
+Version: 1.80
+Libs: -L${libdir} -lSLP-tapi
+Cflags: -I${includedir}/telephony/tapi -I${includedir}/telephony/common
+