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

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.  * CallWaiting.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 : CallWaiting.c
  87.    PURPOSE     : Call waiting application in 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 "MainMenuDef.h"
  95. #include "ProtocolEvents.h"
  96. #include "CallSetUp.h"
  97. #include "SettingProfile.h"
  98. #include "CallWaiting.h"
  99. #include "CallSetUpEnum.h"
  100. #include "CommonScreens.h"
  101. #include "CallmanagementIdDef.h"
  102. #include "CallManagementGprot.h"
  103. #include "MMI_features.h"
  104. /*****************************************************************************
  105.  * FUNCTION
  106.  *  InitCallWaiting
  107.  * DESCRIPTION
  108.  *  Initializes the call waiting application
  109.  * NA
  110.  *  
  111.  * PARAMETERS
  112.  *  void
  113.  * RETURNS
  114.  *  void
  115.  *****************************************************************************/
  116. void InitCallWaiting()
  117. {
  118.     /*----------------------------------------------------------------*/
  119.     /* Local Variables                                                */
  120.     /*----------------------------------------------------------------*/
  121.     /*----------------------------------------------------------------*/
  122.     /* Code Body                                                      */
  123.     /*----------------------------------------------------------------*/
  124.     /* set hilite handlers for the individual menu items */
  125.     SetHiliteHandler(MENU8237_SCR8093_MNGCALL_MENU_WAIT, HighlightCALLSETCallWaiting);
  126.     SetHiliteHandler(MENU8237_MNGCALL_CALWAIT_MENU_ON, HighlightCALLSETCallWaitingOn);
  127.     SetHiliteHandler(MENU8237_MNGCALL_CALWAIT_MENU_OFF, HighlightCALLSETCallWaitingOff);
  128.     SetHiliteHandler(MENU8237_MNGCALL_CALWAIT_MENU_QUERY, HighlightCALLSETCallWaitingQuery);
  129.     return;
  130. }
  131. /*****************************************************************************
  132.  * FUNCTION
  133.  *  HighlightCALLSETCallWaiting
  134.  * DESCRIPTION
  135.  *  highlite handler for call waiting options
  136.  * NA
  137.  *  
  138.  * PARAMETERS
  139.  *  void
  140.  * RETURNS
  141.  *  void
  142.  *****************************************************************************/
  143. void HighlightCALLSETCallWaiting()
  144. {
  145.     /*----------------------------------------------------------------*/
  146.     /* Local Variables                                                */
  147.     /*----------------------------------------------------------------*/
  148.     /*----------------------------------------------------------------*/
  149.     /* Code Body                                                      */
  150.     /*----------------------------------------------------------------*/
  151.     /* Change left soft key icon and label */
  152.     ChangeLeftSoftkey(STR_GLOBAL_OK, 0);
  153.     /* Change right soft key icon and label */
  154.     ChangeRightSoftkey(STR_GLOBAL_BACK, 0);
  155.     /* set the left/right soft key functions handlers */
  156.     SetLeftSoftkeyFunction(EntryCALLSETWaitingMain, KEY_EVENT_UP);
  157.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  158.     /* set the left/right arrow key function handlers */
  159.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  160.     SetKeyHandler(EntryCALLSETWaitingMain, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  161.     return;
  162. }
  163. /*****************************************************************************
  164.  * FUNCTION
  165.  *  HighlightCALLSETCallWaitingOn
  166.  * DESCRIPTION
  167.  *  highlite handler for callwaiting on option
  168.  * NA
  169.  *  
  170.  * PARAMETERS
  171.  *  void
  172.  * RETURNS
  173.  *  void
  174.  *****************************************************************************/
  175. void HighlightCALLSETCallWaitingOn(void)
  176. {
  177.     /*----------------------------------------------------------------*/
  178.     /* Local Variables                                                */
  179.     /*----------------------------------------------------------------*/
  180.     /*----------------------------------------------------------------*/
  181.     /* Code Body                                                      */
  182.     /*----------------------------------------------------------------*/
  183.     /* set the left/right soft key functions handlers */
  184.     SetLeftSoftkeyFunction(EntryScrCallWaitingOnreq, KEY_EVENT_UP);
  185.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  186.     /* set the left/right arrow key function handlers */
  187.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  188.     return;
  189. }
  190. /*****************************************************************************
  191.  * FUNCTION
  192.  *  HighlightCALLSETCallWaitingOff
  193.  * DESCRIPTION
  194.  *  highlight handler for call waiting off option
  195.  * NA
  196.  *  
  197.  * PARAMETERS
  198.  *  void
  199.  * RETURNS
  200.  *  void
  201.  *****************************************************************************/
  202. void HighlightCALLSETCallWaitingOff(void)
  203. {
  204.     /*----------------------------------------------------------------*/
  205.     /* Local Variables                                                */
  206.     /*----------------------------------------------------------------*/
  207.     /*----------------------------------------------------------------*/
  208.     /* Code Body                                                      */
  209.     /*----------------------------------------------------------------*/
  210.     /* set the left/right soft key functions handlers */
  211.     SetLeftSoftkeyFunction(EntryScrCallWaitingOffreq, KEY_EVENT_UP);
  212.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  213.     /* set the left/right arrow key function handlers */
  214.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  215.     return;
  216. }
  217. /*****************************************************************************
  218.  * FUNCTION
  219.  *  HighlightCALLSETCallWaitingQuery
  220.  * DESCRIPTION
  221.  *  highlight handler for call waiting query status option
  222.  * NA
  223.  *  
  224.  * PARAMETERS
  225.  *  void
  226.  * RETURNS
  227.  *  void
  228.  *****************************************************************************/
  229. void HighlightCALLSETCallWaitingQuery(void)
  230. {
  231.     /*----------------------------------------------------------------*/
  232.     /* Local Variables                                                */
  233.     /*----------------------------------------------------------------*/
  234.     /*----------------------------------------------------------------*/
  235.     /* Code Body                                                      */
  236.     /*----------------------------------------------------------------*/
  237.     /* set the left/right soft key functions handlers */
  238.     SetLeftSoftkeyFunction(EntryScrCallWaitingQueryreq, KEY_EVENT_UP);
  239.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  240.     /* set the left/right arrow key function handlers */
  241.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  242.     return;
  243. }
  244. /*****************************************************************************
  245.  * FUNCTION
  246.  *  EntryScrCallWaitingOnreq
  247.  * DESCRIPTION
  248.  *  function for call waiting on req.
  249.  * NA
  250.  *  
  251.  * PARAMETERS
  252.  *  void
  253.  * RETURNS
  254.  *  void
  255.  *****************************************************************************/
  256. void EntryScrCallWaitingOnreq()
  257. {
  258.     /*----------------------------------------------------------------*/
  259.     /* Local Variables                                                */
  260.     /*----------------------------------------------------------------*/
  261.     S8 input_string[MAX_DIGITS_USSD];
  262.     S8 uniinput_string[MAX_DIGITS_USSD * ENCODING_LENGTH];
  263.     /*----------------------------------------------------------------*/
  264.     /* Code Body                                                      */
  265.     /*----------------------------------------------------------------*/
  266.     /* format the ss string for the call waiting on req */
  267.     memset(input_string, 0, MAX_DIGITS_USSD);
  268.     strcpy((S8*) input_string, "*43#");
  269.     memset(uniinput_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  270.     AnsiiToUnicodeString((PS8) uniinput_string, (PS8) input_string);
  271.     /* make a corresponding ss string for call waiting option */
  272.     MakeCall((PS8) uniinput_string);
  273.     /* delete screens for maitaining hte history */
  274.     return;
  275. }
  276. /*****************************************************************************
  277.  * FUNCTION
  278.  *  EntryCALLSETWaitingMain
  279.  * DESCRIPTION
  280.  *  entry function for the call waiting menu option
  281.  * NA
  282.  *  
  283.  * PARAMETERS
  284.  *  void
  285.  * RETURNS
  286.  *  void
  287.  *****************************************************************************/
  288. void EntryCALLSETWaitingMain(void)
  289. {
  290.     /*----------------------------------------------------------------*/
  291.     /* Local Variables                                                */
  292.     /*----------------------------------------------------------------*/
  293.     U16 nStrItemList[MAX_SUB_MENUS];    /* Stores the strings id of submenus returned */
  294.     U16 nNumofItem;                     /* Stores no of children in the submenu */
  295.     //micha1229
  296.     //      U16 nDispAttribute; /* Stores display attribue */
  297.     U8 *guiBuffer;              /* Buffer holding history data */
  298.     /*----------------------------------------------------------------*/
  299.     /* Code Body                                                      */
  300.     /*----------------------------------------------------------------*/
  301.     EntryNewScreen(SCR_ID_CALLSET_WAITING_MAIN, NULL, EntryCALLSETWaitingMain, NULL);
  302.     /* Get current screen to gui buffer  for history purposes */
  303.     guiBuffer = GetCurrGuiBuffer(SCR_ID_CALLSET_WAITING_MAIN);
  304.     /* Retrieve no of child of menu item to be displayed */
  305.     nNumofItem = GetNumOfChild(MENU8237_SCR8093_MNGCALL_MENU_WAIT);
  306.     /* Get attribute of menu to be displayed */
  307.     /* nDispAttribute = GetDispAttributeOfItem(MENU8237_SCR8093_MNGCALL_MENU_WAIT); */
  308.     /* Retrieve string ids in sequence of given menu item to be displayed */
  309.     GetSequenceStringIds(MENU8237_SCR8093_MNGCALL_MENU_WAIT, nStrItemList);
  310.     /* Set current parent id */
  311.     SetParentHandler(MENU8237_SCR8093_MNGCALL_MENU_WAIT);
  312.     /* Register highlight handler to be called in menu screen */
  313.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  314.     /* Display Category15 Screen */
  315.     ShowCategory15Screen(
  316.         STR_SCR8094_MNGCALL_CALWAIT_MENU_CAPTION,
  317.         MAIN_MENU_TITLE_SETTINGS_ICON,
  318.         STR_GLOBAL_OK,
  319.         IMG_GLOBAL_OK,
  320.         STR_GLOBAL_BACK,
  321.         IMG_GLOBAL_BACK,
  322.         nNumofItem,
  323.         nStrItemList,
  324.         (U16*) gIndexIconsImageList,
  325.         1,
  326.         0,
  327.         guiBuffer);
  328.     /* Register function with right softkey */
  329.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  330.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  331.     return;
  332. }
  333. /*****************************************************************************
  334.  * FUNCTION
  335.  *  EntryScrCallWaitingOffreq
  336.  * DESCRIPTION
  337.  *  function for call waiting on req.
  338.  * NA
  339.  *  
  340.  * PARAMETERS
  341.  *  void
  342.  * RETURNS
  343.  *  void
  344.  *****************************************************************************/
  345. void EntryScrCallWaitingOffreq()
  346. {
  347.     /*----------------------------------------------------------------*/
  348.     /* Local Variables                                                */
  349.     /*----------------------------------------------------------------*/
  350.     S8 input_string[MAX_DIGITS_USSD];
  351.     S8 uniinput_string[MAX_DIGITS_USSD * ENCODING_LENGTH];
  352.     /*----------------------------------------------------------------*/
  353.     /* Code Body                                                      */
  354.     /*----------------------------------------------------------------*/
  355.     /* format ss string for call waiting off req */
  356.     memset(input_string, 0, MAX_DIGITS_USSD);
  357.     strcpy((S8*) input_string, "#43#");
  358.     memset(uniinput_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  359.     AnsiiToUnicodeString((PS8) uniinput_string, (PS8) input_string);
  360.     /* make a corresponding ss string for call waiting option */
  361.     MakeCall((PS8) uniinput_string);
  362.     return;
  363. }
  364. /*****************************************************************************
  365.  * FUNCTION
  366.  *  EntryScrCallWaitingQueryreq
  367.  * DESCRIPTION
  368.  *  function for call waiting on req.
  369.  * NA
  370.  *  
  371.  * PARAMETERS
  372.  *  void
  373.  * RETURNS
  374.  *  void
  375.  *****************************************************************************/
  376. void EntryScrCallWaitingQueryreq(void)
  377. {
  378.     /*----------------------------------------------------------------*/
  379.     /* Local Variables                                                */
  380.     /*----------------------------------------------------------------*/
  381.     S8 input_string[MAX_DIGITS_USSD];
  382.     S8 uniinput_string[MAX_DIGITS_USSD * ENCODING_LENGTH];
  383.     /*----------------------------------------------------------------*/
  384.     /* Code Body                                                      */
  385.     /*----------------------------------------------------------------*/
  386.     /* format ss string for call waiting query req */
  387.     memset(input_string, 0, MAX_DIGITS_USSD);
  388.     strcpy((S8*) input_string, "*#43#");
  389.     SetProtocolEventHandler(CALLSETWaitingRsp, PRT_MMI_SS_CALL_WAIT_RSP);
  390.     memset(uniinput_string, 0, (MAX_DIGITS_USSD * ENCODING_LENGTH));
  391.     AnsiiToUnicodeString((PS8) uniinput_string, (PS8) input_string);
  392.     /* make a corresponding ss string for call waiting option */
  393.     MakeCall((PS8) uniinput_string);
  394.     return;
  395. }
  396. /*****************************************************************************
  397.  * FUNCTION
  398.  *  CALLSETWaitingRsp
  399.  * DESCRIPTION
  400.  *  response handler for call waiting query response
  401.  * NA
  402.  *  
  403.  * PARAMETERS
  404.  *  info        [?]     
  405.  * RETURNS
  406.  *  void
  407.  *****************************************************************************/
  408. void CALLSETWaitingRsp(void *info)
  409. {
  410.     /*----------------------------------------------------------------*/
  411.     /* Local Variables                                                */
  412.     /*----------------------------------------------------------------*/
  413.     U8 bs_index;
  414.     mmi_ss_call_wait_rsp_struct *pMsgCallWaitRsp = (mmi_ss_call_wait_rsp_struct*) info;
  415.     /*----------------------------------------------------------------*/
  416.     /* Code Body                                                      */
  417.     /*----------------------------------------------------------------*/
  418.     memset(g_callset_context.SSDisplayBuffer, 0, MAX_DISP_UCS2);
  419.     DeleteScreenIfPresent(SCR_ID_CALLSET_WAITING_MAIN);
  420.     /* check the status of the response result */
  421.     if (pMsgCallWaitRsp->result.flag == L4C_OK)
  422.     {
  423.         /* if the response is success check the type */
  424.         /* format the result string */
  425.         if (pMsgCallWaitRsp->status & SS_ABIT)
  426.         {
  427.             /* format the result string with active/deactive tags. */
  428.             pfnUnicodeStrcpy((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_SCR8096_MNGCALL_CALLWAIT_ON));
  429.             pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_ACTIVATED));
  430.             for (bs_index = 0; bs_index < pMsgCallWaitRsp->count; bs_index++)
  431.             {
  432.                 if ((pfnUnicodeStrlen((PS8) GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
  433.                      + pfnUnicodeStrlen((PS8) g_callset_context.SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH)
  434.                 {
  435.                     AppendBScodeString(pMsgCallWaitRsp->list[bs_index], (PS8) g_callset_context.SSDisplayBuffer);
  436.                 }
  437.             }
  438.         }
  439.         else if (pMsgCallWaitRsp->opcode == SS_OP_INTERROGATESS)
  440.         {
  441.             if (pMsgCallWaitRsp->status & SS_PBIT)
  442.             {
  443.                 /* format the result string with active/deactive tags. */
  444.                 pfnUnicodeStrcpy(
  445.                     (S8*) g_callset_context.SSDisplayBuffer,
  446.                     (PS8) GetString(STR_SCR8096_MNGCALL_CALLWAIT_ON));
  447.                 pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEACTIVATED));
  448.                 for (bs_index = 0; bs_index < pMsgCallWaitRsp->count; bs_index++)
  449.                 {
  450.                     if ((pfnUnicodeStrlen((PS8) GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
  451.                          + pfnUnicodeStrlen((PS8) g_callset_context.SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH)
  452.                     {
  453.                         AppendBScodeString(pMsgCallWaitRsp->list[bs_index], (PS8) g_callset_context.SSDisplayBuffer);
  454.                     }
  455.                 }
  456.             }
  457.             else
  458.             {
  459.                 pfnUnicodeStrcpy(
  460.                     (S8*) g_callset_context.SSDisplayBuffer,
  461.                     (PS8) GetString(STR_SCR8096_MNGCALL_CALLWAIT_ON));
  462.                 pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_NOT_PROVIDED));
  463.                 for (bs_index = 0; bs_index < pMsgCallWaitRsp->count; bs_index++)
  464.                 {
  465.                     if ((pfnUnicodeStrlen((PS8) GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
  466.                          + pfnUnicodeStrlen((PS8) g_callset_context.SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH)
  467.                     {
  468.                         AppendBScodeString(pMsgCallWaitRsp->list[bs_index], (PS8) g_callset_context.SSDisplayBuffer);
  469.                     }
  470.                 }
  471.             }
  472.         }
  473.         else
  474.         {
  475.             pfnUnicodeStrcpy(
  476.                 (S8*) g_callset_context.SSDisplayBuffer,
  477.                 (PS8) GetString(STR_SCR8096_MNGCALL_CALLWAIT_ON));
  478.             pfnUnicodeStrcat((PS8) g_callset_context.SSDisplayBuffer, (PS8) GetString(STR_DEACTIVATED));
  479.             for (bs_index = 0; bs_index < pMsgCallWaitRsp->count; bs_index++)
  480.             {
  481.                 if ((pfnUnicodeStrlen((PS8) GetString(STR_L4_ALL_TELESERVICES_EXCEPT_SMS))
  482.                      + pfnUnicodeStrlen((PS8) g_callset_context.SSDisplayBuffer)) < MAX_DISP_UCS2 / ENCODING_LENGTH)
  483.                 {
  484.                     AppendBScodeString(pMsgCallWaitRsp->list[bs_index], (PS8) g_callset_context.SSDisplayBuffer);
  485.                 }
  486.             }
  487.         }
  488.         /* call the result screen function to display the result string */
  489.         /* micha0322 */
  490.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  491.         EntryCALLSETGeneralSSResut();
  492.     }
  493.     else
  494.     {
  495.         /* in case of response failure */
  496.     #ifdef __MMI_SS_SHOW_CAUSE__
  497.         ShowCauseString(pMsgCallWaitRsp->result.cause, (PS8) g_callset_context.SSDisplayBuffer);
  498.         /* micha0322 */
  499.         DeleteScreenIfPresent(SCR_ID_CALLSET_GENERAL_SS_RESULT);
  500.         EntryCALLSETGeneralSSResut();
  501.     #else /* __MMI_SS_SHOW_CAUSE__ */ 
  502.         /* display the not done popup */
  503.         DisplayPopup((PU8) GetString(STR_GLOBAL_NOT_DONE), IMG_GLOBAL_UNFINISHED, 0, CS_NOTIFYDURATION, ERROR_TONE);
  504.         /* micha0915 */
  505.         RemoveSSReqScr();
  506.     #endif /* __MMI_SS_SHOW_CAUSE__ */ 
  507.     }
  508.     return;
  509. }