VoIPSetting.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:180k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2005
- *
- * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
- * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
- * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
- * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
- * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
- * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
- * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
- * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
- * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
- * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
- *
- * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
- * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
- * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
- * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
- * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
- *
- * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
- * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
- * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
- * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
- * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * VoIPSetting.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * Coding Template header file
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- #include "MMI_features.h"
- #ifdef __MMI_VOIP__
- #include "stdC.h"
- #include "L4Dr1.h"
- #include "DebugInitDef.h"
- #include "mmi_trc.h" /* debug info */
- #include "GlobalMenuItems.h"
- #include "GlobalScrEnum.h"
- #include "CustMenuRes.h"
- #include "CustDataRes.h"
- #include "ProtocolEvents.h"
- #include "CommonScreens.h"
- #include "SettingProfile.h"
- #include "EventsGprot.h"
- #include "wgui_categories_popup.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_categories_util.h"
- #include "NVRAMEnum.h"
- #include "NVRAMProt.h"
- #include "NVRAMType.h"
- #include "custom_nvram_editor_data_item.h"
- #include "custom_data_account.h"
- #include "CallManagementGprot.h"
- #include "DataAccountGProt.h"
- #ifdef __MMI_TOUCH_SCREEN__
- #include "gui_virtual_keyboard.h"
- #include "EditorPen.h"
- #endif
- #include "VoIPDef.h"
- #include "VoIPGProt.h"
- #include "VoIPProt.h"
- extern BOOL voip_custom_get_p2p_call_state(void);
- #ifdef __MMI_TOUCH_SCREEN__
- gui_virtual_keyboard_pen_enum g_voip_disable_new_line[] = {GUI_VKBD_PEN_NEWLINE, GUI_VKBD_PEN_NONE};
- #endif
- const voip_codec_enum g_voip_codec_table[] =
- {
- VOIP_CODEC_AMR,
- VOIP_CODEC_G729,
- VOIP_CODEC_G7231,
- VOIP_CODEC_G726_16,
- VOIP_CODEC_G726_24,
- VOIP_CODEC_G726_32,
- VOIP_CODEC_G726_40,
- VOIP_CODEC_PCMA,
- VOIP_CODEC_PCMU,
- VOIP_CODEC_CN
- };
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_main_menu
- * DESCRIPTION
- * Highlight handler of ServicesVoIP
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_main_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_pre_entry_main_menu, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_main_menu, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_status
- * DESCRIPTION
- * Highlight handler of VoIPLogin(Logout)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_status, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_summary
- * DESCRIPTION
- * Highlight handler of VoIPCurrent Status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_summary(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_summary, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_setting
- * DESCRIPTION
- * Highlight handler of VoIPProfile Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_setting, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_prof_setting, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_setting_option_activate
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XActive
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_setting_option_activate(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_activate, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_setting_option_edit
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEdit
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_setting_option_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_edit, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_prof_edit, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_edit_common
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEditCommon Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_edit_common(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currScr = SCR_ID_VOIP_PROF_COMMON;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_edit_account
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEditAccount Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_edit_account(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currScr = SCR_ID_VOIP_PROF_ACCOUNT;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_edit_inlineitems, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_edit_outbound
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEditOutbound Server
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_edit_outbound(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currScr = SCR_ID_VOIP_PROF_OUTBOUND;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_edit_inlineitems, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_edit_register
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEditRegister Server
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_edit_register(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currScr = SCR_ID_VOIP_PROF_REGISTER;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_edit_inlineitems, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_edit_nat
- * DESCRIPTION
- * Highlight handler of VoIPProfile SettingProfile XEditNAT Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_edit_nat(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currScr = SCR_ID_VOIP_PROF_NAT;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_edit_inlineitems, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_pre_entry_prof_edit_inlineitems, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_full_screen_editor
- * DESCRIPTION
- * Highlight handler of full screen editor
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_full_screen_editor(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OPTIONS, IMG_GLOBAL_OPTIONS);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_full_screen_editor_option, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- #ifdef __MMI_TOUCH_SCREEN__
- mmi_pen_editor_set_vk_keys(MMI_FALSE, NULL, g_voip_disable_new_line);
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_done
- * DESCRIPTION
- * Highlight handler of full screen editorOptionDone
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_done(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(ConfirmInlineFullScreenEdit, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_input_method_in_menu
- * DESCRIPTION
- * Highlight handler of full screen editorOptionInput Method
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_input_method_in_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(EntryInputMethodScreen, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- RegisterInputMethodScreenCloseFunction(mmi_voip_go_back_2_history);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_call_setting
- * DESCRIPTION
- * Highlight handler of VoIPCall Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_call_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_call_setting, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_call_setting, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_auto_answer
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingAuto Answer
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_auto_answer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_AUTO_ANSWER;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_auto_reject
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingAuto Reject
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_auto_reject(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_AUTO_REJECT;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_auto_redial
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingAuto Redial
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_auto_redial(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_AUTO_REDIAL;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_hide_caller_id
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingHide Caller ID
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_hide_caller_id(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_HIDE_CALLER_ID;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_dtmf_in_menu
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingDTMF
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_dtmf_in_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_DTMF;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_comfort_noise
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingComfort Noise
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_comfort_noise(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_COMFORT_NOISE;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_setting_general, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_setting_general, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_set_codec_order
- * DESCRIPTION
- * Highlight handler of VoIPCall SettingSet Codec Order
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_set_codec_order(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->call_setting_info.currScr = SCR_ID_VOIP_SETTING_SET_CODEC_ORDER;
- g_voip_cntx_p->call_setting_info.currIndex = 0;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_set_codec_order, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_set_codec_order, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_auto_answer
- * DESCRIPTION
- * Hint handler of VoIPCall SettingAuto Answer
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_auto_answer(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.autoAnswer == 0)
- {
- pfnUnicodeStrcpy((S8*)hintData[index], (S8*)GetString(STR_GLOBAL_OFF));
- }
- else if (g_voip_cntx_p->call_setting_info.saved_setting.autoAnswer == 1)
- {
- pfnUnicodeStrcpy((S8*)hintData[index], (S8*)GetString(STR_ID_VOIP_SETTING_ANYKEY));
- }
- else
- {
- pfnUnicodeStrcpy((S8*)hintData[index], (S8*)GetString(STR_ID_VOIP_SETTING_AUTO));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_auto_reject
- * DESCRIPTION
- * Hint handler of VoIPCall SettingAuto Reject
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_auto_reject(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.autoReject == 0)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_OFF));
- }
- else if (g_voip_cntx_p->call_setting_info.saved_setting.autoReject == 1)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_ID_VOIP_SETTING_REJECT_UNKNOWN));
- }
- else
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_ID_VOIP_SETTING_REJECT_ALL));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_auto_redial
- * DESCRIPTION
- * Hint handler of VoIPCall SettingAuto Redial
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_auto_redial(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.autoRedial == 0)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_OFF));
- }
- else
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_ON));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_hide_caller_id
- * DESCRIPTION
- * Hint handler of VoIPCall SettingHide Caller ID
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_hide_caller_id(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.hidecallerId == 0)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_OFF));
- }
- else
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_ON));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_dtmf_in_menu
- * DESCRIPTION
- * Hint handler of VoIPCall SettingDTMF
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_dtmf_in_menu(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.dtmf == VOIP_DTMF_IN_BAND)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_ID_VOIP_SETTING_INBAND));
- }
- else if (g_voip_cntx_p->call_setting_info.saved_setting.dtmf == VOIP_DTMF_OUT_OF_BAND)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_ID_VOIP_SETTING_OUTBAND));
- }
- else
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_OFF));
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_hint_comfort_noise
- * DESCRIPTION
- * Hint handler of VoIPCall SettingComfort Noise
- * PARAMETERS
- * index [IN] Current selected index
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_hint_comfort_noise(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(hintData[index], 0, MAX_SUB_MENU_SIZE);
- if (g_voip_cntx_p->call_setting_info.saved_setting.comfortNoise == 0)
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_ON));
- }
- else
- {
- pfnUnicodeStrcpy((S8*) hintData[index], (S8*) GetString(STR_GLOBAL_OFF));
- }
- }
- #ifdef SIP_CONFORMANCE_TEST
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_option_query
- * DESCRIPTION
- * Highlight handler of VoIPOption Query
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_option_query(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(g_voip_cntx_p->call_misc_info.dispUri, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- memset(g_voip_cntx_p->call_misc_info.inputUri, 0, VOIP_URI_LEN);
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
- SetLeftSoftkeyFunction(mmi_voip_entry_option_query, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- #endif /* SIP_CONFORMANCE_TEST */
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_pre_entry_main_menu
- * DESCRIPTION
- * Determine to go to VoIP main menu or not based on current state.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_pre_entry_main_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- switch (g_voip_cntx_p->reg_state_info)
- {
- case MMI_VOIP_DEREG_STATE:
- case MMI_VOIP_REG_STATE:
- mmi_voip_entry_main_menu();
- break;
- case MMI_VOIP_PROCESS_STATE:
- mmi_voip_set_processing_parameter(
- STR_ID_VOIP_MAIN,
- STR_ID_VOIP_PROCESSING,
- IMG_GLOBAL_PROGRESS,
- 0,
- 0,
- STR_GLOBAL_BACK,
- GoBackHistory,
- 0,
- 0);
- mmi_voip_entry_processing_screen();
- break;
- default:
- MMI_ASSERT(0); /* unexpectedly go to MMI_VOIP_REG_STATE_TOTAL */
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_main_menu
- * DESCRIPTION
- * Entry function of ServicesVoIP
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_main_menu(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- U16 numItems = 0, i = 0;
- U16 nStrItemList[MAX_SUB_MENUS]; /* Login(Logout), Profile Setting, Call Setting, New Call */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_VOIP_PROCESSING))
- {
- HistoryReplace(SCR_ID_VOIP_PROCESSING, SCR_ID_VOIP_MAIN, mmi_voip_entry_main_menu);
- return;
- }
- EntryNewScreen(SCR_ID_VOIP_MAIN, NULL, mmi_voip_entry_main_menu, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_MAIN);
- SetParentHandler(MENU_ID_VOIP_MAIN);
- if (g_voip_cntx_p->reg_state_info == MMI_VOIP_REG_STATE)
- {
- mmi_frm_hide_menu_item(MENU_ID_VOIP_PROF_SETTING); /* hide profile setting menu if VoIP is login */
- }
- else
- {
- mmi_frm_unhide_menu_item(MENU_ID_VOIP_PROF_SETTING);
- }
- numItems = GetNumOfChild_Ext(MENU_ID_VOIP_MAIN);
- GetSequenceStringIds_Ext(MENU_ID_VOIP_MAIN, nStrItemList);
- if (g_voip_cntx_p->reg_state_info == MMI_VOIP_REG_STATE)
- {
- for (i = 0; i < MAX_SUB_MENUS; i++)
- {
- if (nStrItemList[i] == STR_ID_VOIP_LOGIN)
- {
- nStrItemList[i] = STR_ID_VOIP_LOGOUT; /* change login string to logout if VoIP is login */
- }
- }
- }
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_ID_VOIP_MAIN,
- GetRootTitleIcon(MENU_ID_VOIP_MAIN),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- numItems,
- nStrItemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_status
- * DESCRIPTION
- * Entry function of VoIPLogin(Logout)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_voip_cntx_p->prof_setting_info.actprofIndex == -1)
- {
- DisplayPopup(
- (U8*)GetString(STR_ID_VOIP_NO_ACTIVATED_PROFILE),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- ERROR_TONE);
- DeleteScreenIfPresent(SCR_ID_VOIP_CALL_EDITOR_OPTION); /* go back to call editor screen */
- return;
- }
- switch (g_voip_cntx_p->reg_state_info)
- {
- case MMI_VOIP_DEREG_STATE:
- mmi_voip_set_processing_parameter(
- STR_ID_VOIP_LOGIN,
- STR_ID_VOIP_CONNECT_TO_SERVER,
- IMG_GLOBAL_PROGRESS,
- 0,
- 0,
- STR_GLOBAL_ABORT,
- mmi_voip_entry_abort_login,
- 0,
- mmi_voip_entry_abort_login_endkey);
- mmi_voip_entry_processing_screen();
- mmi_voip_register_req();
- break;
- case MMI_VOIP_REG_STATE:
- mmi_voip_set_processing_parameter(
- STR_ID_VOIP_LOGOUT,
- STR_ID_VOIP_DISCONNECT_FROM_SERVER,
- IMG_GLOBAL_PROGRESS,
- 0,
- 0,
- STR_GLOBAL_BACK,
- mmi_voip_go_back_2_history,
- 0,
- 0);
- mmi_voip_entry_processing_screen();
- mmi_voip_deregister_req();
- break;
- case MMI_VOIP_PROCESS_STATE:
- default:
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_abort_login
- * DESCRIPTION
- * Entry function to abort login by RSK.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_abort_login(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_voip_set_processing_parameter(
- STR_GLOBAL_ABORT,
- STR_GLOBAL_ABORTING,
- IMG_GLOBAL_PROGRESS,
- 0,
- 0,
- STR_GLOBAL_BACK,
- mmi_voip_go_back_2_history,
- 0,
- 0);
- mmi_voip_entry_processing_screen();
- DeleteScreenIfPresent(SCR_ID_VOIP_PROCESSING);
- mmi_voip_deregister_req();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_abort_login_endkey
- * DESCRIPTION
- * Entry function to abort login by END key.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_abort_login_endkey(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DisplayIdleScreen();
- mmi_voip_deregister_req();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_summary
- * DESCRIPTION
- * Entry function of VoIPCurrent Status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_summary(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VOIP_SUMMARY, NULL, NULL, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_SUMMARY);
- memset(subMenuData, 0, (MAX_SUB_MENUS * MAX_SUB_MENU_SIZE));
- mmi_voip_get_summary_string((U8*)subMenuData);
- ShowCategory74Screen(
- STR_ID_VOIP_SUMMARY,
- GetRootTitleIcon(MENU_ID_VOIP_MAIN),
- 0,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (U8*)subMenuData,
- MAX_SUB_MENUS * MAX_SUB_MENU_SIZE,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_prof_setting
- * DESCRIPTION
- * Entry function of VoIPProfile Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- S32 i = 0;
- U8 *profileNames[MMI_VOIP_MAX_PROFILE_NUM];
- U16 iconList1[MMI_VOIP_MAX_PROFILE_NUM], iconList2[MMI_VOIP_MAX_PROFILE_NUM];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VOIP_PROF_SETTING, NULL, mmi_voip_entry_prof_setting, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_PROF_SETTING);
- for (i = 0; i < MMI_VOIP_MAX_PROFILE_NUM; i++)
- {
- profileNames[i] = (U8*)g_voip_cntx_p->prof_setting_info.saved_prof[i].comm_info.profName;
- if (!pfnUnicodeStrlen((S8*)profileNames[i]))
- {
- profileNames[i] = (U8*)GetString(STR_ID_VOIP_PROF_COMMON_PROF1 + i);
- }
- iconList1[i] = 0; /* initialize profile activation icon */
- if (i == g_voip_cntx_p->prof_setting_info.actprofIndex)
- {
- iconList1[i] = IMG_VICON;
- }
- iconList2[i] = IMG_GLOBAL_L1 + i;
- }
- RegisterHighlightHandler(mmi_voip_highlight_prof_setting_item);
- ShowCategory73Screen(
- STR_ID_VOIP_PROF_SETTING,
- GetRootTitleIcon(MENU_ID_VOIP_MAIN),
- STR_GLOBAL_OPTIONS,
- IMG_GLOBAL_OPTIONS,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- MMI_VOIP_MAX_PROFILE_NUM,
- profileNames,
- iconList1,
- iconList2,
- 0,
- guiBuffer,
- ICON_ICON_TEXT);
- SetLeftSoftkeyFunction(mmi_voip_entry_prof_setting_option, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_voip_entry_prof_setting_option, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_highlight_prof_setting_item
- * DESCRIPTION
- * Highlight index of selecting a profile in VoIPProfile Setting
- * PARAMETERS
- * index [IN] Current highlight index.
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_highlight_prof_setting_item(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_voip_cntx_p->prof_setting_info.currprofIndex = index;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_prof_setting_option
- * DESCRIPTION
- * Entry function of VoIPProfile SettingOption
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_prof_setting_option(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- U16 numItems = 0;
- U16 nStrItemList[MAX_SUB_MENUS];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VOIP_PROF_SETTING_OPTION, NULL, mmi_voip_entry_prof_setting_option, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_PROF_SETTING_OPTION);
- SetParentHandler(MENU_ID_VOIP_PROF_SETTING_OPTION);
- numItems = GetNumOfChild(MENU_ID_VOIP_PROF_SETTING_OPTION);
- GetSequenceStringIds(MENU_ID_VOIP_PROF_SETTING_OPTION, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_OPTIONS,
- GetRootTitleIcon(MENU_ID_VOIP_MAIN),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- numItems,
- nStrItemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_prof_activate
- * DESCRIPTION
- * Entry function of VoIPProfile SettingProfile XActivate
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_prof_activate(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 profIndex = g_voip_cntx_p->prof_setting_info.currprofIndex;
- U16 errorstrId = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- errorstrId = mmi_voip_prof_validate_activation(profIndex);
- if (errorstrId != 0)
- {
- DisplayPopup(
- (U8*)GetString(errorstrId),
- IMG_GLOBAL_UNFINISHED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- ERROR_TONE);
- return;
- }
- g_voip_cntx_p->prof_setting_info.actprofIndex = profIndex;
- mmi_voip_save_profile_active_index();
- DisplayPopup(
- (U8*)GetString(STR_GLOBAL_ACTIVATE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- UI_POPUP_NOTIFYDURATION_TIME,
- SUCCESS_TONE);
- DeleteScreenIfPresent(SCR_ID_VOIP_PROF_EDIT_INLINEITEMS);
- DeleteScreenIfPresent(SCR_ID_VOIP_PROF_EDIT);
- DeleteScreenIfPresent(SCR_ID_VOIP_PROF_SETTING_OPTION);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_prof_edit
- * DESCRIPTION
- * Entry function of VoIPProfile SettingProfile XEdit
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_prof_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- U16 numItems = 0;
- U16 nStrItemList[MAX_SUB_MENUS];
- /* Common Setting, Account Setting, Outbound Server, Register Server, NAT Setting */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VOIP_PROF_EDIT, NULL, mmi_voip_entry_prof_edit, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_PROF_EDIT);
- SetParentHandler(MENU_ID_VOIP_PROF_SETTING_OPTION_EDIT);
- numItems = GetNumOfChild(MENU_ID_VOIP_PROF_SETTING_OPTION_EDIT);
- GetSequenceStringIds(MENU_ID_VOIP_PROF_SETTING_OPTION_EDIT, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_EDIT,
- GetRootTitleIcon(MENU_ID_VOIP_PROF_SETTING),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- numItems,
- nStrItemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_pre_entry_prof_edit_inlineitems
- * DESCRIPTION
- * Pre-entry function of VoIPProfile SettingProfile XEditInline Editor
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_pre_entry_prof_edit_inlineitems(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DataAccountReadyCheck(mmi_voip_entry_prof_edit_inlineitems);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_entry_prof_edit_inlineitems
- * DESCRIPTION
- * Entry function of VoIPProfile SettingProfile XEditInline Editor
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_entry_prof_edit_inlineitems(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 currScreen = g_voip_cntx_p->prof_setting_info.currScr;
- S32 profIndex = g_voip_cntx_p->prof_setting_info.currprofIndex;
- U8 *guiBuffer = NULL, *inputBuffer = NULL;
- U16 inputBufferSize = 0, titleId = 0, imgId = 0, numItems = 0;
- S32 i = 0;
- U16 iconList[MAX_SUB_MENUS];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_VOIP_PROF_EDIT_INLINEITEMS, mmi_voip_exit_prof_edit_inlineitems, NULL, NULL);
- InitializeCategory57Screen();
- guiBuffer = GetCurrGuiBuffer(SCR_ID_VOIP_PROF_EDIT_INLINEITEMS);
- inputBuffer = GetCurrNInputBuffer(SCR_ID_VOIP_PROF_EDIT_INLINEITEMS, &inputBufferSize);
- switch (currScreen)
- {
- case SCR_ID_VOIP_PROF_COMMON:
- if (inputBuffer == NULL)
- {
- mmi_voip_update_prof_common_cache_to_disp(profIndex);
- }
- titleId = STR_ID_VOIP_PROF_EDIT_COMMON;
- imgId = IMG_ID_VOIP_PROF_COMMON_PROF_NAME;
- numItems = mmi_voip_setup_prof_common_inlineitems();
- break;
- case SCR_ID_VOIP_PROF_ACCOUNT:
- if (inputBuffer == NULL)
- {
- mmi_voip_update_prof_acct_cache_to_disp(profIndex);
- }
- titleId = STR_ID_VOIP_PROF_EDIT_ACCOUNT;
- imgId = IMG_ID_VOIP_PROF_ACCOUNT_SIP_SERVER;
- numItems = mmi_voip_setup_prof_acct_inlineitems();
- break;
- case SCR_ID_VOIP_PROF_OUTBOUND:
- if (inputBuffer == NULL)
- {
- mmi_voip_update_prof_outbound_cache_to_disp(profIndex);
- }
- titleId = STR_ID_VOIP_PROF_EDIT_OUTBOUND;
- imgId = IMG_ID_VOIP_PROF_OUTBOUND_STATUS;
- numItems = mmi_voip_setup_prof_outbound_inlineitems();
- break;
- case SCR_ID_VOIP_PROF_REGISTER:
- if (inputBuffer == NULL)
- {
- mmi_voip_update_prof_register_cache_to_disp(profIndex);
- }
- titleId = STR_ID_VOIP_PROF_EDIT_REGISTER;
- imgId = IMG_ID_VOIP_PROF_REGISTER_STATUS;
- numItems = mmi_voip_setup_prof_register_inlineitems();
- break;
- case SCR_ID_VOIP_PROF_NAT:
- if (inputBuffer == NULL)
- {
- mmi_voip_update_prof_nat_cache_to_disp(profIndex);
- }
- titleId = STR_ID_VOIP_PROF_EDIT_NAT;
- imgId = IMG_ID_VOIP_PROF_NAT_STATUS;
- numItems = mmi_voip_setup_prof_nat_inlineitems();
- break;
- default:
- MMI_ASSERT(0);
- }
- for (i = 0; i < numItems; i++)
- {
- if (i % 2)
- {
- iconList[i] = 0;
- }
- else
- {
- iconList[i] = imgId + (i / 2);
- }
- }
- if (inputBuffer != NULL)
- {
- SetCategory57Data(wgui_inline_items, numItems, inputBuffer);
- }
- ShowCategory57Screen(
- titleId,
- GetRootTitleIcon(MENU_ID_VOIP_PROF_SETTING),
- STR_GLOBAL_EDIT,
- 0,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- numItems,
- iconList,
- wgui_inline_items,
- 0,
- guiBuffer);
- SetCategory57RightSoftkeyFunctions(mmi_voip_entry_prof_confirm, GoBackHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_exit_prof_edit_inlineitems
- * DESCRIPTION
- * Exit function of VoIPProfile SettingProfile XEditInline Editor
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_exit_prof_edit_inlineitems(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history h;
- U16 inputBuffSize = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- CloseCategory57Screen();
- h.scrnID = SCR_ID_VOIP_PROF_EDIT_INLINEITEMS;
- h.entryFuncPtr = mmi_voip_entry_prof_edit_inlineitems;
- GetCategoryHistory(h.guiBuffer);
- GetCategory57Data(h.inputBuffer);
- inputBuffSize = (U16) GetCategory57DataSize();
- AddNHistory(h, inputBuffSize);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_common_cache_to_disp
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.saved_prof[index] to
- * g_voip_cntx_p->prof_setting_info.disp_prof for Common Setting.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_common_cache_to_disp(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Profile Name */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.profileName, 0, (MMI_VOIP_MAX_PROFILE_NAME_LEN * sizeof(U16)));
- pfnUnicodeStrncpy(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.profileName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.profName,
- MMI_VOIP_MAX_PROFILE_NAME_LEN);
- if (!pfnUnicodeStrlen((S8*)g_voip_cntx_p->prof_setting_info.disp_prof.profileName))
- {
- pfnUnicodeStrcpy(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.profileName,
- (S8*)GetString(STR_ID_VOIP_PROF_COMMON_PROF1 + profIndex));
- MMI_ASSERT(g_voip_cntx_p->prof_setting_info.disp_prof.profileName[MMI_VOIP_MAX_PROFILE_NAME_LEN - 1] == ' ');
- }
- /* Data Account */
- g_voip_cntx_p->prof_setting_info.disp_prof.dataacctIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.dataAcct;
- /* Auto Login */
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.autoLogin;
- /* Voice Mail Server */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.serverName, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.vmServer,
- VOIP_URI_LEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_acct_cache_to_disp
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.saved_prof[index] to
- * g_voip_cntx_p->prof_setting_info.disp_prof for Account Setting.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_acct_cache_to_disp(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* SIP Server */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.serverName, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.sipServer,
- VOIP_URI_LEN);
- /* SIP Port */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.portNumber, 0, (MMI_VOIP_MAX_PORT_LEN * ENCODING_LENGTH));
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.sipPort,
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.portNumber,
- 10);
- /* Display Name */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.displayName, 0, (VOIP_DISP_NAME_LEN * sizeof(U16)));
- pfnUnicodeStrncpy(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.displayName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.dispName,
- VOIP_DISP_NAME_LEN);
- /* Username */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.username, 0, (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.username,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.username,
- VOIP_USERNAME_LEN);
- /* Password */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.password, 0, (VOIP_PASSWORD_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.password,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.password,
- VOIP_PASSWORD_LEN);
- /* Authorization Name */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.authName, 0, (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.authName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.authName,
- VOIP_USERNAME_LEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_outbound_cache_to_disp
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.saved_prof[index] to
- * g_voip_cntx_p->prof_setting_info.disp_prof for Outbound Server.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_outbound_cache_to_disp(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status */
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.status;
- /* Outbound Server */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.serverName, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.server,
- VOIP_URI_LEN);
- /* Outbound Port */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.portNumber, 0, (MMI_VOIP_MAX_PORT_LEN * ENCODING_LENGTH));
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.port,
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.portNumber,
- 10);
- /* Username */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.username, 0, (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.username,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.username,
- VOIP_USERNAME_LEN);
- /* Password */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.password, 0, (VOIP_PASSWORD_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.password,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.password,
- VOIP_PASSWORD_LEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_register_cache_to_disp
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.saved_prof[index] to
- * g_voip_cntx_p->prof_setting_info.disp_prof for Register Server.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_register_cache_to_disp(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status */
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.status;
- /* Register Server */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.serverName, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.server,
- VOIP_URI_LEN);
- /* Register Port */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.portNumber, 0, (MMI_VOIP_MAX_PORT_LEN * ENCODING_LENGTH));
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.port,
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.portNumber,
- 10);
- /* Username */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.username, 0, (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.username,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.username,
- VOIP_USERNAME_LEN);
- /* Password */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.password, 0, (VOIP_PASSWORD_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.password,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.password,
- VOIP_PASSWORD_LEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_nat_cache_to_disp
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.saved_prof[index] to
- * g_voip_cntx_p->prof_setting_info.disp_prof for NAT Setting.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_nat_cache_to_disp(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status */
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natStatus;
- /* Firewall IP */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[0], 0, (MMI_VOIP_MAX_IP_SEG * ENCODING_LENGTH));
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[1], 0, (MMI_VOIP_MAX_IP_SEG * ENCODING_LENGTH));
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[2], 0, (MMI_VOIP_MAX_IP_SEG * ENCODING_LENGTH));
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[3], 0, (MMI_VOIP_MAX_IP_SEG * ENCODING_LENGTH));
- if (g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natFirewall[0] == 0)
- {
- pfnUnicodeStrcpy((S8*)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[0], (S8*)zeroIp);
- pfnUnicodeStrcpy((S8*)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[1], (S8*)zeroIp);
- pfnUnicodeStrcpy((S8*)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[2], (S8*)zeroIp);
- pfnUnicodeStrcpy((S8*)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[3], (S8*)zeroIp);
- }
- else
- {
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natFirewall[0],
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[0],
- 10);
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natFirewall[1],
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[1],
- 10);
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natFirewall[2],
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[2],
- 10);
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.natFirewall[3],
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.ipAddr[3],
- 10);
- }
- /* STUN Server */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.serverName, 0, (VOIP_URI_LEN * ENCODING_LENGTH));
- AnsiiNToUnicodeString(
- (S8*)g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (S8*)g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.stunServer,
- VOIP_URI_LEN);
- /* STUN Port */
- memset(g_voip_cntx_p->prof_setting_info.disp_prof.portNumber, 0, (MMI_VOIP_MAX_PORT_LEN * ENCODING_LENGTH));
- gui_itoa(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.stunPort,
- (UI_string_type)g_voip_cntx_p->prof_setting_info.disp_prof.portNumber,
- 10);
- /* Refresh Interval */
- g_voip_cntx_p->prof_setting_info.disp_prof.intervalIndex =
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].nat_info.refInterval;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_common_disp_to_cache
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.disp_prof to
- * g_voip_cntx_p->prof_setting_info.saved_prof[index] for Common Setting.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_common_disp_to_cache(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Profile Name */
- memset(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.profName,
- 0,
- (MMI_VOIP_MAX_PROFILE_NAME_LEN * sizeof(U16)));
- pfnUnicodeStrncpy(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.profName,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.profileName,
- MMI_VOIP_MAX_PROFILE_NAME_LEN);
- /* Data Account */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.dataAcct =
- g_voip_cntx_p->prof_setting_info.disp_prof.dataacctIndex;
- /* Auto Login */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.autoLogin =
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex;
- /* Voice Mail Server */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.vmServer, 0, VOIP_URI_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].comm_info.vmServer,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (VOIP_URI_LEN * ENCODING_LENGTH));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_acct_disp_to_cache
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.disp_prof to
- * g_voip_cntx_p->prof_setting_info.saved_prof[index] for Account Setting.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_acct_disp_to_cache(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* SIP Server */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.sipServer, 0, VOIP_URI_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.sipServer,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (VOIP_URI_LEN * ENCODING_LENGTH));
- /* SIP Port */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.sipPort = gui_atoi((UI_string_type) g_voip_cntx_p->prof_setting_info.disp_prof.portNumber);
- /* Display Name */
- memset(
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.dispName,
- 0,
- (VOIP_DISP_NAME_LEN * sizeof(U16)));
- pfnUnicodeStrncpy(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.dispName,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.displayName,
- VOIP_DISP_NAME_LEN);
- /* Username */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.username, 0, VOIP_USERNAME_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.username,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.username,
- (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- /* Password */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.password, 0, VOIP_PASSWORD_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.password,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.password,
- (VOIP_PASSWORD_LEN * ENCODING_LENGTH));
- /* Authorization Name */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.authName, 0, VOIP_USERNAME_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].acct_info.authName,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.authName,
- (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_outbound_disp_to_cache
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.disp_prof to
- * g_voip_cntx_p->prof_setting_info.saved_prof[index] for Outbound Server.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_outbound_disp_to_cache(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.status =
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex;
- /* Outbound Server */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.server, 0, VOIP_URI_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.server,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.serverName,
- (VOIP_URI_LEN * ENCODING_LENGTH));
- /* Outbound Port */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.port = gui_atoi((UI_string_type) g_voip_cntx_p->prof_setting_info.disp_prof.portNumber);
- /* Username */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.username, 0, VOIP_USERNAME_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.username,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.username,
- (VOIP_USERNAME_LEN * ENCODING_LENGTH));
- /* Password */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.password, 0, VOIP_PASSWORD_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].out_server_info.password,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.password,
- (VOIP_PASSWORD_LEN * ENCODING_LENGTH));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_voip_update_prof_register_disp_to_cache
- * DESCRIPTION
- * Copy g_voip_cntx_p->prof_setting_info.disp_prof to
- * g_voip_cntx_p->prof_setting_info.saved_prof[index] for Register Server.
- * PARAMETERS
- * profIndex [IN] Index of intended to update profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_voip_update_prof_register_disp_to_cache(S32 profIndex)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Status */
- g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.status =
- g_voip_cntx_p->prof_setting_info.disp_prof.selectionIndex;
- /* Register Server */
- memset(g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.server, 0, VOIP_URI_LEN);
- UnicodeNToAnsii(
- (S8*) g_voip_cntx_p->prof_setting_info.saved_prof[profIndex].reg_server_info.server,
- (S8*) g_voip_cntx_p->prof_setting_info.disp_prof.serverName,