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

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.  * CallerId.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.  * 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 : CallerId.c
  87.    PURPOSE     : Caller id application of call setup
  88.    REMARKS     : nil
  89.    AUTHOR      : Anil Kumar Vutukuru
  90.    DATE     : 11/14/2003
  91. **************************************************************/
  92. #include "stdC.h"
  93. #include "L4Dr1.h"
  94. #include "L4Dr.h"
  95. #include "MainMenuDef.h"
  96. #include "CallSetUp.h"
  97. #include "PhoneBookTypes.h"
  98. #include "protocolEvents.h"
  99. #include "DebugInitDef.h"
  100. #include "CSP.h"
  101. #include "CallSetUpEnum.h"
  102. #include "SettingGprots.h"
  103. #include "NVRAMEnum.h"
  104. #include "NVRAMProt.h"
  105. #include "NVRAMType.h"
  106. #include "CallerIdGprot.h"
  107. #include "CommonScreens.h"
  108. #include "CallmanagementIdDef.h"
  109. /* micha0915 */
  110. #include "CallManagementGProt.h"
  111. #include "MessagesExDcl.h"
  112. #include "MMI_features.h"
  113. /*****************************************************************************
  114.  * FUNCTION
  115.  *  InitCallerId
  116.  * DESCRIPTION
  117.  *  initialization function of the caller id application.
  118.  * NA
  119.  *  
  120.  * PARAMETERS
  121.  *  void
  122.  * RETURNS
  123.  *  void
  124.  *****************************************************************************/
  125. void InitCallerId(void)
  126. {
  127.     /*----------------------------------------------------------------*/
  128.     /* Local Variables                                                */
  129.     /*----------------------------------------------------------------*/
  130.     /*----------------------------------------------------------------*/
  131.     /* Code Body                                                      */
  132.     /*----------------------------------------------------------------*/
  133.     SetHiliteHandler(MENU_CALLER_ID, HighlightCALLSETCallerId);
  134.     SetHiliteHandler(MENU_CID_SET_NWK, HiliteSetByNwk);
  135.     SetHiliteHandler(MENU_CID_SHOW_ID, HiliteShowCid);
  136.     SetHiliteHandler(MENU_CID_HIDE_ID, HiliteHideCid);
  137.     return;
  138. }
  139. /*****************************************************************************
  140.  * FUNCTION
  141.  *  InitNvramCallerId
  142.  * DESCRIPTION
  143.  *  Initialize NVRAM for callerid
  144.  * NA
  145.  *  
  146.  * PARAMETERS
  147.  *  void
  148.  *  S16(?)      [OUT]       
  149.  * RETURNS
  150.  *  void
  151.  *****************************************************************************/
  152. S16 InitNvramCallerId(void)
  153. {
  154.     /*----------------------------------------------------------------*/
  155.     /* Local Variables                                                */
  156.     /*----------------------------------------------------------------*/
  157.     S16 error;
  158.     /*----------------------------------------------------------------*/
  159.     /* Code Body                                                      */
  160.     /*----------------------------------------------------------------*/
  161.     /* read the current caller id value from nv ram */
  162.     ReadValue(NVRAM_CALLERID, &g_callset_context.CallerIDInput, DS_BYTE, &error);
  163.     /* if failure in read. set the default value */
  164.     if (g_callset_context.CallerIDInput == 0xff)
  165.     {
  166.         g_callset_context.CallerIDInput = 2;
  167.     }
  168.     /* set the caller id value to L4 */
  169.     SetCallerIdReq();
  170.     return 0;
  171. }
  172. /*****************************************************************************
  173.  * FUNCTION
  174.  *  HiliteSetByNwk
  175.  * DESCRIPTION
  176.  *  hilite handler for set by network sub menu item
  177.  * NA
  178.  *  
  179.  * PARAMETERS
  180.  *  void
  181.  * RETURNS
  182.  *  void
  183.  *****************************************************************************/
  184. void HiliteSetByNwk(void)
  185. {
  186.     /*----------------------------------------------------------------*/
  187.     /* Local Variables                                                */
  188.     /*----------------------------------------------------------------*/
  189.     /*----------------------------------------------------------------*/
  190.     /* Code Body                                                      */
  191.     /*----------------------------------------------------------------*/
  192.     /* storing the menu item selected */
  193.     g_callset_context.CallerIDInput = CLIR_AUTO;
  194.     /* set the left/right soft key functions handlers */
  195.     SetLeftSoftkeyFunction(SetCallerIdReq, KEY_EVENT_UP);
  196.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  197.     /* set the left/right arrow key function handlers */
  198.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  199.     return;
  200. }
  201. /*****************************************************************************
  202.  * FUNCTION
  203.  *  HighlightCALLSETCallerId
  204.  * DESCRIPTION
  205.  *  hilite handler for the caller id option
  206.  * NA
  207.  *  
  208.  * PARAMETERS
  209.  *  void
  210.  * RETURNS
  211.  *  void
  212.  *****************************************************************************/
  213. void HighlightCALLSETCallerId(void)
  214. {
  215.     /*----------------------------------------------------------------*/
  216.     /* Local Variables                                                */
  217.     /*----------------------------------------------------------------*/
  218.     /*----------------------------------------------------------------*/
  219.     /* Code Body                                                      */
  220.     /*----------------------------------------------------------------*/
  221.     /* Change left soft key icon and label */
  222.     ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
  223.     /* Change right soft key icon and label */
  224.     ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
  225.     /* set the left/right soft key functions handlers */
  226.     SetLeftSoftkeyFunction(EnterCALLSETCallerIDMain, KEY_EVENT_UP);
  227.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  228.     /* set the left/right arrow key function handlers */
  229.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  230.     SetKeyHandler(EnterCALLSETCallerIDMain, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  231.     return;
  232. }
  233. /*****************************************************************************
  234.  * FUNCTION
  235.  *  HiliteShowCid
  236.  * DESCRIPTION
  237.  *  hilite handler for the show caller id.
  238.  * NA
  239.  *  
  240.  * PARAMETERS
  241.  *  void
  242.  * RETURNS
  243.  *  void
  244.  *****************************************************************************/
  245. void HiliteShowCid(void)
  246. {
  247.     /*----------------------------------------------------------------*/
  248.     /* Local Variables                                                */
  249.     /*----------------------------------------------------------------*/
  250.     /*----------------------------------------------------------------*/
  251.     /* Code Body                                                      */
  252.     /*----------------------------------------------------------------*/
  253.     /* storing the menu item selected */
  254.     g_callset_context.CallerIDInput = CLIR_SUPPRESS;
  255.     /* set the left/right soft key functions handlers */
  256.     SetLeftSoftkeyFunction(SetCallerIdReq, KEY_EVENT_UP);
  257.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  258.     /* set the left/right arrow key function handlers */
  259.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  260.     return;
  261. }
  262. /*****************************************************************************
  263.  * FUNCTION
  264.  *  HiliteHideCid
  265.  * DESCRIPTION
  266.  *  hilite handler for the hide id.
  267.  * NA
  268.  *  
  269.  * PARAMETERS
  270.  *  void
  271.  * RETURNS
  272.  *  void
  273.  *****************************************************************************/
  274. void HiliteHideCid(void)
  275. {
  276.     /*----------------------------------------------------------------*/
  277.     /* Local Variables                                                */
  278.     /*----------------------------------------------------------------*/
  279.     /*----------------------------------------------------------------*/
  280.     /* Code Body                                                      */
  281.     /*----------------------------------------------------------------*/
  282.     /* storing the menu item selected */
  283.     g_callset_context.CallerIDInput = CLIR_INVOKE;
  284.     /* set the left/right soft key functions handlers */
  285.     SetLeftSoftkeyFunction(SetCallerIdReq, KEY_EVENT_UP);
  286.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  287.     /* set the left/right arrow key function handlers */
  288.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  289.     return;
  290. }
  291. /*****************************************************************************
  292.  * FUNCTION
  293.  *  EnterCALLSETCallerIDMain
  294.  * DESCRIPTION
  295.  *  Entry screen for the caller id menu items.
  296.  * NA
  297.  *  
  298.  * PARAMETERS
  299.  *  void
  300.  * RETURNS
  301.  *  void
  302.  *****************************************************************************/
  303. void EnterCALLSETCallerIDMain(void)
  304. {
  305.     /*----------------------------------------------------------------*/
  306.     /* Local Variables                                                */
  307.     /*----------------------------------------------------------------*/
  308.     U16 nNumofItem;
  309.     //micha1229
  310.     //      U16 nDispAttribute; /* Stores display attribue */
  311.     U8 *guiBuffer;              /* Buffer holding history data */
  312.     U16 nStrItemList[MAX_SUB_MENUS];
  313.     /*----------------------------------------------------------------*/
  314.     /* Code Body                                                      */
  315.     /*----------------------------------------------------------------*/
  316.     /* U32 maskingByte=0xFFFFFFFF;
  317.        U32 menuItemId=0xFFFFFFFF; */
  318.     EntryNewScreen(SCR_ID_CALLSET_CALLER_ID_MAIN, NULL, EnterCALLSETCallerIDMain, NULL);
  319.     /* Get current screen to gui buffer  for history purposes */
  320.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_CALLER_ID_MAIN);
  321.     /* Retrieve no of child of menu item to be displayed */
  322.     nNumofItem = GetNumOfChild_Ext(MENU_CALLER_ID);         /* diamond, 2005/07/01 add _Ext to menu item functions */
  323.     /* Get attribute of menu to be displayed */
  324.     /* nDispAttribute = GetDispAttributeOfItem(MENU_CALLER_ID); */
  325.     /* Retrieve string ids in sequence of given menu item to be displayed */
  326.     GetSequenceStringIds_Ext(MENU_CALLER_ID, nStrItemList); /* diamond, 2005/07/01 add _Ext to menu item functions */
  327.     /* Set current parent id */
  328.     SetParentHandler(MENU_CALLER_ID);
  329.     /* Register highlight handler to be called in menu screen */
  330.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  331.     /* diamond, 2005/07/01 removed for new menu item architecture to CPHS */
  332. #if 0
  333. /* under construction !*/
  334. /* under construction !*/
  335. /* under construction !*/
  336. /* under construction !*/
  337. /* under construction !*/
  338. /* under construction !*/
  339. /* under construction !*/
  340. #endif /* 0 */ 
  341.     /* Display Category1 Screen */
  342.     ShowCategory15Screen(
  343.         STR_MENU_CALLER_ID,
  344.         MAIN_MENU_TITLE_SETTINGS_ICON,
  345.         STR_GLOBAL_OK,
  346.         IMG_GLOBAL_OK,
  347.         STR_GLOBAL_BACK,
  348.         IMG_GLOBAL_BACK,
  349.         nNumofItem,
  350.         nStrItemList,
  351.         (U16*) gIndexIconsImageList,
  352.         1,
  353.         (g_callset_context.CallerID + 1) % 3,
  354.         guiBuffer);
  355.     /* Register function with right softkey */
  356.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  357.     return;
  358. }
  359. /*****************************************************************************
  360.  * FUNCTION
  361.  *  SetCallerIdReq
  362.  * DESCRIPTION
  363.  *  Sends caller id request to stack
  364.  * PARAMETERS
  365.  *  void
  366.  *  callback(?)     [IN]        To register with response
  367.  * RETURNS
  368.  *  void
  369.  *****************************************************************************/
  370. void SetCallerIdReq(void)
  371. {
  372.     /*----------------------------------------------------------------*/
  373.     /* Local Variables                                                */
  374.     /*----------------------------------------------------------------*/
  375.     MYQUEUE Message;
  376.     mmi_ss_set_clir_flag_req_struct *pMsgReq = NULL;
  377.     static U8 firstTime = 0;
  378.     /*----------------------------------------------------------------*/
  379.     /* Code Body                                                      */
  380.     /*----------------------------------------------------------------*/
  381.     if (firstTime)
  382.     {
  383.         ClearInputEventHandler(MMI_DEVICE_ALL);
  384.     }
  385.     firstTime = 1;
  386.     PRINT_INFORMATION(("*** In MakePsSendClir *** n"));
  387.     pMsgReq = (mmi_ss_set_clir_flag_req_struct*) OslConstructDataPtr(sizeof(mmi_ss_set_clir_flag_req_struct));
  388.     Message.oslSrcId = MOD_MMI;
  389.     Message.oslDestId = MOD_L4C;
  390.     pMsgReq->clir_flag = g_callset_context.CallerIDInput;
  391.     SetProtocolEventHandler(CALLSETCallerIDRsp, PRT_MMI_SS_SET_CLIR_FLAG_RSP);
  392.     Message.oslMsgId = PRT_MMI_SS_SET_CLIR_FLAG_REQ;
  393.     Message.oslDataPtr = (oslParaType*) pMsgReq;
  394.     Message.oslPeerBuffPtr = NULL;
  395.     OslMsgSendExtQueue(&Message);
  396.     return;
  397. }
  398. /*****************************************************************************
  399.  * FUNCTION
  400.  *  CALLSETCallerIDRsp
  401.  * DESCRIPTION
  402.  *  response handler for the set caller id request
  403.  * NA
  404.  *  
  405.  * PARAMETERS
  406.  *  info        [?]     
  407.  * RETURNS
  408.  *  void
  409.  *****************************************************************************/
  410. void CALLSETCallerIDRsp(void *info)
  411. {
  412.     /*----------------------------------------------------------------*/
  413.     /* Local Variables                                                */
  414.     /*----------------------------------------------------------------*/
  415.     mmi_ss_set_clir_flag_rsp_struct *localPtr = NULL;
  416.     static U8 firstTime = 0;
  417.     S16 error;
  418.     /*----------------------------------------------------------------*/
  419.     /* Code Body                                                      */
  420.     /*----------------------------------------------------------------*/
  421.     PRINT_INFORMATION(("*** In PsCBackClirSet *** n"));
  422.     localPtr = (mmi_ss_set_clir_flag_rsp_struct*) info;
  423.     if (localPtr->result == 1)
  424.     {
  425.         g_callset_context.CallerID = g_callset_context.CallerIDInput;
  426.         if (firstTime)
  427.         {
  428.             if (WriteValue(NVRAM_CALLERID, &g_callset_context.CallerIDInput, DS_BYTE, &error) < DS_BYTE)
  429.             {
  430.                 PRINT_INFORMATION(("## ERROR: write caler id : WriteRecord " "to NVRAM failed (%d)n", (int)error));
  431.                 return;
  432.             }
  433.             DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, CS_NOTIFYDURATION, SUCCESS_TONE);
  434.             DeleteScreenIfPresent(SCR_ID_CALLSET_CALLER_ID_MAIN);
  435.         }
  436.     }
  437.     else
  438.     {
  439.         if (firstTime)
  440.         {
  441.             DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 1, CS_NOTIFYDURATION, ERROR_TONE);
  442.             DeleteScreenIfPresent(SCR_ID_CALLSET_CALLER_ID_MAIN);
  443.         }
  444.     }
  445.     firstTime = 1;
  446.     return;
  447. }
  448. /*****************************************************************************
  449.  * FUNCTION
  450.  *  CALLSETClipRsp
  451.  * DESCRIPTION
  452.  *  
  453.  * NA
  454.  *  
  455.  * PARAMETERS
  456.  *  info        [?]     
  457.  * RETURNS
  458.  *  void
  459.  *****************************************************************************/
  460. void CALLSETClipRsp(void *info)
  461. {
  462.     /*----------------------------------------------------------------*/
  463.     /* Local Variables                                                */
  464.     /*----------------------------------------------------------------*/
  465.     mmi_ss_clip_interrogate_ind_struct *local;
  466.     /*----------------------------------------------------------------*/
  467.     /* Code Body                                                      */
  468.     /*----------------------------------------------------------------*/
  469.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  470.     local = (mmi_ss_clip_interrogate_ind_struct*) info;
  471.     if (local->result.flag == L4C_OK)
  472.     {
  473.         if (local->status & SS_PBIT)
  474.         {
  475.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CLIP_STATUS_ACT_TXT));
  476.         }
  477.         else
  478.         {
  479.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CLIP_STATUS_NACT_TXT));
  480.         }
  481.         /* micha0322 */
  482.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  483.         EntryCALLSETGeneralSSResut();
  484.     }
  485.     else
  486.     {
  487.     #ifdef __MMI_SS_SHOW_CAUSE__
  488.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  489.         /* micha0322 */
  490.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  491.         EntryCALLSETGeneralSSResut();
  492.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  493.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  494.         /* micha0915 */
  495.         RemoveSSReqScr();
  496.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  497.     }
  498. }
  499. /*****************************************************************************
  500.  * FUNCTION
  501.  *  CALLSETClirRsp
  502.  * DESCRIPTION
  503.  *  
  504.  * NA
  505.  *  
  506.  * PARAMETERS
  507.  *  info        [?]     
  508.  * RETURNS
  509.  *  void
  510.  *****************************************************************************/
  511. void CALLSETClirRsp(void *info)
  512. {
  513.     /*----------------------------------------------------------------*/
  514.     /* Local Variables                                                */
  515.     /*----------------------------------------------------------------*/
  516.     mmi_ss_clir_interrogate_ind_struct *local;
  517.     /*----------------------------------------------------------------*/
  518.     /* Code Body                                                      */
  519.     /*----------------------------------------------------------------*/
  520.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  521.     local = (mmi_ss_clir_interrogate_ind_struct*) info;
  522.     if (local->result.flag == L4C_OK)
  523.     {
  524.         if (local->status & SS_PBIT)
  525.         {
  526.             switch (local->clir_option)
  527.             {
  528.                 case 0: /* permanently hide */
  529.                     pfnUnicodeStrcpy(
  530.                         (PS8) g_callset_context.SSDisplayBuffer,
  531.                         (PS8) GetString(STR_CLIR_STATUS_ACT_PERMANENTLY_TXT));
  532.                     break;
  533.                 case 1: /* temporary default restrict(hide) */
  534.                     pfnUnicodeStrcpy(
  535.                         (PS8) g_callset_context.SSDisplayBuffer,
  536.                         (PS8) GetString(STR_CLIR_STATUS_ACT_DEFAULT_RESTRICT_TXT));
  537.                     break;
  538.                 case 2: /* temporary default allow(show) */
  539.                     pfnUnicodeStrcpy(
  540.                         (PS8) g_callset_context.SSDisplayBuffer,
  541.                         (PS8) GetString(STR_CLIR_STATUS_ACT_DEFAULT_ALLOW_TXT));
  542.                     break;
  543.                 default:
  544.                     pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CLIR_STATUS_ACT_TXT));
  545.                     break;
  546.             }
  547.         }
  548.         else
  549.         {
  550.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CLIR_STATUS_NACT_TXT));
  551.         }
  552.         /* micha0322 */
  553.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  554.         EntryCALLSETGeneralSSResut();
  555.     }
  556.     else
  557.     {
  558.     #ifdef __MMI_SS_SHOW_CAUSE__
  559.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  560.         /* micha0322 */
  561.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  562.         EntryCALLSETGeneralSSResut();
  563.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  564.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  565.         /* micha0915 */
  566.         RemoveSSReqScr();
  567.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  568.     }
  569. }
  570. /*****************************************************************************
  571.  * FUNCTION
  572.  *  CALLSETColpRsp
  573.  * DESCRIPTION
  574.  *  
  575.  * NA
  576.  *  
  577.  * PARAMETERS
  578.  *  info        [?]     
  579.  * RETURNS
  580.  *  void
  581.  *****************************************************************************/
  582. void CALLSETColpRsp(void *info)
  583. {
  584.     /*----------------------------------------------------------------*/
  585.     /* Local Variables                                                */
  586.     /*----------------------------------------------------------------*/
  587.     mmi_ss_colp_interrogate_ind_struct *local;
  588.     /*----------------------------------------------------------------*/
  589.     /* Code Body                                                      */
  590.     /*----------------------------------------------------------------*/
  591.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  592.     local = (mmi_ss_colp_interrogate_ind_struct*) info;
  593.     if (local->result.flag == L4C_OK)
  594.     {
  595.         if (local->status & SS_PBIT)
  596.         {
  597.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_COLP_STATUS_ACT_TXT));
  598.         }
  599.         else
  600.         {
  601.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_COLP_STATUS_NACT_TXT));
  602.         }
  603.         /* micha0322 */
  604.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  605.         EntryCALLSETGeneralSSResut();
  606.     }
  607.     else
  608.     {
  609.     #ifdef __MMI_SS_SHOW_CAUSE__
  610.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  611.         /* micha0322 */
  612.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  613.         EntryCALLSETGeneralSSResut();
  614.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  615.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  616.         /* micha0915 */
  617.         RemoveSSReqScr();
  618.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  619.     }
  620. }
  621. /*****************************************************************************
  622.  * FUNCTION
  623.  *  CALLSETColrRsp
  624.  * DESCRIPTION
  625.  *  
  626.  * NA
  627.  *  
  628.  * PARAMETERS
  629.  *  info        [?]     
  630.  * RETURNS
  631.  *  void
  632.  *****************************************************************************/
  633. void CALLSETColrRsp(void *info)
  634. {
  635.     /*----------------------------------------------------------------*/
  636.     /* Local Variables                                                */
  637.     /*----------------------------------------------------------------*/
  638.     mmi_ss_colr_interrogate_ind_struct *local;
  639.     /*----------------------------------------------------------------*/
  640.     /* Code Body                                                      */
  641.     /*----------------------------------------------------------------*/
  642.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  643.     local = (mmi_ss_colr_interrogate_ind_struct*) info;
  644.     if (local->result.flag == L4C_OK)
  645.     {
  646.         if (local->status & SS_PBIT)
  647.         {
  648.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_COLR_STATUS_ACT_TXT));
  649.         }
  650.         else
  651.         {
  652.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_COLR_STATUS_NACT_TXT));
  653.         }
  654.         /* micha0322 */
  655.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  656.         EntryCALLSETGeneralSSResut();
  657.     }
  658.     else
  659.     {
  660.     #ifdef __MMI_SS_SHOW_CAUSE__
  661.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  662.         /* micha0322 */
  663.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  664.         EntryCALLSETGeneralSSResut();
  665.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  666.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  667.         /* micha0915 */
  668.         RemoveSSReqScr();
  669.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  670.     }
  671. }
  672. /*****************************************************************************
  673.  * FUNCTION
  674.  *  CALLSETCnapRsp
  675.  * DESCRIPTION
  676.  *  
  677.  * NA
  678.  *  
  679.  * PARAMETERS
  680.  *  info        [?]     
  681.  * RETURNS
  682.  *  void
  683.  *****************************************************************************/
  684. void CALLSETCnapRsp(void *info)
  685. {
  686.     /*----------------------------------------------------------------*/
  687.     /* Local Variables                                                */
  688.     /*----------------------------------------------------------------*/
  689.     mmi_ss_cnap_interrogate_ind_struct *local;
  690.     /*----------------------------------------------------------------*/
  691.     /* Code Body                                                      */
  692.     /*----------------------------------------------------------------*/
  693.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  694.     local = (mmi_ss_cnap_interrogate_ind_struct*) info;
  695.     if (local->result.flag == L4C_OK)
  696.     {
  697.         if (local->status & SS_PBIT)
  698.         {
  699.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CNAP_STATUS_ACT_TXT));
  700.         }
  701.         else
  702.         {
  703.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CNAP_STATUS_NACT_TXT));
  704.         }
  705.         /* micha0322 */
  706.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  707.         EntryCALLSETGeneralSSResut();
  708.     }
  709.     else
  710.     {
  711.     #ifdef __MMI_SS_SHOW_CAUSE__
  712.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  713.         /* micha0322 */
  714.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  715.         EntryCALLSETGeneralSSResut();
  716.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  717.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  718.         /* micha0915 */
  719.         RemoveSSReqScr();
  720.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  721.     }
  722. }
  723. /*****************************************************************************
  724.  * FUNCTION
  725.  *  CALLSETCcbsQueryRsp
  726.  * DESCRIPTION
  727.  *  
  728.  * NA
  729.  *  
  730.  * PARAMETERS
  731.  *  info        [?]     
  732.  * RETURNS
  733.  *  void
  734.  *****************************************************************************/
  735. void CALLSETCcbsQueryRsp(void *info)
  736. {
  737.     /*----------------------------------------------------------------*/
  738.     /* Local Variables                                                */
  739.     /*----------------------------------------------------------------*/
  740.     mmi_ss_ccbs_rsp_struct *local;
  741.     /*----------------------------------------------------------------*/
  742.     /* Code Body                                                      */
  743.     /*----------------------------------------------------------------*/
  744.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  745.     local = (mmi_ss_ccbs_rsp_struct*) info;
  746.     if (local->opcode == SS_OP_ERASECCENTRY)
  747.     {
  748.         if (local->result.flag == L4C_OK)
  749.         {
  750.             pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CCBS_STATUS_TITLE));
  751.             pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEACTIVATED));
  752.             DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  753.             EntryCALLSETGeneralSSResut();
  754.         }
  755.         else
  756.         {
  757.             DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  758.             RemoveSSReqScr();
  759.         }
  760.         return;
  761.     }
  762.     if (local->result.flag == L4C_OK)
  763.     {
  764.         if (local->list.ss_status & SS_PBIT)
  765.         {
  766.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CCBS_STATUS_ACT_TXT));
  767.         }
  768.         else
  769.         {
  770.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_CCBS_STATUS_NACT_TXT));
  771.         }
  772.         /* micha0322 */
  773.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  774.         EntryCALLSETGeneralSSResut();
  775.     }
  776.     else
  777.     {
  778.     #ifdef __MMI_SS_SHOW_CAUSE__
  779.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  780.         /* micha0322 */
  781.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  782.         EntryCALLSETGeneralSSResut();
  783.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  784.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  785.         /* micha0915 */
  786.         RemoveSSReqScr();
  787.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  788.     }
  789. }
  790. /* micha1228 */
  791. /*****************************************************************************
  792.  * FUNCTION
  793.  *  CALLSETEmlppQueryRsp
  794.  * DESCRIPTION
  795.  *  
  796.  * NA
  797.  *  
  798.  * PARAMETERS
  799.  *  info        [?]     
  800.  * RETURNS
  801.  *  void
  802.  *****************************************************************************/
  803. void CALLSETEmlppQueryRsp(void *info)
  804. {
  805.     /*----------------------------------------------------------------*/
  806.     /* Local Variables                                                */
  807.     /*----------------------------------------------------------------*/
  808.     mmi_ss_emlpp_rsp_struct *local;
  809.     S8 TempBuff[50];
  810.     /*----------------------------------------------------------------*/
  811.     /* Code Body                                                      */
  812.     /*----------------------------------------------------------------*/
  813.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  814.     memset(TempBuff, 0, sizeof(TempBuff));
  815.     local = (mmi_ss_emlpp_rsp_struct*) info;
  816.     if (local->result.flag == L4C_OK)
  817.     {
  818.         sprintf(TempBuff, "Default: %dnMax: %d", local->default_pri, local->max_pri);
  819.         AnsiiToUnicodeString((PS8) g_callset_context.SSDisplayBuffer, (PS8) TempBuff);
  820.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  821.         EntryCALLSETGeneralSSResut();
  822.     }
  823.     else
  824.     {
  825.     #ifdef __MMI_SS_SHOW_CAUSE__
  826.         ShowCauseString(local->result.cause, g_callset_context.SSDisplayBuffer);
  827.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  828.         EntryCALLSETGeneralSSResut();
  829.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  830.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  831.         /* micha0915 */
  832.         RemoveSSReqScr();
  833.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  834.     }
  835. }