PoCMain.c
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:227k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  *  PoCMain.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *  MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  This file implements poc main functions
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  ==============================================================
  54.  *              HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  * removed!
  59.  * removed!
  60.  *
  61.  * removed!
  62.  * removed!
  63.  * removed!
  64.  *
  65.  * removed!
  66.  * removed!
  67.  * removed!
  68.  *
  69.  * removed!
  70.  * removed!
  71.  * removed!
  72.  *
  73.  * removed!
  74.  * removed!
  75.  * removed!
  76.  *
  77.  * removed!
  78.  * removed!
  79.  * removed!
  80.  *
  81.  * removed!
  82.  * removed!
  83.  * removed!
  84.  *
  85.  * removed!
  86.  * removed!
  87.  * removed!
  88.  *
  89.  * removed!
  90.  * removed!
  91.  * removed!
  92.  *
  93.  * removed!
  94.  * removed!
  95.  * removed!
  96.  *
  97.  * removed!
  98.  * removed!
  99.  * removed!
  100.  *
  101.  * removed!
  102.  * removed!
  103.  * removed!
  104.  *
  105.  * removed!
  106.  * removed!
  107.  * removed!
  108.  *
  109.  * removed!
  110.  * removed!
  111.  * removed!
  112.  *
  113.  * removed!
  114.  * removed!
  115.  * removed!
  116.  *
  117.  * removed!
  118.  * removed!
  119.  * removed!
  120.  *
  121.  * removed!
  122.  * removed!
  123.  * removed!
  124.  *
  125.  * removed!
  126.  * removed!
  127.  * removed!
  128.  *
  129.  * removed!
  130.  * removed!
  131.  * removed!
  132.  *
  133.  * removed!
  134.  * removed!
  135.  * removed!
  136.  *
  137.  * removed!
  138.  * removed!
  139.  * removed!
  140.  *
  141.  * removed!
  142.  * removed!
  143.  * removed!
  144.  *
  145.  * removed!
  146.  * removed!
  147.  * removed!
  148.  *
  149.  * removed!
  150.  * removed!
  151.  * removed!
  152.  *
  153.  * removed!
  154.  * removed!
  155.  * removed!
  156.  *
  157.  * removed!
  158.  * removed!
  159.  * removed!
  160.  *
  161.  * removed!
  162.  * removed!
  163.  * removed!
  164.  *
  165.  *------------------------------------------------------------------------------
  166.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  167.  *=============================================================
  168.  *******************************************************************************/
  169. #include "MMI_features.h"
  170. #ifdef __MMI_POC__
  171. #ifndef __MTK_TARGET__
  172. #include <Windows.h>
  173. #endif
  174. #include "stdC.h"
  175. #include "L4Dr1.h"
  176. #include "mdi_datatype.h"
  177. #include "DebugInitDef.h"
  178. #include "mmi_trc.h"    /* debug info */
  179. #include "GlobalMenuItems.h"
  180. #include "CustMenuRes.h"
  181. #include "CustDataRes.h"
  182. #include "ProtocolEvents.h"
  183. #include "CommonScreens.h"
  184. #include "EventsGprot.h"
  185. #include "SettingProfile.h"
  186. #include "wgui_categories_popup.h"
  187. #include "wgui_categories_inputs.h"
  188. #include "ProfileGprots.h"
  189. #include "CallSetup.h"
  190. #include "NVRAMEnum.h"
  191. #include "NVRAMProt.h"
  192. #include "NVRAMType.h"
  193. #include "custom_nvram_editor_data_item.h"
  194. #include "custom_data_account.h"
  195. #include "DataAccountGProt.h"
  196. #include "sip_msg_api.h"
  197. #include "sip_ua_api.h"
  198. #include "app2soc_struct.h"
  199. #include "soc_api.h"
  200. #include "app2sip_struct.h"
  201. #include "app2xdm_struct.h"
  202. #include "mmi2poc_struct.h"
  203. #include "custom_poc_config.h"
  204. #include "PoCGprot.h"
  205. #include "PoCProt.h"
  206. #include "CallhistoryEnum.h"
  207. #include "DateTimeGprot.h"
  208. mmi_poc_context_struct g_poc_cntx;  /* global context of poc */
  209. mmi_poc_context_struct *g_poc_cntx_p = &g_poc_cntx;
  210. #ifdef __MMI_POC_ADHOC_STR_INPUT__
  211. U8 g_poc_adhoc_str_disp[POC_AD_HOC_STR_MAX_LEN * 2];
  212. #endif 
  213. const S8 g_poc_three_dot[] = { '.', '', '.', '', '.', '', '', '' };
  214. const S8 g_poc_zero_ip[] = { '0', '', '0', '', '0', '', '', '' };     /* 000 */
  215. /*****************************************************************************
  216.  * FUNCTION
  217.  *  mmi_poc_init
  218.  * DESCRIPTION
  219.  *  Initialize PoC application
  220.  * PARAMETERS
  221.  *  void
  222.  * RETURNS
  223.  *  void
  224.  *****************************************************************************/
  225. void mmi_poc_init(void)
  226. {
  227. #if (0)
  228. /* under construction !*/
  229. /* under construction !*/
  230. /* under construction !*/
  231. /* under construction !*/
  232. /* under construction !*/
  233. /* under construction !*/
  234. /* under construction !*/
  235. /* under construction !*/
  236. /* under construction !*/
  237. /* under construction !*/
  238. /* under construction !*/
  239. /* under construction !*/
  240. /* under construction !*/
  241. /* under construction !*/
  242. /* under construction !*/
  243. /* under construction !*/
  244. /* under construction !*/
  245. /* under construction !*/
  246. /* under construction !*/
  247. /* under construction !*/
  248. /* under construction !*/
  249. /* under construction !*/
  250. /* under construction !*/
  251. /* under construction !*/
  252. /* under construction !*/
  253. /* under construction !*/
  254. /* under construction !*/
  255. /* under construction !*/
  256. /* under construction !*/
  257. /* under construction !*/
  258. /* under construction !*/
  259. /* under construction !*/
  260. #endif /* (0) */ 
  261.     /*----------------------------------------------------------------*/
  262.     /* Code Body                                                      */
  263.     /*----------------------------------------------------------------*/
  264.     memset(&g_poc_cntx, 0, sizeof(g_poc_cntx));
  265.     mmi_poc_init_highlight_hdlr();  /* init highlight handler */
  266.     mmi_poc_init_protocol_hdlr();   /* init protocol event handler */
  267.     poc_custom_set_conference_factory_uri(POC_AD_HOC_STR);
  268.     g_poc_cntx_p->contact_list = custom_mmi_contact_list;
  269.     g_poc_cntx_p->contact_list_disp = custom_mmi_contact_list_disp;
  270.     g_poc_cntx_p->adhoc_sel_disp = custom_mmi_adhoc_sel_disp;
  271.     g_poc_cntx_p->talk_group_list = custom_mmi_talk_group_list;
  272.     g_poc_cntx_p->talk_group_disp.entries = custom_mmi_talk_group_entries;
  273. }
  274. /*****************************************************************************
  275.  * FUNCTION
  276.  *  mmi_poc_init_highlight_hdlr
  277.  * DESCRIPTION
  278.  *  Initialize all highlight handlers
  279.  * PARAMETERS
  280.  *  void
  281.  * RETURNS
  282.  *  void
  283.  *****************************************************************************/
  284. void mmi_poc_init_highlight_hdlr(void)
  285. {
  286.     /*----------------------------------------------------------------*/
  287.     /* Local Variables                                                */
  288.     /*----------------------------------------------------------------*/
  289.     /*----------------------------------------------------------------*/
  290.     /* Code Body                                                      */
  291.     /*----------------------------------------------------------------*/
  292.     /* highlight handler */
  293.     SetHiliteHandler(MENU_ID_POC_STATUS, mmi_poc_highlight_status);
  294.     SetHiliteHandler(MENU_ID_POC_CONTACT, mmi_poc_highlight_contact);
  295.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT, mmi_poc_highlight_contact_opt);
  296.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS, mmi_poc_highlight_contact_opt_settings);
  297.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_MODIFY, mmi_poc_highlight_contact_opt_settings_modify);
  298.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ADD, mmi_poc_highlight_contact_opt_settings_add);
  299.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_DELETE, mmi_poc_highlight_contact_opt_settings_delete);
  300.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO, mmi_poc_highlight_contact_opt_settings_info);
  301.     SetHiliteHandler(
  302.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE,
  303.         mmi_poc_highlight_contact_opt_settings_attributes_allow_invite);
  304.     SetHiliteHandler(
  305.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE_ACCEPT,
  306.         mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_accept);
  307.     SetHiliteHandler(
  308.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE_AUTO,
  309.         mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_auto);
  310.     SetHiliteHandler(
  311.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE_REJECT,
  312.         mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_reject);
  313.     SetHiliteHandler(
  314.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE,
  315.         mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe);
  316.     SetHiliteHandler(
  317.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE_BLOCK,
  318.         mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_block);
  319.     SetHiliteHandler(
  320.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE_POLITE_BLOCK,
  321.         mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_polite_block);
  322.     SetHiliteHandler(
  323.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE_ALLOW,
  324.         mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_allow);
  325.     SetHiliteHandler(
  326.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_PROVIDE_PRES,
  327.         mmi_poc_highlight_contact_opt_settings_attributes_provide_pres);
  328.     SetHiliteHandler(
  329.         MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_SUBSCRIBE_PRES,
  330.         mmi_poc_highlight_contact_opt_settings_attributes_subscribe_pres);
  331.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_SEND_ALERT, mmi_poc_highlight_contact_opt_send_alert);
  332.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_ADHOC_TALK, mmi_poc_highlight_contact_opt_adhoc_talk);
  333.     SetHiliteHandler(MENU_ID_POC_CONTACT_OPT_REFRESH_STATUS, mmi_poc_highlight_contact_opt_refresh_status);
  334.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS, mmi_poc_highlight_talk_groups);
  335.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS_OPT, mmi_poc_highlight_talk_groups_opt);
  336.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS, mmi_poc_highlight_talk_groups_opt_entry_settings);
  337.     SetHiliteHandler(
  338.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ADD,
  339.         mmi_poc_highlight_talk_groups_opt_entry_settings_add);
  340.     SetHiliteHandler(
  341.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ADD_FROM_CONTACT,
  342.         mmi_poc_highlight_talk_groups_opt_entry_settings_add_from_contact);
  343.     SetHiliteHandler(
  344.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_DELETE,
  345.         mmi_poc_highlight_talk_groups_opt_entry_settings_delete);
  346.     SetHiliteHandler(
  347.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_INFO,
  348.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_info);
  349.     SetHiliteHandler(
  350.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_CONF_STATE,
  351.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_conf_state);
  352.     SetHiliteHandler(
  353.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_INVITE_USER_DYNA,
  354.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_invite_user_dyna);
  355.     SetHiliteHandler(
  356.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_JOIN_HANDLING,
  357.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_join_handling);
  358.     SetHiliteHandler(
  359.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_INIT_CONF,
  360.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_init_conf);
  361.     SetHiliteHandler(
  362.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_ANONYMITY,
  363.         mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_anonymity);
  364.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS_OPT_ADD_GROUP, mmi_poc_highlight_talk_groups_opt_add_group);
  365.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS_OPT_DELETE_GROUP, mmi_poc_highlight_talk_groups_opt_delete_group);
  366.     SetHiliteHandler(MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO, mmi_poc_highlight_talk_groups_opt_group_info);
  367.     SetHiliteHandler(
  368.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_CONF_STATE,
  369.         mmi_poc_highlight_talk_groups_info_entry_attributes_conf_state);
  370.     SetHiliteHandler(
  371.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_INVITE_USER_DYNA,
  372.         mmi_poc_highlight_talk_groups_info_entry_attributes_invite_user_dyna);
  373.     SetHiliteHandler(
  374.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_JOIN_HANDLING,
  375.         mmi_poc_highlight_talk_groups_info_entry_attributes_join_handling);
  376.     SetHiliteHandler(
  377.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_INIT_CONF,
  378.         mmi_poc_highlight_talk_groups_info_entry_attributes_init_conf);
  379.     SetHiliteHandler(
  380.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_ANONYMITY,
  381.         mmi_poc_highlight_talk_groups_info_entry_attributes_anonymity);
  382.     SetHiliteHandler(
  383.         MENU_ID_POC_TALK_GROUPS_OPT_CALL_OTHERS_GROUP,
  384.         mmi_poc_highlight_talk_groups_opt_call_others_group);
  385.     SetHiliteHandler(MENU_ID_POC_CALL_HISTORY, mmi_poc_highlight_call_history);
  386.     SetHiliteHandler(MENU_ID_POC_CALL_HISTORY_INFO_VIEW, mmi_poc_highlight_call_history_info);
  387.     SetHiliteHandler(MENU_ID_POC_CALL_HISTORY_INFO_OPTION_DELETE, mmi_poc_highlight_call_history_info_option_delete);
  388.     SetHiliteHandler(
  389.         MENU_ID_POC_CALL_HISTORY_INFO_OPTION_DELETE_ALL,
  390.         mmi_poc_highlight_call_history_info_option_delete_all);
  391. #ifdef __MMI_POC_ETS_TESTCODE__
  392.     SetHiliteHandler(
  393.         MENU_ID_POC_CALL_HISTORY_INFO_OPTION_SEND_FAKE_SESSION,
  394.         mmi_poc_highlight_call_history_rejoin_fake);
  395. #endif /* __MMI_POC_ETS_TESTCODE__ */ 
  396.     SetHiliteHandler(MENU_ID_POC_SETTINGS, mmi_poc_highlight_settings);
  397.     SetHiliteHandler(MENU_ID_POC_SETTINGS_MY_STATUS, mmi_poc_highlight_settings_my_status);
  398.     SetHiliteHandler(MENU_ID_POC_SETTINGS_MY_STATUS_ACTIVITY, mmi_poc_highlight_settings_my_status_activity);
  399.     SetHiliteHandler(MENU_ID_POC_SETTINGS_MY_STATUS_MOOD, mmi_poc_highlight_settings_my_status_mood);
  400.     SetHiliteHandler(MENU_ID_POC_SETTINGS_ANS_MODE, mmi_poc_highlight_settings_ans_mode);
  401.     SetHiliteHandler(MENU_ID_POC_SETTINGS_CALL_BARRING, mmi_poc_highlight_settings_call_barring);
  402.     SetHiliteHandler(MENU_ID_POC_SETTINGS_ALERT_BARRING, mmi_poc_highlight_settings_alert_barring);
  403.     SetHiliteHandler(MENU_ID_POC_SETTINGS_MAO, mmi_poc_highlight_settings_mao);
  404.     SetHiliteHandler(MENU_ID_POC_SETTINGS_PRIVACY, mmi_poc_highlight_settings_privacy);
  405.     SetHiliteHandler(MENU_ID_POC_SETTINGS_PRIVACY_DISABLE, mmi_poc_highlight_settings_privacy_disable);
  406.     SetHiliteHandler(MENU_ID_POC_SETTINGS_PRIVACY_ENABLE, mmi_poc_highlight_settings_privacy_enable);
  407.     SetHiliteHandler(MENU_ID_POC_SETTINGS_START_AT_BOOTUP, mmi_poc_highlight_settings_start_at_bootup);
  408.     SetHiliteHandler(MENU_ID_POC_SETTINGS_USE_XDM, mmi_poc_highlight_settings_use_xdm);
  409.     SetHiliteHandler(MENU_ID_POC_SETTINGS_USE_PRES, mmi_poc_highlight_settings_use_pres);
  410. #ifdef __MMI_POC_ADHOC_STR_INPUT__
  411.     SetHiliteHandler(MENU_ID_POC_SETTINGS_ADHOC_STR, mmi_poc_highlight_settings_adhoc_str);
  412. #endif 
  413.     SetHiliteHandler(MENU_ID_POC_SETTINGS_PROFILES, mmi_poc_highlight_settings_profiles);
  414.     SetHiliteHandler(
  415.         MENU_ID_POC_SETTINGS_PROFILES_OPTION_ACTIVATE,
  416.         mmi_poc_highlight_settings_profiles_option_activate);
  417.     SetHiliteHandler(MENU_ID_POC_SETTINGS_PROFILES_OPTION_EDIT, mmi_poc_highlight_settings_profiles_option_edit);
  418.     SetHiliteHandler(
  419.         MENU_ID_POC_SETTINGS_PROFILES_OPTION_EDIT_POC,
  420.         mmi_poc_highlight_settings_profiles_option_edit_poc);
  421.     SetHiliteHandler(
  422.         MENU_ID_POC_SETTINGS_PROFILES_OPTION_EDIT_CONN,
  423.         mmi_poc_highlight_settings_profiles_option_edit_conn);
  424.     SetHiliteHandler(MENU_ID_POC_CM_ADD_USER, mmi_poc_highlight_cm_add_user);
  425.     SetHiliteHandler(MENU_ID_POC_CM_SUBSCRIBE, mmi_poc_highlight_cm_subscribe);
  426.     SetHiliteHandler(MENU_ID_POC_CM_UNSUBSCRIBE, mmi_poc_highlight_cm_unsubscribe);
  427.     SetHiliteHandler(MENU_ID_POC_CM_TALK_GROUP, mmi_poc_highlight_cm_talk_group);
  428.     /* hint handler */
  429.     SetHintHandler(MENU_ID_POC_STATUS, mmi_poc_hint_status);
  430.     SetHintHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE, mmi_poc_hint_allow_invite);
  431.     SetHintHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE, mmi_poc_hint_allow_subscribe);
  432.     SetHintHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_SUBSCRIBE_PRES, mmi_poc_hint_subscribe_pres);
  433.     SetHintHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO_ACTIVITY, mmi_poc_hint_entry_activity);
  434.     SetHintHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_INFO_MOOD, mmi_poc_hint_entry_mood);
  435.     SetHintHandler(
  436.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_CONF_STATE,
  437.         mmi_poc_hint_talk_group_entry_conf_state);
  438.     SetHintHandler(
  439.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_INVITE_USER_DYNA,
  440.         mmi_poc_hint_talk_group_entry_invite_user_dyna);
  441.     SetHintHandler(
  442.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_JOIN_HANDLING,
  443.         mmi_poc_hint_talk_group_entry_join_handling);
  444.     SetHintHandler(
  445.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_INIT_CONF,
  446.         mmi_poc_hint_talk_group_entry_init_conf);
  447.     SetHintHandler(
  448.         MENU_ID_POC_TALK_GROUPS_OPT_ENTRY_SETTINGS_ENTRY_ATTRIBUTES_ANONYMITY,
  449.         mmi_poc_hint_talk_group_entry_anonymity);
  450.     SetHintHandler(MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_CONF_STATE, mmi_poc_hint_talk_group_conf_state);
  451.     SetHintHandler(
  452.         MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_INVITE_USER_DYNA,
  453.         mmi_poc_hint_talk_group_invite_user_dyna);
  454.     SetHintHandler(MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_JOIN_HANDLING, mmi_poc_hint_talk_group_join_handling);
  455.     SetHintHandler(MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_INIT_CONF, mmi_poc_hint_talk_group_init_conf);
  456.     SetHintHandler(MENU_ID_POC_TALK_GROUPS_OPT_GROUP_INFO_ATTR_ANONYMITY, mmi_poc_hint_talk_group_anonymity);
  457.     SetHintHandler(MENU_ID_POC_SETTINGS_MY_STATUS_ACTIVITY, mmi_poc_hint_my_activity);
  458.     SetHintHandler(MENU_ID_POC_SETTINGS_MY_STATUS_MOOD, mmi_poc_hint_my_mood);
  459.     SetHintHandler(MENU_ID_POC_SETTINGS_ANS_MODE, mmi_poc_hint_ans_mode);
  460.     SetHintHandler(MENU_ID_POC_SETTINGS_CALL_BARRING, mmi_poc_hint_call_barring_mode);
  461.     SetHintHandler(MENU_ID_POC_SETTINGS_ALERT_BARRING, mmi_poc_hint_alert_barring_mode);
  462.     SetHintHandler(MENU_ID_POC_SETTINGS_MAO, mmi_poc_hint_mao_mode);
  463.     SetHintHandler(MENU_ID_POC_SETTINGS_PRIVACY, mmi_poc_hint_privacy_mode);
  464.     SetHintHandler(MENU_ID_POC_SETTINGS_START_AT_BOOTUP, mmi_poc_hint_boot_start);
  465.     SetHintHandler(MENU_ID_POC_SETTINGS_USE_XDM, mmi_poc_hint_use_xdm);
  466.     SetHintHandler(MENU_ID_POC_SETTINGS_USE_PRES, mmi_poc_hint_use_pres);
  467.     SetHintHandler(MENU_ID_POC_SETTINGS_PROFILES, mmi_poc_hint_prof);
  468. }
  469. /*****************************************************************************
  470.  * FUNCTION
  471.  *  mmi_poc_init_protocol_hdlr
  472.  * DESCRIPTION
  473.  *  init all protocol handler
  474.  * PARAMETERS
  475.  *  void
  476.  * RETURNS
  477.  *  void
  478.  *****************************************************************************/
  479. void mmi_poc_init_protocol_hdlr(void)
  480. {
  481.     /*----------------------------------------------------------------*/
  482.     /* Local Variables                                                */
  483.     /*----------------------------------------------------------------*/
  484.     /*----------------------------------------------------------------*/
  485.     /* Code Body                                                      */
  486.     /*----------------------------------------------------------------*/
  487.     SetProtocolEventHandler(mmi_poc_register_ind, PRT_POC_REGISTER_IND);
  488.     SetProtocolEventHandler(mmi_poc_progress_ind, PRT_POC_TALK_PROGRESS_IND);
  489.     SetProtocolEventHandler(mmi_poc_connect_ind, PRT_POC_TALK_CONNECT_IND);
  490.     SetProtocolEventHandler(mmi_poc_ring_ind, PRT_POC_TALK_RING_IND);
  491.     SetProtocolEventHandler(mmi_poc_disconnect_ind, PRT_POC_TALK_DISCONNECT_IND);
  492.     SetProtocolEventHandler(mmi_poc_floor_grant_ind, PRT_POC_FLOOR_GRANT_IND);
  493.     SetProtocolEventHandler(mmi_poc_floor_deny_ind, PRT_POC_FLOOR_DENY_IND);
  494.     SetProtocolEventHandler(mmi_poc_floor_taken_ind, PRT_POC_FLOOR_TAKEN_IND);
  495.     SetProtocolEventHandler(mmi_poc_floor_revoke_ind, PRT_POC_FLOOR_REVOKE_IND);
  496.     SetProtocolEventHandler(mmi_poc_floor_idle_ind, PRT_POC_FLOOR_IDLE_IND);
  497.     SetProtocolEventHandler(mmi_poc_presence_notify_ind, MSG_ID_POC_PRESENCE_NOTIFY_IND);
  498.     SetProtocolEventHandler(mmi_poc_talk_status_notify_ind, MSG_ID_POC_TALK_STATUS_NOTIFY_IND);
  499.     SetProtocolEventHandler(mmi_poc_new_personal_alert_ind, MSG_ID_POC_NEW_PERSONAL_ALERT_IND);
  500.     SetDelScrnIDCallbackHandler(SCR_ID_POC_CM, (HistoryDelCBPtr) mmi_poc_cm_history_del_handler);
  501. }
  502. /*****************************************************************************
  503.  * FUNCTION
  504.  *  mmi_poc_highlight_main
  505.  * DESCRIPTION
  506.  *  Highlight handler of PoC menu
  507.  * PARAMETERS
  508.  *  void
  509.  * RETURNS
  510.  *  void
  511.  *****************************************************************************/
  512. void mmi_poc_highlight_main(void)
  513. {
  514.     /*----------------------------------------------------------------*/
  515.     /* Local Variables                                                */
  516.     /*----------------------------------------------------------------*/
  517.     /*----------------------------------------------------------------*/
  518.     /* Code Body                                                      */
  519.     /*----------------------------------------------------------------*/
  520.     SetLeftSoftkeyFunction(mmi_poc_entry_main_pre, KEY_EVENT_UP);
  521.     SetKeyHandler(mmi_poc_entry_main_pre, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  522.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  523.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  524. }
  525. /*****************************************************************************
  526.  * FUNCTION
  527.  *  mmi_poc_highlight_status
  528.  * DESCRIPTION
  529.  *  Highlight handler of PoC menu
  530.  * PARAMETERS
  531.  *  void
  532.  * RETURNS
  533.  *  void
  534.  *****************************************************************************/
  535. void mmi_poc_highlight_status(void)
  536. {
  537.     /*----------------------------------------------------------------*/
  538.     /* Local Variables                                                */
  539.     /*----------------------------------------------------------------*/
  540.     /*----------------------------------------------------------------*/
  541.     /* Code Body                                                      */
  542.     /*----------------------------------------------------------------*/
  543.     SetLeftSoftkeyFunction(mmi_poc_entry_status, KEY_EVENT_UP);
  544.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  545.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  546.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  547. }
  548. /*****************************************************************************
  549.  * FUNCTION
  550.  *  mmi_poc_highlight_call_history
  551.  * DESCRIPTION
  552.  *  Highlight handler of PoC menu
  553.  * PARAMETERS
  554.  *  void
  555.  * RETURNS
  556.  *  void
  557.  *****************************************************************************/
  558. void mmi_poc_highlight_call_history(void)
  559. {
  560.     /*----------------------------------------------------------------*/
  561.     /* Local Variables                                                */
  562.     /*----------------------------------------------------------------*/
  563.     /*----------------------------------------------------------------*/
  564.     /* Code Body                                                      */
  565.     /*----------------------------------------------------------------*/
  566.     SetLeftSoftkeyFunction(mmi_poc_entry_call_history, KEY_EVENT_UP);
  567.     SetKeyHandler(mmi_poc_entry_call_history, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  568.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  569.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  570. }
  571. /*****************************************************************************
  572.  * FUNCTION
  573.  *  mmi_poc_highlight_call_history_info
  574.  * DESCRIPTION
  575.  *  Highlight handler of PoC menu
  576.  * PARAMETERS
  577.  *  void
  578.  * RETURNS
  579.  *  void
  580.  *****************************************************************************/
  581. void mmi_poc_highlight_call_history_info(void)
  582. {
  583.     /*----------------------------------------------------------------*/
  584.     /* Local Variables                                                */
  585.     /*----------------------------------------------------------------*/
  586.     /*----------------------------------------------------------------*/
  587.     /* Code Body                                                      */
  588.     /*----------------------------------------------------------------*/
  589.     SetLeftSoftkeyFunction(mmi_poc_entry_call_history_info, KEY_EVENT_UP);
  590.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  591. }
  592. /*****************************************************************************
  593.  * FUNCTION
  594.  *  mmi_poc_highlight_call_history_info_option_delete
  595.  * DESCRIPTION
  596.  *  Highlight handler of PoC menu
  597.  * PARAMETERS
  598.  *  void
  599.  * RETURNS
  600.  *  void
  601.  *****************************************************************************/
  602. void mmi_poc_highlight_call_history_info_option_delete(void)
  603. {
  604.     /*----------------------------------------------------------------*/
  605.     /* Local Variables                                                */
  606.     /*----------------------------------------------------------------*/
  607.     /*----------------------------------------------------------------*/
  608.     /* Code Body                                                      */
  609.     /*----------------------------------------------------------------*/
  610.     SetLeftSoftkeyFunction(mmi_poc_call_history_delete_cfrm, KEY_EVENT_UP);
  611.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  612. }
  613. /*****************************************************************************
  614.  * FUNCTION
  615.  *  mmi_poc_highlight_call_history_info_option_delete_all
  616.  * DESCRIPTION
  617.  *  Highlight handler of PoC menu
  618.  * PARAMETERS
  619.  *  void
  620.  * RETURNS
  621.  *  void
  622.  *****************************************************************************/
  623. void mmi_poc_highlight_call_history_info_option_delete_all(void)
  624. {
  625.     /*----------------------------------------------------------------*/
  626.     /* Local Variables                                                */
  627.     /*----------------------------------------------------------------*/
  628.     /*----------------------------------------------------------------*/
  629.     /* Code Body                                                      */
  630.     /*----------------------------------------------------------------*/
  631.     SetLeftSoftkeyFunction(mmi_poc_call_history_delete_all_cfrm, KEY_EVENT_UP);
  632.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  633. }
  634. #ifdef __MMI_POC_ETS_TESTCODE__
  635. /*****************************************************************************
  636.  * FUNCTION
  637.  *  mmi_poc_highlight_call_history_rejoin_fake
  638.  * DESCRIPTION
  639.  *  Highlight handler of PoC menu
  640.  * PARAMETERS
  641.  *  void
  642.  * RETURNS
  643.  *  void
  644.  *****************************************************************************/
  645. void mmi_poc_highlight_call_history_rejoin_fake(void)
  646. {
  647.     /*----------------------------------------------------------------*/
  648.     /* Local Variables                                                */
  649.     /*----------------------------------------------------------------*/
  650.     /*----------------------------------------------------------------*/
  651.     /* Code Body                                                      */
  652.     /*----------------------------------------------------------------*/
  653.     SetLeftSoftkeyFunction(mmi_poc_call_history_rejoin_fake, KEY_EVENT_UP);
  654.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  655. }
  656. #endif /* __MMI_POC_ETS_TESTCODE__ */ 
  657. /*****************************************************************************
  658.  * FUNCTION
  659.  *  mmi_poc_highlight_settings
  660.  * DESCRIPTION
  661.  *  Highlight handler of PoC menu
  662.  * PARAMETERS
  663.  *  void
  664.  * RETURNS
  665.  *  void
  666.  *****************************************************************************/
  667. void mmi_poc_highlight_settings(void)
  668. {
  669.     /*----------------------------------------------------------------*/
  670.     /* Local Variables                                                */
  671.     /*----------------------------------------------------------------*/
  672.     /*----------------------------------------------------------------*/
  673.     /* Code Body                                                      */
  674.     /*----------------------------------------------------------------*/
  675.     SetLeftSoftkeyFunction(mmi_poc_entry_settings, KEY_EVENT_UP);
  676.     SetKeyHandler(mmi_poc_entry_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  677.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  678.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  679. }
  680. /*****************************************************************************
  681.  * FUNCTION
  682.  *  mmi_poc_highlight_settings_my_status
  683.  * DESCRIPTION
  684.  *  Highlight handler of PoC menu
  685.  * PARAMETERS
  686.  *  void
  687.  * RETURNS
  688.  *  void
  689.  *****************************************************************************/
  690. void mmi_poc_highlight_settings_my_status(void)
  691. {
  692.     /*----------------------------------------------------------------*/
  693.     /* Local Variables                                                */
  694.     /*----------------------------------------------------------------*/
  695.     /*----------------------------------------------------------------*/
  696.     /* Code Body                                                      */
  697.     /*----------------------------------------------------------------*/
  698.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_my_status, KEY_EVENT_UP);
  699.     SetKeyHandler(mmi_poc_entry_settings_my_status, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  700.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  701.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  702. }
  703. /*****************************************************************************
  704.  * FUNCTION
  705.  *  mmi_poc_highlight_settings_my_status_activity
  706.  * DESCRIPTION
  707.  *  Highlight handler of PoC menu
  708.  * PARAMETERS
  709.  *  void
  710.  * RETURNS
  711.  *  void
  712.  *****************************************************************************/
  713. void mmi_poc_highlight_settings_my_status_activity(void)
  714. {
  715.     /*----------------------------------------------------------------*/
  716.     /* Local Variables                                                */
  717.     /*----------------------------------------------------------------*/
  718.     /*----------------------------------------------------------------*/
  719.     /* Code Body                                                      */
  720.     /*----------------------------------------------------------------*/
  721.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_my_status_activity, KEY_EVENT_UP);
  722.     SetKeyHandler(mmi_poc_entry_settings_my_status_activity, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  723.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  724.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  725. }
  726. /*****************************************************************************
  727.  * FUNCTION
  728.  *  mmi_poc_highlight_settings_my_status_mood
  729.  * DESCRIPTION
  730.  *  Highlight handler of PoC menu
  731.  * PARAMETERS
  732.  *  void
  733.  * RETURNS
  734.  *  void
  735.  *****************************************************************************/
  736. void mmi_poc_highlight_settings_my_status_mood(void)
  737. {
  738.     /*----------------------------------------------------------------*/
  739.     /* Local Variables                                                */
  740.     /*----------------------------------------------------------------*/
  741.     /*----------------------------------------------------------------*/
  742.     /* Code Body                                                      */
  743.     /*----------------------------------------------------------------*/
  744.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_my_status_mood, KEY_EVENT_UP);
  745.     SetKeyHandler(mmi_poc_entry_settings_my_status_mood, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  746.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  747.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  748. }
  749. /*****************************************************************************
  750.  * FUNCTION
  751.  *  mmi_poc_highlight_settings_ans_mode
  752.  * DESCRIPTION
  753.  *  Highlight handler of PoC menu
  754.  * PARAMETERS
  755.  *  void
  756.  * RETURNS
  757.  *  void
  758.  *****************************************************************************/
  759. void mmi_poc_highlight_settings_ans_mode(void)
  760. {
  761.     /*----------------------------------------------------------------*/
  762.     /* Local Variables                                                */
  763.     /*----------------------------------------------------------------*/
  764.     /*----------------------------------------------------------------*/
  765.     /* Code Body                                                      */
  766.     /*----------------------------------------------------------------*/
  767.     SetLeftSoftkeyFunction(mmi_poc_switch_ans_mode, KEY_EVENT_UP);
  768.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  769.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  770.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  771. }
  772. /*****************************************************************************
  773.  * FUNCTION
  774.  *  mmi_poc_highlight_settings_call_barring
  775.  * DESCRIPTION
  776.  *  Highlight handler of PoC menu
  777.  * PARAMETERS
  778.  *  void
  779.  * RETURNS
  780.  *  void
  781.  *****************************************************************************/
  782. void mmi_poc_highlight_settings_call_barring(void)
  783. {
  784.     /*----------------------------------------------------------------*/
  785.     /* Local Variables                                                */
  786.     /*----------------------------------------------------------------*/
  787.     /*----------------------------------------------------------------*/
  788.     /* Code Body                                                      */
  789.     /*----------------------------------------------------------------*/
  790.     SetLeftSoftkeyFunction(mmi_poc_switch_call_barring_mode, KEY_EVENT_UP);
  791.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  792.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  793.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  794. }
  795. /*****************************************************************************
  796.  * FUNCTION
  797.  *  mmi_poc_highlight_settings_alert_barring
  798.  * DESCRIPTION
  799.  *  Highlight handler of PoC menu
  800.  * PARAMETERS
  801.  *  void
  802.  * RETURNS
  803.  *  void
  804.  *****************************************************************************/
  805. void mmi_poc_highlight_settings_alert_barring(void)
  806. {
  807.     /*----------------------------------------------------------------*/
  808.     /* Local Variables                                                */
  809.     /*----------------------------------------------------------------*/
  810.     /*----------------------------------------------------------------*/
  811.     /* Code Body                                                      */
  812.     /*----------------------------------------------------------------*/
  813.     SetLeftSoftkeyFunction(mmi_poc_switch_alert_barring_mode, KEY_EVENT_UP);
  814.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  815.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  816.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  817. }
  818. /*****************************************************************************
  819.  * FUNCTION
  820.  *  mmi_poc_highlight_settings_mao
  821.  * DESCRIPTION
  822.  *  Highlight handler of PoC menu
  823.  * PARAMETERS
  824.  *  void
  825.  * RETURNS
  826.  *  void
  827.  *****************************************************************************/
  828. void mmi_poc_highlight_settings_mao(void)
  829. {
  830.     /*----------------------------------------------------------------*/
  831.     /* Local Variables                                                */
  832.     /*----------------------------------------------------------------*/
  833.     /*----------------------------------------------------------------*/
  834.     /* Code Body                                                      */
  835.     /*----------------------------------------------------------------*/
  836.     SetLeftSoftkeyFunction(mmi_poc_switch_mao_mode, KEY_EVENT_UP);
  837.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  838.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  839.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  840. }
  841. /*****************************************************************************
  842.  * FUNCTION
  843.  *  mmi_poc_highlight_settings_privacy
  844.  * DESCRIPTION
  845.  *  Highlight handler of PoC menu
  846.  * PARAMETERS
  847.  *  void
  848.  * RETURNS
  849.  *  void
  850.  *****************************************************************************/
  851. void mmi_poc_highlight_settings_privacy(void)
  852. {
  853.     /*----------------------------------------------------------------*/
  854.     /* Local Variables                                                */
  855.     /*----------------------------------------------------------------*/
  856.     /*----------------------------------------------------------------*/
  857.     /* Code Body                                                      */
  858.     /*----------------------------------------------------------------*/
  859.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_privacy, KEY_EVENT_UP);
  860.     SetKeyHandler(mmi_poc_entry_settings_privacy, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  861.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  862.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  863. }
  864. /*****************************************************************************
  865.  * FUNCTION
  866.  *  mmi_poc_highlight_settings_privacy_disable
  867.  * DESCRIPTION
  868.  *  Highlight handler of PoC menu
  869.  * PARAMETERS
  870.  *  void
  871.  * RETURNS
  872.  *  void
  873.  *****************************************************************************/
  874. void mmi_poc_highlight_settings_privacy_disable(void)
  875. {
  876.     /*----------------------------------------------------------------*/
  877.     /* Local Variables                                                */
  878.     /*----------------------------------------------------------------*/
  879.     /*----------------------------------------------------------------*/
  880.     /* Code Body                                                      */
  881.     /*----------------------------------------------------------------*/
  882.     SetLeftSoftkeyFunction(mmi_poc_set_privacy_disable, KEY_EVENT_UP);
  883.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  884.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  885.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  886. }
  887. /*****************************************************************************
  888.  * FUNCTION
  889.  *  mmi_poc_highlight_settings_privacy_enable
  890.  * DESCRIPTION
  891.  *  Highlight handler of PoC menu
  892.  * PARAMETERS
  893.  *  void
  894.  * RETURNS
  895.  *  void
  896.  *****************************************************************************/
  897. void mmi_poc_highlight_settings_privacy_enable(void)
  898. {
  899.     /*----------------------------------------------------------------*/
  900.     /* Local Variables                                                */
  901.     /*----------------------------------------------------------------*/
  902.     /*----------------------------------------------------------------*/
  903.     /* Code Body                                                      */
  904.     /*----------------------------------------------------------------*/
  905.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_privacy_enable, KEY_EVENT_UP);
  906.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  907.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  908.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  909. }
  910. /*****************************************************************************
  911.  * FUNCTION
  912.  *  mmi_poc_highlight_settings_start_at_bootup
  913.  * DESCRIPTION
  914.  *  Highlight handler of PoC menu
  915.  * PARAMETERS
  916.  *  void
  917.  * RETURNS
  918.  *  void
  919.  *****************************************************************************/
  920. void mmi_poc_highlight_settings_start_at_bootup(void)
  921. {
  922.     /*----------------------------------------------------------------*/
  923.     /* Local Variables                                                */
  924.     /*----------------------------------------------------------------*/
  925.     /*----------------------------------------------------------------*/
  926.     /* Code Body                                                      */
  927.     /*----------------------------------------------------------------*/
  928.     SetLeftSoftkeyFunction(mmi_poc_set_start_at_bootup, KEY_EVENT_UP);
  929.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  930.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  931.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  932. }
  933. /*****************************************************************************
  934.  * FUNCTION
  935.  *  mmi_poc_highlight_settings_use_xdm
  936.  * DESCRIPTION
  937.  *  Highlight handler of PoC menu
  938.  * PARAMETERS
  939.  *  void
  940.  * RETURNS
  941.  *  void
  942.  *****************************************************************************/
  943. void mmi_poc_highlight_settings_use_xdm(void)
  944. {
  945.     /*----------------------------------------------------------------*/
  946.     /* Local Variables                                                */
  947.     /*----------------------------------------------------------------*/
  948.     /*----------------------------------------------------------------*/
  949.     /* Code Body                                                      */
  950.     /*----------------------------------------------------------------*/
  951.     SetLeftSoftkeyFunction(mmi_poc_set_xdm_mode, KEY_EVENT_UP);
  952.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  953.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  954.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  955. }
  956. /*****************************************************************************
  957.  * FUNCTION
  958.  *  mmi_poc_highlight_settings_use_pres
  959.  * DESCRIPTION
  960.  *  Highlight handler of PoC menu
  961.  * PARAMETERS
  962.  *  void
  963.  * RETURNS
  964.  *  void
  965.  *****************************************************************************/
  966. void mmi_poc_highlight_settings_use_pres(void)
  967. {
  968.     /*----------------------------------------------------------------*/
  969.     /* Local Variables                                                */
  970.     /*----------------------------------------------------------------*/
  971.     /*----------------------------------------------------------------*/
  972.     /* Code Body                                                      */
  973.     /*----------------------------------------------------------------*/
  974.     SetLeftSoftkeyFunction(mmi_poc_set_pres_mode, KEY_EVENT_UP);
  975.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  976.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  977.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  978. }
  979. #ifdef __MMI_POC_ADHOC_STR_INPUT__
  980. /*****************************************************************************
  981.  * FUNCTION
  982.  *  mmi_poc_highlight_settings_adhoc_str
  983.  * DESCRIPTION
  984.  *  Highlight handler of PoC menu
  985.  * PARAMETERS
  986.  *  void
  987.  * RETURNS
  988.  *  void
  989.  *****************************************************************************/
  990. void mmi_poc_highlight_settings_adhoc_str(void)
  991. {
  992.     /*----------------------------------------------------------------*/
  993.     /* Local Variables                                                */
  994.     /*----------------------------------------------------------------*/
  995.     /*----------------------------------------------------------------*/
  996.     /* Code Body                                                      */
  997.     /*----------------------------------------------------------------*/
  998.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_adhoc_str, KEY_EVENT_UP);
  999.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1000.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1001.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1002. }
  1003. #endif /* __MMI_POC_ADHOC_STR_INPUT__ */ 
  1004. /*****************************************************************************
  1005.  * FUNCTION
  1006.  *  mmi_poc_highlight_settings_profiles
  1007.  * DESCRIPTION
  1008.  *  Highlight handler of PoC menu
  1009.  * PARAMETERS
  1010.  *  void
  1011.  * RETURNS
  1012.  *  void
  1013.  *****************************************************************************/
  1014. void mmi_poc_highlight_settings_profiles(void)
  1015. {
  1016.     /*----------------------------------------------------------------*/
  1017.     /* Local Variables                                                */
  1018.     /*----------------------------------------------------------------*/
  1019.     /*----------------------------------------------------------------*/
  1020.     /* Code Body                                                      */
  1021.     /*----------------------------------------------------------------*/
  1022.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_profiles, KEY_EVENT_UP);
  1023.     SetKeyHandler(mmi_poc_entry_settings_profiles, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1024.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1025.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1026. }
  1027. /*****************************************************************************
  1028.  * FUNCTION
  1029.  *  mmi_poc_highlight_settings_profiles_option_activate
  1030.  * DESCRIPTION
  1031.  *  Highlight handler of PoC menu
  1032.  * PARAMETERS
  1033.  *  void
  1034.  * RETURNS
  1035.  *  void
  1036.  *****************************************************************************/
  1037. void mmi_poc_highlight_settings_profiles_option_activate(void)
  1038. {
  1039.     /*----------------------------------------------------------------*/
  1040.     /* Local Variables                                                */
  1041.     /*----------------------------------------------------------------*/
  1042.     /*----------------------------------------------------------------*/
  1043.     /* Code Body                                                      */
  1044.     /*----------------------------------------------------------------*/
  1045.     SetLeftSoftkeyFunction(mmi_poc_set_activate_profile, KEY_EVENT_UP);
  1046.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1047.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1048.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1049. }
  1050. /*****************************************************************************
  1051.  * FUNCTION
  1052.  *  mmi_poc_highlight_settings_profiles_option_edit
  1053.  * DESCRIPTION
  1054.  *  Highlight handler of PoC menu
  1055.  * PARAMETERS
  1056.  *  void
  1057.  * RETURNS
  1058.  *  void
  1059.  *****************************************************************************/
  1060. void mmi_poc_highlight_settings_profiles_option_edit(void)
  1061. {
  1062.     /*----------------------------------------------------------------*/
  1063.     /* Local Variables                                                */
  1064.     /*----------------------------------------------------------------*/
  1065.     /*----------------------------------------------------------------*/
  1066.     /* Code Body                                                      */
  1067.     /*----------------------------------------------------------------*/
  1068.     SetLeftSoftkeyFunction(mmi_poc_entry_setting_prof_edit_pre, KEY_EVENT_UP);
  1069.     SetKeyHandler(mmi_poc_entry_setting_prof_edit_pre, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1070.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1071.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1072. }
  1073. /*****************************************************************************
  1074.  * FUNCTION
  1075.  *  mmi_poc_highlight_settings_profiles_option_edit_poc
  1076.  * DESCRIPTION
  1077.  *  Highlight handler of PoC menu
  1078.  * PARAMETERS
  1079.  *  void
  1080.  * RETURNS
  1081.  *  void
  1082.  *****************************************************************************/
  1083. void mmi_poc_highlight_settings_profiles_option_edit_poc(void)
  1084. {
  1085.     /*----------------------------------------------------------------*/
  1086.     /* Local Variables                                                */
  1087.     /*----------------------------------------------------------------*/
  1088.     /*----------------------------------------------------------------*/
  1089.     /* Code Body                                                      */
  1090.     /*----------------------------------------------------------------*/
  1091.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_profiles_option_edit_poc, KEY_EVENT_UP);
  1092.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1093.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1094.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1095. }
  1096. /*****************************************************************************
  1097.  * FUNCTION
  1098.  *  mmi_poc_highlight_settings_profiles_option_edit_conn
  1099.  * DESCRIPTION
  1100.  *  Highlight handler of PoC menu
  1101.  * PARAMETERS
  1102.  *  void
  1103.  * RETURNS
  1104.  *  void
  1105.  *****************************************************************************/
  1106. void mmi_poc_highlight_settings_profiles_option_edit_conn(void)
  1107. {
  1108.     /*----------------------------------------------------------------*/
  1109.     /* Local Variables                                                */
  1110.     /*----------------------------------------------------------------*/
  1111.     /*----------------------------------------------------------------*/
  1112.     /* Code Body                                                      */
  1113.     /*----------------------------------------------------------------*/
  1114.     SetLeftSoftkeyFunction(mmi_poc_entry_settings_profiles_option_edit_conn, KEY_EVENT_UP);
  1115.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1116.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1117.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1118. }
  1119. /*****************************************************************************
  1120.  * FUNCTION
  1121.  *  mmi_poc_hint_status
  1122.  * DESCRIPTION
  1123.  *  Hint handler of PoC menu
  1124.  * PARAMETERS
  1125.  *  index       [IN]        Current selected index
  1126.  * RETURNS
  1127.  *  void
  1128.  *****************************************************************************/
  1129. void mmi_poc_hint_status(U16 index)
  1130. {
  1131.     /*----------------------------------------------------------------*/
  1132.     /* Local Variables                                                */
  1133.     /*----------------------------------------------------------------*/
  1134.     /*----------------------------------------------------------------*/
  1135.     /* Code Body                                                      */
  1136.     /*----------------------------------------------------------------*/
  1137.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1138.     switch (g_poc_cntx_p->curr_reg_state)
  1139.     {
  1140.         case POC_REG_NONE:
  1141.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1142.             break;
  1143.         case POC_REG_REGED:
  1144.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1145.             break;
  1146.         case POC_REG_REGING:
  1147.         case POC_REG_DEREGING:
  1148.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_PROCESSING));
  1149.             break;
  1150.         default:
  1151.             break;
  1152.     }
  1153. }
  1154. /*****************************************************************************
  1155.  * FUNCTION
  1156.  *  mmi_poc_hint_my_activity
  1157.  * DESCRIPTION
  1158.  *  Hint handler of PoC menu
  1159.  * PARAMETERS
  1160.  *  index       [IN]        Current selected index
  1161.  * RETURNS
  1162.  *  void
  1163.  *****************************************************************************/
  1164. void mmi_poc_hint_my_activity(U16 index)
  1165. {
  1166.     /*----------------------------------------------------------------*/
  1167.     /* Local Variables                                                */
  1168.     /*----------------------------------------------------------------*/
  1169.     /*----------------------------------------------------------------*/
  1170.     /* Code Body                                                      */
  1171.     /*----------------------------------------------------------------*/
  1172.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1173.     if (g_poc_cntx_p->person_pres.activity_present == MMI_TRUE)
  1174.     {
  1175.         switch (g_poc_cntx_p->person_pres.activity)
  1176.         {
  1177.             case POC_ACTIVITY_AWAY:
  1178.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_AWAY));
  1179.                 break;
  1180.             case POC_ACTIVITY_APPOINTMENT:
  1181.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_APPOINTMENT));
  1182.                 break;
  1183.             case POC_ACTIVITY_BUSY:
  1184.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_BUSY));
  1185.                 break;
  1186.             default:
  1187.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1188.                 break;
  1189.         }
  1190.     }
  1191.     else
  1192.     {
  1193.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1194.     }
  1195. }
  1196. /*****************************************************************************
  1197.  * FUNCTION
  1198.  *  mmi_poc_hint_my_mood
  1199.  * DESCRIPTION
  1200.  *  Hint handler of PoC menu
  1201.  * PARAMETERS
  1202.  *  index       [IN]        Current selected index
  1203.  * RETURNS
  1204.  *  void
  1205.  *****************************************************************************/
  1206. void mmi_poc_hint_my_mood(U16 index)
  1207. {
  1208.     /*----------------------------------------------------------------*/
  1209.     /* Local Variables                                                */
  1210.     /*----------------------------------------------------------------*/
  1211.     /*----------------------------------------------------------------*/
  1212.     /* Code Body                                                      */
  1213.     /*----------------------------------------------------------------*/
  1214.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1215.     if (g_poc_cntx_p->person_pres.mood_present == MMI_TRUE)
  1216.     {
  1217.         switch (g_poc_cntx_p->person_pres.mood)
  1218.         {
  1219.             case POC_MOOD_HAPPY:
  1220.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_HAPPY));
  1221.                 break;
  1222.             case POC_MOOD_BORED:
  1223.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_BORED));
  1224.                 break;
  1225.             case POC_MOOD_DEPRESSED:
  1226.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_DEPRESSED));
  1227.                 break;
  1228.             default:
  1229.                 pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1230.                 break;
  1231.         }
  1232.     }
  1233.     else
  1234.     {
  1235.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1236.     }
  1237. }
  1238. /*****************************************************************************
  1239.  * FUNCTION
  1240.  *  mmi_poc_hint_ans_mode
  1241.  * DESCRIPTION
  1242.  *  Hint handler of PoC menu
  1243.  * PARAMETERS
  1244.  *  index       [IN]        Current selected index
  1245.  * RETURNS
  1246.  *  void
  1247.  *****************************************************************************/
  1248. void mmi_poc_hint_ans_mode(U16 index)
  1249. {
  1250.     /*----------------------------------------------------------------*/
  1251.     /* Local Variables                                                */
  1252.     /*----------------------------------------------------------------*/
  1253.     /*----------------------------------------------------------------*/
  1254.     /* Code Body                                                      */
  1255.     /*----------------------------------------------------------------*/
  1256.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1257.     if (g_poc_cntx_p->curr_ans_mode == MMI_TRUE)
  1258.     {
  1259.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_AUTO_ANS));
  1260.     }
  1261.     else
  1262.     {
  1263.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_MANUAL_ANS));
  1264.     }
  1265. }
  1266. /*****************************************************************************
  1267.  * FUNCTION
  1268.  *  mmi_poc_hint_call_barring_mode
  1269.  * DESCRIPTION
  1270.  *  Hint handler of PoC menu
  1271.  * PARAMETERS
  1272.  *  index       [IN]        Current selected index
  1273.  * RETURNS
  1274.  *  void
  1275.  *****************************************************************************/
  1276. void mmi_poc_hint_call_barring_mode(U16 index)
  1277. {
  1278.     /*----------------------------------------------------------------*/
  1279.     /* Local Variables                                                */
  1280.     /*----------------------------------------------------------------*/
  1281.     /*----------------------------------------------------------------*/
  1282.     /* Code Body                                                      */
  1283.     /*----------------------------------------------------------------*/
  1284.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1285.     if (g_poc_cntx_p->curr_call_bar_mode)
  1286.     {
  1287.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1288.     }
  1289.     else
  1290.     {
  1291.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1292.     }
  1293. }
  1294. /*****************************************************************************
  1295.  * FUNCTION
  1296.  *  mmi_poc_hint_alert_barring_mode
  1297.  * DESCRIPTION
  1298.  *  Hint handler of PoC menu
  1299.  * PARAMETERS
  1300.  *  index       [IN]        Current selected index
  1301.  * RETURNS
  1302.  *  void
  1303.  *****************************************************************************/
  1304. void mmi_poc_hint_alert_barring_mode(U16 index)
  1305. {
  1306.     /*----------------------------------------------------------------*/
  1307.     /* Local Variables                                                */
  1308.     /*----------------------------------------------------------------*/
  1309.     /*----------------------------------------------------------------*/
  1310.     /* Code Body                                                      */
  1311.     /*----------------------------------------------------------------*/
  1312.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1313.     if (g_poc_cntx_p->curr_alert_bar_mode)
  1314.     {
  1315.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1316.     }
  1317.     else
  1318.     {
  1319.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1320.     }
  1321. }
  1322. /*****************************************************************************
  1323.  * FUNCTION
  1324.  *  mmi_poc_hint_mao_mode
  1325.  * DESCRIPTION
  1326.  *  Hint handler of PoC menu
  1327.  * PARAMETERS
  1328.  *  index       [IN]        Current selected index
  1329.  * RETURNS
  1330.  *  void
  1331.  *****************************************************************************/
  1332. void mmi_poc_hint_mao_mode(U16 index)
  1333. {
  1334.     /*----------------------------------------------------------------*/
  1335.     /* Local Variables                                                */
  1336.     /*----------------------------------------------------------------*/
  1337.     /*----------------------------------------------------------------*/
  1338.     /* Code Body                                                      */
  1339.     /*----------------------------------------------------------------*/
  1340.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1341.     if (g_poc_cntx_p->curr_mao_mode)
  1342.     {
  1343.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1344.     }
  1345.     else
  1346.     {
  1347.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1348.     }
  1349. }
  1350. /*****************************************************************************
  1351.  * FUNCTION
  1352.  *  mmi_poc_hint_privacy_mode
  1353.  * DESCRIPTION
  1354.  *  Hint handler of PoC menu
  1355.  * PARAMETERS
  1356.  *  index       [IN]        Current selected index
  1357.  * RETURNS
  1358.  *  void
  1359.  *****************************************************************************/
  1360. void mmi_poc_hint_privacy_mode(U16 index)
  1361. {
  1362.     /*----------------------------------------------------------------*/
  1363.     /* Local Variables                                                */
  1364.     /*----------------------------------------------------------------*/
  1365.     /*----------------------------------------------------------------*/
  1366.     /* Code Body                                                      */
  1367.     /*----------------------------------------------------------------*/
  1368.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1369.     if (g_poc_cntx_p->curr_privacy_mode)
  1370.     {
  1371.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1372.     }
  1373.     else
  1374.     {
  1375.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1376.     }
  1377. }
  1378. /*****************************************************************************
  1379.  * FUNCTION
  1380.  *  mmi_poc_hint_boot_start
  1381.  * DESCRIPTION
  1382.  *  Hint handler of PoC menu
  1383.  * PARAMETERS
  1384.  *  index       [IN]        Current selected index
  1385.  * RETURNS
  1386.  *  void
  1387.  *****************************************************************************/
  1388. void mmi_poc_hint_boot_start(U16 index)
  1389. {
  1390.     /*----------------------------------------------------------------*/
  1391.     /* Local Variables                                                */
  1392.     /*----------------------------------------------------------------*/
  1393.     /*----------------------------------------------------------------*/
  1394.     /* Code Body                                                      */
  1395.     /*----------------------------------------------------------------*/
  1396.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1397.     if (g_poc_cntx_p->curr_boot_start_mode)
  1398.     {
  1399.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1400.     }
  1401.     else
  1402.     {
  1403.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1404.     }
  1405. }
  1406. /*****************************************************************************
  1407.  * FUNCTION
  1408.  *  mmi_poc_hint_use_xdm
  1409.  * DESCRIPTION
  1410.  *  Hint handler of PoC menu
  1411.  * PARAMETERS
  1412.  *  index       [IN]        Current selected index
  1413.  * RETURNS
  1414.  *  void
  1415.  *****************************************************************************/
  1416. void mmi_poc_hint_use_xdm(U16 index)
  1417. {
  1418.     /*----------------------------------------------------------------*/
  1419.     /* Local Variables                                                */
  1420.     /*----------------------------------------------------------------*/
  1421.     /*----------------------------------------------------------------*/
  1422.     /* Code Body                                                      */
  1423.     /*----------------------------------------------------------------*/
  1424.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1425.     if (g_poc_cntx_p->curr_use_xdm_mode)
  1426.     {
  1427.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1428.     }
  1429.     else
  1430.     {
  1431.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1432.     }
  1433. }
  1434. /*****************************************************************************
  1435.  * FUNCTION
  1436.  *  mmi_poc_hint_use_pres
  1437.  * DESCRIPTION
  1438.  *  Hint handler of PoC menu
  1439.  * PARAMETERS
  1440.  *  index       [IN]        Current selected index
  1441.  * RETURNS
  1442.  *  void
  1443.  *****************************************************************************/
  1444. void mmi_poc_hint_use_pres(U16 index)
  1445. {
  1446.     /*----------------------------------------------------------------*/
  1447.     /* Local Variables                                                */
  1448.     /*----------------------------------------------------------------*/
  1449.     /*----------------------------------------------------------------*/
  1450.     /* Code Body                                                      */
  1451.     /*----------------------------------------------------------------*/
  1452.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1453.     if (g_poc_cntx_p->curr_use_pres_mode)
  1454.     {
  1455.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1456.     }
  1457.     else
  1458.     {
  1459.         pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1460.     }
  1461. }
  1462. /*****************************************************************************
  1463.  * FUNCTION
  1464.  *  mmi_poc_hint_prof
  1465.  * DESCRIPTION
  1466.  *  Hint handler of PoC menu
  1467.  * PARAMETERS
  1468.  *  index       [IN]        Current selected index
  1469.  * RETURNS
  1470.  *  void
  1471.  *****************************************************************************/
  1472. void mmi_poc_hint_prof(U16 index)
  1473. {
  1474.     /*----------------------------------------------------------------*/
  1475.     /* Local Variables                                                */
  1476.     /*----------------------------------------------------------------*/
  1477.     U8 i;
  1478.     mmi_poc_profile_struct temp_profile;
  1479.     S16 error;
  1480.     /*----------------------------------------------------------------*/
  1481.     /* Code Body                                                      */
  1482.     /*----------------------------------------------------------------*/
  1483.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1484.     for (i = 0; i < POC_MAX_PROFILE_NUM; i++)
  1485.     {
  1486.         ReadRecord(NVRAM_EF_POC_PROFILE_LID, (U8) (i + 1), &temp_profile, NVRAM_MAX_POC_PROFILE_SIZE, &error);
  1487.         if (temp_profile.prof_name[0] == 0xFF)
  1488.         {
  1489.             memset(&g_poc_cntx_p->profile_list[i], 0, sizeof(g_poc_cntx_p->profile_list[i]));
  1490.             pfnUnicodeStrcpy(
  1491.                 (PS8) g_poc_cntx_p->profile_list[i].prof_name,
  1492.                 (PS8) GetString((U16) (STR_ID_POC_PROFILE_1 + i)));
  1493.         }
  1494.     }
  1495.     if (UCS2Strlen((S8*) g_poc_cntx_p->profile_list[g_poc_cntx_p->profile_active].prof_name) > 0)
  1496.     {
  1497.         memcpy(
  1498.             hintData[index],
  1499.             g_poc_cntx_p->profile_list[g_poc_cntx_p->profile_active].prof_name,
  1500.             sizeof(g_poc_cntx_p->profile_list[g_poc_cntx_p->profile_active].prof_name));
  1501.     }
  1502.     else
  1503.     {
  1504.         pfnUnicodeStrcpy(
  1505.             (S8*) hintData[index],
  1506.             (PS8) GetString((U16) (STR_ID_POC_PROFILE_1 + g_poc_cntx_p->profile_active)));
  1507.     }
  1508. }
  1509. /*****************************************************************************
  1510.  * FUNCTION
  1511.  *  mmi_poc_entry_main_pre
  1512.  * DESCRIPTION
  1513.  *  entry poc main
  1514.  * PARAMETERS
  1515.  *  void
  1516.  * RETURNS
  1517.  *  void
  1518.  *****************************************************************************/
  1519. void mmi_poc_entry_main_pre(void)
  1520. {
  1521.     /*----------------------------------------------------------------*/
  1522.     /* Local Variables                                                */
  1523.     /*----------------------------------------------------------------*/
  1524.     /*----------------------------------------------------------------*/
  1525.     /* Code Body                                                      */
  1526.     /*----------------------------------------------------------------*/
  1527.     mmi_poc_init_prof_setting_check(mmi_poc_entry_main);
  1528. }
  1529. /*****************************************************************************
  1530.  * FUNCTION
  1531.  *  mmi_poc_init_prof_setting_check
  1532.  * DESCRIPTION
  1533.  *  check for profile ready
  1534.  * PARAMETERS
  1535.  *  ready_callback      [IN]        
  1536.  * RETURNS
  1537.  *  void
  1538.  *****************************************************************************/
  1539. void mmi_poc_init_prof_setting_check(FuncPtr ready_callback)
  1540. {
  1541.     /*----------------------------------------------------------------*/
  1542.     /* Local Variables                                                */
  1543.     /*----------------------------------------------------------------*/
  1544.     S16 error;
  1545.     U8 i;
  1546.     mmi_poc_profile_struct temp_profile;
  1547.     mmi_poc_history_struct temp_history;
  1548.     poc_addr_struct temp_privacy;
  1549.     static U8 prof_setting_ready = 0;
  1550.     U8 data;
  1551.     /*----------------------------------------------------------------*/
  1552.     /* Code Body                                                      */
  1553.     /*----------------------------------------------------------------*/
  1554.     if (prof_setting_ready == 0)
  1555.     {
  1556.         /* Initiate History */
  1557.         ReadRecord(NVRAM_EF_POC_HISTORY_LID, 1, &temp_history, NVRAM_MAX_POC_HISTORY_SIZE, &error);
  1558.         if (temp_history.no_entries == 0xFF)
  1559.         {
  1560.             memset(&g_poc_cntx_p->history, 0, sizeof(g_poc_cntx_p->history));
  1561.         }
  1562.         else
  1563.         {
  1564.             memcpy(&g_poc_cntx_p->history, &temp_history, sizeof(g_poc_cntx_p->history));
  1565.         }
  1566.         /* Initiate Profile */
  1567.         for (i = 0; i < POC_MAX_PROFILE_NUM; i++)
  1568.         {
  1569.             ReadRecord(NVRAM_EF_POC_PROFILE_LID, (U8) (i + 1), &temp_profile, NVRAM_MAX_POC_PROFILE_SIZE, &error);
  1570.             if (temp_profile.prof_name[0] == 0xFF)
  1571.             {
  1572.                 memset(&g_poc_cntx_p->profile_list[i], 0, sizeof(g_poc_cntx_p->profile_list[i]));
  1573.                 g_poc_cntx_p->profile_list[i].data_account = mmi_dtcnt_get_first_account_id(DATA_ACCOUNT_BEARER_GPRS | DATA_ACCOUNT_BEARER_WIFI);
  1574.                 pfnUnicodeStrcpy(
  1575.                     (PS8) g_poc_cntx_p->profile_list[i].prof_name,
  1576.                     (PS8) GetString((U16) (STR_ID_POC_PROFILE_1 + i)));
  1577.             }
  1578.             else
  1579.             {
  1580.                 if (UCS2Strlen((S8*) temp_profile.prof_name) > 0)
  1581.                 {
  1582.                     memcpy(
  1583.                         g_poc_cntx_p->profile_list[i].prof_name,
  1584.                         temp_profile.prof_name,
  1585.                         sizeof(temp_profile.prof_name));
  1586.                 }
  1587.                 else
  1588.                 {
  1589.                     pfnUnicodeStrcpy(
  1590.                         (PS8) g_poc_cntx_p->profile_list[i].prof_name,
  1591.                         (PS8) GetString((U16) (STR_ID_POC_PROFILE_1 + i)));
  1592.                 }
  1593.                 memcpy(g_poc_cntx_p->profile_list[i].disp_name, temp_profile.disp_name, sizeof(temp_profile.disp_name));
  1594.                 g_poc_cntx_p->profile_list[i].disp_charset = temp_profile.disp_charset;
  1595.                 memcpy(g_poc_cntx_p->profile_list[i].uri, temp_profile.uri, sizeof(temp_profile.uri));
  1596.                 memcpy(g_poc_cntx_p->profile_list[i].password, temp_profile.password, sizeof(temp_profile.password));
  1597.                 memcpy(g_poc_cntx_p->profile_list[i].poc_addr, temp_profile.poc_addr, sizeof(temp_profile.poc_addr));
  1598.                 g_poc_cntx_p->profile_list[i].poc_port = temp_profile.poc_port;
  1599.                 memcpy(g_poc_cntx_p->profile_list[i].xdm_addr, temp_profile.xdm_addr, sizeof(temp_profile.xdm_addr));
  1600.                 g_poc_cntx_p->profile_list[i].data_account = temp_profile.data_account;
  1601.                 g_poc_cntx_p->profile_list[i].use_proxy = temp_profile.use_proxy;
  1602.                 memcpy(
  1603.                     g_poc_cntx_p->profile_list[i].proxy_username,
  1604.                     temp_profile.proxy_username,
  1605.                     sizeof(temp_profile.proxy_username));
  1606.                 memcpy(
  1607.                     g_poc_cntx_p->profile_list[i].proxy_password,
  1608.                     temp_profile.proxy_password,
  1609.                     sizeof(temp_profile.proxy_password));
  1610.                 memcpy(g_poc_cntx_p->profile_list[i].proxy_ip, temp_profile.proxy_ip, sizeof(temp_profile.proxy_ip));
  1611.                 g_poc_cntx_p->profile_list[i].proxy_port = temp_profile.proxy_port;
  1612.                 g_poc_cntx_p->profile_list[i].proxy_port = temp_profile.proxy_port;
  1613.                 g_poc_cntx_p->profile_list[i].data_account = temp_profile.data_account;
  1614.             }
  1615.         }
  1616.         memset(&g_poc_cntx_p->person_pres, 0, sizeof(mmi_poc_person_pinfo_struct));
  1617.         ReadValue(NVRAM_POC_ACTIVITY_PRESENT, &data, DS_BYTE, &error);
  1618.         if (data == 0xFF)
  1619.         {
  1620.             data = 0;
  1621.             WriteValue(NVRAM_POC_ACTIVITY_PRESENT, &data, DS_BYTE, &error);
  1622.         }
  1623.         g_poc_cntx_p->person_pres.activity_present = data;
  1624.         ReadValue(NVRAM_POC_ACTIVITY, &data, DS_BYTE, &error);
  1625.         if (data == 0xFF)
  1626.         {
  1627.             data = 0;
  1628.             WriteValue(NVRAM_POC_ACTIVITY, &data, DS_BYTE, &error);
  1629.         }
  1630.         g_poc_cntx_p->person_pres.activity = data;
  1631.         ReadValue(NVRAM_POC_MOOD_PRESENT, &data, DS_BYTE, &error);
  1632.         if (data == 0xFF)
  1633.         {
  1634.             data = 0;
  1635.             WriteValue(NVRAM_POC_MOOD_PRESENT, &data, DS_BYTE, &error);
  1636.         }
  1637.         g_poc_cntx_p->person_pres.mood_present = data;
  1638.         ReadValue(NVRAM_POC_MOOD, &data, DS_BYTE, &error);
  1639.         if (data == 0xFF)
  1640.         {
  1641.             data = 0;
  1642.             WriteValue(NVRAM_POC_MOOD, &data, DS_BYTE, &error);
  1643.         }
  1644.         g_poc_cntx_p->person_pres.mood = data;
  1645.         ReadValue(NVRAM_POC_ANS_MODE, &data, DS_BYTE, &error);
  1646.         if (data == 0xFF)
  1647.         {
  1648.             data = 1;
  1649.             WriteValue(NVRAM_POC_ANS_MODE, &data, DS_BYTE, &error);
  1650.         }
  1651.         g_poc_cntx_p->curr_ans_mode = data;
  1652.         ReadValue(NVRAM_POC_CALL_BAR_MODE, &data, DS_BYTE, &error);
  1653.         if (data == 0xFF)
  1654.         {
  1655.             data = 0;
  1656.             WriteValue(NVRAM_POC_CALL_BAR_MODE, &data, DS_BYTE, &error);
  1657.         }
  1658.         g_poc_cntx_p->curr_call_bar_mode = data;
  1659.         ReadValue(NVRAM_POC_ALERT_BAR_MODE, &data, DS_BYTE, &error);
  1660.         if (data == 0xFF)
  1661.         {
  1662.             data = 0;
  1663.             WriteValue(NVRAM_POC_ALERT_BAR_MODE, &data, DS_BYTE, &error);
  1664.         }
  1665.         g_poc_cntx_p->curr_alert_bar_mode = data;
  1666.         ReadValue(NVRAM_POC_MAO_MODE, &data, DS_BYTE, &error);
  1667.         if (data == 0xFF)
  1668.         {
  1669.             data = 0;
  1670.             WriteValue(NVRAM_POC_MAO_MODE, &data, DS_BYTE, &error);
  1671.         }
  1672.         g_poc_cntx_p->curr_mao_mode = data;
  1673.         ReadValue(NVRAM_POC_PRIVACY_MODE, &data, DS_BYTE, &error);
  1674.         if (data == 0xFF)
  1675.         {
  1676.             data = 0;
  1677.             WriteValue(NVRAM_POC_PRIVACY_MODE, &data, DS_BYTE, &error);
  1678.         }
  1679.         g_poc_cntx_p->curr_privacy_mode = data;
  1680.         ReadRecord(NVRAM_EF_POC_PRIVACY_LID, 1, &temp_privacy, NVRAM_MAX_POC_PRIVACY_SIZE, &error);
  1681.         if (((U8) temp_privacy.disp_name[0]) == 0xFF)
  1682.         {
  1683.             memset(&g_poc_cntx_p->privacy_addr, 0, sizeof(g_poc_cntx_p->privacy_addr));
  1684.         }
  1685.         else
  1686.         {
  1687.             memcpy(&g_poc_cntx_p->privacy_addr, &temp_privacy, sizeof(g_poc_cntx_p->privacy_addr));
  1688.         }
  1689.         ReadValue(NVRAM_POC_START_BOOTUP, &data, DS_BYTE, &error);
  1690.         if (data == 0xFF)
  1691.         {
  1692.             data = 0;
  1693.             WriteValue(NVRAM_POC_START_BOOTUP, &data, DS_BYTE, &error);
  1694.         }
  1695.         g_poc_cntx_p->curr_boot_start_mode = data;
  1696.         ReadValue(NVRAM_POC_USE_XDM, &data, DS_BYTE, &error);
  1697.         if (data == 0xFF)
  1698.         {
  1699.             data = 1;
  1700.             WriteValue(NVRAM_POC_USE_XDM, &data, DS_BYTE, &error);
  1701.         }
  1702.         g_poc_cntx_p->curr_use_xdm_mode = data;
  1703.         ReadValue(NVRAM_POC_USE_PRES, &data, DS_BYTE, &error);
  1704.         if (data == 0xFF)
  1705.         {
  1706.             data = 1;
  1707.             WriteValue(NVRAM_POC_USE_PRES, &data, DS_BYTE, &error);
  1708.         }
  1709.         g_poc_cntx_p->curr_use_pres_mode = data;
  1710.         ReadValue(NVRAM_POC_PROFILE_ACTIVE, &data, DS_BYTE, &error);
  1711.         if (data == 0xFF)
  1712.         {
  1713.             data = 0;
  1714.             WriteValue(NVRAM_POC_PROFILE_ACTIVE, &data, DS_BYTE, &error);
  1715.         }
  1716.         g_poc_cntx_p->profile_active = data;
  1717.         prof_setting_ready = 1;
  1718.     }
  1719.     if (ready_callback != NULL)
  1720.     {
  1721.         ready_callback();
  1722.     }
  1723. }
  1724. /*****************************************************************************
  1725.  * FUNCTION
  1726.  *  mmi_poc_entry_main
  1727.  * DESCRIPTION
  1728.  *  poc main screen
  1729.  * PARAMETERS
  1730.  *  void
  1731.  * RETURNS
  1732.  *  void
  1733.  *****************************************************************************/
  1734. void mmi_poc_entry_main(void)
  1735. {
  1736.     /*----------------------------------------------------------------*/
  1737.     /* Local Variables                                                */
  1738.     /*----------------------------------------------------------------*/
  1739.     U16 nStrItemList[MAX_SUB_MENUS];
  1740.     U16 nNumofItem;
  1741.     U8 *guiBuffer;
  1742.     U8 *PoCHint[MAX_SUB_MENUS];
  1743.     /*----------------------------------------------------------------*/
  1744.     /* Code Body                                                      */
  1745.     /*----------------------------------------------------------------*/
  1746. #ifdef MMI_ON_WIN32
  1747.     PopupNoSupport();
  1748.     return;
  1749. #endif /* MMI_ON_WIN32 */ 
  1750.     EntryNewScreen(SCR_ID_POC_MAIN, NULL, mmi_poc_entry_main, NULL);
  1751.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_MAIN);
  1752.     if (g_poc_cntx_p->curr_reg_state == POC_REG_REGED)
  1753.     {
  1754.         nNumofItem = GetNumOfChild(MENU_ID_POC_MAIN_REGOK);
  1755.         GetSequenceStringIds(MENU_ID_POC_MAIN_REGOK, nStrItemList);
  1756.         SetParentHandler(MENU_ID_POC_MAIN_REGOK);
  1757.         ConstructHintsList(MENU_ID_POC_MAIN_REGOK, PoCHint);
  1758.     }
  1759.     else
  1760.     {
  1761.         nNumofItem = GetNumOfChild(MENU_ID_POC_MAIN);
  1762.         GetSequenceStringIds(MENU_ID_POC_MAIN, nStrItemList);
  1763.         SetParentHandler(MENU_ID_POC_MAIN);
  1764.         ConstructHintsList(MENU_ID_POC_MAIN, PoCHint);
  1765.     }
  1766.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1767.     ShowCategory52Screen(
  1768.         STR_ID_POC_MAIN,
  1769.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1770.         STR_GLOBAL_OK,
  1771.         IMG_GLOBAL_OK,
  1772.         STR_GLOBAL_BACK,
  1773.         IMG_GLOBAL_BACK,
  1774.         nNumofItem,
  1775.         nStrItemList,
  1776.         (U16*) gIndexIconsImageList,
  1777.         PoCHint,
  1778.         0,
  1779.         0,
  1780.         guiBuffer);
  1781.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1782.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1783. }
  1784. /*****************************************************************************
  1785.  * FUNCTION
  1786.  *  mmi_poc_entry_call_history
  1787.  * DESCRIPTION
  1788.  *  poc call history screen
  1789.  * PARAMETERS
  1790.  *  void
  1791.  * RETURNS
  1792.  *  void
  1793.  *****************************************************************************/
  1794. void mmi_poc_entry_call_history(void)
  1795. {
  1796.     /*----------------------------------------------------------------*/
  1797.     /* Local Variables                                                */
  1798.     /*----------------------------------------------------------------*/
  1799.     U16 Cat23DemoIcons[POC_MAX_HISTORY_NUM];
  1800.     U8 *guiBuffer;
  1801.     U8 count;
  1802.     /*----------------------------------------------------------------*/
  1803.     /* Code Body                                                      */
  1804.     /*----------------------------------------------------------------*/
  1805.     if (g_poc_cntx_p->history.no_entries == 0)
  1806.     {
  1807.         DisplayPopup(
  1808.             (U8*) GetString(STR_GLOBAL_EMPTY),
  1809.             IMG_GLOBAL_EMPTY,
  1810.             1,
  1811.             UI_POPUP_NOTIFYDURATION_TIME,
  1812.             (U8) ERROR_TONE);
  1813.         return;
  1814.     }
  1815.     if (g_poc_cntx_p->call_status != POC_CALL_NONE)
  1816.     {
  1817.         MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POC_CALL_STATE, (S32) g_poc_cntx_p->call_status));
  1818.         DisplayPopup(
  1819.             (U8*) GetString(STR_ID_POC_ERR_TERMINATE_CALL_FIRST),
  1820.             IMG_GLOBAL_WARNING,
  1821.             1,
  1822.             UI_POPUP_NOTIFYDURATION_TIME,
  1823.             (U8) WARNING_TONE);
  1824.         return;
  1825.     }
  1826.     EntryNewScreen(STR_ID_POC_CALL_HISTORY, NULL, mmi_poc_entry_call_history, NULL);
  1827.     guiBuffer = GetCurrGuiBuffer(STR_ID_POC_CALL_HISTORY);
  1828.     RegisterHighlightHandler(mmi_poc_history_highlight_handler);
  1829.     for (count = 0; count < g_poc_cntx_p->history.no_entries; count++)
  1830.     {
  1831.         switch (g_poc_cntx_p->history.entries[count].type)
  1832.         {
  1833.             case POC_INCOMING_CALL:
  1834.                 Cat23DemoIcons[count] = IMG_MENU8101_RECEIVED_CALLS;
  1835.                 break;
  1836.             case POC_INCOMING_ALERT:
  1837.                 Cat23DemoIcons[count] = IMG_MENU8101_RECEIVED_CALLS;
  1838.                 break;
  1839.             case POC_OUTGOING_CALL:
  1840.                 Cat23DemoIcons[count] = IMG_MENU8102_DIALED_CALLS;
  1841.                 break;
  1842.             case POC_OUTGOING_ALERT:
  1843.                 Cat23DemoIcons[count] = IMG_MENU8102_DIALED_CALLS;
  1844.                 break;
  1845.             default:
  1846.                 break;
  1847.         }
  1848.         subMenuDataPtrs[count] = subMenuData[count];
  1849.         hintDataPtrs[count] = hintData[count];
  1850.         memset((S8*) subMenuDataPtrs[count], 0, MAX_SUB_MENU_SIZE);
  1851.         memset((S8*) hintDataPtrs[count], 0, MAX_SUB_MENU_HINT_SIZE);
  1852.         if (strlen((S8*) g_poc_cntx_p->history.entries[count].list_name) == 0)
  1853.         {
  1854.             mmi_poc_util_copy_with_dot(
  1855.                 (S8*) g_poc_cntx_p->history.entries[count].uri,
  1856.                 (S8*) subMenuDataPtrs[count],
  1857.                 MAX_SUBMENU_CHARACTERS - 1);
  1858.         }
  1859.         else
  1860.         {
  1861.             mmi_poc_util_copy_with_dot(
  1862.                 (S8*) g_poc_cntx_p->history.entries[count].list_name,
  1863.                 (S8*) subMenuDataPtrs[count],
  1864.                 MAX_SUBMENU_CHARACTERS - 1);
  1865.         }
  1866.         mmi_poc_util_copy_with_dot(
  1867.             (S8*) g_poc_cntx_p->history.entries[count].uri,
  1868.             (S8*) hintDataPtrs[count],
  1869.             MAX_SUBMENU_CHARACTERS - 1);
  1870.     }
  1871.     ShowCategory53Screen(
  1872.         STR_ID_POC_CALL_HISTORY,
  1873.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1874.         STR_GLOBAL_OPTIONS,
  1875.         IMG_GLOBAL_OK,
  1876.         STR_GLOBAL_BACK,
  1877.         IMG_GLOBAL_BACK,
  1878.         g_poc_cntx_p->history.no_entries,
  1879.         subMenuDataPtrs,
  1880.         (U16*) Cat23DemoIcons,
  1881.         hintDataPtrs,
  1882.         0,
  1883.         0,
  1884.         guiBuffer);
  1885.     if (g_poc_cntx_p->curr_reg_state == POC_REG_REGED)
  1886.     {
  1887.         SetKeyHandler(mmi_poc_call_history_rejoin, KEY_SEND, KEY_EVENT_DOWN);
  1888.     }
  1889.     SetKeyHandler(mmi_poc_entry_call_history_info_option, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1890.     SetLeftSoftkeyFunction(mmi_poc_entry_call_history_info_option, KEY_EVENT_UP);
  1891.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1892.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1893. }
  1894. /*****************************************************************************
  1895.  * FUNCTION
  1896.  *  mmi_poc_history_highlight_handler
  1897.  * DESCRIPTION
  1898.  *  poc history highlight handler
  1899.  * PARAMETERS
  1900.  *  ind     [IN]        Currently selected index
  1901.  * RETURNS
  1902.  *  void
  1903.  *****************************************************************************/
  1904. void mmi_poc_history_highlight_handler(S32 ind)
  1905. {
  1906.     /*----------------------------------------------------------------*/
  1907.     /* Local Variables                                                */
  1908.     /*----------------------------------------------------------------*/
  1909.     /*----------------------------------------------------------------*/
  1910.     /* Code Body                                                      */
  1911.     /*----------------------------------------------------------------*/
  1912.     g_poc_cntx_p->call_history_selected = (U8) ind;
  1913.     return;
  1914. }
  1915. /*****************************************************************************
  1916.  * FUNCTION
  1917.  *  mmi_poc_call_history_rejoin
  1918.  * DESCRIPTION
  1919.  *  call rejoin from history
  1920.  * PARAMETERS
  1921.  *  void
  1922.  * RETURNS
  1923.  *  void
  1924.  *****************************************************************************/
  1925. void mmi_poc_call_history_rejoin(void)
  1926. {
  1927.     /*----------------------------------------------------------------*/
  1928.     /* Local Variables                                                */
  1929.     /*----------------------------------------------------------------*/
  1930.     poc_addr_struct callee;
  1931.     /*----------------------------------------------------------------*/
  1932.     /* Code Body                                                      */
  1933.     /*----------------------------------------------------------------*/
  1934.     if (g_poc_cntx_p->call_status != POC_CALL_NONE)
  1935.     {
  1936.         MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POC_CALL_STATE, (S32) g_poc_cntx_p->call_status));
  1937.         DisplayPopup(
  1938.             (U8*) GetString(STR_ID_POC_ERR_TERMINATE_CALL_FIRST),
  1939.             IMG_GLOBAL_WARNING,
  1940.             1,
  1941.             UI_POPUP_NOTIFYDURATION_TIME,
  1942.             (U8) WARNING_TONE);
  1943.         return;
  1944.     }
  1945.     memcpy(
  1946.         callee.uri,
  1947.         g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].uri,
  1948.         sizeof(U8) * POC_MAX_URI_LEN);
  1949.     memcpy(
  1950.         callee.disp_name,
  1951.         g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name,
  1952.         sizeof(U8) * POC_MAX_DISP_LEN);
  1953.     callee.disp_charset = 0;
  1954.     memset(g_poc_cntx_p->cm_talk_group_name, 0, sizeof(g_poc_cntx_p->cm_talk_group_name));
  1955.     if (strlen((S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name))
  1956.     {
  1957.         strncpy(
  1958.             (S8*) g_poc_cntx_p->cm_talk_group_name,
  1959.             (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name,
  1960.             POC_MAX_DISP_LEN - 1);
  1961.     }
  1962.     else
  1963.     {
  1964.         strncpy(
  1965.             (S8*) g_poc_cntx_p->cm_talk_group_name,
  1966.             (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].uri,
  1967.             POC_MAX_DISP_LEN - 1);
  1968.     }
  1969.     memset(g_poc_cntx_p->cm_talk_list, 0, sizeof(g_poc_cntx_p->cm_talk_list));
  1970.     g_poc_cntx_p->cm_talk_list_num = 0;
  1971.     strncpy((S8*) g_poc_cntx_p->calling_disp.name, (S8*) callee.disp_name, POC_MAX_DISP_LEN - 1);
  1972.     strncpy((S8*) g_poc_cntx_p->calling_disp.uri, (S8*) callee.uri, POC_MAX_URI_LEN - 1);
  1973.     mmi_poc_entry_inviting();
  1974.     if (g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].rejoinable == MMI_TRUE)
  1975.     {
  1976.         mmi_poc_talk_invite_req(POC_AD_HOC_GROUP_TALK, 1, &callee, 0, 0, 1);
  1977.     }
  1978.     else
  1979.     {
  1980.         mmi_poc_talk_invite_req(POC_AD_HOC_GROUP_TALK, 1, &callee, 0, 0, 0);
  1981.     }
  1982. }
  1983. #ifdef __MMI_POC_ETS_TESTCODE__
  1984. /*****************************************************************************
  1985.  * FUNCTION
  1986.  *  mmi_poc_call_history_rejoin_fake
  1987.  * DESCRIPTION
  1988.  *  call a fake rejoin
  1989.  * PARAMETERS
  1990.  *  void
  1991.  * RETURNS
  1992.  *  void
  1993.  *****************************************************************************/
  1994. void mmi_poc_call_history_rejoin_fake(void)
  1995. {
  1996.     /*----------------------------------------------------------------*/
  1997.     /* Local Variables                                                */
  1998.     /*----------------------------------------------------------------*/
  1999.     poc_addr_struct callee;
  2000.     /*----------------------------------------------------------------*/
  2001.     /* Code Body                                                      */
  2002.     /*----------------------------------------------------------------*/
  2003.     if (g_poc_cntx_p->call_status != POC_CALL_NONE)
  2004.     {
  2005.         MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POC_CALL_STATE, (S32) g_poc_cntx_p->call_status));
  2006.         DisplayPopup(
  2007.             (U8*) GetString(STR_ID_POC_ERR_TERMINATE_CALL_FIRST),
  2008.             IMG_GLOBAL_WARNING,
  2009.             1,
  2010.             UI_POPUP_NOTIFYDURATION_TIME,
  2011.             (U8) WARNING_TONE);
  2012.         return;
  2013.     }
  2014.     strncpy((S8*) callee.uri, POC_MMI_DEFAULT_PRIVACY_ADDR, POC_MAX_URI_LEN - 1);
  2015.     strncpy((S8*) callee.disp_name, POC_MMI_DEFAULT_PRIVACY_ADDR, POC_MAX_DISP_LEN - 1);
  2016.     callee.disp_charset = 0;
  2017.     memset(g_poc_cntx_p->cm_talk_group_name, 0, sizeof(g_poc_cntx_p->cm_talk_group_name));
  2018.     if (strlen((S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name))
  2019.     {
  2020.         strncpy(
  2021.             (S8*) g_poc_cntx_p->cm_talk_group_name,
  2022.             (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name,
  2023.             POC_MAX_DISP_LEN - 1);
  2024.     }
  2025.     else
  2026.     {
  2027.         strncpy(
  2028.             (S8*) g_poc_cntx_p->cm_talk_group_name,
  2029.             (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].uri,
  2030.             POC_MAX_DISP_LEN - 1);
  2031.     }
  2032.     memset(g_poc_cntx_p->cm_talk_list, 0, sizeof(g_poc_cntx_p->cm_talk_list));
  2033.     g_poc_cntx_p->cm_talk_list_num = 0;
  2034.     strncpy((S8*) g_poc_cntx_p->calling_disp.name, (S8*) callee.disp_name, POC_MAX_DISP_LEN - 1);
  2035.     strncpy((S8*) g_poc_cntx_p->calling_disp.uri, (S8*) callee.uri, POC_MAX_URI_LEN - 1);
  2036.     mmi_poc_entry_inviting();
  2037.     mmi_poc_talk_invite_req(POC_AD_HOC_GROUP_TALK, 1, &callee, 0, 0, 0);
  2038. }
  2039. #endif /* __MMI_POC_ETS_TESTCODE__ */ 
  2040. /*****************************************************************************
  2041.  * FUNCTION
  2042.  *  mmi_poc_entry_call_history_info
  2043.  * DESCRIPTION
  2044.  *  history info
  2045.  * PARAMETERS
  2046.  *  void
  2047.  * RETURNS
  2048.  *  void
  2049.  *****************************************************************************/
  2050. void mmi_poc_entry_call_history_info(void)
  2051. {
  2052.     /*----------------------------------------------------------------*/
  2053.     /* Local Variables                                                */
  2054.     /*----------------------------------------------------------------*/
  2055.     U8 *guiBuffer;
  2056.     U8 *inputBuffer;
  2057.     U16 inputBufferSize;
  2058.     U16 icon_list[] = 
  2059.     {
  2060.         IMG_ID_POC_DATE, IMG_ID_POC_TIME, IMG_ID_POC_CONTACT_NAME,
  2061.         0, IMG_ID_POC_CONTACT_URI, 0, IMG_ID_POC_MSG, 0
  2062.     };
  2063.     /*----------------------------------------------------------------*/
  2064.     /* Code Body                                                      */
  2065.     /*----------------------------------------------------------------*/
  2066.     MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POC_ENTRY_STATUS));
  2067.     EntryNewScreen(SCR_ID_POC_HISTORY_INFO, mmi_poc_exit_call_history_info, NULL, NULL);
  2068.     InitializeCategory57Screen();
  2069.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_HISTORY_INFO);
  2070.     inputBuffer = GetCurrNInputBuffer(SCR_ID_POC_HISTORY_INFO, &inputBufferSize);
  2071.     SetParentHandler(0);
  2072.     mmi_poc_history_fill_inline_struct();
  2073.     date_string(
  2074.         &g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].time,
  2075.         (UI_string_type) g_poc_cntx_p->history_disp.date,
  2076.         DT_IDLE_SCREEN);
  2077.     time_string(
  2078.         &g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].time,
  2079.         (UI_string_type) g_poc_cntx_p->history_disp.time,
  2080.         DT_IDLE_SCREEN);
  2081.     mmi_poc_util_copy_with_dot(
  2082.         (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].list_name,
  2083.         (S8*) g_poc_cntx_p->history_disp.list_name,
  2084.         POC_MAX_DISP_LEN - 1);
  2085.     mmi_poc_util_copy_with_dot(
  2086.         (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].uri,
  2087.         (S8*) g_poc_cntx_p->history_disp.uri,
  2088.         POC_MAX_URI_LEN - 1);
  2089.     mmi_poc_util_copy_with_dot(
  2090.         (S8*) g_poc_cntx_p->history.entries[g_poc_cntx_p->call_history_selected].message,
  2091.         (S8*) g_poc_cntx_p->history_disp.message,
  2092.         MMI_POC_MAX_MSG_LEN - 1);
  2093.     ShowCategory57Screen(
  2094.         STR_ID_POC_CALL_HISTORY,
  2095.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2096.         STR_GLOBAL_OK,
  2097.         IMG_GLOBAL_OK,
  2098.         STR_GLOBAL_BACK,
  2099.         IMG_GLOBAL_BACK,
  2100.         POC_HISTORY_INFO_INLINE_NUM,
  2101.         icon_list,
  2102.         wgui_inline_items,
  2103.         0,
  2104.         guiBuffer);
  2105.     SetCategory57RightSoftkeyFunctions(mmi_poc_entry_call_history_info_option, GoBackHistory);
  2106. }
  2107. /*****************************************************************************
  2108.  * FUNCTION
  2109.  *  mmi_poc_exit_call_history_info
  2110.  * DESCRIPTION
  2111.  *  Exit function of View screen.
  2112.  * PARAMETERS
  2113.  *  void
  2114.  * RETURNS
  2115.  *  void
  2116.  *****************************************************************************/
  2117. void mmi_poc_exit_call_history_info(void)
  2118. {
  2119.     /*----------------------------------------------------------------*/
  2120.     /* Local Variables                                                */
  2121.     /*----------------------------------------------------------------*/
  2122.     /*----------------------------------------------------------------*/
  2123.     /* Code Body                                                      */
  2124.     /*----------------------------------------------------------------*/
  2125.     GenericExitInlineScreen(SCR_ID_POC_HISTORY_INFO, mmi_poc_entry_call_history_info);
  2126. }
  2127. /*****************************************************************************
  2128.  * FUNCTION
  2129.  *  mmi_poc_history_fill_inline_struct
  2130.  * DESCRIPTION
  2131.  *  fill inline structure for poc history info screen
  2132.  * PARAMETERS
  2133.  *  void
  2134.  * RETURNS
  2135.  *  void
  2136.  *****************************************************************************/
  2137. void mmi_poc_history_fill_inline_struct(void)
  2138. {
  2139.     /*----------------------------------------------------------------*/
  2140.     /* Local Variables                                                */
  2141.     /*----------------------------------------------------------------*/
  2142.     /*----------------------------------------------------------------*/
  2143.     /* Code Body                                                      */
  2144.     /*----------------------------------------------------------------*/
  2145.     SetInlineItemActivation((wgui_inline_items + POC_HISTORY_INFO_DATE), KEY_LSK, KEY_EVENT_UP);
  2146.     SetInlineItemActivation((wgui_inline_items + POC_HISTORY_INFO_TIME), KEY_LSK, KEY_EVENT_UP);
  2147.     SetInlineItemActivation((wgui_inline_items + POC_HISTORY_INFO_NAME), KEY_LSK, KEY_EVENT_UP);
  2148.     SetInlineItemActivation((wgui_inline_items + POC_HISTORY_INFO_URI), KEY_LSK, KEY_EVENT_UP);
  2149.     SetInlineItemActivation((wgui_inline_items + POC_HISTORY_INFO_MSG), KEY_LSK, KEY_EVENT_UP);
  2150.     SetInlineItemDisplayOnly((wgui_inline_items + POC_HISTORY_INFO_DATE), (U8*) g_poc_cntx_p->history_disp.date);
  2151.     SetInlineItemDisplayOnly((wgui_inline_items + POC_HISTORY_INFO_TIME), (U8*) g_poc_cntx_p->history_disp.time);
  2152.     SetInlineItemCaption((wgui_inline_items + POC_HISTORY_INFO_NAME_STR), (U8*) GetString(STR_ID_POC_NAME));
  2153.     SetInlineItemDisplayOnly((wgui_inline_items + POC_HISTORY_INFO_NAME), (U8*) g_poc_cntx_p->history_disp.list_name);
  2154.     SetInlineItemCaption((wgui_inline_items + POC_HISTORY_INFO_URI_STR), (U8*) GetString(STR_ID_POC_URI));
  2155.     SetInlineItemDisplayOnly((wgui_inline_items + POC_HISTORY_INFO_URI), (U8*) g_poc_cntx_p->history_disp.uri);
  2156.     SetInlineItemCaption((wgui_inline_items + POC_HISTORY_INFO_MSG_STR), (U8*) GetString(STR_ID_POC_MESSAGE));
  2157.     SetInlineItemDisplayOnly((wgui_inline_items + POC_HISTORY_INFO_MSG), (U8*) g_poc_cntx_p->history_disp.message);
  2158. }
  2159. /*****************************************************************************
  2160.  * FUNCTION
  2161.  *  mmi_poc_entry_call_history_info_option
  2162.  * DESCRIPTION
  2163.  *  history info option screen
  2164.  * PARAMETERS
  2165.  *  void
  2166.  * RETURNS
  2167.  *  void
  2168.  *****************************************************************************/
  2169. void mmi_poc_entry_call_history_info_option(void)
  2170. {
  2171.     /*----------------------------------------------------------------*/
  2172.     /* Local Variables                                                */
  2173.     /*----------------------------------------------------------------*/
  2174.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  2175.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  2176.     U8 *guiBuffer;                      /* Buffer holding history data */
  2177.     U16 menuId;
  2178.     /*----------------------------------------------------------------*/
  2179.     /* Code Body                                                      */
  2180.     /*----------------------------------------------------------------*/
  2181.     EntryNewScreen(SCR_ID_POC_HISTORY_OPT, NULL, mmi_poc_entry_call_history_info_option, NULL);
  2182.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_HISTORY_OPT);
  2183.     menuId = MENU_ID_POC_CALL_HISTORY_INFO_OPTION;
  2184.     nNumofItem = GetNumOfChild(menuId);
  2185.     GetSequenceStringIds(menuId, nStrItemList);
  2186.     SetParentHandler(menuId);
  2187.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2188.     ShowCategory15Screen(
  2189.         STR_GLOBAL_OPTIONS,
  2190.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2191.         STR_GLOBAL_OK,
  2192.         IMG_GLOBAL_OK,
  2193.         STR_GLOBAL_BACK,
  2194.         IMG_GLOBAL_BACK,
  2195.         nNumofItem,
  2196.         nStrItemList,
  2197.         (U16*) gIndexIconsImageList,
  2198.         1,
  2199.         0,
  2200.         guiBuffer);
  2201.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2202.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2203. }
  2204. /*****************************************************************************
  2205.  * FUNCTION
  2206.  *  mmi_poc_call_history_delete_cfrm
  2207.  * DESCRIPTION
  2208.  *  delete confirm screen
  2209.  * PARAMETERS
  2210.  *  void
  2211.  * RETURNS
  2212.  *  void
  2213.  *****************************************************************************/
  2214. void mmi_poc_call_history_delete_cfrm(void)
  2215. {
  2216.     /*----------------------------------------------------------------*/
  2217.     /* Local Variables                                                */
  2218.     /*----------------------------------------------------------------*/
  2219.     /*----------------------------------------------------------------*/
  2220.     /* Code Body                                                      */
  2221.     /*----------------------------------------------------------------*/
  2222.     DisplayConfirm(
  2223.         STR_GLOBAL_YES,
  2224.         IMG_GLOBAL_YES,
  2225.         STR_GLOBAL_NO,
  2226.         IMG_GLOBAL_NO,
  2227.         get_string(STR_GLOBAL_DELETE),
  2228.         IMG_GLOBAL_QUESTION,
  2229.         WARNING_TONE);
  2230.     SetLeftSoftkeyFunction(mmi_poc_history_delete_nvram, KEY_EVENT_UP);
  2231.     SetRightSoftkeyFunction(mmi_poc_go_back_history_list, KEY_EVENT_UP);
  2232. }
  2233. /*****************************************************************************
  2234.  * FUNCTION
  2235.  *  mmi_poc_history_delete_nvram
  2236.  * DESCRIPTION
  2237.  *  delete history from nvram
  2238.  * PARAMETERS
  2239.  *  void
  2240.  * RETURNS
  2241.  *  void
  2242.  *****************************************************************************/
  2243. void mmi_poc_history_delete_nvram(void)
  2244. {
  2245.     /*----------------------------------------------------------------*/
  2246.     /* Local Variables                                                */
  2247.     /*----------------------------------------------------------------*/
  2248.     S16 error;
  2249.     U8 i;
  2250.     /*----------------------------------------------------------------*/
  2251.     /* Code Body                                                      */
  2252.     /*----------------------------------------------------------------*/
  2253.     for (i = g_poc_cntx_p->call_history_selected; i < g_poc_cntx_p->history.no_entries - 1; i++)
  2254.     {
  2255.         memcpy(
  2256.             &g_poc_cntx_p->history.entries[i],
  2257.             &g_poc_cntx_p->history.entries[i + 1],
  2258.             sizeof(mmi_poc_history_entry_struct));
  2259.     }
  2260.     memset(
  2261.         &g_poc_cntx_p->history.entries[g_poc_cntx_p->history.no_entries - 1],
  2262.         (U8) 0,
  2263.         sizeof(mmi_poc_history_entry_struct));
  2264.     if (g_poc_cntx_p->history.no_entries > 0)
  2265.     {
  2266.         g_poc_cntx_p->history.no_entries--;
  2267.     }
  2268.     if (WriteRecord(
  2269.             NVRAM_EF_POC_HISTORY_LID,
  2270.             1,
  2271.             &g_poc_cntx.history,
  2272.             NVRAM_MAX_POC_HISTORY_SIZE,
  2273.             &error) < NVRAM_MAX_POC_HISTORY_SIZE)
  2274.     {
  2275.         ASSERT(0);
  2276.     }
  2277.     DisplayPopup(
  2278.         (U8*) GetString(STR_GLOBAL_DONE),
  2279.         IMG_GLOBAL_ACTIVATED,
  2280.         1,
  2281.         UI_POPUP_NOTIFYDURATION_TIME,
  2282.         (U8) SUCCESS_TONE);
  2283.     DeleteUptoScrID(STR_ID_POC_MAIN);
  2284. }
  2285. /*****************************************************************************
  2286.  * FUNCTION
  2287.  *  mmi_poc_go_back_history_list
  2288.  * DESCRIPTION
  2289.  *  go back history list
  2290.  * PARAMETERS
  2291.  *  void
  2292.  * RETURNS
  2293.  *  void
  2294.  *****************************************************************************/
  2295. void mmi_poc_go_back_history_list(void)
  2296. {
  2297.     /*----------------------------------------------------------------*/
  2298.     /* Local Variables                                                */
  2299.     /*----------------------------------------------------------------*/
  2300.     /*----------------------------------------------------------------*/
  2301.     /* Code Body                                                      */
  2302.     /*----------------------------------------------------------------*/
  2303.     DeleteUptoScrID(STR_ID_POC_CALL_HISTORY);
  2304.     GoBackHistory();
  2305. }
  2306. /*****************************************************************************
  2307.  * FUNCTION
  2308.  *  mmi_poc_call_history_delete_all_cfrm
  2309.  * DESCRIPTION
  2310.  *  delete all confirm
  2311.  * PARAMETERS
  2312.  *  void
  2313.  * RETURNS
  2314.  *  void
  2315.  *****************************************************************************/
  2316. void mmi_poc_call_history_delete_all_cfrm(void)
  2317. {
  2318.     /*----------------------------------------------------------------*/
  2319.     /* Local Variables                                                */
  2320.     /*----------------------------------------------------------------*/
  2321.     /*----------------------------------------------------------------*/
  2322.     /* Code Body                                                      */
  2323.     /*----------------------------------------------------------------*/
  2324.     DisplayConfirm(
  2325.         STR_GLOBAL_YES,
  2326.         IMG_GLOBAL_YES,
  2327.         STR_GLOBAL_NO,
  2328.         IMG_GLOBAL_NO,
  2329.         get_string(STR_GLOBAL_DELETE_ALL),
  2330.         IMG_GLOBAL_QUESTION,
  2331.         WARNING_TONE);
  2332.     SetLeftSoftkeyFunction(mmi_poc_history_delete_all_nvram, KEY_EVENT_UP);
  2333.     SetRightSoftkeyFunction(mmi_poc_go_back_history_list, KEY_EVENT_UP);
  2334. }
  2335. /*****************************************************************************
  2336.  * FUNCTION
  2337.  *  mmi_poc_history_delete_all_nvram
  2338.  * DESCRIPTION
  2339.  *  delete all from nvram
  2340.  * PARAMETERS
  2341.  *  void
  2342.  * RETURNS
  2343.  *  void
  2344.  *****************************************************************************/
  2345. void mmi_poc_history_delete_all_nvram(void)
  2346. {
  2347.     /*----------------------------------------------------------------*/
  2348.     /* Local Variables                                                */
  2349.     /*----------------------------------------------------------------*/
  2350.     S16 error;
  2351.     /*----------------------------------------------------------------*/
  2352.     /* Code Body                                                      */
  2353.     /*----------------------------------------------------------------*/
  2354.     memset(&g_poc_cntx_p->history, (U8) 0, sizeof(mmi_poc_history_struct));
  2355.     if (WriteRecord(
  2356.             NVRAM_EF_POC_HISTORY_LID,
  2357.             1,
  2358.             &g_poc_cntx.history,
  2359.             NVRAM_MAX_POC_HISTORY_SIZE,
  2360.             &error) < NVRAM_MAX_POC_HISTORY_SIZE)
  2361.     {
  2362.         ASSERT(0);
  2363.     }
  2364.     DisplayPopup(
  2365.         (U8*) GetString(STR_GLOBAL_DONE),
  2366.         IMG_GLOBAL_ACTIVATED,
  2367.         1,
  2368.         UI_POPUP_NOTIFYDURATION_TIME,
  2369.         (U8) SUCCESS_TONE);
  2370.     DeleteUptoScrID(STR_ID_POC_MAIN);
  2371. }
  2372. /*****************************************************************************
  2373.  * FUNCTION
  2374.  *  mmi_poc_history_add
  2375.  * DESCRIPTION
  2376.  *  add history interface
  2377.  * PARAMETERS
  2378.  *  type            [IN]        
  2379.  *  rejoinable      [IN]        
  2380.  *  list_name       [?]         
  2381.  *  uri             [?]         
  2382.  *  message         [?]         
  2383.  * RETURNS
  2384.  *  void
  2385.  *****************************************************************************/
  2386. void mmi_poc_history_add(U8 type, U8 rejoinable, U8 *list_name, U8 *uri, U8 *message)
  2387. {
  2388.     /*----------------------------------------------------------------*/
  2389.     /* Local Variables                                                */
  2390.     /*----------------------------------------------------------------*/
  2391.     U8 i, j, curr_total;
  2392.     S16 error;
  2393.     /*----------------------------------------------------------------*/
  2394.     /* Code Body                                                      */
  2395.     /*----------------------------------------------------------------*/
  2396.     if (message != NULL)
  2397.     {
  2398.         if (!strlen((S8*) uri) && !strlen((S8*) message) && (type != POC_INCOMING_ALERT))
  2399.         {
  2400.             return;
  2401.         }
  2402.     }
  2403.     for (i = POC_MAX_HISTORY_NUM - 1; i > 0; i--)
  2404.     {
  2405.         memcpy(
  2406.             &g_poc_cntx_p->history.entries[i],
  2407.             &g_poc_cntx_p->history.entries[i - 1],
  2408.             sizeof(mmi_poc_history_entry_struct));
  2409.     }
  2410.     memset(&g_poc_cntx_p->history.entries[0], 0, sizeof(mmi_poc_history_entry_struct));
  2411.     strncpy((S8*) g_poc_cntx_p->history.entries[0].list_name, (S8*) list_name, POC_MAX_DISP_LEN - 1);
  2412.     strncpy((S8*) g_poc_cntx_p->history.entries[0].uri, (S8*) uri, POC_MAX_URI_LEN - 1);
  2413.     if (message == NULL)
  2414.     {
  2415.         memset(g_poc_cntx_p->history.entries[0].message, 0, sizeof(g_poc_cntx_p->history.entries[0].message));
  2416.     }
  2417.     else
  2418.     {
  2419.         strncpy((S8*) g_poc_cntx_p->history.entries[0].message, (S8*) message, MMI_POC_MAX_MSG_LEN - 1);
  2420.     }
  2421.     DTGetRTCTime(&g_poc_cntx_p->history.entries[0].time);
  2422.     g_poc_cntx_p->history.entries[0].type = type;
  2423.     g_poc_cntx_p->history.entries[0].rejoinable = rejoinable;
  2424.     if (g_poc_cntx_p->history.no_entries < POC_MAX_HISTORY_NUM)
  2425.     {
  2426.         g_poc_cntx_p->history.no_entries++;
  2427.     }
  2428.     curr_total = g_poc_cntx_p->history.no_entries;
  2429.     for (i = 1; i < curr_total; i++)
  2430.     {
  2431.         if ((g_poc_cntx_p->history.entries[i].type == type) &&
  2432.             (!strncmp((S8*) g_poc_cntx_p->history.entries[i].list_name, (S8*) list_name, POC_MAX_DISP_LEN - 1)) &&
  2433.             (!strncmp((S8*) g_poc_cntx_p->history.entries[i].uri, (S8*) uri, POC_MAX_URI_LEN - 1) || uri[0] == 0 ||
  2434.              uri == 0) && (message == NULL))
  2435.         {
  2436.             for (j = i; j < curr_total - 1; j++)
  2437.             {
  2438.                 memcpy(
  2439.                     &g_poc_cntx_p->history.entries[j],
  2440.                     &g_poc_cntx_p->history.entries[j + 1],
  2441.                     sizeof(mmi_poc_history_entry_struct));
  2442.             }
  2443.             ASSERT(g_poc_cntx_p->history.no_entries > 0);
  2444.             g_poc_cntx_p->history.no_entries--;
  2445.         }
  2446.     }
  2447.     for (i = g_poc_cntx_p->history.no_entries; i < POC_MAX_HISTORY_NUM; i++)
  2448.     {
  2449.         memset(&g_poc_cntx_p->history.entries[i], 0, sizeof(mmi_poc_history_entry_struct));
  2450.     }
  2451.     if (WriteRecord(
  2452.             NVRAM_EF_POC_HISTORY_LID,
  2453.             1,
  2454.             &g_poc_cntx.history,
  2455.             NVRAM_MAX_POC_HISTORY_SIZE,
  2456.             &error) < NVRAM_MAX_POC_HISTORY_SIZE)
  2457.     {
  2458.         ASSERT(0);
  2459.     }
  2460. }
  2461. /*****************************************************************************
  2462.  * FUNCTION
  2463.  *  mmi_poc_entry_settings
  2464.  * DESCRIPTION
  2465.  *  poc settings screen
  2466.  * PARAMETERS
  2467.  *  void
  2468.  * RETURNS
  2469.  *  void
  2470.  *****************************************************************************/
  2471. void mmi_poc_entry_settings(void)
  2472. {
  2473.     /*----------------------------------------------------------------*/
  2474.     /* Local Variables                                                */
  2475.     /*----------------------------------------------------------------*/
  2476.     U16 nStrItemList[MAX_SUB_MENUS];
  2477.     U16 nNumofItem;
  2478.     U8 *guiBuffer;
  2479.     U8 *PoCHint[MAX_SUB_MENUS];
  2480.     /*----------------------------------------------------------------*/
  2481.     /* Code Body                                                      */
  2482.     /*----------------------------------------------------------------*/
  2483.     EntryNewScreen(SCR_ID_POC_SETTING, NULL, mmi_poc_entry_settings, NULL);
  2484.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_SETTING);
  2485.     if (g_poc_cntx_p->curr_reg_state == POC_REG_REGED)
  2486.     {
  2487.         nNumofItem = GetNumOfChild(MENU_ID_POC_SETTINGS);
  2488.         GetSequenceStringIds(MENU_ID_POC_SETTINGS, nStrItemList);
  2489.         SetParentHandler(MENU_ID_POC_SETTINGS);
  2490.         ConstructHintsList(MENU_ID_POC_SETTINGS, PoCHint);
  2491.     }
  2492.     else
  2493.     {
  2494.         nNumofItem = GetNumOfChild(MENU_ID_POC_SETTINGS_NOREG);
  2495.         GetSequenceStringIds(MENU_ID_POC_SETTINGS_NOREG, nStrItemList);
  2496.         SetParentHandler(MENU_ID_POC_SETTINGS_NOREG);
  2497.         ConstructHintsList(MENU_ID_POC_SETTINGS_NOREG, PoCHint);
  2498.     }
  2499.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2500.     ShowCategory52Screen(
  2501.         STR_ID_POC_SETTINGS,
  2502.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2503.         STR_GLOBAL_OK,
  2504.         IMG_GLOBAL_OK,
  2505.         STR_GLOBAL_BACK,
  2506.         IMG_GLOBAL_BACK,
  2507.         nNumofItem,
  2508.         nStrItemList,
  2509.         (U16*) gIndexIconsImageList,
  2510.         PoCHint,
  2511.         0,
  2512.         0,
  2513.         guiBuffer);
  2514.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2515.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2516. }
  2517. /*****************************************************************************
  2518.  * FUNCTION
  2519.  *  mmi_poc_entry_settings_my_status
  2520.  * DESCRIPTION
  2521.  *  settings my status screen
  2522.  * PARAMETERS
  2523.  *  void
  2524.  * RETURNS
  2525.  *  void
  2526.  *****************************************************************************/
  2527. void mmi_poc_entry_settings_my_status(void)
  2528. {
  2529.     /*----------------------------------------------------------------*/
  2530.     /* Local Variables                                                */
  2531.     /*----------------------------------------------------------------*/
  2532.     U16 nStrItemList[MAX_SUB_MENUS];
  2533.     U16 nNumofItem;
  2534.     U8 *guiBuffer;
  2535.     U8 *PoCHint[MAX_SUB_MENUS];
  2536.     /*----------------------------------------------------------------*/
  2537.     /* Code Body                                                      */
  2538.     /*----------------------------------------------------------------*/
  2539.     if (g_poc_cntx_p->progressing.my_status == MMI_TRUE)
  2540.     {
  2541.         DisplayPopup(
  2542.             (U8*) GetString(STR_ID_POC_PROCESSING),
  2543.             IMG_GLOBAL_WARNING,
  2544.             1,
  2545.             UI_POPUP_NOTIFYDURATION_TIME,
  2546.             (U8) WARNING_TONE);
  2547.         return;
  2548.     }
  2549.     if (g_poc_cntx_p->curr_reg_state != POC_REG_REGED)
  2550.     {
  2551.         DisplayPopup(
  2552.             (U8*) GetString(STR_ID_POC_ERR_NOT_REGISTERED),
  2553.             IMG_GLOBAL_UNFINISHED,
  2554.             1,
  2555.             UI_POPUP_NOTIFYDURATION_TIME,
  2556.             (U8) ERROR_TONE);
  2557.         return;
  2558.     }
  2559.     if (g_poc_cntx_p->call_status != POC_CALL_NONE)
  2560.     {
  2561.         MMI_TRACE((MMI_TRACE_G7_MISC, MMI_POC_CALL_STATE, (S32) g_poc_cntx_p->call_status));
  2562.         DisplayPopup(
  2563.             (U8*) GetString(STR_ID_POC_ERR_TERMINATE_CALL_FIRST),
  2564.             IMG_GLOBAL_WARNING,
  2565.             1,
  2566.             UI_POPUP_NOTIFYDURATION_TIME,
  2567.             (U8) WARNING_TONE);
  2568.         return;
  2569.     }
  2570.     EntryNewScreen(SCR_ID_POC_SETTING_MYSTATUS, NULL, mmi_poc_entry_settings_my_status, NULL);
  2571.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_SETTING_MYSTATUS);
  2572.     nNumofItem = GetNumOfChild(MENU_ID_POC_SETTINGS_MY_STATUS);
  2573.     GetSequenceStringIds(MENU_ID_POC_SETTINGS_MY_STATUS, nStrItemList);
  2574.     SetParentHandler(MENU_ID_POC_SETTINGS_MY_STATUS);
  2575.     ConstructHintsList(MENU_ID_POC_SETTINGS_MY_STATUS, PoCHint);
  2576.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2577.     ShowCategory52Screen(
  2578.         STR_ID_POC_MY_STATUS,
  2579.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2580.         STR_GLOBAL_OK,
  2581.         IMG_GLOBAL_OK,
  2582.         STR_GLOBAL_BACK,
  2583.         IMG_GLOBAL_BACK,
  2584.         nNumofItem,
  2585.         nStrItemList,
  2586.         (U16*) gIndexIconsImageList,
  2587.         PoCHint,
  2588.         0,
  2589.         0,
  2590.         guiBuffer);
  2591.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2592.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2593. }
  2594. /*****************************************************************************
  2595.  * FUNCTION
  2596.  *  mmi_poc_entry_settings_my_status_activity
  2597.  * DESCRIPTION
  2598.  *  activity screen
  2599.  * PARAMETERS
  2600.  *  void
  2601.  * RETURNS
  2602.  *  void
  2603.  *****************************************************************************/
  2604. void mmi_poc_entry_settings_my_status_activity(void)
  2605. {
  2606.     /*----------------------------------------------------------------*/
  2607.     /* Local Variables                                                */
  2608.     /*----------------------------------------------------------------*/
  2609.     U16 nStrItemList[MAX_SUB_MENUS];
  2610.     U16 nNumofItem;
  2611.     U8 *guiBuffer;
  2612.     U8 i;
  2613.     /*----------------------------------------------------------------*/
  2614.     /* Code Body                                                      */
  2615.     /*----------------------------------------------------------------*/
  2616.     EntryNewScreen(SCR_ID_POC_SETTING_MYSTATUS_ACTIVITY, NULL, mmi_poc_entry_settings_my_status_activity, NULL);
  2617.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_SETTING_MYSTATUS_ACTIVITY);
  2618.     nNumofItem = POC_MAX_ACTIVITY_NUM;
  2619.     SetParentHandler(MENU_ID_POC_SETTINGS_MY_STATUS_ACTIVITY);
  2620.     RegisterHighlightHandler(mmi_poc_activity_highlight_handler);
  2621.     GetSequenceStringIds(MENU_ID_POC_SETTINGS_MY_STATUS_ACTIVITY, nStrItemList);
  2622.     nStrItemList[0] = STR_GLOBAL_EMPTY;
  2623.     for (i = 1; i < nNumofItem; i++)
  2624.     {
  2625.         nStrItemList[i] = STR_ID_POC_AWAY + i - 1;
  2626.     }
  2627.     if (guiBuffer == NULL)
  2628.     {
  2629.         g_poc_cntx_p->activity_selected = 0;
  2630.     }
  2631.     ShowCategory52Screen(
  2632.         STR_ID_POC_ACTIVITY,
  2633.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2634.         STR_GLOBAL_OK,
  2635.         IMG_GLOBAL_OK,
  2636.         STR_GLOBAL_BACK,
  2637.         IMG_GLOBAL_BACK,
  2638.         nNumofItem,
  2639.         nStrItemList,
  2640.         (U16*) gIndexIconsImageList,
  2641.         NULL,
  2642.         0,
  2643.         g_poc_cntx_p->activity_selected,
  2644.         guiBuffer);
  2645.     SetLeftSoftkeyFunction(mmi_poc_entry_set_activity, KEY_EVENT_UP);
  2646.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2647.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2648. }
  2649. /*****************************************************************************
  2650.  * FUNCTION
  2651.  *  mmi_poc_activity_highlight_handler
  2652.  * DESCRIPTION
  2653.  *  activity highlight handler
  2654.  * PARAMETERS
  2655.  *  index       [IN]        Currently selected index
  2656.  * RETURNS
  2657.  *  void
  2658.  *****************************************************************************/
  2659. void mmi_poc_activity_highlight_handler(S32 index)
  2660. {
  2661.     /*----------------------------------------------------------------*/
  2662.     /* Local Variables                                                */
  2663.     /*----------------------------------------------------------------*/
  2664.     /*----------------------------------------------------------------*/
  2665.     /* Code Body                                                      */
  2666.     /*----------------------------------------------------------------*/
  2667.     g_poc_cntx_p->activity_selected = (U8) index;
  2668. }
  2669. /*****************************************************************************
  2670.  * FUNCTION
  2671.  *  mmi_poc_entry_set_activity
  2672.  * DESCRIPTION
  2673.  *  set activity
  2674.  * PARAMETERS
  2675.  *  void
  2676.  * RETURNS
  2677.  *  void
  2678.  *****************************************************************************/
  2679. void mmi_poc_entry_set_activity(void)
  2680. {
  2681.     /*----------------------------------------------------------------*/
  2682.     /* Local Variables                                                */
  2683.     /*----------------------------------------------------------------*/
  2684.     /*----------------------------------------------------------------*/
  2685.     /* Code Body                                                      */
  2686.     /*----------------------------------------------------------------*/
  2687.     memcpy(&g_poc_cntx_p->person_pres_disp, &g_poc_cntx_p->person_pres, sizeof(mmi_poc_person_pinfo_struct));
  2688.     switch (g_poc_cntx_p->activity_selected)
  2689.     {
  2690.         case 0:
  2691.             g_poc_cntx_p->person_pres_disp.activity_present = MMI_FALSE;
  2692.             break;
  2693.         case 1:
  2694.             g_poc_cntx_p->person_pres_disp.activity_present = MMI_TRUE;
  2695.             g_poc_cntx_p->person_pres_disp.activity = POC_ACTIVITY_AWAY;
  2696.             break;
  2697.         case 2:
  2698.             g_poc_cntx_p->person_pres_disp.activity_present = MMI_TRUE;
  2699.             g_poc_cntx_p->person_pres_disp.activity = POC_ACTIVITY_APPOINTMENT;
  2700.             break;
  2701.         case 3:
  2702.             g_poc_cntx_p->person_pres_disp.activity_present = MMI_TRUE;
  2703.             g_poc_cntx_p->person_pres_disp.activity = POC_ACTIVITY_BUSY;
  2704.             break;
  2705.         default:
  2706.             break;
  2707.     }
  2708.     mmi_poc_entry_progressing();
  2709.     DeleteUptoScrID(SCR_ID_POC_SETTING);
  2710.     mmi_poc_presence_publish_req();
  2711. }
  2712. /*****************************************************************************
  2713.  * FUNCTION
  2714.  *  mmi_poc_presence_publish_req
  2715.  * DESCRIPTION
  2716.  *  presence publish request
  2717.  * PARAMETERS
  2718.  *  void
  2719.  * RETURNS
  2720.  *  void
  2721.  *****************************************************************************/
  2722. void mmi_poc_presence_publish_req(void)
  2723. {
  2724.     /*----------------------------------------------------------------*/
  2725.     /* Local Variables                                                */
  2726.     /*----------------------------------------------------------------*/
  2727.     MYQUEUE Message;
  2728.     poc_presence_publish_req_struct *myMsgPtr;
  2729.     /*----------------------------------------------------------------*/
  2730.     /* Code Body                                                      */
  2731.     /*----------------------------------------------------------------*/
  2732.     g_poc_cntx_p->progressing.my_status = MMI_TRUE;
  2733.     myMsgPtr = (poc_presence_publish_req_struct*) OslConstructDataPtr(sizeof(poc_presence_publish_req_struct));
  2734.     memset(
  2735.         (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  2736.         0,
  2737.         sizeof(poc_presence_publish_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  2738.     myMsgPtr->remove = MMI_FALSE;
  2739.     memcpy(
  2740.         myMsgPtr->pinfo.entity,
  2741.         g_poc_cntx_p->profile_list[g_poc_cntx_p->profile_active].uri,