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

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.  *  InfoNum.c
  39.  *
  40.  * Project:
  41.  * --------
  42.  *  MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  *  
  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.  * removed!
  71.  * removed!
  72.  * removed!
  73.  *
  74.  *------------------------------------------------------------------------------
  75.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  76.  *==============================================================================
  77.  *******************************************************************************/
  78. /**
  79.  * Copyright Notice
  80.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  81.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  82.  *  (It is illegal to remove this copyright notice from this software or any
  83.  *  portion of it)
  84.  */
  85. /**************************************************************
  86.    FILENAME : InfoNum.c
  87.    PURPOSE     : Information Number
  88.    REMARKS     : nil
  89.    AUTHOR      : NEERAJ SHARMA
  90.    DATE     : Aug 13,03
  91. **************************************************************/
  92. #include "stdC.h"
  93. #include "L4Dr1.h"
  94. #include "Unicodexdcl.h"
  95. #include "wgui_categories.h"
  96. #include "InfoNum.h"
  97. #include "CommonScreens.h"
  98. #include "GlobalDefs.h"
  99. #include "HistoryGprot.h"
  100. #include "EventsGprot.h"
  101. #include "CallManagementGprot.h"
  102. #include "GSM7BitDefaultAlphabet.h"
  103. #include "CustDataRes.h"
  104. #include "SimDetectionGexdcl.h"
  105. #include "SimDetectionGprot.h"
  106. static INFONUM GlobalInfoNum[MAX_INFO_NUM_ITEMS + 1];   /* 1 is added for 0th Node */
  107. static INFONUM *info;
  108. static INFONUM *displayInfoNum;
  109. static INFONUM *hiliteInfoNum;
  110. U8 isInfoNumPresent = 0;
  111. static U8 currentLevel = 0;
  112. static U8 InfoNumHistory[MAX_INFO_NUM_LEVELS];
  113. static U8 hiliteInfoNumIndex;
  114. static U8 saveInfoNum;
  115. static U8 saveInfoNumPremium;
  116. static S8 infoItemCount = (S8) - 1;
  117. extern void goto_demo_under_construction(void);
  118. static U8 *infoNumberToBeDialed;
  119. /*****************************************************************************
  120.  * FUNCTION
  121.  *  InfoMalloc
  122.  * DESCRIPTION
  123.  *  Mallocs Information for Info Num from
  124.  *  Global Array
  125.  * PARAMETERS
  126.  *  void
  127.  * RETURNS
  128.  *  Pointer to returned memory
  129.  *****************************************************************************/
  130. INFONUM *InfoMalloc()
  131. {
  132.     /*----------------------------------------------------------------*/
  133.     /* Local Variables                                                */
  134.     /*----------------------------------------------------------------*/
  135.     /*----------------------------------------------------------------*/
  136.     /* Code Body                                                      */
  137.     /*----------------------------------------------------------------*/
  138.     infoItemCount++;
  139.     if (infoItemCount == MAX_INFO_NUM_ITEMS + 1)
  140.     {
  141.         return NULL;
  142.     }
  143.     return (&GlobalInfoNum[infoItemCount]);
  144. }
  145. /*****************************************************************************
  146.  * FUNCTION
  147.  *  StoreCurrInfoNum
  148.  * DESCRIPTION
  149.  *  Stores Current Menu at Information Number node passed
  150.  *  as per data from PS
  151.  * PARAMETERS
  152.  *  info        [IN]        Information Number Node wher dats is to be saved
  153.  *  infoNum     [IN]        Info from L4
  154.  * RETURNS
  155.  *  void
  156.  *****************************************************************************/
  157. void StoreCurrInfoNum(INFONUM *info, l4csmu_info_num_struct *infoNum)
  158. {
  159.     /*----------------------------------------------------------------*/
  160.     /* Local Variables                                                */
  161.     /*----------------------------------------------------------------*/
  162.     U8 temp[41 * ENCODING_LENGTH];
  163.     U8 len;
  164.     /*----------------------------------------------------------------*/
  165.     /* Code Body                                                      */
  166.     /*----------------------------------------------------------------*/
  167.     info->index = infoNum->index_level;
  168.     if (infoNum->alpha_id_size > 21)
  169.     {
  170.         len = 21;
  171.     }
  172.     else
  173.     {
  174.         len = infoNum->alpha_id_size;
  175.     }
  176.     memcpy(temp, infoNum->alpha_id, len);
  177.     temp[len] = 0;
  178. #ifdef __UCS2_ENCODING
  179.     AnsiiToUnicodeString((PS8) info->alphaId, (PS8) temp);
  180. #else 
  181.     pfnUnicodeStrcpy(info->alphaId, temp);
  182. #endif 
  183.     if (infoNum->ton_npi != 0xFF)
  184.     {
  185.         if (infoNum->digit_size > 3)
  186.         {
  187.             len = 3;
  188.         }
  189.         else
  190.         {
  191.             len = infoNum->digit_size;
  192.         }
  193.         memcpy(temp, infoNum->digit, len);
  194.         temp[len] = 0;
  195.     #ifdef __UCS2_ENCODING
  196.         AnsiiToUnicodeString((PS8) info->number, (PS8) temp);
  197.     #else 
  198.         pfnUnicodeStrcpy(info->number, temp);
  199.     #endif 
  200.     }
  201.     info->nsi = infoNum->network_specific;
  202.     info->psi = infoNum->premium_rate;
  203. }
  204. /*****************************************************************************
  205.  * FUNCTION
  206.  *  InitialiseInformationArray
  207.  * DESCRIPTION
  208.  *  Initialised Information number array
  209.  * PARAMETERS
  210.  *  noInfoNum       [IN]        No of nodes
  211.  *  infoNum         [IN]        Data from L4
  212.  * RETURNS
  213.  *  void
  214.  *****************************************************************************/
  215. void InitialiseInformationArray(U8 noInfoNum, l4csmu_info_num_struct *infoNum)
  216. {
  217.     /*----------------------------------------------------------------*/
  218.     /* Local Variables                                                */
  219.     /*----------------------------------------------------------------*/
  220.     U8 i;
  221.     INFONUM *currInfo;
  222.     INFONUM *addInfo;
  223.     INFONUM *currParent;
  224.     /*----------------------------------------------------------------*/
  225.     /* Code Body                                                      */
  226.     /*----------------------------------------------------------------*/
  227.     info = InfoMalloc();
  228.     info->parent = NULL;
  229.     info->child = NULL;
  230.     info->next = NULL;
  231.     info->previous = NULL;
  232.     info->index = 0;
  233.     info->noOfChildren = 0;
  234.     pfnUnicodeStrcpy((PS8) info->alphaId, GetString(SERVICES_INFO_NUM_STRING_ID));
  235.     currParent = info;
  236.     currInfo = info;
  237.     /* StoreCurrInfoNum(info, &infoNum[0]); */
  238.     for (i = 0; i < noInfoNum; i++)
  239.     {
  240.         if (infoNum[i].index_level == 0)
  241.         {
  242.             continue; /* invalid index level, skip this one */
  243.         }
  244.         addInfo = InfoMalloc();
  245.         if (addInfo == NULL)
  246.         {
  247.             break;
  248.         }
  249.         if (currInfo->index == infoNum[i].index_level)
  250.         {
  251.             /* Add Sibling of Parent */
  252.             currInfo->next = addInfo;
  253.             currParent->noOfChildren++;
  254.             addInfo->parent = currParent;
  255.             addInfo->previous = currInfo;
  256.             addInfo->next = NULL;
  257.             addInfo->child = NULL;
  258.             addInfo->noOfChildren = 0;
  259.         }
  260.         else if (currInfo->index < infoNum[i].index_level)
  261.         {
  262.             /* Add first Child of Parent */
  263.             currInfo->child = addInfo;
  264.             currParent = currInfo;
  265.             currParent->noOfChildren = 1;
  266.             addInfo->parent = currParent;
  267.             addInfo->previous = NULL;
  268.             addInfo->next = NULL;
  269.             addInfo->child = NULL;
  270.             addInfo->noOfChildren = 0;
  271.         }
  272.         else
  273.         {
  274.             /* Go up one level */
  275.             while (currInfo->index != infoNum[i].index_level)
  276.             {
  277.                 currInfo = currInfo->parent;
  278.             }
  279.             currParent = currInfo->parent;
  280.             currInfo->next = addInfo;
  281.             currParent->noOfChildren++;
  282.             addInfo->parent = currParent;
  283.             addInfo->previous = currInfo;
  284.             addInfo->next = NULL;
  285.             addInfo->child = NULL;
  286.             addInfo->noOfChildren = 0;
  287.         }
  288.         StoreCurrInfoNum(addInfo, &infoNum[i]);
  289.         currInfo = addInfo;
  290.     }
  291.     isInfoNumPresent = 1;
  292. }
  293. /*****************************************************************************
  294.  * FUNCTION
  295.  *  EnterScrInfoNumber
  296.  * DESCRIPTION
  297.  *  Entry Screen for Information Number App
  298.  * PARAMETERS
  299.  *  void
  300.  * RETURNS
  301.  *  void
  302.  *****************************************************************************/
  303. void EnterScrInfoNumber(void)
  304. {
  305.     /*----------------------------------------------------------------*/
  306.     /* Local Variables                                                */
  307.     /*----------------------------------------------------------------*/
  308.     U8 i;
  309.     /*----------------------------------------------------------------*/
  310.     /* Code Body                                                      */
  311.     /*----------------------------------------------------------------*/
  312.     currentLevel = 0;
  313.     displayInfoNum = info;
  314.     for (i = 0; i < MAX_INFO_NUM_LEVELS; i++)
  315.     {
  316.         InfoNumHistory[currentLevel] = 0;
  317.     }
  318.     DisplayInformationNumber();
  319. }
  320. /*****************************************************************************
  321.  * FUNCTION
  322.  *  DisplayInformationNumber
  323.  * DESCRIPTION
  324.  *  Entry Screen for each Information Number Screen Level
  325.  * PARAMETERS
  326.  *  void
  327.  * RETURNS
  328.  *  void
  329.  *****************************************************************************/
  330. void DisplayInformationNumber(void)
  331. {
  332.     /*----------------------------------------------------------------*/
  333.     /* Local Variables                                                */
  334.     /*----------------------------------------------------------------*/
  335.     U8 *Strings[MAX_SUB_MENUS];
  336.     U8 *Hints[MAX_SUB_MENUS];
  337.     INFONUM *currInfo = displayInfoNum;
  338.     U16 nNumofItem;
  339.     /*----------------------------------------------------------------*/
  340.     /* Code Body                                                      */
  341.     /*----------------------------------------------------------------*/
  342.     EntryNewScreen(SERVICES_INFO_NUM_SCREEN_ID, ExitInfoNumScreen, NULL, NULL);
  343.     saveInfoNum = 1;
  344.     nNumofItem = 0;
  345.     currInfo = currInfo->child;
  346.     Strings[nNumofItem] = currInfo->alphaId;
  347.     Hints[nNumofItem] = hintData[nNumofItem];
  348.     if (currInfo->child)
  349.     {
  350.         Hints[nNumofItem] = NULL;
  351.     }
  352.     else
  353.     {
  354.         Hints[nNumofItem] = currInfo->number;
  355.     }
  356.     nNumofItem++;
  357.     /* micha0202, remove compile warning */
  358.     currInfo = currInfo->next;
  359.     while (currInfo)    /* Ignore the warning, intentional */
  360.     {
  361.         Strings[nNumofItem] = currInfo->alphaId;
  362.         if (currInfo->child)
  363.         {
  364.             Hints[nNumofItem] = NULL;
  365.         }
  366.         else
  367.         {
  368.             Hints[nNumofItem] = currInfo->number;
  369.         }
  370.         nNumofItem++;
  371.         currInfo = currInfo->next;
  372.     }
  373.     RegisterHighlightHandler(InfoNumberScrHiliteHandler);
  374.     displayInfoNum = displayInfoNum->child;
  375.     ShowCategory53Screen(
  376.         SERVICES_INFO_NUM_STRING_ID,
  377.         SERVICES_INFO_NUM_IMAGE_ID,
  378.         STR_GLOBAL_OK,
  379.         IMG_GLOBAL_OK,
  380.         STR_GLOBAL_BACK,
  381.         IMG_GLOBAL_BACK,
  382.         nNumofItem,
  383.         Strings,
  384.         (PU16) gIndexIconsImageList,
  385.         Hints,
  386.         LIST_MENU,
  387.         InfoNumHistory[currentLevel],
  388.         0);
  389.     SetLeftSoftkeyFunction(GoAheadInfoNum, KEY_EVENT_UP);
  390.     SetKeyHandler(GoAheadInfoNum, KEY_SEND, KEY_EVENT_UP);
  391.     SetRightSoftkeyFunction(GoBackInfoNum, KEY_EVENT_UP);
  392.     SetKeyHandler(GoBackInfoNum, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  393. }
  394. /*****************************************************************************
  395.  * FUNCTION
  396.  *  InfoNumberScrHiliteHandler
  397.  * DESCRIPTION
  398.  *  Hilite Handler for each Information Number Screen Level
  399.  * PARAMETERS
  400.  *  index       [IN]        
  401.  * RETURNS
  402.  *  void
  403.  *****************************************************************************/
  404. void InfoNumberScrHiliteHandler(S32 index)
  405. {
  406.     /*----------------------------------------------------------------*/
  407.     /* Local Variables                                                */
  408.     /*----------------------------------------------------------------*/
  409.     U8 i;
  410.     /*----------------------------------------------------------------*/
  411.     /* Code Body                                                      */
  412.     /*----------------------------------------------------------------*/
  413.     hiliteInfoNumIndex = (U8) index;
  414.     hiliteInfoNum = displayInfoNum;
  415.     for (i = 0; i < index; i++)
  416.     {
  417.         hiliteInfoNum = hiliteInfoNum->next;
  418.     }
  419.     if (hiliteInfoNum->noOfChildren)
  420.     {
  421.         ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  422.     }
  423.     else
  424.     {
  425.         ChangeLeftSoftkey(SERVICES_INFO_DIAL_STRING_ID, 0);
  426.     }
  427. }
  428. /*****************************************************************************
  429.  * FUNCTION
  430.  *  GoAheadInfoNum
  431.  * DESCRIPTION
  432.  *  LSK Handler for each Information Number Screen Level
  433.  * PARAMETERS
  434.  *  void
  435.  * RETURNS
  436.  *  void
  437.  *****************************************************************************/
  438. void GoAheadInfoNum(void)
  439. {
  440.     /*----------------------------------------------------------------*/
  441.     /* Local Variables                                                */
  442.     /*----------------------------------------------------------------*/
  443.     /*----------------------------------------------------------------*/
  444.     /* Code Body                                                      */
  445.     /*----------------------------------------------------------------*/
  446.     if (hiliteInfoNum->noOfChildren)
  447.     {
  448.         if (hiliteInfoNum->nsi && mmi_bootup_is_roaming() == MMI_TRUE)
  449.         {
  450.             DisplayRoamingInfoNum();
  451.         }
  452.         else
  453.         {
  454.             saveInfoNum = 0;
  455.             displayInfoNum = hiliteInfoNum;
  456.             InfoNumHistory[currentLevel] = hiliteInfoNumIndex;
  457.             currentLevel++;
  458.             DisplayInformationNumber();
  459.         }
  460.     }
  461.     else
  462.     {
  463.         infoNumberToBeDialed = hiliteInfoNum->number;
  464.         if (hiliteInfoNum->nsi && mmi_bootup_is_roaming() == MMI_TRUE)
  465.         {
  466.             DisplayRoamingInfoNum();
  467.         }
  468.         else if (hiliteInfoNum->psi)
  469.         {
  470.             DisplayPremimumInfoNum();
  471.         }
  472.         else
  473.         {
  474.             MakeCall((PS8) infoNumberToBeDialed);
  475.         }
  476.     }
  477. }
  478. /*****************************************************************************
  479.  * FUNCTION
  480.  *  GoBackInfoNum
  481.  * DESCRIPTION
  482.  *  RSK Handler for each Information Number Screen Level
  483.  * PARAMETERS
  484.  *  void
  485.  * RETURNS
  486.  *  void
  487.  *****************************************************************************/
  488. void GoBackInfoNum(void)
  489. {
  490.     /*----------------------------------------------------------------*/
  491.     /* Local Variables                                                */
  492.     /*----------------------------------------------------------------*/
  493.     /*----------------------------------------------------------------*/
  494.     /* Code Body                                                      */
  495.     /*----------------------------------------------------------------*/
  496.     if (currentLevel)
  497.     {
  498.         saveInfoNum = 0;
  499.         InfoNumHistory[currentLevel] = 0;
  500.         currentLevel--;
  501.         displayInfoNum = hiliteInfoNum->parent->parent;
  502.         DisplayInformationNumber();
  503.     }
  504.     else
  505.     {
  506.         displayInfoNum = info;
  507.         GoBackHistory();
  508.     }
  509. }
  510. /*****************************************************************************
  511.  * FUNCTION
  512.  *  ExitInfoNumScreen
  513.  * DESCRIPTION
  514.  *  Exit Handler for each Information Number Screen Level
  515.  * PARAMETERS
  516.  *  void
  517.  * RETURNS
  518.  *  void
  519.  *****************************************************************************/
  520. void ExitInfoNumScreen(void)
  521. {
  522.     /*----------------------------------------------------------------*/
  523.     /* Local Variables                                                */
  524.     /*----------------------------------------------------------------*/
  525.     /*----------------------------------------------------------------*/
  526.     /* Code Body                                                      */
  527.     /*----------------------------------------------------------------*/
  528.     if (saveInfoNum)
  529.     {
  530.         history currHistory;
  531.         S16 nHistory = 0;
  532.         displayInfoNum = hiliteInfoNum->parent;
  533.         InfoNumHistory[currentLevel] = hiliteInfoNumIndex;
  534.         currHistory.scrnID = SERVICES_INFO_NUM_SCREEN_ID;
  535.         currHistory.entryFuncPtr = DisplayInformationNumber;
  536.         pfnUnicodeStrcpy((S8*) currHistory.inputBuffer, (S8*) & nHistory);
  537.         GetCategoryHistory(currHistory.guiBuffer);
  538.         AddHistory(currHistory);
  539.     }
  540. }
  541. /*****************************************************************************
  542.  * FUNCTION
  543.  *  DisplayPremimumInfoNum
  544.  * DESCRIPTION
  545.  *  Displays Premium Info Number Screen
  546.  * PARAMETERS
  547.  *  void
  548.  * RETURNS
  549.  *  void
  550.  *****************************************************************************/
  551. void DisplayPremimumInfoNum(void)
  552. {
  553.     /*----------------------------------------------------------------*/
  554.     /* Local Variables                                                */
  555.     /*----------------------------------------------------------------*/
  556.     /*----------------------------------------------------------------*/
  557.     /* Code Body                                                      */
  558.     /*----------------------------------------------------------------*/
  559.     EntryNewScreen(SERVICES_INFO_PREMIUM_SCREEN_ID, ExitDisplayPremimumInfoNum, NULL, NULL);
  560.     saveInfoNumPremium = 1;
  561.     ShowCategory2Screen(
  562.         SERVICES_INFO_NUM_STRING_ID,
  563.         SERVICES_INFO_NUM_IMAGE_ID,
  564.         SERVICES_INFO_DIAL_STRING_ID,
  565.         IMG_GLOBAL_OK,
  566.         STR_GLOBAL_BACK,
  567.         IMG_GLOBAL_BACK,
  568.         SERVICES_INFO_PREMIUM_STRING_ID,
  569.         NULL);
  570.     SetLeftSoftkeyFunction(DisplayPremimumInfoNumOK, KEY_EVENT_UP);
  571.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  572. }
  573. /*****************************************************************************
  574.  * FUNCTION
  575.  *  ExitDisplayPremimumInfoNum
  576.  * DESCRIPTION
  577.  *  Exit Handler for Premium Info Number Screen
  578.  * PARAMETERS
  579.  *  void
  580.  * RETURNS
  581.  *  void
  582.  *****************************************************************************/
  583. void ExitDisplayPremimumInfoNum(void)
  584. {
  585.     /*----------------------------------------------------------------*/
  586.     /* Local Variables                                                */
  587.     /*----------------------------------------------------------------*/
  588.     /*----------------------------------------------------------------*/
  589.     /* Code Body                                                      */
  590.     /*----------------------------------------------------------------*/
  591.     if (saveInfoNumPremium)
  592.     {
  593.         history currHistory;
  594.         S16 nHistory = 0;
  595.         currHistory.scrnID = SERVICES_INFO_PREMIUM_SCREEN_ID;
  596.         currHistory.entryFuncPtr = DisplayPremimumInfoNum;
  597.         pfnUnicodeStrcpy((S8*) currHistory.inputBuffer, (S8*) & nHistory);
  598.         GetCategoryHistory(currHistory.guiBuffer);
  599.         AddHistory(currHistory);
  600.     }
  601. }
  602. /*****************************************************************************
  603.  * FUNCTION
  604.  *  DisplayPremimumInfoNumOK
  605.  * DESCRIPTION
  606.  *  LSK Handler for Premium Info Number Screen
  607.  * PARAMETERS
  608.  *  void
  609.  * RETURNS
  610.  *  void
  611.  *****************************************************************************/
  612. void DisplayPremimumInfoNumOK(void)
  613. {
  614.     /*----------------------------------------------------------------*/
  615.     /* Local Variables                                                */
  616.     /*----------------------------------------------------------------*/
  617.     /*----------------------------------------------------------------*/
  618.     /* Code Body                                                      */
  619.     /*----------------------------------------------------------------*/
  620.     saveInfoNumPremium = 0;
  621.     MakeCall((PS8) infoNumberToBeDialed);
  622. }
  623. /*****************************************************************************
  624.  * FUNCTION
  625.  *  DisplayRoamingInfoNum
  626.  * DESCRIPTION
  627.  *  Entry function for Roaming Info Number Screen
  628.  * PARAMETERS
  629.  *  void
  630.  * RETURNS
  631.  *  void
  632.  *****************************************************************************/
  633. void DisplayRoamingInfoNum(void)
  634. {
  635.     /*----------------------------------------------------------------*/
  636.     /* Local Variables                                                */
  637.     /*----------------------------------------------------------------*/
  638.     /*----------------------------------------------------------------*/
  639.     /* Code Body                                                      */
  640.     /*----------------------------------------------------------------*/
  641.     EntryNewScreen(SERVICES_INFO_ROAMING_SCREEN_ID, NULL, DisplayRoamingInfoNum, NULL);
  642.     saveInfoNumPremium = 1;
  643.     ShowCategory2Screen(
  644.         SERVICES_INFO_NUM_STRING_ID,
  645.         SERVICES_INFO_NUM_IMAGE_ID,
  646.         0,
  647.         0,
  648.         STR_GLOBAL_BACK,
  649.         IMG_GLOBAL_BACK,
  650.         SERVICES_INFO_ROAMING_STRING_ID,
  651.         NULL);
  652.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  653. }