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

MTK

开发平台:

C/C++

  1.         {
  2.             SATGetIconCompleteCallBack = GoToLaunchBrowserConformationScreen;
  3.             SATGetIconDataToList();
  4.             return;
  5.         }
  6.     }
  7.     iconData = SATGetIconFromList(gSATLaunchBrowser.iconInfo.iconId);
  8.     gSATContext.exitCondition = &gSATLaunchBrowser.passedConf;
  9.     EntryNewScreen(SCR_ID_SAT_LAUNCH_BROWSER_CONF, SATGenericExitHandler, NULL, NULL);
  10.     SetIsInSATScreen();
  11.     gSATContext.historyFuncPtr = GoToLaunchBrowserConformationScreen;
  12.     gSATCallSetup.passedConfirmScreen = 0;
  13.     ShowCategory151Screen(
  14.         0,
  15.         0,
  16.         STR_GLOBAL_YES,
  17.         0,
  18.         STR_GLOBAL_NO,
  19.         0,
  20.         gSATLaunchBrowser.alphaId,
  21.         iconData,
  22.         gSATContext.guiBufferPointer);
  23.     SetKeyHandler(SATSendLaunchBrowserTerminalResponseExpire, KEY_END, KEY_EVENT_DOWN);
  24.     SetLeftSoftkeyFunction(LaunchBrowserConformationOK, KEY_EVENT_UP);
  25.     SetRightSoftkeyFunction(SATSendLaunchBrowserTerminalResponseUnable, KEY_EVENT_UP);
  26. }
  27. /*****************************************************************************
  28.  * FUNCTION
  29.  *  LaunchBrowserConformationOK
  30.  * DESCRIPTION
  31.  *  
  32.  * PARAMETERS
  33.  *  void
  34.  * RETURNS
  35.  *  void
  36.  *****************************************************************************/
  37. void LaunchBrowserConformationOK(void)
  38. {
  39.     /*----------------------------------------------------------------*/
  40.     /* Local Variables                                                */
  41.     /*----------------------------------------------------------------*/
  42.     MYQUEUE *Message;
  43.     WAPLAUNCHBROWSERREQ *dataPtr;
  44.     /*----------------------------------------------------------------*/
  45.     /* Code Body                                                      */
  46.     /*----------------------------------------------------------------*/
  47.     gSATLaunchBrowser.passedConf = 1;
  48.     ClearIsInSATScreen();
  49.     Message = ALLOCATE_ITM(MOD_MMI);
  50.     Message->oslSrcId = MOD_MMI;
  51.     Message->oslDestId = MOD_WAP;
  52.     Message->oslMsgId = PRT_WAP_MMI_LAUNCH_BROWSER_REQ;
  53.     dataPtr = (WAPLAUNCHBROWSERREQ*) OslConstructDataPtr(sizeof(WAPLAUNCHBROWSERREQ)
  54.                                                           + (gSATLaunchBrowser.noUrl) * ENCODING_LENGTH * sizeof(U8)
  55.                                                           + (gSATLaunchBrowser.noBearer) * ENCODING_LENGTH * sizeof(U8)
  56.                                                           +
  57.                                                           (gSATLaunchBrowser.noGateway) * ENCODING_LENGTH * sizeof(U8));
  58.     dataPtr->url = (PU8) dataPtr + sizeof(WAPLAUNCHBROWSERREQ);
  59.     memcpy(dataPtr->url, gSATLaunchBrowser.url, (gSATLaunchBrowser.noUrl) * ENCODING_LENGTH * sizeof(U8));
  60.     dataPtr->bearer = (PU8) dataPtr->url + (gSATLaunchBrowser.noUrl) * ENCODING_LENGTH * sizeof(U8);
  61.     memcpy(dataPtr->bearer, gSATLaunchBrowser.bearer, (gSATLaunchBrowser.noBearer) * ENCODING_LENGTH * sizeof(U8));
  62.     dataPtr->gateway = (PU8) dataPtr->bearer + (gSATLaunchBrowser.noBearer) * ENCODING_LENGTH * sizeof(U8);
  63.     memcpy(dataPtr->gateway, gSATLaunchBrowser.gateway, (gSATLaunchBrowser.noGateway) * ENCODING_LENGTH * sizeof(U8));
  64.     dataPtr->browserMode = gSATLaunchBrowser.browserMode;
  65.     dataPtr->noUrl = gSATLaunchBrowser.noUrl;
  66.     dataPtr->noBearer = gSATLaunchBrowser.noBearer;
  67.     dataPtr->noGateway = gSATLaunchBrowser.noGateway;
  68.     Message->oslDataPtr = (oslParaType*) dataPtr;
  69.     Message->oslPeerBuffPtr = NULL;
  70.     SEND_MSG(Message);
  71. #ifdef WAP_SUPPORT
  72. #ifdef MMI_ON_HARDWARE_P
  73.     if ((gSATLaunchBrowser.browserMode == SAT_USE_EXISTING_BROWSER || gSATLaunchBrowser.browserMode == SAT_CLOSE_EXISTING_BROWSER_AND_LAUNCH_NEW) &&
  74.         wap_browser_is_open())
  75.     {
  76.      GoBackHistory();
  77.     }
  78. #endif /* MMI_ON_HARDWARE_P */
  79. #endif /* WAP_SUPPORT */
  80. }
  81. /*****************************************************************************
  82.  * FUNCTION
  83.  *  WAPLaunchBrowserRsp
  84.  * DESCRIPTION
  85.  *  
  86.  * PARAMETERS
  87.  *  msgPtr      [?]     
  88.  * RETURNS
  89.  *  void
  90.  *****************************************************************************/
  91. void WAPLaunchBrowserRsp(void *msgPtr)
  92. {
  93.     /*----------------------------------------------------------------*/
  94.     /* Local Variables                                                */
  95.     /*----------------------------------------------------------------*/
  96.     WAPLAUNCHBROWSERRES *wapLaunchBrowserRes;
  97.     /*----------------------------------------------------------------*/
  98.     /* Code Body                                                      */
  99.     /*----------------------------------------------------------------*/
  100.     wapLaunchBrowserRes = (WAPLAUNCHBROWSERRES*) msgPtr;
  101.     if (wapLaunchBrowserRes->res != SAT_CMD_PERFORMED_SUCCESSFULLY)
  102.     {
  103.         SetIsInSATScreen();
  104.     }
  105.     else
  106.     {
  107.         gSATContext.historyFuncPtr = GoToSATMainMenu;
  108.         GenericExitScreen(SCR_ID_SAT_HISTORY, SATHistoryHandler); /* there should be a WAP broswer on top */
  109.     }
  110.     TerminalResponseLaunchBrowser(
  111.         wapLaunchBrowserRes->res,
  112.         wapLaunchBrowserRes->additionalInfo,
  113.         gSATLaunchBrowser.cmdDetail);
  114.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  115. }
  116. /*****************************************************************************
  117.  * FUNCTION
  118.  *  SATSendLaunchBrowserTerminalResponseExpire
  119.  * DESCRIPTION
  120.  *  
  121.  * PARAMETERS
  122.  *  void
  123.  * RETURNS
  124.  *  void
  125.  *****************************************************************************/
  126. void SATSendLaunchBrowserTerminalResponseExpire(void)
  127. {
  128.     /*----------------------------------------------------------------*/
  129.     /* Local Variables                                                */
  130.     /*----------------------------------------------------------------*/
  131.     /*----------------------------------------------------------------*/
  132.     /* Code Body                                                      */
  133.     /*----------------------------------------------------------------*/
  134.     TerminalResponseLaunchBrowser(SAT_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD, 0, gSATLaunchBrowser.cmdDetail);
  135.     ExitSATToIdle();
  136. }
  137. /*****************************************************************************
  138.  * FUNCTION
  139.  *  SATSendLaunchBrowserTerminalResponseUnable
  140.  * DESCRIPTION
  141.  *  
  142.  * PARAMETERS
  143.  *  void
  144.  * RETURNS
  145.  *  void
  146.  *****************************************************************************/
  147. void SATSendLaunchBrowserTerminalResponseUnable(void)
  148. {
  149.     /*----------------------------------------------------------------*/
  150.     /* Local Variables                                                */
  151.     /*----------------------------------------------------------------*/
  152.     /*----------------------------------------------------------------*/
  153.     /* Code Body                                                      */
  154.     /*----------------------------------------------------------------*/
  155.     TerminalResponseLaunchBrowser(SAT_USER_DID_NOT_ACCEPT_THE_PROACTIVE_CMD, 0, gSATLaunchBrowser.cmdDetail);
  156.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  157. }
  158. /*****************************************************************************
  159.  * FUNCTION
  160.  *  TerminalResponseLaunchBrowser
  161.  * DESCRIPTION
  162.  *  
  163.  * PARAMETERS
  164.  *  res             [IN]        
  165.  *  add_info        [IN]        
  166.  *  cmdDetail       [?]         
  167.  * RETURNS
  168.  *  void
  169.  *****************************************************************************/
  170. void TerminalResponseLaunchBrowser(U8 res, U8 add_info, U8 *cmdDetail)
  171. {
  172.     /*----------------------------------------------------------------*/
  173.     /* Local Variables                                                */
  174.     /*----------------------------------------------------------------*/
  175.     MYQUEUE *Message;
  176.     mmi_sat_launch_browser_res_req_struct *dataPtr;
  177.     /*----------------------------------------------------------------*/
  178.     /* Code Body                                                      */
  179.     /*----------------------------------------------------------------*/
  180.     gSATLaunchBrowser.passedConf = 1;
  181.     Message = ALLOCATE_ITM(MOD_MMI);
  182.     Message->oslSrcId = MOD_MMI;
  183.     Message->oslDestId = MOD_L4C;
  184.     Message->oslMsgId = PRT_MMI_SAT_LAUNCH_BROWSER_RES_REQ;
  185.     dataPtr =
  186.         (mmi_sat_launch_browser_res_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_launch_browser_res_req_struct));
  187.     /* diamond, 2005/05/24 icon */
  188.     if (res == SAT_CMD_PERFORMED_SUCCESSFULLY && gSATLaunchBrowser.isIconAvailable == 1 &&
  189.         gSATContext.isCMDIconSupported == MMI_FALSE)
  190.     {
  191.         dataPtr->res = SAT_CMD_PERFORMED_BUT_ICON_COULD_NOT_DSPL;
  192.     }
  193.     else
  194.     {
  195.         /* end, diamond */
  196.         dataPtr->res = res;
  197.     }
  198.     dataPtr->size_of_additional_info = add_info;
  199.     memcpy(dataPtr->cmd_detail, (void*)cmdDetail, 5 * sizeof(U8));
  200.     Message->oslDataPtr = (oslParaType*) dataPtr;
  201.     Message->oslPeerBuffPtr = NULL;
  202.     SEND_MSG(Message);
  203.     gSATContext.lastSATCmd = SAT_NONE_CMD;
  204. }
  205. /*****************************************************************************
  206.  * FUNCTION
  207.  *  SATLaunchBrowserRsp
  208.  * DESCRIPTION
  209.  *  
  210.  * PARAMETERS
  211.  *  msgPtr      [?]     
  212.  * RETURNS
  213.  *  void
  214.  *****************************************************************************/
  215. void SATLaunchBrowserRsp(void *msgPtr)
  216. {
  217.     /*----------------------------------------------------------------*/
  218.     /* Local Variables                                                */
  219.     /*----------------------------------------------------------------*/
  220.     /*----------------------------------------------------------------*/
  221.     /* Code Body                                                      */
  222.     /*----------------------------------------------------------------*/
  223.     FreeLaunchBrowser();
  224. }
  225. /*****************************************************************************
  226.  * FUNCTION
  227.  *  FreeLaunchBrowser
  228.  * DESCRIPTION
  229.  *  
  230.  * PARAMETERS
  231.  *  void
  232.  * RETURNS
  233.  *  void
  234.  *****************************************************************************/
  235. void FreeLaunchBrowser(void)
  236. {
  237.     /*----------------------------------------------------------------*/
  238.     /* Local Variables                                                */
  239.     /*----------------------------------------------------------------*/
  240.     /*----------------------------------------------------------------*/
  241.     /* Code Body                                                      */
  242.     /*----------------------------------------------------------------*/
  243.     SATClearAllIcons();
  244.     /* micha1008 */
  245.     if (gSATLaunchBrowser.alphaId)
  246.     {
  247.         OslMfree(gSATLaunchBrowser.alphaId);
  248.     }
  249.     gSATLaunchBrowser.noAlphaId = 0;
  250.     gSATLaunchBrowser.alphaId = NULL;
  251.     if (gSATLaunchBrowser.url)
  252.     {
  253.         OslMfree(gSATLaunchBrowser.url);
  254.     }
  255.     gSATLaunchBrowser.noUrl = 0;
  256.     gSATLaunchBrowser.url = NULL;
  257.     if (gSATLaunchBrowser.bearer)
  258.     {
  259.         OslMfree(gSATLaunchBrowser.bearer);
  260.     }
  261.     gSATLaunchBrowser.noBearer = 0;
  262.     gSATLaunchBrowser.bearer = NULL;
  263.     if (gSATLaunchBrowser.gateway)
  264.     {
  265.         OslMfree(gSATLaunchBrowser.gateway);
  266.     }
  267.     gSATLaunchBrowser.noGateway = 0;
  268.     gSATLaunchBrowser.gateway = NULL;
  269. }
  270. /*****************************************************************************
  271.  * FUNCTION
  272.  *  SATSendDTMFInd
  273.  * DESCRIPTION
  274.  *  
  275.  * PARAMETERS
  276.  *  msgPtr      [?]     
  277.  * RETURNS
  278.  *  void
  279.  *****************************************************************************/
  280. void SATSendDTMFInd(void *msgPtr)
  281. {
  282.     /*----------------------------------------------------------------*/
  283.     /* Local Variables                                                */
  284.     /*----------------------------------------------------------------*/
  285.     mmi_sat_send_dtmf_ind_struct *sendDTMFInd;
  286.     /*----------------------------------------------------------------*/
  287.     /* Code Body                                                      */
  288.     /*----------------------------------------------------------------*/
  289.     gSATContext.guiBufferPointer = NULL;
  290.     sendDTMFInd = (mmi_sat_send_dtmf_ind_struct*) msgPtr;
  291.     FreeSendDTMF();
  292.     gSATContext.lastSATCmd = SAT_SEND_DTMF_CMD;
  293.     if (GetCurrentState() != CM_ACTIVE_STATE)
  294.     {
  295.         TerminalResponseSendDTMF(
  296.             SAT_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD,
  297.             SAT_NOT_IN_SPEECH_MODE,
  298.             sendDTMFInd->cmd_detail);
  299.         return;
  300.     }
  301.     gSATSendDTMF.dcsOfAlphaId = sendDTMFInd->dcs_of_alpha_id;
  302.     gSATSendDTMF.noAlphaId = sendDTMFInd->no_alpha_id;
  303.     gSATSendDTMF.stage1Res = 0;
  304.     if (sendDTMFInd->is_alpha_id_present)
  305.     {
  306.         if (gSATSendDTMF.noAlphaId)
  307.         {
  308.             gSATSendDTMF.alphaId = CovertStringForPlatform(
  309.                                        sendDTMFInd->alpha_id,
  310.                                        gSATSendDTMF.noAlphaId,
  311.                                        gSATSendDTMF.dcsOfAlphaId,
  312.                                        &gSATSendDTMF.noAlphaId);
  313.             gSATSendDTMF.informUser = 1;
  314.         }
  315.         else
  316.         {
  317.             gSATSendDTMF.informUser = 0;
  318.         }
  319.     }
  320.     else
  321.     {
  322.         gSATSendDTMF.noAlphaId = pfnUnicodeStrlen((PS8) (PU8) GetString(SAT_SEND_DTMF_STRING_ID)) * ENCODING_LENGTH;
  323.         gSATSendDTMF.alphaId = (PU8) OslMalloc(gSATSendDTMF.noAlphaId + ENCODING_LENGTH);
  324.         memcpy(
  325.             gSATSendDTMF.alphaId,
  326.             (PU8) GetString(SAT_SEND_DTMF_STRING_ID),
  327.             gSATSendDTMF.noAlphaId + ENCODING_LENGTH);
  328.         gSATSendDTMF.informUser = 1;
  329.     }
  330.     gSATSendDTMF.noDtmf = sendDTMFInd->no_dtmf;
  331.     gSATSendDTMF.dtmf = (PU8) OslMalloc(gSATSendDTMF.noDtmf * sizeof(U8) + 1);
  332.     memcpy(gSATSendDTMF.dtmf, sendDTMFInd->dtmf, gSATSendDTMF.noDtmf * sizeof(U8) + 1);
  333.     memcpy(gSATSendDTMF.cmdDetail, sendDTMFInd->cmd_detail, 5 * sizeof(U8));
  334. #ifdef __SAT_MMI_UNIT_TEST__
  335.     gSATSendDTMF.isIconAvailable = 1;
  336.     if (gSATSendDTMF.isIconAvailable)
  337.     {
  338.         gSATSendDTMF.iconInfo.iconId = 1;
  339.         gSATSendDTMF.iconInfo.iconAttr = SAT_ICON_NOT_SELF_EX;
  340.     }
  341. #else /* __SAT_MMI_UNIT_TEST__ */ 
  342.     gSATSendDTMF.isIconAvailable = sendDTMFInd->is_icon_available;
  343.     if (gSATSendDTMF.isIconAvailable)
  344.     {
  345.         gSATSendDTMF.iconInfo.iconId = sendDTMFInd->icon_info.icon_id;
  346.         gSATSendDTMF.iconInfo.iconAttr = sendDTMFInd->icon_info.icon_attr;
  347.     }
  348. #endif /* __SAT_MMI_UNIT_TEST__ */ 
  349.     if (gSATSendDTMF.isIconAvailable && gSATSendDTMF.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  350.     {
  351.         if (gSATSendDTMF.alphaId)
  352.         {
  353.             OslMfree(gSATSendDTMF.alphaId);
  354.         }
  355.         gSATSendDTMF.alphaId = NULL;
  356.         gSATSendDTMF.noAlphaId = 0;
  357.     }
  358.     if (gSATSendDTMF.informUser)
  359.     {
  360.         SATStopWaitTimer();
  361.         DeleteScreenIfPresent(SCR_ID_SAT_HISTORY);
  362.         if (GetExitScrnID() == SCR_ID_SAT_HISTORY)
  363.         {
  364.             ClearExitHandler();
  365.         }
  366.         gSATSendDTMF.passedConf = 0;
  367.         StartTimer(SAT_SEND_DTMF_TIMER, 1000, DisplayDTMFWindow); // GoToDTMFConformationScreen();
  368.     }
  369.     else
  370.     {
  371.         SATSendDTMFStage1Req();
  372.     }
  373. }
  374. #if 0
  375. /* under construction !*/
  376. /* under construction !*/
  377. /* under construction !*/
  378. /* under construction !*/
  379. /* under construction !*/
  380. /* under construction !*/
  381. /* under construction !*/
  382. /* under construction !*/
  383. /* under construction !*/
  384. /* under construction !*/
  385. /* under construction !*/
  386. /* under construction !*/
  387. /* under construction !*/
  388. /* under construction !*/
  389. /* under construction !*/
  390. /* under construction !*/
  391. /* under construction !*/
  392. /* under construction !*/
  393. /* under construction !*/
  394. /* under construction !*/
  395. /* under construction !*/
  396. /* under construction !*/
  397. /* under construction !*/
  398. /* under construction !*/
  399. /* under construction !*/
  400. /* under construction !*/
  401. /* under construction !*/
  402. /* under construction !*/
  403. /* under construction !*/
  404. /* under construction !*/
  405. /* under construction !*/
  406. /* under construction !*/
  407. /* under construction !*/
  408. /* under construction !*/
  409. /* under construction !*/
  410. /* under construction !*/
  411. /* under construction !*/
  412. /* under construction !*/
  413. /* under construction !*/
  414. /* under construction !*/
  415. #endif
  416. /*****************************************************************************
  417.  * FUNCTION
  418.  *  SATSendDTMFTerminalResponseExpire
  419.  * DESCRIPTION
  420.  *  
  421.  * PARAMETERS
  422.  *  void
  423.  * RETURNS
  424.  *  void
  425.  *****************************************************************************/
  426. void SATSendDTMFTerminalResponseExpire(void)
  427. {
  428.     /*----------------------------------------------------------------*/
  429.     /* Local Variables                                                */
  430.     /*----------------------------------------------------------------*/
  431.     /*----------------------------------------------------------------*/
  432.     /* Code Body                                                      */
  433.     /*----------------------------------------------------------------*/
  434.     TerminalResponseSendDTMF(SAT_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD, 0, gSATSendDTMF.cmdDetail);
  435.     ExitSATToIdle();
  436. }
  437. /*****************************************************************************
  438.  * FUNCTION
  439.  *  SATSendDTMFTerminalResponseUnable
  440.  * DESCRIPTION
  441.  *  
  442.  * PARAMETERS
  443.  *  void
  444.  * RETURNS
  445.  *  void
  446.  *****************************************************************************/
  447. void SATSendDTMFTerminalResponseUnable(void)
  448. {
  449.     /*----------------------------------------------------------------*/
  450.     /* Local Variables                                                */
  451.     /*----------------------------------------------------------------*/
  452.     /*----------------------------------------------------------------*/
  453.     /* Code Body                                                      */
  454.     /*----------------------------------------------------------------*/
  455.     TerminalResponseSendDTMF(SAT_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD, 0, gSATSendDTMF.cmdDetail);
  456.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  457. }
  458. /*****************************************************************************
  459.  * FUNCTION
  460.  *  SATSendDTMFStage1Req
  461.  * DESCRIPTION
  462.  *  Send SEND DTMF STAGE1 REQ
  463.  * PARAMETERS
  464.  *  void
  465.  *  sendDTMFInd(?)      [IN]        Pointer to recieved SATSENDDTMFIND struct from L4
  466.  * RETURNS
  467.  *  void
  468.  *****************************************************************************/
  469. void SATSendDTMFStage1Req(void)
  470. {
  471.     /*----------------------------------------------------------------*/
  472.     /* Local Variables                                                */
  473.     /*----------------------------------------------------------------*/
  474.     MYQUEUE *Message;
  475.     mmi_sat_send_dtmf_stage1_req_struct *dataPtr;
  476.     /*----------------------------------------------------------------*/
  477.     /* Code Body                                                      */
  478.     /*----------------------------------------------------------------*/
  479.     gSATSendDTMF.passedConf = 1;
  480.     gSATContext.gotStage1Rsp = 0;
  481. #if 0
  482. /* under construction !*/
  483. /* under construction !*/
  484. /* under construction !*/
  485. /* under construction !*/
  486. #endif /* 0 */
  487.     Message = ALLOCATE_ITM(MOD_MMI);
  488.     Message->oslSrcId = MOD_MMI;
  489.     Message->oslDestId = MOD_L4C;
  490.     Message->oslMsgId = PRT_MMI_SAT_SEND_DTMF_STAGE1_REQ;
  491.     dataPtr = (mmi_sat_send_dtmf_stage1_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_send_dtmf_stage1_req_struct));
  492.     dataPtr->no_digit = gSATSendDTMF.noDtmf;
  493.     if (dataPtr->no_digit <= MAX_CC_ADDR_BCD_LEN)
  494.     {
  495.         memcpy(dataPtr->dtmf_digit, gSATSendDTMF.dtmf, dataPtr->no_digit);
  496.     }
  497.     else
  498.     {
  499.         memcpy(dataPtr->dtmf_digit, gSATSendDTMF.dtmf, MAX_CC_ADDR_BCD_LEN);
  500.     }
  501.     Message->oslDataPtr = (oslParaType*) dataPtr;
  502.     Message->oslPeerBuffPtr = NULL;
  503.     SEND_MSG(Message);
  504. }
  505. /*****************************************************************************
  506.  * FUNCTION
  507.  *  DisplayDTMFWindow
  508.  * DESCRIPTION
  509.  *  Displays Sending DTMF Screen
  510.  * PARAMETERS
  511.  *  void
  512.  *  alphaId(?)      [IN]        Pointer to string to be displayed in Send DTMF Screen
  513.  * RETURNS
  514.  *  void
  515.  *****************************************************************************/
  516. void DisplayDTMFWindow(void)
  517. {
  518.     /*----------------------------------------------------------------*/
  519.     /* Local Variables                                                */
  520.     /*----------------------------------------------------------------*/
  521.     U8 *iconData = NULL;
  522.     /*----------------------------------------------------------------*/
  523.     /* Code Body                                                      */
  524.     /*----------------------------------------------------------------*/
  525.     if (gSATSendDTMF.isIconAvailable)
  526.     {
  527.         SATAddIconIDToList(gSATSendDTMF.iconInfo.iconId);
  528.     }
  529.     if (gSATSendDTMF.isIconAvailable)
  530.     {
  531.         if (!SATCheckAllIconGot())
  532.         {
  533.             SATGetIconCompleteCallBack = DisplayDTMFWindow;
  534.             SATGetIconDataToList();
  535.             return;
  536.         }
  537.     }
  538.     /* Get icon data first then play DTMF */
  539.     if (gSATSendDTMF.passedConf == 0)
  540.     {
  541.         /* press OK to send DTMF but not send the request yet */
  542.         SATSendDTMFStage1Req();
  543.     }
  544.     iconData = SATGetIconFromList(gSATSendDTMF.iconInfo.iconId);
  545.     gSATContext.exitCondition = &gSATSendDTMF.stage1Res;
  546.     EntryNewScreen(SCR_ID_SAT_SENDDTMF, SATGenericExitHandler, NULL, NULL);
  547.     SetIsInSATScreen();
  548.     gSATContext.historyFuncPtr = DisplayDTMFWindow;
  549.     ClearHighlightHandler();
  550.     ShowCategory151Screen(
  551.         0,
  552.         0,
  553.         0,
  554.         0,
  555.         STR_GLOBAL_BACK,
  556.         IMG_GLOBAL_BACK,
  557.         gSATSendDTMF.alphaId,
  558.         iconData,
  559.         gSATContext.guiBufferPointer);
  560.     SetRightSoftkeyFunction(SATSendDTMFAbortReq, KEY_EVENT_UP);
  561.     SetKeyHandler(SATSendDTMFAbortReq, KEY_END, KEY_EVENT_DOWN);
  562. }
  563. /*****************************************************************************
  564.  * FUNCTION
  565.  *  SATSendDTMFAbortReq
  566.  * DESCRIPTION
  567.  *  Send SEND DTMF Abort REQ
  568.  * PARAMETERS
  569.  *  void
  570.  * RETURNS
  571.  *  void
  572.  *****************************************************************************/
  573. void SATSendDTMFAbortReq(void)
  574. {
  575.     /*----------------------------------------------------------------*/
  576.     /* Local Variables                                                */
  577.     /*----------------------------------------------------------------*/
  578.     MYQUEUE *Message;
  579.     /*----------------------------------------------------------------*/
  580.     /* Code Body                                                      */
  581.     /*----------------------------------------------------------------*/
  582.     Message = ALLOCATE_ITM(MOD_MMI);
  583.     Message->oslSrcId = MOD_MMI;
  584.     Message->oslDestId = MOD_L4C;
  585.     Message->oslMsgId = PRT_MMI_SAT_ABORT_DTMF_REQ;
  586.     Message->oslDataPtr = NULL;
  587.     Message->oslPeerBuffPtr = NULL;
  588.     SEND_MSG(Message);
  589. }
  590. /*****************************************************************************
  591.  * FUNCTION
  592.  *  SATSendDTMFStage1Rsp
  593.  * DESCRIPTION
  594.  *  Protocol Handler for SEND DTMF STAGE 1 RES
  595.  * PARAMETERS
  596.  *  msgPtr      [IN]        Pointer to data from L4
  597.  * RETURNS
  598.  *  void
  599.  *****************************************************************************/
  600. void SATSendDTMFStage1Rsp(void *msgPtr)
  601. {
  602.     /*----------------------------------------------------------------*/
  603.     /* Local Variables                                                */
  604.     /*----------------------------------------------------------------*/
  605.     mmi_sat_send_dtmf_stage1_rsp_struct *sendDTMFStage1Res;
  606.     /*----------------------------------------------------------------*/
  607.     /* Code Body                                                      */
  608.     /*----------------------------------------------------------------*/
  609.     sendDTMFStage1Res = (mmi_sat_send_dtmf_stage1_rsp_struct*) msgPtr;
  610.     gSATSendDTMF.stage1Res = 1;
  611.     gSATContext.gotStage1Rsp = 1;
  612.     /* micha0714 */
  613.     if (gSATContext.lastSATCmd == SAT_NONE_CMD)
  614.     {
  615.         return;
  616.     }
  617.     TerminalResponseSendDTMF(sendDTMFStage1Res->terminal_res, (U8) sendDTMFStage1Res->cause, gSATSendDTMF.cmdDetail);
  618.     if (gSATSendDTMF.informUser)
  619.     {
  620.         if (sendDTMFStage1Res->terminal_res == SAT_CMD_PERFORMED_SUCCESSFULLY ||
  621.             sendDTMFStage1Res->terminal_res == SAT_CMD_PERFORMED_WITH_PARTIAL_COMPREHENSION ||
  622.             sendDTMFStage1Res->terminal_res == SAT_CMD_PERFORMED_WITH_MISSING_INFO)
  623.         {
  624.             SATPleaseWaitScreen(SAT_DTMF_SUCCESS_STRING_ID, 0);
  625.         }
  626.         else
  627.         {
  628.             SATPleaseWaitScreen(SAT_DTMF_ERROR_STRING_ID, 0);
  629.         }
  630.     }
  631.     /* diamond, 2005/05/16 Stage 1 response does't need to re-entry main menu */
  632. #if 0
  633. /* under construction !*/
  634. /* under construction !*/
  635. /* under construction !*/
  636. /* under construction !*/
  637. /* under construction !*/
  638. /* under construction !*/
  639. /* under construction !*/
  640. /* under construction !*/
  641. /* under construction !*/
  642. /* under construction !*/
  643. /* under construction !*/
  644. /* under construction !*/
  645. /* under construction !*/
  646. #endif /* 0 */ 
  647. }
  648. /*****************************************************************************
  649.  * FUNCTION
  650.  *  TerminalResponseSendDTMF
  651.  * DESCRIPTION
  652.  *  Send SEND DTMF STAGE2 REQ to L4
  653.  * PARAMETERS
  654.  *  res             [IN]        
  655.  *  addInfo         [IN]        
  656.  *  cmdDetail       [IN]        Cmd detail to be sent
  657.  *  Res(?)          [IN]        Response type
  658.  *  cause(?)        [IN]        Returned in SEND DTMF STAGE 1 RES
  659.  * RETURNS
  660.  *  void
  661.  *****************************************************************************/
  662. void TerminalResponseSendDTMF(U8 res, U8 addInfo, U8 *cmdDetail)
  663. {
  664.     /*----------------------------------------------------------------*/
  665.     /* Local Variables                                                */
  666.     /*----------------------------------------------------------------*/
  667.     MYQUEUE *Message;
  668.     mmi_sat_send_dtmf_stage2_req_struct *dataPtr;
  669.     /*----------------------------------------------------------------*/
  670.     /* Code Body                                                      */
  671.     /*----------------------------------------------------------------*/
  672.     gSATSendDTMF.passedConf = 1;
  673.     Message = ALLOCATE_ITM(MOD_MMI);
  674.     Message->oslSrcId = MOD_MMI;
  675.     Message->oslDestId = MOD_L4C;
  676.     Message->oslMsgId = PRT_MMI_SAT_SEND_DTMF_STAGE2_REQ;
  677.     dataPtr = (mmi_sat_send_dtmf_stage2_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_send_dtmf_stage2_req_struct));
  678.     /* diamond, 2005/05/24 icon */
  679.     if (res == SAT_CMD_PERFORMED_SUCCESSFULLY && gSATSendDTMF.isIconAvailable == 1 &&
  680.         gSATContext.isCMDIconSupported == MMI_FALSE)
  681.     {
  682.         dataPtr->res = SAT_CMD_PERFORMED_BUT_ICON_COULD_NOT_DSPL;
  683.     }
  684.     else
  685.     {
  686.         /* end, diamond */
  687.         dataPtr->res = res;
  688.     }
  689.     dataPtr->additional_info = addInfo;
  690.     memcpy(dataPtr->cmd_detail, cmdDetail, 5 * sizeof(U8));
  691.     Message->oslDataPtr = (oslParaType*) dataPtr;
  692.     Message->oslPeerBuffPtr = NULL;
  693.     SEND_MSG(Message);
  694.     gSATContext.lastSATCmd = SAT_NONE_CMD;
  695. }
  696. /*****************************************************************************
  697.  * FUNCTION
  698.  *  SATSendDTMFStage2Rsp
  699.  * DESCRIPTION
  700.  *  Protocol Handler for SEND DTMF STAGE 2 RES
  701.  * PARAMETERS
  702.  *  msgPtr      [IN]        Pointer to data from L4
  703.  * RETURNS
  704.  *  void
  705.  *****************************************************************************/
  706. void SATSendDTMFStage2Rsp(void *msgPtr)
  707. {
  708.     /*----------------------------------------------------------------*/
  709.     /* Local Variables                                                */
  710.     /*----------------------------------------------------------------*/
  711.     /*----------------------------------------------------------------*/
  712.     /* Code Body                                                      */
  713.     /*----------------------------------------------------------------*/
  714.     FreeSendDTMF();
  715. }
  716. /*****************************************************************************
  717.  * FUNCTION
  718.  *  FreeSendDTMF
  719.  * DESCRIPTION
  720.  *  Frees various elements of Send DTMF Structure
  721.  * PARAMETERS
  722.  *  void
  723.  * RETURNS
  724.  *  void
  725.  *****************************************************************************/
  726. void FreeSendDTMF(void)
  727. {
  728.     /*----------------------------------------------------------------*/
  729.     /* Local Variables                                                */
  730.     /*----------------------------------------------------------------*/
  731.     /*----------------------------------------------------------------*/
  732.     /* Code Body                                                      */
  733.     /*----------------------------------------------------------------*/
  734.     SATClearAllIcons();
  735.     /* micha1008 */
  736.     if (gSATSendDTMF.alphaId)
  737.     {
  738.         OslMfree(gSATSendDTMF.alphaId);
  739.     }
  740.     gSATSendDTMF.noAlphaId = 0;
  741.     gSATSendDTMF.alphaId = NULL;
  742.     if (gSATSendDTMF.dtmf)
  743.     {
  744.         OslMfree(gSATSendDTMF.dtmf);
  745.     }
  746.     gSATSendDTMF.noDtmf = 0;
  747.     gSATSendDTMF.dtmf = NULL;
  748. }
  749. /*****************************************************************************
  750.  * FUNCTION
  751.  *  SATSetupIdleDisplayInd
  752.  * DESCRIPTION
  753.  *  
  754.  * PARAMETERS
  755.  *  msgPtr      [?]     
  756.  * RETURNS
  757.  *  void
  758.  *****************************************************************************/
  759. /* micha1016 */
  760. void SATSetupIdleDisplayInd(void *msgPtr)
  761. {
  762.     /*----------------------------------------------------------------*/
  763.     /* Local Variables                                                */
  764.     /*----------------------------------------------------------------*/
  765.     mmi_sat_setup_idle_display_ind_struct *setupIdleDisplayInd;
  766.     /*----------------------------------------------------------------*/
  767.     /* Code Body                                                      */
  768.     /*----------------------------------------------------------------*/
  769.     setupIdleDisplayInd = (mmi_sat_setup_idle_display_ind_struct*) msgPtr;
  770.     if (setupIdleDisplayInd->is_icon_available && !setupIdleDisplayInd->no_text_string)
  771.     {
  772.         TerminalResponseSetupIdleDisplay(SAT_CMD_DATA_NOT_UNDERSTAND_BY_ME, setupIdleDisplayInd->cmd_detail);
  773.         return;
  774.     }
  775.     if (gSATContext.idleTextPtr != NULL)
  776.     {
  777.         OslMfree(gSATContext.idleTextPtr);
  778.         gSATContext.idleTextPtr = NULL;
  779.     }
  780.     if (gSATContext.idleIconPtr != NULL)
  781.     {
  782.         OslMfree(gSATContext.idleIconPtr);
  783.         gSATContext.idleIconPtr = NULL;
  784.     }
  785.     memcpy(gSATDisplayIdleText.cmdDetail, (void*)setupIdleDisplayInd->cmd_detail, 5 * sizeof(U8));
  786.     gSATDisplayIdleText.noTextString = setupIdleDisplayInd->no_text_string;
  787.     gSATDisplayIdleText.dcsOfTextString = setupIdleDisplayInd->dcs_of_text_string;
  788.     /* micha0418, spec 12.15,  always gsm default encoding */
  789.     if (gSATDisplayIdleText.dcsOfTextString == MMI_8BIT_DCS)
  790.     {
  791.         gSATDisplayIdleText.dcsOfTextString = MMI_DEFAULT_DCS;
  792.     }
  793.     if (gSATDisplayIdleText.noTextString)
  794.     {
  795.         gSATDisplayIdleText.textString = CovertStringForPlatform(
  796.                                             setupIdleDisplayInd->text_string,
  797.                                             setupIdleDisplayInd->no_text_string,
  798.                                             gSATDisplayIdleText.dcsOfTextString,
  799.                                             &setupIdleDisplayInd->no_text_string);
  800.     }
  801.     else
  802.     {
  803.         if (g_idle_context.IsOnIdleScreen)
  804.         {
  805.             EntryIdleScreen();
  806.         }
  807.         TerminalResponseSetupIdleDisplay(SAT_CMD_PERFORMED_SUCCESSFULLY, gSATDisplayIdleText.cmdDetail);
  808.         SATClearAllIcons();
  809.         return;
  810.     }
  811.     gSATDisplayIdleText.isIconAvailable = setupIdleDisplayInd->is_icon_available;
  812.     if (gSATDisplayIdleText.isIconAvailable)
  813.     {
  814.         gSATDisplayIdleText.iconInfo.iconId = setupIdleDisplayInd->icon_info.icon_id;
  815.         gSATDisplayIdleText.iconInfo.iconAttr = setupIdleDisplayInd->icon_info.icon_attr;
  816.     }
  817.     GoToSATSetupIdleDisplay();
  818. }
  819. #ifdef __SAT_MMI_UNIT_TEST__
  820. /*****************************************************************************
  821.  * FUNCTION
  822.  *  SATSetupIdleDisplayTest
  823.  * DESCRIPTION
  824.  *  
  825.  * PARAMETERS
  826.  *  void
  827.  * RETURNS
  828.  *  void
  829.  *****************************************************************************/
  830. void SATSetupIdleDisplayTest(void)
  831. {
  832.     /*----------------------------------------------------------------*/
  833.     /* Local Variables                                                */
  834.     /*----------------------------------------------------------------*/
  835.     U8 test_string[] = "micha test";
  836.     /*----------------------------------------------------------------*/
  837.     /* Code Body                                                      */
  838.     /*----------------------------------------------------------------*/
  839.     if (gSATContext.idleTextPtr != NULL)
  840.     {
  841.         OslMfree(gSATContext.idleTextPtr);
  842.         gSATContext.idleTextPtr = NULL;
  843.     }
  844.     if (gSATContext.idleIconPtr != NULL)
  845.     {
  846.         OslMfree(gSATContext.idleIconPtr);
  847.         gSATContext.idleIconPtr = NULL;
  848.     }
  849.     gSATDisplayIdleText.noTextString = 10;
  850.     gSATDisplayIdleText.dcsOfTextString = 0;
  851.     if (gSATDisplayIdleText.noTextString)
  852.     {
  853.         gSATDisplayIdleText.textString = CovertStringForPlatform(
  854.                                             test_string,
  855.                                             gSATDisplayIdleText.noTextString,
  856.                                             gSATDisplayIdleText.dcsOfTextString,
  857.                                             &gSATDisplayIdleText.noTextString);
  858.     }
  859.     else
  860.     {
  861.         if (g_idle_context.IsOnIdleScreen)
  862.         {
  863.             EntryIdleScreen();
  864.         }
  865.         /* TerminalResponseSetupIdleDisplay(SAT_CMD_PERFORMED_SUCCESSFULLY, gSATDisplayIdleText.cmdDetail); */
  866.         SATClearAllIcons();
  867.         return;
  868.     }
  869.     gSATDisplayIdleText.isIconAvailable = 1;
  870.     if (gSATDisplayIdleText.isIconAvailable)
  871.     {
  872.         gSATDisplayIdleText.iconInfo.iconId = 2;
  873.         gSATDisplayIdleText.iconInfo.iconAttr = 1;
  874.     }
  875.     GoToSATSetupIdleDisplay();
  876. }
  877. #endif /* __SAT_MMI_UNIT_TEST__ */ 
  878. /*****************************************************************************
  879.  * FUNCTION
  880.  *  GoToSATSetupIdleDisplay
  881.  * DESCRIPTION
  882.  *  
  883.  * PARAMETERS
  884.  *  void
  885.  * RETURNS
  886.  *  void
  887.  *****************************************************************************/
  888. void GoToSATSetupIdleDisplay(void)
  889. {
  890.     /*----------------------------------------------------------------*/
  891.     /* Local Variables                                                */
  892.     /*----------------------------------------------------------------*/
  893.     U8 *iconData = NULL;
  894.     U32 iconSize;
  895.     /*----------------------------------------------------------------*/
  896.     /* Code Body                                                      */
  897.     /*----------------------------------------------------------------*/
  898.     if (gSATDisplayIdleText.isIconAvailable)
  899.     {
  900.         SATAddIconIDToList(gSATDisplayIdleText.iconInfo.iconId);
  901.     }
  902.     if (gSATDisplayIdleText.isIconAvailable)
  903.     {
  904.         if (!SATCheckAllIconGot())
  905.         {
  906.             SATGetIconCompleteCallBack = GoToSATSetupIdleDisplay;
  907.             SATGetIconDataToList();
  908.             return;
  909.         }
  910.     }
  911.     if (gSATDisplayIdleText.noTextString < 300)
  912.     {
  913.         gSATContext.idleTextPtr = OslMalloc(sizeof(U8) * gSATDisplayIdleText.noTextString * ENCODING_LENGTH + 4);
  914.         memset(gSATContext.idleTextPtr, 0, gSATDisplayIdleText.noTextString * ENCODING_LENGTH + 4);
  915.         pfnUnicodeStrcpy((PS8) gSATContext.idleTextPtr, (PS8) gSATDisplayIdleText.textString);
  916.     }
  917.     else
  918.     {
  919.         TerminalResponseSetupIdleDisplay(SAT_ME_CURRENTLY_UNABLE_TO_PROCESS_CMD, gSATDisplayIdleText.cmdDetail);
  920.         return;
  921.     }
  922.     if (gSATDisplayIdleText.isIconAvailable)
  923.     {
  924.         iconData = SATGetIconFromList(gSATDisplayIdleText.iconInfo.iconId);
  925.         if (iconData != NULL)
  926.         {
  927.             iconSize =
  928.                 (U32) iconData[2] + (((U32) iconData[3]) << 8) + (((U32) iconData[4]) << 16) + (((U32) iconData[5]) << 24) +
  929.                 20;
  930.             gSATContext.idleIconPtr = OslMalloc(sizeof(U8) * iconSize);
  931.             memcpy(gSATContext.idleIconPtr, iconData, iconSize);
  932.         }
  933.     }
  934.     if (gSATDisplayIdleText.isIconAvailable && gSATDisplayIdleText.iconInfo.iconAttr == SAT_ICON_SELF_EX && iconData != NULL)
  935.     {
  936.         if (gSATContext.idleTextPtr)
  937.         {
  938.             OslMfree(gSATContext.idleTextPtr);
  939.         }
  940.         gSATContext.idleTextPtr = NULL;
  941.     }
  942.     if (g_idle_context.IsOnIdleScreen)
  943.     {
  944.         EntryIdleScreen();
  945.     }
  946. #ifndef __SAT_MMI_UNIT_TEST__
  947.     TerminalResponseSetupIdleDisplay(SAT_CMD_PERFORMED_SUCCESSFULLY, gSATDisplayIdleText.cmdDetail);
  948. #endif 
  949.     if (gSATDisplayIdleText.textString)
  950.     {
  951.         OslMfree(gSATDisplayIdleText.textString);
  952.         gSATDisplayIdleText.textString = NULL;
  953.     }
  954.     SATClearAllIcons();
  955. }
  956. /*****************************************************************************
  957.  * FUNCTION
  958.  *  TerminalResponseSetupIdleDisplay
  959.  * DESCRIPTION
  960.  *  
  961.  * PARAMETERS
  962.  *  res             [IN]        
  963.  *  cmdDetail       [?]         
  964.  * RETURNS
  965.  *  void
  966.  *****************************************************************************/
  967. void TerminalResponseSetupIdleDisplay(U8 res, U8 *cmdDetail)
  968. {
  969.     /*----------------------------------------------------------------*/
  970.     /* Local Variables                                                */
  971.     /*----------------------------------------------------------------*/
  972.     MYQUEUE *Message;
  973.     mmi_sat_setup_idle_display_res_req_struct *dataPtr;
  974.     /*----------------------------------------------------------------*/
  975.     /* Code Body                                                      */
  976.     /*----------------------------------------------------------------*/
  977.     Message = ALLOCATE_ITM(MOD_MMI);
  978.     Message->oslSrcId = MOD_MMI;
  979.     Message->oslDestId = MOD_L4C;
  980.     Message->oslMsgId = PRT_MMI_SAT_SETUP_IDLE_DISPLAY_RES_REQ;
  981.     dataPtr =
  982.         (mmi_sat_setup_idle_display_res_req_struct*)
  983.         OslConstructDataPtr(sizeof(mmi_sat_setup_idle_display_res_req_struct));
  984.     /* diamond, 2005/05/24 icon */
  985.     if (res == SAT_CMD_PERFORMED_SUCCESSFULLY && gSATDisplayIdleText.isIconAvailable == 1 && gSATContext.isCMDIconSupported == MMI_FALSE)
  986.     {
  987.         dataPtr->res = SAT_CMD_PERFORMED_BUT_ICON_COULD_NOT_DSPL;
  988.     }
  989.     else
  990.     {
  991.         /* end, diamond */
  992.         dataPtr->res = res;
  993.     }
  994.     memcpy(dataPtr->cmd_detail, cmdDetail, 5 * sizeof(U8));
  995.     Message->oslDataPtr = (oslParaType*) dataPtr;
  996.     Message->oslPeerBuffPtr = NULL;
  997.     SEND_MSG(Message);
  998. }
  999. /*****************************************************************************
  1000.  * FUNCTION
  1001.  *  SATRunATCommandInd
  1002.  * DESCRIPTION
  1003.  *  
  1004.  * PARAMETERS
  1005.  *  msgPtr      [?]     
  1006.  * RETURNS
  1007.  *  void
  1008.  *****************************************************************************/
  1009. void SATRunATCommandInd(void *msgPtr)
  1010. {
  1011.     /*----------------------------------------------------------------*/
  1012.     /* Local Variables                                                */
  1013.     /*----------------------------------------------------------------*/
  1014.     mmi_sat_run_at_command_ind_struct *displayATCommand;
  1015.     /*----------------------------------------------------------------*/
  1016.     /* Code Body                                                      */
  1017.     /*----------------------------------------------------------------*/
  1018.     displayATCommand = (mmi_sat_run_at_command_ind_struct*) msgPtr;
  1019.     if ((GetCurrentState() == CM_OUTGOING_STATE) || (GetCurrentState() == CM_INCOMING_STATE))
  1020.     {
  1021.         return;
  1022.     }
  1023.     SATClearAllIcons();
  1024.     if (gSATRunATCommand.alphaID)
  1025.     {
  1026.         OslMfree(gSATRunATCommand.alphaID);
  1027.         gSATRunATCommand.alphaID = NULL;
  1028.     }
  1029.     memcpy(gSATRunATCommand.cmdDetail, (void*)displayATCommand->cmd_detail, 5 * sizeof(U8));
  1030.     gSATRunATCommand.isIconAvailable = displayATCommand->is_icon_available;
  1031.     if (gSATRunATCommand.isIconAvailable)
  1032.     {
  1033.         gSATRunATCommand.iconInfo.iconId = displayATCommand->icon_info.icon_id;
  1034.         gSATRunATCommand.iconInfo.iconAttr = displayATCommand->icon_info.icon_attr;
  1035.     }
  1036.     gSATRunATCommand.noAlphaId = displayATCommand->no_alpha_id;
  1037.     gSATRunATCommand.isAlphaIdPresent = displayATCommand->is_alpha_id_present;
  1038.     gSATRunATCommand.dcsOfAlphaId = displayATCommand->dcs_of_alpha_id;
  1039.     if (gSATRunATCommand.isAlphaIdPresent)
  1040.     {
  1041.         if (gSATRunATCommand.noAlphaId)
  1042.         {
  1043.             gSATRunATCommand.alphaID = CovertStringForPlatform(
  1044.                                         displayATCommand->alpha_id,
  1045.                                         gSATRunATCommand.noAlphaId,
  1046.                                         gSATRunATCommand.dcsOfAlphaId,
  1047.                                         &gSATRunATCommand.noAlphaId);
  1048.             gSATRunATCommand.informUser = 1;
  1049.         }
  1050.         else
  1051.         {
  1052.             gSATRunATCommand.informUser = 0;
  1053.         }
  1054.     }
  1055.     else
  1056.     {
  1057.         gSATRunATCommand.informUser = 0;
  1058.     }
  1059.     if (gSATRunATCommand.isIconAvailable && gSATRunATCommand.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  1060.     {
  1061.         if (gSATRunATCommand.alphaID)
  1062.         {
  1063.             OslMfree(gSATRunATCommand.alphaID);
  1064.         }
  1065.         gSATRunATCommand.alphaID = NULL;
  1066.         gSATRunATCommand.noAlphaId = 0;
  1067.     }
  1068.     if (gSATRunATCommand.informUser)
  1069.     {
  1070.         SATStopWaitTimer();
  1071.         DeleteScreenIfPresent(SCR_ID_SAT_HISTORY);
  1072.         if (GetExitScrnID() == SCR_ID_SAT_HISTORY)
  1073.         {
  1074.             ClearExitHandler();
  1075.         }
  1076.         DisplayATCommandScreen();
  1077.     }
  1078.     else
  1079.     {
  1080.         if (gSATRunATCommand.alphaID)
  1081.         {
  1082.             OslMfree(gSATRunATCommand.alphaID);
  1083.             gSATRunATCommand.alphaID = NULL;
  1084.         }
  1085.     }
  1086. }
  1087. /*****************************************************************************
  1088.  * FUNCTION
  1089.  *  DisplayATCommandScreen
  1090.  * DESCRIPTION
  1091.  *  
  1092.  * PARAMETERS
  1093.  *  void
  1094.  * RETURNS
  1095.  *  void
  1096.  *****************************************************************************/
  1097. void DisplayATCommandScreen(void)
  1098. {
  1099.     /*----------------------------------------------------------------*/
  1100.     /* Local Variables                                                */
  1101.     /*----------------------------------------------------------------*/
  1102.     U8 *iconData = NULL;
  1103.     /*----------------------------------------------------------------*/
  1104.     /* Code Body                                                      */
  1105.     /*----------------------------------------------------------------*/
  1106.     if (gSATRunATCommand.isIconAvailable)
  1107.     {
  1108.         SATAddIconIDToList(gSATRunATCommand.iconInfo.iconId);
  1109.     }
  1110.     if (gSATRunATCommand.isIconAvailable)
  1111.     {
  1112.         if (!SATCheckAllIconGot())
  1113.         {
  1114.             SATGetIconCompleteCallBack = DisplayATCommandScreen;
  1115.             SATGetIconDataToList();
  1116.             return;
  1117.         }
  1118.     }
  1119.     iconData = SATGetIconFromList(gSATRunATCommand.iconInfo.iconId);
  1120.     EntryNewScreen(SCR_ID_SAT_SEND_AT_CMD, ExitDisplayATCommandScreen, NULL, NULL);
  1121.     ShowCategory151Screen(0, 0, 0, 0, 0, 0, gSATRunATCommand.alphaID, iconData, NULL);
  1122.     StartTimer(POPUP_TIMER, 1000, DisplayATCommandTimerOver);
  1123. }
  1124. /*****************************************************************************
  1125.  * FUNCTION
  1126.  *  ExitDisplayATCommandScreen
  1127.  * DESCRIPTION
  1128.  *  
  1129.  * PARAMETERS
  1130.  *  void
  1131.  * RETURNS
  1132.  *  void
  1133.  *****************************************************************************/
  1134. void ExitDisplayATCommandScreen(void)
  1135. {
  1136.     /*----------------------------------------------------------------*/
  1137.     /* Local Variables                                                */
  1138.     /*----------------------------------------------------------------*/
  1139.     /*----------------------------------------------------------------*/
  1140.     /* Code Body                                                      */
  1141.     /*----------------------------------------------------------------*/
  1142.     if (gSATRunATCommand.alphaID)
  1143.     {
  1144.         OslMfree(gSATRunATCommand.alphaID);
  1145.         gSATRunATCommand.alphaID = NULL;
  1146.     }
  1147.     SATClearAllIcons();
  1148.     StopTimer(POPUP_TIMER);
  1149. }
  1150. /*****************************************************************************
  1151.  * FUNCTION
  1152.  *  DisplayATCommandTimerOver
  1153.  * DESCRIPTION
  1154.  *  
  1155.  * PARAMETERS
  1156.  *  void
  1157.  * RETURNS
  1158.  *  void
  1159.  *****************************************************************************/
  1160. void DisplayATCommandTimerOver(void)
  1161. {
  1162.     /*----------------------------------------------------------------*/
  1163.     /* Local Variables                                                */
  1164.     /*----------------------------------------------------------------*/
  1165.     /*----------------------------------------------------------------*/
  1166.     /* Code Body                                                      */
  1167.     /*----------------------------------------------------------------*/
  1168.     StopTimer(POPUP_TIMER);
  1169.     if (gSATRunATCommand.alphaID)
  1170.     {
  1171.         OslMfree(gSATRunATCommand.alphaID);
  1172.         gSATRunATCommand.alphaID = NULL;
  1173.     }
  1174.     SATClearAllIcons();
  1175.     GoBackHistory();
  1176. }
  1177. /*****************************************************************************
  1178.  * FUNCTION
  1179.  *  SATGenericExitHandler
  1180.  * DESCRIPTION
  1181.  *  
  1182.  * PARAMETERS
  1183.  *  void
  1184.  * RETURNS
  1185.  *  void
  1186.  *****************************************************************************/
  1187. void SATGenericExitHandler(void)
  1188. {
  1189.     /*----------------------------------------------------------------*/
  1190.     /* Local Variables                                                */
  1191.     /*----------------------------------------------------------------*/
  1192.     /*----------------------------------------------------------------*/
  1193.     /* Code Body                                                      */
  1194.     /*----------------------------------------------------------------*/
  1195.     /* diamond, 2005/07/22 GET INPUT numeric input without 'p' and 'w' */
  1196.     MMI_current_input_ext_type &= ~INPUT_TYPE_EXT_SIM_NUMERIC;
  1197. #ifdef __MMI_SAT_DISPLAY_TEXT_WITH_KEYPAD_LOCK__
  1198.     if (gSATContext.idleSATCmd)
  1199.     {
  1200.         PRINT_INFORMATION(("[SAT] NOT save SAT screen to the history"));
  1201.     }
  1202.     else
  1203. #endif
  1204.     if (!(*gSATContext.exitCondition))
  1205.     {
  1206.         PRINT_INFORMATION(("[SAT] save SAT screen to the history"));
  1207.         SATSaveHistory();
  1208.     }
  1209.     else
  1210.     {
  1211.         PRINT_INFORMATION(("[SAT] NOT save SAT screen to the history"));
  1212.     }
  1213. }
  1214. /* micha0125 begin */
  1215. /*****************************************************************************
  1216.  * FUNCTION
  1217.  *  SATScrKeyHandler
  1218.  * DESCRIPTION
  1219.  *  
  1220.  * PARAMETERS
  1221.  *  eventKey        [?]     
  1222.  * RETURNS
  1223.  *  void
  1224.  *****************************************************************************/
  1225. U8 SATScrKeyHandler(KEYBRD_MESSAGE *eventKey)
  1226. {
  1227. #ifdef __USAT__
  1228.     /*----------------------------------------------------------------*/
  1229.     /* Local Variables                                                */
  1230.     /*----------------------------------------------------------------*/
  1231.     /*----------------------------------------------------------------*/
  1232.     /* Code Body                                                      */
  1233.     /*----------------------------------------------------------------*/
  1234.     if ((gSATContext.lastSATCmd == SAT_DISPLAY_TEXT_CMD && gSATDisplayText.clearTextType == SAT_CLEAR_AFTER_DELAY)
  1235.         || (gSATContext.lastSATCmd == SAT_DISPLAY_TEXT_CMD && gSATDisplayText.duration != 0)
  1236.         || (gSATContext.lastSATCmd == SAT_DISPLAY_TEXT_CMD && gSATDisplayText.duration != 0))
  1237.     {
  1238.         return MMI_TRUE;    /* not need to restart timer in these cases */
  1239.     }
  1240. #endif /* __USAT__ */ 
  1241.     if (eventKey->nMsgType == KEY_EVENT_DOWN)
  1242.     {
  1243.         TemporaryStopSATTimerNoResponsefromUser();
  1244.         TemporaryStopSATTimerHelp();
  1245.     }
  1246.     if (eventKey->nMsgType == KEY_EVENT_UP)
  1247.     {
  1248.         RestartSATTimerNoResponsefromUser();
  1249.         RestartSATTimerHelp();
  1250.     }
  1251.     return (MMI_TRUE);
  1252. }
  1253. /*****************************************************************************
  1254.  * FUNCTION
  1255.  *  SetIsInSATScreen
  1256.  * DESCRIPTION
  1257.  *  
  1258.  * PARAMETERS
  1259.  *  void
  1260.  * RETURNS
  1261.  *  void
  1262.  *****************************************************************************/
  1263. void SetIsInSATScreen(void)
  1264. {
  1265.     /*----------------------------------------------------------------*/
  1266.     /* Local Variables                                                */
  1267.     /*----------------------------------------------------------------*/
  1268.     /*----------------------------------------------------------------*/
  1269.     /* Code Body                                                      */
  1270.     /*----------------------------------------------------------------*/
  1271.     PRINT_INFORMATION(("[SAT] set in SAT screen"));
  1272.     gSATContext.isInSATScreen = 1;
  1273.     mmi_frm_kbd_reg_pre_key_hdlr(SATScrKeyHandler);
  1274. }
  1275. /*****************************************************************************
  1276.  * FUNCTION
  1277.  *  ClearIsInSATScreen
  1278.  * DESCRIPTION
  1279.  *  
  1280.  * PARAMETERS
  1281.  *  void
  1282.  * RETURNS
  1283.  *  void
  1284.  *****************************************************************************/
  1285. void ClearIsInSATScreen(void)
  1286. {
  1287.     /*----------------------------------------------------------------*/
  1288.     /* Local Variables                                                */
  1289.     /*----------------------------------------------------------------*/
  1290.     /*----------------------------------------------------------------*/
  1291.     /* Code Body                                                      */
  1292.     /*----------------------------------------------------------------*/
  1293.     PRINT_INFORMATION(("[SAT] clear in SAT screen"));
  1294.     gSATContext.isInSATScreen = 0;
  1295.     mmi_frm_kbd_reg_pre_key_hdlr(NULL);
  1296. }
  1297. /* micha0125 end */
  1298. #ifdef __SATCE__
  1299. /*****************************************************************************
  1300.  * FUNCTION
  1301.  *  SATOpenChannelInd
  1302.  * DESCRIPTION
  1303.  *  
  1304.  * PARAMETERS
  1305.  *  msgPtr      [?]     
  1306.  * RETURNS
  1307.  *  void
  1308.  *****************************************************************************/
  1309. void SATOpenChannelInd(void *msgPtr)
  1310. {
  1311.     /*----------------------------------------------------------------*/
  1312.     /* Local Variables                                                */
  1313.     /*----------------------------------------------------------------*/
  1314.     mmi_sat_open_channel_ind_struct *openChannelInd;
  1315.     /*----------------------------------------------------------------*/
  1316.     /* Code Body                                                      */
  1317.     /*----------------------------------------------------------------*/
  1318.     guiBufferPointer = NULL;
  1319.     openChannelInd = (mmi_sat_open_channel_ind_struct*) msgPtr;
  1320.     FreeOpenChannel();
  1321.     satOpenChannel.Stage1Res = 0;
  1322.     satOpenChannel.dcsOfAlphaId = openChannelInd->dcs_of_alpha_id;
  1323.     satOpenChannel.noAlphaId = openChannelInd->no_alpha_id;
  1324.     if (openChannelInd->is_alpha_id_present)
  1325.     {
  1326.         if (satOpenChannel.noAlphaId)
  1327.         {
  1328.             satOpenChannel.alphaID = CovertStringForPlatform(
  1329.                                         openChannelInd->alpha_id,
  1330.                                         satOpenChannel.noAlphaId,
  1331.                                         satOpenChannel.dcsOfAlphaId,
  1332.                                         &satOpenChannel.noAlphaId);
  1333.             satOpenChannel.informUser = 1;
  1334.         }
  1335.         else
  1336.         {
  1337.             satOpenChannel.informUser = 0;
  1338.         }
  1339.     }
  1340.     else
  1341.     {
  1342.         satOpenChannel.noAlphaId = pfnUnicodeStrlen((PS8) (PU8) GetString(SAT_OPEN_CHANNEL_CONF_STRING_ID)) * ENCODING_LENGTH;
  1343.         satOpenChannel.alphaID = (PU8) OslMalloc(satOpenChannel.noAlphaId + ENCODING_LENGTH);
  1344.         memcpy(
  1345.             satOpenChannel.alphaID,
  1346.             (PU8) GetString(SAT_OPEN_CHANNEL_CONF_STRING_ID),
  1347.             satOpenChannel.noAlphaId + ENCODING_LENGTH);
  1348.         satOpenChannel.informUser = 1;
  1349.     }
  1350.     memcpy(satOpenChannel.cmdDetail, openChannelInd->cmd_detail, 5 * sizeof(U8));
  1351.     satOpenChannel.isIconAvailable = openChannelInd->is_icon_available;
  1352.     if (satOpenChannel.isIconAvailable)
  1353.     {
  1354.         satOpenChannel.iconInfo.iconId = openChannelInd->icon_info.icon_id;
  1355.         satOpenChannel.iconInfo.iconAttr = openChannelInd->icon_info.icon_attr;
  1356.     }
  1357.     if (satOpenChannel.isIconAvailable && satOpenChannel.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  1358.     {
  1359.         if (satOpenChannel.alphaID)
  1360.         {
  1361.             OslMfree(satOpenChannel.alphaID);
  1362.         }
  1363.         satOpenChannel.alphaID = NULL;
  1364.         satOpenChannel.noAlphaId = 0;
  1365.     }
  1366.     if (satOpenChannel.informUser)
  1367.     {
  1368.         SATStopWaitTimer();
  1369.         DeleteScreenIfPresent(SCR_ID_SAT_HISTORY);
  1370.         if (GetExitScrnID() == SCR_ID_SAT_HISTORY)
  1371.         {
  1372.             ClearExitHandler();
  1373.         }
  1374.         GoToOpenChannelConformationScreen();
  1375.     }
  1376.     else
  1377.     {
  1378.         SATOpenChannelReq();
  1379.     }
  1380. }
  1381. /*****************************************************************************
  1382.  * FUNCTION
  1383.  *  GoToOpenChannelConformationScreen
  1384.  * DESCRIPTION
  1385.  *  
  1386.  * PARAMETERS
  1387.  *  void
  1388.  * RETURNS
  1389.  *  void
  1390.  *****************************************************************************/
  1391. void GoToOpenChannelConformationScreen(void)
  1392. {
  1393.     /*----------------------------------------------------------------*/
  1394.     /* Local Variables                                                */
  1395.     /*----------------------------------------------------------------*/
  1396.     U8 *iconData = NULL;
  1397.     /*----------------------------------------------------------------*/
  1398.     /* Code Body                                                      */
  1399.     /*----------------------------------------------------------------*/
  1400.     if (satOpenChannel.isIconAvailable)
  1401.     {
  1402.         SATAddIconIDToList(satOpenChannel.iconInfo.iconId);
  1403.     }
  1404.     if (satOpenChannel.isIconAvailable)
  1405.     {
  1406.         if (!SATCheckAllIconGot())
  1407.         {
  1408.             SATGetIconCompleteCallBack = GoToOpenChannelConformationScreen;
  1409.             SATGetIconDataToList();
  1410.             return;
  1411.         }
  1412.     }
  1413.     iconData = SATGetIconFromList(satOpenChannel.iconInfo.iconId);
  1414.     gSATContext.exitCondition = &satOpenChannel.Stage1Res;
  1415.     EntryNewScreen(SAT_OPEN_CHANNEL_CONF_SCREENID, SATGenericExitHandler, NULL, NULL);
  1416.     SetIsInSATScreen();
  1417.     gSATContext.historyFuncPtr = GoToOpenChannelConformationScreen;
  1418.     ClearHighlightHandler();
  1419.     ShowCategory151Screen(
  1420.         0,
  1421.         0,
  1422.         STR_GLOBAL_OK,
  1423.         IMG_GLOBAL_OK,
  1424.         STR_GLOBAL_BACK,
  1425.         IMG_GLOBAL_BACK,
  1426.         satOpenChannel.alphaID,
  1427.         iconData,
  1428.         gSATContext.guiBufferPointer);
  1429.     SetKeyHandler(SATOpenChannelTerminalResponseExpire, KEY_END, KEY_EVENT_DOWN);
  1430.     SetLeftSoftkeyFunction(SATOpenChannelReq, KEY_EVENT_UP);
  1431.     SetRightSoftkeyFunction(SATOpenChannelTerminalResponseUnable, KEY_EVENT_UP);
  1432. }
  1433. /*****************************************************************************
  1434.  * FUNCTION
  1435.  *  SATOpenChannelTerminalResponseExpire
  1436.  * DESCRIPTION
  1437.  *  
  1438.  * PARAMETERS
  1439.  *  void
  1440.  * RETURNS
  1441.  *  void
  1442.  *****************************************************************************/
  1443. void SATOpenChannelTerminalResponseExpire(void)
  1444. {
  1445.     /*----------------------------------------------------------------*/
  1446.     /* Local Variables                                                */
  1447.     /*----------------------------------------------------------------*/
  1448.     /*----------------------------------------------------------------*/
  1449.     /* Code Body                                                      */
  1450.     /*----------------------------------------------------------------*/
  1451.     TerminalResponseOpenChannel(SAT_PROACTIVE_CMD_TERMINATED_BY_USER, satOpenChannel.cmdDetail);
  1452.     ExitSATToIdle();
  1453. }
  1454. /*****************************************************************************
  1455.  * FUNCTION
  1456.  *  SATOpenChannelTerminalResponseUnable
  1457.  * DESCRIPTION
  1458.  *  
  1459.  * PARAMETERS
  1460.  *  void
  1461.  * RETURNS
  1462.  *  void
  1463.  *****************************************************************************/
  1464. void SATOpenChannelTerminalResponseUnable(void)
  1465. {
  1466.     /*----------------------------------------------------------------*/
  1467.     /* Local Variables                                                */
  1468.     /*----------------------------------------------------------------*/
  1469.     /*----------------------------------------------------------------*/
  1470.     /* Code Body                                                      */
  1471.     /*----------------------------------------------------------------*/
  1472.     TerminalResponseOpenChannel(SAT_USER_DID_NOT_ACCEPT_THE_PROACTIVE_CMD, satOpenChannel.cmdDetail);
  1473.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  1474. }
  1475. /*****************************************************************************
  1476.  * FUNCTION
  1477.  *  TerminalResponseOpenChannel
  1478.  * DESCRIPTION
  1479.  *  
  1480.  * PARAMETERS
  1481.  *  res             [IN]        
  1482.  *  cmdDetail       [?]         
  1483.  * RETURNS
  1484.  *  void
  1485.  *****************************************************************************/
  1486. void TerminalResponseOpenChannel(U8 res, U8 *cmdDetail)
  1487. {
  1488.     /*----------------------------------------------------------------*/
  1489.     /* Local Variables                                                */
  1490.     /*----------------------------------------------------------------*/
  1491.     MYQUEUE *Message;
  1492.     mmi_sat_open_channel_req_struct *dataPtr;
  1493.     /*----------------------------------------------------------------*/
  1494.     /* Code Body                                                      */
  1495.     /*----------------------------------------------------------------*/
  1496.     satOpenChannel.Stage1Res = 1;
  1497.     Message = ALLOCATE_ITM(MOD_MMI);
  1498.     Message->oslSrcId = MOD_MMI;
  1499.     Message->oslDestId = MOD_L4C;
  1500.     Message->oslMsgId = MSG_ID_MMI_SAT_OPEN_CHANNEL_REQ;
  1501.     dataPtr = (mmi_sat_open_channel_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_open_channel_req_struct));
  1502.     dataPtr->res = res;
  1503.     memcpy(dataPtr->cmd_detail, cmdDetail, 5 * sizeof(U8));
  1504.     Message->oslDataPtr = (oslParaType*) dataPtr;
  1505.     Message->oslPeerBuffPtr = NULL;
  1506.     SEND_MSG(Message);
  1507. }
  1508. /*****************************************************************************
  1509.  * FUNCTION
  1510.  *  SATOpenChannelReq
  1511.  * DESCRIPTION
  1512.  *  
  1513.  * PARAMETERS
  1514.  *  void
  1515.  * RETURNS
  1516.  *  void
  1517.  *****************************************************************************/
  1518. void SATOpenChannelReq(void)
  1519. {
  1520.     /*----------------------------------------------------------------*/
  1521.     /* Local Variables                                                */
  1522.     /*----------------------------------------------------------------*/
  1523.     /*----------------------------------------------------------------*/
  1524.     /* Code Body                                                      */
  1525.     /*----------------------------------------------------------------*/
  1526.     satOpenChannel.Stage2Res = 0;
  1527.     TerminalResponseOpenChannel(SAT_CMD_PERFORMED_SUCCESSFULLY, satOpenChannel.cmdDetail);
  1528.     if (satOpenChannel.informUser)
  1529.     {
  1530.         DisplayOpenChannelWindow();
  1531.     }
  1532. }
  1533. /*****************************************************************************
  1534.  * FUNCTION
  1535.  *  DisplayOpenChannelWindow
  1536.  * DESCRIPTION
  1537.  *  
  1538.  * PARAMETERS
  1539.  *  void
  1540.  * RETURNS
  1541.  *  void
  1542.  *****************************************************************************/
  1543. void DisplayOpenChannelWindow(void)
  1544. {
  1545.     /*----------------------------------------------------------------*/
  1546.     /* Local Variables                                                */
  1547.     /*----------------------------------------------------------------*/
  1548.     /*----------------------------------------------------------------*/
  1549.     /* Code Body                                                      */
  1550.     /*----------------------------------------------------------------*/
  1551.     gSATContext.exitCondition = &satOpenChannel.Stage2Res;
  1552.     EntryNewScreen(SAT_OPEN_CHANNEL_SCREENID, SATGenericExitHandler, NULL, NULL);
  1553.     SetIsInSATScreen();
  1554.     gSATContext.historyFuncPtr = DisplayOpenChannelWindow;
  1555.     ClearHighlightHandler();
  1556.     ShowCategory151Screen(
  1557.         0,
  1558.         0,
  1559.         0,
  1560.         0,
  1561.         0,
  1562.         0,
  1563.         (PU8) GetString(SAT_OPEN_CHANNEL_STRING_ID),
  1564.         0,
  1565.         gSATContext.guiBufferPointer);
  1566.     SetKeyHandler(0, KEY_END, KEY_EVENT_DOWN);
  1567. }
  1568. /*****************************************************************************
  1569.  * FUNCTION
  1570.  *  SATOpenChannelRes
  1571.  * DESCRIPTION
  1572.  *  
  1573.  * PARAMETERS
  1574.  *  msgPtr      [?]     
  1575.  * RETURNS
  1576.  *  void
  1577.  *****************************************************************************/
  1578. void SATOpenChannelRes(void *msgPtr)
  1579. {
  1580.     /*----------------------------------------------------------------*/
  1581.     /* Local Variables                                                */
  1582.     /*----------------------------------------------------------------*/
  1583.     mmi_sat_open_channel_rsp_struct *openChannelRes;
  1584.     /*----------------------------------------------------------------*/
  1585.     /* Code Body                                                      */
  1586.     /*----------------------------------------------------------------*/
  1587.     openChannelRes = (mmi_sat_open_channel_rsp_struct*) msgPtr;
  1588.     satOpenChannel.Stage2Res = 1;
  1589.     if (satOpenChannel.informUser)
  1590.     {
  1591.         if (openChannelRes->terminal_res == SAT_CMD_PERFORMED_SUCCESSFULLY ||
  1592.             openChannelRes->terminal_res == SAT_CMD_PERFORMED_WITH_PARTIAL_COMPREHENSION ||
  1593.             openChannelRes->terminal_res == SAT_CMD_PERFORMED_WITH_MISSING_INFO)
  1594.         {
  1595.             SATPleaseWaitScreen(SAT_OPEN_CHANNEL_SUCCESS_STRING_ID, 0);
  1596.         }
  1597.         else
  1598.         {
  1599.             SATPleaseWaitScreen(SAT_OPEN_CHANNEL_FAIL_STRING_ID, 0);
  1600.         }
  1601.     }
  1602.     FreeOpenChannel();
  1603. }
  1604. /*****************************************************************************
  1605.  * FUNCTION
  1606.  *  FreeOpenChannel
  1607.  * DESCRIPTION
  1608.  *  
  1609.  * PARAMETERS
  1610.  *  void
  1611.  * RETURNS
  1612.  *  void
  1613.  *****************************************************************************/
  1614. void FreeOpenChannel(void)
  1615. {
  1616.     /*----------------------------------------------------------------*/
  1617.     /* Local Variables                                                */
  1618.     /*----------------------------------------------------------------*/
  1619.     /*----------------------------------------------------------------*/
  1620.     /* Code Body                                                      */
  1621.     /*----------------------------------------------------------------*/
  1622.     SATClearAllIcons();
  1623.     /* micha1008 */
  1624.     if (satOpenChannel.alphaID)
  1625.     {
  1626.         OslMfree(satOpenChannel.alphaID);
  1627.     }
  1628.     satOpenChannel.noAlphaId = 0;
  1629.     satOpenChannel.alphaID = NULL;
  1630. }
  1631. /*****************************************************************************
  1632.  * FUNCTION
  1633.  *  SATCloseChannelInd
  1634.  * DESCRIPTION
  1635.  *  
  1636.  * PARAMETERS
  1637.  *  msgPtr      [?]     
  1638.  * RETURNS
  1639.  *  void
  1640.  *****************************************************************************/
  1641. void SATCloseChannelInd(void *msgPtr)
  1642. {
  1643.     /*----------------------------------------------------------------*/
  1644.     /* Local Variables                                                */
  1645.     /*----------------------------------------------------------------*/
  1646.     mmi_sat_close_channel_ind_struct *closeChannelInd;
  1647.     /*----------------------------------------------------------------*/
  1648.     /* Code Body                                                      */
  1649.     /*----------------------------------------------------------------*/
  1650.     closeChannelInd = (mmi_sat_close_channel_ind_struct*) msgPtr;
  1651.     memcpy(satCloseChannel.cmdDetail, (void*)closeChannelInd->cmd_detail, 5 * sizeof(U8));
  1652.     satCloseChannel.isIconAvailable = closeChannelInd->is_icon_available;
  1653.     if (satCloseChannel.isIconAvailable)
  1654.     {
  1655.         satCloseChannel.iconInfo.iconId = closeChannelInd->icon_info.icon_id;
  1656.         satCloseChannel.iconInfo.iconAttr = closeChannelInd->icon_info.icon_attr;
  1657.     }
  1658.     satCloseChannel.noAlphaId = closeChannelInd->no_alpha_id;
  1659.     satCloseChannel.isAlphaIdPresent = closeChannelInd->is_alpha_id_present;
  1660.     satCloseChannel.dcsOfAlphaId = closeChannelInd->dcs_of_alpha_id;
  1661.     if (satCloseChannel.isAlphaIdPresent)
  1662.     {
  1663.         if (satCloseChannel.noAlphaId)
  1664.         {
  1665.             satCloseChannel.alphaID = CovertStringForPlatform(
  1666.                                         closeChannelInd->alpha_id,
  1667.                                         satCloseChannel.noAlphaId,
  1668.                                         satCloseChannel.dcsOfAlphaId,
  1669.                                         &satCloseChannel.noAlphaId);
  1670.             satCloseChannel.informUser = 1;
  1671.         }
  1672.         else
  1673.         {
  1674.             satCloseChannel.informUser = 0;
  1675.         }
  1676.     }
  1677.     else
  1678.     {
  1679.         satCloseChannel.informUser = 0;
  1680.     }
  1681.     if (satCloseChannel.isIconAvailable && satCloseChannel.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  1682.     {
  1683.         if (satCloseChannel.alphaID)
  1684.         {
  1685.             OslMfree(satCloseChannel.alphaID);
  1686.         }
  1687.         satCloseChannel.alphaID = NULL;
  1688.         satCloseChannel.noAlphaId = 0;
  1689.     }
  1690.     if (satCloseChannel.informUser)
  1691.     {
  1692.         DisplayCloseChannelScreen();
  1693.     }
  1694.     else
  1695.     {
  1696.         if (satCloseChannel.alphaID)
  1697.         {
  1698.             OslMfree(satCloseChannel.alphaID);
  1699.             satCloseChannel.alphaID = NULL;
  1700.         }
  1701.     }
  1702. }
  1703. /*****************************************************************************
  1704.  * FUNCTION
  1705.  *  DisplayCloseChannelScreen
  1706.  * DESCRIPTION
  1707.  *  
  1708.  * PARAMETERS
  1709.  *  void
  1710.  * RETURNS
  1711.  *  void
  1712.  *****************************************************************************/
  1713. void DisplayCloseChannelScreen(void)
  1714. {
  1715.     /*----------------------------------------------------------------*/
  1716.     /* Local Variables                                                */
  1717.     /*----------------------------------------------------------------*/
  1718.     U8 *iconData = NULL;
  1719.     /*----------------------------------------------------------------*/
  1720.     /* Code Body                                                      */
  1721.     /*----------------------------------------------------------------*/
  1722.     if (satCloseChannel.isIconAvailable)
  1723.     {
  1724.         SATAddIconIDToList(satCloseChannel.iconInfo.iconId);
  1725.     }
  1726.     if (satCloseChannel.isIconAvailable)
  1727.     {
  1728.         if (!SATCheckAllIconGot())
  1729.         {
  1730.             SATGetIconCompleteCallBack = DisplayCloseChannelScreen;
  1731.             SATGetIconDataToList();
  1732.             return;
  1733.         }
  1734.     }
  1735.     iconData = SATGetIconFromList(satCloseChannel.iconInfo.iconId);
  1736.     EntryNewScreen(SAT_CLOSE_CHANNEL_SCREENID, ExitCloseChannelScreen, NULL, NULL);
  1737.     ShowCategory151Screen(0, 0, 0, 0, 0, 0, satCloseChannel.alphaID, iconData, NULL);
  1738.     StartTimer(POPUP_TIMER, 1000, CloseChannelCommandTimerOver);
  1739. }
  1740. /*****************************************************************************
  1741.  * FUNCTION
  1742.  *  ExitCloseChannelScreen
  1743.  * DESCRIPTION
  1744.  *  
  1745.  * PARAMETERS
  1746.  *  void
  1747.  * RETURNS
  1748.  *  void
  1749.  *****************************************************************************/
  1750. void ExitCloseChannelScreen(void)
  1751. {
  1752.     /*----------------------------------------------------------------*/
  1753.     /* Local Variables                                                */
  1754.     /*----------------------------------------------------------------*/
  1755.     /*----------------------------------------------------------------*/
  1756.     /* Code Body                                                      */
  1757.     /*----------------------------------------------------------------*/
  1758.     SATClearAllIcons();
  1759.     if (satCloseChannel.alphaID)
  1760.     {
  1761.         OslMfree(satCloseChannel.alphaID);
  1762.         satCloseChannel.alphaID = NULL;
  1763.     }
  1764.     StopTimer(POPUP_TIMER);
  1765. }
  1766. /*****************************************************************************
  1767.  * FUNCTION
  1768.  *  CloseChannelCommandTimerOver
  1769.  * DESCRIPTION
  1770.  *  
  1771.  * PARAMETERS
  1772.  *  void
  1773.  * RETURNS
  1774.  *  void
  1775.  *****************************************************************************/
  1776. void CloseChannelCommandTimerOver(void)
  1777. {
  1778.     /*----------------------------------------------------------------*/
  1779.     /* Local Variables                                                */
  1780.     /*----------------------------------------------------------------*/
  1781.     /*----------------------------------------------------------------*/
  1782.     /* Code Body                                                      */
  1783.     /*----------------------------------------------------------------*/
  1784.     SATClearAllIcons();
  1785.     if (satCloseChannel.alphaID)
  1786.     {
  1787.         OslMfree(satCloseChannel.alphaID);
  1788.         satCloseChannel.alphaID = NULL;
  1789.     }
  1790.     StopTimer(POPUP_TIMER);
  1791.     GoBackHistory();
  1792. }
  1793. /*****************************************************************************
  1794.  * FUNCTION
  1795.  *  SATSendDataInd
  1796.  * DESCRIPTION
  1797.  *  
  1798.  * PARAMETERS
  1799.  *  msgPtr      [?]     
  1800.  * RETURNS
  1801.  *  void
  1802.  *****************************************************************************/
  1803. void SATSendDataInd(void *msgPtr)
  1804. {
  1805.     /*----------------------------------------------------------------*/
  1806.     /* Local Variables                                                */
  1807.     /*----------------------------------------------------------------*/
  1808.     mmi_sat_send_data_ind_struct *sendDataInd;
  1809.     /*----------------------------------------------------------------*/
  1810.     /* Code Body                                                      */
  1811.     /*----------------------------------------------------------------*/
  1812.     guiBufferPointer = NULL;
  1813.     sendDataInd = (mmi_sat_send_data_ind_struct*) msgPtr;
  1814.     satSendData.Stage1Res = 0;
  1815.     satSendData.dcsOfAlphaId = sendDataInd->dcs_of_alpha_id;
  1816.     satSendData.noAlphaId = sendDataInd->no_alpha_id;
  1817.     FreeSendData();
  1818.     if (sendDataInd->is_alpha_id_present)
  1819.     {
  1820.         if (satSendData.noAlphaId)
  1821.         {
  1822.             satSendData.alphaID = CovertStringForPlatform(
  1823.                                     sendDataInd->alpha_id,
  1824.                                     satSendData.noAlphaId,
  1825.                                     satSendData.dcsOfAlphaId,
  1826.                                     &satSendData.noAlphaId);
  1827.             satSendData.informUser = 1;
  1828.         }
  1829.         else
  1830.         {
  1831.             satSendData.informUser = 0;
  1832.         }
  1833.     }
  1834.     else
  1835.     {
  1836.         satSendData.noAlphaId = pfnUnicodeStrlen((PS8) (PU8) GetString(SAT_SEND_DATA_CONF_STRING_ID)) * ENCODING_LENGTH;
  1837.         satSendData.alphaID = (PU8) OslMalloc(satSendData.noAlphaId + ENCODING_LENGTH);
  1838.         memcpy(
  1839.             satSendData.alphaID,
  1840.             (PU8) GetString(SAT_SEND_DATA_CONF_STRING_ID),
  1841.             satSendData.noAlphaId + ENCODING_LENGTH);
  1842.         satSendData.informUser = 1;
  1843.     }
  1844.     memcpy(satSendData.cmdDetail, sendDataInd->cmd_detail, 5 * sizeof(U8));
  1845.     satSendData.isIconAvailable = sendDataInd->is_icon_available;
  1846.     if (satSendData.isIconAvailable)
  1847.     {
  1848.         satSendData.iconInfo.iconId = sendDataInd->icon_info.icon_id;
  1849.         satSendData.iconInfo.iconAttr = sendDataInd->icon_info.icon_attr;
  1850.     }
  1851.     if (satSendData.isIconAvailable && satSendData.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  1852.     {
  1853.         if (satSendData.alphaID)
  1854.         {
  1855.             OslMfree(satSendData.alphaID);
  1856.         }
  1857.         satSendData.alphaID = NULL;
  1858.         satSendData.noAlphaId = 0;
  1859.     }
  1860.     if (satSendData.informUser)
  1861.     {
  1862.         SATStopWaitTimer();
  1863.         DeleteScreenIfPresent(SCR_ID_SAT_HISTORY);
  1864.         if (GetExitScrnID() == SCR_ID_SAT_HISTORY)
  1865.         {
  1866.             ClearExitHandler();
  1867.         }
  1868.         GoToSendDataConformationScreen();
  1869.     }
  1870.     else
  1871.     {
  1872.         SATSendDataReq();
  1873.     }
  1874. }
  1875. /*****************************************************************************
  1876.  * FUNCTION
  1877.  *  GoToSendDataConformationScreen
  1878.  * DESCRIPTION
  1879.  *  
  1880.  * PARAMETERS
  1881.  *  void
  1882.  * RETURNS
  1883.  *  void
  1884.  *****************************************************************************/
  1885. void GoToSendDataConformationScreen(void)
  1886. {
  1887.     /*----------------------------------------------------------------*/
  1888.     /* Local Variables                                                */
  1889.     /*----------------------------------------------------------------*/
  1890.     U8 *iconData = NULL;
  1891.     /*----------------------------------------------------------------*/
  1892.     /* Code Body                                                      */
  1893.     /*----------------------------------------------------------------*/
  1894.     if (satSendData.isIconAvailable)
  1895.     {
  1896.         SATAddIconIDToList(satSendData.iconInfo.iconId);
  1897.     }
  1898.     if (satSendData.isIconAvailable)
  1899.     {
  1900.         if (!SATCheckAllIconGot())
  1901.         {
  1902.             SATGetIconCompleteCallBack = GoToSendDataConformationScreen;
  1903.             SATGetIconDataToList();
  1904.             return;
  1905.         }
  1906.     }
  1907.     iconData = SATGetIconFromList(satSendData.iconInfo.iconId);
  1908.     gSATContext.exitCondition = &satSendData.Stage1Res;
  1909.     EntryNewScreen(SAT_SEND_DATA_CONF_SCREENID, SATGenericExitHandler, NULL, NULL);
  1910.     SetIsInSATScreen();
  1911.     gSATContext.historyFuncPtr = GoToSendDataConformationScreen;
  1912.     ClearHighlightHandler();
  1913.     ShowCategory151Screen(
  1914.         0,
  1915.         0,
  1916.         STR_GLOBAL_OK,
  1917.         IMG_GLOBAL_OK,
  1918.         STR_GLOBAL_BACK,
  1919.         IMG_GLOBAL_BACK,
  1920.         satSendData.alphaID,
  1921.         iconData,
  1922.         gSATContext.guiBufferPointer);
  1923.     SetKeyHandler(SATSendDataTerminalResponseExpire, KEY_END, KEY_EVENT_DOWN);
  1924.     SetLeftSoftkeyFunction(SATSendDataReq, KEY_EVENT_UP);
  1925.     SetRightSoftkeyFunction(SATSendDataTerminalResponseUnable, KEY_EVENT_UP);
  1926. }
  1927. /*****************************************************************************
  1928.  * FUNCTION
  1929.  *  SATSendDataTerminalResponseExpire
  1930.  * DESCRIPTION
  1931.  *  
  1932.  * PARAMETERS
  1933.  *  void
  1934.  * RETURNS
  1935.  *  void
  1936.  *****************************************************************************/
  1937. void SATSendDataTerminalResponseExpire(void)
  1938. {
  1939.     /*----------------------------------------------------------------*/
  1940.     /* Local Variables                                                */
  1941.     /*----------------------------------------------------------------*/
  1942.     /*----------------------------------------------------------------*/
  1943.     /* Code Body                                                      */
  1944.     /*----------------------------------------------------------------*/
  1945.     TerminalResponseSendData(SAT_PROACTIVE_CMD_TERMINATED_BY_USER, satSendData.cmdDetail);
  1946.     ExitSATToIdle();
  1947. }
  1948. /*****************************************************************************
  1949.  * FUNCTION
  1950.  *  SATSendDataTerminalResponseUnable
  1951.  * DESCRIPTION
  1952.  *  
  1953.  * PARAMETERS
  1954.  *  void
  1955.  * RETURNS
  1956.  *  void
  1957.  *****************************************************************************/
  1958. void SATSendDataTerminalResponseUnable(void)
  1959. {
  1960.     /*----------------------------------------------------------------*/
  1961.     /* Local Variables                                                */
  1962.     /*----------------------------------------------------------------*/
  1963.     /*----------------------------------------------------------------*/
  1964.     /* Code Body                                                      */
  1965.     /*----------------------------------------------------------------*/
  1966.     TerminalResponseSendData(SAT_USER_DID_NOT_ACCEPT_THE_PROACTIVE_CMD, satSendData.cmdDetail);
  1967.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  1968. }
  1969. /*****************************************************************************
  1970.  * FUNCTION
  1971.  *  TerminalResponseSendData
  1972.  * DESCRIPTION
  1973.  *  
  1974.  * PARAMETERS
  1975.  *  res             [IN]        
  1976.  *  cmdDetail       [?]         
  1977.  * RETURNS
  1978.  *  void
  1979.  *****************************************************************************/
  1980. void TerminalResponseSendData(U8 res, U8 *cmdDetail)
  1981. {
  1982.     /*----------------------------------------------------------------*/
  1983.     /* Local Variables                                                */
  1984.     /*----------------------------------------------------------------*/
  1985.     MYQUEUE *Message;
  1986.     mmi_sat_send_data_req_struct *dataPtr;
  1987.     /*----------------------------------------------------------------*/
  1988.     /* Code Body                                                      */
  1989.     /*----------------------------------------------------------------*/
  1990.     satSendData.Stage1Res = 1;
  1991.     Message = ALLOCATE_ITM(MOD_MMI);
  1992.     Message->oslSrcId = MOD_MMI;
  1993.     Message->oslDestId = MOD_L4C;
  1994.     Message->oslMsgId = MSG_ID_MMI_SAT_OPEN_CHANNEL_REQ;
  1995.     dataPtr = (mmi_sat_send_data_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_send_data_req_struct));
  1996.     dataPtr->res = res;
  1997.     memcpy(dataPtr->cmd_detail, cmdDetail, 5 * sizeof(U8));
  1998.     Message->oslDataPtr = (oslParaType*) dataPtr;
  1999.     Message->oslPeerBuffPtr = NULL;
  2000.     SEND_MSG(Message);
  2001. }
  2002. /*****************************************************************************
  2003.  * FUNCTION
  2004.  *  SATSendDataReq
  2005.  * DESCRIPTION
  2006.  *  
  2007.  * PARAMETERS
  2008.  *  void
  2009.  * RETURNS
  2010.  *  void
  2011.  *****************************************************************************/
  2012. void SATSendDataReq(void)
  2013. {
  2014.     /*----------------------------------------------------------------*/
  2015.     /* Local Variables                                                */
  2016.     /*----------------------------------------------------------------*/
  2017.     /*----------------------------------------------------------------*/
  2018.     /* Code Body                                                      */
  2019.     /*----------------------------------------------------------------*/
  2020.     satSendData.Stage2Res = 0;
  2021.     if (satSendData.informUser)
  2022.     {
  2023.         DisplaySendDataWindow();
  2024.     }
  2025.     TerminalResponseSendData(SAT_CMD_PERFORMED_SUCCESSFULLY, satOpenChannel.cmdDetail);
  2026. }
  2027. /*****************************************************************************
  2028.  * FUNCTION
  2029.  *  DisplaySendDataWindow
  2030.  * DESCRIPTION
  2031.  *  
  2032.  * PARAMETERS
  2033.  *  void
  2034.  * RETURNS
  2035.  *  void
  2036.  *****************************************************************************/
  2037. void DisplaySendDataWindow(void)
  2038. {
  2039.     /*----------------------------------------------------------------*/
  2040.     /* Local Variables                                                */
  2041.     /*----------------------------------------------------------------*/
  2042.     /*----------------------------------------------------------------*/
  2043.     /* Code Body                                                      */
  2044.     /*----------------------------------------------------------------*/
  2045.     gSATContext.exitCondition = &satSendData.Stage2Res;
  2046.     EntryNewScreen(SAT_SEND_DATA_SCREENID, SATGenericExitHandler, NULL, NULL);
  2047.     SetIsInSATScreen();
  2048.     gSATContext.historyFuncPtr = DisplaySendDataWindow;
  2049.     ClearHighlightHandler();
  2050.     ShowCategory151Screen(0, 0, 0, 0, 0, 0, (PU8) GetString(SAT_SEND_DATA_STRING_ID), 0, gSATContext.guiBufferPointer);
  2051.     SetKeyHandler(0, KEY_END, KEY_EVENT_DOWN);
  2052. }
  2053. /*****************************************************************************
  2054.  * FUNCTION
  2055.  *  SATSendDataRes
  2056.  * DESCRIPTION
  2057.  *  
  2058.  * PARAMETERS
  2059.  *  msgPtr      [?]     
  2060.  * RETURNS
  2061.  *  void
  2062.  *****************************************************************************/
  2063. void SATSendDataRes(void *msgPtr)
  2064. {
  2065.     /*----------------------------------------------------------------*/
  2066.     /* Local Variables                                                */
  2067.     /*----------------------------------------------------------------*/
  2068.     mmi_sat_send_data_rsp_struct *sendDataRes;
  2069.     /*----------------------------------------------------------------*/
  2070.     /* Code Body                                                      */
  2071.     /*----------------------------------------------------------------*/
  2072.     sendDataRes = (mmi_sat_send_data_rsp_struct*) msgPtr;
  2073.     satSendData.Stage2Res = 1;
  2074.     if (satSendData.informUser)
  2075.     {
  2076.         if (sendDataRes->terminal_res == SAT_CMD_PERFORMED_SUCCESSFULLY ||
  2077.             sendDataRes->terminal_res == SAT_CMD_PERFORMED_WITH_PARTIAL_COMPREHENSION ||
  2078.             sendDataRes->terminal_res == SAT_CMD_PERFORMED_WITH_MISSING_INFO)
  2079.         {
  2080.             SATPleaseWaitScreen(SAT_SEND_DATA_SUCCESS_STRING_ID, 0);
  2081.         }
  2082.         else
  2083.         {
  2084.             SATPleaseWaitScreen(SAT_SEND_DATA_FAIL_STRING_ID, 0);
  2085.         }
  2086.     }
  2087.     FreeSendData();
  2088. }
  2089. /*****************************************************************************
  2090.  * FUNCTION
  2091.  *  FreeSendData
  2092.  * DESCRIPTION
  2093.  *  
  2094.  * PARAMETERS
  2095.  *  void
  2096.  * RETURNS
  2097.  *  void
  2098.  *****************************************************************************/
  2099. void FreeSendData(void)
  2100. {
  2101.     /*----------------------------------------------------------------*/
  2102.     /* Local Variables                                                */
  2103.     /*----------------------------------------------------------------*/
  2104.     /*----------------------------------------------------------------*/
  2105.     /* Code Body                                                      */
  2106.     /*----------------------------------------------------------------*/
  2107.     SATClearAllIcons();
  2108.     /* micha1008 */
  2109.     if (satSendData.alphaID)
  2110.     {
  2111.         OslMfree(satSendData.alphaID);
  2112.     }
  2113.     satSendData.noAlphaId = 0;
  2114.     satSendData.alphaID = NULL;
  2115. }
  2116. /*****************************************************************************
  2117.  * FUNCTION
  2118.  *  SATRecvDataInd
  2119.  * DESCRIPTION
  2120.  *  
  2121.  * PARAMETERS
  2122.  *  msgPtr      [?]     
  2123.  * RETURNS
  2124.  *  void
  2125.  *****************************************************************************/
  2126. void SATRecvDataInd(void *msgPtr)
  2127. {
  2128.     /*----------------------------------------------------------------*/
  2129.     /* Local Variables                                                */
  2130.     /*----------------------------------------------------------------*/
  2131.     mmi_sat_recv_data_ind_struct *recvDataInd;
  2132.     /*----------------------------------------------------------------*/
  2133.     /* Code Body                                                      */
  2134.     /*----------------------------------------------------------------*/
  2135.     guiBufferPointer = NULL;
  2136.     recvDataInd = (mmi_sat_recv_data_ind_struct*) msgPtr;
  2137.     satRecvData.Stage1Res = 0;
  2138.     satRecvData.dcsOfAlphaId = recvDataInd->dcs_of_alpha_id;
  2139.     satRecvData.noAlphaId = recvDataInd->no_alpha_id;
  2140.     FreeRecvData();
  2141.     if (recvDataInd->is_alpha_id_present)
  2142.     {
  2143.         if (satRecvData.noAlphaId)
  2144.         {
  2145.             satRecvData.alphaID = CovertStringForPlatform(
  2146.                                     recvDataInd->alpha_id,
  2147.                                     satRecvData.noAlphaId,
  2148.                                     satRecvData.dcsOfAlphaId,
  2149.                                     &satRecvData.noAlphaId);
  2150.             satRecvData.informUser = 1;
  2151.         }
  2152.         else
  2153.         {
  2154.             satRecvData.informUser = 0;
  2155.         }
  2156.     }
  2157.     else
  2158.     {
  2159.         satRecvData.noAlphaId = pfnUnicodeStrlen((PS8) (PU8) GetString(SAT_RECV_DATA_CONF_STRING_ID)) * ENCODING_LENGTH;
  2160.         satRecvData.alphaID = (PU8) OslMalloc(satRecvData.noAlphaId + ENCODING_LENGTH);
  2161.         memcpy(
  2162.             satRecvData.alphaID,
  2163.             (PU8) GetString(SAT_RECV_DATA_CONF_STRING_ID),
  2164.             satRecvData.noAlphaId + ENCODING_LENGTH);
  2165.         satRecvData.informUser = 1;
  2166.     }
  2167.     memcpy(satRecvData.cmdDetail, recvDataInd->cmd_detail, 5 * sizeof(U8));
  2168.     satRecvData.isIconAvailable = recvDataInd->is_icon_available;
  2169.     if (satRecvData.isIconAvailable)
  2170.     {
  2171.         satRecvData.iconInfo.iconId = recvDataInd->icon_info.icon_id;
  2172.         satRecvData.iconInfo.iconAttr = recvDataInd->icon_info.icon_attr;
  2173.     }
  2174.     if (satRecvData.isIconAvailable && satRecvData.iconInfo.iconAttr == SAT_ICON_SELF_EX)
  2175.     {
  2176.         if (satRecvData.alphaID)
  2177.         {
  2178.             OslMfree(satRecvData.alphaID);
  2179.         }
  2180.         satRecvData.alphaID = NULL;
  2181.         satRecvData.noAlphaId = 0;
  2182.     }
  2183.     if (satRecvData.informUser)
  2184.     {
  2185.         SATStopWaitTimer();
  2186.         DeleteScreenIfPresent(SCR_ID_SAT_HISTORY);
  2187.         if (GetExitScrnID() == SCR_ID_SAT_HISTORY)
  2188.         {
  2189.             ClearExitHandler();
  2190.         }
  2191.         GoToRecvDataConformationScreen();
  2192.     }
  2193.     else
  2194.     {
  2195.         SATRecvDataReq();
  2196.     }
  2197. }
  2198. /*****************************************************************************
  2199.  * FUNCTION
  2200.  *  GoToRecvDataConformationScreen
  2201.  * DESCRIPTION
  2202.  *  
  2203.  * PARAMETERS
  2204.  *  void
  2205.  * RETURNS
  2206.  *  void
  2207.  *****************************************************************************/
  2208. void GoToRecvDataConformationScreen(void)
  2209. {
  2210.     /*----------------------------------------------------------------*/
  2211.     /* Local Variables                                                */
  2212.     /*----------------------------------------------------------------*/
  2213.     U8 *iconData = NULL;
  2214.     /*----------------------------------------------------------------*/
  2215.     /* Code Body                                                      */
  2216.     /*----------------------------------------------------------------*/
  2217.     if (satRecvData.isIconAvailable)
  2218.     {
  2219.         SATAddIconIDToList(satRecvData.iconInfo.iconId);
  2220.     }
  2221.     if (satRecvData.isIconAvailable)
  2222.     {
  2223.         if (!SATCheckAllIconGot())
  2224.         {
  2225.             SATGetIconCompleteCallBack = GoToRecvDataConformationScreen;
  2226.             SATGetIconDataToList();
  2227.             return;
  2228.         }
  2229.     }
  2230.     iconData = SATGetIconFromList(satRecvData.iconInfo.iconId);
  2231.     gSATContext.exitCondition = &satRecvData.Stage1Res;
  2232.     EntryNewScreen(SAT_RECV_DATA_CONF_SCREENID, SATGenericExitHandler, NULL, NULL);
  2233.     SetIsInSATScreen();
  2234.     gSATContext.historyFuncPtr = GoToRecvDataConformationScreen;
  2235.     ClearHighlightHandler();
  2236.     ShowCategory151Screen(
  2237.         0,
  2238.         0,
  2239.         STR_GLOBAL_OK,
  2240.         IMG_GLOBAL_OK,
  2241.         STR_GLOBAL_BACK,
  2242.         IMG_GLOBAL_BACK,
  2243.         satRecvData.alphaID,
  2244.         iconData,
  2245.         gSATContext.guiBufferPointer);
  2246.     SetKeyHandler(SATRecvDataTerminalResponseExpire, KEY_END, KEY_EVENT_DOWN);
  2247.     SetLeftSoftkeyFunction(SATRecvDataReq, KEY_EVENT_UP);
  2248.     SetRightSoftkeyFunction(SATRecvDataTerminalResponseUnable, KEY_EVENT_UP);
  2249. }
  2250. /*****************************************************************************
  2251.  * FUNCTION
  2252.  *  SATRecvDataTerminalResponseExpire
  2253.  * DESCRIPTION
  2254.  *  
  2255.  * PARAMETERS
  2256.  *  void
  2257.  * RETURNS
  2258.  *  void
  2259.  *****************************************************************************/
  2260. void SATRecvDataTerminalResponseExpire(void)
  2261. {
  2262.     /*----------------------------------------------------------------*/
  2263.     /* Local Variables                                                */
  2264.     /*----------------------------------------------------------------*/
  2265.     /*----------------------------------------------------------------*/
  2266.     /* Code Body                                                      */
  2267.     /*----------------------------------------------------------------*/
  2268.     TerminalResponseRecvData(SAT_PROACTIVE_CMD_TERMINATED_BY_USER, satRecvData.cmdDetail);
  2269.     ExitSATToIdle();
  2270. }
  2271. /*****************************************************************************
  2272.  * FUNCTION
  2273.  *  SATRecvDataTerminalResponseUnable
  2274.  * DESCRIPTION
  2275.  *  
  2276.  * PARAMETERS
  2277.  *  void
  2278.  * RETURNS
  2279.  *  void
  2280.  *****************************************************************************/
  2281. void SATRecvDataTerminalResponseUnable(void)
  2282. {
  2283.     /*----------------------------------------------------------------*/
  2284.     /* Local Variables                                                */
  2285.     /*----------------------------------------------------------------*/
  2286.     /*----------------------------------------------------------------*/
  2287.     /* Code Body                                                      */
  2288.     /*----------------------------------------------------------------*/
  2289.     TerminalResponseRecvData(SAT_USER_DID_NOT_ACCEPT_THE_PROACTIVE_CMD, satRecvData.cmdDetail);
  2290.     SATPleaseWaitScreen(SAT_WAIT_STRING_ID, SAT_WAIT_IMAGE_ID);
  2291. }
  2292. /*****************************************************************************
  2293.  * FUNCTION
  2294.  *  TerminalResponseRecvData
  2295.  * DESCRIPTION
  2296.  *  
  2297.  * PARAMETERS
  2298.  *  res             [IN]        
  2299.  *  cmdDetail       [?]         
  2300.  * RETURNS
  2301.  *  void
  2302.  *****************************************************************************/
  2303. void TerminalResponseRecvData(U8 res, U8 *cmdDetail)
  2304. {
  2305.     /*----------------------------------------------------------------*/
  2306.     /* Local Variables                                                */
  2307.     /*----------------------------------------------------------------*/
  2308.     MYQUEUE *Message;
  2309.     mmi_sat_recv_data_req_struct *dataPtr;
  2310.     /*----------------------------------------------------------------*/
  2311.     /* Code Body                                                      */
  2312.     /*----------------------------------------------------------------*/
  2313.     satRecvData.Stage1Res = 1;
  2314.     Message = ALLOCATE_ITM(MOD_MMI);
  2315.     Message->oslSrcId = MOD_MMI;
  2316.     Message->oslDestId = MOD_L4C;
  2317.     Message->oslMsgId = MSG_ID_MMI_SAT_OPEN_CHANNEL_REQ;
  2318.     dataPtr = (mmi_sat_recv_data_req_struct*) OslConstructDataPtr(sizeof(mmi_sat_recv_data_req_struct));
  2319.     dataPtr->res = res;
  2320.     memcpy(dataPtr->cmd_detail, cmdDetail, 5 * sizeof(U8));
  2321.     Message->oslDataPtr = (oslParaType*) dataPtr;
  2322.     Message->oslPeerBuffPtr = NULL;
  2323.     SEND_MSG(Message);
  2324. }
  2325. /*****************************************************************************
  2326.  * FUNCTION
  2327.  *  SATRecvDataReq
  2328.  * DESCRIPTION
  2329.  *  
  2330.  * PARAMETERS
  2331.  *  void
  2332.  * RETURNS
  2333.  *  void
  2334.  *****************************************************************************/
  2335. void SATRecvDataReq(void)
  2336. {
  2337.     /*----------------------------------------------------------------*/
  2338.     /* Local Variables                                                */
  2339.     /*----------------------------------------------------------------*/
  2340.     /*----------------------------------------------------------------*/
  2341.     /* Code Body                                                      */
  2342.     /*----------------------------------------------------------------*/
  2343.     satRecvData.Stage2Res = 0;
  2344.     TerminalResponseRecvData(SAT_CMD_PERFORMED_SUCCESSFULLY, satOpenChannel.cmdDetail);
  2345.     if (satRecvData.informUser)
  2346.     {
  2347.         DisplayRecvDataWindow();
  2348.     }
  2349. }
  2350. /*****************************************************************************
  2351.  * FUNCTION
  2352.  *  DisplayRecvDataWindow
  2353.  * DESCRIPTION
  2354.  *  
  2355.  * PARAMETERS
  2356.  *  void
  2357.  * RETURNS
  2358.  *  void
  2359.  *****************************************************************************/
  2360. void DisplayRecvDataWindow(void)
  2361. {
  2362.     /*----------------------------------------------------------------*/
  2363.     /* Local Variables                                                */
  2364.     /*----------------------------------------------------------------*/
  2365.     /*----------------------------------------------------------------*/
  2366.     /* Code Body                                                      */
  2367.     /*----------------------------------------------------------------*/
  2368.     gSATContext.exitCondition = &satRecvData.Stage2Res;
  2369.     EntryNewScreen(SAT_RECV_DATA_SCREENID, SATGenericExitHandler, NULL, NULL);
  2370.     SetIsInSATScreen();
  2371.     gSATContext.historyFuncPtr = DisplayRecvDataWindow;
  2372.     ClearHighlightHandler();
  2373.     ShowCategory151Screen(0, 0, 0, 0, 0, 0, (PU8) GetString(SAT_RECV_DATA_STRING_ID), 0, gSATContext.guiBufferPointer);
  2374.     SetKeyHandler(0, KEY_END, KEY_EVENT_DOWN);
  2375. }
  2376. /*****************************************************************************
  2377.  * FUNCTION
  2378.  *  SATRecvDataRes
  2379.  * DESCRIPTION
  2380.  *  
  2381.  * PARAMETERS
  2382.  *  msgPtr      [?]     
  2383.  * RETURNS
  2384.  *  void
  2385.  *****************************************************************************/
  2386. void SATRecvDataRes(void *msgPtr)
  2387. {
  2388.     /*----------------------------------------------------------------*/
  2389.     /* Local Variables                                                */
  2390.     /*----------------------------------------------------------------*/
  2391.     mmi_sat_recv_data_rsp_struct *recvDataRes;
  2392.     /*----------------------------------------------------------------*/
  2393.     /* Code Body                                                      */
  2394.     /*----------------------------------------------------------------*/
  2395.     recvDataRes = (mmi_sat_recv_data_rsp_struct*) msgPtr;
  2396.     satRecvData.Stage2Res = 1;
  2397.     if (satRecvData.informUser)
  2398.     {
  2399.         if (recvDataRes->terminal_res == SAT_CMD_PERFORMED_SUCCESSFULLY ||
  2400.             recvDataRes->terminal_res == SAT_CMD_PERFORMED_WITH_PARTIAL_COMPREHENSION ||
  2401.             recvDataRes->terminal_res == SAT_CMD_PERFORMED_WITH_MISSING_INFO)
  2402.         {
  2403.             SATPleaseWaitScreen(SAT_RECV_DATA_SUCCESS_STRING_ID, 0);
  2404.         }
  2405.         else
  2406.         {
  2407.             SATPleaseWaitScreen(SAT_RECV_DATA_FAIL_STRING_ID, 0);
  2408.         }
  2409.     }
  2410.     FreeRecvData();
  2411. }
  2412. /*****************************************************************************
  2413.  * FUNCTION
  2414.  *  FreeRecvData
  2415.  * DESCRIPTION
  2416.  *  
  2417.  * PARAMETERS
  2418.  *  void
  2419.  * RETURNS
  2420.  *  void
  2421.  *****************************************************************************/
  2422. void FreeRecvData(void)
  2423. {
  2424.     /*----------------------------------------------------------------*/
  2425.     /* Local Variables                                                */
  2426.     /*----------------------------------------------------------------*/
  2427.     /*----------------------------------------------------------------*/
  2428.     /* Code Body                                                      */
  2429.     /*----------------------------------------------------------------*/
  2430.     SATClearAllIcons();
  2431.     /* micha1008 */
  2432.     if (satRecvData.alphaID)
  2433.     {
  2434.         OslMfree(satRecvData.alphaID);
  2435.     }
  2436.     satRecvData.noAlphaId = 0;
  2437.     satRecvData.alphaID = NULL;
  2438. }
  2439. #endif /* __SATCE__ */ 
  2440. /* diamond, 2006/01/14 restart please wait timer */
  2441. /*****************************************************************************
  2442.  * FUNCTION
  2443.  *  mmi_sat_restart_please_wait_timer
  2444.  * DESCRIPTION
  2445.  *  Restart please wait timer
  2446.  * PARAMETERS
  2447.  *  void
  2448.  * RETURNS
  2449.  *  void
  2450.  *****************************************************************************/
  2451. void mmi_sat_restart_please_wait_timer(U32 please_wait_time)
  2452. {
  2453.     /*----------------------------------------------------------------*/
  2454.     /* Local Variables                                                */
  2455.     /*----------------------------------------------------------------*/
  2456.     /*----------------------------------------------------------------*/
  2457.     /* Code Body                                                      */
  2458.     /*----------------------------------------------------------------*/
  2459.     if (gSATContext.waitTimeExpired == 0)
  2460.     {
  2461.         StopTimer(SAT_MESSAGE_WAIT_TIMER);
  2462.         StartTimer(SAT_MESSAGE_WAIT_TIMER, please_wait_time, SATMessageWaitTimer);
  2463.     }
  2464. }
  2465. /*****************************************************************************
  2466.  * FUNCTION
  2467.  *  mmi_sat_read_sim_file_with_path
  2468.  * DESCRIPTION
  2469.  *  Read SIM file with EF path
  2470.  * PARAMETERS
  2471.  *  offset      [IN]        
  2472.  *  length      [IN]        
  2473.  *  path        [IN]         
  2474.  * RETURNS
  2475.  *  void
  2476.  *****************************************************************************/
  2477. void mmi_sat_read_sim_file_with_path(U16 offset, U16 length, U8 *path)
  2478. {
  2479.     /*----------------------------------------------------------------*/
  2480.     /* Local Variables                                                */
  2481.     /*----------------------------------------------------------------*/
  2482.     MYQUEUE *Message;
  2483.     mmi_smu_read_sim_req_struct *dataPtr;
  2484.     /*----------------------------------------------------------------*/
  2485.     /* Code Body                                                      */
  2486.     /*----------------------------------------------------------------*/
  2487.     SetProtocolEventHandler(SATSendReadSimFileRsp, PRT_MMI_SMU_READ_SIM_RSP);
  2488.     Message = ALLOCATE_ITM(MOD_MMI);
  2489.     Message->oslSrcId = MOD_MMI;
  2490.     Message->oslDestId = MOD_L4C;
  2491.     Message->oslMsgId = PRT_MMI_SMU_READ_SIM_REQ;
  2492.     dataPtr = (mmi_smu_read_sim_req_struct*) OslConstructDataPtr(sizeof(mmi_smu_read_sim_req_struct));
  2493.     dataPtr->file_idx = FILE_NONE;
  2494.     dataPtr->para = offset;         /* icon image offset might be larger than 256 */
  2495.     dataPtr->length = length;
  2496.     memcpy(dataPtr->path, path, 6); /* read from EF path, total 6 bytes for path */
  2497.     Message->oslDataPtr = (oslParaType*) dataPtr;
  2498.     Message->oslPeerBuffPtr = NULL;
  2499.     SEND_MSG(Message);
  2500. }
  2501. #ifdef __USAT__
  2502. /*****************************************************************************
  2503.  * FUNCTION
  2504.  *  mmi_sat_count_get_inkey_user_rsp
  2505.  * DESCRIPTION
  2506.  *  Count user response time for GET INKEY proactive command
  2507.  * PARAMETERS
  2508.  *  void
  2509.  * RETURNS
  2510.  *  void
  2511.  *****************************************************************************/
  2512. U32 mmi_sat_count_get_inkey_user_rsp(void)
  2513. {
  2514.     /*----------------------------------------------------------------*/
  2515.     /* Local Variables                                                */
  2516.     /*----------------------------------------------------------------*/
  2517.     MYTIME diff;
  2518.     /*----------------------------------------------------------------*/
  2519.     /* Code Body                                                      */
  2520.     /*----------------------------------------------------------------*/
  2521.     DTGetRTCTime(&gSATGetInkey.stopTime);
  2522.     GetTimeDifference(&gSATGetInkey.stopTime, &gSATGetInkey.startTime, &diff);
  2523.     /* user response should in several minutes */
  2524.     return (diff.nMin * 60 + diff.nSec);
  2525. }
  2526. #endif /* __USAT__ */ 
  2527. /*****************************************************************************
  2528.  * FUNCTION
  2529.  *  mmi_sat_clear_idle_display_text
  2530.  * DESCRIPTION
  2531.  *  Clear display text if SIM refresh indication is received
  2532.  * PARAMETERS
  2533.  *  refresh_type        [IN]
  2534.  * RETURNS
  2535.  *  void
  2536.  *****************************************************************************/
  2537. void mmi_sat_clear_idle_display_text(U16 refresh_type)
  2538. {
  2539.     /*----------------------------------------------------------------*/
  2540.     /* Local Variables                                                */
  2541.     /*----------------------------------------------------------------*/
  2542.     /*----------------------------------------------------------------*/
  2543.     /* Code Body                                                      */
  2544.     /*----------------------------------------------------------------*/
  2545.     if (refresh_type != TYPE_FILE_CHANGE)
  2546.     {
  2547.         if (gSATContext.idleTextPtr != NULL)
  2548.         {
  2549.             OslMfree(gSATContext.idleTextPtr);
  2550.             gSATContext.idleTextPtr = NULL;
  2551.         }
  2552.         if (gSATContext.idleIconPtr != NULL)
  2553.         {
  2554.             OslMfree(gSATContext.idleIconPtr);
  2555.             gSATContext.idleIconPtr = NULL;
  2556.         }
  2557.         if (g_idle_context.IsOnIdleScreen)
  2558.         {
  2559.             EntryIdleScreen();
  2560.         }
  2561.     }
  2562. }
  2563. /*****************************************************************************
  2564.  * FUNCTION
  2565.  *  mmi_sat_refresh_to_update_imsi
  2566.  * DESCRIPTION
  2567.  *  Update IMSI if SIM refresh indication is received
  2568.  * PARAMETERS
  2569.  *  refresh_type        [IN]
  2570.  * RETURNS
  2571.  *  void
  2572.  *****************************************************************************/
  2573. void mmi_sat_refresh_to_update_imsi(U16 refresh_type)
  2574. {
  2575.     /*----------------------------------------------------------------*/
  2576.     /* Local Variables                                                */
  2577.     /*----------------------------------------------------------------*/
  2578.     /*----------------------------------------------------------------*/
  2579.     /* Code Body                                                      */
  2580.     /*----------------------------------------------------------------*/
  2581.     if (refresh_type != TYPE_FILE_CHANGE)
  2582.     {
  2583.         RequestToTestRoamingEnabled();
  2584.     }
  2585. }
  2586. /*****************************************************************************
  2587.  * FUNCTION
  2588.  *  mmi_sat_nw_detach_before_reboot_hdlr
  2589.  * DESCRIPTION
  2590.  *  Detach network handler before SAT reboot
  2591.  * PARAMETERS
  2592.  *  info                [IN]
  2593.  * RETURNS
  2594.  *  void
  2595.  *****************************************************************************/
  2596. void mmi_sat_nw_detach_before_reboot_hdlr(void *info)
  2597. {
  2598.     /*----------------------------------------------------------------*/
  2599.     /* Local Variables                                                */
  2600.     /*----------------------------------------------------------------*/
  2601.     /*----------------------------------------------------------------*/
  2602.     /* Code Body                                                      */
  2603.     /*----------------------------------------------------------------*/
  2604.     StopTimer(SAT_REFRESH_REBOOT_TIMER);
  2605.     SATRefreshRebootTimeOut();
  2606. }
  2607. /*****************************************************************************
  2608.  * FUNCTION
  2609.  *  mmi_sat_nw_detach_before_reboot
  2610.  * DESCRIPTION
  2611.  *  Detach network before SAT reboot
  2612.  * PARAMETERS
  2613.  *  void
  2614.  * RETURNS
  2615.  *  void
  2616.  *****************************************************************************/
  2617. void mmi_sat_nw_detach_before_reboot(void)
  2618. {
  2619. #ifdef MMI_ON_HARDWARE_P
  2620.     /*----------------------------------------------------------------*/
  2621.     /* Local Variables                                                */
  2622.     /*----------------------------------------------------------------*/
  2623.     MYQUEUE Message;
  2624.     /*----------------------------------------------------------------*/
  2625.     /* Code Body                                                      */
  2626.     /*----------------------------------------------------------------*/
  2627.     SetProtocolEventHandler(mmi_sat_nw_detach_before_reboot_hdlr, MSG_ID_MMI_NW_PWROFF_DETACH_RSP);
  2628.     Message.oslSrcId = MOD_MMI;
  2629.     Message.oslDestId = MOD_L4C;
  2630.     Message.oslMsgId = MSG_ID_MMI_NW_PWROFF_DETACH_REQ;
  2631.     Message.oslDataPtr = (oslParaType*) NULL;
  2632.     Message.oslPeerBuffPtr = NULL;
  2633.     OslMsgSendExtQueue(&Message);
  2634. #endif /* MMI_ON_HARDWARE_P */
  2635. }
  2636. /*****************************************************************************
  2637.  * FUNCTION
  2638.  *  mmi_sat_remove_text_pending_characters
  2639.  * DESCRIPTION
  2640.  *  Remove pending characters for DISPLAY TEXT and GET INPUT
  2641.  * PARAMETERS
  2642.  *  text_string         [IN]
  2643.  *  text_length         [OUT]
  2644.  *  text_dcs            [IN]
  2645.  * RETURNS
  2646.  *  void
  2647.  *****************************************************************************/
  2648. void mmi_sat_remove_text_pending_characters(U8 *text_string, U16 *text_length, U8 text_dcs)
  2649. {
  2650.     /*----------------------------------------------------------------*/
  2651.     /* Local Variables                                                */
  2652.     /*----------------------------------------------------------------*/
  2653.     U16 i;
  2654.     /*----------------------------------------------------------------*/
  2655.     /* Code Body                                                      */
  2656.     /*----------------------------------------------------------------*/
  2657.     if (text_dcs == MMI_UCS2_DCS)
  2658.     {
  2659.         for (i = 0; i < *text_length; i += 2)
  2660.         {
  2661.             if (*(U16*) (text_string + i) == 0xFFFF)
  2662.             {
  2663.                 *text_length = i;
  2664.                 break;
  2665.             }
  2666.         }
  2667.     }
  2668.     else if (text_dcs == MMI_DEFAULT_DCS)
  2669.     {
  2670.         for (i = 0; i < *text_length; i++)
  2671.         {
  2672.             if (*(text_string + i) == 0xFF)
  2673.             {
  2674.                 *text_length = i;
  2675.                 break;
  2676.             }
  2677.         }
  2678.     }
  2679.     else
  2680.     {
  2681.         /* no action */
  2682.     }
  2683. }
  2684. #ifdef __MMI_SAT_DISPLAY_TEXT_WITH_KEYPAD_LOCK__
  2685. /*****************************************************************************
  2686.  * FUNCTION
  2687.  *  mmi_sat_is_pending_idle_sat_cmd
  2688.  * DESCRIPTION
  2689.  *  SAT pending command for idle screen callback
  2690.  * PARAMETERS
  2691.  *  void
  2692.  * RETURNS
  2693.  *  void
  2694.  *****************************************************************************/
  2695. U8 mmi_sat_is_pending_idle_sat_cmd(void)
  2696. {
  2697.     return gSATContext.idleSATCmd;
  2698. }
  2699. /*****************************************************************************
  2700.  * FUNCTION
  2701.  *  mmi_sat_execute_idle_sat_cmd
  2702.  * DESCRIPTION
  2703.  *  SAT pending command for idle screen callback
  2704.  * PARAMETERS
  2705.  *  void
  2706.  * RETURNS
  2707.  *  void
  2708.  *****************************************************************************/
  2709. void mmi_sat_execute_idle_sat_cmd(void)
  2710. {
  2711.     (*gSATContext.historyFuncPtr) ();   
  2712. }
  2713. #endif /* __MMI_SAT_DISPLAY_TEXT_WITH_KEYPAD_LOCK__ */