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

MTK

开发平台:

C/C++

  1.                 }
  2.             #endif /* __MMI_SUBLCD__ */ 
  3.             }
  4.             DisplayPopup(
  5.                 (U8*) GetString(SSC_SCR_LANGUAGE_SLOVAK_STR_ID),
  6.                 IMG_GLOBAL_ACTIVATED,
  7.                 1,
  8.                 SSC_POP_UP_TIME,
  9.                 (U8) SUCCESS_TONE);
  10.             return;
  11.         }
  12.     }
  13.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SLOVAK), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  14. }
  15. #endif /* defined(__MMI_LANG_SLOVAK__) */ 
  16. #if defined(__MMI_LANG_DUTCH__)
  17. /*****************************************************************************
  18.  * FUNCTION
  19.  *  SSCHandleLngDutch
  20.  * DESCRIPTION
  21.  *  Set Dutch language
  22.  * PARAMETERS
  23.  *  void
  24.  * RETURNS
  25.  *  void
  26.  *****************************************************************************/
  27. void SSCHandleLngDutch(void)
  28. {
  29.     /*----------------------------------------------------------------*/
  30.     /* Local Variables                                                */
  31.     /*----------------------------------------------------------------*/
  32.     S16 error;
  33.     U8 count = 0;
  34.     /*----------------------------------------------------------------*/
  35.     /* Code Body                                                      */
  36.     /*----------------------------------------------------------------*/
  37.     PRINT_INFORMATION(("This is set Dutch language"));
  38.     DisplayIdleScreen();
  39.     for (count = 0; count < MAX_LANGUAGES; count++)
  40.     {
  41.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_DUTCH) == 0)
  42.         {
  43.             if (gCurrLangIndex != count)
  44.             {
  45.                 SetCurrentLanguage(count);
  46.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  47.                 RefreshNwProviderName(gPLMN);
  48.          /************************************************/
  49.                 /* Robin 0602, Remove set AT command profile functions */
  50.                 /* AT command will query MMI when needed                   */
  51.                 /* Send to PS for AT+CLAE                                            */
  52.          /************************************************/
  53.                 SendLangChange2AT(count);
  54.             #ifdef __MMI_SUBLCD__
  55.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  56.                 {
  57.                     case SUBLCD_ON_IDLE_NORMAL:
  58.                         ShowIdleAppSubLcd();
  59.                         break;
  60.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  61.                         ShowSubLCDSimError();
  62.                         break;
  63.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  64.                         ShowSubLCDBlockedSIM();
  65.                         break;
  66.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  67.                         break;
  68.                     default:
  69.                         ASSERT(0);
  70.                 }
  71.             #endif /* __MMI_SUBLCD__ */ 
  72.             }
  73.             DisplayPopup(
  74.                 (U8*) GetString(SSC_SCR_LANGUAGE_DUTCH_STR_ID),
  75.                 IMG_GLOBAL_ACTIVATED,
  76.                 1,
  77.                 SSC_POP_UP_TIME,
  78.                 (U8) SUCCESS_TONE);
  79.             return;
  80.         }
  81.     }
  82.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_DUTCH), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  83. }
  84. #endif /* defined(__MMI_LANG_DUTCH__) */ 
  85. /* Norwegian start */
  86. #if defined(__MMI_LANG_NORWEGIAN__)
  87. /*****************************************************************************
  88.  * FUNCTION
  89.  *  SSCHandleLngNorwegian
  90.  * DESCRIPTION
  91.  *  Set Norwegian language
  92.  * PARAMETERS
  93.  *  void
  94.  * RETURNS
  95.  *  void
  96.  *****************************************************************************/
  97. void SSCHandleLngNorwegian(void)
  98. {
  99.     /*----------------------------------------------------------------*/
  100.     /* Local Variables                                                */
  101.     /*----------------------------------------------------------------*/
  102.     S16 error;
  103.     U8 count = 0;
  104.     /*----------------------------------------------------------------*/
  105.     /* Code Body                                                      */
  106.     /*----------------------------------------------------------------*/
  107.     PRINT_INFORMATION(("This is set Norwegian language"));
  108.     DisplayIdleScreen();
  109.     for (count = 0; count < MAX_LANGUAGES; count++)
  110.     {
  111.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_NORWEGIAN) == 0)
  112.         {
  113.             if (gCurrLangIndex != count)
  114.             {
  115.                 SetCurrentLanguage(count);
  116.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  117.                 RefreshNwProviderName(gPLMN);
  118.          /************************************************/
  119.                 /* Robin 0602, Remove set AT command profile functions */
  120.                 /* AT command will query MMI when needed                   */
  121.                 /* Send to PS for AT+CLAE                                            */
  122.          /************************************************/
  123.                 SendLangChange2AT(count);
  124.             #ifdef __MMI_SUBLCD__
  125.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  126.                 {
  127.                     case SUBLCD_ON_IDLE_NORMAL:
  128.                         ShowIdleAppSubLcd();
  129.                         break;
  130.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  131.                         ShowSubLCDSimError();
  132.                         break;
  133.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  134.                         ShowSubLCDBlockedSIM();
  135.                         break;
  136.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  137.                         break;
  138.                     default:
  139.                         ASSERT(0);
  140.                 }
  141.             #endif /* __MMI_SUBLCD__ */ 
  142.             }
  143.             DisplayPopup(
  144.                 (U8*) GetString(SSC_SCR_LANGUAGE_NORWEGIAN_STR_ID),
  145.                 IMG_GLOBAL_ACTIVATED,
  146.                 1,
  147.                 SSC_POP_UP_TIME,
  148.                 (U8) SUCCESS_TONE);
  149.             return;
  150.         }
  151.     }
  152.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_NORWEGIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  153. }
  154. #endif /* defined(__MMI_LANG_NORWEGIAN__) */ 
  155. //Norwegian end
  156. //PMT NO_AR_SL_DU END 20050909
  157. //PMT START SWEDISH 20050916
  158. #if defined(__MMI_LANG_SWEDISH__)
  159. /*****************************************************************************
  160.  * FUNCTION
  161.  *  SSCHandleLngSwedish
  162.  * DESCRIPTION
  163.  *  Set SWEDISH language
  164.  * PARAMETERS
  165.  *  void
  166.  * RETURNS
  167.  *  void
  168.  *****************************************************************************/
  169. void SSCHandleLngSwedish(void)
  170. {
  171.     /*----------------------------------------------------------------*/
  172.     /* Local Variables                                                */
  173.     /*----------------------------------------------------------------*/
  174.     S16 error;
  175.     U8 count = 0;
  176.     /*----------------------------------------------------------------*/
  177.     /* Code Body                                                      */
  178.     /*----------------------------------------------------------------*/
  179.     PRINT_INFORMATION(("This is to set SWEDISH language"));
  180.     DisplayIdleScreen();
  181.     for (count = 0; count < MAX_LANGUAGES; count++)
  182.     {
  183.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_SWEDISH) == 0)
  184.         {
  185.             if (gCurrLangIndex != count)
  186.             {
  187.                 SetCurrentLanguage(count);
  188.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  189.                 RefreshNwProviderName(gPLMN);
  190.                 SendLangChange2AT(count);
  191.             #ifdef __MMI_SUBLCD__
  192.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  193.                 {
  194.                     case SUBLCD_ON_IDLE_NORMAL:
  195.                         ShowIdleAppSubLcd();
  196.                         break;
  197.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  198.                         ShowSubLCDSimError();
  199.                         break;
  200.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  201.                         ShowSubLCDBlockedSIM();
  202.                         break;
  203.                     case SUBLCD_NOT_ON_IDLE:
  204.                         break;
  205.                     default:
  206.                         ASSERT(0);
  207.                 }
  208.             #endif /* __MMI_SUBLCD__ */ 
  209.             }
  210.             DisplayPopup(
  211.                 (U8*) GetString(SSC_SCR_LANGUAGE_SWEDISH_STR_ID),
  212.                 IMG_GLOBAL_ACTIVATED,
  213.                 1,
  214.                 SSC_POP_UP_TIME,
  215.                 (U8) SUCCESS_TONE);
  216.             return;
  217.         }
  218.     }
  219.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SWEDISH), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  220. }
  221. #endif /* defined(__MMI_LANG_SWEDISH__) */ 
  222. //PMT END SWEDISH 20050916
  223. //PMT START CR_ROM_SLO 20050923
  224. #if defined(__MMI_LANG_CROATIAN__)
  225. /*****************************************************************************
  226.  * FUNCTION
  227.  *  SSCHandleLngCroatian
  228.  * DESCRIPTION
  229.  *  Set CROATIAN language
  230.  * PARAMETERS
  231.  *  void
  232.  * RETURNS
  233.  *  void
  234.  *****************************************************************************/
  235. void SSCHandleLngCroatian(void)
  236. {
  237.     /*----------------------------------------------------------------*/
  238.     /* Local Variables                                                */
  239.     /*----------------------------------------------------------------*/
  240.     S16 error;
  241.     U8 count = 0;
  242.     /*----------------------------------------------------------------*/
  243.     /* Code Body                                                      */
  244.     /*----------------------------------------------------------------*/
  245.     PRINT_INFORMATION(("This is to set CROATIAN language"));
  246.     DisplayIdleScreen();
  247.     for (count = 0; count < MAX_LANGUAGES; count++)
  248.     {
  249.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_CROATIAN) == 0)
  250.         {
  251.             if (gCurrLangIndex != count)
  252.             {
  253.                 SetCurrentLanguage(count);
  254.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  255.                 RefreshNwProviderName(gPLMN);
  256.                 SendLangChange2AT(count);
  257.             #ifdef __MMI_SUBLCD__
  258.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  259.                 {
  260.                     case SUBLCD_ON_IDLE_NORMAL:
  261.                         ShowIdleAppSubLcd();
  262.                         break;
  263.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  264.                         ShowSubLCDSimError();
  265.                         break;
  266.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  267.                         ShowSubLCDBlockedSIM();
  268.                         break;
  269.                     case SUBLCD_NOT_ON_IDLE:
  270.                         break;
  271.                     default:
  272.                         ASSERT(0);
  273.                 }
  274.             #endif /* __MMI_SUBLCD__ */ 
  275.             }
  276.             DisplayPopup(
  277.                 (U8*) GetString(SSC_SCR_LANGUAGE_CROATIAN_STR_ID),
  278.                 IMG_GLOBAL_ACTIVATED,
  279.                 1,
  280.                 SSC_POP_UP_TIME,
  281.                 (U8) SUCCESS_TONE);
  282.             return;
  283.         }
  284.     }
  285.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_CROATIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  286. }
  287. #endif /* defined(__MMI_LANG_CROATIAN__) */ 
  288. #if defined(__MMI_LANG_ROMANIAN__)
  289. /*****************************************************************************
  290.  * FUNCTION
  291.  *  SSCHandleLngRomanian
  292.  * DESCRIPTION
  293.  *  Set Romanian language
  294.  * PARAMETERS
  295.  *  void
  296.  * RETURNS
  297.  *  void
  298.  *****************************************************************************/
  299. void SSCHandleLngRomanian(void)
  300. {
  301.     /*----------------------------------------------------------------*/
  302.     /* Local Variables                                                */
  303.     /*----------------------------------------------------------------*/
  304.     S16 error;
  305.     U8 count = 0;
  306.     /*----------------------------------------------------------------*/
  307.     /* Code Body                                                      */
  308.     /*----------------------------------------------------------------*/
  309.     PRINT_INFORMATION(("This is set Romanian language"));
  310.     DisplayIdleScreen();
  311.     for (count = 0; count < MAX_LANGUAGES; count++)
  312.     {
  313.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_ROMANIAN) == 0)
  314.         {
  315.             if (gCurrLangIndex != count)
  316.             {
  317.                 SetCurrentLanguage(count);
  318.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  319.                 RefreshNwProviderName(gPLMN);
  320.          /************************************************/
  321.                 /* Robin 0602, Remove set AT command profile functions */
  322.                 /* AT command will query MMI when needed                   */
  323.                 /* Send to PS for AT+CLAE                                            */
  324.          /************************************************/
  325.                 SendLangChange2AT(count);
  326.             #ifdef __MMI_SUBLCD__
  327.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  328.                 {
  329.                     case SUBLCD_ON_IDLE_NORMAL:
  330.                         ShowIdleAppSubLcd();
  331.                         break;
  332.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  333.                         ShowSubLCDSimError();
  334.                         break;
  335.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  336.                         ShowSubLCDBlockedSIM();
  337.                         break;
  338.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  339.                         break;
  340.                     default:
  341.                         ASSERT(0);
  342.                 }
  343.             #endif /* __MMI_SUBLCD__ */ 
  344.             }
  345.             DisplayPopup(
  346.                 (U8*) GetString(SSC_SCR_LANGUAGE_ROMANIAN_STR_ID),
  347.                 IMG_GLOBAL_ACTIVATED,
  348.                 1,
  349.                 SSC_POP_UP_TIME,
  350.                 (U8) SUCCESS_TONE);
  351.             return;
  352.         }
  353.     }
  354.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_ROMANIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  355. }
  356. #endif /* defined(__MMI_LANG_ROMANIAN__) */ 
  357. #if defined(__MMI_LANG_SLOVENIAN__)
  358. /*****************************************************************************
  359.  * FUNCTION
  360.  *  SSCHandleLngSlovenian
  361.  * DESCRIPTION
  362.  *  Set SLOVENIAN language
  363.  * PARAMETERS
  364.  *  void
  365.  * RETURNS
  366.  *  void
  367.  *****************************************************************************/
  368. void SSCHandleLngSlovenian(void)
  369. {
  370.     /*----------------------------------------------------------------*/
  371.     /* Local Variables                                                */
  372.     /*----------------------------------------------------------------*/
  373.     S16 error;
  374.     U8 count = 0;
  375.     /*----------------------------------------------------------------*/
  376.     /* Code Body                                                      */
  377.     /*----------------------------------------------------------------*/
  378.     PRINT_INFORMATION(("This is to set SLOVENIAN language"));
  379.     DisplayIdleScreen();
  380.     for (count = 0; count < MAX_LANGUAGES; count++)
  381.     {
  382.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_SLOVENIAN) == 0)
  383.         {
  384.             if (gCurrLangIndex != count)
  385.             {
  386.                 SetCurrentLanguage(count);
  387.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  388.                 RefreshNwProviderName(gPLMN);
  389.                 SendLangChange2AT(count);
  390.             #ifdef __MMI_SUBLCD__
  391.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  392.                 {
  393.                     case SUBLCD_ON_IDLE_NORMAL:
  394.                         ShowIdleAppSubLcd();
  395.                         break;
  396.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  397.                         ShowSubLCDSimError();
  398.                         break;
  399.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  400.                         ShowSubLCDBlockedSIM();
  401.                         break;
  402.                     case SUBLCD_NOT_ON_IDLE:
  403.                         break;
  404.                     default:
  405.                         ASSERT(0);
  406.                 }
  407.             #endif /* __MMI_SUBLCD__ */ 
  408.             }
  409.             DisplayPopup(
  410.                 (U8*) GetString(SSC_SCR_LANGUAGE_SLOVENIAN_STR_ID),
  411.                 IMG_GLOBAL_ACTIVATED,
  412.                 1,
  413.                 SSC_POP_UP_TIME,
  414.                 (U8) SUCCESS_TONE);
  415.             return;
  416.         }
  417.     }
  418.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_SLOVENIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  419. }
  420. #endif /* defined(__MMI_LANG_SLOVENIAN__) */ 
  421. //PMT END CR_ROM_SLO 20050923
  422. //PMT START GR_HE_CZ_FI_DA_HU 20051007
  423. #if defined(__MMI_LANG_GREEK__)
  424. /*****************************************************************************
  425.  * FUNCTION
  426.  *  SSCHandleLngGreek
  427.  * DESCRIPTION
  428.  *  Set GREEK language
  429.  * PARAMETERS
  430.  *  void
  431.  * RETURNS
  432.  *  void
  433.  *****************************************************************************/
  434. void SSCHandleLngGreek(void)
  435. {
  436.     /*----------------------------------------------------------------*/
  437.     /* Local Variables                                                */
  438.     /*----------------------------------------------------------------*/
  439.     S16 error;
  440.     U8 count = 0;
  441.     /*----------------------------------------------------------------*/
  442.     /* Code Body                                                      */
  443.     /*----------------------------------------------------------------*/
  444.     PRINT_INFORMATION(("This is to set GREEK language"));
  445.     DisplayIdleScreen();
  446.     for (count = 0; count < MAX_LANGUAGES; count++)
  447.     {
  448.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_GREEK) == 0)
  449.         {
  450.             if (gCurrLangIndex != count)
  451.             {
  452.                 SetCurrentLanguage(count);
  453.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  454.                 RefreshNwProviderName(gPLMN);
  455.                 SendLangChange2AT(count);
  456.             #ifdef __MMI_SUBLCD__
  457.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  458.                 {
  459.                     case SUBLCD_ON_IDLE_NORMAL:
  460.                         ShowIdleAppSubLcd();
  461.                         break;
  462.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  463.                         ShowSubLCDSimError();
  464.                         break;
  465.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  466.                         ShowSubLCDBlockedSIM();
  467.                         break;
  468.                     case SUBLCD_NOT_ON_IDLE:
  469.                         break;
  470.                     default:
  471.                         ASSERT(0);
  472.                 }
  473.             #endif /* __MMI_SUBLCD__ */ 
  474.             }
  475.             DisplayPopup(
  476.                 (U8*) GetString(SSC_SCR_LANGUAGE_GREEK_STR_ID),
  477.                 IMG_GLOBAL_ACTIVATED,
  478.                 1,
  479.                 SSC_POP_UP_TIME,
  480.                 (U8) SUCCESS_TONE);
  481.             return;
  482.         }
  483.     }
  484.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_GREEK), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  485. }
  486. #endif /* defined(__MMI_LANG_GREEK__) */ 
  487. /* PMT END GR_HE_CZ_FI_DA_HU 20051007 */
  488. /* MTK end */
  489. /*****************************************************************************
  490.  * FUNCTION
  491.  *  SSCHandleLngArabic
  492.  * DESCRIPTION
  493.  *  Set Thai language
  494.  * PARAMETERS
  495.  *  void
  496.  * RETURNS
  497.  *  void
  498.  *****************************************************************************/
  499. /* PMT START 20060714 */
  500. #if defined (__MMI_LANG_ARABIC__)
  501. /* PMT END 20060714 */
  502. void SSCHandleLngArabic(void)
  503. {
  504.     /*----------------------------------------------------------------*/
  505.     /* Local Variables                                                */
  506.     /*----------------------------------------------------------------*/
  507.     S16 error;
  508.     U8 count = 0;
  509.     /*----------------------------------------------------------------*/
  510.     /* Code Body                                                      */
  511.     /*----------------------------------------------------------------*/
  512.     PRINT_INFORMATION(("This is set Arabic language"));
  513.     DisplayIdleScreen();
  514.     for (count = 0; count < MAX_LANGUAGES; count++)
  515.     {
  516.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_ARABIC) == 0)
  517.         {
  518.             if (gCurrLangIndex != count)
  519.             {
  520.                 SetCurrentLanguage(count);
  521.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  522.                 RefreshNwProviderName(gPLMN);
  523.          /************************************************/
  524.                 /* Robin 0602, Remove set AT command profile functions */
  525.                 /* AT command will query MMI when needed                   */
  526.                 /* Send to PS for AT+CLAE                                            */
  527.          /************************************************/
  528.                 SendLangChange2AT(count);
  529.             #ifdef __MMI_SUBLCD__
  530.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  531.                 {
  532.                     case SUBLCD_ON_IDLE_NORMAL:
  533.                         ShowIdleAppSubLcd();
  534.                         break;
  535.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  536.                         ShowSubLCDSimError();
  537.                         break;
  538.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  539.                         ShowSubLCDBlockedSIM();
  540.                         break;
  541.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  542.                         break;
  543.                     default:
  544.                         ASSERT(0);
  545.                 }
  546.             #endif /* __MMI_SUBLCD__ */ 
  547.             }
  548.             DisplayPopup(
  549.                 (U8*) GetString(SSC_SCR_LANGUAGE_ARABIC_STR_ID),
  550.                 IMG_GLOBAL_ACTIVATED,
  551.                 1,
  552.                 SSC_POP_UP_TIME,
  553.                 (U8) SUCCESS_TONE);
  554.             return;
  555.         }
  556.     }
  557.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_ARABIC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  558. }
  559. /* PMT START 20060714 */
  560. #endif /* defined (__MMI_LANG_ARABIC__) */ 
  561. /* PMT START PERSIAN */
  562. #if defined (__MMI_LANG_PERSIAN__)
  563. /*****************************************************************************
  564.  * FUNCTION
  565.  *  SSCHandleLngPersian
  566.  * DESCRIPTION
  567.  *  Set Persian language
  568.  * PARAMETERS
  569.  *  void
  570.  * RETURNS
  571.  *  void
  572.  *****************************************************************************/
  573. void SSCHandleLngPersian(void)
  574. {
  575.     /*----------------------------------------------------------------*/
  576.     /* Local Variables                                                */
  577.     /*----------------------------------------------------------------*/
  578.     S16 error;
  579.     U8 count = 0;
  580.     /*----------------------------------------------------------------*/
  581.     /* Code Body                                                      */
  582.     /*----------------------------------------------------------------*/
  583.     PRINT_INFORMATION(("This is set Persian language"));
  584.     DisplayIdleScreen();
  585.     for (count = 0; count < MAX_LANGUAGES; count++)
  586.     {
  587.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_PERSIAN) == 0)
  588.         {
  589.             if (gCurrLangIndex != count)
  590.             {
  591.                 SetCurrentLanguage(count);
  592.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  593.                 RefreshNwProviderName(gPLMN);
  594.          /************************************************/
  595.                 /* Robin 0602, Remove set AT command profile functions */
  596.                 /* AT command will query MMI when needed                   */
  597.                 /* Send to PS for AT+CLAE                                            */
  598.          /************************************************/
  599.                 SendLangChange2AT(count);
  600.             #ifdef __MMI_SUBLCD__
  601.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  602.                 {
  603.                     case SUBLCD_ON_IDLE_NORMAL:
  604.                         ShowIdleAppSubLcd();
  605.                         break;
  606.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  607.                         ShowSubLCDSimError();
  608.                         break;
  609.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  610.                         ShowSubLCDBlockedSIM();
  611.                         break;
  612.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  613.                         break;
  614.                     default:
  615.                         ASSERT(0);
  616.                 }
  617.             #endif /* __MMI_SUBLCD__ */ 
  618.             }
  619.             DisplayPopup(
  620.                 (U8*) GetString(SSC_SCR_LANGUAGE_PERSIAN_STR_ID),
  621.                 IMG_GLOBAL_ACTIVATED,
  622.                 1,
  623.                 SSC_POP_UP_TIME,
  624.                 (U8) SUCCESS_TONE);
  625.             return;
  626.         }
  627.     }
  628.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_PERSIAN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  629. }
  630. #endif /* defined (__MMI_LANG_PERSIAN__) */ 
  631. /* PMT END PERSIAN */
  632. #if defined (__MMI_LANG_HEBREW__)
  633. /* PMT END 20060714 */
  634. /**************************************************************
  635. //PMT START GR_HE_CZ_FI_DA_HU 20051007
  636.    FUNCTION NAME     : SSCHandleLngHebrew
  637.    PURPOSE           : Set Hebrew language 
  638.    INPUT PARAMETERS  : nil
  639.    OUTPUT PARAMETERS : nil
  640.    RETURNS           : void
  641.    REMARKS           : 
  642. **************************************************************/
  643. /*****************************************************************************
  644.  * FUNCTION
  645.  *  SSCHandleLngHebrew
  646.  * DESCRIPTION
  647.  *  
  648.  * PARAMETERS
  649.  *  void
  650.  * RETURNS
  651.  *  void
  652.  *****************************************************************************/
  653. void SSCHandleLngHebrew(void)
  654. {
  655.     /*----------------------------------------------------------------*/
  656.     /* Local Variables                                                */
  657.     /*----------------------------------------------------------------*/
  658.     S16 error;
  659.     U8 count = 0;
  660.     /*----------------------------------------------------------------*/
  661.     /* Code Body                                                      */
  662.     /*----------------------------------------------------------------*/
  663.     PRINT_INFORMATION(("This is set Hebrew language"));
  664.     DisplayIdleScreen();
  665.     for (count = 0; count < MAX_LANGUAGES; count++)
  666.     {
  667.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_HEBREW) == 0)
  668.         {
  669.             if (gCurrLangIndex != count)
  670.             {
  671.                 SetCurrentLanguage(count);
  672.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  673.                 RefreshNwProviderName(gPLMN);
  674.          /************************************************/
  675.                 /* Robin 0602, Remove set AT command profile functions */
  676.                 /* AT command will query MMI when needed                   */
  677.                 /* Send to PS for AT+CLAE                                            */
  678.          /************************************************/
  679.                 SendLangChange2AT(count);
  680.             #ifdef __MMI_SUBLCD__
  681.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  682.                 {
  683.                     case SUBLCD_ON_IDLE_NORMAL:
  684.                         ShowIdleAppSubLcd();
  685.                         break;
  686.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  687.                         ShowSubLCDSimError();
  688.                         break;
  689.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  690.                         ShowSubLCDBlockedSIM();
  691.                         break;
  692.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  693.                         break;
  694.                     default:
  695.                         ASSERT(0);
  696.                 }
  697.             #endif /* __MMI_SUBLCD__ */ 
  698.             }
  699.             DisplayPopup(
  700.                 (U8*) GetString(SSC_SCR_LANGUAGE_HEBREW_STR_ID),
  701.                 IMG_GLOBAL_ACTIVATED,
  702.                 1,
  703.                 SSC_POP_UP_TIME,
  704.                 (U8) SUCCESS_TONE);
  705.             return;
  706.         }
  707.     }
  708.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_HEBREW), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  709. }
  710. /* PMT START 20060714 */
  711. #endif /* defined (__MMI_LANG_HEBREW__) */ 
  712. #if defined (__MMI_LANG_HINDI__)
  713. /* PMT END 20060714 */
  714. /**************************************************************
  715. //PMT END GR_HE_CZ_FI_DA_HU 20051007
  716.    FUNCTION NAME     : SSCHandleLngHindi
  717.    PURPOSE           : Set Thai language 
  718.    INPUT PARAMETERS  : nil
  719.    OUTPUT PARAMETERS : nil
  720.    RETURNS           : void
  721.    REMARKS           : 
  722. **************************************************************/
  723. /*****************************************************************************
  724.  * FUNCTION
  725.  *  SSCHandleLngHindi
  726.  * DESCRIPTION
  727.  *  
  728.  * PARAMETERS
  729.  *  void
  730.  * RETURNS
  731.  *  void
  732.  *****************************************************************************/
  733. void SSCHandleLngHindi(void)
  734. {
  735.     /*----------------------------------------------------------------*/
  736.     /* Local Variables                                                */
  737.     /*----------------------------------------------------------------*/
  738.     S16 error;
  739.     U8 count = 0;
  740.     /*----------------------------------------------------------------*/
  741.     /* Code Body                                                      */
  742.     /*----------------------------------------------------------------*/
  743.     PRINT_INFORMATION(("This is set Hindi language"));
  744.     DisplayIdleScreen();
  745.     for (count = 0; count < MAX_LANGUAGES; count++)
  746.     {
  747.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_HINDI) == 0)
  748.         {
  749.             if (gCurrLangIndex != count)
  750.             {
  751.                 SetCurrentLanguage(count);
  752.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  753.                 RefreshNwProviderName(gPLMN);
  754.          /************************************************/
  755.                 /* Robin 0602, Remove set AT command profile functions */
  756.                 /* AT command will query MMI when needed                   */
  757.                 /* Send to PS for AT+CLAE                                            */
  758.          /************************************************/
  759.                 SendLangChange2AT(count);
  760.             #ifdef __MMI_SUBLCD__
  761.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  762.                 {
  763.                     case SUBLCD_ON_IDLE_NORMAL:
  764.                         ShowIdleAppSubLcd();
  765.                         break;
  766.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  767.                         ShowSubLCDSimError();
  768.                         break;
  769.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  770.                         ShowSubLCDBlockedSIM();
  771.                         break;
  772.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  773.                         break;
  774.                     default:
  775.                         ASSERT(0);
  776.                 }
  777.             #endif /* __MMI_SUBLCD__ */ 
  778.             }
  779.             DisplayPopup(
  780.                 (U8*) GetString(SSC_SCR_LANGUAGE_HINDI_STR_ID),
  781.                 IMG_GLOBAL_ACTIVATED,
  782.                 1,
  783.                 SSC_POP_UP_TIME,
  784.                 (U8) SUCCESS_TONE);
  785.             return;
  786.         }
  787.     }
  788.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_HINDI), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  789. }
  790. /* PMT START 20060714 */
  791. #endif /* defined (__MMI_LANG_HINDI__) */ 
  792. /* PMT END 20060714 */
  793. /* PMT RAKESH START 20061006 */
  794. #if defined(__MMI_LANG_MARATHI__)
  795. /*****************************************************************************
  796.  * FUNCTION
  797.  *  SSCHandleLngMarathi
  798.  * DESCRIPTION
  799.  *  Set Marathi language
  800.  * PARAMETERS
  801.  *  void
  802.  * RETURNS
  803.  *  void
  804.  *****************************************************************************/
  805. void SSCHandleLngMarathi(void)
  806. {
  807.     /*----------------------------------------------------------------*/
  808.     /* Local Variables                                                */
  809.     /*----------------------------------------------------------------*/
  810.     S16 error;
  811.     U8 count = 0;
  812.     /*----------------------------------------------------------------*/
  813.     /* Code Body                                                      */
  814.     /*----------------------------------------------------------------*/
  815.     PRINT_INFORMATION(("This is set Marathi language"));
  816.     DisplayIdleScreen();
  817.     for (count = 0; count < MAX_LANGUAGES; count++)
  818.     {
  819.         if (strcmp((PS8) gLanguageArray[count].aLangSSC, SSC_MARATHI) == 0)
  820.         {
  821.             if (gCurrLangIndex != count)
  822.             {
  823.                 SetCurrentLanguage(count);
  824.                 WriteValue(NVRAM_SETTING_LANG, &count, DS_BYTE, &error);
  825.                 RefreshNwProviderName(gPLMN);
  826.          /************************************************/
  827.                 /* Robin 0602, Remove set AT command profile functions */
  828.                 /* AT command will query MMI when needed                   */
  829.                 /* Send to PS for AT+CLAE                                            */
  830.          /************************************************/
  831.                 SendLangChange2AT(count);
  832.             #ifdef __MMI_SUBLCD__
  833.                 switch (g_idle_context.IsSubLcdOnIdleScreen)
  834.                 {
  835.                     case SUBLCD_ON_IDLE_NORMAL:
  836.                         ShowIdleAppSubLcd();
  837.                         break;
  838.                     case SUBLCD_ON_IDLE_INSERT_SIM:
  839.                         ShowSubLCDSimError();
  840.                         break;
  841.                     case SUBLCD_ON_IDLE_SIM_BLOCKED:
  842.                         ShowSubLCDBlockedSIM();
  843.                         break;
  844.                     case SUBLCD_NOT_ON_IDLE:    /* Lisen 0617: could switch to other screen, like receiving an SMS */
  845.                         break;
  846.                     default:
  847.                         ASSERT(0);
  848.                 }
  849.             #endif /* __MMI_SUBLCD__ */ 
  850.             }
  851.             DisplayPopup(
  852.                 (U8*) GetString(SSC_SCR_LANGUAGE_MARATHI_STR_ID),
  853.                 IMG_GLOBAL_ACTIVATED,
  854.                 1,
  855.                 SSC_POP_UP_TIME,
  856.                 (U8) SUCCESS_TONE);
  857.             return;
  858.         }
  859.     }
  860.     DisplayPopup((U8*) GetString(SSC_STR_ERR_SET_MARATHI), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  861. }
  862. #endif /* defined(__MMI_LANG_MARATHI__) */ 
  863. /* PMT RAKESH END 20061006 */
  864. /*****************************************************************************
  865.  * FUNCTION
  866.  *  SSCHandleSoftwareVersion
  867.  * DESCRIPTION
  868.  *  Display sofeware version.
  869.  * PARAMETERS
  870.  *  void
  871.  * RETURNS
  872.  *  void
  873.  *****************************************************************************/
  874. void SSCHandleSoftwareVersion(void)
  875. {
  876. #ifdef MMI_ON_HARDWARE_P
  877.     /*----------------------------------------------------------------*/
  878.     /* Local Variables                                                */
  879.     /*----------------------------------------------------------------*/
  880.     S8 strSWVersionNo[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
  881.     /*----------------------------------------------------------------*/
  882.     /* Code Body                                                      */
  883.     /*----------------------------------------------------------------*/
  884.     memset(strSWVersionNo, 0, sizeof(strSWVersionNo));
  885. #ifdef __ASCII
  886.     strcpy(strSWVersionNo, (S8*) release_verno());
  887. #endif 
  888. #ifdef __UCS2_ENCODING
  889.     AnsiiNToUnicodeString(strSWVersionNo, (S8*) release_verno(), MAX_SW_VER_LEN);
  890. #endif 
  891. #endif /* MMI_ON_HARDWARE_P */ 
  892.     PRINT_INFORMATION(("This is to show software version"));
  893.     EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleSoftwareVersion, NULL);
  894. #ifdef MMI_ON_HARDWARE_P
  895.     ShowCategory152Screen(SSC_SCR_SW_VERSION_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (PU8) strSWVersionNo, NULL);
  896. #else /* MMI_ON_HARDWARE_P */ 
  897.     ShowCategory152Screen(
  898.         SSC_SCR_SW_VERSION_CAPTION_ID,
  899.         0,
  900.         STR_GLOBAL_OK,
  901.         0,
  902.         0,
  903.         0,
  904.         (U8*) GetString(SSC_SCR_SW_VERSION_CAPTION_ID),
  905.         NULL);
  906. #endif /* MMI_ON_HARDWARE_P */ 
  907.     SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
  908. }
  909. /* Lisen 0921 */
  910. /*****************************************************************************
  911.  * FUNCTION
  912.  *  SSCHandleSoftwareVersionSummary
  913.  * DESCRIPTION
  914.  *  Display sofeware version.
  915.  * PARAMETERS
  916.  *  void
  917.  * RETURNS
  918.  *  void
  919.  *****************************************************************************/
  920. void SSCHandleSoftwareVersionSummary(void)
  921. {
  922.     /*----------------------------------------------------------------*/
  923.     /* Local Variables                                                */
  924.     /*----------------------------------------------------------------*/
  925.     /*----------------------------------------------------------------*/
  926.     /* Code Body                                                      */
  927.     /*----------------------------------------------------------------*/
  928.     PRINT_INFORMATION(("This is to show Version Summary Info"));
  929. #ifdef __MMI_FACTORY_MODE__     /* MTK Add Robin 1001 for saperate MMI feature by project */
  930.     EntryFMVersionSummaryMenu();
  931. #else /* __MMI_FACTORY_MODE__ */ 
  932.     DisplayIdleScreen();
  933.     DisplayPopup(
  934.         (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
  935.         IMG_GLOBAL_WARNING,
  936.         0,
  937.         SSC_POP_UP_TIME,
  938.         (U8) ERROR_TONE);
  939. #endif /* __MMI_FACTORY_MODE__ */ 
  940. }
  941. /*****************************************************************************
  942.  * FUNCTION
  943.  *  SSCHandleLCDContrastSetting
  944.  * DESCRIPTION
  945.  *  Display LCD Contrast Setting screen
  946.  * PARAMETERS
  947.  *  void
  948.  * RETURNS
  949.  *  void
  950.  *****************************************************************************/
  951. void SSCHandleLCDContrastSetting(void)
  952. {
  953.     /*----------------------------------------------------------------*/
  954.     /* Local Variables                                                */
  955.     /*----------------------------------------------------------------*/
  956.     /*----------------------------------------------------------------*/
  957.     /* Code Body                                                      */
  958.     /*----------------------------------------------------------------*/
  959.     PRINT_INFORMATION(("This is to show Version Summary Info"));
  960. #ifdef __MMI_FACTORY_MODE__     /* MTK Add Robin 1001 for saperate MMI feature by project */
  961.     EntryFMLCDContrastMenuHdlr();
  962. #else /* __MMI_FACTORY_MODE__ */ 
  963.     DisplayIdleScreen();
  964.     DisplayPopup(
  965.         (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
  966.         IMG_GLOBAL_WARNING,
  967.         0,
  968.         SSC_POP_UP_TIME,
  969.         (U8) ERROR_TONE);
  970. #endif /* __MMI_FACTORY_MODE__ */ 
  971. }
  972. #ifdef __MMI_HW_VERSION__
  973. /*****************************************************************************
  974.  * FUNCTION
  975.  *  SSCHandleHardwareVersion
  976.  * DESCRIPTION
  977.  *  Execute the sofeware version dispaly
  978.  * PARAMETERS
  979.  *  void
  980.  * RETURNS
  981.  *  void
  982.  *****************************************************************************/
  983. void SSCHandleHardwareVersion(void)
  984. {
  985. #ifdef MMI_ON_HARDWARE_P
  986.     /*----------------------------------------------------------------*/
  987.     /* Local Variables                                                */
  988.     /*----------------------------------------------------------------*/
  989.     S8 strHWVersionNo[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
  990.     /*----------------------------------------------------------------*/
  991.     /* Code Body                                                      */
  992.     /*----------------------------------------------------------------*/
  993.     memset(strHWVersionNo, 0, sizeof(strHWVersionNo));
  994. #ifdef __ASCII
  995.     strcpy(strHWVersionNo, (S8*) release_hw_ver());
  996. #endif 
  997. #ifdef __UCS2_ENCODING
  998.     AnsiiNToUnicodeString(strHWVersionNo, (S8*) release_hw_ver(), MAX_SW_VER_LEN);
  999. #endif 
  1000. #endif /* MMI_ON_HARDWARE_P */ 
  1001.     PRINT_INFORMATION(("This is to show hardware version"));
  1002.     EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleHardwareVersion, NULL);
  1003. #ifdef MMI_ON_HARDWARE_P
  1004.     ShowCategory7Screen(SSC_SCR_HW_VERSION_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (PU8) strHWVersionNo, NULL);
  1005. #else /* MMI_ON_HARDWARE_P */ 
  1006.     ShowCategory7Screen(
  1007.         SSC_SCR_HW_VERSION_CAPTION_ID,
  1008.         0,
  1009.         STR_GLOBAL_OK,
  1010.         0,
  1011.         0,
  1012.         0,
  1013.         (U8*) GetString(SSC_SCR_HW_VERSION_CAPTION_ID),
  1014.         NULL);
  1015. #endif /* MMI_ON_HARDWARE_P */ 
  1016.     SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
  1017. }
  1018. #endif /* __MMI_HW_VERSION__ */ 
  1019. /*****************************************************************************
  1020.  * FUNCTION
  1021.  *  SSCHandleEngineerMode
  1022.  * DESCRIPTION
  1023.  *  Set Engineering Mode
  1024.  * PARAMETERS
  1025.  *  void
  1026.  * RETURNS
  1027.  *  void
  1028.  *****************************************************************************/
  1029. void SSCHandleEngineerMode(void)
  1030. {
  1031.     /*----------------------------------------------------------------*/
  1032.     /* Local Variables                                                */
  1033.     /*----------------------------------------------------------------*/
  1034.     /*----------------------------------------------------------------*/
  1035.     /* Code Body                                                      */
  1036.     /*----------------------------------------------------------------*/
  1037.     PRINT_INFORMATION(("This is to handle Engineering Mode"));
  1038. #ifdef __MMI_ENGINEER_MODE__    /* MTK Add Robin 1001 for saperate MMI feature by project */
  1039.     EntryEngineerModeMenu();
  1040. #else /* __MMI_ENGINEER_MODE__ */ 
  1041.     DisplayIdleScreen();
  1042.     DisplayPopup(
  1043.         (U8*) GetString(SSC_SCR_ENGINEER_MODE_STR_ID),
  1044.         IMG_GLOBAL_WARNING,
  1045.         0,
  1046.         SSC_POP_UP_TIME,
  1047.         (U8) ERROR_TONE);
  1048. #endif /* __MMI_ENGINEER_MODE__ */ 
  1049. }
  1050. /*****************************************************************************
  1051.  * FUNCTION
  1052.  *  SSCHandleFactoryMode
  1053.  * DESCRIPTION
  1054.  *  Set Factory Mode
  1055.  * PARAMETERS
  1056.  *  void
  1057.  * RETURNS
  1058.  *  void
  1059.  *****************************************************************************/
  1060. void SSCHandleFactoryMode(void)
  1061. {
  1062.     /*----------------------------------------------------------------*/
  1063.     /* Local Variables                                                */
  1064.     /*----------------------------------------------------------------*/
  1065.     /*----------------------------------------------------------------*/
  1066.     /* Code Body                                                      */
  1067.     /*----------------------------------------------------------------*/
  1068.     PRINT_INFORMATION(("this is to handle Factory Mode"));
  1069. #ifdef __MMI_FACTORY_MODE__     /* MTK Add Robin 1001 for saperate MMI feature by project */
  1070.     /* Lisen 0630 */
  1071.     EntryFMMenu();
  1072. #else /* __MMI_FACTORY_MODE__ */ 
  1073.     DisplayIdleScreen();
  1074.     DisplayPopup(
  1075.         (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
  1076.         IMG_GLOBAL_WARNING,
  1077.         0,
  1078.         SSC_POP_UP_TIME,
  1079.         (U8) ERROR_TONE);
  1080. #endif /* __MMI_FACTORY_MODE__ */ 
  1081. }
  1082. /*****************************************************************************
  1083.  * FUNCTION
  1084.  *  SSCHandleFactoryModeAutoTest
  1085.  * DESCRIPTION
  1086.  *  Set Factory Mode
  1087.  * PARAMETERS
  1088.  *  void
  1089.  * RETURNS
  1090.  *  void
  1091.  *****************************************************************************/
  1092. void SSCHandleFactoryModeAutoTest(void)
  1093. {
  1094.     /*----------------------------------------------------------------*/
  1095.     /* Local Variables                                                */
  1096.     /*----------------------------------------------------------------*/
  1097.     /*----------------------------------------------------------------*/
  1098.     /* Code Body                                                      */
  1099.     /*----------------------------------------------------------------*/
  1100.     PRINT_INFORMATION(("this is to handle Factory Mode Auto Test"));
  1101.     /* MTK: Lisen added, for factory auto test mode */
  1102. #ifdef __MMI_FACTORY_MODE__     /* MTK Add Robin 1001 for saperate MMI feature by project */
  1103.     /* Lisen 0630 */
  1104.     EntryFMMenuAutoTest();
  1105. #else /* __MMI_FACTORY_MODE__ */ 
  1106.     DisplayIdleScreen();
  1107.     DisplayPopup(
  1108.         (U8*) GetString(SSC_SCR_FACTORY_MODE_STR_ID),
  1109.         IMG_GLOBAL_WARNING,
  1110.         0,
  1111.         SSC_POP_UP_TIME,
  1112.         (U8) ERROR_TONE);
  1113. #endif /* __MMI_FACTORY_MODE__ */ 
  1114.     /* MTK: Lisen end */
  1115. }
  1116. /*****************************************************************************
  1117.  * FUNCTION
  1118.  *  SSCHandleIMEI
  1119.  * DESCRIPTION
  1120.  *  Send req to get the IMEI number
  1121.  * PARAMETERS
  1122.  *  void
  1123.  * RETURNS
  1124.  *  void
  1125.  *****************************************************************************/
  1126. void SSCHandleIMEI(void)
  1127. {
  1128.     /*----------------------------------------------------------------*/
  1129.     /* Local Variables                                                */
  1130.     /*----------------------------------------------------------------*/
  1131.     MYQUEUE Message;
  1132.     /*----------------------------------------------------------------*/
  1133.     /* Code Body                                                      */
  1134.     /*----------------------------------------------------------------*/
  1135.     PRINT_INFORMATION(("This is show the IMEI"));
  1136.     ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
  1137.     Message.oslMsgId = MSG_ID_MMI_NW_GET_IMEI_REQ;
  1138.     Message.oslDataPtr = NULL;
  1139.     Message.oslPeerBuffPtr = NULL;
  1140.     Message.oslSrcId = MOD_MMI;
  1141.     Message.oslDestId = MOD_L4C;
  1142.     OslMsgSendExtQueue(&Message);
  1143.     SetProtocolEventHandler(mmi_ssc_get_imei_rsp, MSG_ID_MMI_NW_GET_IMEI_RSP);
  1144. }
  1145. /*****************************************************************************
  1146.  * FUNCTION
  1147.  *  SSCHandleSerialNumber
  1148.  * DESCRIPTION
  1149.  *  Display IMEI number
  1150.  * PARAMETERS
  1151.  *  void
  1152.  * RETURNS
  1153.  *  void
  1154.  *****************************************************************************/
  1155. void SSCHandleSerialNumber(void)
  1156. {
  1157.     /*----------------------------------------------------------------*/
  1158.     /* Local Variables                                                */
  1159.     /*----------------------------------------------------------------*/
  1160.     S8 strSerial_Num[(MAX_SW_VER_LEN + 1) * ENCODING_LENGTH];
  1161.     /*----------------------------------------------------------------*/
  1162.     /* Code Body                                                      */
  1163.     /*----------------------------------------------------------------*/
  1164.     PRINT_INFORMATION(("This is to show Serial number"));
  1165.     memset(strSerial_Num, 0, (MAX_SW_VER_LEN + 1) * ENCODING_LENGTH);
  1166. #ifdef __ASCII
  1167.     memcpy(strSerial_Num, (S8*) Serial_num(), MAX_SW_VER_LEN);
  1168. #endif 
  1169. #ifdef __UCS2_ENCODING
  1170.     AnsiiNToUnicodeString(strSerial_Num, (S8*) Serial_num(), MAX_SW_VER_LEN);
  1171. #endif 
  1172.     EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleSerialNumber, NULL);
  1173.     ShowCategory152Screen(SSC_SCR_SERIAL_NUMBER_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*) strSerial_Num, NULL);
  1174.     SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
  1175. }
  1176. /*****************************************************************************
  1177.  * FUNCTION
  1178.  *  SendReqPIN1Status
  1179.  * DESCRIPTION
  1180.  *  Send request to L4 to know the status of PIN1
  1181.  * PARAMETERS
  1182.  *  void
  1183.  * RETURNS
  1184.  *  void
  1185.  *****************************************************************************/
  1186. void SendReqPIN1Status(void)
  1187. {
  1188.     /*----------------------------------------------------------------*/
  1189.     /* Local Variables                                                */
  1190.     /*----------------------------------------------------------------*/
  1191.     /*----------------------------------------------------------------*/
  1192.     /* Code Body                                                      */
  1193.     /*----------------------------------------------------------------*/
  1194.     if (IsScreenPresent(SCR_ID_SECSET_PUK1))
  1195.     {
  1196.         DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1197.     }
  1198.     else
  1199.     {
  1200.         if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* if not from PUK Screen of Bootup */
  1201.         {
  1202.             MYQUEUE msgStruct;
  1203.             ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
  1204.             SetProtocolEventHandler(SSCChangePIN1, PRT_MMI_SMU_CHECK_PIN_STATUS_RSP);
  1205.             msgStruct.oslSrcId = MOD_MMI;
  1206.             msgStruct.oslDestId = MOD_L4C;
  1207.             /* micha1229 */
  1208.             msgStruct.oslMsgId = PRT_MMI_SMU_CHECK_PIN_STATUS_REQ;
  1209.             msgStruct.oslSapId = INVALID_SAP;
  1210.             msgStruct.oslDataPtr = NULL;
  1211.             msgStruct.oslPeerBuffPtr = NULL;
  1212.             OslMsgSendExtQueue(&msgStruct);
  1213.         }
  1214.         else
  1215.         {
  1216.             DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1217.             DeleteUptoScrID(IDLE_SCREEN_ID);
  1218.         }
  1219.     }
  1220. }
  1221. /*****************************************************************************
  1222.  * FUNCTION
  1223.  *  SSCChangePIN1
  1224.  * DESCRIPTION
  1225.  *  Veirfy PIN1, if Ok then Change PIN1
  1226.  * PARAMETERS
  1227.  *  info        [?]     
  1228.  * RETURNS
  1229.  *  void
  1230.  *****************************************************************************/
  1231. void SSCChangePIN1(void *info)
  1232. {
  1233.     /*----------------------------------------------------------------*/
  1234.     /* Local Variables                                                */
  1235.     /*----------------------------------------------------------------*/
  1236.     mmi_smu_check_pin_status_rsp_struct *resp;
  1237.     /*----------------------------------------------------------------*/
  1238.     /* Code Body                                                      */
  1239.     /*----------------------------------------------------------------*/
  1240.     resp = (mmi_smu_check_pin_status_rsp_struct*) (info);
  1241.     FillCountDownNumber(resp->chv_info);
  1242.     if (resp->chv_status.chv1_status == CHV_RETRY_ALLOW || resp->chv_status.chv1_status == CHV_VERIFIED)
  1243.     {
  1244.         SetProtocolEventHandler(SECSETChangePasswordPIN1Rsp, PRT_MMI_SMU_CHANGE_PASSWORD_RSP);
  1245.         g_idle_context.AvoidHistoryofDialerScreen = 1;
  1246.         MakeCall(g_idle_context.DialPadCallBuffer);
  1247.         return;
  1248.     }
  1249.     else if (resp->chv_status.chv1_status == CHV_DISABLED)
  1250.     {
  1251.         DisplayPopup((PU8) GetString(STR_ENABLE_PIN), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, ERROR_TONE);
  1252.     }
  1253.     else if (resp->chv_status.chv1_status == CHV_DEAD || resp->chv_status.chv1_status == CHV_INVALID_TYPE || resp->chv_status.chv1_status == CHV_BLOCKED || resp->chv_status.chv1_status == CHV_NOTINITED)      /* CHV_DEAD...display err scr-vanita */
  1254.     {
  1255.         DisplayPopup(
  1256.             (PU8) GetString(STR_ID_PIN_NOT_SUPPORT),
  1257.             IMG_GLOBAL_ERROR,
  1258.             0,
  1259.             SSC_POP_UP_TIME,
  1260.             ERROR_TONE);
  1261.     }
  1262.     DeleteUptoScrID(IDLE_SCREEN_ID);
  1263. }
  1264. /*****************************************************************************
  1265.  * FUNCTION
  1266.  *  SendReqPIN2Status
  1267.  * DESCRIPTION
  1268.  *  Send req to L4 to know the status of PIN2
  1269.  * PARAMETERS
  1270.  *  void
  1271.  * RETURNS
  1272.  *  void
  1273.  *****************************************************************************/
  1274. void SendReqPIN2Status(void)
  1275. {
  1276.     /*----------------------------------------------------------------*/
  1277.     /* Local Variables                                                */
  1278.     /*----------------------------------------------------------------*/
  1279.     /*----------------------------------------------------------------*/
  1280.     /* Code Body                                                      */
  1281.     /*----------------------------------------------------------------*/
  1282.     if (IsScreenPresent(SCR_ID_SECSET_PUK1))
  1283.     {
  1284.         DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1285.     }
  1286.     else
  1287.     {
  1288.         if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* If not from PUK screen of Bootup */
  1289.         {
  1290.             MYQUEUE msgStruct;
  1291.             ClearInputEventHandler(MMI_DEVICE_ALL); /* send message and wait response in the same screen and no input can be accepted */
  1292.             SetProtocolEventHandler(SSCChangePIN2, PRT_MMI_SMU_CHECK_PIN_STATUS_RSP);
  1293.             msgStruct.oslSrcId = MOD_MMI;
  1294.             msgStruct.oslDestId = MOD_L4C;
  1295.             /* micha1229 */
  1296.             msgStruct.oslMsgId = PRT_MMI_SMU_CHECK_PIN_STATUS_REQ;
  1297.             msgStruct.oslSapId = INVALID_SAP;
  1298.             msgStruct.oslDataPtr = NULL;
  1299.             msgStruct.oslPeerBuffPtr = NULL;
  1300.             OslMsgSendExtQueue(&msgStruct);
  1301.         }
  1302.         else    /* if from PUK screen then its a invalid SSC */
  1303.         {
  1304.             DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1305.             DeleteUptoScrID(IDLE_SCREEN_ID);
  1306.         }
  1307.     }
  1308. }
  1309. /*****************************************************************************
  1310.  * FUNCTION
  1311.  *  SSCChangePIN2
  1312.  * DESCRIPTION
  1313.  *  verify PIN2, if Ok then change PIN2
  1314.  * PARAMETERS
  1315.  *  info        [?]     
  1316.  * RETURNS
  1317.  *  void
  1318.  *****************************************************************************/
  1319. void SSCChangePIN2(void *info)
  1320. {
  1321.     /*----------------------------------------------------------------*/
  1322.     /* Local Variables                                                */
  1323.     /*----------------------------------------------------------------*/
  1324.     mmi_smu_check_pin_status_rsp_struct *resp;
  1325.     /*----------------------------------------------------------------*/
  1326.     /* Code Body                                                      */
  1327.     /*----------------------------------------------------------------*/
  1328.     resp = (mmi_smu_check_pin_status_rsp_struct*) (info);
  1329.     FillCountDownNumber(resp->chv_info);
  1330.     if (resp->chv_status.chv2_status == CHV_RETRY_ALLOW || resp->chv_status.chv2_status == CHV_VERIFIED)
  1331.     {
  1332.         SetProtocolEventHandler(SECSETChangePasswordPIN2Rsp, PRT_MMI_SMU_CHANGE_PASSWORD_RSP);  /* MSG_ID_MMI_SMU_CHANGE_PASSWORD_RSP */
  1333.         g_idle_context.AvoidHistoryofDialerScreen = 1;
  1334.         MakeCall(g_idle_context.DialPadCallBuffer);
  1335.         return;
  1336.     }
  1337.     else if (resp->chv_status.chv2_status == CHV_BLOCKED)
  1338.     {
  1339.         DisplayPopup((PU8) GetString(STR_SETTING_PIN2_BLOCK_TITLE), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, ERROR_TONE);
  1340.     }
  1341.     else if (resp->chv_status.chv2_status == CHV_DEAD || resp->chv_status.chv2_status == CHV_INVALID_TYPE || resp->chv_status.chv2_status == CHV_DISABLED || resp->chv_status.chv2_status == CHV_NOTINITED) /* CHV_DEAD...display err scr-vanita */
  1342.     {
  1343.         DisplayPopup(
  1344.             (PU8) GetString(STR_ID_PIN2_NOT_SUPPORT),
  1345.             IMG_GLOBAL_ERROR,
  1346.             0,
  1347.             SSC_POP_UP_TIME,
  1348.             ERROR_TONE);
  1349.     }
  1350.     DeleteUptoScrID(IDLE_SCREEN_ID);
  1351. }
  1352. /*****************************************************************************
  1353.  * FUNCTION
  1354.  *  SSCEntryPUK1Success
  1355.  * DESCRIPTION
  1356.  *  
  1357.  * PARAMETERS
  1358.  *  void
  1359.  * RETURNS
  1360.  *  void
  1361.  *****************************************************************************/
  1362. void SSCEntryPUK1Success(void)
  1363. {
  1364.     /*----------------------------------------------------------------*/
  1365.     /* Local Variables                                                */
  1366.     /*----------------------------------------------------------------*/
  1367.     /*----------------------------------------------------------------*/
  1368.     /* Code Body                                                      */
  1369.     /*----------------------------------------------------------------*/
  1370.  /*
  1371.   * DisplayPopup((PU8) GetString(STR_PIN_CHANGE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
  1372.   */
  1373.     gSecuritySetupContext.SimLockStatus = CHV_VERIFIED;
  1374.     DisplayPopup((PU8) GetString(STR_SETTING_CODE_VERIFIED), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
  1375.     DeleteUptoScrID(IDLE_SCREEN_ID);
  1376. }
  1377. /*****************************************************************************
  1378.  * FUNCTION
  1379.  *  SSCEntryPUK1
  1380.  * DESCRIPTION
  1381.  *  Enter PUK1, if verify ok PIN1 is set to a new PIN1
  1382.  * PARAMETERS
  1383.  *  void
  1384.  * RETURNS
  1385.  *  void
  1386.  *****************************************************************************/
  1387. void SSCEntryPUK1(void)
  1388. {
  1389.     /*----------------------------------------------------------------*/
  1390.     /* Local Variables                                                */
  1391.     /*----------------------------------------------------------------*/
  1392.     /*----------------------------------------------------------------*/
  1393.     /* Code Body                                                      */
  1394.     /*----------------------------------------------------------------*/
  1395.     if (IsScreenPresent(SCR_ID_SECSET_PUK1))
  1396.     {
  1397.         gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK1Success;
  1398.         SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
  1399.         g_idle_context.AvoidHistoryofDialerScreen = 1;
  1400.         MakeCall(g_idle_context.DialPadCallBuffer);
  1401.         return;
  1402.     }
  1403.     else
  1404.     {
  1405.         if (g_pwr_context.SSCFromEnterPukAtBootUp == 1) /* if from PUK screen of Bootup */
  1406.         {
  1407.             MakeCall(g_idle_context.DialPadCallBuffer);
  1408.         }
  1409.         else    /* if from Idle screen */
  1410.         {
  1411.             gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK1Success;
  1412.             SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
  1413.             g_idle_context.AvoidHistoryofDialerScreen = 1;
  1414.             MakeCall(g_idle_context.DialPadCallBuffer);
  1415.             return;
  1416.         }
  1417.     }
  1418. }
  1419. /*****************************************************************************
  1420.  * FUNCTION
  1421.  *  SSCEntryPUK2Success
  1422.  * DESCRIPTION
  1423.  *  
  1424.  * PARAMETERS
  1425.  *  void
  1426.  * RETURNS
  1427.  *  void
  1428.  *****************************************************************************/
  1429. void SSCEntryPUK2Success(void)
  1430. {
  1431.     /*----------------------------------------------------------------*/
  1432.     /* Local Variables                                                */
  1433.     /*----------------------------------------------------------------*/
  1434.     /*----------------------------------------------------------------*/
  1435.     /* Code Body                                                      */
  1436.     /*----------------------------------------------------------------*/
  1437.  /*
  1438.   * DisplayPopup((PU8) GetString(STR_PIN2_CHANGE), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
  1439.   */
  1440.     DisplayPopup((PU8) GetString(STR_SETTING_CODE_VERIFIED), IMG_GLOBAL_ACTIVATED, 1, ST_NOTIFYDURATION, 0);
  1441.     DeleteUptoScrID(IDLE_SCREEN_ID);
  1442. }
  1443. /*****************************************************************************
  1444.  * FUNCTION
  1445.  *  SSCEntryPUK2
  1446.  * DESCRIPTION
  1447.  *  Enter PUK2, if verify ok PIN2 is set to a new PIN2
  1448.  * PARAMETERS
  1449.  *  void
  1450.  * RETURNS
  1451.  *  void
  1452.  *****************************************************************************/
  1453. void SSCEntryPUK2(void)
  1454. {
  1455.     /*----------------------------------------------------------------*/
  1456.     /* Local Variables                                                */
  1457.     /*----------------------------------------------------------------*/
  1458.     /*----------------------------------------------------------------*/
  1459.     /* Code Body                                                      */
  1460.     /*----------------------------------------------------------------*/
  1461.     if (IsScreenPresent(SCR_ID_SECSET_PUK1))
  1462.     {
  1463.         DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1464.     }
  1465.     else
  1466.     {
  1467.         if (!g_pwr_context.SSCFromEnterPukAtBootUp) /* If from idle screen */
  1468.         {
  1469.             gSecuritySetupContext.VerifyPassSuccessCallBack = SSCEntryPUK2Success;
  1470.             SetProtocolEventHandler(SECSETVerifyPINRsp, PRT_MMI_SMU_VERIFY_PIN_RSP);
  1471.             g_idle_context.AvoidHistoryofDialerScreen = 1;
  1472.             MakeCall(g_idle_context.DialPadCallBuffer);
  1473.             return;
  1474.         }
  1475.         else    /* If from PUK screen of Bootup then its a invalid SSC */
  1476.         {
  1477.             DisplayPopup((U8*) GetString(STR_INCORRECT_SSC), IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1478.         }
  1479.     }
  1480. }
  1481. #ifdef __MMI_IRDA_SUPPORT__
  1482. #include "IrdaMMIGprots.h"
  1483. #endif 
  1484. /*****************************************************************************
  1485.  * FUNCTION
  1486.  *  SSCHandleIrOpen
  1487.  * DESCRIPTION
  1488.  *  
  1489.  * PARAMETERS
  1490.  *  void
  1491.  * RETURNS
  1492.  *  void
  1493.  *****************************************************************************/
  1494. void SSCHandleIrOpen(void)
  1495. {
  1496. #ifdef __MMI_IRDA_SUPPORT__
  1497.     /*----------------------------------------------------------------*/
  1498.     /* Local Variables                                                */
  1499.     /*----------------------------------------------------------------*/
  1500.     /*----------------------------------------------------------------*/
  1501.     /* Code Body                                                      */
  1502.     /*----------------------------------------------------------------*/
  1503.     mmi_irda_force_ir_open();
  1504.     DisplayPopup(
  1505.         (U8*) GetString(STR_GLOBAL_DONE),
  1506.         IMG_GLOBAL_ACTIVATED,
  1507.         MMI_FALSE,
  1508.         UI_POPUP_NOTIFYDURATION_TIME,
  1509.         (U8) SUCCESS_TONE);
  1510.     DeleteScreenIfPresent(SCR_DIAL_SOS_NUM);
  1511.     DeleteScreenIfPresent(IDLE_SCREEN_DIGIT_HANDLER_ID);
  1512. #endif /* __MMI_IRDA_SUPPORT__ */ 
  1513. }
  1514. /*****************************************************************************
  1515.  * FUNCTION
  1516.  *  SSCHandleIrClose
  1517.  * DESCRIPTION
  1518.  *  
  1519.  * PARAMETERS
  1520.  *  void
  1521.  * RETURNS
  1522.  *  void
  1523.  *****************************************************************************/
  1524. void SSCHandleIrClose(void)
  1525. {
  1526. #ifdef __MMI_IRDA_SUPPORT__
  1527.     /*----------------------------------------------------------------*/
  1528.     /* Local Variables                                                */
  1529.     /*----------------------------------------------------------------*/
  1530.     /*----------------------------------------------------------------*/
  1531.     /* Code Body                                                      */
  1532.     /*----------------------------------------------------------------*/
  1533.     mmi_irda_force_ir_close();
  1534.     DisplayPopup(
  1535.         (U8*) GetString(STR_GLOBAL_DONE),
  1536.         IMG_GLOBAL_ACTIVATED,
  1537.         MMI_FALSE,
  1538.         UI_POPUP_NOTIFYDURATION_TIME,
  1539.         (U8) SUCCESS_TONE);
  1540.     DeleteScreenIfPresent(SCR_DIAL_SOS_NUM);
  1541.     DeleteScreenIfPresent(IDLE_SCREEN_DIGIT_HANDLER_ID);
  1542. #endif /* __MMI_IRDA_SUPPORT__ */ 
  1543. }
  1544. /*****************************************************************************
  1545.  * FUNCTION
  1546.  *  mmi_ssc_get_imei_rsp
  1547.  * DESCRIPTION
  1548.  *  Response handler fn of request to get IMEI number.
  1549.  * PARAMETERS
  1550.  *  buf     [?]     
  1551.  * RETURNS
  1552.  *  void
  1553.  *****************************************************************************/
  1554. void mmi_ssc_get_imei_rsp(void *buf)
  1555. {
  1556.     /*----------------------------------------------------------------*/
  1557.     /* Local Variables                                                */
  1558.     /*----------------------------------------------------------------*/
  1559. #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
  1560.     U8 tempbuf[(MAX_IMEI_LEN + 1) * ENCODING_LENGTH];
  1561. #endif 
  1562.     mmi_nw_get_imei_rsp_struct *imeiresponse = (mmi_nw_get_imei_rsp_struct*) buf;
  1563.     /*----------------------------------------------------------------*/
  1564.     /* Code Body                                                      */
  1565.     /*----------------------------------------------------------------*/
  1566.     memset(gstrIMEI, 0, MAX_IMEISV_DISPLAY_LEN * ENCODING_LENGTH);
  1567.     if (imeiresponse->result == 1)
  1568.     {
  1569.     #ifdef __ASCII
  1570.         memcpy(gstrIMEI, (S8*) imeiresponse->imei, MAX_IMEI_LEN);
  1571.     #endif 
  1572.     #ifdef __UCS2_ENCODING
  1573.     #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
  1574.         AnsiiToUnicodeString((S8*) tempbuf, "IMEI:");
  1575.         pfnUnicodeStrcpy(gstrIMEI, (const S8*)tempbuf);
  1576.         AnsiiToUnicodeString((S8*) tempbuf, (S8*) imeiresponse->imei);
  1577.         pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
  1578.         AnsiiToUnicodeString((S8*) tempbuf, "nIMEISV:");
  1579.         pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
  1580.         AnsiiToUnicodeString((S8*) tempbuf, (S8*) imeiresponse->svn);
  1581.         pfnUnicodeStrcat(gstrIMEI, (const S8*)tempbuf);
  1582.     #else /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */ 
  1583.         AnsiiNToUnicodeString(gstrIMEI, (S8*) imeiresponse->imei, MAX_IMEI_LEN);
  1584.     #endif /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */ 
  1585.     #endif /* __UCS2_ENCODING */ 
  1586.     }
  1587.     ShowIMEIScreen();
  1588. }
  1589. /*****************************************************************************
  1590.  * FUNCTION
  1591.  *  ShowIMEIScreen
  1592.  * DESCRIPTION
  1593.  *  Display IMEI Number
  1594.  * PARAMETERS
  1595.  *  void
  1596.  * RETURNS
  1597.  *  void
  1598.  *****************************************************************************/
  1599. void ShowIMEIScreen(void)
  1600. {
  1601.     /*----------------------------------------------------------------*/
  1602.     /* Local Variables                                                */
  1603.     /*----------------------------------------------------------------*/
  1604.     /*----------------------------------------------------------------*/
  1605.     /* Code Body                                                      */
  1606.     /*----------------------------------------------------------------*/
  1607.     EntryNewScreen(SCR_ENTER_SSC, NULL, ShowIMEIScreen, NULL);
  1608.     /* ShowCategory152Screen(SSC_SCR_IMEI_CAPTION_ID, 0, */
  1609. #if defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__)
  1610.     ShowCategory74Screen(
  1611.         SSC_SCR_IMEI_CAPTION_ID,
  1612.         0,
  1613.         STR_GLOBAL_OK,
  1614.         0,
  1615.         0,
  1616.         0,
  1617.         (U8*) gstrIMEI,
  1618.         MAX_IMEISV_DISPLAY_LEN * ENCODING_LENGTH,
  1619.         NULL);
  1620. #else /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */ 
  1621.     ShowCategory152Screen(SSC_SCR_IMEI_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*) gstrIMEI, NULL);
  1622. #endif /* defined(MMI_ON_HARDWARE_P) && defined(__MMI_IMEISV_SUPPORT__) */ 
  1623.     /* If user press SSC to see IMEI in a call, not display dial pad again if he press OK to leave IMEI screen */
  1624.     if (isInCall())
  1625.     {
  1626.         DeleteScreenIfPresent(DTMF_SCR_DISPLAY_ID);
  1627.     }
  1628.     SetLeftSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1629.     /* SetLeftSoftkeyFunction(GoBack2TheHistory, KEY_EVENT_UP); */
  1630. }
  1631. /*****************************************************************************
  1632.  * FUNCTION
  1633.  *  SSCStringParsing1
  1634.  * DESCRIPTION
  1635.  *  Check the Supplement Service Control String table 1
  1636.  * PARAMETERS
  1637.  *  void
  1638.  * RETURNS
  1639.  *  void
  1640.  *****************************************************************************/
  1641. void SSCStringParsing1(void)
  1642. {
  1643.     /*----------------------------------------------------------------*/
  1644.     /* Local Variables                                                */
  1645.     /*----------------------------------------------------------------*/
  1646.     U8 index = 0;
  1647. #ifdef __UCS2_ENCODING
  1648.     U8 temp_str[MAX_SSC_STRING];
  1649. #endif 
  1650.     U8 *pTemp;
  1651.     /*----------------------------------------------------------------*/
  1652.     /* Code Body                                                      */
  1653.     /*----------------------------------------------------------------*/
  1654.     for (index = 0; index < (sizeof(ssc_table1) / sizeof(ssc_table1[0])); index++)
  1655.     {
  1656.     #ifdef __UCS2_ENCODING
  1657.         AnsiiToUnicodeString((S8*) temp_str, (S8*) ssc_table1[index].ssc_string);
  1658.         pTemp = (U8*) temp_str;
  1659.     #endif /* __UCS2_ENCODING */ 
  1660.     #ifdef __ASCII
  1661.         pTemp = (U8*) ssc_table1[index].ssc_string;
  1662.     #endif 
  1663.         if (pfnUnicodeStrcmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer) == 0)
  1664.             if (ssc_table1[index].func_ptr != NULL)
  1665.             {
  1666.                 if (ssc_disable_flag && ssc_table1[index].ssc_disable_ctrl)     /* diamond, 2005/05/13 for SSC disable */
  1667.                 {
  1668.                     return;
  1669.                 }
  1670.                 ssc_table1[index].func_ptr();
  1671.                 return;
  1672.             }
  1673.     }
  1674. #ifdef MMI_ON_HARDWARE_P
  1675. #ifdef DEBUG_BUF
  1676.     AnsiiToUnicodeString((S8*) temp_str, (S8*) MEM_CTRL_BUF_DBG);
  1677.     if (pfnUnicodeStrncmp
  1678.         ((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer,
  1679.          (U32) pfnUnicodeStrlen((const S8*)temp_str)) == 0)
  1680.     {
  1681.         U8 temp_str2[100], temp_str3[100];
  1682.         U32 value;
  1683.         extern void kal_monitor_buffer(kal_uint32 index);
  1684.         memset(temp_str2, 0, sizeof(temp_str2));
  1685.         pfnUnicodeStrncpy(
  1686.             (S8*) temp_str2,
  1687.             (const S8*)&g_idle_context.DialPadCallBuffer[ENCODING_LENGTH * (pfnUnicodeStrlen(MEM_CTRL_BUF_DBG) - 1)],
  1688.             (U32) (pfnUnicodeStrlen(g_idle_context.DialPadCallBuffer) - pfnUnicodeStrlen(MEM_CTRL_BUF_DBG)));
  1689.     #ifdef __UCS2_ENCODING
  1690.         UnicodeToAnsii((S8*) temp_str3, (S8*) temp_str2);
  1691.         value = atoi((S8*) temp_str3);
  1692.     #else /* __UCS2_ENCODING */ 
  1693.         value = atoi((S8*) temp_str2);
  1694.     #endif /* __UCS2_ENCODING */ 
  1695.         DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1696.         kal_monitor_buffer(value);
  1697.         return;
  1698.     }
  1699.     AnsiiToUnicodeString((S8*) temp_str, (S8*) MEM_CTRL_BUF_QRY);
  1700.     if (pfnUnicodeStrcmp((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer) == 0)
  1701.     {
  1702.         U8 temp_str[100], temp_str2[100];
  1703.         extern kal_uint32 buff_pool_debug_mask_g[];
  1704.         sprintf((S8*) temp_str, "Ctrl Buffer=%d", buff_pool_debug_mask_g[0]);
  1705.     #ifdef __UCS2_ENCODING
  1706.         AnsiiToUnicodeString((S8*) temp_str2, (S8*) temp_str);
  1707.         DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1708.     #else /* __UCS2_ENCODING */ 
  1709.         DisplayPopup((U8*) temp_str, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1710.     #endif /* __UCS2_ENCODING */ 
  1711.         SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
  1712.         return;
  1713.     }
  1714. #endif /* DEBUG_BUF */ 
  1715.     AnsiiToUnicodeString((S8*) temp_str, (S8*) TASK_CTRL_BUF_DBG);
  1716.     if (pfnUnicodeStrncmp
  1717.         ((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer,
  1718.          (U32) pfnUnicodeStrlen((const S8*)temp_str)) == 0)
  1719.     {
  1720.         U8 temp_str2[100], temp_str3[100];
  1721.         U32 value;
  1722.         extern kal_uint32 task_debug_mask_g[];
  1723.         memset(temp_str2, 0, sizeof(temp_str2));
  1724.         pfnUnicodeStrncpy(
  1725.             (S8*) temp_str2,
  1726.             (const S8*)&g_idle_context.DialPadCallBuffer[ENCODING_LENGTH * (pfnUnicodeStrlen(TASK_CTRL_BUF_DBG) - 1)],
  1727.             (U32) (pfnUnicodeStrlen(g_idle_context.DialPadCallBuffer) - pfnUnicodeStrlen(TASK_CTRL_BUF_DBG)));
  1728.     #ifdef __UCS2_ENCODING
  1729.         UnicodeToAnsii((S8*) temp_str3, (S8*) temp_str2);
  1730.         value = atoi((S8*) temp_str3);
  1731.     #else /* __UCS2_ENCODING */ 
  1732.         value = atoi((S8*) temp_str2);
  1733.     #endif /* __UCS2_ENCODING */ 
  1734.         DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1735.         task_debug_mask_g[0] = value;
  1736.         return;
  1737.     }
  1738.     AnsiiToUnicodeString((S8*) temp_str, (S8*) TASK_CTRL_BUF_QRY);
  1739.     if (pfnUnicodeStrcmp((const S8*)temp_str, (const S8*)g_idle_context.DialPadCallBuffer) == 0)
  1740.     {
  1741.         U8 temp_str[100], temp_str2[100];
  1742.         extern kal_uint32 task_debug_mask_g[];
  1743.         sprintf((S8*) temp_str, "Task dbg mask=%d", task_debug_mask_g[0]);
  1744.     #ifdef __UCS2_ENCODING
  1745.         AnsiiToUnicodeString((S8*) temp_str2, (S8*) temp_str);
  1746.         DisplayPopup((U8*) temp_str2, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1747.     #else /* __UCS2_ENCODING */ 
  1748.         DisplayPopup((U8*) temp_str, IMG_GLOBAL_WARNING, 0, SSC_POP_UP_TIME, (U8) ERROR_TONE);
  1749.     #endif /* __UCS2_ENCODING */ 
  1750.         SetLeftSoftkeyFunction(DisplayIdleScreen, KEY_EVENT_UP);
  1751.         return;
  1752.     }
  1753. #endif /* MMI_ON_HARDWARE_P */ 
  1754. }
  1755. /*****************************************************************************
  1756.  * FUNCTION
  1757.  *  SSCStringParsing2
  1758.  * DESCRIPTION
  1759.  *  Check the Supplement Service Control String table 2
  1760.  * PARAMETERS
  1761.  *  void
  1762.  * RETURNS
  1763.  *  void
  1764.  *****************************************************************************/
  1765. pBOOL SSCStringParsing2(void)
  1766. {
  1767.     /*----------------------------------------------------------------*/
  1768.     /* Local Variables                                                */
  1769.     /*----------------------------------------------------------------*/
  1770.     U8 index = 0;
  1771. #ifdef __UCS2_ENCODING
  1772.     U8 temp_str[MAX_SSC_STRING];
  1773. #endif 
  1774.     U8 *pTemp;
  1775.     /*----------------------------------------------------------------*/
  1776.     /* Code Body                                                      */
  1777.     /*----------------------------------------------------------------*/
  1778.     for (index = 0; index < (sizeof(ssc_table2) / sizeof(ssc_table2[0])); index++)
  1779.     {
  1780.     #ifdef __UCS2_ENCODING
  1781.         AnsiiToUnicodeString((S8*) temp_str, (S8*) ssc_table2[index].ssc_string);
  1782.         pTemp = (U8*) temp_str;
  1783.     #endif /* __UCS2_ENCODING */ 
  1784.     #ifdef __ASCII
  1785.         pTemp = (U8*) ssc_table2[index].ssc_string;
  1786.     #endif 
  1787.         if (pfnUnicodeStrcmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer) == 0)
  1788.         {
  1789.             if (ssc_table2[index].func_ptr != NULL)
  1790.             {
  1791.                 ssc_table2[index].func_ptr();
  1792.             }
  1793.             return MMI_TRUE;
  1794.         }
  1795.     }
  1796.     return MMI_FALSE;
  1797. }
  1798. /*****************************************************************************
  1799.  * FUNCTION
  1800.  *  SSCStringParsing3
  1801.  * DESCRIPTION
  1802.  *  Chech the Supplement Service Control String table 3
  1803.  * PARAMETERS
  1804.  *  void
  1805.  * RETURNS
  1806.  *  pBOOL
  1807.  *****************************************************************************/
  1808. pBOOL SSCStringParsing3(void)
  1809. {
  1810.     /*----------------------------------------------------------------*/
  1811.     /* Local Variables                                                */
  1812.     /*----------------------------------------------------------------*/
  1813.     U8 index = 0;
  1814. #ifdef __UCS2_ENCODING
  1815.     U8 temp_str[MAX_SSC_STRING];
  1816. #endif 
  1817.     U8 *pTemp;
  1818.     /*----------------------------------------------------------------*/
  1819.     /* Code Body                                                      */
  1820.     /*----------------------------------------------------------------*/
  1821.     for (index = 0; index < (sizeof(sim_table) / sizeof(sim_table[0])); index++)
  1822.     {
  1823.     #ifdef __UCS2_ENCODING
  1824.         AnsiiToUnicodeString((S8*) temp_str, (S8*) sim_table[index].sim_string);
  1825.         pTemp = (U8*) temp_str;
  1826.     #endif /* __UCS2_ENCODING */ 
  1827.     #ifdef __ASCII
  1828.         pTemp = (U8*) sim_table[index].sim_string;
  1829.     #endif 
  1830.         if (pfnUnicodeStrncmp((S8*) pTemp, (S8*) g_idle_context.DialPadCallBuffer, sim_table[index].sim_length) == 0)
  1831.         {
  1832.             if (sim_table[index].func_ptr != NULL)
  1833.             {
  1834.                 sim_table[index].func_ptr();
  1835.             }
  1836.             return MMI_TRUE;
  1837.         }
  1838.     }
  1839.     return MMI_FALSE;
  1840. }
  1841. /********************************Stub****************************/
  1842. /*****************************************************************************
  1843.  * FUNCTION
  1844.  *  Serial_num
  1845.  * DESCRIPTION
  1846.  *  Stub fn to return Serial Number
  1847.  * PARAMETERS
  1848.  *  void
  1849.  * RETURNS
  1850.  *  void
  1851.  *****************************************************************************/
  1852. PS8 Serial_num(void)
  1853. {
  1854.     /*----------------------------------------------------------------*/
  1855.     /* Local Variables                                                */
  1856.     /*----------------------------------------------------------------*/
  1857.     /*----------------------------------------------------------------*/
  1858.     /* Code Body                                                      */
  1859.     /*----------------------------------------------------------------*/
  1860.     return "123456789012340";
  1861. }
  1862. /*****************************************************************************
  1863.  * FUNCTION
  1864.  *  SSCHandleDisable
  1865.  * DESCRIPTION
  1866.  *  SSC disable for shipment
  1867.  * PARAMETERS
  1868.  *  void
  1869.  * RETURNS
  1870.  *  void
  1871.  *****************************************************************************/
  1872. /* diamond, 2005/05/13 for SSC disable */
  1873. void SSCHandleDisable(void)
  1874. {
  1875.     /*----------------------------------------------------------------*/
  1876.     /* Local Variables                                                */
  1877.     /*----------------------------------------------------------------*/
  1878.     /* S8 strAsciiMsg[32], strDisplayMsg[64]; */
  1879.     S16 error;
  1880.     /*----------------------------------------------------------------*/
  1881.     /* Code Body                                                      */
  1882.     /*----------------------------------------------------------------*/
  1883.     if (!ssc_disable_flag)
  1884.     {
  1885.         ssc_disable_flag = MMI_TRUE;
  1886.         WriteValue(NVRAM_SSC_DISABLE_FLAG, &ssc_disable_flag, DS_BYTE, &error);
  1887.         DisplayIdleScreen();
  1888.         DisplayPopup((PU8) GetString(STR_GLOBAL_DONE), IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  1889.         /*
  1890.          * PRINT_INFORMATION(("This is to disable SSC"));
  1891.          * EntryNewScreen(SCR_ENTER_SSC, NULL, SSCHandleDisable, NULL);
  1892.          * strcpy(strAsciiMsg, "Disable SSC of engineering mode");
  1893.          * memset(strDisplayMsg, 0, (strlen(strAsciiMsg)+1)*ENCODING_LENGTH);
  1894.          * #ifdef __ASCII
  1895.          * memcpy(strDisplayMsg, strAsciiMsg, strlen(strAsciiMsg));
  1896.          * #endif
  1897.          * #ifdef __UCS2_ENCODING
  1898.          * AnsiiNToUnicodeString(strDisplayMsg, strAsciiMsg, strlen(strAsciiMsg));
  1899.          * #endif
  1900.          * ShowCategory152Screen(SSC_SCR_SERIAL_NUMBER_CAPTION_ID, 0, STR_GLOBAL_OK, 0, 0, 0, (U8*)strDisplayMsg, NULL); 
  1901.          * SetKeyHandler(DisplayIdleScreen,KEY_LSK,KEY_EVENT_UP);
  1902.          */
  1903.     }
  1904. }
  1905. /* diamond, end */
  1906. #ifdef __MMI_A2DP_SUPPORT__
  1907. #if defined(__MMI_BT_MTK_SUPPORT__)
  1908. /*****************************************************************************
  1909.  * FUNCTION
  1910.  *  SSCHandle_BT_A2DP_Toggle_PTS_Mode
  1911.  * DESCRIPTION
  1912.  *  
  1913.  * PARAMETERS
  1914.  *  void
  1915.  * RETURNS
  1916.  *  void
  1917.  *****************************************************************************/
  1918. void SSCHandle_BT_A2DP_Toggle_PTS_Mode(void)
  1919. {
  1920.     /*----------------------------------------------------------------*/
  1921.     /* Local Variables                                                */
  1922.     /*----------------------------------------------------------------*/
  1923.     UI_string_type text[2] = {L"A2DP Normal mode", L"A2DP PTS mode"};
  1924.     /*----------------------------------------------------------------*/
  1925.     /* Code Body                                                      */
  1926.     /*----------------------------------------------------------------*/
  1927.     if (g_ssc_bt_a2dp_mode)
  1928.     {
  1929.         g_ssc_bt_a2dp_mode = 0;
  1930.     }
  1931.     else
  1932.     {
  1933.         g_ssc_bt_a2dp_mode = 1;
  1934.     }
  1935.     DisplayPopup((PU8) text[g_ssc_bt_a2dp_mode], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  1936. }
  1937. #elif defined(__MMI_BT_BCHS_SUPPORT__)
  1938. /*****************************************************************************
  1939.  * FUNCTION
  1940.  *  SSCHandle_BT_A2DP_Toggle_INT_ACP_Mode
  1941.  * DESCRIPTION
  1942.  *  
  1943.  * PARAMETERS
  1944.  *  void
  1945.  * RETURNS
  1946.  *  void
  1947.  *****************************************************************************/
  1948. void SSCHandle_BT_A2DP_Toggle_INT_ACP_Mode(void)
  1949. {
  1950.     /*----------------------------------------------------------------*/
  1951.     /* Local Variables                                                */
  1952.     /*----------------------------------------------------------------*/
  1953.     UI_string_type text[2] = {L"A2DP INT mode", L"A2DP ACP mode" };
  1954.     U8 idx;
  1955.     /*----------------------------------------------------------------*/
  1956.     /* Code Body                                                      */
  1957.     /*----------------------------------------------------------------*/
  1958.     if (g_ssc_bt_a2dp_mode)
  1959.     {
  1960.         g_ssc_bt_a2dp_mode = 0;
  1961.         idx = 0;
  1962.     }
  1963.     else
  1964.     {
  1965.         g_ssc_bt_a2dp_mode = 2;
  1966.         idx = 1;
  1967.     }
  1968.     DisplayPopup((PU8) text[idx], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  1969. }
  1970. /*****************************************************************************
  1971.  * FUNCTION
  1972.  *  SSCHandle_BT_A2DP_Close_Stream
  1973.  * DESCRIPTION
  1974.  *  
  1975.  * PARAMETERS
  1976.  *  void
  1977.  * RETURNS
  1978.  *  void
  1979.  *****************************************************************************/
  1980. void SSCHandle_BT_A2DP_Close_Stream(void)
  1981. {
  1982.     /*----------------------------------------------------------------*/
  1983.     /* Local Variables                                                */
  1984.     /*----------------------------------------------------------------*/
  1985.     UI_string_type text[3] = {L"A2DP Close Stream", L"A2DP Open Stream", L"A2DP Not Connected" };
  1986.     U8 text_index;
  1987.     /*----------------------------------------------------------------*/
  1988.     /* Code Body                                                      */
  1989.     /*----------------------------------------------------------------*/
  1990.     if (mmi_profiles_bt_is_connected(MMI_PROFILES_BT_A2DP_SIG))
  1991.     {
  1992.         if (mmi_profiles_bt_is_connected(MMI_PROFILES_BT_A2DP_STR))
  1993.         {
  1994.             mmi_profiles_bt_disconnect_req(MMI_PROFILES_BT_A2DP_STR);
  1995.             text_index = 0;
  1996.         }
  1997.         else
  1998.         {
  1999.             mmi_profiles_bt_connect_req(MMI_PROFILES_BT_A2DP_STR);
  2000.             text_index = 1;
  2001.         }
  2002.     }
  2003.     else
  2004.     {
  2005.         text_index = 2;
  2006.     }
  2007.     DisplayPopup((PU8) text[text_index], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  2008. }
  2009. #endif
  2010. #endif /* __MMI_A2DP_SUPPORT__ */ 
  2011. /*****************************************************************************
  2012.  * FUNCTION
  2013.  *  SSCHandleVendorApp
  2014.  * DESCRIPTION
  2015.  *  SSC handler for Vendor App
  2016.  * PARAMETERS
  2017.  *  void
  2018.  * RETURNS
  2019.  *  void
  2020.  *****************************************************************************/
  2021. static void SSCHandleVendorApp(void)
  2022. {
  2023.     /*----------------------------------------------------------------*/
  2024.     /* Local Variables                                                */
  2025.     /*----------------------------------------------------------------*/
  2026.     /*----------------------------------------------------------------*/
  2027.     /* Code Body                                                      */
  2028.     /*----------------------------------------------------------------*/
  2029.     /* enter testbed screen */
  2030.     mmi_entry_dev_app_scr();
  2031. }
  2032. #ifdef __BTMTK__
  2033. extern void BTPowerOn(void);
  2034. extern void BTPowerOff(void);
  2035. /*****************************************************************************
  2036.  * FUNCTION
  2037.  *  SSCHandle_BT_POWER_ON
  2038.  * DESCRIPTION
  2039.  *  
  2040.  * PARAMETERS
  2041.  *  void
  2042.  * RETURNS
  2043.  *  void
  2044.  *****************************************************************************/
  2045. void SSCHandle_BT_POWER_ON(void)
  2046. {
  2047.     /*----------------------------------------------------------------*/
  2048.     /* Local Variables                                                */
  2049.     /*----------------------------------------------------------------*/
  2050.     UI_string_type text[2] = {L"BT Power On", L"BT Power Off" };
  2051.     /*----------------------------------------------------------------*/
  2052.     /* Code Body                                                      */
  2053.     /*----------------------------------------------------------------*/
  2054.     BTPowerOn();
  2055.     DisplayPopup((PU8) text[0], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  2056. }
  2057. /*****************************************************************************
  2058.  * FUNCTION
  2059.  *  SSCHandle_BT_POWER_OFF
  2060.  * DESCRIPTION
  2061.  *  
  2062.  * PARAMETERS
  2063.  *  void
  2064.  * RETURNS
  2065.  *  void
  2066.  *****************************************************************************/
  2067. void SSCHandle_BT_POWER_OFF(void)
  2068. {
  2069.     /*----------------------------------------------------------------*/
  2070.     /* Local Variables                                                */
  2071.     /*----------------------------------------------------------------*/
  2072.     UI_string_type text[2] = {L"BT Power On", L"BT Power Off" };
  2073.     /*----------------------------------------------------------------*/
  2074.     /* Code Body                                                      */
  2075.     /*----------------------------------------------------------------*/
  2076.     BTPowerOff();
  2077.     DisplayPopup((PU8) text[1], IMG_GLOBAL_ACTIVATED, 1, 1000, SUCCESS_TONE);
  2078. }
  2079. #endif /* __BTMTK__ */