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

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.  * Filename:
  37.  * ---------
  38.  * CallBarring.c
  39.  *
  40.  * Project:
  41.  * --------
  42.  *   MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  *   <file description>.
  47.  *
  48.  * Author:
  49.  * -------
  50.  * -------
  51.  *
  52.  *==============================================================================
  53.  *             HISTORY
  54.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  55.  *------------------------------------------------------------------------------
  56.  * removed!
  57.  *
  58.  * removed!
  59.  * removed!
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  *------------------------------------------------------------------------------
  71.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  72.  *============================================================================== 
  73.  *******************************************************************************/
  74. /**
  75.  * Copyright Notice
  76.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  77.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  78.  *  (It is illegal to remove this copyright notice from this software or any
  79.  *  portion of it)
  80.  */
  81. /**************************************************************
  82.    FILENAME : CallBarring.c
  83.    PURPOSE     : Call Barring Application - call setup
  84.    REMARKS     : nil
  85.    AUTHOR      : Anil Kumar Vutukuru
  86.    DATE     : 11/14/2003
  87. **************************************************************/
  88. #include "stdC.h"
  89. #include "L4Dr1.h"
  90. #include "CSP.h"
  91. #include "MainMenuDef.h"
  92. #include "MMI_features.h"
  93. #include "ProtocolEvents.h"
  94. #include "PhoneBookTypes.h"
  95. #include "CallSetUp.h"
  96. #include "CallBarrng.h"
  97. #include "CallSetUpEnum.h"
  98. #include "CommonScreens.h"
  99. #include "CallmanagementIdDef.h"
  100. #include "CallManagementGProt.h"
  101. #include "MessagesExDcl.h"
  102. #include "wgui_categories.h"
  103. #include "wgui_categories_inputs.h"
  104. #include "SettingDefs.h"
  105. /*****************************************************************************
  106.  * FUNCTION
  107.  *  InitCallBarring
  108.  * DESCRIPTION
  109.  *  Initializes the call barring application
  110.  * NA
  111.  *  
  112.  * PARAMETERS
  113.  *  void
  114.  * RETURNS
  115.  *  void
  116.  *****************************************************************************/
  117. void InitCallBarring(void)
  118. {
  119.     /*----------------------------------------------------------------*/
  120.     /* Local Variables                                                */
  121.     /*----------------------------------------------------------------*/
  122.     /*----------------------------------------------------------------*/
  123.     /* Code Body                                                      */
  124.     /*----------------------------------------------------------------*/
  125.     /* set hilite handlers for the individual menu items */
  126.     SetHiliteHandler(MENU8237_SCR8093_MNGCALL_MENU_BARRING, HighlightCALLSETCallBarring);
  127.     SetHiliteHandler(MENU_CALL_BARRING_OUTGOING, HighlightCALLSETCallBarringOutgoing);
  128.     SetHiliteHandler(MENU_CALL_BARRING_INCOMING, HighlightCALLSETCallBarringIncoming);
  129.     SetHiliteHandler(MENU_CALL_BARRING_CANCELALL, HighlightCALLSETCallBarringCancelAll);
  130.     SetHiliteHandler(MENU_CALL_BARRING_CHANGEPASS, HighlightCALLSETCallBarringChangePwd);
  131.     SetHiliteHandler(MENU_BARRING_OUTGOING_ALLCALLS, HighlightCALLSETCallBarringAllOutCalls);
  132.     SetHiliteHandler(MENU_BARRING_OUTGOING_INTERCALL, HighlightCALLSETCallBarringAllOutInter);
  133.     SetHiliteHandler(MENU_BARRING_OUTGOING_INTEREXCEPTHOME, HighlightCALLSETCallBarringAllOutInterExcHome);
  134.     SetHiliteHandler(MENU_BARRING_INCOMING_ALLCALLS, HighlightCALLSETCallBarringAllInCalls);
  135.     SetHiliteHandler(MENU_BARRING_INCOMING_ROAMING, HighlightCALLSETCallBarringAllInRoaming);
  136.     SetHiliteHandler(MENU_BARRING_ACTIVATE, HighlightCALLSETCallBarringActive);
  137.     SetHiliteHandler(MENU_BARRING_DEACTIVATE, HighlightCALLSETCallBarringDeactive);
  138.     SetHiliteHandler(MENU_BARRING_QUERY, HighlightCALLSETCallBarringQuery);
  139.     return;
  140. }
  141. /*****************************************************************************
  142.  * FUNCTION
  143.  *  HighlightCALLSETCallBarring
  144.  * DESCRIPTION
  145.  *  highlite handler for call barring menu item
  146.  * NA
  147.  *  
  148.  * PARAMETERS
  149.  *  void
  150.  * RETURNS
  151.  *  void
  152.  *****************************************************************************/
  153. void HighlightCALLSETCallBarring(void)
  154. {
  155.     /*----------------------------------------------------------------*/
  156.     /* Local Variables                                                */
  157.     /*----------------------------------------------------------------*/
  158.     /*----------------------------------------------------------------*/
  159.     /* Code Body                                                      */
  160.     /*----------------------------------------------------------------*/
  161.     /* Change left/right soft key icon and label */
  162.     ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  163.     ChangeRightSoftkey(STR_GLOBAL_BACK, IMG_GLOBAL_BACK);
  164.     /* set the left/right soft key functions handlers */
  165.     SetLeftSoftkeyFunction(EntryCALLSETBarringMain, KEY_EVENT_UP);
  166.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  167.     /* set the left/right arrow key function handlers */
  168.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  169.     SetKeyHandler(EntryCALLSETBarringMain, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  170.     return;
  171. }
  172. /*****************************************************************************
  173.  * FUNCTION
  174.  *  HighlightCALLSETCallBarringOutgoing
  175.  * DESCRIPTION
  176.  *  highlite handler for the call barring outgoing menu option
  177.  * NA
  178.  *  
  179.  * PARAMETERS
  180.  *  void
  181.  * RETURNS
  182.  *  void
  183.  *****************************************************************************/
  184. void HighlightCALLSETCallBarringOutgoing(void)
  185. {
  186.     /*----------------------------------------------------------------*/
  187.     /* Local Variables                                                */
  188.     /*----------------------------------------------------------------*/
  189.     /*----------------------------------------------------------------*/
  190.     /* Code Body                                                      */
  191.     /*----------------------------------------------------------------*/
  192.     /* set the left/right soft key functions handlers */
  193.     SetLeftSoftkeyFunction(EntryCALLSETBarringOut, KEY_EVENT_UP);
  194.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  195.     /* set the left/right arrow key function handlers */
  196.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  197.     SetKeyHandler(EntryCALLSETBarringOut, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  198.     return;
  199. }
  200. /*****************************************************************************
  201.  * FUNCTION
  202.  *  HighlightCALLSETCallBarringIncoming
  203.  * DESCRIPTION
  204.  *  highlight handler for call barring in case of incoming.
  205.  * NA
  206.  *  
  207.  * PARAMETERS
  208.  *  void
  209.  * RETURNS
  210.  *  void
  211.  *****************************************************************************/
  212. void HighlightCALLSETCallBarringIncoming(void)
  213. {
  214.     /*----------------------------------------------------------------*/
  215.     /* Local Variables                                                */
  216.     /*----------------------------------------------------------------*/
  217.     /*----------------------------------------------------------------*/
  218.     /* Code Body                                                      */
  219.     /*----------------------------------------------------------------*/
  220.     /* Change right soft key icon and label */
  221.     SetLeftSoftkeyFunction(EntryCALLSETBarringIn, KEY_EVENT_UP);
  222.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  223.     /* set the left/right arrow key function handlers */
  224.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  225.     SetKeyHandler(EntryCALLSETBarringIn, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  226.     return;
  227. }
  228. /*****************************************************************************
  229.  * FUNCTION
  230.  *  HighlightCALLSETCallBarringCancelAll
  231.  * DESCRIPTION
  232.  *  highlight handler for call barring cancel all application
  233.  * NA
  234.  *  
  235.  * PARAMETERS
  236.  *  void
  237.  * RETURNS
  238.  *  void
  239.  *****************************************************************************/
  240. void HighlightCALLSETCallBarringCancelAll(void)
  241. {
  242.     /*----------------------------------------------------------------*/
  243.     /* Local Variables                                                */
  244.     /*----------------------------------------------------------------*/
  245.     /*----------------------------------------------------------------*/
  246.     /* Code Body                                                      */
  247.     /*----------------------------------------------------------------*/
  248.     /* storing the menu item selected */
  249.     g_callset_context.SSBarAction = BARRING_CANCEL_ALL;
  250.     /* set the left/right soft key functions handlers */
  251.     SetLeftSoftkeyFunction(EntryCALLSETBarringPass, KEY_EVENT_UP);
  252.     /* micha0529 */
  253.     SetKeyHandler(EntryCALLSETBarringPass, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  254.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  255.     /* set the left/right arrow key function handlers */
  256.     ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  257.     return;
  258. }
  259. /*****************************************************************************
  260.  * FUNCTION
  261.  *  HighlightCALLSETCallBarringChangePwd
  262.  * DESCRIPTION
  263.  *  highlight handler for changing call barring passwd
  264.  * NA
  265.  *  
  266.  * PARAMETERS
  267.  *  void
  268.  * RETURNS
  269.  *  void
  270.  *****************************************************************************/
  271. void HighlightCALLSETCallBarringChangePwd(void)
  272. {
  273.     /*----------------------------------------------------------------*/
  274.     /* Local Variables                                                */
  275.     /*----------------------------------------------------------------*/
  276.     /*----------------------------------------------------------------*/
  277.     /* Code Body                                                      */
  278.     /*----------------------------------------------------------------*/
  279.     /* storing the menu item selected */
  280.     g_callset_context.SSBarAction = BARRING_CHANGE_PSW;
  281.     /* set the left/right soft key functions handlers */
  282.     SetLeftSoftkeyFunction(EntryCALLSETBarringOldPass, KEY_EVENT_UP);
  283.     /* micha0529 */
  284.     SetKeyHandler(EntryCALLSETBarringOldPass, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  285.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  286.     return;
  287. }
  288. /*****************************************************************************
  289.  * FUNCTION
  290.  *  HighlightCALLSETCallBarringAllOutCalls
  291.  * DESCRIPTION
  292.  *  highlight handler for call barring all outgoing calls.
  293.  * NA
  294.  *  
  295.  * PARAMETERS
  296.  *  void
  297.  * RETURNS
  298.  *  void
  299.  *****************************************************************************/
  300. void HighlightCALLSETCallBarringAllOutCalls(void)
  301. {
  302.     /*----------------------------------------------------------------*/
  303.     /* Local Variables                                                */
  304.     /*----------------------------------------------------------------*/
  305.     /*----------------------------------------------------------------*/
  306.     /* Code Body                                                      */
  307.     /*----------------------------------------------------------------*/
  308.     /* storing the menu item selected */
  309.     g_callset_context.SSBarType = BARRING_OUTGOING_ALLCALLS;
  310.     /* set the left/right soft key functions handlers */
  311.     SetLeftSoftkeyFunction(EntryCALLSETBarringOption, KEY_EVENT_UP);
  312.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  313.     /* set the left/right arrow key function handlers */
  314.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  315.     SetKeyHandler(EntryCALLSETBarringOption, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  316.     return;
  317. }
  318. /*****************************************************************************
  319.  * FUNCTION
  320.  *  HighlightCALLSETCallBarringAllOutInter
  321.  * DESCRIPTION
  322.  *  high light handler for call barring outgoing international calls.
  323.  * NA
  324.  *  
  325.  * PARAMETERS
  326.  *  void
  327.  * RETURNS
  328.  *  void
  329.  *****************************************************************************/
  330. void HighlightCALLSETCallBarringAllOutInter(void)
  331. {
  332.     /*----------------------------------------------------------------*/
  333.     /* Local Variables                                                */
  334.     /*----------------------------------------------------------------*/
  335.     /*----------------------------------------------------------------*/
  336.     /* Code Body                                                      */
  337.     /*----------------------------------------------------------------*/
  338.     /* storing the menu item selected */
  339.     g_callset_context.SSBarType = BARRING_OUTGOING_INTERCALL;
  340.     /* set the left/right soft key functions handlers */
  341.     SetLeftSoftkeyFunction(EntryCALLSETBarringOption, KEY_EVENT_UP);
  342.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  343.     /* set the left/right arrow key function handlers */
  344.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  345.     SetKeyHandler(EntryCALLSETBarringOption, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  346.     return;
  347. }
  348. /*****************************************************************************
  349.  * FUNCTION
  350.  *  HighlightCALLSETCallBarringAllOutInterExcHome
  351.  * DESCRIPTION
  352.  *  highlight handler for call barring outgoing international
  353.  *  calls except home.
  354.  * NA
  355.  *  
  356.  * PARAMETERS
  357.  *  void
  358.  * RETURNS
  359.  *  void
  360.  *****************************************************************************/
  361. void HighlightCALLSETCallBarringAllOutInterExcHome(void)
  362. {
  363.     /*----------------------------------------------------------------*/
  364.     /* Local Variables                                                */
  365.     /*----------------------------------------------------------------*/
  366.     /*----------------------------------------------------------------*/
  367.     /* Code Body                                                      */
  368.     /*----------------------------------------------------------------*/
  369.     /* storing the menu item selected */
  370.     g_callset_context.SSBarType = BARRING_OUTGOING_INTEREXCEPTHOME;
  371.     /* set the left/right soft key functions handlers */
  372.     SetLeftSoftkeyFunction(EntryCALLSETBarringOption, KEY_EVENT_UP);
  373.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  374.     /* set the left/right arrow key function handlers */
  375.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  376.     SetKeyHandler(EntryCALLSETBarringOption, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  377.     return;
  378. }
  379. /*****************************************************************************
  380.  * FUNCTION
  381.  *  HighlightCALLSETCallBarringAllInCalls
  382.  * DESCRIPTION
  383.  *  highlight handler for call barring all international calls.
  384.  * NA
  385.  *  
  386.  * PARAMETERS
  387.  *  void
  388.  * RETURNS
  389.  *  void
  390.  *****************************************************************************/
  391. void HighlightCALLSETCallBarringAllInCalls(void)
  392. {
  393.     /*----------------------------------------------------------------*/
  394.     /* Local Variables                                                */
  395.     /*----------------------------------------------------------------*/
  396.     /*----------------------------------------------------------------*/
  397.     /* Code Body                                                      */
  398.     /*----------------------------------------------------------------*/
  399.     /* storing the menu item selected */
  400.     g_callset_context.SSBarType = BARRING_INCOMING_ALLCALLS;
  401.     /* set the left/right soft key functions handlers */
  402.     SetLeftSoftkeyFunction(EntryCALLSETBarringOption, KEY_EVENT_UP);
  403.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  404.     /* set the left/right arrow key function handlers */
  405.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  406.     SetKeyHandler(EntryCALLSETBarringOption, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  407.     return;
  408. }
  409. /*****************************************************************************
  410.  * FUNCTION
  411.  *  HighlightCALLSETCallBarringAllInRoaming
  412.  * DESCRIPTION
  413.  *  highlight handler for call barring incoming on roaming calls.
  414.  * NA
  415.  *  
  416.  * PARAMETERS
  417.  *  void
  418.  * RETURNS
  419.  *  void
  420.  *****************************************************************************/
  421. void HighlightCALLSETCallBarringAllInRoaming(void)
  422. {
  423.     /*----------------------------------------------------------------*/
  424.     /* Local Variables                                                */
  425.     /*----------------------------------------------------------------*/
  426.     /*----------------------------------------------------------------*/
  427.     /* Code Body                                                      */
  428.     /*----------------------------------------------------------------*/
  429.     /* storing the menu item selected */
  430.     g_callset_context.SSBarType = BARRING_INCOMING_ROAMING;
  431.     /* set the left/right soft key functions handlers */
  432.     SetLeftSoftkeyFunction(EntryCALLSETBarringOption, KEY_EVENT_UP);
  433.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  434.     /* set the left/right arrow key function handlers */
  435.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  436.     SetKeyHandler(EntryCALLSETBarringOption, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  437.     return;
  438. }
  439. /*****************************************************************************
  440.  * FUNCTION
  441.  *  HighlightCALLSETCallBarringActive
  442.  * DESCRIPTION
  443.  *  hightlight handler for call barring activate
  444.  * NA
  445.  *  
  446.  * PARAMETERS
  447.  *  void
  448.  * RETURNS
  449.  *  void
  450.  *****************************************************************************/
  451. void HighlightCALLSETCallBarringActive(void)
  452. {
  453.     /*----------------------------------------------------------------*/
  454.     /* Local Variables                                                */
  455.     /*----------------------------------------------------------------*/
  456.     /*----------------------------------------------------------------*/
  457.     /* Code Body                                                      */
  458.     /*----------------------------------------------------------------*/
  459.     /* storing the menu item selected */
  460.     g_callset_context.SSBarAction = BARRING_ON;
  461.     /* set the left/right soft key functions handlers */
  462.     SetLeftSoftkeyFunction(EntryCALLSETBarringPass, KEY_EVENT_UP);
  463.     /* micha0529 */
  464.     SetKeyHandler(EntryCALLSETBarringPass, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  465.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  466.     return;
  467. }
  468. /*****************************************************************************
  469.  * FUNCTION
  470.  *  HighlightCALLSETCallBarringDeactive
  471.  * DESCRIPTION
  472.  *  hightlight handler for call barring deactivate
  473.  * NA
  474.  *  
  475.  * PARAMETERS
  476.  *  void
  477.  * RETURNS
  478.  *  void
  479.  *****************************************************************************/
  480. void HighlightCALLSETCallBarringDeactive(void)
  481. {
  482.     /*----------------------------------------------------------------*/
  483.     /* Local Variables                                                */
  484.     /*----------------------------------------------------------------*/
  485.     /*----------------------------------------------------------------*/
  486.     /* Code Body                                                      */
  487.     /*----------------------------------------------------------------*/
  488.     /* storing the menu item selected */
  489.     g_callset_context.SSBarAction = BARRING_OFF;
  490.     /* set the left/right soft key functions handlers */
  491.     SetLeftSoftkeyFunction(EntryCALLSETBarringPass, KEY_EVENT_UP);
  492.     /* micha0529 */
  493.     SetKeyHandler(EntryCALLSETBarringPass, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  494.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  495.     return;
  496. }
  497. /*****************************************************************************
  498.  * FUNCTION
  499.  *  HighlightCALLSETCallBarringQuery
  500.  * DESCRIPTION
  501.  *  hightlight handler for call barring query status
  502.  * NA
  503.  *  
  504.  * PARAMETERS
  505.  *  void
  506.  * RETURNS
  507.  *  void
  508.  *****************************************************************************/
  509. void HighlightCALLSETCallBarringQuery(void)
  510. {
  511.     /*----------------------------------------------------------------*/
  512.     /* Local Variables                                                */
  513.     /*----------------------------------------------------------------*/
  514.     /*----------------------------------------------------------------*/
  515.     /* Code Body                                                      */
  516.     /*----------------------------------------------------------------*/
  517.     /* set the left/right soft key functions handlers */
  518.     SetLeftSoftkeyFunction(SendBarrQuery, KEY_EVENT_UP);
  519.     /* micha0529 */
  520.     ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  521.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  522.     return;
  523. }
  524. /*****************************************************************************
  525.  * FUNCTION
  526.  *  EntryCALLSETBarringMain
  527.  * DESCRIPTION
  528.  *  entry function for call barring main menu
  529.  * NA
  530.  *  
  531.  * PARAMETERS
  532.  *  void
  533.  * RETURNS
  534.  *  void
  535.  *****************************************************************************/
  536. void EntryCALLSETBarringMain(void)
  537. {
  538.     /*----------------------------------------------------------------*/
  539.     /* Local Variables                                                */
  540.     /*----------------------------------------------------------------*/
  541.     //micha1229
  542.     //      U16 nDispAttribute; /* Stores display attribue */
  543.     U8 *guiBuffer;              /* Buffer holding history data */
  544.     U16 nNumofItem;
  545.     U16 nStrItemList[MAX_SUB_MENUS];
  546.     /*----------------------------------------------------------------*/
  547.     /* Code Body                                                      */
  548.     /*----------------------------------------------------------------*/
  549.     /* U32 maskingByte=0xFF;
  550.        U32 menuItemId=0xFFFFFFFF; */
  551.     EntryNewScreen(SCR_ID_CALLSET_BARRING_MAIN, NULL, EntryCALLSETBarringMain, NULL);
  552.     /* Get current screen info into gui buffer  for history purposes */
  553.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_MAIN);
  554.     /* Retrieve no of child of menu item to be displayed */
  555.     nNumofItem = GetNumOfChild_Ext(MENU8237_SCR8093_MNGCALL_MENU_BARRING);      /* diamond, 2005/07/01 add _Ext to menu item functions */
  556.     /* Get attribute of menu to be displayed */
  557.     /* nDispAttribute = GetDispAttributeOfItem(MENU8237_SCR8093_MNGCALL_MENU_BARRING); */
  558.     /* Retrieve string ids in sequence of given menu item to be displayed */
  559.     GetSequenceStringIds_Ext(MENU8237_SCR8093_MNGCALL_MENU_BARRING, nStrItemList);      /* diamond, 2005/07/01 add _Ext to menu item functions */
  560.     /* Set current parent id */
  561.     SetParentHandler(MENU8237_SCR8093_MNGCALL_MENU_BARRING);
  562.     /* Register highlight handler to be called in menu screen */
  563.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  564.     /* diamond, 2005/07/01 removed for new menu item architecture to CPHS */
  565. #if 0
  566. /* under construction !*/
  567. /* under construction !*/
  568. /* under construction !*/
  569. /* under construction !*/
  570. /* under construction !*/
  571. /* under construction !*/
  572. /* under construction !*/
  573. /* under construction !*/
  574. /* under construction !*/
  575. /* under construction !*/
  576. #endif /* 0 */ 
  577.     /* Display Screen */
  578.     ShowCategory15Screen(
  579.         STR_MENU_CALL_BARRING,
  580.         MAIN_MENU_TITLE_SETTINGS_ICON,
  581.         STR_GLOBAL_OK,
  582.         IMG_GLOBAL_OK,
  583.         STR_GLOBAL_BACK,
  584.         IMG_GLOBAL_BACK,
  585.         nNumofItem,
  586.         nStrItemList,
  587.         (U16*) gIndexIconsImageList,
  588.         1,
  589.         0,
  590.         guiBuffer);
  591.     /* Register function with right softkey */
  592.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  593.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  594.     /* Register Exit handler */
  595.     return;
  596. }
  597. /*****************************************************************************
  598.  * FUNCTION
  599.  *  EntryCALLSETBarringOut
  600.  * DESCRIPTION
  601.  *  entry function for out going call barring menu
  602.  * NA
  603.  *  
  604.  * PARAMETERS
  605.  *  void
  606.  * RETURNS
  607.  *  void
  608.  *****************************************************************************/
  609. void EntryCALLSETBarringOut(void)
  610. {
  611.     /*----------------------------------------------------------------*/
  612.     /* Local Variables                                                */
  613.     /*----------------------------------------------------------------*/
  614.     //micha1229
  615.     //      U16 nDispAttribute; /* Stores display attribue */
  616.     U8 *guiBuffer;              /* Buffer holding history data */
  617.     U16 nNumofItem;
  618.     U16 nStrItemList[MAX_SUB_MENUS];
  619.     /*----------------------------------------------------------------*/
  620.     /* Code Body                                                      */
  621.     /*----------------------------------------------------------------*/
  622.     /* U32 maskingByte=0xFFFFFFFF;
  623.        U32 menuItemId=0xFFFFFFFF; */
  624.     EntryNewScreen(SCR_ID_CALLSET_BARRING_OUT, NULL, EntryCALLSETBarringOut, NULL);
  625.     /* Get current screen info into gui buffer  for history purposes */
  626.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_OUT);
  627.     /* Retrieve no of child of menu item to be displayed */
  628.     nNumofItem = GetNumOfChild_Ext(MENU_CALL_BARRING_OUTGOING); /* diamond, 2005/07/01 add _Ext to menu item functions */
  629.     /* Get attribute of menu to be displayed */
  630.     /* nDispAttribute = GetDispAttributeOfItem(MENU_CALL_BARRING_OUTGOING); */
  631.     /* Retrieve string ids in sequence of given menu item to be displayed */
  632.     GetSequenceStringIds_Ext(MENU_CALL_BARRING_OUTGOING, nStrItemList); /* diamond, 2005/07/01 add _Ext to menu item functions */
  633.     /* Set current parent id */
  634.     SetParentHandler(MENU_CALL_BARRING_OUTGOING);
  635.     /* Register highlight handler to be called in menu screen */
  636.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  637.     /* diamond, 2005/07/01 removed for new menu item architecture to CPHS */
  638. #if 0
  639. /* under construction !*/
  640. /* under construction !*/
  641. /* under construction !*/
  642. /* under construction !*/
  643. /* under construction !*/
  644. /* under construction !*/
  645. /* under construction !*/
  646. /* under construction !*/
  647. /* under construction !*/
  648. /* under construction !*/
  649. #endif /* 0 */ 
  650.     /* Display Category Screen */
  651.     ShowCategory15Screen(
  652.         STR_BARRING_OUTGOING_CALL_CAPTION,
  653.         MAIN_MENU_TITLE_SETTINGS_ICON,
  654.         STR_GLOBAL_OK,
  655.         IMG_GLOBAL_OK,
  656.         STR_GLOBAL_BACK,
  657.         IMG_GLOBAL_BACK,
  658.         nNumofItem,
  659.         nStrItemList,
  660.         (U16*) gIndexIconsImageList,
  661.         1,
  662.         0,
  663.         guiBuffer);
  664.     /* Register function with right softkey */
  665.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  666.     /* Register Exit handler */
  667.     return;
  668. }
  669. /*****************************************************************************
  670.  * FUNCTION
  671.  *  EntryCALLSETBarringIn
  672.  * DESCRIPTION
  673.  *  entry function for incoimg call barring menu
  674.  * NA
  675.  *  
  676.  * PARAMETERS
  677.  *  void
  678.  * RETURNS
  679.  *  void
  680.  *****************************************************************************/
  681. void EntryCALLSETBarringIn(void)
  682. {
  683.     /*----------------------------------------------------------------*/
  684.     /* Local Variables                                                */
  685.     /*----------------------------------------------------------------*/
  686.     //micha1229
  687.     //      U16 nDispAttribute; /* Stores display attribue */
  688.     U8 *guiBuffer;              /* Buffer holding history data */
  689.     U16 nNumofItem;
  690.     U16 nStrItemList[MAX_SUB_MENUS];
  691.     /*----------------------------------------------------------------*/
  692.     /* Code Body                                                      */
  693.     /*----------------------------------------------------------------*/
  694.     /* U32 maskingByte=0xFFFFFFFF;
  695.        U32 menuItemId=0xFFFFFFFF; */
  696.     EntryNewScreen(SCR_ID_CALLSET_BARRING_IN, NULL, EntryCALLSETBarringIn, NULL);
  697.     /* Get current screen info into gui buffer  for history purposes */
  698.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_IN);
  699.     /* Retrieve no of child of menu item to be displayed */
  700.     nNumofItem = GetNumOfChild_Ext(MENU_CALL_BARRING_INCOMING); /* diamond, 2005/07/01 add _Ext to menu item functions */
  701.     /* Get attribute of menu to be displayed */
  702.     /* nDispAttribute = GetDispAttributeOfItem(MENU8237_SCR8093_MNGCALL_MENU_BARRING); */
  703.     /* Retrieve string ids in sequence of given menu item to be displayed */
  704.     GetSequenceStringIds_Ext(MENU_CALL_BARRING_INCOMING, nStrItemList); /* diamond, 2005/07/01 add _Ext to menu item functions */
  705.     /* Set current parent id */
  706.     SetParentHandler(MENU_CALL_BARRING_INCOMING);
  707.     /* Register highlight handler to be called in menu screen */
  708.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  709.     /* diamond, 2005/07/01 removed for new menu item architecture to CPHS */
  710. #if 0
  711. /* under construction !*/
  712. /* under construction !*/
  713. /* under construction !*/
  714. /* under construction !*/
  715. /* under construction !*/
  716. /* under construction !*/
  717. /* under construction !*/
  718. #endif /* 0 */ 
  719.     /* Display Category Screen */
  720.     ShowCategory15Screen(
  721.         STR_MENU_BARRING_INCOMING_MAIN,
  722.         MAIN_MENU_TITLE_SETTINGS_ICON,
  723.         STR_GLOBAL_OK,
  724.         IMG_GLOBAL_OK,
  725.         STR_GLOBAL_BACK,
  726.         IMG_GLOBAL_BACK,
  727.         nNumofItem,
  728.         nStrItemList,
  729.         (U16*) gIndexIconsImageList,
  730.         1,
  731.         0,
  732.         guiBuffer);
  733.     /* Register function with right softkey */
  734.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  735.     /* Register Exit handler */
  736.     return;
  737. }
  738. /*****************************************************************************
  739.  * FUNCTION
  740.  *  EntryCALLSETBarringOption
  741.  * DESCRIPTION
  742.  *  entry function for call barring option menu
  743.  * NA
  744.  *  
  745.  * PARAMETERS
  746.  *  void
  747.  * RETURNS
  748.  *  void
  749.  *****************************************************************************/
  750. void EntryCALLSETBarringOption(void)
  751. {
  752.     /*----------------------------------------------------------------*/
  753.     /* Local Variables                                                */
  754.     /*----------------------------------------------------------------*/
  755.     //micha1229
  756.     //      U16 nDispAttribute; /* Stores display attribue */
  757.     U8 *guiBuffer;              /* Buffer holding history data */
  758.     U16 nNumofItem;
  759.     U16 nStrItemList[MAX_SUB_MENUS];
  760.     /*----------------------------------------------------------------*/
  761.     /* Code Body                                                      */
  762.     /*----------------------------------------------------------------*/
  763.     EntryNewScreen(SCR_ID_CALLSET_BARRING_OPTION, NULL, EntryCALLSETBarringOption, NULL);
  764.     /* Get current screen info into gui buffer  for history purposes */
  765.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_OPTION);
  766.     /* Retrieve no of child of menu item to be displayed */
  767.     nNumofItem = GetNumOfChild(MENU_BARRING_OPTION);
  768.     /* Get attribute of menu to be displayed */
  769.     /* nDispAttribute = GetDispAttributeOfItem(MENU_BARRING_OPTION); */
  770.     /* Retrieve string ids in sequence of given menu item to be displayed */
  771.     GetSequenceStringIds(MENU_BARRING_OPTION, nStrItemList);
  772.     /* Set current parent id */
  773.     SetParentHandler(MENU_BARRING_OPTION);
  774.     /* Register highlight handler to be called in menu screen */
  775.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  776.     /* Display Category Screen */
  777.     ShowCategory15Screen(
  778.         STR_MENU_BARRING_OPTION,
  779.         MAIN_MENU_TITLE_SETTINGS_ICON,
  780.         STR_GLOBAL_OK,
  781.         IMG_GLOBAL_OK,
  782.         STR_GLOBAL_BACK,
  783.         IMG_GLOBAL_BACK,
  784.         nNumofItem,
  785.         nStrItemList,
  786.         (U16*) gIndexIconsImageList,
  787.         1,
  788.         0,
  789.         guiBuffer);
  790.     /* Register function with right softkey */
  791.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  792.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  793.     /* Register Exit handler */
  794.     return;
  795. }
  796. /*****************************************************************************
  797.  * FUNCTION
  798.  *  ScrBarringPasswordaValidation
  799.  * DESCRIPTION
  800.  *  validating the call barring passwords
  801.  * NA
  802.  *  
  803.  * PARAMETERS
  804.  *  text        [?]         
  805.  *  cursor      [?]         
  806.  *  length      [IN]        
  807.  * RETURNS
  808.  *  void
  809.  *****************************************************************************/
  810. void ScrBarringPasswordaValidation(U8 *text, U8 *cursor, S32 length)
  811. {
  812.     /*----------------------------------------------------------------*/
  813.     /* Local Variables                                                */
  814.     /*----------------------------------------------------------------*/
  815.     /*----------------------------------------------------------------*/
  816.     /* Code Body                                                      */
  817.     /*----------------------------------------------------------------*/
  818.     if ((length) < BARR_SIM_PASS_LEN)
  819.     {
  820.         ChangeLeftSoftkey(0, 0);
  821.     }
  822.     else
  823.     {
  824.         ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  825.         /* check the screen from which validation came */
  826.         switch (g_callset_context.SSBarPassStep)
  827.         {
  828.                 /* if the call barring options is selected */
  829.             case 0:
  830.             {
  831.                 SetLeftSoftkeyFunction(CallBarrOption, KEY_EVENT_UP);
  832.                 break;
  833.             }
  834.                 /* if the flow is from call barring new passwords screen */
  835.             case 1:
  836.             {
  837.                 SetLeftSoftkeyFunction(EntryCALLSETBarringNewPass, KEY_EVENT_UP);
  838.                 break;
  839.             }
  840.                 /* if the flow is from confirmation screen of call barring password screen */
  841.             case 2:
  842.             {
  843.                 SetLeftSoftkeyFunction(EntryCALLSETBarringCfrmPass, KEY_EVENT_UP);
  844.                 break;
  845.             }
  846.                 /* if the call barring options is selected */
  847.             case 3:
  848.             {
  849.                 SetLeftSoftkeyFunction(CallBarrOption, KEY_EVENT_UP);
  850.                 break;
  851.             }
  852.         }
  853.     }
  854.     return;
  855. }
  856. /*****************************************************************************
  857.  * FUNCTION
  858.  *  EntryCALLSETBarringPass
  859.  * DESCRIPTION
  860.  *  entry function for call barring passwd
  861.  * NA
  862.  *  
  863.  * PARAMETERS
  864.  *  void
  865.  * RETURNS
  866.  *  void
  867.  *****************************************************************************/
  868. void EntryCALLSETBarringPass(void)
  869. {
  870.     /*----------------------------------------------------------------*/
  871.     /* Local Variables                                                */
  872.     /*----------------------------------------------------------------*/
  873.     U8 *guiBuffer;
  874.     /*----------------------------------------------------------------*/
  875.     /* Code Body                                                      */
  876.     /*----------------------------------------------------------------*/
  877.     /* U8* inputBuffer; */
  878.     EntryNewScreen(SCR_ID_CALLSET_BARRING_PASS, NULL, EntryCALLSETBarringPass, NULL);
  879.     /* Get current screen info into gui buffer  for history purposes */
  880.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_PASS);
  881.     /* inputBuffer = GetCurrInputBuffer(SCR_ID_CALLSET_BARRING_PASS); */
  882.     if (guiBuffer == NULL)
  883.     {
  884.         memset(g_callset_context.SSBarPassOld, 0, sizeof(g_callset_context.SSBarPassOld));
  885.     }
  886.     //      else
  887.     //              pfnUnicodeStrcpy((S8*)g_callset_context.SSBarPassOld, ( S8*)inputBuffer);
  888.     /* Register input validation function */
  889.     RegisterInputBoxValidationFunction(ScrBarringPasswordaValidation);
  890.     /* Display Category Screen */
  891.     ShowCategory111Screen(
  892.         STR_GLOBAL_OK,
  893.         IMG_GLOBAL_OK,
  894.         STR_GLOBAL_BACK,
  895.         IMG_GLOBAL_BACK,
  896.         STR_BARRING_PASSWORD_CAP,
  897.         INPUT_TYPE_NUMERIC_PASSWORD,
  898.         (PU8) g_callset_context.SSBarPassOld,
  899.         BARR_SIM_PASS_LEN + 1,
  900.         NULL,
  901.         guiBuffer);
  902.     /* Register function with left/right softkey */
  903.     SetLeftSoftkeyFunction(CallBarrOption, KEY_EVENT_UP);
  904.     SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  905.     g_callset_context.SSBarPassStep = 0;
  906.     /* Register Exit handler */
  907.     return;
  908. }
  909. /*****************************************************************************
  910.  * FUNCTION
  911.  *  CallBarrOption
  912.  * DESCRIPTION
  913.  *  call barring options processing function
  914.  * NA
  915.  *  
  916.  * PARAMETERS
  917.  *  void
  918.  * RETURNS
  919.  *  void
  920.  *****************************************************************************/
  921. void CallBarrOption(void)
  922. {
  923.     /*----------------------------------------------------------------*/
  924.     /* Local Variables                                                */
  925.     /*----------------------------------------------------------------*/
  926.     /*----------------------------------------------------------------*/
  927.     /* Code Body                                                      */
  928.     /*----------------------------------------------------------------*/
  929.     /* menu option selected is call barring activate */
  930.     if (g_callset_context.SSBarAction == BARRING_ON)
  931.     {
  932.         SendCallBarrActivate();
  933.     }
  934.     /* menu option selected is call barring deactivate */
  935.     else if (g_callset_context.SSBarAction == BARRING_OFF)
  936.     {
  937.         SendCallBarrDeactivate();
  938.     }
  939.     /* menu option selected is call barring query status */
  940.     else if (g_callset_context.SSBarAction == BARRING_QUERY)
  941.     {
  942.         SendBarrQuery();
  943.     }
  944.     /* menu option selected is call barring cancel all */
  945.     else if (g_callset_context.SSBarAction == BARRING_CANCEL_ALL)
  946.     {
  947.         SendCancelAllReq();
  948.     }
  949.     /* menu option selected is call barring password change req */
  950.     else if (g_callset_context.SSBarAction == BARRING_CHANGE_PSW)
  951.     {
  952.         SendChangePswdReq();
  953.     }
  954.     return;
  955. }
  956. /*****************************************************************************
  957.  * FUNCTION
  958.  *  SendCallBarrActivate
  959.  * DESCRIPTION
  960.  *  function to send req for call barring activate
  961.  * NA
  962.  *  
  963.  * PARAMETERS
  964.  *  void
  965.  * RETURNS
  966.  *  void
  967.  *****************************************************************************/
  968. void SendCallBarrActivate(void)
  969. {
  970.     /*----------------------------------------------------------------*/
  971.     /* Local Variables                                                */
  972.     /*----------------------------------------------------------------*/
  973.     S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)];
  974.     PS8 hash_string = NULL;
  975.     S8 string_out[20];
  976.     /*----------------------------------------------------------------*/
  977.     /* Code Body                                                      */
  978.     /*----------------------------------------------------------------*/
  979.     memset(string_out, 0, 20);
  980.     /* format SS string for sending req to l4 */
  981.     memset(input_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  982.     hash_string = (PS8) GetString(STR_HASH_VALUE);
  983.     switch (g_callset_context.SSBarType)
  984.     {
  985.             /* incase of call barring all outgoing calls */
  986.         case BARRING_OUTGOING_ALLCALLS:
  987.             strcpy((S8*) string_out, "*33*");
  988.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  989.             break;
  990.             /* incase of call barring all outgoing international calls */
  991.         case BARRING_OUTGOING_INTERCALL:
  992.             strcpy((S8*) string_out, "*331*");
  993.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  994.             break;
  995.             /* incase of call barring all outgoing international calls expect home */
  996.         case BARRING_OUTGOING_INTEREXCEPTHOME:
  997.             strcpy((S8*) string_out, "*332*");
  998.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  999.             break;
  1000.             /* incase of call barring all incoming calls */
  1001.         case BARRING_INCOMING_ALLCALLS:
  1002.             strcpy((S8*) string_out, "*35*");
  1003.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1004.             break;
  1005.             /* incase of call barring all incoming roaming calls */
  1006.         case BARRING_INCOMING_ROAMING:
  1007.             strcpy((S8*) string_out, "*351*");
  1008.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1009.             break;
  1010.     }
  1011.     pfnUnicodeStrcat((PS8) input_string, (PS8) g_callset_context.SSBarPassOld);
  1012.     pfnUnicodeStrcat((PS8) input_string, (PS8) hash_string);
  1013.     /* set protocol event handler for the call barring response */
  1014.     SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP);
  1015.     /* make a corresponding ss string for call barring option */
  1016.     MakeCall((PS8) input_string);
  1017.     return;
  1018. }
  1019. /*****************************************************************************
  1020.  * FUNCTION
  1021.  *  SendCallBarrDeactivate
  1022.  * DESCRIPTION
  1023.  *  function to send req for call barring deactivate
  1024.  * NA
  1025.  *  
  1026.  * PARAMETERS
  1027.  *  void
  1028.  * RETURNS
  1029.  *  void
  1030.  *****************************************************************************/
  1031. void SendCallBarrDeactivate(void)
  1032. {
  1033.     /*----------------------------------------------------------------*/
  1034.     /* Local Variables                                                */
  1035.     /*----------------------------------------------------------------*/
  1036.     S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)];
  1037.     PS8 hash_string = NULL;
  1038.     S8 string_out[20];
  1039.     /*----------------------------------------------------------------*/
  1040.     /* Code Body                                                      */
  1041.     /*----------------------------------------------------------------*/
  1042.     memset(string_out, 0, 20);
  1043.     /* format SS string for sending req to l4 */
  1044.     memset(input_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  1045.     hash_string = (PS8) GetString(STR_HASH_VALUE);
  1046.     switch (g_callset_context.SSBarType)
  1047.     {
  1048.             /* incase of call barring all outgoing calls */
  1049.         case BARRING_OUTGOING_ALLCALLS:
  1050.             strcpy((S8*) string_out, "#33*");
  1051.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1052.             break;
  1053.             /* incase of call barring all outgoing international calls */
  1054.         case BARRING_OUTGOING_INTERCALL:
  1055.             strcpy((S8*) string_out, "#331*");
  1056.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1057.             break;
  1058.             /* incase of call barring all outgoing international calls expect home */
  1059.         case BARRING_OUTGOING_INTEREXCEPTHOME:
  1060.             strcpy((S8*) string_out, "#332*");
  1061.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1062.             break;
  1063.             /* incase of call barring all incoming calls */
  1064.         case BARRING_INCOMING_ALLCALLS:
  1065.             strcpy((S8*) string_out, "#35*");
  1066.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1067.             break;
  1068.             /* incase of call barring all incoming roaming calls */
  1069.         case BARRING_INCOMING_ROAMING:
  1070.             strcpy((S8*) string_out, "#351*");
  1071.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_out);
  1072.             break;
  1073.     }
  1074.     pfnUnicodeStrcat((PS8) input_string, (PS8) g_callset_context.SSBarPassOld);
  1075.     pfnUnicodeStrcat((PS8) input_string, (PS8) hash_string);
  1076.     /* set protocol event handler for the call barring response */
  1077.     SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP);
  1078.     /* make a corresponding ss string for call barring option */
  1079.     MakeCall((PS8) input_string);
  1080.     return;
  1081. }
  1082. /*****************************************************************************
  1083.  * FUNCTION
  1084.  *  SendBarrQuery
  1085.  * DESCRIPTION
  1086.  *  function to send req for call barring query status.
  1087.  * NA
  1088.  *  
  1089.  * PARAMETERS
  1090.  *  void
  1091.  * RETURNS
  1092.  *  void
  1093.  *****************************************************************************/
  1094. void SendBarrQuery(void)
  1095. {
  1096.     /*----------------------------------------------------------------*/
  1097.     /* Local Variables                                                */
  1098.     /*----------------------------------------------------------------*/
  1099.     S8 input_string[(MAX_DIGITS_USSD * ENCODING_LENGTH)];
  1100.     S8 string_type[30];
  1101.     /*----------------------------------------------------------------*/
  1102.     /* Code Body                                                      */
  1103.     /*----------------------------------------------------------------*/
  1104.     /* format SS string for sending req to l4 */
  1105.     memset(input_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  1106.     memset(string_type, 0, 30);
  1107.     switch (g_callset_context.SSBarType)
  1108.     {
  1109.             /* incase of call barring all outgoing calls */
  1110.         case BARRING_OUTGOING_ALLCALLS:
  1111.             strcpy((S8*) string_type, "*#33#");
  1112.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1113.             break;
  1114.             /* incase of call barring all outgoing international calls */
  1115.         case BARRING_OUTGOING_INTERCALL:
  1116.             strcpy((S8*) string_type, "*#331#");
  1117.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1118.             break;
  1119.             /* incase of call barring all outgoing international calls expect home */
  1120.         case BARRING_OUTGOING_INTEREXCEPTHOME:
  1121.             strcpy((S8*) string_type, "*#332#");
  1122.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1123.             break;
  1124.             /* incase of call barring all incoming calls */
  1125.         case BARRING_INCOMING_ALLCALLS:
  1126.             strcpy((S8*) string_type, "*#35#");
  1127.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1128.             break;
  1129.             /* incase of call barring all incoming roaming calls */
  1130.         case BARRING_INCOMING_ROAMING:
  1131.             strcpy((S8*) string_type, "*#351#");
  1132.             AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1133.             break;
  1134.     }
  1135.     /* set protocol event handler for the call barring response */
  1136.     SetProtocolEventHandler(CALLSETBarringRsp, PRT_MMI_SS_CALL_BARRING_RSP);
  1137.     /* make a corresponding ss string for call barring option */
  1138.     MakeCall((PS8) input_string);
  1139.     return;
  1140. }
  1141. /*****************************************************************************
  1142.  * FUNCTION
  1143.  *  CALLSETBarringRsp
  1144.  * DESCRIPTION
  1145.  *  function for handling response for call barring query req.
  1146.  * NA
  1147.  *  
  1148.  * PARAMETERS
  1149.  *  info        [?]     
  1150.  * RETURNS
  1151.  *  void
  1152.  *****************************************************************************/
  1153. void CALLSETBarringRsp(void *info)
  1154. {
  1155.     /*----------------------------------------------------------------*/
  1156.     /* Local Variables                                                */
  1157.     /*----------------------------------------------------------------*/
  1158.     mmi_ss_call_barring_rsp_struct *pMsgBarringRsp = (mmi_ss_call_barring_rsp_struct*) info;
  1159.     U8 bs_index;
  1160.     /*----------------------------------------------------------------*/
  1161.     /* Code Body                                                      */
  1162.     /*----------------------------------------------------------------*/
  1163.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  1164.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OUT);
  1165.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_IN);
  1166.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_PASS);
  1167.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OLD_PASS);
  1168.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OPTION);
  1169.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_NEW_PASS);
  1170.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_CFRM_PASS);
  1171.     /* check the status of the response result */
  1172.     if (pMsgBarringRsp->result.flag == L4C_OK)
  1173.     {
  1174.         /* if the response is success check the type */
  1175.         switch (pMsgBarringRsp->type)
  1176.         {
  1177.                 /* call barring all outgoing calls */
  1178.             case L4_BAOC:
  1179.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BAOC_A));
  1180.                 break;
  1181.                 /* call barring all outgoing international calls */
  1182.             case L4_BOIC:
  1183.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BOIC_A));
  1184.                 break;
  1185.                 /* call barring all outgoing international calls except home */
  1186.             case L4_BOICEXHC:
  1187.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BOICEXHC_A));
  1188.                 break;
  1189.                 /* call barring all incoming calls */
  1190.             case L4_BAIC:
  1191.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BAIC_A));
  1192.                 break;
  1193.                 /* call barring all incoming roaming calls */
  1194.             case L4_BAICROAM:
  1195.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BAICROAM_A));
  1196.                 break;
  1197.                 /* call barring cancel all calls */
  1198.             case L4_BAC:
  1199.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BAC_A));
  1200.                 break;
  1201.                 /* call barring all outgoing calls */
  1202.             case L4_BOC:
  1203.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BOC_A));
  1204.                 break;
  1205.                 /* call barring all incoming calls */
  1206.             case L4_BIC:
  1207.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_BIC_A));
  1208.                 break;
  1209.             default:
  1210.                 pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEFAULT_A));
  1211.                 break;
  1212.         }
  1213.         /* format the result string with active/deactive tags. */
  1214.         if (pMsgBarringRsp->count == 0)
  1215.         {
  1216.             pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEACTIVATED));
  1217.         }
  1218.         for (bs_index = 0; bs_index < pMsgBarringRsp->count; bs_index++)
  1219.         {
  1220.             if ((pfnUnicodeStrlen((PS8) GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
  1221.                  + pfnUnicodeStrlen((PS8) GetString(STR_DEACTIVATED))
  1222.                  + pfnUnicodeStrlen((PS8) g_callset_context.SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH)
  1223.             {
  1224.                 if (pMsgBarringRsp->list[bs_index].ss_status & SS_ABIT)
  1225.                 {
  1226.                     pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_ACTIVATED));
  1227.                 }
  1228.                 else if (pMsgBarringRsp->list[bs_index].ss_status & SS_PBIT)
  1229.                 {
  1230.                     pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEACTIVATED));
  1231.                 }
  1232.                 else
  1233.                 {
  1234.                     pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_NOT_PROVIDED));
  1235.                 }
  1236.                 AppendBScodeString(pMsgBarringRsp->list[bs_index].bs_code, (PS8) g_callset_context.SSDisplayBuffer);
  1237.             }
  1238.         }
  1239.         /* call the result screen function to display the result string */
  1240.         /* micha0322 */
  1241.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  1242.         EntryCALLSETGeneralSSResut();
  1243.     }
  1244.     else
  1245.     {
  1246.         /* in case of response failure */
  1247.     #ifdef __MMI_SS_SHOW_CAUSE__
  1248.         ShowCauseString(pMsgBarringRsp->result.cause, (PS8) g_callset_context.SSDisplayBuffer);
  1249.         /* micha0322 */
  1250.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  1251.         EntryCALLSETGeneralSSResut();
  1252.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  1253.         /* display the not done popup */
  1254.         /* micha0616 */
  1255.         if (pMsgBarringRsp->result.cause == CM_SS_ERR_NEGATIVEPW_CHECK)
  1256.         {
  1257.             DisplayPopup((PU8) GetString(STR_SETTING_WRONG), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1258.         }
  1259.         else if (pMsgBarringRsp->result.cause == CM_SS_ERR_NUMBEROFPW_ATTEMPTSVIOLATION)
  1260.         {
  1261.             DisplayPopup((PU8) GetString(STR_SETTING_BLOCK), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1262.         }
  1263.         else
  1264.         {
  1265.             DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1266.         }
  1267.         /* micha0915 */
  1268.         RemoveSSReqScr();
  1269.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  1270.     }
  1271.     return;
  1272. }
  1273. /*****************************************************************************
  1274.  * FUNCTION
  1275.  *  SendCancelAllReq
  1276.  * DESCRIPTION
  1277.  *  function for sending req for cancel all (call barring) .
  1278.  * NA
  1279.  *  
  1280.  * PARAMETERS
  1281.  *  void
  1282.  * RETURNS
  1283.  *  void
  1284.  *****************************************************************************/
  1285. void SendCancelAllReq(void)
  1286. {
  1287.     /*----------------------------------------------------------------*/
  1288.     /* Local Variables                                                */
  1289.     /*----------------------------------------------------------------*/
  1290.     U8 input_string[MAX_DIGITS_USSD];
  1291.     PS8 hash_string = NULL;
  1292.     U8 string_type[20];
  1293.     /*----------------------------------------------------------------*/
  1294.     /* Code Body                                                      */
  1295.     /*----------------------------------------------------------------*/
  1296.     /* format the string for the ss string handling */
  1297.     memset(input_string, 0, MAX_DIGITS_USSD);
  1298.     memset(string_type, 0, 20);
  1299.     hash_string = (PS8) GetString(STR_HASH_VALUE);
  1300.     strcpy((PS8) string_type, (PS8) "#330*");
  1301.     AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1302.     pfnUnicodeStrcat((S8*) input_string, (S8*) g_callset_context.SSBarPassOld);
  1303.     pfnUnicodeStrcat((S8*) input_string, (S8*) hash_string);
  1304.     /* make a corresponding ss string for call fwd option */
  1305.     MakeCall((PS8) input_string);
  1306.     return;
  1307. }
  1308. /*****************************************************************************
  1309.  * FUNCTION
  1310.  *  SendChangePswdReq
  1311.  * DESCRIPTION
  1312.  *  function for sending req for call barring change passwd.
  1313.  * NA
  1314.  *  
  1315.  * PARAMETERS
  1316.  *  void
  1317.  * RETURNS
  1318.  *  void
  1319.  *****************************************************************************/
  1320. void SendChangePswdReq(void)
  1321. {
  1322.     /*----------------------------------------------------------------*/
  1323.     /* Local Variables                                                */
  1324.     /*----------------------------------------------------------------*/
  1325.     U8 input_string[MAX_DIGITS_USSD];
  1326.     U8 string_type[20];
  1327.     PS8 hash_string = NULL;
  1328.     U8 uni_string[10];
  1329.     /*----------------------------------------------------------------*/
  1330.     /* Code Body                                                      */
  1331.     /*----------------------------------------------------------------*/
  1332.     memset(uni_string, 0, 10);
  1333.     /* format the string for the ss string handling */
  1334.     memset(input_string, 0, MAX_DIGITS_USSD);
  1335.     memset(string_type, 0, 20);
  1336.     strcpy((PS8) string_type, (PS8) "*03**");
  1337.     hash_string = (PS8) GetString(STR_HASH_VALUE);
  1338.     AnsiiToUnicodeString((PS8) input_string, (PS8) string_type);
  1339.     pfnUnicodeStrcat((PS8) input_string, (PS8) g_callset_context.SSBarPassOld);
  1340.     strcpy((PS8) string_type, (PS8) "*");
  1341.     AnsiiToUnicodeString((PS8) uni_string, (PS8) string_type);
  1342.     pfnUnicodeStrcat((PS8) input_string, (PS8) uni_string);
  1343.     pfnUnicodeStrcat((PS8) input_string, (PS8) g_callset_context.SSBarPassNew);
  1344.     pfnUnicodeStrcat((PS8) input_string, (PS8) uni_string);
  1345.     pfnUnicodeStrcat((PS8) input_string, (PS8) g_callset_context.SSBarPassCfrm);
  1346.     pfnUnicodeStrcat((PS8) input_string, (PS8) hash_string);
  1347.     /* set protocol event handler for the call barring passwd change response */
  1348.     SetProtocolEventHandler(CALLSETBarringPassRsp, PRT_MMI_SS_CHANGE_PASSWORD_RSP);
  1349.     /* make a corresponding ss string for call barring passwd change response option */
  1350.     MakeCall((PS8) input_string);
  1351.     return;
  1352. }
  1353. /*****************************************************************************
  1354.  * FUNCTION
  1355.  *  CALLSETBarringPassRsp
  1356.  * DESCRIPTION
  1357.  *  function for handling response for call barring change passwd req.
  1358.  * NA
  1359.  *  
  1360.  * PARAMETERS
  1361.  *  info        [?]     
  1362.  * RETURNS
  1363.  *  void
  1364.  *****************************************************************************/
  1365. void CALLSETBarringPassRsp(void *info)
  1366. {
  1367.     /*----------------------------------------------------------------*/
  1368.     /* Local Variables                                                */
  1369.     /*----------------------------------------------------------------*/
  1370.     mmi_ss_call_barring_rsp_struct *pMsgBarringRsp = (mmi_ss_call_barring_rsp_struct*) info;
  1371.     /*----------------------------------------------------------------*/
  1372.     /* Code Body                                                      */
  1373.     /*----------------------------------------------------------------*/
  1374.     /* change passwd response handling */
  1375.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OUT);
  1376.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_IN);
  1377.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_PASS);
  1378.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OLD_PASS);
  1379.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_OPTION);
  1380.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_NEW_PASS);
  1381.     DeleteScreenIfPresent(SCR_ID_CALLSET_BARRING_CFRM_PASS);
  1382.     if (pMsgBarringRsp->result.flag == 0)
  1383.     {
  1384.         pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CHANGE_PSW_SUCCESS_TEXT));
  1385.         /* micha0322 */
  1386.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  1387.         EntryCALLSETGeneralSSResut();
  1388.     }
  1389.     else
  1390.     {
  1391.         /* micha0616 */
  1392.         if (pMsgBarringRsp->result.cause == CM_SS_ERR_NEGATIVEPW_CHECK)
  1393.         {
  1394.             DisplayPopup((PU8) GetString(STR_SETTING_WRONG), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1395.         }
  1396.         else if (pMsgBarringRsp->result.cause == CM_SS_ERR_NUMBEROFPW_ATTEMPTSVIOLATION)
  1397.         {
  1398.             DisplayPopup((PU8) GetString(STR_SETTING_BLOCK), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1399.         }
  1400.         else
  1401.         {
  1402.             DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  1403.         }
  1404.         /* micha0915 */
  1405.         RemoveSSReqScr();
  1406.     }
  1407.     return;
  1408. }
  1409. /*****************************************************************************
  1410.  * FUNCTION
  1411.  *  EntryCALLSETBarringOldPass
  1412.  * DESCRIPTION
  1413.  *  entry function for call barring old passwd screen
  1414.  * NA
  1415.  *  
  1416.  * PARAMETERS
  1417.  *  void
  1418.  * RETURNS
  1419.  *  void
  1420.  *****************************************************************************/
  1421. void EntryCALLSETBarringOldPass(void)
  1422. {
  1423.     /*----------------------------------------------------------------*/
  1424.     /* Local Variables                                                */
  1425.     /*----------------------------------------------------------------*/
  1426.     U8 *guiBuffer;
  1427.     /*----------------------------------------------------------------*/
  1428.     /* Code Body                                                      */
  1429.     /*----------------------------------------------------------------*/
  1430.     /* U8 * inputBuffer; */
  1431.     EntryNewScreen(SCR_ID_CALLSET_BARRING_OLD_PASS, NULL, EntryCALLSETBarringOldPass, NULL);
  1432.     /* Get current screen info into gui buffer  for history purposes */
  1433.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_OLD_PASS);
  1434.     /* inputBuffer = GetCurrInputBuffer(SCR_ID_CALLSET_BARRING_OLD_PASS); */
  1435.     if (guiBuffer == NULL)
  1436.     {
  1437.         memset(g_callset_context.SSBarPassOld, 0, sizeof(g_callset_context.SSBarPassOld));
  1438.     }
  1439.     //      else
  1440.     //              pfnUnicodeStrcpy((S8*)g_callset_context.SSBarPassOld, ( S8*)inputBuffer);
  1441.     /* Register input validation function */
  1442.     RegisterInputBoxValidationFunction(ScrBarringPasswordaValidation);
  1443.     /* display the corresponding screen */
  1444.     ShowCategory111Screen(
  1445.         STR_GLOBAL_OK,
  1446.         IMG_GLOBAL_OK,
  1447.         STR_GLOBAL_BACK,
  1448.         IMG_GLOBAL_BACK,
  1449.         STR_OLD_BARRINGPASS_CAP,
  1450.         INPUT_TYPE_NUMERIC_PASSWORD,
  1451.         (PU8) g_callset_context.SSBarPassOld,
  1452.         BARR_SIM_PASS_LEN + 1,
  1453.         NULL,
  1454.         guiBuffer);
  1455.     /* Set the left/right soft key funtions */
  1456.     SetLeftSoftkeyFunction(EntryCALLSETBarringNewPass, KEY_EVENT_UP);
  1457.     SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1458.     g_callset_context.SSBarPassStep = 1;
  1459. }
  1460. /*****************************************************************************
  1461.  * FUNCTION
  1462.  *  EntryCALLSETBarringNewPass
  1463.  * DESCRIPTION
  1464.  *  entry function for call barring new passwd screen
  1465.  * NA
  1466.  *  
  1467.  * PARAMETERS
  1468.  *  void
  1469.  * RETURNS
  1470.  *  void
  1471.  *****************************************************************************/
  1472. void EntryCALLSETBarringNewPass(void)
  1473. {
  1474.     /*----------------------------------------------------------------*/
  1475.     /* Local Variables                                                */
  1476.     /*----------------------------------------------------------------*/
  1477.     U8 *guiBuffer;
  1478.     /*----------------------------------------------------------------*/
  1479.     /* Code Body                                                      */
  1480.     /*----------------------------------------------------------------*/
  1481.     /* U8 * inputBuffer; */
  1482.     EntryNewScreen(SCR_ID_CALLSET_BARRING_NEW_PASS, NULL, EntryCALLSETBarringNewPass, NULL);
  1483.     /* Get current screen info into gui buffer  for history purposes */
  1484.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_NEW_PASS);
  1485.     /* inputBuffer = GetCurrInputBuffer(SCR_ID_CALLSET_BARRING_NEW_PASS); */
  1486.     if (guiBuffer == NULL)
  1487.     {
  1488.         memset(g_callset_context.SSBarPassNew, 0, sizeof(g_callset_context.SSBarPassNew));
  1489.     }
  1490.     //      else
  1491.     //              pfnUnicodeStrcpy((S8*)g_callset_context.SSBarPassNew, ( S8*)inputBuffer);
  1492.     /* Register input validation function */
  1493.     RegisterInputBoxValidationFunction(ScrBarringPasswordaValidation);
  1494.     /* display the corresponding screen */
  1495.     ShowCategory111Screen(
  1496.         STR_GLOBAL_OK,
  1497.         IMG_GLOBAL_OK,
  1498.         STR_GLOBAL_BACK,
  1499.         IMG_GLOBAL_BACK,
  1500.         STR_NEW_BARRINGPASS_CAP,
  1501.         INPUT_TYPE_NUMERIC_PASSWORD,
  1502.         (PU8) g_callset_context.SSBarPassNew,
  1503.         BARR_SIM_PASS_LEN + 1,
  1504.         NULL,
  1505.         guiBuffer);
  1506.     g_callset_context.SSBarPassStep = 2;
  1507.     /* Set the left/right soft key funtions */
  1508.     SetLeftSoftkeyFunction(EntryCALLSETBarringCfrmPass, KEY_EVENT_UP);
  1509.     SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1510.     return;
  1511. }
  1512. /*****************************************************************************
  1513.  * FUNCTION
  1514.  *  EntryCALLSETBarringCfrmPass
  1515.  * DESCRIPTION
  1516.  *  entry function for call barring change passwd confirmation screen
  1517.  * NA
  1518.  *  
  1519.  * PARAMETERS
  1520.  *  void
  1521.  * RETURNS
  1522.  *  void
  1523.  *****************************************************************************/
  1524. void EntryCALLSETBarringCfrmPass(void)
  1525. {
  1526.     /*----------------------------------------------------------------*/
  1527.     /* Local Variables                                                */
  1528.     /*----------------------------------------------------------------*/
  1529.     U8 *guiBuffer;
  1530.     /*----------------------------------------------------------------*/
  1531.     /* Code Body                                                      */
  1532.     /*----------------------------------------------------------------*/
  1533.     /* U8 * inputBuffer; */
  1534.     EntryNewScreen(SCR_ID_CALLSET_BARRING_CFRM_PASS, NULL, EntryCALLSETBarringCfrmPass, NULL);
  1535.     /* Get current screen info into gui buffer  for history purposes */
  1536.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_BARRING_CFRM_PASS);
  1537.     /* inputBuffer = GetCurrInputBuffer(SCR_ID_CALLSET_BARRING_CFRM_PASS); */
  1538.     if (guiBuffer == NULL)
  1539.     {
  1540.         memset(g_callset_context.SSBarPassCfrm, 0, sizeof(g_callset_context.SSBarPassCfrm));
  1541.     }
  1542.     //      else
  1543.     //              pfnUnicodeStrcpy((S8*)g_callset_context.SSBarPassCfrm, ( S8*)inputBuffer);
  1544.     /* Register input validation function */
  1545.     RegisterInputBoxValidationFunction(ScrBarringPasswordaValidation);
  1546.     /* display the corresponding screen */
  1547.     ShowCategory111Screen(
  1548.         STR_GLOBAL_OK,
  1549.         IMG_GLOBAL_OK,
  1550.         STR_GLOBAL_BACK,
  1551.         IMG_GLOBAL_BACK,
  1552.         STR_CONFIRM_BARRINGPASS_CAP,
  1553.         INPUT_TYPE_NUMERIC_PASSWORD,
  1554.         (PU8) g_callset_context.SSBarPassCfrm,
  1555.         BARR_SIM_PASS_LEN + 1,
  1556.         NULL,
  1557.         guiBuffer);
  1558.     g_callset_context.SSBarPassStep = 3;
  1559.     /* Set the left/right soft key funtions */
  1560.     SetLeftSoftkeyFunction(CallBarrOption, KEY_EVENT_UP);
  1561.     SetCategory111RightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1562.     return;
  1563. }