mmi_imps_ui.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:497k
源码类别:
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:
- * ---------
- * mmi_imps_ui.c
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file implements all UI related functions for IMPS application.
- *
- * 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!!
- *============================================================================
- ****************************************************************************/
- #ifndef _MMI_IMPS_UI_C
- #define _MMI_IMPS_UI_C
- #include "MMI_features.h"
- #ifdef __MMI_IMPS__
- /* Include: MMI header file */
- #include "PixtelDataTypes.h"
- #include "stdC.h"
- #include "Stdlib.h"
- #include "L4Dr1.h"
- #include "L4Dr.h"
- #include "QueueGprot.h"
- #include "ProtocolEvents.h"
- #include "GlobalDefs.h"
- #include "CommonScreens.h"
- #include "DebugInitDef.h"
- #include "GlobalConstants.h"
- #include "GlobalScrEnum.h"
- #include "FrameworkStruct.h"
- #include "EventsGprot.h"
- #include "HistoryGprot.h"
- #include "wgui_categories.h"
- #include "wgui_categories_inputs.h"
- #include "wgui_inline_edit.h"
- #include "wgui_categories_popup.h"
- #include "wgui_categories_multimedia.h"
- #include "Wgui_tab_bars.h"
- #include "Wgui_asyncdynamic_menuitems.h"
- #include "wgui_categories_imps.h"
- #include "mmi_imps_enum.h"
- #include "mmi_imps_prot.h"
- #include "PhoneBookGprot.h"
- #include "AlarmFrameworkProt.h"
- #include "nvram_user_defs.h"
- #include "NVRAMProt.h"
- #include "FileManagerGProt.h"
- #include "Gdi_include.h"
- #include "Fmt_struct.h"
- #include "Gui_tab_bars.h"
- #include "PhoneBookGprot.h"
- #include "PhoneSetupGprots.h"
- #include "Conversions.h"
- /* Include: PS header file */
- /* ... Add More PS header */
- /*****************************************************************************
- * Define
- *****************************************************************************/
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- const S8 g_imps_zero_ip[] = { '0', ' ', '0', ' ', '0', ' ', ' ', ' ' }; /* 000 */
- const S8 g_imps_left_bracket[] = { '<', ' ', ' ', ' ' }; /* { */
- const S8 g_imps_right_bracket[] = { '<', ' ', ' ', ' ' }; /* } */
- const S8 g_imps_wv[] = { 'w', ' ', 'v', ' ', ':', ' ', ' ', ' ' }; /* wv: */
- const S8 g_imps_proxy_port[] = { '8', ' ', '0', ' ', '8', ' ', '0', ' ', ' ', ' ' }; /* 8080 */
- const S8 g_imps_server_prefix[] = { 'h', ' ', 't', ' ', 't', ' ', 'p', ' ', ':', ' ', '/', ' ', '/', ' ', ' ', ' ' }; /* http:// */
- /* string of mood */
- const S8 *const g_imps_mood_str[IMPS_NUM_MOOD] =
- {
- (S8 *) L":)",
- (S8 *) L":(",
- (S8 *) L":@",
- (S8 *) L"^ol",
- (S8 *) L":$",
- (S8 *) L";)",
- (S8 *) L"(L)",
- (S8 *) L"|-)",
- (S8 *) L"+o(",
- (S8 *) L":|",
- (S8 *) L":s"
- };
- /* mapping table of mood and icons */
- static wgui_multiline_icon_struct g_imps_mood_icon_list[IMPS_NUM_MOOD] =
- {
- {NULL, 0, 0, ":)"},
- {NULL, 0, 0, ":("},
- {NULL, 0, 0, ":@"},
- {NULL, 0, 0, "^ol"},
- {NULL, 0, 0, ":$"},
- {NULL, 0, 0, ";)"},
- {NULL, 0, 0, "(L)"},
- {NULL, 0, 0, "|-)"},
- {NULL, 0, 0, "+o("},
- {NULL, 0, 0, ":|"},
- {NULL, 0, 0, ":s"}
- };
- #define IMPS_NUM_INVITE 3
- /* give some string at will to replaced by a specific icon */
- static wgui_multiline_icon_struct g_imps_invite_icon_list[IMPS_NUM_INVITE] =
- {
- {NULL, 0, 0, "#$#"}, /* owner */
- {NULL, 0, 0, "$#$"}, /* group */
- {NULL, 0, 0, "##$"} /* note */
- };
- /* indexing icons for inline editor */
- const U16 g_imps_inline_icons[14] =
- {
- IMG_GLOBAL_L1, 0,
- IMG_GLOBAL_L2, 0,
- IMG_GLOBAL_L3, 0,
- IMG_GLOBAL_L4, 0,
- IMG_GLOBAL_L5, 0,
- IMG_GLOBAL_L6, 0,
- IMG_GLOBAL_L7, 0
- };
- /* prefix of UCS2 file */
- const U8 g_imps_ucs2_file_prefix[2] = {0xFF, 0xFE};
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- extern wgui_inline_item wgui_inline_items[];
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- extern void set_leading_zero(U8);
- #ifdef IMPS_TEST_CODE
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_login_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_login_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- imps_p->gen_info.is_login = TRUE;
- imps_p->gen_info.no_tab = 1;
- mmi_imps_pre_entry_cont();
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- DeleteScreenIfPresent(SCR_ID_IMPS_MAIN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_cont_key_hdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_cont_key_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- imps_entity_struct entity;
- mmi_imps_room_struct *room = &imps_p->room_info.room_list[0];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- AnsiiToUnicodeString((S8*) entity.sname, (S8*) "Joooo");
- mmi_imps_chat_recv_msg((U16*) L"I am Max!!!", 0, &entity);
- Category425BlinkTab(1);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_search_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_search_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_entry_search_result();
- DeleteUptoScrID(SCR_ID_IMPS_CONT_OPT);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_get_watch_list_complete
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_get_watch_list_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_pre_entry_watch_list(NULL);
- mmi_imps_entry_watch_list();
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_invite_success
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_invite_success(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_invite_start(0, 1);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_invite_failed
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_invite_failed(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_invite_start(-1, 1);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_chat_key_hdlr
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_chat_key_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- imps_entity_struct entity;
- mmi_imps_room_struct *room = &imps_p->room_info.room_list[imps_p->chat_info.curr_room];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- AnsiiToUnicodeString((S8*) entity.sname, (S8*) "Joooo");
- mmi_imps_chat_recv_msg((U16*) L"I am Max!!!", imps_p->chat_info.curr_room, &entity);
- UpdateCategory435LogText((U8*) room->chat_buff, pfnUnicodeStrlen((S8*) room->chat_buff));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_test_server_disconn
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_test_server_disconn(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 scr_id = GetActiveScreenId();
- BOOL cont_scr = IsScreenPresent(SCR_ID_IMPS_CONT);
- BOOL chat_scr = IsScreenPresent(SCR_ID_IMPS_CHAT);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (imps_p->gen_info.is_login == TRUE)
- {
- mmi_imps_util_disp_warning_popup(STR_ID_IMPS_SERVER_DISCONNECT);
- /* check if the user is currently in IMPS application */
- /* it's currently in IMPS application */
- if (cont_scr || chat_scr || scr_id == SCR_ID_IMPS_CONT || scr_id == SCR_ID_IMPS_CHAT)
- {
- if (cont_scr) /* in contact list screen */
- {
- HistoryReplace(SCR_ID_IMPS_CONT, SCR_ID_IMPS_MAIN, mmi_imps_entry_main);
- }
- else /* chat screen */
- {
- DeleteUptoScrID(SCR_ID_IMPS_CHAT);
- HistoryReplace(SCR_ID_IMPS_CHAT, SCR_ID_IMPS_MAIN, mmi_imps_entry_main);
- }
- DeleteUptoScrID(SCR_ID_IMPS_MAIN);
- }
- }
- mmi_imps_util_free_buff_when_logout();
- mmi_imps_reset_cntx();
- }
- #endif /* IMPS_TEST_CODE */
- #define MAIN_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_init_hilite_hdlr
- * DESCRIPTION
- * Initialize all highlight handlers
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_init_hilite_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetHiliteHandler(MENU_ID_IMPS_LOGIN, mmi_imps_hilite_login);
- /* about me */
- SetHiliteHandler(MENU_ID_IMPS_CONT_ABOUT_ME, mmi_imps_hilite_about_me);
- SetHiliteHandler(MENU_ID_IMPS_ABOUT_ME_FILE_OPT_SEL, mmi_imps_hilite_about_pic_sel);
- SetHiliteHandler(MENU_ID_IMPS_ABOUT_ME_FILE_OPT_VIEW, mmi_imps_hilite_about_pic_view);
- SetHiliteHandler(MENU_ID_IMPS_ABOUT_ME_FILE_OPT_DEL, mmi_imps_hilite_about_pic_del);
- SetHiliteHandler(MENU_ID_IMPS_CONT_WATCHER_LIST, mmi_imps_hilite_get_watch_list);
- SetHiliteHandler(MENU_ID_IMPS_CONT_SEND_MSG, mmi_imps_hilite_cont_send_msg);
- SetHiliteHandler(MENU_ID_IMPS_CONT_DEL, mmi_imps_hilite_del_cont);
- /* about friend */
- SetHiliteHandler(MENU_ID_IMPS_CONT_ABOUT_FRIEND, mmi_imps_hilite_about_friend);
- SetHiliteHandler(MENU_ID_IMPS_ABOUT_FRIEND_EDIT, mmi_imps_hilite_about_friend_edit);
- SetHiliteHandler(MENU_ID_IMPS_ABOUT_FRIEND_REFRESH, mmi_imps_hilite_about_friend_refresh);
- /* add contact */
- SetHiliteHandler(MENU_ID_IMPS_CONT_ADD, mmi_imps_hilite_add_cont);
- SetHiliteHandler(MENU_ID_IMPS_CONT_ADD_DIRECT, mmi_imps_hilite_add_direct);
- SetHiliteHandler(MENU_ID_IMPS_SEARCH_DIRECT, mmi_imps_hilite_direct_search);
- SetHiliteHandler(MENU_ID_IMPS_SEARCH_PHB, mmi_imps_hilite_search_from_phb);
- SetHiliteHandler(MENU_ID_IMPS_CONT_ADD_NAME_OPT_DONE, mmi_imps_hilite_input_name_opt_done);
- SetHiliteHandler(MENU_ID_IMPS_CONT_ADD_NAME_OPT_INPUT_METH, mmi_imps_hilite_comm_input_meth);
- /* sort */
- SetHiliteHandler(MENU_ID_IMPS_CONT_SORT, mmi_imps_hilite_sort);
- SetHiliteHandler(MENU_ID_IMPS_SORT_BY_NAME, mmi_imps_hilite_sort_by_name);
- SetHiliteHandler(MENU_ID_IMPS_SORT_BY_GROUP, mmi_imps_hilite_sort_by_group);
- SetHiliteHandler(MENU_ID_IMPS_SORT_BY_STATUS, mmi_imps_hilite_sort_by_status);
- SetHiliteHandler(MENU_ID_IMPS_CONT_MANAGE_GROUP, mmi_imps_hilite_manage_group);
- SetHiliteHandler(MENU_ID_IMPS_CONT_BLOCK_GRANT, mmi_imps_hilite_block_grant);
- SetHiliteHandler(MENU_ID_IMPS_CONT_CHAT_ROOMS, mmi_imps_hilite_chat_room);
- SetHiliteHandler(MENU_ID_IMPS_CONT_LOGOUT, mmi_imps_hilite_logout);
- /* chat */
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_WRITE, mmi_imps_hilite_chat_write);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_SEND, mmi_imps_hilite_chat_send);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_INVITE, mmi_imps_hilite_chat_invite);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_INSERT_SYMBOL, mmi_imps_hilite_chat_insert_symbol);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_LIST_MEMBER, mmi_imps_hilite_chat_member);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_SAVE_TEXT, mmi_imps_hilite_chat_save);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_CLOSE, mmi_imps_hilite_chat_close);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_INPUT_METH, mmi_imps_hilite_comm_input_meth);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_OPT_SEND_DONE, mmi_imps_hilite_chat_send_done);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_SAVE_OPT_DONE, mmi_imps_hilite_chat_save_opt_done);
- SetHiliteHandler(MENU_ID_IMPS_CHAT_SAVE_OPT_INPUT_METH, mmi_imps_hilite_comm_input_meth);
- /* group */
- SetHiliteHandler(MENU_ID_IMPS_GROUP_OPT_CREATE, mmi_imps_hilite_group_create);
- SetHiliteHandler(MENU_ID_IMPS_GROUP_OPT_LIST_MEMBER, mmi_imps_hilite_group_list_member);
- SetHiliteHandler(MENU_ID_IMPS_GROUP_OPT_EDIT, mmi_imps_hilite_group_edit);
- SetHiliteHandler(MENU_ID_IMPS_GROUP_OPT_DELETE, mmi_imps_hilite_group_del);
- /* chat room */
- SetHiliteHandler(MENU_ID_IMPS_ROOM_OPT_JUMP_TO, mmi_imps_hilite_room_jump_to);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_OPT_CREATE, mmi_imps_hilite_room_open);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_OPT_SEARCH, mmi_imps_hilite_room_search);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_OPT_CLOSE, mmi_imps_hilite_room_close);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_OPT_JOIN, mmi_imps_hilite_room_join);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_INVITE_OPT_DONE, mmi_imps_hilite_invite_note_opt_done);
- SetHiliteHandler(MENU_ID_IMPS_ROOM_INVITE_OPT_INPUT_METH, mmi_imps_hilite_comm_input_meth);
- /* profile */
- SetHiliteHandler(MENU_ID_IMPS_PROF, mmi_imps_hilite_prof);
- SetHiliteHandler(MENU_ID_IMPS_PROF_ACTIVATE, mmi_imps_hilite_prof_activate);
- SetHiliteHandler(MENU_ID_IMPS_PROF_EDIT, mmi_imps_hilite_prof_edit);
- SetHiliteHandler(MENU_ID_IMPS_PROF_SETTING, mmi_imps_hilite_prof_setting);
- SetHiliteHandler(MENU_ID_IMPS_PROF_CONN, mmi_imps_hilite_prof_conn);
- SetHiliteHandler(MENU_ID_IMPS_PROF_EDITOR_OPT_DONE, mmi_imps_hilite_prof_done);
- SetHiliteHandler(MENU_ID_IMPS_PROF_EDITOR_OPT_INPUT_METH, mmi_imps_hilite_comm_input_meth);
- #ifdef IMPS_FOR_OMA_ONLY
- /* sbuscribe presence */
- SetHiliteHandler(MENU_ID_IMPS_GROUP_OPT_BROADCAST, mmi_imps_hilite_group_broadcast);
- SetHiliteHandler(MENU_ID_IMPS_CONT_SUBSCRIBE, mmi_imps_hilite_subscribe);
- SetHiliteHandler(MENU_ID_IMPS_CONT_UNSUBSCRIBE, mmi_imps_hilite_unsubscribe);
- #endif /* IMPS_FOR_OMA_ONLY */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_init_icon_list
- * DESCRIPTION
- * Initialize mood and invication icon mapping table
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_init_icon_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- S32 width, height;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* initialize mood table */
- for (i = 0; i < IMPS_NUM_MOOD; i++)
- {
- /* file icons */
- g_imps_mood_icon_list[i].icon = (PU8) GetImage((U16) (IMG_ID_IMPS_HAPPY + i));
- /* measure height and width */
- gui_measure_image(g_imps_mood_icon_list[i].icon, &width, &height);
- g_imps_mood_icon_list[i].icon_height = (U8) height;
- g_imps_mood_icon_list[i].icon_width = (U8) width;
- }
- /* initialize invite table */
- for (i = 0; i < IMPS_NUM_INVITE; i++)
- {
- /* file icons */
- g_imps_invite_icon_list[i].icon = (PU8) GetImage((U16) (IMG_ID_IMPS_CONT_LIST + i));
- /* measure height and width */
- gui_measure_image(g_imps_invite_icon_list[i].icon, &width, &height);
- g_imps_invite_icon_list[i].icon_height = (U8) height;
- g_imps_invite_icon_list[i].icon_width = (U8) width;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_main
- * DESCRIPTION
- * Highlight handler of IMPS menu in Message screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_main(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_main, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_pre_entry_main, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_main
- * DESCRIPTION
- * Pre-Entry function of Message -> Instant Message menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_main(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* some action that is not finished */
- if (imps_p->gen_info.curr_action == MSG_ID_MMI_IMPS_LOGIN_REQ) /* login can be aborted */
- {
- mmi_imps_login_progress();
- imps_p->gen_info.is_reentry = TRUE;
- }
- else if (imps_p->gen_info.curr_action != 0)
- {
- mmi_imps_display_progressing();
- imps_p->gen_info.is_reentry = TRUE;
- }
- else if (imps_p->gen_info.is_login == TRUE)
- {
- mmi_imps_pre_entry_cont();
- }
- else
- {
- mmi_imps_entry_main();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_main
- * DESCRIPTION
- * Entry first screen of IMPS (login/profile setting)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_main(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 numItems;
- U16 nStrItemList[2]; /* only Login and Profile Setting */
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_MAIN, NULL, mmi_imps_entry_main, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_MAIN);
- SetParentHandler(MENU_ID_IMPS_MAIN);
- numItems = GetNumOfChild(MENU_ID_IMPS_MAIN);
- GetSequenceStringIds(MENU_ID_IMPS_MAIN, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_ID_IMPS,
- GetRootTitleIcon(MENU_ID_IMPS_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_imps_hilite_login
- * DESCRIPTION
- * Highlight handler of IMPS -> Login
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_login(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_entry_login, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_login_progress
- * DESCRIPTION
- * Entry progressing screen for login
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_login_progress(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_pre_entry_progressing(
- STR_ID_IMPS,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- 0,
- 0,
- STR_GLOBAL_ABORT,
- 0,
- (U8*) GetString(STR_ID_IMPS_LOGIN),
- NULL,
- IMG_GLOBAL_PROGRESS,
- NULL,
- mmi_imps_login_abort,
- mmi_imps_login_abort);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_auto_login
- * DESCRIPTION
- * Auto login IMPS application
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_auto_login(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_struct *act_prof = &imps_p->act_prof;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* something still not ready */
- if (imps_p->gen_info.ps_ready_state != IMPS_LOGIN_READY)
- {
- return;
- }
- if (pfnUnicodeStrlen((S8*) act_prof->prof_name) != 0)
- {
- if (act_prof->auto_login && act_prof->dt_acct >= mmi_dtcnt_get_first_account_id(DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_WIFI))
- {
- /* currently in IMPS related menus */
- if (GetActiveScreenId() == SCR_ID_IMPS_MAIN || IsScreenPresent(SCR_ID_IMPS_MAIN))
- {
- mmi_imps_entry_auto_login_confirm();
- }
- else /* in other application menu */
- {
- /* display auto-login screen and send request to PS */
- mmi_imps_entry_auto_login();
- mmi_imps_ps_login_req();
- }
- }
- imps_p->gen_info.ps_ready_state |= IMPS_LOGIN_ALREADY; /* set this value to prevent lots of auto-login */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_auto_login
- * DESCRIPTION
- * Display auto-login screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_auto_login(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* currently in IMPS main menu */
- if (GetActiveScreenId() == SCR_ID_IMPS_MAIN)
- {
- mmi_imps_login_progress();
- }
- else /* main menu is in history */
- {
- HistoryReplace(SCR_ID_IMPS_MAIN, SCR_ID_IMPS_PROGRESS, mmi_imps_login_progress);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_auto_login_confirm
- * DESCRIPTION
- * Display confirmation screen to auto-login
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_auto_login_confirm(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_entry_confirm(STR_ID_IMPS_LOGIN, mmi_imps_auto_login_yes, GoBackHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_auto_login_yes
- * DESCRIPTION
- * Confirm to proceed login process
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_auto_login_yes(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* display auto-login screen and send request to PS */
- mmi_imps_login_progress();
- mmi_imps_ps_login_req();
- DeleteUptoScrID(SCR_ID_IMPS_MAIN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_login
- * DESCRIPTION
- * Pre-Entry function of Login
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_login(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (pfnUnicodeStrlen((S8*) imps_p->act_prof.prof_name) == 0)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_PROF_NO_CONFIG);
- }
- #ifdef IMPS_TEST_CODE
- else
- {
- mmi_imps_login_progress();
- SetKeyHandler(mmi_imps_test_login_complete, KEY_SEND, KEY_EVENT_UP);
- }
- #else /* IMPS_TEST_CODE */
- else if (imps_p->gen_info.ps_ready_state >= IMPS_LOGIN_READY)
- {
- /* send request to login */
- mmi_imps_login_progress();
- mmi_imps_ps_login_req();
- imps_p->gen_info.ps_ready_state |= IMPS_LOGIN_ALREADY; /* set this value to prevent lots of auto-login */
- }
- else
- {
- mmi_imps_util_disp_warning_popup(STR_ID_IMPS_NOT_READY);
- }
- #endif /* IMPS_TEST_CODE */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_login_abort
- * DESCRIPTION
- * Abort login process
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_login_abort(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_entry_abort();
- #ifdef IMPS_TEST_CODE
- SetKeyHandler(mmi_imps_login_abort_finish, KEY_SEND, KEY_EVENT_DOWN);
- #else /* IMPS_TEST_CODE */
- /* send abort request to PS */
- mmi_imps_ps_abort_login_req();
- #endif /* IMPS_TEST_CODE */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_login_abort_finish
- * DESCRIPTION
- * Finish aborting process
- * PARAMETERS
- * void
- * result(?) [IN] Result of aborting
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_login_abort_finish(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (IsScreenPresent(SCR_ID_IMPS_MAIN))
- {
- if (GetActiveScreenId() == SCR_ID_IMPS_PROGRESS)
- {
- GoBackToHistory(SCR_ID_IMPS_MAIN);
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- }
- }
- else /* auto-update case */
- {
- if (GetActiveScreenId() == SCR_ID_IMPS_PROGRESS)
- {
- mmi_imps_entry_main();
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_re_entry_app
- * DESCRIPTION
- * Re-Entry IMPS application after progressing finished
- * PARAMETERS
- * void
- * result(?) [IN] Result of aborting
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_re_entry_app(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetActiveScreenId() == SCR_ID_IMPS_PROGRESS)
- {
- if (imps_p->gen_info.is_login)
- {
- mmi_imps_pre_entry_cont();
- }
- else
- {
- mmi_imps_entry_main();
- }
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- }
- else /* some interrupt came */
- {
- if (imps_p->gen_info.is_login)
- {
- HistoryReplace(SCR_ID_IMPS_PROGRESS, SCR_ID_IMPS_CONT, mmi_imps_pre_entry_cont);
- }
- else
- {
- HistoryReplace(SCR_ID_IMPS_PROGRESS, SCR_ID_IMPS_MAIN, mmi_imps_entry_main);
- }
- }
- imps_p->gen_info.is_reentry = FALSE;
- }
- #define CONT_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_cont
- * DESCRIPTION
- * Pre-Entry function of contact list
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_cont(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset((void*)subMenuData[0], 0, MAX_SUB_MENU_SIZE);
- AnsiiNToUnicodeString((S8*) subMenuData[0], (S8*) imps_p->cont_info.cont_list[0].id, MAX_SUBMENU_CHARACTERS);
- strcpy((S8*) imps_p->cont_info.cont_list[0].group_id, (S8*) "MySelf");
- mmi_imps_sort_list();
- imps_p->gen_info.curr_tab = 0;
- mmi_imps_entry_cont();
- DeleteScreenIfPresent(SCR_ID_IMPS_CHAT);
- mmi_imps_check_pending_invite();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_cont_get_items
- * DESCRIPTION
- * Fill items of contact list into UI buffers
- * PARAMETERS
- * start_index [IN] Start index of item to be retrieved
- * menu_data [IN] Address of menu data
- * data_size [IN] Maximal number of menu items can be put in the buffer
- * RETURNS
- * void
- *****************************************************************************/
- S32 mmi_imps_cont_get_items(S32 start_index, gui_iconlist_menu_item *menu_data, S32 data_size)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, j;
- S32 count = (S32) imps_p->cont_info.no_cont;
- mmi_imps_cont_struct *cont;
- gui_iconlist_menu_item *item = menu_data;
- mmi_imps_group_struct *group;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- for (i = 0, j = (i + start_index); i < data_size && j < count; i++, j++)
- {
- cont = &imps_p->cont_info.cont_list[j];
- if (cont->availability == IMPS_PA_USER_UNKNOWN)
- {
- item->image_list[0] = (PU8) GetImage(IMG_ID_IMPS_REFRESH);
- }
- else
- {
- item->image_list[0] = (PU8) GetImage((U16) (cont->availability + IMG_ID_IMPS_ONLINE));
- }
- if (cont->comm_state & IMPS_CONT_NEW_MSG)
- {
- item->image_list[1] = (PU8) GetImage(IMG_ID_IMPS_MESSAGE);
- }
- else
- {
- item->image_list[1] = NULL;
- }
- if (cont->comm_state & IMPS_CONT_BLOCK)
- {
- item->image_list[2] = (PU8) GetImage(IMG_ID_IMPS_BLOCK);
- }
- else
- {
- item->image_list[2] = NULL;
- }
- if (pfnUnicodeStrlen((S8*) cont->nick_name) == 0)
- {
- mmi_imps_util_ansi_2_ucs2_menu((S8*) cont->id, (S8*) item->item_list[0], MAX_SUBMENU_CHARACTERS);
- }
- else
- {
- mmi_imps_util_copy_with_dot((S8*) cont->nick_name, (S8*) item->item_list[0], MAX_SUBMENU_CHARACTERS);
- }
- if (j == 0)
- {
- pfnUnicodeStrcpy((S8*) item->item_list[1], (S8*) GetString(STR_ID_IMPS_MYSELF));
- }
- else
- {
- S32 k;
- /* find the group that contact belongs to */
- for (k = 0; k < IMPS_MAX_NO_GROUP; k++)
- {
- group = &imps_p->group_info.group_list[k];
- if (strcmp((S8*) group->group_id, (S8*) cont->group_id) == 0)
- {
- if (pfnUnicodeStrlen((S8*) group->group_name))
- {
- mmi_imps_util_copy_with_dot(
- (S8*) group->group_name,
- (S8*) item->item_list[1],
- MAX_SUBMENU_CHARACTERS);
- }
- else
- {
- mmi_imps_util_ansi_2_ucs2_menu(
- (S8*) cont->group_id,
- (S8*) item->item_list[1],
- MAX_SUBMENU_CHARACTERS);
- }
- }
- }
- }
- item++;
- }
- return i;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_cont_get_hints
- * DESCRIPTION
- * Fill items of hint list into UI buffers. Currently, it's no use.
- * PARAMETERS
- * start_index [IN] Start index of item to be retrieved
- * hint_array [IN] Buffer to strore list of hints
- * RETURNS
- * void
- *****************************************************************************/
- S32 mmi_imps_cont_get_hints(S32 start_index, UI_string_type *hint_array)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return 0;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_cont
- * DESCRIPTION
- * Entry main screen of IMPS (contact list and chatting screen)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_cont(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- BOOL list_is_ready_p;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_CONT, NULL, mmi_imps_pre_entry_cont, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_CONT);
- if (imps_p->cont_info.clear_gui_buff)
- {
- guiBuffer = NULL;
- imps_p->cont_info.clear_gui_buff = FALSE;
- }
- SetParentHandler(0);
- RegisterHighlightHandler(mmi_imps_hilite_contact);
- mmi_imps_tab_init();
- ShowCategory425Screen(
- (UI_string_type) GetString(STR_ID_IMPS_CONT_LIST),
- STR_GLOBAL_OPTIONS,
- IMG_GLOBAL_OPTIONS,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (S8) imps_p->gen_info.no_tab,
- (S8) imps_p->gen_info.curr_tab,
- MMI_tab_bar_items,
- (S32) imps_p->cont_info.no_cont,
- mmi_imps_cont_get_items,
- mmi_imps_cont_get_hints,
- (PU8) GetImage(IMG_ID_IMPS_ONLINE),
- (PU8) GetImage(IMG_ID_IMPS_MESSAGE),
- 0,
- guiBuffer,
- &list_is_ready_p);
- SetCategory425TabSelectCallback(mmi_imps_tab_jump);
- /* set/reset all blinking/unblinking status */
- mmi_imps_util_blink_tab();
- SetLeftSoftkeyFunction(mmi_imps_entry_cont_opt, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_tab_prev, KEY_LEFT_ARROW, KEY_EVENT_DOWN); /* move to previous tab */
- SetKeyHandler(mmi_imps_tab_next, KEY_RIGHT_ARROW, KEY_EVENT_DOWN); /* move to next tab */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_cont_reset_msg_icon
- * DESCRIPTION
- * Reset status icon of current highlighted chat room.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_cont_reset_msg_icon(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- mmi_imps_room_struct *room = &imps_p->room_info.room_list[imps_p->chat_info.curr_room];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* only apply to single talk, for group chat, the status of contact list does not affect */
- if (room->type == IMPS_ROOM_TYPE_SINGLE)
- {
- /* start from the first contact except myself */
- for (i = 1; i < imps_p->cont_info.no_cont; i++)
- {
- if (mmi_imps_util_is_id_same((S8*) room->member[0].id, (S8*) imps_p->cont_info.cont_list[i].id))
- {
- /* contact list found, unset new message state */
- imps_p->cont_info.cont_list[i].comm_state &= ~IMPS_CONT_NEW_MSG;
- mmi_imps_cont_redraw_list();
- break;
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_contact
- * DESCRIPTION
- * Highlight handler of contact list
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_contact(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- imps_p->cont_info.curr_cont = (U8) index;
- if (index > 0)
- {
- SetKeyHandler(mmi_imps_pre_entry_chat, KEY_SEND, KEY_EVENT_DOWN);
- }
- else
- {
- ClearKeyHandler(KEY_SEND, KEY_EVENT_DOWN);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_cont_opt
- * DESCRIPTION
- * Display option screen for contact list
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_cont_opt(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 numItems;
- U16 nStrItemList[16]; /* Activate and Edit */
- U8 *guiBuffer;
- U16 menu_id;
- U8 is_cont_blocked = FALSE;
- S32 i;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (imps_p->cont_info.curr_cont == 0)
- {
- menu_id = MENU_ID_IMPS_CONT_MY_OPT;
- }
- else
- {
- menu_id = MENU_ID_IMPS_CONT_USER_OPT; /* MENU_ID_IMPS_CONT_CHAT_OPT */
- if (imps_p->cont_info.cont_list[imps_p->cont_info.curr_cont].comm_state & IMPS_CONT_BLOCK)
- {
- is_cont_blocked = TRUE;
- }
- }
- EntryNewScreen(SCR_ID_IMPS_CONT_OPT, NULL, mmi_imps_entry_cont_opt, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_CONT_OPT);
- SetParentHandler(menu_id);
- numItems = GetNumOfChild(menu_id);
- GetSequenceStringIds(menu_id, nStrItemList);
- /* switch between Block and Grant */
- if (is_cont_blocked)
- {
- for (i = 0; i < numItems; i++)
- {
- if (nStrItemList[i] == STR_ID_IMPS_BLOCK_CONTACT)
- {
- nStrItemList[i] = STR_ID_IMPS_GRANT_CONTACT;
- break;
- }
- }
- }
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_OPTIONS,
- GetRootTitleIcon(MENU_ID_IMPS_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_imps_cont_redraw_list
- * DESCRIPTION
- * Redraw contact list when changed.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_cont_redraw_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* force to redraw contact list */
- if (GetActiveScreenId() == SCR_ID_IMPS_CONT)
- {
- RefreshCategory425Screen(imps_p->cont_info.no_cont, imps_p->cont_info.curr_cont);
- }
- else
- {
- imps_p->cont_info.clear_gui_buff = TRUE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_cont_update_when_msg_come
- * DESCRIPTION
- * Update status of contact when new message comes
- * PARAMETERS
- * entity [IN] Entity to be redraw
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_cont_update_when_msg_come(imps_entity_struct *entity)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- S32 count = (S32) imps_p->cont_info.no_cont;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (entity == NULL)
- {
- return;
- }
- for (i = 1; i < count; i++)
- {
- mmi_imps_cont_struct *cont = &imps_p->cont_info.cont_list[i];
- if (mmi_imps_util_is_id_same((S8*) cont->id, (S8*) entity->id)) /* found contact */
- {
- cont->comm_state |= IMPS_CONT_NEW_MSG;
- mmi_imps_cont_redraw_list();
- break;
- }
- }
- }
- #define DEL_CONT_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_del_cont
- * DESCRIPTION
- * Highlight handler of Delete Contact option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_del_cont(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_entry_del_cont_confirm, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_del_cont_confirm
- * DESCRIPTION
- * Display confirmation screen for deleting a contact
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_del_cont_confirm(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!imps_p->gen_info.auto_update_done)
- {
- mmi_imps_util_disp_warning_popup(STR_ID_IMPS_ERR_CONT_NOT_READY);
- return;
- }
- mmi_imps_entry_confirm(STR_GLOBAL_DELETE, mmi_imps_del_cont, GoBackHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_del_cont
- * DESCRIPTION
- * Proceed deleting a contact
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_del_cont(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* display progressing screen */
- mmi_imps_display_progressing();
- /* delete remote part */
- #ifdef IMPS_TEST_CODE
- mmi_imps_del_cont_finished(0);
- #else
- mmi_imps_ps_del_cont_req();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_del_cont_finished
- * DESCRIPTION
- * Callback function when protocol finishes deleting process.
- * PARAMETERS
- * result [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_del_cont_finished(S32 result)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (result == 0 /* IMPS_OK */ )
- {
- S32 i = (S32) imps_p->cont_info.curr_cont;
- S32 count = (S32) imps_p->cont_info.no_cont;
- S32 j;
- /* decrease counter in group by 1 */
- for (j = 0; j < IMPS_MAX_NO_GROUP; j++)
- {
- if (mmi_imps_util_is_id_same
- ((S8*) imps_p->group_info.group_list[j].group_id, (S8*) imps_p->cont_info.cont_list[i].group_id))
- {
- imps_p->group_info.group_list[j].no_users--;
- }
- }
- /* remove contact list from file and context */
- if (i < (IMPS_MAX_NO_CONT - 1))
- {
- memcpy(
- &imps_p->cont_info.cont_list[i],
- &imps_p->cont_info.cont_list[i + 1],
- (count - i - 1) * sizeof(mmi_imps_cont_struct));
- memset(&imps_p->cont_info.cont_list[count - 1], 0, sizeof(mmi_imps_cont_struct));
- }
- else
- {
- memset(&imps_p->cont_info.cont_list[i], 0, sizeof(mmi_imps_cont_struct));
- }
- imps_p->cont_info.no_cont--;
- mmi_imps_util_write_cont();
- mmi_imps_util_disp_popup_done();
- if (imps_p->gen_info.is_reentry)
- {
- mmi_imps_re_entry_app();
- }
- else
- {
- mmi_imps_util_del_scr_after_progress(SCR_ID_IMPS_CONT); /* delete screen between contact list and progressing screen */
- }
- /* clear GUI buffer to make the list refreshed */
- imps_p->cont_info.clear_gui_buff = TRUE;
- }
- else
- {
- mmi_imps_util_disp_err_popup(mmi_imps_util_get_err_str(result));
- if (imps_p->gen_info.is_reentry)
- {
- mmi_imps_re_entry_app();
- }
- else
- {
- mmi_imps_util_del_scr_after_progress(SCR_ID_IMPS_CONT_OPT); /* delete screen between opiion screen and progressing screen */
- }
- }
- }
- #define LOGOUT_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_logout
- * DESCRIPTION
- * Hilite handler of Contact List -> Logout option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_logout(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_entry_logout, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_logout
- * DESCRIPTION
- * Entry function of Logout menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_logout(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_display_progressing();
- #ifdef IMPS_TEST_CODE
- mmi_imps_logout_complete();
- #else
- mmi_imps_ps_logout_req();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_logout_complete
- * DESCRIPTION
- * Entry function after logout response comes.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_logout_complete(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetActiveScreenId() == SCR_ID_IMPS_PROGRESS)
- {
- if (IsScreenPresent(SCR_ID_IMPS_MAIN))
- {
- GoBackToHistory(SCR_ID_IMPS_MAIN);
- return;
- }
- else
- {
- mmi_imps_entry_main();
- }
- DeleteBetweenScreen(SCR_ID_IMPS_CONT, SCR_ID_IMPS_PROGRESS);
- }
- else
- {
- mmi_imps_util_del_scr_after_progress(SCR_ID_IMPS_CONT);
- HistoryReplace(SCR_ID_IMPS_CONT, SCR_ID_IMPS_MAIN, mmi_imps_entry_main);
- }
- mmi_imps_util_free_buff_when_logout();
- mmi_imps_reset_cntx();
- }
- #define PROF_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof
- * DESCRIPTION
- * Highlight handler for IMPS -> Profile menu item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_prof, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_pre_entry_prof, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_prof
- * DESCRIPTION
- * Pre-entry function of profile
- * 1. allocate memory for profile data
- * 2. read profile from NVRAM.
- * 3. entry profile
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_prof(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (imps_p->prof_misc == NULL)
- {
- imps_p->prof_misc = (mmi_imps_prof_misc_struct*) OslMalloc(sizeof(mmi_imps_prof_misc_struct));
- memset(imps_p->prof_misc, 0, sizeof(mmi_imps_prof_misc_struct));
- }
- /* read profile from NVRAM */
- mmi_imps_prof_read_nvram(IMPS_NVRAM_PROF_LIST);
- mmi_imps_entry_prof();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof
- * DESCRIPTION
- * List of profiles
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- U8 *nStrItemList[IMPS_PROF_COUNT];
- U16 nIconItemList[IMPS_PROF_COUNT] = {0, 0, 0};
- U8 *guiBuffer;
- S32 curr_hilite = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_PROF, NULL, mmi_imps_entry_prof, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_PROF);
- for (i = 0; i < IMPS_PROF_COUNT; i++)
- {
- if (pfnUnicodeStrlen((S8*) imps_p->prof_misc->prof_name_list[i]) == 0)
- {
- S8 str_tmp[IMPS_PROF_NAME_LEN];
- sprintf(str_tmp, "Profile%d", (i + 1));
- AnsiiToUnicodeString((S8*) imps_p->prof_misc->prof_name_list[i], str_tmp);
- }
- nStrItemList[i] = (U8*) imps_p->prof_misc->prof_name_list[i];
- }
- if (imps_p->prof_misc->act_prof_indx <= IMPS_PROF_COUNT && imps_p->prof_misc->act_prof_indx > 0)
- {
- nIconItemList[imps_p->prof_misc->act_prof_indx - 1] = IMG_VICON;
- curr_hilite = (S32) (imps_p->prof_misc->act_prof_indx - 1);
- }
- RegisterHighlightHandler(mmi_imps_hilite_prof_list);
- ShowCategory73Screen(
- STR_ID_IMPS_PROF,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- STR_GLOBAL_OPTIONS,
- IMG_GLOBAL_OPTIONS,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- IMPS_PROF_COUNT,
- nStrItemList,
- (U16*) nIconItemList,
- (U16*) gIndexIconsImageList,
- curr_hilite,
- guiBuffer,
- ICON_ICON_TEXT);
- SetLeftSoftkeyFunction(mmi_imps_entry_prof_opt, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_entry_prof_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- SetDelScrnIDCallbackHandler(SCR_ID_IMPS_PROF, (HistoryDelCBPtr) mmi_imps_prof_del_callback);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_del_callback
- * DESCRIPTION
- * Callback function when profile list is deleted.
- * PARAMETERS
- * param [IN] Parameter from framework
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_imps_prof_del_callback(void *param)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_free_mem();
- return FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_free_mem_n_back
- * DESCRIPTION
- * Free dynamic memory for Profile and go back to previous screen.
- * PARAMETERS
- * void
- * param(?) [IN] Parameter from framework
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_free_mem_n_back(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_free_mem();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_free_mem
- * DESCRIPTION
- * Free dynamic memory for Profile.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_free_mem(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (imps_p->prof_misc != NULL)
- {
- OslMfree(imps_p->prof_misc);
- imps_p->prof_misc = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof_list
- * DESCRIPTION
- * Hilite handler for profile list.
- * PARAMETERS
- * index [IN] Index of profile
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_list(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- imps_p->prof_misc->hilte_prof = (U8) index;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof_opt
- * DESCRIPTION
- * Entry function of Profile->Option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof_opt(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 numItems;
- U16 nStrItemList[2]; /* Activate and Edit */
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_PROF_OPT, NULL, mmi_imps_entry_prof_opt, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_PROF_OPT);
- SetParentHandler(MENU_ID_IMPS_PROF_OPT);
- numItems = GetNumOfChild(MENU_ID_IMPS_PROF_OPT);
- GetSequenceStringIds(MENU_ID_IMPS_PROF_OPT, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_OPTIONS,
- GetRootTitleIcon(MENU_ID_IMPS_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_imps_hilite_prof_activate
- * DESCRIPTION
- * Highlight handler of Profile -> Activate menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_activate(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_entry_prof_activate, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof_activate
- * DESCRIPTION
- * Pre-Entry function for Profile -> Activate menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof_activate(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 i;
- mmi_imps_nvram_struct *prof_buff;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- i = imps_p->prof_misc->hilte_prof;
- if (imps_p->prof_misc->act_prof_indx != (i + 1))
- {
- prof_buff = (mmi_imps_nvram_struct*) OslMalloc(NVRAM_EF_IMPS_SIZE);
- mmi_imps_util_read_nvram((void*)prof_buff);
- /* check server */
- if (pfnUnicodeStrlen((S8*) prof_buff->prof[i].server) == 0)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_PROF_NO_CONFIG);
- OslMfree(prof_buff);
- return;
- }
- prof_buff->act_prof_indx = (i + 1);
- /* update activate profile info */
- imps_p->prof_misc->act_prof_indx = (i + 1);
- memcpy(&imps_p->act_prof, &prof_buff->prof[i], sizeof(mmi_imps_prof_struct));
- mmi_imps_util_reset_cont_list();
- mmi_imps_util_reset_about_me((void*)prof_buff);
- mmi_imps_util_write_nvram((void*)prof_buff);
- OslMfree(prof_buff);
- }
- /* update act profile info and write to NVRAM */
- mmi_imps_util_disp_popup_done();
- DeleteUptoScrID(SCR_ID_IMPS_PROF);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof_edit
- * DESCRIPTION
- * Highlight handler of Profile -> Edit menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_prof_edit, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_pre_entry_prof_edit, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_prof_edit
- * DESCRIPTION
- * Pre-entry function inline editor screen of profile.
- * Retrieve all data account information before entering editor screen.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_prof_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_display_progressing();
- #ifdef MMI_ON_HARDWARE_P
- DataAccountReadyCheck(mmi_imps_dt_acct_callback);
- #else
- mmi_imps_dt_acct_callback();
- #endif
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_dt_acct_callback
- * DESCRIPTION
- * Callback function for Data Account
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_dt_acct_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetExitScrnID() == SCR_ID_IMPS_PROGRESS)
- {
- mmi_imps_entry_prof_edit();
- }
- DeleteScreenIfPresent(SCR_ID_IMPS_PROGRESS);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_read_nvram
- * DESCRIPTION
- * 1. Read profile setting from NVRAM
- * 2. After read complete, entry profile edit screen.
- * PARAMETERS
- * type [IN] Cause of reading NVRAM
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_read_nvram(mmi_imps_nvram_cause type)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i;
- mmi_imps_nvram_struct *prof_buff = (mmi_imps_nvram_struct*) OslMalloc(NVRAM_EF_IMPS_SIZE);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_util_read_nvram((void*)prof_buff);
- if (type == IMPS_NVRAM_INIT) /* for initialization, load to active profile */
- {
- if (prof_buff->act_prof_indx > 0 && prof_buff->act_prof_indx <= IMPS_PROF_COUNT)
- {
- memcpy(&imps_p->act_prof, &prof_buff->prof[(prof_buff->act_prof_indx - 1)], sizeof(mmi_imps_prof_struct));
- /* initialize myself in contact list */
- strcpy((S8*) imps_p->cont_info.cont_list[0].id, (S8*) imps_p->act_prof.username);
- imps_p->cont_info.no_cont = 1;
- }
- else
- {
- /* set profile name to NULL to indicate no profile activeated */
- imps_p->act_prof.prof_name[0] = 0;
- }
- /* piggyback sort type */
- imps_p->cont_info.sort_type = prof_buff->sort_type;
- }
- else if (type == IMPS_NVRAM_PROF_LIST)
- {
- for (i = 0; i < IMPS_PROF_COUNT; i++)
- if (pfnUnicodeStrlen((S8*) prof_buff->prof[i].prof_name) > 0)
- {
- pfnUnicodeStrcpy((S8*) imps_p->prof_misc->prof_name_list[i], (S8*) prof_buff->prof[i].prof_name);
- }
- imps_p->prof_misc->act_prof_indx = prof_buff->act_prof_indx;
- }
- else /* if(type == IMPS_NVRAM_PROF_EDIT) for profile editing, load to current profile */
- {
- mmi_imps_prof_edit_struct *edit_prof = &imps_p->prof_misc->edit_prof;
- /* store date to current editing buffer */
- i = (S32) imps_p->prof_misc->hilte_prof;
- if (pfnUnicodeStrlen((S8*) prof_buff->prof[i].prof_name) > 0) /* non-empty profile */
- {
- pfnUnicodeStrcpy((S8*) edit_prof->prof_name, (S8*) prof_buff->prof[i].prof_name);
- AnsiiToUnicodeString((S8*) edit_prof->server, (S8*) prof_buff->prof[i].server);
- AnsiiToUnicodeString((S8*) edit_prof->username, (S8*) prof_buff->prof[i].username);
- AnsiiToUnicodeString((S8*) edit_prof->passwd, (S8*) prof_buff->prof[i].passwd);
- AnsiiToUnicodeString((S8*) edit_prof->proxy_username, (S8*) prof_buff->prof[i].proxy_username);
- AnsiiToUnicodeString((S8*) edit_prof->proxy_passwd, (S8*) prof_buff->prof[i].proxy_passwd);
- edit_prof->conn_type = (S32) prof_buff->prof[i].conn_type;
- edit_prof->curr_dt_acct = prof_buff->prof[i].dt_acct;
- edit_prof->use_proxy = (S32) prof_buff->prof[i].use_proxy;
- edit_prof->auto_login = (S32) prof_buff->prof[i].auto_login;
- edit_prof->auto_update = (S32) prof_buff->prof[i].auto_update;
- }
- else
- {
- S8 str_tmp[IMPS_PROF_NAME_LEN];
- memset(edit_prof, 0, sizeof(mmi_imps_prof_edit_struct));
- sprintf(str_tmp, "Profile%d", (i + 1));
- AnsiiToUnicodeString((S8*) edit_prof->prof_name, str_tmp);
- }
- /* port number */
- if (prof_buff->prof[i].proxy_port == 0) /* no setting before */
- {
- pfnUnicodeStrcpy((S8*) edit_prof->proxy_port, (S8*) g_imps_proxy_port);
- }
- else
- {
- gui_itoa(prof_buff->prof[i].proxy_port, (UI_string_type) edit_prof->proxy_port, 10);
- }
- /* IP address */
- if (prof_buff->prof[i].proxy_ip[0] == 0)
- {
- pfnUnicodeStrcpy((S8*) edit_prof->proxy_ip[0], (S8*) g_imps_zero_ip);
- pfnUnicodeStrcpy((S8*) edit_prof->proxy_ip[1], (S8*) g_imps_zero_ip);
- pfnUnicodeStrcpy((S8*) edit_prof->proxy_ip[2], (S8*) g_imps_zero_ip);
- pfnUnicodeStrcpy((S8*) edit_prof->proxy_ip[3], (S8*) g_imps_zero_ip);
- }
- else
- {
- gui_itoa((S32) prof_buff->prof[i].proxy_ip[0], (UI_string_type) edit_prof->proxy_ip[0], 10);
- gui_itoa((S32) prof_buff->prof[i].proxy_ip[1], (UI_string_type) edit_prof->proxy_ip[1], 10);
- gui_itoa((S32) prof_buff->prof[i].proxy_ip[2], (UI_string_type) edit_prof->proxy_ip[2], 10);
- gui_itoa((S32) prof_buff->prof[i].proxy_ip[3], (UI_string_type) edit_prof->proxy_ip[3], 10);
- }
- if (edit_prof->curr_dt_acct == 0)
- {
- edit_prof->curr_dt_acct = mmi_dtcnt_get_first_account_id(DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_WIFI);
- }
- mmi_dtcnt_get_account_name(edit_prof->curr_dt_acct, (S8*)imps_p->prof_misc->dt_acct_name, MAX_DATA_ACCOUNT_NAME_LEN);
- }
- OslMfree(prof_buff);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof_edit
- * DESCRIPTION
- * Entry Profie->Edit screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 numItems;
- U16 nStrItemList[2]; /* Activate and Edit */
- U8 *guiBuffer;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_PROF_EDIT, NULL, mmi_imps_entry_prof_edit, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_PROF_EDIT);
- SetParentHandler(MENU_ID_IMPS_PROF_EDIT);
- numItems = GetNumOfChild(MENU_ID_IMPS_PROF_EDIT);
- GetSequenceStringIds(MENU_ID_IMPS_PROF_EDIT, nStrItemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_EDIT,
- GetRootTitleIcon(MENU_ID_IMPS_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_imps_hilite_prof_setting
- * DESCRIPTION
- * Highlight handler of Profile -> Edit -> Profile Setting menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- imps_p->prof_misc->setting_type = 0; /* 0 == profile setting */
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_prof_setting, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_pre_entry_prof_setting, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof_conn
- * DESCRIPTION
- * Highlight handler of Profile -> Edit -> Connection Setting menu
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_conn(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- imps_p->prof_misc->setting_type = 1; /* 1 == connection setting */
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_prof_conn, KEY_EVENT_UP);
- SetKeyHandler(mmi_imps_pre_entry_prof_conn, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_prof_setting
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_read_nvram(IMPS_NVRAM_PROF_EDIT);
- mmi_imps_entry_prof_setting();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof_setting
- * DESCRIPTION
- * Entry inline editor screen of Profile Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U8 *inputBuffer;
- U16 inputBufferSize;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_PROF_SETTING, mmi_imps_exit_prof_setting, NULL, NULL);
- InitializeCategory57Screen();
- mmi_imps_prof_setting_fill_inline_struct();
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_PROF_SETTING);
- inputBuffer = GetCurrNInputBuffer(SCR_ID_IMPS_PROF_SETTING, &inputBufferSize);
- if (inputBuffer != NULL)
- {
- SetCategory57Data(wgui_inline_items, IMPS_INLINE_PROF_SETTING, inputBuffer);
- }
- ShowCategory57Screen(
- STR_ID_IMPS_PROF_SETTING,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- STR_GLOBAL_EDIT,
- IMG_GLOBAL_BACK,
- STR_GLOBAL_DONE,
- IMG_GLOBAL_BACK,
- IMPS_INLINE_PROF_SETTING,
- (U16*) g_imps_inline_icons,
- wgui_inline_items,
- 0,
- guiBuffer);
- SetCategory57RightSoftkeyFunctions(mmi_imps_prof_save, GoBackHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_exit_prof_setting
- * DESCRIPTION
- * Exit function for inlnine editor screen of Profile Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_exit_prof_setting(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_leading_zero(TRUE);
- GenericExitInlineScreen(SCR_ID_IMPS_PROF_SETTING, mmi_imps_entry_prof_setting);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_save
- * DESCRIPTION
- * LSK handler for profile editor screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_save(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_entry_confirm(STR_GLOBAL_SAVE, mmi_imps_prof_save_yes, mmi_imps_prof_save_no);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_save_no
- * DESCRIPTION
- * Give up saving profile
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_save_no(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DeleteUptoScrID(SCR_ID_IMPS_PROF_EDIT);
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_save_yes
- * DESCRIPTION
- * Proceed saving profile
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_save_yes(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_imps_nvram_struct *prof_buff;
- mmi_imps_prof_struct *prof;
- mmi_imps_prof_edit_struct *edit_prof;
- S32 i;
- S32 port;
- U8 type = imps_p->prof_misc->setting_type;
- U8 data_acct_start = mmi_dtcnt_get_first_account_id(DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_WIFI);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- edit_prof = &imps_p->prof_misc->edit_prof;
- /* port */
- port = (S32) gui_atoi(edit_prof->proxy_port);
- if (type == 0) /* 0 == Profie setting */
- {
- /* check profile name */
- if (pfnUnicodeStrlen((S8*) edit_prof->prof_name) == 0)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_ERR_EMPTY_NAME);
- return;
- }
- /* check server */
- if (pfnUnicodeStrlen((S8*) edit_prof->server) == 0)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_ERR_INVALID_SERVER);
- return;
- }
- /* check user name */
- if (pfnUnicodeStrlen((S8*) edit_prof->username) == 0)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_ERR_INVALID_USERNAME);
- return;
- }
- #ifndef IMPS_FOR_OMA_ONLY
- /* check "wv:" and append */
- mmi_imps_util_append_wv((S8*) edit_prof->username, IMPS_MAX_NAME_LEN);
- if (mmi_imps_util_is_username_valid((S8*) edit_prof->username) == FALSE)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_ERR_INVALID_USERNAME);
- return;
- }
- #endif /* IMPS_FOR_OMA_ONLY */
- }
- else
- {
- if (port == 0 || port > 65535)
- {
- mmi_imps_util_disp_err_popup(STR_ID_IMPS_ERR_INVALID_PORT);
- return;
- }
- }
- i = (S32) imps_p->prof_misc->hilte_prof;
- prof_buff = (mmi_imps_nvram_struct*) OslMalloc(NVRAM_EF_IMPS_SIZE);
- memset(prof_buff, 0, NVRAM_EF_IMPS_SIZE);
- mmi_imps_util_read_nvram((void*)prof_buff);
- /* retrieve the address of editing profile */
- prof = &prof_buff->prof[i];
- /* profile name */
- if (pfnUnicodeStrlen((S8*) edit_prof->prof_name) == 0)
- {
- /* copy default value of profile name if not exists */
- S8 str_tmp[IMPS_PROF_NAME_LEN];
- sprintf(str_tmp, "Profile%d", (i + 1));
- AnsiiToUnicodeString((S8*) prof->prof_name, str_tmp);
- }
- else
- {
- pfnUnicodeStrcpy((S8*) prof->prof_name, (S8*) edit_prof->prof_name);
- }
- if (type == 0)
- {
- /* server */
- UnicodeToAnsii((S8*) prof->server, (S8*) edit_prof->server);
- /* user name */
- UnicodeToAnsii((S8*) prof->username, (S8*) edit_prof->username);
- /* password */
- UnicodeToAnsii((S8*) prof->passwd, (S8*) edit_prof->passwd);
- /* auto login */
- prof->auto_login = (U8) edit_prof->auto_login;
- /* auto update */
- prof->auto_update = (U8) edit_prof->auto_update;
- /* make sure the data account is updated */
- if (edit_prof->curr_dt_acct <= data_acct_start)
- {
- prof->dt_acct = data_acct_start;
- }
- }
- else
- {
- /* connection type */
- prof->conn_type = (U8) edit_prof->conn_type;
- /* data account */
- prof->dt_acct = edit_prof->curr_dt_acct;
- /* user proxy */
- prof->use_proxy = (U8) edit_prof->use_proxy;
- /* proxy server */
- prof->proxy_ip[0] = (U8) gui_atoi(edit_prof->proxy_ip[0]);
- prof->proxy_ip[1] = (U8) gui_atoi(edit_prof->proxy_ip[1]);
- prof->proxy_ip[2] = (U8) gui_atoi(edit_prof->proxy_ip[2]);
- prof->proxy_ip[3] = (U8) gui_atoi(edit_prof->proxy_ip[3]);
- /* port */
- prof->proxy_port = (U16) port;
- /* proxy user name */
- UnicodeToAnsii((S8*) prof->proxy_username, (S8*) edit_prof->proxy_username);
- /* proxy passwd */
- UnicodeToAnsii((S8*) prof->proxy_passwd, (S8*) edit_prof->proxy_passwd);
- }
- /* update data if it's current activate profile */
- if ((i + 1) == imps_p->prof_misc->act_prof_indx)
- {
- U8 critical_changed = 0;
- /* if the username or server changed, shall not reset the cache */
- if (pfnUnicodeStrcmp((S8*) prof_buff->prof[i].server, (S8*) imps_p->act_prof.server)
- || pfnUnicodeStrcmp((S8*) prof_buff->prof[i].username, (S8*) imps_p->act_prof.username))
- {
- critical_changed = 1;
- }
- memcpy(&imps_p->act_prof, &prof_buff->prof[i], sizeof(mmi_imps_prof_struct));
- if (critical_changed)
- {
- mmi_imps_util_reset_cont_list();
- mmi_imps_util_reset_about_me((void*)prof_buff);
- }
- }
- mmi_imps_util_write_nvram((void*)prof_buff);
- /* update profile name in profile list */
- pfnUnicodeStrcpy((S8*) imps_p->prof_misc->prof_name_list[i], (S8*) prof_buff->prof[i].prof_name);
- mmi_imps_util_disp_popup_done();
- DeleteUptoScrID(SCR_ID_IMPS_PROF_EDIT);
- OslMfree(prof_buff);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_setting_fill_inline_struct
- * DESCRIPTION
- * Fill inline editor structure of profile.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_setting_fill_inline_struct(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_edit_struct *edit_prof = &imps_p->prof_misc->edit_prof;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Yes/No */
- imps_p->prof_misc->yes_no_list[0] = (U8*) GetString(STR_GLOBAL_NO);
- imps_p->prof_misc->yes_no_list[1] = (U8*) GetString(STR_GLOBAL_YES);
- set_leading_zero(FALSE);
- /* Profile Name */
- SetInlineItemActivation(&wgui_inline_items[0], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[0], (U8*) GetString(STR_ID_IMPS_PROF_NAME));
- SetInlineItemActivation(&wgui_inline_items[1], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[1],
- STR_ID_IMPS_PROF_NAME,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) edit_prof->prof_name,
- IMPS_PROF_NAME_LEN,
- INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[1], mmi_imps_hilite_prof_full_edit);
- /* Server */
- #ifdef IMPS_PROF_TEST_CODE
- if (pfnUnicodeStrlen((S8*) edit_prof->server) == 0)
- {
- AnsiiToUnicodeString((S8*) edit_prof->server, (S8*) "http://210.61.82.71:888");
- }
- #else /* IMPS_PROF_TEST_CODE */
- if (pfnUnicodeStrlen((S8*) edit_prof->server) == 0)
- {
- pfnUnicodeStrcpy((S8*) edit_prof->server, (S8*) g_imps_server_prefix);
- }
- #endif /* IMPS_PROF_TEST_CODE */
- SetInlineItemActivation(&wgui_inline_items[2], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[2], (U8*) GetString(STR_ID_IMPS_SERVER));
- SetInlineItemActivation(&wgui_inline_items[3], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[3],
- STR_ID_IMPS_SERVER,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) edit_prof->server,
- IMPS_MAX_SERVER_ADDRESS_LEN,
- INPUT_TYPE_USE_ONLY_ENGLISH_MODES | INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[3], mmi_imps_hilite_prof_full_edit);
- /* User Name */
- if (pfnUnicodeStrlen((S8*) edit_prof->username) == 0)
- {
- pfnUnicodeStrcpy((S8*) edit_prof->username, (S8*) g_imps_wv);
- }
- SetInlineItemActivation(&wgui_inline_items[4], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[4], (U8*) GetString(STR_ID_IMPS_USERNAME));
- SetInlineItemActivation(&wgui_inline_items[5], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[5],
- STR_ID_IMPS_USERNAME,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) edit_prof->username,
- IMPS_MAX_NAME_LEN,
- INPUT_TYPE_USE_ONLY_ENGLISH_MODES | INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[5], mmi_imps_hilite_prof_full_edit);
- SetInlineItemActivation(&wgui_inline_items[6], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[6], (U8*) GetString(STR_ID_IMPS_PASSWD));
- SetInlineItemActivation(&wgui_inline_items[7], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[7],
- STR_ID_IMPS_PASSWD,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) edit_prof->passwd,
- IMPS_MAX_PASSWORD_LEN,
- INPUT_TYPE_USE_ONLY_ENGLISH_MODES | INPUT_TYPE_ALPHANUMERIC_PASSWORD);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[7], mmi_imps_hilite_prof_full_edit);
- /* Auto Login */
- SetInlineItemActivation(&wgui_inline_items[8], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[8], (U8*) GetString(STR_ID_IMPS_AUTO_LOGIN));
- SetInlineItemActivation(&wgui_inline_items[9], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemSelect(&wgui_inline_items[9], 2, imps_p->prof_misc->yes_no_list, &edit_prof->auto_login);
- /* Auto Login */
- SetInlineItemActivation(&wgui_inline_items[10], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[10], (U8*) GetString(STR_ID_IMPS_AUTO_UPDATE));
- SetInlineItemActivation(&wgui_inline_items[11], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemSelect(&wgui_inline_items[11], 2, imps_p->prof_misc->yes_no_list, &edit_prof->auto_update);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_prof_conn
- * DESCRIPTION
- * Pre-entry function for connection setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_prof_conn(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_imps_prof_read_nvram(IMPS_NVRAM_PROF_EDIT);
- mmi_imps_entry_prof_conn();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_prof_conn
- * DESCRIPTION
- * Entry inline editor screen of Connection Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_prof_conn(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U8 *inputBuffer;
- U16 inputBufferSize;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_PROF_SETTING, mmi_imps_exit_prof_conn, NULL, NULL);
- InitializeCategory57Screen();
- mmi_imps_prof_conn_fill_inline_struct();
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_PROF_SETTING);
- inputBuffer = GetCurrNInputBuffer(SCR_ID_IMPS_PROF_SETTING, &inputBufferSize);
- if (inputBuffer != NULL)
- {
- SetCategory57Data(wgui_inline_items, IMPS_INLINE_PROF_CONN, inputBuffer);
- }
- ShowCategory57Screen(
- STR_ID_IMPS_PROF_CONN,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- STR_GLOBAL_EDIT,
- IMG_GLOBAL_BACK,
- STR_GLOBAL_DONE,
- IMG_GLOBAL_BACK,
- IMPS_INLINE_PROF_CONN,
- (U16*) g_imps_inline_icons,
- wgui_inline_items,
- 0,
- guiBuffer);
- SetCategory57RightSoftkeyFunctions(mmi_imps_prof_save, GoBackHistory);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_exit_prof_conn
- * DESCRIPTION
- * Exit function for inlnine editor screen of Connection Setting
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_exit_prof_conn(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_leading_zero(TRUE);
- GenericExitInlineScreen(SCR_ID_IMPS_PROF_SETTING, mmi_imps_entry_prof_conn);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_conn_fill_inline_struct
- * DESCRIPTION
- * Fill inline editor structure of profile.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_conn_fill_inline_struct(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Yes/No */
- imps_p->prof_misc->yes_no_list[0] = (U8*) GetString(STR_GLOBAL_NO);
- imps_p->prof_misc->yes_no_list[1] = (U8*) GetString(STR_GLOBAL_YES);
- /* WAP/HTTP */
- imps_p->prof_misc->wap_http_list[0] = (U8*) GetString(STR_ID_IMPS_HTTP);
- imps_p->prof_misc->wap_http_list[1] = (U8*) GetString(STR_ID_IMPS_WAP);
- set_leading_zero(FALSE);
- /* Data Account */
- SetInlineItemActivation(&wgui_inline_items[0], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[0], (U8*) GetString(STR_ID_IMPS_DATA_ACCT));
- SetInlineItemActivation(&wgui_inline_items[1], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemImageText(
- &wgui_inline_items[1],
- (U8*) imps_p->prof_misc->dt_acct_name,
- (PU8) NULL,
- NULL,
- NULL,
- MAX_DATA_ACCOUNT_NAME_LEN,
- 0,
- 0,
- INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunctionImageText(&wgui_inline_items[1], mmi_imps_prof_list_data_acct);
- ShowAsControl(&wgui_inline_items[1]);
- /* Connection type */
- SetInlineItemActivation(&wgui_inline_items[2], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[2], (U8*) GetString(STR_ID_IMPS_CONN_TYPE));
- SetInlineItemActivation(&wgui_inline_items[3], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemSelect(
- &wgui_inline_items[3],
- 2,
- imps_p->prof_misc->wap_http_list,
- &imps_p->prof_misc->edit_prof.conn_type);
- /* Use proxy */
- SetInlineItemActivation(&wgui_inline_items[4], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[4], (U8*) GetString(STR_ID_IMPS_USE_PROXY));
- SetInlineItemActivation(&wgui_inline_items[5], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemSelect(
- &wgui_inline_items[5],
- 2,
- imps_p->prof_misc->yes_no_list,
- &imps_p->prof_misc->edit_prof.use_proxy);
- /* Proxy server */
- SetInlineItemActivation(&wgui_inline_items[6], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[6], (U8*) GetString(STR_ID_IMPS_PROXY_SERVER));
- SetInlineItemActivation(&wgui_inline_items[7], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemIP4(
- &wgui_inline_items[7],
- (U8*) imps_p->prof_misc->edit_prof.proxy_ip[0],
- (U8*) imps_p->prof_misc->edit_prof.proxy_ip[1],
- (U8*) imps_p->prof_misc->edit_prof.proxy_ip[2],
- (U8*) imps_p->prof_misc->edit_prof.proxy_ip[3],
- mmi_imps_prof_ip_addr_callback);
- SetInlineItemActivation(&wgui_inline_items[8], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[8], (U8*) GetString(STR_ID_IMPS_PROXY_PORT));
- SetInlineItemActivation(&wgui_inline_items[9], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- SetInlineItemTextEdit(
- &wgui_inline_items[9],
- (U8*) imps_p->prof_misc->edit_prof.proxy_port,
- IMPS_PROF_PORT_LEN,
- INPUT_TYPE_NUMERIC);
- RightJustifyInlineItem(&wgui_inline_items[9]);
- EnableInlineItemBoundary(&wgui_inline_items[9]);
- DisableInlineItemHighlight(&wgui_inline_items[9]);
- /* Proxy User Name */
- SetInlineItemActivation(&wgui_inline_items[10], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[10], (U8*) GetString(STR_ID_IMPS_PROXY_USERNAME));
- SetInlineItemActivation(&wgui_inline_items[11], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[11],
- STR_ID_IMPS_USERNAME,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) imps_p->prof_misc->edit_prof.proxy_username,
- IMPS_MAX_NAME_LEN,
- INPUT_TYPE_USE_ONLY_ENGLISH_MODES | INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[11], mmi_imps_hilite_prof_full_edit);
- /* Proxy Password */
- SetInlineItemActivation(&wgui_inline_items[12], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemCaption(&wgui_inline_items[12], (U8*) GetString(STR_ID_IMPS_PROXY_PASSWD));
- SetInlineItemActivation(&wgui_inline_items[13], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[13],
- STR_ID_IMPS_PASSWD,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- (U8*) imps_p->prof_misc->edit_prof.proxy_passwd,
- IMPS_MAX_PASSWORD_LEN,
- INPUT_TYPE_USE_ONLY_ENGLISH_MODES | INPUT_TYPE_ALPHANUMERIC_PASSWORD);
- SetInlineFullScreenEditCustomFunction(&wgui_inline_items[13], mmi_imps_hilite_prof_full_edit);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_ip_addr_callback
- * DESCRIPTION
- * Callback function for IP address editor in inline editor screen
- * PARAMETERS
- * string_buffer [?]
- * IP1 [?]
- * IP2 [?]
- * IP3 [?]
- * IP4 [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_ip_addr_callback(U8 *string_buffer, U8 *IP1, U8 *IP2, U8 *IP3, U8 *IP4)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 Point[4];
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- AnsiiToUnicodeString((S8*) Point, (S8*) ".");
- pfnUnicodeStrcpy((PS8) string_buffer, (PS8) IP1);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) Point);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) IP2);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) Point);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) IP3);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) Point);
- pfnUnicodeStrcat((PS8) string_buffer, (PS8) IP4);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof_full_edit
- * DESCRIPTION
- * Highlight handler of all common full screen eidtor.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_full_edit(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OPTIONS, 0);
- SetLeftSoftkeyFunction(mmi_imps_entry_comm_full_edit_opt, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_comm_full_edit_opt
- * DESCRIPTION
- * Entry common full screen editor in Profile.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_comm_full_edit_opt(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U16 itemList[2];
- U16 nItems;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_COMM_FULL_EDIT_OPT, NULL, mmi_imps_entry_comm_full_edit_opt, NULL);
- SetParentHandler(MENU_ID_IMPS_PROF_EDITOR_OPT);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_COMM_FULL_EDIT_OPT);
- nItems = GetNumOfChild(MENU_ID_IMPS_PROF_EDITOR_OPT);
- GetSequenceStringIds(MENU_ID_IMPS_PROF_EDITOR_OPT, itemList);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- ShowCategory52Screen(
- STR_GLOBAL_OPTIONS,
- GetRootTitleIcon(MENU_ID_IMPS_MAIN),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nItems,
- itemList,
- (PU16) gIndexIconsImageList,
- 0,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_prof_done
- * DESCRIPTION
- * Highlight handler of all common full screen eidtor -> Done option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_prof_done(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(ConfirmInlineFullScreenEdit, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_gprs_dt_callback
- * DESCRIPTION
- * Callback function for GPRS Data Account
- * PARAMETERS
- * index IN highlight index of selected account
- * RETURNS
- * None.
- * GLOBALS AFFECTED
- * None.
- *****************************************************************************/
- void mmi_imps_prof_gprs_dt_callback_(U16 account_id)
- {
- imps_p->prof_misc->edit_prof.curr_dt_acct = (U8)account_id;
- mmi_dtcnt_get_account_name((U8)account_id, (S8*)imps_p->prof_misc->dt_acct_name, MAX_DATA_ACCOUNT_NAME_LEN);
- DeleteUptoScrID(SCR_ID_IMPS_PROF_SETTING);
- GoBackHistory();
- SetInlineListMenuChanged();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_gprs_dt_callback
- * DESCRIPTION
- * Callback function for GPRS Data Account
- * PARAMETERS
- * index [IN] Highlight index of selected account
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_gprs_dt_callback(U16 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* pfnUnicodeStrncpy((S8*)imps_p->prof_misc->dt_acct_name,
- (S8*)g_GPRS_DataAccount[index].DataAccountName,
- MAX_DATA_ACCOUNT_NAME_LEN);
- imps_p->prof_misc->edit_prof.curr_dt_acct = (U8)(index + MAX_DATA_ACCOUNT_GSM_LIMIT);
- DeleteUptoScrID(SCR_ID_IMPS_PROF_SETTING);
- GoBackHistory();
- SetInlineListMenuChanged();*/
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_prof_list_data_acct
- * DESCRIPTION
- * LSK handler of Data Account item in Profile Setting inline editor screen.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_prof_list_data_acct(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_dtcnt_select_account(mmi_imps_prof_gprs_dt_callback_, MENU_ID_IMPS_MAIN, DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_WIFI);
- }
- #define ABOUT_ME_IMPS
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_hilite_about_me
- * DESCRIPTION
- * Hilite handler of Contact List -> About Me option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_hilite_about_me(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- SetLeftSoftkeyFunction(mmi_imps_pre_entry_about_me, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_pre_entry_about_me
- * DESCRIPTION
- * Pre-Entry function of inline editor screen for About Me.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_pre_entry_about_me(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- mmi_imps_nvram_struct *nvram_buff;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* prevent the user from entering when contact list not ready */
- if (!imps_p->gen_info.auto_update_done)
- {
- mmi_imps_util_disp_warning_popup(STR_ID_IMPS_ERR_CONT_NOT_READY);
- return;
- }
- nvram_buff = (mmi_imps_nvram_struct*) OslMalloc(sizeof(mmi_imps_nvram_struct));
- /* read data from NVRAM */
- if (imps_p->about_info == NULL)
- {
- imps_p->about_info = OslMalloc(sizeof(mmi_imps_about_me_struct));
- memset(imps_p->about_info, 0, sizeof(mmi_imps_about_me_struct));
- }
- /* retrieve data from NVRAM */
- mmi_imps_util_read_nvram((void*)nvram_buff);
- /* status */
- imps_p->about_info->status = (S32) nvram_buff->about_me.status;
- imps_p->about_info->mood = (S32) nvram_buff->about_me.mood;
- /* my profile */
- pfnUnicodeStrcpy((S8*) imps_p->about_info->my_prof, (S8*) nvram_buff->about_me.my_prof);
- /* my picture */
- imps_p->about_info->is_pic = (S32) nvram_buff->about_me.is_pic;
- if (imps_p->about_info->is_pic)
- {
- mmi_imps_util_get_img_path((S8*) imps_p->about_info->my_pic);
- pfnUnicodeStrcat((S8*) imps_p->about_info->my_pic, (S8*) IMPS_ABOUT_PIC_PREFIX);
- pfnUnicodeStrcat(
- (S8*) imps_p->about_info->my_pic,
- (S8*) mmi_fmgr_extract_ext_file_name((S8*) nvram_buff->about_me.pic_name));
- pfnUnicodeStrcpy((S8*) imps_p->about_info->file_buff, (S8*) imps_p->about_info->my_pic);
- pfnUnicodeStrcpy((S8*) imps_p->about_info->pic_name, (S8*) nvram_buff->about_me.pic_name);
- }
- OslMfree(nvram_buff);
- mmi_imps_entry_about_me();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_imps_entry_about_me
- * DESCRIPTION
- * Entry inline editor screen for About Me.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_imps_entry_about_me(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U8 *inputBuffer;
- U16 inputBufferSize;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_IMPS_ABOUT_ME_INLINE, mmi_imps_exit_about_me, NULL, NULL);
- InitializeCategory57Screen();
- mmi_imps_about_me_fill_inline_struct();
- guiBuffer = GetCurrGuiBuffer(SCR_ID_IMPS_ABOUT_ME_INLINE);