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

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.  *  PoCGroups.c
  40.  *
  41.  * Project:
  42.  * --------
  43.  *  MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *  This file implements poc groups
  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.  *------------------------------------------------------------------------------
  106.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  107.  *=============================================================
  108.  *******************************************************************************/
  109. #include "MMI_features.h"
  110. #ifdef __MMI_POC__
  111. #ifndef __MTK_TARGET__
  112. #include <Windows.h>
  113. #endif
  114. #include "stdC.h"
  115. #include "L4Dr1.h"
  116. #include "mdi_datatype.h"
  117. #include "DebugInitDef.h"
  118. #include "mmi_trc.h"    /* debug info */
  119. #include "GlobalMenuItems.h"
  120. #include "CustMenuRes.h"
  121. #include "CustDataRes.h"
  122. #include "ProtocolEvents.h"
  123. #include "CommonScreens.h"
  124. #include "EventsGprot.h"
  125. #include "SettingProfile.h"
  126. #include "wgui_categories_popup.h"
  127. #include "wgui_categories_inputs.h"
  128. #include "ProfileGprots.h"
  129. #include "CallSetup.h"
  130. #include "NVRAMEnum.h"
  131. #include "NVRAMProt.h"
  132. #include "NVRAMType.h"
  133. #include "custom_nvram_editor_data_item.h"
  134. #include "custom_data_account.h"
  135. #include "DataAccountGProt.h"
  136. #include "sip_msg_api.h"
  137. #include "sip_ua_api.h"
  138. #include "app2soc_struct.h"
  139. #include "soc_api.h"
  140. #include "app2sip_struct.h"
  141. #include "app2xdm_struct.h"
  142. #include "mmi2poc_struct.h"
  143. #include "custom_poc_config.h"
  144. #include "PoCGprot.h"
  145. #include "PoCProt.h"
  146. #include "app2xdm_enums.h"
  147. #include "wgui_tab_bars.h"
  148. #include "wgui_categories_IMPS.h"
  149. /*****************************************************************************
  150.  * FUNCTION
  151.  *  mmi_poc_highlight_contact
  152.  * DESCRIPTION
  153.  *  Highlight handler of PoC menu
  154.  * PARAMETERS
  155.  *  void
  156.  * RETURNS
  157.  *  void
  158.  *****************************************************************************/
  159. void mmi_poc_highlight_contact(void)
  160. {
  161.     /*----------------------------------------------------------------*/
  162.     /* Local Variables                                                */
  163.     /*----------------------------------------------------------------*/
  164.     /*----------------------------------------------------------------*/
  165.     /* Code Body                                                      */
  166.     /*----------------------------------------------------------------*/
  167.     SetLeftSoftkeyFunction(mmi_poc_entry_contact, KEY_EVENT_UP);
  168.     SetKeyHandler(mmi_poc_entry_contact, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  169.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  170.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  171. }
  172. /*****************************************************************************
  173.  * FUNCTION
  174.  *  mmi_poc_highlight_contact_opt
  175.  * DESCRIPTION
  176.  *  Highlight handler of PoC menu
  177.  * PARAMETERS
  178.  *  void
  179.  * RETURNS
  180.  *  void
  181.  *****************************************************************************/
  182. void mmi_poc_highlight_contact_opt(void)
  183. {
  184.     /*----------------------------------------------------------------*/
  185.     /* Local Variables                                                */
  186.     /*----------------------------------------------------------------*/
  187.     /*----------------------------------------------------------------*/
  188.     /* Code Body                                                      */
  189.     /*----------------------------------------------------------------*/
  190.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt, KEY_EVENT_UP);
  191.     SetKeyHandler(mmi_poc_entry_contact_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  192.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  193.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  194. }
  195. /*****************************************************************************
  196.  * FUNCTION
  197.  *  mmi_poc_highlight_contact_opt_settings
  198.  * DESCRIPTION
  199.  *  Highlight handler of PoC menu
  200.  * PARAMETERS
  201.  *  void
  202.  * RETURNS
  203.  *  void
  204.  *****************************************************************************/
  205. void mmi_poc_highlight_contact_opt_settings(void)
  206. {
  207.     /*----------------------------------------------------------------*/
  208.     /* Local Variables                                                */
  209.     /*----------------------------------------------------------------*/
  210.     /*----------------------------------------------------------------*/
  211.     /* Code Body                                                      */
  212.     /*----------------------------------------------------------------*/
  213.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings, KEY_EVENT_UP);
  214.     SetKeyHandler(mmi_poc_entry_contact_opt_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  215.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  216.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  217. }
  218. /*****************************************************************************
  219.  * FUNCTION
  220.  *  mmi_poc_highlight_contact_opt_settings_modify
  221.  * DESCRIPTION
  222.  *  Highlight handler of PoC menu
  223.  * PARAMETERS
  224.  *  void
  225.  * RETURNS
  226.  *  void
  227.  *****************************************************************************/
  228. void mmi_poc_highlight_contact_opt_settings_modify(void)
  229. {
  230.     /*----------------------------------------------------------------*/
  231.     /* Local Variables                                                */
  232.     /*----------------------------------------------------------------*/
  233.     /*----------------------------------------------------------------*/
  234.     /* Code Body                                                      */
  235.     /*----------------------------------------------------------------*/
  236.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_modify, KEY_EVENT_UP);
  237.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  238.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  239.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  240. }
  241. /*****************************************************************************
  242.  * FUNCTION
  243.  *  mmi_poc_highlight_contact_opt_settings_add
  244.  * DESCRIPTION
  245.  *  Highlight handler of PoC menu
  246.  * PARAMETERS
  247.  *  void
  248.  * RETURNS
  249.  *  void
  250.  *****************************************************************************/
  251. void mmi_poc_highlight_contact_opt_settings_add(void)
  252. {
  253.     /*----------------------------------------------------------------*/
  254.     /* Local Variables                                                */
  255.     /*----------------------------------------------------------------*/
  256.     /*----------------------------------------------------------------*/
  257.     /* Code Body                                                      */
  258.     /*----------------------------------------------------------------*/
  259.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_add, KEY_EVENT_UP);
  260.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  261.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  262.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  263. }
  264. /*****************************************************************************
  265.  * FUNCTION
  266.  *  mmi_poc_highlight_contact_opt_settings_delete
  267.  * DESCRIPTION
  268.  *  Highlight handler of PoC menu
  269.  * PARAMETERS
  270.  *  void
  271.  * RETURNS
  272.  *  void
  273.  *****************************************************************************/
  274. void mmi_poc_highlight_contact_opt_settings_delete(void)
  275. {
  276.     /*----------------------------------------------------------------*/
  277.     /* Local Variables                                                */
  278.     /*----------------------------------------------------------------*/
  279.     /*----------------------------------------------------------------*/
  280.     /* Code Body                                                      */
  281.     /*----------------------------------------------------------------*/
  282.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_delete_cfrm, KEY_EVENT_UP);
  283.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  284.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  285.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  286. }
  287. /*****************************************************************************
  288.  * FUNCTION
  289.  *  mmi_poc_highlight_contact_opt_settings_info
  290.  * DESCRIPTION
  291.  *  Highlight handler of PoC menu
  292.  * PARAMETERS
  293.  *  void
  294.  * RETURNS
  295.  *  void
  296.  *****************************************************************************/
  297. void mmi_poc_highlight_contact_opt_settings_info(void)
  298. {
  299.     /*----------------------------------------------------------------*/
  300.     /* Local Variables                                                */
  301.     /*----------------------------------------------------------------*/
  302.     /*----------------------------------------------------------------*/
  303.     /* Code Body                                                      */
  304.     /*----------------------------------------------------------------*/
  305.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_info, KEY_EVENT_UP);
  306.     SetKeyHandler(mmi_poc_entry_contact_opt_settings_info, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  307.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  308.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  309. }
  310. /*****************************************************************************
  311.  * FUNCTION
  312.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_invite
  313.  * DESCRIPTION
  314.  *  Highlight handler of PoC menu
  315.  * PARAMETERS
  316.  *  void
  317.  * RETURNS
  318.  *  void
  319.  *****************************************************************************/
  320. void mmi_poc_highlight_contact_opt_settings_attributes_allow_invite(void)
  321. {
  322.     /*----------------------------------------------------------------*/
  323.     /* Local Variables                                                */
  324.     /*----------------------------------------------------------------*/
  325.     /*----------------------------------------------------------------*/
  326.     /* Code Body                                                      */
  327.     /*----------------------------------------------------------------*/
  328.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_attributes_allow_invite, KEY_EVENT_UP);
  329.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  330.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  331.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  332. }
  333. /*****************************************************************************
  334.  * FUNCTION
  335.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_accept
  336.  * DESCRIPTION
  337.  *  Highlight handler of PoC menu
  338.  * PARAMETERS
  339.  *  void
  340.  * RETURNS
  341.  *  void
  342.  *****************************************************************************/
  343. void mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_accept(void)
  344. {
  345.     /*----------------------------------------------------------------*/
  346.     /* Local Variables                                                */
  347.     /*----------------------------------------------------------------*/
  348.     /*----------------------------------------------------------------*/
  349.     /* Code Body                                                      */
  350.     /*----------------------------------------------------------------*/
  351.     SetLeftSoftkeyFunction(mmi_poc_contact_set_allow_invite_accept, KEY_EVENT_UP);
  352.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  353.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  354.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  355. }
  356. /*****************************************************************************
  357.  * FUNCTION
  358.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_auto
  359.  * DESCRIPTION
  360.  *  Highlight handler of PoC menu
  361.  * PARAMETERS
  362.  *  void
  363.  * RETURNS
  364.  *  void
  365.  *****************************************************************************/
  366. void mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_auto(void)
  367. {
  368.     /*----------------------------------------------------------------*/
  369.     /* Local Variables                                                */
  370.     /*----------------------------------------------------------------*/
  371.     /*----------------------------------------------------------------*/
  372.     /* Code Body                                                      */
  373.     /*----------------------------------------------------------------*/
  374.     SetLeftSoftkeyFunction(mmi_poc_contact_set_allow_invite_auto, KEY_EVENT_UP);
  375.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  376.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  377.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  378. }
  379. /*****************************************************************************
  380.  * FUNCTION
  381.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_reject
  382.  * DESCRIPTION
  383.  *  Highlight handler of PoC menu
  384.  * PARAMETERS
  385.  *  void
  386.  * RETURNS
  387.  *  void
  388.  *****************************************************************************/
  389. void mmi_poc_highlight_contact_opt_settings_attributes_allow_invite_reject(void)
  390. {
  391.     /*----------------------------------------------------------------*/
  392.     /* Local Variables                                                */
  393.     /*----------------------------------------------------------------*/
  394.     /*----------------------------------------------------------------*/
  395.     /* Code Body                                                      */
  396.     /*----------------------------------------------------------------*/
  397.     SetLeftSoftkeyFunction(mmi_poc_contact_set_allow_invite_reject, KEY_EVENT_UP);
  398.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  399.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  400.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  401. }
  402. /*****************************************************************************
  403.  * FUNCTION
  404.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe
  405.  * DESCRIPTION
  406.  *  Highlight handler of PoC menu
  407.  * PARAMETERS
  408.  *  void
  409.  * RETURNS
  410.  *  void
  411.  *****************************************************************************/
  412. void mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe(void)
  413. {
  414.     /*----------------------------------------------------------------*/
  415.     /* Local Variables                                                */
  416.     /*----------------------------------------------------------------*/
  417.     /*----------------------------------------------------------------*/
  418.     /* Code Body                                                      */
  419.     /*----------------------------------------------------------------*/
  420.     SetLeftSoftkeyFunction(mmi_poc_entry_allow_subscribe, KEY_EVENT_UP);
  421.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  422.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  423.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  424. }
  425. /*****************************************************************************
  426.  * FUNCTION
  427.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_block
  428.  * DESCRIPTION
  429.  *  Highlight handler of PoC menu
  430.  * PARAMETERS
  431.  *  void
  432.  * RETURNS
  433.  *  void
  434.  *****************************************************************************/
  435. void mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_block(void)
  436. {
  437.     /*----------------------------------------------------------------*/
  438.     /* Local Variables                                                */
  439.     /*----------------------------------------------------------------*/
  440.     /*----------------------------------------------------------------*/
  441.     /* Code Body                                                      */
  442.     /*----------------------------------------------------------------*/
  443.     SetLeftSoftkeyFunction(mmi_poc_entry_allow_subscribe_block, KEY_EVENT_UP);
  444.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  445.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  446.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  447. }
  448. /*****************************************************************************
  449.  * FUNCTION
  450.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_polite_block
  451.  * DESCRIPTION
  452.  *  Highlight handler of PoC menu
  453.  * PARAMETERS
  454.  *  void
  455.  * RETURNS
  456.  *  void
  457.  *****************************************************************************/
  458. void mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_polite_block(void)
  459. {
  460.     /*----------------------------------------------------------------*/
  461.     /* Local Variables                                                */
  462.     /*----------------------------------------------------------------*/
  463.     /*----------------------------------------------------------------*/
  464.     /* Code Body                                                      */
  465.     /*----------------------------------------------------------------*/
  466.     SetLeftSoftkeyFunction(mmi_poc_entry_allow_subscribe_polite_block, KEY_EVENT_UP);
  467.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  468.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  469.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  470. }
  471. /*****************************************************************************
  472.  * FUNCTION
  473.  *  mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_allow
  474.  * DESCRIPTION
  475.  *  Highlight handler of PoC menu
  476.  * PARAMETERS
  477.  *  void
  478.  * RETURNS
  479.  *  void
  480.  *****************************************************************************/
  481. void mmi_poc_highlight_contact_opt_settings_attributes_allow_subscribe_allow(void)
  482. {
  483.     /*----------------------------------------------------------------*/
  484.     /* Local Variables                                                */
  485.     /*----------------------------------------------------------------*/
  486.     /*----------------------------------------------------------------*/
  487.     /* Code Body                                                      */
  488.     /*----------------------------------------------------------------*/
  489.     SetLeftSoftkeyFunction(mmi_poc_entry_allow_subscribe_allow, KEY_EVENT_UP);
  490.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  491.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  492.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  493. }
  494. /*****************************************************************************
  495.  * FUNCTION
  496.  *  mmi_poc_highlight_contact_opt_settings_attributes_provide_pres
  497.  * DESCRIPTION
  498.  *  Highlight handler of PoC menu
  499.  * PARAMETERS
  500.  *  void
  501.  * RETURNS
  502.  *  void
  503.  *****************************************************************************/
  504. void mmi_poc_highlight_contact_opt_settings_attributes_provide_pres(void)
  505. {
  506.     /*----------------------------------------------------------------*/
  507.     /* Local Variables                                                */
  508.     /*----------------------------------------------------------------*/
  509.     /*----------------------------------------------------------------*/
  510.     /* Code Body                                                      */
  511.     /*----------------------------------------------------------------*/
  512.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_attributes_provide_pres, KEY_EVENT_UP);
  513.     SetKeyHandler(mmi_poc_entry_contact_opt_settings_attributes_provide_pres, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  514.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  515.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  516. }
  517. /*****************************************************************************
  518.  * FUNCTION
  519.  *  mmi_poc_highlight_contact_opt_settings_attributes_subscribe_pres
  520.  * DESCRIPTION
  521.  *  Highlight handler of PoC menu
  522.  * PARAMETERS
  523.  *  void
  524.  * RETURNS
  525.  *  void
  526.  *****************************************************************************/
  527. void mmi_poc_highlight_contact_opt_settings_attributes_subscribe_pres(void)
  528. {
  529.     /*----------------------------------------------------------------*/
  530.     /* Local Variables                                                */
  531.     /*----------------------------------------------------------------*/
  532.     /*----------------------------------------------------------------*/
  533.     /* Code Body                                                      */
  534.     /*----------------------------------------------------------------*/
  535.     SetLeftSoftkeyFunction(mmi_poc_contact_set_subscribe_pres, KEY_EVENT_UP);
  536.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  537.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  538.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  539. }
  540. /*****************************************************************************
  541.  * FUNCTION
  542.  *  mmi_poc_highlight_contact_opt_send_alert
  543.  * DESCRIPTION
  544.  *  Highlight handler of PoC menu
  545.  * PARAMETERS
  546.  *  void
  547.  * RETURNS
  548.  *  void
  549.  *****************************************************************************/
  550. void mmi_poc_highlight_contact_opt_send_alert(void)
  551. {
  552.     /*----------------------------------------------------------------*/
  553.     /* Local Variables                                                */
  554.     /*----------------------------------------------------------------*/
  555.     /*----------------------------------------------------------------*/
  556.     /* Code Body                                                      */
  557.     /*----------------------------------------------------------------*/
  558.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_send_alert, KEY_EVENT_UP);
  559.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  560.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  561.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  562. }
  563. /*****************************************************************************
  564.  * FUNCTION
  565.  *  mmi_poc_highlight_contact_opt_adhoc_talk
  566.  * DESCRIPTION
  567.  *  Highlight handler of PoC menu
  568.  * PARAMETERS
  569.  *  void
  570.  * RETURNS
  571.  *  void
  572.  *****************************************************************************/
  573. void mmi_poc_highlight_contact_opt_adhoc_talk(void)
  574. {
  575.     /*----------------------------------------------------------------*/
  576.     /* Local Variables                                                */
  577.     /*----------------------------------------------------------------*/
  578.     /*----------------------------------------------------------------*/
  579.     /* Code Body                                                      */
  580.     /*----------------------------------------------------------------*/
  581.     SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_adhoc_talk, KEY_EVENT_UP);
  582.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  583.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  584.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  585. }
  586. /*****************************************************************************
  587.  * FUNCTION
  588.  *  mmi_poc_highlight_contact_opt_refresh_status
  589.  * DESCRIPTION
  590.  *  Highlight handler of PoC menu
  591.  * PARAMETERS
  592.  *  void
  593.  * RETURNS
  594.  *  void
  595.  *****************************************************************************/
  596. void mmi_poc_highlight_contact_opt_refresh_status(void)
  597. {
  598.     /*----------------------------------------------------------------*/
  599.     /* Local Variables                                                */
  600.     /*----------------------------------------------------------------*/
  601.     /*----------------------------------------------------------------*/
  602.     /* Code Body                                                      */
  603.     /*----------------------------------------------------------------*/
  604.     SetLeftSoftkeyFunction(mmi_poc_contact_send_refresh_status, KEY_EVENT_UP);
  605.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  606.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  607.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  608. }
  609. /*****************************************************************************
  610.  * FUNCTION
  611.  *  mmi_poc_highlight_talk_groups
  612.  * DESCRIPTION
  613.  *  Highlight handler of PoC menu
  614.  * PARAMETERS
  615.  *  void
  616.  * RETURNS
  617.  *  void
  618.  *****************************************************************************/
  619. void mmi_poc_highlight_talk_groups(void)
  620. {
  621.     /*----------------------------------------------------------------*/
  622.     /* Local Variables                                                */
  623.     /*----------------------------------------------------------------*/
  624.     /*----------------------------------------------------------------*/
  625.     /* Code Body                                                      */
  626.     /*----------------------------------------------------------------*/
  627.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups, KEY_EVENT_UP);
  628.     SetKeyHandler(mmi_poc_entry_talk_groups, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  629.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  630.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  631. }
  632. /*****************************************************************************
  633.  * FUNCTION
  634.  *  mmi_poc_highlight_talk_groups_opt
  635.  * DESCRIPTION
  636.  *  Highlight handler of PoC menu
  637.  * PARAMETERS
  638.  *  void
  639.  * RETURNS
  640.  *  void
  641.  *****************************************************************************/
  642. void mmi_poc_highlight_talk_groups_opt(void)
  643. {
  644.     /*----------------------------------------------------------------*/
  645.     /* Local Variables                                                */
  646.     /*----------------------------------------------------------------*/
  647.     /*----------------------------------------------------------------*/
  648.     /* Code Body                                                      */
  649.     /*----------------------------------------------------------------*/
  650.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt, KEY_EVENT_UP);
  651.     SetKeyHandler(mmi_poc_entry_talk_groups_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  652.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  653.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  654. }
  655. /*****************************************************************************
  656.  * FUNCTION
  657.  *  mmi_poc_highlight_talk_groups_opt_entry_settings
  658.  * DESCRIPTION
  659.  *  Highlight handler of PoC menu
  660.  * PARAMETERS
  661.  *  void
  662.  * RETURNS
  663.  *  void
  664.  *****************************************************************************/
  665. void mmi_poc_highlight_talk_groups_opt_entry_settings(void)
  666. {
  667.     /*----------------------------------------------------------------*/
  668.     /* Local Variables                                                */
  669.     /*----------------------------------------------------------------*/
  670.     /*----------------------------------------------------------------*/
  671.     /* Code Body                                                      */
  672.     /*----------------------------------------------------------------*/
  673.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_entry_settings, KEY_EVENT_UP);
  674.     SetKeyHandler(mmi_poc_entry_talk_groups_opt_entry_settings, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  675.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  676.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  677. }
  678. /*****************************************************************************
  679.  * FUNCTION
  680.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_add
  681.  * DESCRIPTION
  682.  *  Highlight handler of PoC menu
  683.  * PARAMETERS
  684.  *  void
  685.  * RETURNS
  686.  *  void
  687.  *****************************************************************************/
  688. void mmi_poc_highlight_talk_groups_opt_entry_settings_add(void)
  689. {
  690.     /*----------------------------------------------------------------*/
  691.     /* Local Variables                                                */
  692.     /*----------------------------------------------------------------*/
  693.     /*----------------------------------------------------------------*/
  694.     /* Code Body                                                      */
  695.     /*----------------------------------------------------------------*/
  696.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_entry_settings_add, KEY_EVENT_UP);
  697.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  698.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  699.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  700. }
  701. /*****************************************************************************
  702.  * FUNCTION
  703.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_add_from_contact
  704.  * DESCRIPTION
  705.  *  Highlight handler of PoC menu
  706.  * PARAMETERS
  707.  *  void
  708.  * RETURNS
  709.  *  void
  710.  *****************************************************************************/
  711. void mmi_poc_highlight_talk_groups_opt_entry_settings_add_from_contact(void)
  712. {
  713.     /*----------------------------------------------------------------*/
  714.     /* Local Variables                                                */
  715.     /*----------------------------------------------------------------*/
  716.     /*----------------------------------------------------------------*/
  717.     /* Code Body                                                      */
  718.     /*----------------------------------------------------------------*/
  719.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_entry_settings_add_from_contact, KEY_EVENT_UP);
  720.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  721.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  722.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  723. }
  724. /*****************************************************************************
  725.  * FUNCTION
  726.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_delete
  727.  * DESCRIPTION
  728.  *  Highlight handler of PoC menu
  729.  * PARAMETERS
  730.  *  void
  731.  * RETURNS
  732.  *  void
  733.  *****************************************************************************/
  734. void mmi_poc_highlight_talk_groups_opt_entry_settings_delete(void)
  735. {
  736.     /*----------------------------------------------------------------*/
  737.     /* Local Variables                                                */
  738.     /*----------------------------------------------------------------*/
  739.     /*----------------------------------------------------------------*/
  740.     /* Code Body                                                      */
  741.     /*----------------------------------------------------------------*/
  742.     SetLeftSoftkeyFunction(mmi_poc_talk_groups_opt_entry_delete_cfrm, KEY_EVENT_UP);
  743.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  744.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  745.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  746. }
  747. /*****************************************************************************
  748.  * FUNCTION
  749.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_info
  750.  * DESCRIPTION
  751.  *  Highlight handler of PoC menu
  752.  * PARAMETERS
  753.  *  void
  754.  * RETURNS
  755.  *  void
  756.  *****************************************************************************/
  757. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_info(void)
  758. {
  759.     /*----------------------------------------------------------------*/
  760.     /* Local Variables                                                */
  761.     /*----------------------------------------------------------------*/
  762.     /*----------------------------------------------------------------*/
  763.     /* Code Body                                                      */
  764.     /*----------------------------------------------------------------*/
  765.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_entry_settings_entry_info, KEY_EVENT_UP);
  766.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  767.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  768.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  769. }
  770. /*****************************************************************************
  771.  * FUNCTION
  772.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_conf_state
  773.  * DESCRIPTION
  774.  *  Highlight handler of PoC menu
  775.  * PARAMETERS
  776.  *  void
  777.  * RETURNS
  778.  *  void
  779.  *****************************************************************************/
  780. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_conf_state(void)
  781. {
  782.     /*----------------------------------------------------------------*/
  783.     /* Local Variables                                                */
  784.     /*----------------------------------------------------------------*/
  785.     /*----------------------------------------------------------------*/
  786.     /* Code Body                                                      */
  787.     /*----------------------------------------------------------------*/
  788.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_conf_state, KEY_EVENT_UP);
  789.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  790.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  791.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  792. }
  793. /*****************************************************************************
  794.  * FUNCTION
  795.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_invite_user_dyna
  796.  * DESCRIPTION
  797.  *  Highlight handler of PoC menu
  798.  * PARAMETERS
  799.  *  void
  800.  * RETURNS
  801.  *  void
  802.  *****************************************************************************/
  803. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_invite_user_dyna(void)
  804. {
  805.     /*----------------------------------------------------------------*/
  806.     /* Local Variables                                                */
  807.     /*----------------------------------------------------------------*/
  808.     /*----------------------------------------------------------------*/
  809.     /* Code Body                                                      */
  810.     /*----------------------------------------------------------------*/
  811.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_invite_user_dyna, KEY_EVENT_UP);
  812.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  813.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  814.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  815. }
  816. /*****************************************************************************
  817.  * FUNCTION
  818.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_join_handling
  819.  * DESCRIPTION
  820.  *  Highlight handler of PoC menu
  821.  * PARAMETERS
  822.  *  void
  823.  * RETURNS
  824.  *  void
  825.  *****************************************************************************/
  826. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_join_handling(void)
  827. {
  828.     /*----------------------------------------------------------------*/
  829.     /* Local Variables                                                */
  830.     /*----------------------------------------------------------------*/
  831.     /*----------------------------------------------------------------*/
  832.     /* Code Body                                                      */
  833.     /*----------------------------------------------------------------*/
  834.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_join_handling, KEY_EVENT_UP);
  835.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  836.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  837.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  838. }
  839. /*****************************************************************************
  840.  * FUNCTION
  841.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_init_conf
  842.  * DESCRIPTION
  843.  *  Highlight handler of PoC menu
  844.  * PARAMETERS
  845.  *  void
  846.  * RETURNS
  847.  *  void
  848.  *****************************************************************************/
  849. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_init_conf(void)
  850. {
  851.     /*----------------------------------------------------------------*/
  852.     /* Local Variables                                                */
  853.     /*----------------------------------------------------------------*/
  854.     /*----------------------------------------------------------------*/
  855.     /* Code Body                                                      */
  856.     /*----------------------------------------------------------------*/
  857.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_init_conf, KEY_EVENT_UP);
  858.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  859.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  860.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  861. }
  862. /*****************************************************************************
  863.  * FUNCTION
  864.  *  mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_anonymity
  865.  * DESCRIPTION
  866.  *  Highlight handler of PoC menu
  867.  * PARAMETERS
  868.  *  void
  869.  * RETURNS
  870.  *  void
  871.  *****************************************************************************/
  872. void mmi_poc_highlight_talk_groups_opt_entry_settings_entry_attributes_anonymity(void)
  873. {
  874.     /*----------------------------------------------------------------*/
  875.     /* Local Variables                                                */
  876.     /*----------------------------------------------------------------*/
  877.     /*----------------------------------------------------------------*/
  878.     /* Code Body                                                      */
  879.     /*----------------------------------------------------------------*/
  880.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_anonymity, KEY_EVENT_UP);
  881.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  882.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  883.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  884. }
  885. /*****************************************************************************
  886.  * FUNCTION
  887.  *  mmi_poc_highlight_talk_groups_opt_add_group
  888.  * DESCRIPTION
  889.  *  Highlight handler of PoC menu
  890.  * PARAMETERS
  891.  *  void
  892.  * RETURNS
  893.  *  void
  894.  *****************************************************************************/
  895. void mmi_poc_highlight_talk_groups_opt_add_group(void)
  896. {
  897.     /*----------------------------------------------------------------*/
  898.     /* Local Variables                                                */
  899.     /*----------------------------------------------------------------*/
  900.     /*----------------------------------------------------------------*/
  901.     /* Code Body                                                      */
  902.     /*----------------------------------------------------------------*/
  903.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_add_group, KEY_EVENT_UP);
  904.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  905.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  906.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  907. }
  908. /*****************************************************************************
  909.  * FUNCTION
  910.  *  mmi_poc_highlight_talk_groups_opt_delete_group
  911.  * DESCRIPTION
  912.  *  Highlight handler of PoC menu
  913.  * PARAMETERS
  914.  *  void
  915.  * RETURNS
  916.  *  void
  917.  *****************************************************************************/
  918. void mmi_poc_highlight_talk_groups_opt_delete_group(void)
  919. {
  920.     /*----------------------------------------------------------------*/
  921.     /* Local Variables                                                */
  922.     /*----------------------------------------------------------------*/
  923.     /*----------------------------------------------------------------*/
  924.     /* Code Body                                                      */
  925.     /*----------------------------------------------------------------*/
  926.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_group_opt_delete_cfrm, KEY_EVENT_UP);
  927.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  928.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  929.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  930. }
  931. /*****************************************************************************
  932.  * FUNCTION
  933.  *  mmi_poc_highlight_talk_groups_opt_group_info
  934.  * DESCRIPTION
  935.  *  Highlight handler of PoC menu
  936.  * PARAMETERS
  937.  *  void
  938.  * RETURNS
  939.  *  void
  940.  *****************************************************************************/
  941. void mmi_poc_highlight_talk_groups_opt_group_info(void)
  942. {
  943.     /*----------------------------------------------------------------*/
  944.     /* Local Variables                                                */
  945.     /*----------------------------------------------------------------*/
  946.     /*----------------------------------------------------------------*/
  947.     /* Code Body                                                      */
  948.     /*----------------------------------------------------------------*/
  949.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_group_info, KEY_EVENT_UP);
  950.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  951.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  952.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  953. }
  954. /*****************************************************************************
  955.  * FUNCTION
  956.  *  mmi_poc_highlight_talk_groups_info_entry_attributes_conf_state
  957.  * DESCRIPTION
  958.  *  Highlight handler of PoC menu
  959.  * PARAMETERS
  960.  *  void
  961.  * RETURNS
  962.  *  void
  963.  *****************************************************************************/
  964. void mmi_poc_highlight_talk_groups_info_entry_attributes_conf_state(void)
  965. {
  966.     /*----------------------------------------------------------------*/
  967.     /* Local Variables                                                */
  968.     /*----------------------------------------------------------------*/
  969.     /*----------------------------------------------------------------*/
  970.     /* Code Body                                                      */
  971.     /*----------------------------------------------------------------*/
  972.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_default_conf_state, KEY_EVENT_UP);
  973.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  974.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  975.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  976. }
  977. /*****************************************************************************
  978.  * FUNCTION
  979.  *  mmi_poc_highlight_talk_groups_info_entry_attributes_invite_user_dyna
  980.  * DESCRIPTION
  981.  *  Highlight handler of PoC menu
  982.  * PARAMETERS
  983.  *  void
  984.  * RETURNS
  985.  *  void
  986.  *****************************************************************************/
  987. void mmi_poc_highlight_talk_groups_info_entry_attributes_invite_user_dyna(void)
  988. {
  989.     /*----------------------------------------------------------------*/
  990.     /* Local Variables                                                */
  991.     /*----------------------------------------------------------------*/
  992.     /*----------------------------------------------------------------*/
  993.     /* Code Body                                                      */
  994.     /*----------------------------------------------------------------*/
  995.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_default_invite_user_dyna, KEY_EVENT_UP);
  996.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  997.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  998.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  999. }
  1000. /*****************************************************************************
  1001.  * FUNCTION
  1002.  *  mmi_poc_highlight_talk_groups_info_entry_attributes_join_handling
  1003.  * DESCRIPTION
  1004.  *  Highlight handler of PoC menu
  1005.  * PARAMETERS
  1006.  *  void
  1007.  * RETURNS
  1008.  *  void
  1009.  *****************************************************************************/
  1010. void mmi_poc_highlight_talk_groups_info_entry_attributes_join_handling(void)
  1011. {
  1012.     /*----------------------------------------------------------------*/
  1013.     /* Local Variables                                                */
  1014.     /*----------------------------------------------------------------*/
  1015.     /*----------------------------------------------------------------*/
  1016.     /* Code Body                                                      */
  1017.     /*----------------------------------------------------------------*/
  1018.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_default_join_handling, KEY_EVENT_UP);
  1019.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1020.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1021.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1022. }
  1023. /*****************************************************************************
  1024.  * FUNCTION
  1025.  *  mmi_poc_highlight_talk_groups_info_entry_attributes_init_conf
  1026.  * DESCRIPTION
  1027.  *  Highlight handler of PoC menu
  1028.  * PARAMETERS
  1029.  *  void
  1030.  * RETURNS
  1031.  *  void
  1032.  *****************************************************************************/
  1033. void mmi_poc_highlight_talk_groups_info_entry_attributes_init_conf(void)
  1034. {
  1035.     /*----------------------------------------------------------------*/
  1036.     /* Local Variables                                                */
  1037.     /*----------------------------------------------------------------*/
  1038.     /*----------------------------------------------------------------*/
  1039.     /* Code Body                                                      */
  1040.     /*----------------------------------------------------------------*/
  1041.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_default_init_conf, KEY_EVENT_UP);
  1042.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1043.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1044.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1045. }
  1046. /*****************************************************************************
  1047.  * FUNCTION
  1048.  *  mmi_poc_highlight_talk_groups_info_entry_attributes_anonymity
  1049.  * DESCRIPTION
  1050.  *  Highlight handler of PoC menu
  1051.  * PARAMETERS
  1052.  *  void
  1053.  * RETURNS
  1054.  *  void
  1055.  *****************************************************************************/
  1056. void mmi_poc_highlight_talk_groups_info_entry_attributes_anonymity(void)
  1057. {
  1058.     /*----------------------------------------------------------------*/
  1059.     /* Local Variables                                                */
  1060.     /*----------------------------------------------------------------*/
  1061.     /*----------------------------------------------------------------*/
  1062.     /* Code Body                                                      */
  1063.     /*----------------------------------------------------------------*/
  1064.     SetLeftSoftkeyFunction(mmi_poc_talk_group_set_default_anonymity, KEY_EVENT_UP);
  1065.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1066.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1067.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1068. }
  1069. /*****************************************************************************
  1070.  * FUNCTION
  1071.  *  mmi_poc_highlight_talk_groups_opt_call_others_group
  1072.  * DESCRIPTION
  1073.  *  Highlight handler of PoC menu
  1074.  * PARAMETERS
  1075.  *  void
  1076.  * RETURNS
  1077.  *  void
  1078.  *****************************************************************************/
  1079. void mmi_poc_highlight_talk_groups_opt_call_others_group(void)
  1080. {
  1081.     /*----------------------------------------------------------------*/
  1082.     /* Local Variables                                                */
  1083.     /*----------------------------------------------------------------*/
  1084.     /*----------------------------------------------------------------*/
  1085.     /* Code Body                                                      */
  1086.     /*----------------------------------------------------------------*/
  1087.     SetLeftSoftkeyFunction(mmi_poc_entry_talk_groups_opt_call_others_group, KEY_EVENT_UP);
  1088.     SetKeyHandler(0, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1089.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1090.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1091. }
  1092. /*****************************************************************************
  1093.  * FUNCTION
  1094.  *  mmi_poc_hint_allow_invite
  1095.  * DESCRIPTION
  1096.  *  Hint handler of PoC menu
  1097.  * PARAMETERS
  1098.  *  index       [IN]        
  1099.  * RETURNS
  1100.  *  void
  1101.  *****************************************************************************/
  1102. void mmi_poc_hint_allow_invite(U16 index)
  1103. {
  1104.     /*----------------------------------------------------------------*/
  1105.     /* Local Variables                                                */
  1106.     /*----------------------------------------------------------------*/
  1107.     /*----------------------------------------------------------------*/
  1108.     /* Code Body                                                      */
  1109.     /*----------------------------------------------------------------*/
  1110.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1111.     switch (g_poc_cntx_p->contact_entry_disp.allow_invite)
  1112.     {
  1113.         case POC_SETTING_TRUE:
  1114.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_MANUAL_ANS));
  1115.             break;
  1116.         case POC_SETTING_FALSE:
  1117.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_REJECT));
  1118.             break;
  1119.         case POC_SETTING_ACCEPT:
  1120.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_AUTO_ACCEPT));
  1121.             break;
  1122.         default:
  1123.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1124.             break;
  1125.     }
  1126. }
  1127. /*****************************************************************************
  1128.  * FUNCTION
  1129.  *  mmi_poc_hint_allow_subscribe
  1130.  * DESCRIPTION
  1131.  *  Hint handler of PoC menu
  1132.  * PARAMETERS
  1133.  *  index       [IN]        
  1134.  * RETURNS
  1135.  *  void
  1136.  *****************************************************************************/
  1137. void mmi_poc_hint_allow_subscribe(U16 index)
  1138. {
  1139.     /*----------------------------------------------------------------*/
  1140.     /* Local Variables                                                */
  1141.     /*----------------------------------------------------------------*/
  1142.     /*----------------------------------------------------------------*/
  1143.     /* Code Body                                                      */
  1144.     /*----------------------------------------------------------------*/
  1145.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1146.     switch (g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling)
  1147.     {
  1148.         case POC_MMI_SUB_BLOCK:
  1149.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_REJECT));
  1150.             break;
  1151.         case POC_MMI_SUB_POLITE_BLOCK:
  1152.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_POLITE_BLOCK));
  1153.             break;
  1154.         case POC_MMI_SUB_ALLOW:
  1155.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_ID_POC_ACCEPT));
  1156.             break;
  1157.         default:
  1158.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_EMPTY));
  1159.             break;
  1160.     }
  1161. }
  1162. /*****************************************************************************
  1163.  * FUNCTION
  1164.  *  mmi_poc_hint_subscribe_pres
  1165.  * DESCRIPTION
  1166.  *  Hint handler of PoC menu
  1167.  * PARAMETERS
  1168.  *  index       [IN]        
  1169.  * RETURNS
  1170.  *  void
  1171.  *****************************************************************************/
  1172. void mmi_poc_hint_subscribe_pres(U16 index)
  1173. {
  1174.     /*----------------------------------------------------------------*/
  1175.     /* Local Variables                                                */
  1176.     /*----------------------------------------------------------------*/
  1177.     /*----------------------------------------------------------------*/
  1178.     /* Code Body                                                      */
  1179.     /*----------------------------------------------------------------*/
  1180.     memset((S8*) hintData[(index)], 0, MAX_SUB_MENU_SIZE);
  1181.     switch (g_poc_cntx_p->contact_entry_disp.sub_pres)
  1182.     {
  1183.         case POC_SETTING_TRUE:
  1184.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_ON));
  1185.             break;
  1186.         default:
  1187.             pfnUnicodeStrcpy((S8*) hintData[index], (PS8) GetString(STR_GLOBAL_OFF));
  1188.             break;
  1189.     }
  1190. }
  1191. /*****************************************************************************
  1192.  * FUNCTION
  1193.  *  mmi_poc_entry_contact
  1194.  * DESCRIPTION
  1195.  *  poc contact screen
  1196.  * PARAMETERS
  1197.  *  void
  1198.  * RETURNS
  1199.  *  void
  1200.  *****************************************************************************/
  1201. void mmi_poc_entry_contact(void)
  1202. {
  1203.     /*----------------------------------------------------------------*/
  1204.     /* Local Variables                                                */
  1205.     /*----------------------------------------------------------------*/
  1206.     U8 *nStrItemList[POC_MAX_CONTACT_DISPLAY_NUM];
  1207.     U8 *guiBuffer;
  1208.     BOOL list_is_ready_p;
  1209.     /*----------------------------------------------------------------*/
  1210.     /* Code Body                                                      */
  1211.     /*----------------------------------------------------------------*/
  1212.     if (g_poc_cntx_p->progressing.contact == MMI_TRUE)
  1213.     {
  1214.         DisplayPopup(
  1215.             (U8*) GetString(STR_ID_POC_PROCESSING),
  1216.             IMG_GLOBAL_WARNING,
  1217.             1,
  1218.             UI_POPUP_NOTIFYDURATION_TIME,
  1219.             (U8) WARNING_TONE);
  1220.         return;
  1221.     }
  1222.     mmi_poc_check_and_update_contact();
  1223.     EntryNewScreen(SCR_ID_POC_CONTACT, NULL, mmi_poc_entry_contact, NULL);
  1224.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT);
  1225.     RegisterHighlightHandler(mmi_poc_contact_highlight_handler);
  1226.     if (g_poc_cntx_p->contact_num == 0)
  1227.     {
  1228.         pfnUnicodeStrcpy((S8*) g_poc_cntx_p->contact_entry_disp.display_name, (PS8) GetString(STR_GLOBAL_EMPTY_LIST));
  1229.         nStrItemList[0] = g_poc_cntx_p->contact_entry_disp.display_name;
  1230.         ShowCategory6Screen(
  1231.             STR_ID_POC_CONTACTS,
  1232.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  1233.             STR_GLOBAL_ADD,
  1234.             IMG_GLOBAL_OK,
  1235.             STR_GLOBAL_BACK,
  1236.             IMG_GLOBAL_BACK,
  1237.             1,
  1238.             nStrItemList,
  1239.             NULL,
  1240.             0,
  1241.             guiBuffer);
  1242.         SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt_settings_add, KEY_EVENT_UP);
  1243.     }
  1244.     else
  1245.     {
  1246.         if (guiBuffer != NULL)
  1247.         {
  1248.             memset((void*)guiBuffer, 0, 2);
  1249.             if (g_poc_cntx_p->contact_selected >= g_poc_cntx_p->contact_num)
  1250.             {
  1251.                 g_poc_cntx_p->contact_selected = g_poc_cntx_p->contact_num - 1;
  1252.             }
  1253.         }
  1254.         else
  1255.         {
  1256.             g_poc_cntx_p->contact_selected = 0;
  1257.         }
  1258.         ShowCategory425Screen(
  1259.             (UI_string_type) GetString(STR_ID_POC_CONTACTS),
  1260.             STR_GLOBAL_OPTIONS,
  1261.             IMG_GLOBAL_OPTIONS,
  1262.             STR_GLOBAL_BACK,
  1263.             IMG_GLOBAL_BACK,
  1264.             0,
  1265.             0,
  1266.             0,
  1267.             g_poc_cntx_p->contact_num,
  1268.             mmi_poc_contact_get_items,
  1269.             mmi_poc_contact_get_hints,
  1270.             (PU8) GetImage(IMG_ID_POC_ONLINE),
  1271.             (PU8) GetImage(IMG_ID_POC_ONLINE),
  1272.             g_poc_cntx_p->contact_selected,
  1273.             guiBuffer,
  1274.             &list_is_ready_p);
  1275.         SetLeftSoftkeyFunction(mmi_poc_entry_contact_opt, KEY_EVENT_UP);
  1276.         SetKeyHandler(mmi_poc_entry_contact_opt, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1277.     }
  1278.     if (g_poc_cntx_p->contact_num > 0)
  1279.     {
  1280.         SetKeyHandler(mmi_poc_contact_1_to_1_invite, KEY_SEND, KEY_EVENT_DOWN);
  1281.     }
  1282.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1283.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1284. }
  1285. /*****************************************************************************
  1286.  * FUNCTION
  1287.  *  mmi_poc_contact_get_items
  1288.  * DESCRIPTION
  1289.  *  Fill items of contact list into UI buffers
  1290.  * PARAMETERS
  1291.  *  start_index     [IN]        Start index of item to be retrieved
  1292.  *  menu_data       [IN]        Address of menu data
  1293.  *  data_size       [IN]        Maximal number of menu items can be put in the buffer
  1294.  * RETURNS
  1295.  *  void
  1296.  *****************************************************************************/
  1297. S32 mmi_poc_contact_get_items(S32 start_index, gui_iconlist_menu_item *menu_data, S32 data_size)
  1298. {
  1299.     /*----------------------------------------------------------------*/
  1300.     /* Local Variables                                                */
  1301.     /*----------------------------------------------------------------*/
  1302.     S32 i, j;
  1303.     S32 count = (S32) g_poc_cntx_p->contact_num;
  1304.     mmi_poc_contact_list_disp *cont;
  1305.     gui_iconlist_menu_item *item = menu_data;
  1306.     /*----------------------------------------------------------------*/
  1307.     /* Code Body                                                      */
  1308.     /*----------------------------------------------------------------*/
  1309.     for (i = 0, j = (i + start_index); i < data_size && j < count; i++, j++)
  1310.     {
  1311.         cont = &g_poc_cntx_p->contact_list_disp[j];
  1312.         if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].pres.is_active == MMI_TRUE)
  1313.         {
  1314.             item->image_list[0] = (PU8) GetImage(IMG_ID_POC_ONLINE);
  1315.         }
  1316.         else
  1317.         {
  1318.             item->image_list[0] = (PU8) GetImage(IMG_ID_POC_OFFLINE);
  1319.         }
  1320.         item->image_list[1] = NULL;
  1321.         if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].allow_invite == POC_SETTING_FALSE)
  1322.         {
  1323.             item->image_list[2] = (PU8) GetImage(IMG_ID_POC_BLOCK);
  1324.         }
  1325.         else
  1326.         {
  1327.             item->image_list[2] = NULL;
  1328.         }
  1329.         mmi_poc_util_copy_with_dot(
  1330.             (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id]. display_name,
  1331.             (S8*) item->item_list[0],
  1332.             MAX_SUBMENU_CHARACTERS - 1);
  1333.         mmi_poc_util_copy_with_dot(
  1334.             (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1335.             (S8*) item->item_list[1],
  1336.             MAX_SUBMENU_CHARACTERS - 1);
  1337.         item++;
  1338.     }
  1339.     return i;
  1340. }
  1341. /*****************************************************************************
  1342.  * FUNCTION
  1343.  *  mmi_poc_contact_get_hints
  1344.  * DESCRIPTION
  1345.  *  Fill items of hint list into UI buffers. Currently, it's no use.
  1346.  * PARAMETERS
  1347.  *  start_index     [IN]        Start index of item to be retrieved
  1348.  *  hint_array      [IN]        Buffer to strore list of hints
  1349.  * RETURNS
  1350.  *  void
  1351.  *****************************************************************************/
  1352. S32 mmi_poc_contact_get_hints(S32 start_index, UI_string_type *hint_array)
  1353. {
  1354.     /*----------------------------------------------------------------*/
  1355.     /* Local Variables                                                */
  1356.     /*----------------------------------------------------------------*/
  1357.     /*----------------------------------------------------------------*/
  1358.     /* Code Body                                                      */
  1359.     /*----------------------------------------------------------------*/
  1360.     return (0);
  1361. }
  1362. /*****************************************************************************
  1363.  * FUNCTION
  1364.  *  mmi_poc_util_copy_with_dot
  1365.  * DESCRIPTION
  1366.  *  Append three dots to the end of string
  1367.  * PARAMETERS
  1368.  *  source      [IN]            Source buffer.
  1369.  *  dest        [IN/OUT]        Destination buffer.
  1370.  *  max_len     [IN]            Max characters can be put in destination buffer , including NULL terminate
  1371.  * RETURNS
  1372.  *  void
  1373.  *****************************************************************************/
  1374. void mmi_poc_util_copy_with_dot(S8 *source, S8 *dest, S32 max_len)
  1375. {
  1376.     /*----------------------------------------------------------------*/
  1377.     /* Local Variables                                                */
  1378.     /*----------------------------------------------------------------*/
  1379.     S8 *tmp_buff = OslMalloc((POC_MAX_URI_LEN + 1) * ENCODING_LENGTH);
  1380.     /*----------------------------------------------------------------*/
  1381.     /* Code Body                                                      */
  1382.     /*----------------------------------------------------------------*/
  1383.     AnsiiNToUnicodeString((S8*) tmp_buff, (S8*) source, POC_MAX_URI_LEN);
  1384.     if (pfnUnicodeStrlen(tmp_buff) <= max_len)
  1385.     {
  1386.         pfnUnicodeStrcpy((S8*) dest, (S8*) tmp_buff);
  1387.     }
  1388.     else
  1389.     {
  1390.         /* do not clear end of string because pfnUnicodeStrncpy will auto set NULL terminate */
  1391.         pfnUnicodeStrncpy((S8*) dest, (S8*) tmp_buff, max_len - 4);
  1392.         pfnUnicodeStrcat((S8*) dest, (S8*) g_poc_three_dot);
  1393.     }
  1394.     OslMfree(tmp_buff);
  1395. }
  1396. /*****************************************************************************
  1397.  * FUNCTION
  1398.  *  mmi_poc_sort_contact_by_name
  1399.  * DESCRIPTION
  1400.  *  sort contact by display name
  1401.  * PARAMETERS
  1402.  *  void
  1403.  * RETURNS
  1404.  *  void
  1405.  *****************************************************************************/
  1406. void mmi_poc_sort_contact_by_name(void)
  1407. {
  1408.     /*----------------------------------------------------------------*/
  1409.     /* Local Variables                                                */
  1410.     /*----------------------------------------------------------------*/
  1411.     U8 i, j;
  1412.     mmi_poc_contact_list_disp *cont1;
  1413.     mmi_poc_contact_list_disp *cont2;
  1414.     mmi_poc_contact_list_disp temp_contact;
  1415.     /*----------------------------------------------------------------*/
  1416.     /* Code Body                                                      */
  1417.     /*----------------------------------------------------------------*/
  1418.     for (i = 0; i < g_poc_cntx_p->contact_num; i++)
  1419.     {
  1420.         cont1 = &g_poc_cntx_p->contact_list_disp[i];
  1421.         for (j = i + 1; j < g_poc_cntx_p->contact_num; j++)
  1422.         {
  1423.             cont2 = &g_poc_cntx_p->contact_list_disp[j];
  1424.             if (strcmp(
  1425.                     (S8*) g_poc_cntx_p->contact_list[cont1->group_id].entries[cont1->entry_id].display_name,
  1426.                     (S8*) g_poc_cntx_p->contact_list[cont2->group_id].entries[cont2->entry_id].display_name) > 0)
  1427.             {
  1428.                 memcpy(&temp_contact, &g_poc_cntx_p->contact_list_disp[i], sizeof(mmi_poc_contact_list_disp));
  1429.                 memcpy(
  1430.                     &g_poc_cntx_p->contact_list_disp[i],
  1431.                     &g_poc_cntx_p->contact_list_disp[j],
  1432.                     sizeof(mmi_poc_contact_list_disp));
  1433.                 memcpy(&g_poc_cntx_p->contact_list_disp[j], &temp_contact, sizeof(mmi_poc_contact_list_disp));
  1434.             }
  1435.         }
  1436.     }
  1437. }
  1438. /*****************************************************************************
  1439.  * FUNCTION
  1440.  *  mmi_poc_check_and_update_contact
  1441.  * DESCRIPTION
  1442.  *  check and update contact, including sort
  1443.  * PARAMETERS
  1444.  *  void
  1445.  * RETURNS
  1446.  *  void
  1447.  *****************************************************************************/
  1448. void mmi_poc_check_and_update_contact(void)
  1449. {
  1450.     /*----------------------------------------------------------------*/
  1451.     /* Local Variables                                                */
  1452.     /*----------------------------------------------------------------*/
  1453.     U8 i, j;
  1454.     /*----------------------------------------------------------------*/
  1455.     /* Code Body                                                      */
  1456.     /*----------------------------------------------------------------*/
  1457.     if (g_poc_cntx_p->contact_local_updated == MMI_FALSE)
  1458.     {
  1459.         g_poc_cntx_p->contact_num = 0;
  1460.         memset(g_poc_cntx_p->contact_list_disp, 0, sizeof(mmi_poc_contact_list_disp) * POC_MAX_CONTACT_DISPLAY_NUM);
  1461.         for (i = 0; i < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; i++)
  1462.         {
  1463.             if (g_poc_cntx_p->contact_list[i].valid == MMI_TRUE)
  1464.             {
  1465.                 for (j = 0; j < g_poc_cntx_p->contact_list[i].no_entries; j++)
  1466.                 {
  1467.                     g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_num].group_id = i;
  1468.                     g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_num].entry_id = j;
  1469.                     g_poc_cntx_p->contact_num++;
  1470.                 }
  1471.             }
  1472.         }
  1473.         mmi_poc_sort_contact_by_name();
  1474.         g_poc_cntx_p->contact_local_updated = MMI_TRUE;
  1475.     }
  1476. }
  1477. /*****************************************************************************
  1478.  * FUNCTION
  1479.  *  mmi_poc_contact_highlight_handler
  1480.  * DESCRIPTION
  1481.  *  poc contact highlight handler
  1482.  * PARAMETERS
  1483.  *  index       [IN]        Current selected index
  1484.  * RETURNS
  1485.  *  void
  1486.  *****************************************************************************/
  1487. void mmi_poc_contact_highlight_handler(S32 index)
  1488. {
  1489.     /*----------------------------------------------------------------*/
  1490.     /* Local Variables                                                */
  1491.     /*----------------------------------------------------------------*/
  1492.     /*----------------------------------------------------------------*/
  1493.     /* Code Body                                                      */
  1494.     /*----------------------------------------------------------------*/
  1495.     g_poc_cntx_p->contact_selected = (U8) index;
  1496.     return;
  1497. }
  1498. /*****************************************************************************
  1499.  * FUNCTION
  1500.  *  mmi_poc_entry_contact_opt
  1501.  * DESCRIPTION
  1502.  *  contact option screen
  1503.  * PARAMETERS
  1504.  *  void
  1505.  * RETURNS
  1506.  *  void
  1507.  *****************************************************************************/
  1508. void mmi_poc_entry_contact_opt(void)
  1509. {
  1510.     /*----------------------------------------------------------------*/
  1511.     /* Local Variables                                                */
  1512.     /*----------------------------------------------------------------*/
  1513.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  1514.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  1515.     U8 *guiBuffer;                      /* Buffer holding history data */
  1516.     U16 menuId;
  1517.     /*----------------------------------------------------------------*/
  1518.     /* Code Body                                                      */
  1519.     /*----------------------------------------------------------------*/
  1520.     EntryNewScreen(SCR_ID_POC_CONTACT_OPT, NULL, mmi_poc_entry_contact_opt, NULL);
  1521.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_OPT);
  1522.     menuId = MENU_ID_POC_CONTACT_OPT;
  1523.     nNumofItem = GetNumOfChild(menuId);
  1524.     GetSequenceStringIds(menuId, nStrItemList);
  1525.     SetParentHandler(menuId);
  1526.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1527.     ShowCategory15Screen(
  1528.         STR_GLOBAL_OPTIONS,
  1529.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1530.         STR_GLOBAL_OK,
  1531.         IMG_GLOBAL_OK,
  1532.         STR_GLOBAL_BACK,
  1533.         IMG_GLOBAL_BACK,
  1534.         nNumofItem,
  1535.         nStrItemList,
  1536.         (U16*) gIndexIconsImageList,
  1537.         1,
  1538.         0,
  1539.         guiBuffer);
  1540.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1541.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1542. }
  1543. /*****************************************************************************
  1544.  * FUNCTION
  1545.  *  mmi_poc_entry_contact_opt_settings
  1546.  * DESCRIPTION
  1547.  *  contact option setting screen
  1548.  * PARAMETERS
  1549.  *  void
  1550.  * RETURNS
  1551.  *  void
  1552.  *****************************************************************************/
  1553. void mmi_poc_entry_contact_opt_settings(void)
  1554. {
  1555.     /*----------------------------------------------------------------*/
  1556.     /* Local Variables                                                */
  1557.     /*----------------------------------------------------------------*/
  1558.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  1559.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  1560.     U8 *guiBuffer;                      /* Buffer holding history data */
  1561.     U16 menuId;
  1562.     /*----------------------------------------------------------------*/
  1563.     /* Code Body                                                      */
  1564.     /*----------------------------------------------------------------*/
  1565.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_SETTINGS, NULL, mmi_poc_entry_contact_opt_settings, NULL);
  1566.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_SETTINGS);
  1567.     menuId = MENU_ID_POC_CONTACT_OPT_SETTINGS;
  1568.     nNumofItem = GetNumOfChild(menuId);
  1569.     GetSequenceStringIds(menuId, nStrItemList);
  1570.     SetParentHandler(menuId);
  1571.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1572.     ShowCategory15Screen(
  1573.         STR_ID_POC_ENTRY_SETTINGS,
  1574.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1575.         STR_GLOBAL_OK,
  1576.         IMG_GLOBAL_OK,
  1577.         STR_GLOBAL_BACK,
  1578.         IMG_GLOBAL_BACK,
  1579.         nNumofItem,
  1580.         nStrItemList,
  1581.         (U16*) gIndexIconsImageList,
  1582.         1,
  1583.         0,
  1584.         guiBuffer);
  1585.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1586.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1587. }
  1588. /*****************************************************************************
  1589.  * FUNCTION
  1590.  *  mmi_poc_entry_contact_opt_settings_modify
  1591.  * DESCRIPTION
  1592.  *  contact option settings modify screen
  1593.  * PARAMETERS
  1594.  *  void
  1595.  * RETURNS
  1596.  *  void
  1597.  *****************************************************************************/
  1598. void mmi_poc_entry_contact_opt_settings_modify(void)
  1599. {
  1600.     /*----------------------------------------------------------------*/
  1601.     /* Local Variables                                                */
  1602.     /*----------------------------------------------------------------*/
  1603.     U8 i, ImageLocation = 0;
  1604.     U8 *inputBuffer;
  1605.     U8 *guiBuffer;
  1606.     U16 inputBufferSize;
  1607.     U16 IconList[POC_CONTACT_INLINE_NUM];
  1608.     mmi_poc_contact_list_disp *cont;
  1609.     /*----------------------------------------------------------------*/
  1610.     /* Code Body                                                      */
  1611.     /*----------------------------------------------------------------*/
  1612.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_MODIFY, mmi_poc_exit_contact_opt_settings_modify, NULL, NULL);
  1613.     InitializeCategory57Screen();
  1614.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_MODIFY);
  1615.     inputBuffer = GetCurrNInputBuffer(SCR_ID_POC_CONTACT_ENTRY_MODIFY, &inputBufferSize);
  1616.     SetParentHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_MODIFY);
  1617.     mmi_poc_contact_fill_inline_struct(XDM_PUT_REPLACE);
  1618.     if (inputBuffer != NULL)
  1619.     {
  1620.         SetCategory57Data(wgui_inline_items, POC_CONTACT_INLINE_NUM, inputBuffer);
  1621.     }
  1622.     else
  1623.     {
  1624.         cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  1625.         g_poc_cntx_p->contact_entry_disp.allow_invite =
  1626.             g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].allow_invite;
  1627.         g_poc_cntx_p->contact_entry_disp.sub_pres =
  1628.             g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres;
  1629.         memcpy(
  1630.             &g_poc_cntx_p->contact_entry_disp.auth_rule,
  1631.             &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].auth_rule,
  1632.             sizeof(poc_pres_authrule_struct));
  1633.         if (strlen((S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri))
  1634.         {
  1635.             AnsiiNToUnicodeString(
  1636.                 (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  1637.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  1638.                 POC_MAX_URI_LEN - 1);
  1639.         }
  1640.         else
  1641.         {
  1642.             AnsiiNToUnicodeString(
  1643.                 (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  1644.                 (S8*) POC_MMI_SIP_PREFIX,
  1645.                 POC_MAX_URI_LEN - 1);
  1646.         }
  1647.         AnsiiNToUnicodeString(
  1648.             (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  1649.             (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  1650.             POC_MAX_DISP_LEN - 1);
  1651.         memcpy(
  1652.             &g_poc_cntx_p->contact_entry_disp.pres,
  1653.             &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].pres,
  1654.             sizeof(mmi_poc_presence_struct));
  1655.     }
  1656.     if (guiBuffer == 0)
  1657.     {
  1658.         g_poc_cntx_p->inline_item_changed = MMI_FALSE;
  1659.     }
  1660.     if ((get_wgui_inline_list_menu_status() || g_poc_cntx_p->inline_item_changed) &&
  1661.         (GetInlineDoneFlag(guiBuffer) == 0))
  1662.     {
  1663.         SetInlineDoneFlag(guiBuffer);
  1664.     }
  1665.     for (i = 0; i < POC_CONTACT_INLINE_NUM; i++)
  1666.     {
  1667.         if (i % 2)
  1668.         {
  1669.             IconList[i] = IMG_ID_POC_NOIMAGE;
  1670.         }
  1671.         else
  1672.         {
  1673.             IconList[i] = IMG_ID_POC_CONTACT_NAME + ImageLocation;
  1674.             ImageLocation++;
  1675.         }
  1676.     }
  1677.     ShowCategory57Screen(
  1678.         STR_ID_POC_ENTRY_INFO,
  1679.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1680.         STR_GLOBAL_EDIT,
  1681.         IMG_GLOBAL_OK,
  1682.         STR_GLOBAL_BACK,
  1683.         IMG_GLOBAL_BACK,
  1684.         POC_CONTACT_INLINE_NUM,
  1685.         IconList,
  1686.         wgui_inline_items,
  1687.         0,
  1688.         guiBuffer);
  1689.     SetCategory57RightSoftkeyFunctions(mmi_poc_entry_contact_opt_settings_modify_cfrm, GoBackHistory);
  1690. }
  1691. /*****************************************************************************
  1692.  * FUNCTION
  1693.  *  mmi_poc_exit_contact_opt_settings_modify
  1694.  * DESCRIPTION
  1695.  *  modify exit screen
  1696.  * PARAMETERS
  1697.  *  void
  1698.  * RETURNS
  1699.  *  void
  1700.  *****************************************************************************/
  1701. void mmi_poc_exit_contact_opt_settings_modify(void)
  1702. {
  1703.     /*----------------------------------------------------------------*/
  1704.     /* Local Variables                                                */
  1705.     /*----------------------------------------------------------------*/
  1706.     /*----------------------------------------------------------------*/
  1707.     /* Code Body                                                      */
  1708.     /*----------------------------------------------------------------*/
  1709.     set_leading_zero(TRUE);
  1710.     GenericExitInlineScreen(SCR_ID_POC_CONTACT_ENTRY_MODIFY, mmi_poc_entry_contact_opt_settings_modify);
  1711. }
  1712. /*****************************************************************************
  1713.  * FUNCTION
  1714.  *  mmi_poc_contact_fill_inline_struct
  1715.  * DESCRIPTION
  1716.  *  fill inline editor structure
  1717.  * PARAMETERS
  1718.  *  op      [IN]        XDM_PUT_ADD or XDM_PUT_REPLACE
  1719.  * RETURNS
  1720.  *  void
  1721.  *****************************************************************************/
  1722. void mmi_poc_contact_fill_inline_struct(U8 op)
  1723. {
  1724.     /*----------------------------------------------------------------*/
  1725.     /* Local Variables                                                */
  1726.     /*----------------------------------------------------------------*/
  1727.     S32 BufferSize = 0;
  1728.     /*----------------------------------------------------------------*/
  1729.     /* Code Body                                                      */
  1730.     /*----------------------------------------------------------------*/
  1731.     SetInlineItemActivation((wgui_inline_items + POC_CONTACT_NAME), KEY_LSK, KEY_EVENT_UP);
  1732.     SetInlineItemActivation((wgui_inline_items + POC_CONTACT_URI), KEY_LSK, KEY_EVENT_UP);
  1733.     SetInlineItemActivation((wgui_inline_items + POC_CONTACT_ATTR), KEY_LSK, KEY_EVENT_UP);
  1734.     SetInlineItemCaption((wgui_inline_items + POC_CONTACT_NAME_STR), (U8*) GetString(STR_ID_POC_NAME));
  1735.     SetInlineItemCaption((wgui_inline_items + POC_CONTACT_URI_STR), (U8*) GetString(STR_ID_POC_URI));
  1736.     SetInlineItemCaption((wgui_inline_items + POC_CONTACT_ATTR_STR), (U8*) GetString(STR_ID_POC_ATTRIBUTES));
  1737.     BufferSize = POC_MAX_DISP_LEN - 1;
  1738.     SetInlineItemFullScreenEdit_ext(
  1739.         (wgui_inline_items + POC_CONTACT_NAME),
  1740.         STR_ID_POC_NAME,
  1741.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1742.         (U8*) (g_poc_cntx_p->contact_entry_disp.display_name),
  1743.         BufferSize,
  1744.         (INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES),
  1745.         INPUT_TYPE_EXT_NO_SHOW_NEW_LINE_SYMBOL);
  1746.     SetInlineFullScreenEditCustomFunction(wgui_inline_items + POC_CONTACT_NAME, mmi_poc_entry_full_line_edit);
  1747.     if (op == XDM_PUT_ADD)
  1748.     {
  1749.         BufferSize = POC_MAX_URI_LEN - 1;
  1750.         SetInlineItemFullScreenEdit_ext(
  1751.             (wgui_inline_items + POC_CONTACT_URI),
  1752.             STR_ID_POC_URI,
  1753.             GetRootTitleIcon(MENU_ID_POC_MAIN),
  1754.             (U8*) (g_poc_cntx_p->contact_entry_disp.uri),
  1755.             BufferSize,
  1756.             (INPUT_TYPE_ALPHANUMERIC_SENTENCECASE | INPUT_TYPE_USE_ONLY_ENGLISH_MODES),
  1757.             INPUT_TYPE_EXT_NO_SHOW_NEW_LINE_SYMBOL);
  1758.         SetInlineFullScreenEditCustomFunction(wgui_inline_items + POC_CONTACT_URI, mmi_poc_entry_full_line_edit);
  1759.     }
  1760.     else
  1761.     {
  1762.         SetInlineItemDisplayOnly(
  1763.             (wgui_inline_items + POC_TALK_GROUP_URI),
  1764.             (U8*) (g_poc_cntx_p->contact_entry_disp.uri));
  1765.     }
  1766.     SetInlineItemImageText(
  1767.         (wgui_inline_items + POC_CONTACT_ATTR),
  1768.         (U8*) GetString(STR_ID_POC_SET_ATTR),
  1769.         (PU8) NULL,
  1770.         NULL,
  1771.         NULL,
  1772.         POC_MAX_DISP_LEN,
  1773.         0,
  1774.         0,
  1775.         INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
  1776.     SetInlineFullScreenEditCustomFunctionImageText(
  1777.         (wgui_inline_items + POC_CONTACT_ATTR),
  1778.         mmi_poc_entry_contact_opt_settings_attributes);
  1779.     ShowAsControl(wgui_inline_items + POC_CONTACT_ATTR);
  1780. }
  1781. /*****************************************************************************
  1782.  * FUNCTION
  1783.  *  mmi_poc_entry_contact_opt_settings_add
  1784.  * DESCRIPTION
  1785.  *  settings add screen
  1786.  * PARAMETERS
  1787.  *  void
  1788.  * RETURNS
  1789.  *  void
  1790.  *****************************************************************************/
  1791. void mmi_poc_entry_contact_opt_settings_add(void)
  1792. {
  1793.     /*----------------------------------------------------------------*/
  1794.     /* Local Variables                                                */
  1795.     /*----------------------------------------------------------------*/
  1796.     U8 i, ImageLocation = 0;
  1797.     U8 *inputBuffer;
  1798.     U8 *guiBuffer;
  1799.     U16 inputBufferSize;
  1800.     U16 IconList[POC_CONTACT_INLINE_NUM];
  1801.     /*----------------------------------------------------------------*/
  1802.     /* Code Body                                                      */
  1803.     /*----------------------------------------------------------------*/
  1804.     if (g_poc_cntx_p->contact_num >= POC_GROUP_LOCAL_MAX_ENTRIES_NUM)
  1805.     {
  1806.         DisplayPopup(
  1807.             (U8*) GetString(STR_ID_POC_ERR_MAXIMUM_REACHED),
  1808.             IMG_GLOBAL_UNFINISHED,
  1809.             1,
  1810.             UI_POPUP_NOTIFYDURATION_TIME,
  1811.             (U8) ERROR_TONE);
  1812.         return;
  1813.     }
  1814.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_ADD, mmi_poc_exit_contact_opt_settings_add, NULL, NULL);
  1815.     InitializeCategory57Screen();
  1816.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_ADD);
  1817.     inputBuffer = GetCurrNInputBuffer(SCR_ID_POC_CONTACT_ENTRY_ADD, &inputBufferSize);
  1818.     SetParentHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ADD);
  1819.     mmi_poc_contact_fill_inline_struct(XDM_PUT_ADD);
  1820.     if (inputBuffer != NULL)
  1821.     {
  1822.         SetCategory57Data(wgui_inline_items, POC_CONTACT_INLINE_NUM, inputBuffer);
  1823.     }
  1824.     else
  1825.     {
  1826.         memset(&g_poc_cntx_p->contact_entry_disp, 0, sizeof(mmi_poc_contact_entry_disp_struct));
  1827.     #ifdef __MMI_POC_ETS_TESTCODE__
  1828.         AnsiiNToUnicodeString(
  1829.             (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  1830.             (S8*) "sip:PocUser1E@ims3.vfd2-testnetz.de",
  1831.             POC_MAX_URI_LEN - 1);
  1832.     #else /* __MMI_POC_ETS_TESTCODE__ */ 
  1833.         AnsiiNToUnicodeString(
  1834.             (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  1835.             (S8*) POC_MMI_SIP_PREFIX,
  1836.             POC_MAX_URI_LEN - 1);
  1837.     #endif /* __MMI_POC_ETS_TESTCODE__ */ 
  1838.         g_poc_cntx_p->contact_entry_disp.allow_invite = POC_SETTING_TRUE;
  1839.         g_poc_cntx_p->contact_entry_disp.sub_pres = POC_SETTING_TRUE;
  1840.         g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling = POC_MMI_SUB_ALLOW;
  1841.         g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr = POC_PRES_PROVIDE_ALL;
  1842.     }
  1843.     if (guiBuffer == 0)
  1844.     {
  1845.         g_poc_cntx_p->inline_item_changed = MMI_FALSE;
  1846.     }
  1847.     if ((get_wgui_inline_list_menu_status() || g_poc_cntx_p->inline_item_changed) &&
  1848.         (GetInlineDoneFlag(guiBuffer) == 0))
  1849.     {
  1850.         SetInlineDoneFlag(guiBuffer);
  1851.     }
  1852.     for (i = 0; i < POC_CONTACT_INLINE_NUM; i++)
  1853.     {
  1854.         if (i % 2)
  1855.         {
  1856.             IconList[i] = IMG_ID_POC_NOIMAGE;
  1857.         }
  1858.         else
  1859.         {
  1860.             IconList[i] = IMG_ID_POC_CONTACT_NAME + ImageLocation;
  1861.             ImageLocation++;
  1862.         }
  1863.     }
  1864.     ShowCategory57Screen(
  1865.         STR_ID_POC_ENTRY_INFO,
  1866.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1867.         STR_GLOBAL_EDIT,
  1868.         IMG_GLOBAL_OK,
  1869.         STR_GLOBAL_BACK,
  1870.         IMG_GLOBAL_BACK,
  1871.         POC_CONTACT_INLINE_NUM,
  1872.         IconList,
  1873.         wgui_inline_items,
  1874.         0,
  1875.         guiBuffer);
  1876.     SetCategory57RightSoftkeyFunctions(mmi_poc_entry_contact_opt_settings_add_cfrm, GoBackHistory);
  1877. }
  1878. /*****************************************************************************
  1879.  * FUNCTION
  1880.  *  mmi_poc_exit_contact_opt_settings_add
  1881.  * DESCRIPTION
  1882.  *  settings add screen exit function
  1883.  * PARAMETERS
  1884.  *  void
  1885.  * RETURNS
  1886.  *  void
  1887.  *****************************************************************************/
  1888. void mmi_poc_exit_contact_opt_settings_add(void)
  1889. {
  1890.     /*----------------------------------------------------------------*/
  1891.     /* Local Variables                                                */
  1892.     /*----------------------------------------------------------------*/
  1893.     /*----------------------------------------------------------------*/
  1894.     /* Code Body                                                      */
  1895.     /*----------------------------------------------------------------*/
  1896.     set_leading_zero(TRUE);
  1897.     GenericExitInlineScreen(SCR_ID_POC_CONTACT_ENTRY_ADD, mmi_poc_entry_contact_opt_settings_add);
  1898. }
  1899. /*****************************************************************************
  1900.  * FUNCTION
  1901.  *  mmi_poc_entry_contact_opt_settings_attributes
  1902.  * DESCRIPTION
  1903.  *  settings attribute screen
  1904.  * PARAMETERS
  1905.  *  void
  1906.  * RETURNS
  1907.  *  void
  1908.  *****************************************************************************/
  1909. void mmi_poc_entry_contact_opt_settings_attributes(void)
  1910. {
  1911.     /*----------------------------------------------------------------*/
  1912.     /* Local Variables                                                */
  1913.     /*----------------------------------------------------------------*/
  1914.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  1915.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  1916.     U8 *guiBuffer;                      /* Buffer holding history data */
  1917.     U16 menuId;
  1918.     U8 *PoCHint[MAX_SUB_MENUS];
  1919.     /*----------------------------------------------------------------*/
  1920.     /* Code Body                                                      */
  1921.     /*----------------------------------------------------------------*/
  1922.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_ATTR, NULL, mmi_poc_entry_contact_opt_settings_attributes, NULL);
  1923.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_ATTR);
  1924.     menuId = MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES;
  1925.     nNumofItem = GetNumOfChild(menuId);
  1926.     GetSequenceStringIds(menuId, nStrItemList);
  1927.     SetParentHandler(menuId);
  1928.     ConstructHintsList(menuId, PoCHint);
  1929.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1930.     ShowCategory52Screen(
  1931.         STR_ID_POC_ATTRIBUTES,
  1932.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  1933.         STR_GLOBAL_OK,
  1934.         IMG_GLOBAL_OK,
  1935.         STR_GLOBAL_BACK,
  1936.         IMG_GLOBAL_BACK,
  1937.         nNumofItem,
  1938.         nStrItemList,
  1939.         (U16*) gIndexIconsImageList,
  1940.         PoCHint,
  1941.         0,
  1942.         0,
  1943.         guiBuffer);
  1944.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1945.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1946. }
  1947. /*****************************************************************************
  1948.  * FUNCTION
  1949.  *  mmi_poc_go_back_contact_list
  1950.  * DESCRIPTION
  1951.  *  go back contact list
  1952.  * PARAMETERS
  1953.  *  void
  1954.  * RETURNS
  1955.  *  void
  1956.  *****************************************************************************/
  1957. void mmi_poc_go_back_contact_list(void)
  1958. {
  1959.     /*----------------------------------------------------------------*/
  1960.     /* Local Variables                                                */
  1961.     /*----------------------------------------------------------------*/
  1962.     /*----------------------------------------------------------------*/
  1963.     /* Code Body                                                      */
  1964.     /*----------------------------------------------------------------*/
  1965.     stopRequestedTone(WARNING_TONE);
  1966.     DeleteUptoScrID(SCR_ID_POC_CONTACT);
  1967.     GoBackHistory();
  1968. }
  1969. /*****************************************************************************
  1970.  * FUNCTION
  1971.  *  mmi_poc_entry_contact_opt_settings_attributes_allow_invite
  1972.  * DESCRIPTION
  1973.  *  allow invite screen
  1974.  * PARAMETERS
  1975.  *  void
  1976.  * RETURNS
  1977.  *  void
  1978.  *****************************************************************************/
  1979. void mmi_poc_entry_contact_opt_settings_attributes_allow_invite(void)
  1980. {
  1981.     /*----------------------------------------------------------------*/
  1982.     /* Local Variables                                                */
  1983.     /*----------------------------------------------------------------*/
  1984.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  1985.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  1986.     U8 *guiBuffer;                      /* Buffer holding history data */
  1987.     U16 menuId;
  1988.     /*----------------------------------------------------------------*/
  1989.     /* Code Body                                                      */
  1990.     /*----------------------------------------------------------------*/
  1991.     EntryNewScreen(
  1992.         SCR_ID_POC_CONTACT_ENTRY_ALLOW_INVITE,
  1993.         NULL,
  1994.         mmi_poc_entry_contact_opt_settings_attributes_allow_invite,
  1995.         NULL);
  1996.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_ALLOW_INVITE);
  1997.     menuId = MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_INVITE;
  1998.     nNumofItem = GetNumOfChild(menuId);
  1999.     GetSequenceStringIds(menuId, nStrItemList);
  2000.     SetParentHandler(menuId);
  2001.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2002.     ShowCategory15Screen(
  2003.         STR_ID_POC_ALLOW_INVITE,
  2004.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2005.         STR_GLOBAL_OK,
  2006.         IMG_GLOBAL_OK,
  2007.         STR_GLOBAL_BACK,
  2008.         IMG_GLOBAL_BACK,
  2009.         nNumofItem,
  2010.         nStrItemList,
  2011.         (U16*) gIndexIconsImageList,
  2012.         1,
  2013.         0,
  2014.         guiBuffer);
  2015.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2016.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2017. }
  2018. /*****************************************************************************
  2019.  * FUNCTION
  2020.  *  mmi_poc_contact_set_allow_invite_accept
  2021.  * DESCRIPTION
  2022.  *  set allow invite option
  2023.  * PARAMETERS
  2024.  *  void
  2025.  * RETURNS
  2026.  *  void
  2027.  *****************************************************************************/
  2028. void mmi_poc_contact_set_allow_invite_accept(void)
  2029. {
  2030.     /*----------------------------------------------------------------*/
  2031.     /* Local Variables                                                */
  2032.     /*----------------------------------------------------------------*/
  2033.     /*----------------------------------------------------------------*/
  2034.     /* Code Body                                                      */
  2035.     /*----------------------------------------------------------------*/
  2036.     g_poc_cntx_p->contact_entry_disp.allow_invite = POC_SETTING_TRUE;
  2037.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2038.     GoBackHistory();
  2039. }
  2040. /*****************************************************************************
  2041.  * FUNCTION
  2042.  *  mmi_poc_contact_set_allow_invite_auto
  2043.  * DESCRIPTION
  2044.  *  set allow invite option
  2045.  * PARAMETERS
  2046.  *  void
  2047.  * RETURNS
  2048.  *  void
  2049.  *****************************************************************************/
  2050. void mmi_poc_contact_set_allow_invite_auto(void)
  2051. {
  2052.     /*----------------------------------------------------------------*/
  2053.     /* Local Variables                                                */
  2054.     /*----------------------------------------------------------------*/
  2055.     /*----------------------------------------------------------------*/
  2056.     /* Code Body                                                      */
  2057.     /*----------------------------------------------------------------*/
  2058.     g_poc_cntx_p->contact_entry_disp.allow_invite = POC_SETTING_ACCEPT;
  2059.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2060.     GoBackHistory();
  2061. }
  2062. /*****************************************************************************
  2063.  * FUNCTION
  2064.  *  mmi_poc_contact_set_allow_invite_reject
  2065.  * DESCRIPTION
  2066.  *  set allow invite option
  2067.  * PARAMETERS
  2068.  *  void
  2069.  * RETURNS
  2070.  *  void
  2071.  *****************************************************************************/
  2072. void mmi_poc_contact_set_allow_invite_reject(void)
  2073. {
  2074.     /*----------------------------------------------------------------*/
  2075.     /* Local Variables                                                */
  2076.     /*----------------------------------------------------------------*/
  2077.     /*----------------------------------------------------------------*/
  2078.     /* Code Body                                                      */
  2079.     /*----------------------------------------------------------------*/
  2080.     g_poc_cntx_p->contact_entry_disp.allow_invite = POC_SETTING_FALSE;
  2081.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2082.     GoBackHistory();
  2083. }
  2084. /*****************************************************************************
  2085.  * FUNCTION
  2086.  *  mmi_poc_entry_allow_subscribe
  2087.  * DESCRIPTION
  2088.  *  allow subscribe screen
  2089.  * PARAMETERS
  2090.  *  void
  2091.  * RETURNS
  2092.  *  void
  2093.  *****************************************************************************/
  2094. void mmi_poc_entry_allow_subscribe(void)
  2095. {
  2096.     /*----------------------------------------------------------------*/
  2097.     /* Local Variables                                                */
  2098.     /*----------------------------------------------------------------*/
  2099.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  2100.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  2101.     U8 *guiBuffer;                      /* Buffer holding history data */
  2102.     U16 menuId;
  2103.     /*----------------------------------------------------------------*/
  2104.     /* Code Body                                                      */
  2105.     /*----------------------------------------------------------------*/
  2106.     EntryNewScreen(SCR_ID_POC_CONTACT_ENTRY_ALLOW_SUBSCRIBE, NULL, mmi_poc_entry_allow_subscribe, NULL);
  2107.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_ALLOW_SUBSCRIBE);
  2108.     menuId = MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_ALLOW_SUBSCRIBE;
  2109.     nNumofItem = GetNumOfChild(menuId);
  2110.     GetSequenceStringIds(menuId, nStrItemList);
  2111.     SetParentHandler(menuId);
  2112.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  2113.     ShowCategory15Screen(
  2114.         STR_ID_POC_ALLOW_SUBSCRIBE,
  2115.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2116.         STR_GLOBAL_OK,
  2117.         IMG_GLOBAL_OK,
  2118.         STR_GLOBAL_BACK,
  2119.         IMG_GLOBAL_BACK,
  2120.         nNumofItem,
  2121.         nStrItemList,
  2122.         (U16*) gIndexIconsImageList,
  2123.         1,
  2124.         0,
  2125.         guiBuffer);
  2126.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2127.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2128. }
  2129. /*****************************************************************************
  2130.  * FUNCTION
  2131.  *  mmi_poc_entry_allow_subscribe_block
  2132.  * DESCRIPTION
  2133.  *  allow subscribe block
  2134.  * PARAMETERS
  2135.  *  void
  2136.  * RETURNS
  2137.  *  void
  2138.  *****************************************************************************/
  2139. void mmi_poc_entry_allow_subscribe_block(void)
  2140. {
  2141.     /*----------------------------------------------------------------*/
  2142.     /* Local Variables                                                */
  2143.     /*----------------------------------------------------------------*/
  2144.     /*----------------------------------------------------------------*/
  2145.     /* Code Body                                                      */
  2146.     /*----------------------------------------------------------------*/
  2147.     g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling = POC_MMI_SUB_BLOCK;
  2148.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2149.     GoBackHistory();
  2150. }
  2151. /*****************************************************************************
  2152.  * FUNCTION
  2153.  *  mmi_poc_entry_allow_subscribe_polite_block
  2154.  * DESCRIPTION
  2155.  *  allow subscribe polite block
  2156.  * PARAMETERS
  2157.  *  void
  2158.  * RETURNS
  2159.  *  void
  2160.  *****************************************************************************/
  2161. void mmi_poc_entry_allow_subscribe_polite_block(void)
  2162. {
  2163.     /*----------------------------------------------------------------*/
  2164.     /* Local Variables                                                */
  2165.     /*----------------------------------------------------------------*/
  2166.     /*----------------------------------------------------------------*/
  2167.     /* Code Body                                                      */
  2168.     /*----------------------------------------------------------------*/
  2169.     g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling = POC_MMI_SUB_POLITE_BLOCK;
  2170.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2171.     GoBackHistory();
  2172. }
  2173. /*****************************************************************************
  2174.  * FUNCTION
  2175.  *  mmi_poc_entry_allow_subscribe_allow
  2176.  * DESCRIPTION
  2177.  *  allow subscribe, allow
  2178.  * PARAMETERS
  2179.  *  void
  2180.  * RETURNS
  2181.  *  void
  2182.  *****************************************************************************/
  2183. void mmi_poc_entry_allow_subscribe_allow(void)
  2184. {
  2185.     /*----------------------------------------------------------------*/
  2186.     /* Local Variables                                                */
  2187.     /*----------------------------------------------------------------*/
  2188.     /*----------------------------------------------------------------*/
  2189.     /* Code Body                                                      */
  2190.     /*----------------------------------------------------------------*/
  2191.     g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling = POC_MMI_SUB_ALLOW;
  2192.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2193.     GoBackHistory();
  2194. }
  2195. /*****************************************************************************
  2196.  * FUNCTION
  2197.  *  mmi_poc_contact_set_subscribe_pres
  2198.  * DESCRIPTION
  2199.  *  set subscribe presence
  2200.  * PARAMETERS
  2201.  *  void
  2202.  * RETURNS
  2203.  *  void
  2204.  *****************************************************************************/
  2205. void mmi_poc_contact_set_subscribe_pres(void)
  2206. {
  2207.     /*----------------------------------------------------------------*/
  2208.     /* Local Variables                                                */
  2209.     /*----------------------------------------------------------------*/
  2210.     /*----------------------------------------------------------------*/
  2211.     /* Code Body                                                      */
  2212.     /*----------------------------------------------------------------*/
  2213.     switch (g_poc_cntx_p->contact_entry_disp.sub_pres)
  2214.     {
  2215.         case POC_SETTING_TRUE:
  2216.             g_poc_cntx_p->contact_entry_disp.sub_pres = POC_SETTING_FALSE;
  2217.             break;
  2218.         default:
  2219.             g_poc_cntx_p->contact_entry_disp.sub_pres = POC_SETTING_TRUE;
  2220.             break;
  2221.     }
  2222.     DisplayPopup(
  2223.         (U8*) GetString(STR_GLOBAL_DONE),
  2224.         IMG_GLOBAL_ACTIVATED,
  2225.         1,
  2226.         UI_POPUP_NOTIFYDURATION_TIME,
  2227.         (U8) SUCCESS_TONE);
  2228.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2229. }
  2230. /*****************************************************************************
  2231.  * FUNCTION
  2232.  *  mmi_poc_entry_contact_opt_settings_attributes_provide_pres
  2233.  * DESCRIPTION
  2234.  *  provide presence screen
  2235.  * PARAMETERS
  2236.  *  void
  2237.  * RETURNS
  2238.  *  void
  2239.  *****************************************************************************/
  2240. void mmi_poc_entry_contact_opt_settings_attributes_provide_pres(void)
  2241. {
  2242.     /*----------------------------------------------------------------*/
  2243.     /* Local Variables                                                */
  2244.     /*----------------------------------------------------------------*/
  2245.     U16 nStrItemList[MAX_SUB_MENUS];
  2246.     U16 nNumofItem;
  2247.     U8 i = 0;
  2248.     U8 *guiBuffer;
  2249.     /*----------------------------------------------------------------*/
  2250.     /* Code Body                                                      */
  2251.     /*----------------------------------------------------------------*/
  2252.     EntryNewScreen(
  2253.         SCR_ID_POC_CONTACT_ENTRY_PRES_ATTR,
  2254.         NULL,
  2255.         mmi_poc_entry_contact_opt_settings_attributes_provide_pres,
  2256.         NULL);
  2257.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_CONTACT_ENTRY_PRES_ATTR);
  2258.     nNumofItem = GetNumOfChild(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_PROVIDE_PRES);
  2259.     GetSequenceStringIds(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_PROVIDE_PRES, nStrItemList);
  2260.     for (i = 0; i < nNumofItem; i++)
  2261.     {
  2262.         subMenuDataPtrs[i] = subMenuData[i];
  2263.         memset((S8*) subMenuDataPtrs[i], 0, MAX_SUB_MENU_SIZE);
  2264.         pfnUnicodeStrncpy((S8*) subMenuDataPtrs[i], GetString(nStrItemList[i]), MAX_SUBMENU_CHARACTERS - 1);
  2265.     }
  2266.     SetParentHandler(MENU_ID_POC_CONTACT_OPT_SETTINGS_ATTRIBUTES_PROVIDE_PRES);
  2267.     if (guiBuffer == NULL)
  2268.     {
  2269.         memset(g_poc_cntx_p->pres_attr_disp, 0, sizeof(U8) * POC_PRES_TOTAL_NUM);
  2270.         if (g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr & POC_PRES_PROVIDE_ACTIVITY)
  2271.         {
  2272.             g_poc_cntx_p->pres_attr_disp[POC_PRES_ACTIVITY] = MMI_TRUE;
  2273.         }
  2274.         if (g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr & POC_PRES_PROVIDE_MOOD)
  2275.         {
  2276.             g_poc_cntx_p->pres_attr_disp[POC_PRES_MOOD] = MMI_TRUE;
  2277.         }
  2278.         if (g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr == POC_PRES_PROVIDE_ALL)
  2279.         {
  2280.             g_poc_cntx_p->pres_attr_disp[POC_PRES_ALL] = MMI_TRUE;
  2281.         }
  2282.     }
  2283.     SetCheckboxToggleRightSoftkeyFunctions(mmi_poc_contact_set_pres_attr_cfrm, GoBackHistory);
  2284.     ShowCategory140Screen(
  2285.         STR_ID_POC_PRESENCE_ATTR,
  2286.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2287.         nNumofItem,
  2288.         (U8 **) subMenuDataPtrs,
  2289.         g_poc_cntx_p->pres_attr_disp,
  2290.         0,
  2291.         guiBuffer);
  2292.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2293. }
  2294. /*****************************************************************************
  2295.  * FUNCTION
  2296.  *  mmi_poc_contact_set_pres_attr_cfrm
  2297.  * DESCRIPTION
  2298.  *  set presence attribute confirm
  2299.  * PARAMETERS
  2300.  *  void
  2301.  * RETURNS
  2302.  *  void
  2303.  *****************************************************************************/
  2304. void mmi_poc_contact_set_pres_attr_cfrm(void)
  2305. {
  2306.     /*----------------------------------------------------------------*/
  2307.     /* Local Variables                                                */
  2308.     /*----------------------------------------------------------------*/
  2309.     /*----------------------------------------------------------------*/
  2310.     /* Code Body                                                      */
  2311.     /*----------------------------------------------------------------*/
  2312.     DisplayConfirm(
  2313.         STR_GLOBAL_YES,
  2314.         IMG_GLOBAL_YES,
  2315.         STR_GLOBAL_NO,
  2316.         IMG_GLOBAL_NO,
  2317.         get_string(STR_GLOBAL_SAVE),
  2318.         IMG_GLOBAL_QUESTION,
  2319.         WARNING_TONE);
  2320.     SetLeftSoftkeyFunction(mmi_poc_contact_set_pres_attr, KEY_EVENT_UP);
  2321.     SetRightSoftkeyFunction(poc_go_back_entry_attr, KEY_EVENT_UP);
  2322. }
  2323. /*****************************************************************************
  2324.  * FUNCTION
  2325.  *  mmi_poc_contact_set_pres_attr
  2326.  * DESCRIPTION
  2327.  *  set presence attribute
  2328.  * PARAMETERS
  2329.  *  void
  2330.  * RETURNS
  2331.  *  void
  2332.  *****************************************************************************/
  2333. void mmi_poc_contact_set_pres_attr(void)
  2334. {
  2335.     /*----------------------------------------------------------------*/
  2336.     /* Local Variables                                                */
  2337.     /*----------------------------------------------------------------*/
  2338.     /*----------------------------------------------------------------*/
  2339.     /* Code Body                                                      */
  2340.     /*----------------------------------------------------------------*/
  2341.     g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr = 0;
  2342.     if (g_poc_cntx_p->pres_attr_disp[POC_PRES_ACTIVITY] == MMI_TRUE)
  2343.     {
  2344.         g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr |= POC_PRES_PROVIDE_ACTIVITY;
  2345.     }
  2346.     if (g_poc_cntx_p->pres_attr_disp[POC_PRES_MOOD] == MMI_TRUE)
  2347.     {
  2348.         g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr |= POC_PRES_PROVIDE_MOOD;
  2349.     }
  2350.     if (g_poc_cntx_p->pres_attr_disp[POC_PRES_ALL] == MMI_TRUE)
  2351.     {
  2352.         g_poc_cntx_p->contact_entry_disp.auth_rule.pres_attr |= POC_PRES_PROVIDE_ALL;
  2353.     }
  2354.     g_poc_cntx_p->inline_item_changed = MMI_TRUE;
  2355.     DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, UI_POPUP_NOTIFYDURATION_TIME, SUCCESS_TONE);
  2356.     DeleteScreenIfPresent(SCR_ID_POC_CONTACT_ENTRY_PRES_ATTR);
  2357. }
  2358. /*****************************************************************************
  2359.  * FUNCTION
  2360.  *  poc_go_back_entry_attr
  2361.  * DESCRIPTION
  2362.  *  go back to entry screen
  2363.  * PARAMETERS
  2364.  *  void
  2365.  * RETURNS
  2366.  *  void
  2367.  *****************************************************************************/
  2368. void poc_go_back_entry_attr(void)
  2369. {
  2370.     /*----------------------------------------------------------------*/
  2371.     /* Local Variables                                                */
  2372.     /*----------------------------------------------------------------*/
  2373.     /*----------------------------------------------------------------*/
  2374.     /* Code Body                                                      */
  2375.     /*----------------------------------------------------------------*/
  2376.     stopRequestedTone(WARNING_TONE);
  2377.     DeleteScreenIfPresent(SCR_ID_POC_CONTACT_ENTRY_PRES_ATTR);
  2378.     GoBackHistory();
  2379. }
  2380. /*****************************************************************************
  2381.  * FUNCTION
  2382.  *  mmi_poc_entry_contact_opt_settings_modify_cfrm
  2383.  * DESCRIPTION
  2384.  *  settings modify confirm screen
  2385.  * PARAMETERS
  2386.  *  void
  2387.  * RETURNS
  2388.  *  void
  2389.  *****************************************************************************/
  2390. void mmi_poc_entry_contact_opt_settings_modify_cfrm(void)
  2391. {
  2392.     /*----------------------------------------------------------------*/
  2393.     /* Local Variables                                                */
  2394.     /*----------------------------------------------------------------*/
  2395.     /*----------------------------------------------------------------*/
  2396.     /* Code Body                                                      */
  2397.     /*----------------------------------------------------------------*/
  2398.     DisplayConfirm(
  2399.         STR_GLOBAL_YES,
  2400.         IMG_GLOBAL_YES,
  2401.         STR_GLOBAL_NO,
  2402.         IMG_GLOBAL_NO,
  2403.         get_string(STR_GLOBAL_SAVE),
  2404.         IMG_GLOBAL_QUESTION,
  2405.         WARNING_TONE);
  2406.     SetLeftSoftkeyFunction(mmi_poc_contact_send_modify, KEY_EVENT_UP);
  2407.     SetRightSoftkeyFunction(mmi_poc_go_back_contact_list, KEY_EVENT_UP);
  2408. }
  2409. /*****************************************************************************
  2410.  * FUNCTION
  2411.  *  mmi_poc_contact_send_modify
  2412.  * DESCRIPTION
  2413.  *  send settings modify
  2414.  * PARAMETERS
  2415.  *  void
  2416.  * RETURNS
  2417.  *  void
  2418.  *****************************************************************************/
  2419. void mmi_poc_contact_send_modify(void)
  2420. {
  2421.     /*----------------------------------------------------------------*/
  2422.     /* Local Variables                                                */
  2423.     /*----------------------------------------------------------------*/
  2424.     /*----------------------------------------------------------------*/
  2425.     /* Code Body                                                      */
  2426.     /*----------------------------------------------------------------*/
  2427.     g_poc_cntx_p->curr_contact_op = XDM_PUT_REPLACE;
  2428.     mmi_poc_update_group_entry_req(XDM_PUT_REPLACE);
  2429. }
  2430. /*****************************************************************************
  2431.  * FUNCTION
  2432.  *  mmi_poc_entry_contact_opt_settings_add_cfrm
  2433.  * DESCRIPTION
  2434.  *  add confirm screen
  2435.  * PARAMETERS
  2436.  *  void
  2437.  * RETURNS
  2438.  *  void
  2439.  *****************************************************************************/
  2440. void mmi_poc_entry_contact_opt_settings_add_cfrm(void)
  2441. {
  2442.     /*----------------------------------------------------------------*/
  2443.     /* Local Variables                                                */
  2444.     /*----------------------------------------------------------------*/
  2445.     /*----------------------------------------------------------------*/
  2446.     /* Code Body                                                      */
  2447.     /*----------------------------------------------------------------*/
  2448.     DisplayConfirm(
  2449.         STR_GLOBAL_YES,
  2450.         IMG_GLOBAL_YES,
  2451.         STR_GLOBAL_NO,
  2452.         IMG_GLOBAL_NO,
  2453.         get_string(STR_GLOBAL_SAVE),
  2454.         IMG_GLOBAL_QUESTION,
  2455.         WARNING_TONE);
  2456.     SetLeftSoftkeyFunction(mmi_poc_contact_send_add, KEY_EVENT_UP);
  2457.     SetRightSoftkeyFunction(mmi_poc_go_back_contact_list, KEY_EVENT_UP);
  2458. }
  2459. /*****************************************************************************
  2460.  * FUNCTION
  2461.  *  mmi_poc_contact_send_add
  2462.  * DESCRIPTION
  2463.  *  send contact add
  2464.  * PARAMETERS
  2465.  *  void
  2466.  * RETURNS
  2467.  *  void
  2468.  *****************************************************************************/
  2469. void mmi_poc_contact_send_add(void)
  2470. {
  2471.     /*----------------------------------------------------------------*/
  2472.     /* Local Variables                                                */
  2473.     /*----------------------------------------------------------------*/
  2474. #ifdef __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__
  2475.     U8 i, j;
  2476. #endif 
  2477.     /*----------------------------------------------------------------*/
  2478.     /* Code Body                                                      */
  2479.     /*----------------------------------------------------------------*/
  2480.     if ((g_poc_cntx_p->contact_num > 0) ||
  2481.         ((g_poc_cntx_p->contact_list[0].valid == MMI_TRUE) &&
  2482.          (g_poc_cntx_p->contact_list[0].list_name[0] != 0)))
  2483.     {
  2484.     #ifdef __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__
  2485.         for (i = 0; i < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; i++)
  2486.         {
  2487.             if (!strncmp
  2488.                 ((S8*) g_poc_cntx_p->contact_list[i].list_name, (S8*) POC_MTK_DEFAULT_CONTACT,
  2489.                  sizeof(POC_MTK_DEFAULT_CONTACT)))
  2490.             {
  2491.                 break;
  2492.             }
  2493.         }
  2494.         if (i == MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM)
  2495.         {
  2496.             /* mtk contact not found */
  2497.             mmi_poc_create_group_list_req();
  2498.         }
  2499.         else
  2500.         {
  2501.             g_poc_cntx_p->curr_contact_op = XDM_PUT_ADD;
  2502.             mmi_poc_update_group_entry_req(XDM_PUT_ADD);
  2503.         }
  2504.     #else /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2505.         g_poc_cntx_p->curr_contact_op = XDM_PUT_ADD;
  2506.         mmi_poc_update_group_entry_req(XDM_PUT_ADD);
  2507.     #endif /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2508.     }
  2509.     else
  2510.     {
  2511.         memset(g_poc_cntx_p->contact_list, 0, sizeof(g_poc_cntx_p->contact_list));
  2512.         mmi_poc_create_group_list_req();
  2513.     }
  2514. }
  2515. /*****************************************************************************
  2516.  * FUNCTION
  2517.  *  mmi_poc_entry_progressing
  2518.  * DESCRIPTION
  2519.  *  entry progressing screen
  2520.  * PARAMETERS
  2521.  *  void
  2522.  * RETURNS
  2523.  *  void
  2524.  *****************************************************************************/
  2525. void mmi_poc_entry_progressing(void)
  2526. {
  2527.     /*----------------------------------------------------------------*/
  2528.     /* Local Variables                                                */
  2529.     /*----------------------------------------------------------------*/
  2530.     U8 *guiBuffer;
  2531.     /*----------------------------------------------------------------*/
  2532.     /* Code Body                                                      */
  2533.     /*----------------------------------------------------------------*/
  2534.     EntryNewScreen(SCR_ID_POC_GENERAL_PROGRESSING, NULL, mmi_poc_entry_progressing, NULL);
  2535.     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  2536.     guiBuffer = GetCurrGuiBuffer(SCR_ID_POC_GENERAL_PROGRESSING);
  2537.     ShowCategory66Screen(
  2538.         STR_ID_POC_MAIN,
  2539.         GetRootTitleIcon(MENU_ID_POC_MAIN),
  2540.         0,
  2541.         0,
  2542.         STR_GLOBAL_BACK,
  2543.         IMG_GLOBAL_BACK,
  2544.         (U8*) GetString(STR_ID_POC_PROCESSING),
  2545.         IMG_GLOBAL_PROGRESS,
  2546.         NULL);
  2547.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  2548. }
  2549. /*****************************************************************************
  2550.  * FUNCTION
  2551.  *  mmi_poc_update_group_entry_req
  2552.  * DESCRIPTION
  2553.  *  update group entry request
  2554.  * PARAMETERS
  2555.  *  op      [IN]        
  2556.  * RETURNS
  2557.  *  void
  2558.  *****************************************************************************/
  2559. void mmi_poc_update_group_entry_req(U8 op)
  2560. {
  2561.     /*----------------------------------------------------------------*/
  2562.     /* Local Variables                                                */
  2563.     /*----------------------------------------------------------------*/
  2564.     MYQUEUE Message;
  2565.     mmi_poc_contact_list_disp *cont;
  2566.     poc_update_group_entry_req_struct *myMsgPtr;
  2567.     U8 i, new_idx;
  2568.     /*----------------------------------------------------------------*/
  2569.     /* Code Body                                                      */
  2570.     /*----------------------------------------------------------------*/
  2571.     if (g_poc_cntx_p->curr_use_xdm_mode == MMI_TRUE)
  2572.     {
  2573.         myMsgPtr = (poc_update_group_entry_req_struct*) OslConstructDataPtr(sizeof(poc_update_group_entry_req_struct));
  2574.         memset(
  2575.             (U8*) myMsgPtr + sizeof(mmi_poc_dummy_req_struct),
  2576.             0,
  2577.             sizeof(poc_update_group_entry_req_struct) - sizeof(mmi_poc_dummy_req_struct));
  2578.         myMsgPtr->request_id = POC_REQUEST_ID;
  2579.         myMsgPtr->op = op;
  2580.         cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  2581.         myMsgPtr->entry.allow_invite = g_poc_cntx_p->contact_entry_disp.allow_invite;
  2582.         myMsgPtr->entry.sub_pres = g_poc_cntx_p->contact_entry_disp.sub_pres;
  2583.         memcpy(
  2584.             &myMsgPtr->entry.auth_rule,
  2585.             &g_poc_cntx_p->contact_entry_disp.auth_rule,
  2586.             sizeof(poc_pres_authrule_struct));
  2587.         UnicodeNToAnsii((S8*) myMsgPtr->entry.uri, (S8*) g_poc_cntx_p->contact_entry_disp.uri, POC_MAX_URI_LEN - 1);
  2588.         UnicodeNToAnsii(
  2589.             (S8*) myMsgPtr->entry.disp_name,
  2590.             (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  2591.             POC_MAX_DISP_LEN - 1);
  2592.         if (myMsgPtr->entry.uri[0] == 0 || !strstr((S8*) myMsgPtr->entry.uri, (S8*) "@"))
  2593.         {
  2594.             DisplayPopup(
  2595.                 (PU8) GetString(STR_ID_POC_NULL_STR_ERR),
  2596.                 IMG_GLOBAL_UNFINISHED,
  2597.                 1,
  2598.                 CS_NOTIFYDURATION,
  2599.                 ERROR_TONE);
  2600.             return;
  2601.         }
  2602.         myMsgPtr->entry.xdm_item = 0;
  2603.         g_poc_cntx_p->session_xdm = 0;
  2604.         if (op == XDM_PUT_ADD)
  2605.         {
  2606.         #ifdef __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__
  2607.             myMsgPtr->entry.xdm_item = 0x0F;
  2608.             strncpy(
  2609.                 (char*)myMsgPtr->list_name,
  2610.                 (char*)g_poc_cntx_p->contact_list[cont->group_id].list_name,
  2611.                 POC_MAX_DISP_LEN - 1);
  2612.         #else /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2613.             U8 least_num = POC_GROUP_LOCAL_MAX_ENTRIES_NUM;
  2614.             myMsgPtr->entry.xdm_item = 0x0F;
  2615.             g_poc_cntx_p->update_grp_idx = 0;
  2616.             for (i = 0; i < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; i++)
  2617.             {
  2618.                 if ((g_poc_cntx_p->contact_list[i].valid == MMI_TRUE) &&
  2619.                     (g_poc_cntx_p->contact_list[i].no_entries < least_num))
  2620.                 {
  2621.                     least_num = g_poc_cntx_p->contact_list[i].no_entries;
  2622.                     g_poc_cntx_p->update_grp_idx = i;
  2623.                 }
  2624.             }
  2625.             strncpy(
  2626.                 (char*)myMsgPtr->list_name,
  2627.                 (char*)g_poc_cntx_p->contact_list[g_poc_cntx_p->update_grp_idx].list_name,
  2628.                 POC_MAX_DISP_LEN - 1);
  2629.         #endif /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2630.         }
  2631.         else
  2632.         {
  2633.             strncpy(
  2634.                 (char*)myMsgPtr->list_name,
  2635.                 (char*)g_poc_cntx_p->contact_list[cont->group_id].list_name,
  2636.                 POC_MAX_DISP_LEN - 1);
  2637.             if (strncmp
  2638.                 ((S8*) myMsgPtr->entry.uri,
  2639.                  (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri, POC_MAX_URI_LEN - 1) ||
  2640.                 strncmp(
  2641.                     (S8*) myMsgPtr->entry.disp_name,
  2642.                     (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  2643.                     POC_MAX_DISP_LEN - 1))
  2644.             {
  2645.                 myMsgPtr->entry.xdm_item |= POC_XDM_GL_PRESENT;
  2646.             }
  2647.             if (myMsgPtr->entry.allow_invite !=
  2648.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].allow_invite)
  2649.             {
  2650.                 myMsgPtr->entry.xdm_item |= POC_XDM_AL_PRESENT;
  2651.             }
  2652.             if (myMsgPtr->entry.auth_rule.pres_attr !=
  2653.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].auth_rule.pres_attr ||
  2654.                 myMsgPtr->entry.auth_rule.sub_handling !=
  2655.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].auth_rule.sub_handling)
  2656.             {
  2657.                 if (g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling != POC_MMI_SUB_EMPTY)
  2658.                 {
  2659.                     myMsgPtr->entry.auth_rule.sub_handling =
  2660.                         g_poc_cntx_p->contact_entry_disp.auth_rule.sub_handling - 1;
  2661.                 }
  2662.                 myMsgPtr->entry.xdm_item |= POC_XDM_AR_PRESENT;
  2663.             }
  2664.             if (myMsgPtr->entry.sub_pres != g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres)
  2665.             {
  2666.                 myMsgPtr->entry.xdm_item |= POC_XDM_RLS_PRESENT;
  2667.             }
  2668.         }
  2669.         g_poc_cntx_p->session_xdm = myMsgPtr->entry.xdm_item;
  2670.         SetProtocolEventHandler(mmi_poc_update_group_entry_rsp, MSG_ID_POC_UPDATE_GROUP_ENTRY_RSP);
  2671.         g_poc_cntx_p->progressing.contact = MMI_TRUE;
  2672.         mmi_poc_entry_progressing();
  2673.         DeleteUptoScrID(SCR_ID_POC_CONTACT);
  2674.         DeleteScreenIfPresent(SCR_ID_POC_CONTACT);
  2675.         Message.oslSrcId = MOD_MMI;
  2676.         Message.oslDestId = MOD_POC;
  2677.         Message.oslMsgId = MSG_ID_POC_UPDATE_GROUP_ENTRY_REQ;
  2678.         Message.oslDataPtr = (oslParaType*) myMsgPtr;
  2679.         Message.oslPeerBuffPtr = NULL;
  2680.         OslMsgSendExtQueue(&Message);
  2681.     }
  2682.     else
  2683.     {
  2684.         kal_uint8 temp_uri[POC_MAX_URI_LEN];
  2685.         memset((S8*) temp_uri, 0, sizeof(temp_uri));
  2686.         UnicodeNToAnsii((S8*) temp_uri, (S8*) g_poc_cntx_p->contact_entry_disp.uri, POC_MAX_URI_LEN - 1);
  2687.         if (temp_uri[0] == 0 || !strstr((S8*) temp_uri, (S8*) "@"))
  2688.         {
  2689.             DisplayPopup(
  2690.                 (PU8) GetString(STR_ID_POC_NULL_STR_ERR),
  2691.                 IMG_GLOBAL_UNFINISHED,
  2692.                 1,
  2693.                 CS_NOTIFYDURATION,
  2694.                 ERROR_TONE);
  2695.             return;
  2696.         }
  2697.         
  2698.         mmi_poc_entry_progressing();
  2699.         DeleteUptoScrID(SCR_ID_POC_CONTACT);
  2700.         DeleteScreenIfPresent(SCR_ID_POC_CONTACT);
  2701.         if (g_poc_cntx_p->curr_contact_op == XDM_PUT_REPLACE)
  2702.         {
  2703.             cont = &g_poc_cntx_p->contact_list_disp[g_poc_cntx_p->contact_selected];
  2704.             memset(
  2705.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  2706.                 0,
  2707.                 sizeof(g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri));
  2708.             UnicodeNToAnsii(
  2709.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].uri,
  2710.                 (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  2711.                 (U32) POC_MAX_URI_LEN - 1);
  2712.             memset(
  2713.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  2714.                 0,
  2715.                 sizeof(g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name));
  2716.             UnicodeNToAnsii(
  2717.                 (S8*) g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].display_name,
  2718.                 (S8*) g_poc_cntx_p->contact_entry_disp.display_name,
  2719.                 (U32) POC_MAX_DISP_LEN - 1);
  2720.             g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].allow_invite =
  2721.                 g_poc_cntx_p->contact_entry_disp.allow_invite;
  2722.             memcpy(
  2723.                 &g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].auth_rule,
  2724.                 &g_poc_cntx_p->contact_entry_disp.auth_rule,
  2725.                 sizeof(poc_pres_authrule_struct));
  2726.             if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres !=
  2727.                 g_poc_cntx_p->contact_entry_disp.sub_pres)
  2728.             {
  2729.                 g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres =
  2730.                     g_poc_cntx_p->contact_entry_disp.sub_pres;
  2731.                 if (g_poc_cntx_p->curr_use_pres_mode == MMI_TRUE)
  2732.                 {
  2733.                     if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres == POC_SETTING_TRUE)
  2734.                     {
  2735.                         mmi_poc_entry_update_subscribe_req(
  2736.                             POC_SUBSCRIBE_ACTION,
  2737.                             g_poc_cntx_p->contact_list[cont->group_id].entries[cont-> entry_id]. uri);
  2738.                         SetProtocolEventHandler(
  2739.                             mmi_poc_update_subscribe_success_rsp,
  2740.                             MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  2741.                     }
  2742.                     else if (g_poc_cntx_p->contact_list[cont->group_id].entries[cont->entry_id].sub_pres ==
  2743.                              POC_SETTING_FALSE)
  2744.                     {
  2745.                         mmi_poc_entry_update_subscribe_req(
  2746.                             POC_UNSUBSCRIBE_ACTION,
  2747.                             g_poc_cntx_p->contact_list[cont->group_id].entries[cont-> entry_id]. uri);
  2748.                         SetProtocolEventHandler(
  2749.                             mmi_poc_update_subscribe_success_rsp,
  2750.                             MSG_ID_POC_PRESENCE_SUBSCRIBE_RSP);
  2751.                     }
  2752.                     else
  2753.                     {
  2754.                         g_poc_cntx_p->progressing.contact = MMI_FALSE;
  2755.                         if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  2756.                         {
  2757.                             DisplayPopup(
  2758.                                 (U8*) GetString(STR_GLOBAL_DONE),
  2759.                                 IMG_GLOBAL_ACTIVATED,
  2760.                                 1,
  2761.                                 UI_POPUP_NOTIFYDURATION_TIME,
  2762.                                 (U8) SUCCESS_TONE);
  2763.                         }
  2764.                         DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  2765.                     }
  2766.                 }
  2767.                 else
  2768.                 {
  2769.                     g_poc_cntx_p->progressing.contact = MMI_FALSE;
  2770.                     if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  2771.                     {
  2772.                         DisplayPopup(
  2773.                             (U8*) GetString(STR_GLOBAL_DONE),
  2774.                             IMG_GLOBAL_ACTIVATED,
  2775.                             1,
  2776.                             UI_POPUP_NOTIFYDURATION_TIME,
  2777.                             (U8) SUCCESS_TONE);
  2778.                     }
  2779.                     DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  2780.                 }
  2781.             }
  2782.             else
  2783.             {
  2784.                 g_poc_cntx_p->progressing.contact = MMI_FALSE;
  2785.                 if (GetActiveScreenId() == SCR_ID_POC_GENERAL_PROGRESSING)
  2786.                 {
  2787.                     DisplayPopup(
  2788.                         (U8*) GetString(STR_GLOBAL_DONE),
  2789.                         IMG_GLOBAL_ACTIVATED,
  2790.                         1,
  2791.                         UI_POPUP_NOTIFYDURATION_TIME,
  2792.                         (U8) SUCCESS_TONE);
  2793.                 }
  2794.                 DeleteScreenIfPresent(SCR_ID_POC_GENERAL_PROGRESSING);
  2795.             }
  2796.         }
  2797.         else
  2798.         {
  2799.         #ifdef __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__
  2800.             for (i = 0; i < MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM; i++)
  2801.             {
  2802.                 if (g_poc_cntx_p->contact_list[i].valid == MMI_TRUE)
  2803.                 {
  2804.                     if (!strcmp((S8*) g_poc_cntx_p->contact_list[i].list_name, (S8*) POC_MTK_DEFAULT_CONTACT))
  2805.                     {
  2806.                         break;
  2807.                     }
  2808.                 }
  2809.             }
  2810.             ASSERT(i != MAX_POC_GROUP_FILE_NUM * MAX_POC_GROUPS_PER_FILE_NUM);
  2811.         #else /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2812.             i = g_poc_cntx_p->update_grp_idx;
  2813.         #endif /* __MMI_POC_ALWAYS_CREATE_MTK_CONTACT__ */ 
  2814.             new_idx = g_poc_cntx_p->contact_list[i].no_entries;
  2815.             memset(
  2816.                 g_poc_cntx_p->contact_list[i].entries[new_idx].uri,
  2817.                 0,
  2818.                 sizeof(g_poc_cntx_p->contact_list[i].entries[new_idx].uri));
  2819.             UnicodeNToAnsii(
  2820.                 (S8*) g_poc_cntx_p->contact_list[i].entries[new_idx].uri,
  2821.                 (S8*) g_poc_cntx_p->contact_entry_disp.uri,
  2822.                 (U32) POC_MAX_URI_LEN - 1);
  2823.             memset(
  2824.                 g_poc_cntx_p->contact_list[i].entries[new_idx].display_name,
  2825.                 0,
  2826.                 sizeof(g_poc_cntx_p->contact_list[i].entries[new_idx].display_name));
  2827.             UnicodeNToAnsii(