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

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*****************************************************************************
  36.  *
  37.  * Filename:
  38.  * ---------
  39.  * SmsMoMtGuiInterface.C
  40.  *
  41.  * Project:
  42.  * --------
  43.  *   MAUI
  44.  *
  45.  * Description:
  46.  * ------------
  47.  *   This file is intends for MMI SMS APP.
  48.  *
  49.  * Author:
  50.  * -------
  51.  * -------
  52.  *
  53.  *============================================================================
  54.  *             HISTORY
  55.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  56.  *------------------------------------------------------------------------------
  57.  * removed!
  58.  *
  59.  * removed!
  60.  * removed!
  61.  * removed!
  62.  *
  63.  * removed!
  64.  * removed!
  65.  * removed!
  66.  *
  67.  * removed!
  68.  * removed!
  69.  * removed!
  70.  *
  71.  * removed!
  72.  * removed!
  73.  * removed!
  74.  *
  75.  * removed!
  76.  * removed!
  77.  * removed!
  78.  *
  79.  * removed!
  80.  * removed!
  81.  * removed!
  82.  *
  83.  * removed!
  84.  * removed!
  85.  * removed!
  86.  *
  87.  * removed!
  88.  * removed!
  89.  * removed!
  90.  *
  91.  * removed!
  92.  * removed!
  93.  * removed!
  94.  *
  95.  * removed!
  96.  * removed!
  97.  * removed!
  98.  *
  99.  * removed!
  100.  * removed!
  101.  * removed!
  102.  *
  103.  * removed!
  104.  * removed!
  105.  * removed!
  106.  *
  107.  * removed!
  108.  * removed!
  109.  * removed!
  110.  *
  111.  * removed!
  112.  * removed!
  113.  * removed!
  114.  *
  115.  * removed!
  116.  * removed!
  117.  * removed!
  118.  *
  119.  * removed!
  120.  * removed!
  121.  * removed!
  122.  *
  123.  * removed!
  124.  * removed!
  125.  * removed!
  126.  *
  127.  * removed!
  128.  * removed!
  129.  * removed!
  130.  *
  131.  * removed!
  132.  * removed!
  133.  * removed!
  134.  *
  135.  * removed!
  136.  * removed!
  137.  * removed!
  138.  *
  139.  * removed!
  140.  * removed!
  141.  * removed!
  142.  *
  143.  * removed!
  144.  * removed!
  145.  * removed!
  146.  *
  147.  * removed!
  148.  * removed!
  149.  * removed!
  150.  *
  151.  * removed!
  152.  * removed!
  153.  * removed!
  154.  *
  155.  * removed!
  156.  * removed!
  157.  * removed!
  158.  *
  159.  * removed!
  160.  * removed!
  161.  * removed!
  162.  *
  163.  * removed!
  164.  * removed!
  165.  * removed!
  166.  *
  167.  * removed!
  168.  * removed!
  169.  * removed!
  170.  *
  171.  * removed!
  172.  * removed!
  173.  * removed!
  174.  *
  175.  * removed!
  176.  * removed!
  177.  * removed!
  178.  *
  179.  * removed!
  180.  * removed!
  181.  * removed!
  182.  *
  183.  * removed!
  184.  * removed!
  185.  * removed!
  186.  *
  187.  * removed!
  188.  * removed!
  189.  * removed!
  190.  *
  191.  * removed!
  192.  * removed!
  193.  * removed!
  194.  *
  195.  * removed!
  196.  * removed!
  197.  * removed!
  198.  *
  199.  * removed!
  200.  * removed!
  201.  * removed!
  202.  *
  203.  * removed!
  204.  * removed!
  205.  * removed!
  206.  *
  207.  * removed!
  208.  * removed!
  209.  * removed!
  210.  *
  211.  * removed!
  212.  * removed!
  213.  * removed!
  214.  *
  215.  * removed!
  216.  * removed!
  217.  * removed!
  218.  *
  219.  * removed!
  220.  * removed!
  221.  * removed!
  222.  *
  223.  * removed!
  224.  * removed!
  225.  * removed!
  226.  *
  227.  * removed!
  228.  * removed!
  229.  * removed!
  230.  *
  231.  * removed!
  232.  * removed!
  233.  * removed!
  234.  *
  235.  * removed!
  236.  * removed!
  237.  * removed!
  238.  *
  239.  * removed!
  240.  * removed!
  241.  * removed!
  242.  *
  243.  * removed!
  244.  * removed!
  245.  * removed!
  246.  *
  247.  * removed!
  248.  * removed!
  249.  * removed!
  250.  *
  251.  * removed!
  252.  * removed!
  253.  * removed!
  254.  *
  255.  * removed!
  256.  * removed!
  257.  * removed!
  258.  *
  259.  * removed!
  260.  * removed!
  261.  * removed!
  262.  *
  263.  * removed!
  264.  * removed!
  265.  * removed!
  266.  *
  267.  * removed!
  268.  * removed!
  269.  * removed!
  270.  *
  271.  * removed!
  272.  * removed!
  273.  * removed!
  274.  *
  275.  * removed!
  276.  * removed!
  277.  * removed!
  278.  *
  279.  * removed!
  280.  * removed!
  281.  * removed!
  282.  *
  283.  * removed!
  284.  * removed!
  285.  * removed!
  286.  *
  287.  * removed!
  288.  * removed!
  289.  * removed!
  290.  *
  291.  * removed!
  292.  * removed!
  293.  * removed!
  294.  *
  295.  * removed!
  296.  * removed!
  297.  * removed!
  298.  *
  299.  * removed!
  300.  * removed!
  301.  * removed!
  302.  *
  303.  * removed!
  304.  * removed!
  305.  * removed!
  306.  *
  307.  * removed!
  308.  * removed!
  309.  * removed!
  310.  *
  311.  * removed!
  312.  * removed!
  313.  * removed!
  314.  *
  315.  * removed!
  316.  * removed!
  317.  * removed!
  318.  *
  319.  * removed!
  320.  * removed!
  321.  * removed!
  322.  *
  323.  * removed!
  324.  * removed!
  325.  * removed!
  326.  *
  327.  * removed!
  328.  * removed!
  329.  * removed!
  330.  *
  331.  * removed!
  332.  * removed!
  333.  * removed!
  334.  *
  335.  * removed!
  336.  * removed!
  337.  * removed!
  338.  *
  339.  * removed!
  340.  * removed!
  341.  * removed!
  342.  *
  343.  * removed!
  344.  * removed!
  345.  * removed!
  346.  *
  347.  * removed!
  348.  * removed!
  349.  * removed!
  350.  *
  351.  * removed!
  352.  * removed!
  353.  * removed!
  354.  *
  355.  * removed!
  356.  * removed!
  357.  * removed!
  358.  *
  359.  * removed!
  360.  * removed!
  361.  * removed!
  362.  *
  363.  * removed!
  364.  * removed!
  365.  * removed!
  366.  *
  367.  * removed!
  368.  * removed!
  369.  * removed!
  370.  *
  371.  * removed!
  372.  * removed!
  373.  * removed!
  374.  *
  375.  * removed!
  376.  * removed!
  377.  * removed!
  378.  *
  379.  * removed!
  380.  * removed!
  381.  * removed!
  382.  *
  383.  * removed!
  384.  * removed!
  385.  * removed!
  386.  *
  387.  * removed!
  388.  * removed!
  389.  * removed!
  390.  *
  391.  *------------------------------------------------------------------------------
  392.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  393.  *============================================================================
  394.  ****************************************************************************/
  395. /**
  396.  * Copyright Notice
  397.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  398.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  399.  *  (It is illegal to remove this copyright notice from this software or any
  400.  *  portion of it)
  401.  */
  402. /**************************************************************
  403.    FILENAME : SmsGuiHandler.c
  404.    PURPOSE     : SMS GUI handlers 
  405.    REMARKS     : nil
  406.    AUTHOR      : Manu Vikram and Magesh k, Hiran.
  407.    DATE     : 01-01-2003
  408. **************************************************************/
  409. #ifdef __MOD_SMSAL__
  410. /*  Include: MMI header file */
  411. #include "MMI_features.h"
  412. #include "stdC.h"
  413. #include "L4Dr1.h"
  414. #include "PixtelDataTypes.h"
  415. /* Manish MMS */
  416. #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
  417. #include "JMMSMainMMS.h"
  418. #include "JMMSResEnum.h"
  419. #endif /* (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT)) */ 
  420. #if (defined (JATAAYU_SUPPORT) && defined(WAP_SUPPORT))
  421. #include "JBrowserMMIDefs.h"
  422. #include "JProvWap.h"
  423. #endif /* (defined (JATAAYU_SUPPORT) && defined(WAP_SUPPORT)) */ 
  424. /* ... Add More MMI header */
  425. #include "EventsGprot.h"
  426. #include "HistoryGprot.h"
  427. #include "GlobalMenuItems.h"
  428. #include "GlobalConstants.h"
  429. #include "Globaldefs.h"
  430. #include "wgui_categories.h"
  431. #include "wgui_categories_inputs.h"
  432. #include "wgui_categories_popup.h"
  433. #include "CustMenuRes.h"
  434. #include "CommonScreens.h"
  435. #include "Unicodexdcl.h"
  436. #include "TimerEvents.h"
  437. #include "DebugInitDef.h"
  438. #include "ProtocolEvents.h"
  439. /* ...Add MSG header */
  440. #include "customer_ps_inc.h"
  441. #include "mmi_msg_context.h"
  442. #include "MessagesL4Def.h"
  443. #include "MessagesResourceData.h"
  444. #include "MessagesMiscell.h"
  445. #include "MessagesExDcl.h"
  446. #include "SmsGuiInterfaceProt.h"
  447. #include "SmsGuiInterfaceType.h"
  448. #include "SmsPsHandler.h"
  449. #include "CellBroadcastType.h"
  450. #ifdef __MMI_MESSAGES_CHAT__
  451. #include "ChatAppGprot.h"
  452. #include "ChatAppDef.h"
  453. #include "ChatGtype.h"
  454. #include "ChatAppGexdcl.h"
  455. #endif /* __MMI_MESSAGES_CHAT__ */ 
  456. #include "Gui_ems.h"
  457. #include "wgui_ems.h"
  458. #include "GSM7BitDefaultAlphabet.h"
  459. /*  */
  460. #include "smsal_l4c_enum.h"
  461. /*  */
  462. #include "NVRAMEnum.h"
  463. #include "NVRAMProt.h"
  464. #include "NVRAMType.h"
  465. /*  */
  466. #include "CSP.h"
  467. #include "FrameworkStruct.h"
  468. #include "MainMenuDef.h"
  469. #include "CallHistoryGProts.h"
  470. #include "CallManagementGprot.h"
  471. #include "CallhistoryEnum.h"
  472. #include "MiscFunctions.h"
  473. #include "SettingProfile.h"
  474. #include "ProfileGprots.h"
  475. #include "PhoneBookGprot.h"
  476. #include "IdleAppProt.h"
  477. #include "AlarmFrameworkProt.h"
  478. #include "wgui_status_icons.h"
  479. #include "gpioInc.h"
  480. #include "KeyBrd.h"
  481. #include "SubLCDHistoryGprot.h"
  482. #include "mdi_datatype.h"
  483. #include "mdi_audio.h"
  484. //KP Jerry add for third sevice on 2007-03-26 start
  485. #ifdef __KONG_NET_SP__
  486. #include "SettingDefs.h"
  487. #include  "SimDetectionDef.h"
  488. #endif
  489. //KP Jerry add for third sevice on 2007-03-26 end
  490. #include "SMSApi.h"
  491. #include "SMSStruct.h"
  492. #include "SMSFunc.h"
  493. #ifdef __MMI_EMAIL__
  494. #include "EmailAppGProt.h"
  495. #endif 
  496. #ifdef __MMI_IMPS__
  497. #include "mmi_imps_gprot.h"
  498. #endif 
  499. #ifdef WAP_SUPPORT
  500. #include "wap_ps_struct.h"
  501. #endif /* WAP_SUPPORT */
  502. #if defined(__MMI_WLAN_FEATURES__) && defined(__MMI_VOIP__)
  503. #include "NetworkSetupDefs.h"
  504. #include "VoIPGProt.h"
  505. #endif /* defined(__MMI_WLAN_FEATURES__) && defined(__MMI_VOIP__) */
  506. #if defined(__MMI_SMART_MESSAGE_MT__) || (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)) || defined(__MMI_MYPICTURE__)
  507. #include "wgui_tab_bars.h"
  508. #include "wgui_categories_MMS.h"
  509. #include "wgui_categories_IMPS.h"
  510. #include "PicMsgApiToOthers.h"
  511. #include "FileSystemDef.h"
  512. #include "FileManagerDef.h"
  513. #include "FileMgr.h"
  514. #include "MyTone.h"
  515. #include "MyPicture.h"
  516. #include "SMRTRingToneConverter.h"
  517. S8 RingtoneNameBuffer[NSM_FILE_NAME_BUFF];
  518. S8 PictureNameBuffer[NSM_FILE_NAME_BUFF];
  519. U8 *gPictureDataBuffer = NULL;
  520. U16 gSelected_Item = 0;
  521. U16 gConvertFlag = FALSE;
  522. U8 gPictureMessageError = 0;
  523. U8 TextBuffer[(MAX_PICMSG_DEFAULT_DCS_TEXT_LEN * ENCODING_LENGTH) + (10 * ENCODING_LENGTH)];
  524. extern U8 gaddtext_buffer[];
  525. #if defined(__MMI_MYPICTURE__)
  526. extern U8 gfilecount;
  527. #endif 
  528. extern U8 gNSMBuffer[1024];
  529. extern S8 g_pmsg_TextInMessage[];
  530. U8 *pnsmMessageAsciibuff = NULL;
  531. U16 RemoveZerosInBetween(U8 *pOutBuffer, U8 *pInBuffer, U16 size);
  532. #if defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)
  533. nsm_msg_struct g_nsm_msg_context;
  534. #if defined (MMI_ON_WIN32)
  535. extern U8 AshBmpDataHex[];
  536. #endif 
  537. U16 ManufacturerSYSPictureStrIDs[] =    /* ManufacturerPicture Str IDs */
  538. {
  539.     STR_ID_NSM2_PIC1,
  540.     STR_ID_NSM2_PIC2,
  541.     STR_ID_NSM2_PIC3,
  542.     STR_ID_NSM2_PIC4,
  543.     STR_ID_NSM2_PIC5,
  544.     STR_ID_NSM2_PIC6,
  545.     STR_ID_NSM2_PIC7,
  546.     STR_ID_NSM2_PIC8,
  547.     STR_ID_NSM2_PIC9,
  548.     STR_ID_NSM2_PIC10
  549. };
  550. U16 ManufacturerSYSPictureImageIDs[] = 
  551. {
  552.     IMG_NSM01_PIC,
  553.     IMG_NSM02_PIC,
  554.     IMG_NSM03_PIC,
  555.     IMG_NSM04_PIC,
  556.     IMG_NSM05_PIC,
  557.     IMG_NSM06_PIC,
  558.     IMG_NSM07_PIC,
  559.     IMG_NSM08_PIC,
  560.     IMG_NSM09_PIC,
  561.     IMG_NSM010_PIC
  562. };
  563. #define NSM_MANUFACTURER_PICTURE_NUM 10
  564. U8 static currMaxSYSObjectList = 0;
  565. #define PREDEFINED_PIC_BUFF_SIZE 404
  566. #endif /* defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__) */ 
  567. #endif /* defined(__MMI_SMART_MESSAGE_MT__) || (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)) || defined(__MMI_MYPICTURE__) */ 
  568. #ifdef __MMI_MESSAGES_USE_URL__
  569. #include "Wap.h"
  570. #define MAX_NUM_URL_PATTERN   3
  571. #define MAX_NUM_VALID_HTTP_PREFIX   6
  572. #define MAX_LEN_URL_PATTERN   15
  573. S8 urlHttp[10] = {0x68, 0x74, 0x74, 0x70, 0x3a, 0x1b, 0x5c, 0x1b, 0x5c, 0x00};
  574. S8 urlHttps[11] = {0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x1b, 0x5c, 0x1b, 0x5c, 0x00};
  575. const PS8 urlPattern[MAX_NUM_URL_PATTERN] = { "http", "www.", "wap." };
  576. const PS8 urlValidHttpPrefix[MAX_NUM_VALID_HTTP_PREFIX] =
  577.     { "http://", "http:\\", urlHttp, "https://", "https:\\", urlHttps};
  578. #endif /* __MMI_MESSAGES_USE_URL__ */ 
  579. #include "wapadp.h"
  580. #if defined(__MMI_SMART_MESSAGE_MT__)
  581. nsm_picmsg_text_struct picmsg_text_struct;
  582. #endif 
  583. #ifdef __MMI_UNIFIED_MESSAGE__
  584. #include "UnifiedMessageDef.h"
  585. #include "UnifiedMessageGProt.h"
  586. #endif /* __MMI_UNIFIED_MESSAGE__ */
  587. #ifdef __MMI_UNIFIED_COMPOSER__
  588. #include "UnifiedComposerDef.h"
  589. #include "UnifiedComposerGProt.h"
  590. #endif /* __MMI_UNIFIED_MESSAGE__ */
  591. //KP Jerry add on 2007-4-12 start
  592. #ifdef __MMI_MESSAGES_SENDMSG_QUICKLY__
  593. #include "JMMSStructs.h"
  594. #endif
  595. //KP Jerry add on 2007-4-12 end
  596. extern kal_uint16 wap_get_screen_id(void);
  597. /*  */
  598. #define ONE_DIGIT(value)                  ((value) % 10)
  599. extern EMSData *GetEMSDataForView(EMSData **p, U8 force);
  600. extern EMSData *GetEMSDataForEdit(EMSData **p, U8 force);
  601. extern U8 DeInitMessagesEMSBuffer(msg_ems_data_struct *pE);
  602. #ifdef WAP_SUPPORT
  603. extern int wap_entry_select_bookmark(void);
  604. #endif /* WAP_SUPPORT */
  605. //
  606. //////////////////////////////////////////////////////////////////////////////////////
  607. // local variables
  608. //////////////////////////////////////////////////////////////////////////////////////
  609. /********************************************************************
  610.                   variables
  611. ********************************************************************/
  612. msg_context_struct g_msg_cntx;
  613. static U16 msg_popup_strID;
  614. static U16 msg_popup_imgID;
  615. static U8 msg_popup_tonID;
  616. static U8 backgroundaudioresume = FALSE;
  617. static U16 msg_confirm_strID = STR_GLOBAL_OK;
  618. static FuncPtr msg_confirm_lskFuncPtr = NULL;
  619. static FuncPtr msg_confirm_rskFuncPtr = NULL;
  620. static FuncPtr msg_common_funcPtr = NULL;
  621. S16 processCaptionStrId;
  622. S16 processBodyStrId;
  623. U16 processAnimationImageId;
  624. U16 processRSKStrId;
  625. static msg_in_out_struct TotalInboxOutboxStatus;
  626. msg_active_profile_struct activeProfile;
  627. msg_msgbox_info_struct msgbox_info;
  628. extern PendingSaveSendDataStruct PendingSaveSendData;
  629. //KP Jerry add for third sevice on 2007-03-26 start
  630. #ifdef __KONG_NET_SP__
  631. extern U8 gPLMN[ ];
  632. ThumbWorldType ThumbWorldtype;
  633. WonderfulType Wonderfultype;
  634. SecretRoomType SecretRoomtype;
  635.  
  636. void EntryThumbWorldOkSubscribeHandler(void)
  637. {
  638.        if(memcmp(gPLMN,"46000", 5) == 0)
  639.    {
  640.    // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335561");  
  641. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  642.        }
  643.        else if(memcmp(gPLMN,"46001", 5) == 0)
  644.        {
  645. strcpy(g_msg_cntx.smsPhoneNumber, "935561");
  646.       // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"935561");
  647.        }
  648.        else
  649.     {
  650.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  651.         return;
  652.      }
  653.    
  654.        switch(ThumbWorldtype)
  655.         {
  656.        case THUMB_WORLD_TYPE_1:
  657.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  658.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "MM BGLKJ001S00", strlen("MM BGLKJ001S00"));
  659.   break;
  660.        case THUMB_WORLD_TYPE_2:
  661.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  662. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "AM BGLKJ001S00", strlen("AM BGLKJ001S00"));
  663. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"PM BGLKJ001S00");
  664. break;
  665.        case THUMB_WORLD_TYPE_3:
  666.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  667.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "MF BGLKJ001S00", strlen("MF BGLKJ001S00"));
  668.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"MM BGLKJ001S00");
  669.   break;
  670.        case THUMB_WORLD_TYPE_4:/**/
  671.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  672.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "QJ BGLKJ001S00", strlen("QJ BGLKJ001S00"));
  673.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"SG BGLKJ001S00");
  674.   break;
  675.        case THUMB_WORLD_TYPE_5:
  676.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  677.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "JR BGLKJ001S00", strlen("JR BGLKJ001S00"));
  678.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"Y BGLKJ001S00");
  679.   break;
  680.        case THUMB_WORLD_TYPE_6:
  681.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  682.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "GM BGLKJ001S00", strlen("GM BGLKJ001S00"));
  683.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"AM BGLKJ001S00");
  684.   break;
  685.        case THUMB_WORLD_TYPE_7:
  686.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  687.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "JS BGLKJ001S00", strlen("JS BGLKJ001S00"));
  688.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"MF BGLKJ001S00");
  689.   break;
  690.        case THUMB_WORLD_TYPE_8:
  691.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  692.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "NJ BGLKJ001S00", strlen("NJ BGLKJ001S00"));
  693.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"QJ BGLKJ001S00");
  694.   break;
  695.        case THUMB_WORLD_TYPE_9:
  696.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  697.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "H BGLKJ001S00", strlen("H BGLKJ001S00"));
  698.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"AQ BGLKJ001S00");
  699.   break;
  700.        case THUMB_WORLD_TYPE_10:
  701.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  702.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "A BGLKJ001S00", strlen("A BGLKJ001S00"));
  703.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"JR BGLKJ001S00");
  704.   break;
  705.  
  706.      case WEATHER_FORECAST_TYPE:
  707.   memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  708.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "TQ BGLKJ001S00", strlen("TQ BGLKJ001S00"));
  709.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"TQ BGLKJ001S00");
  710.   break;
  711.      case HANDPHONE_PAPER_TYPE:
  712.   memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  713.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "QJ BGLKJ001S00", strlen("QJ BGLKJ001S00"));
  714.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"TQ BGLKJ001S00");
  715.   break;
  716.      case CITY_FRIEND_TYPE:
  717.   memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  718.   AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "Y BGLKJ001S00", strlen("Y BGLKJ001S00"));
  719.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"TQ BGLKJ001S00");
  720.   break;
  721. default :
  722.   break; 
  723.    }
  724.    
  725.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  726. }
  727. void EntryThumbWorldOkOrderHandler(void)
  728. {
  729.        if(memcmp(gPLMN,"46000", 5) == 0)
  730.    {
  731. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  732. }
  733.        else if(memcmp(gPLMN,"46001", 5) == 0)
  734.     {
  735. strcpy(g_msg_cntx.smsPhoneNumber, "935546");
  736.        }
  737.        else
  738.     {
  739.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  740.         return;
  741.      }
  742.    
  743.        switch(ThumbWorldtype)
  744.         {
  745.        case THUMB_WORLD_TYPE_4:
  746.        memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  747.     AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "QJA BGLKJ001S00", strlen("QJA BGLKJ001S00"));
  748.     //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"SGA BGLKJ001S00");
  749.     break;
  750.    case THUMB_WORLD_TYPE_8:
  751.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  752. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "NJA BGLKJ001S00", strlen("NJA BGLKJ001S00"));
  753. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"QJA BGLKJ001S00");
  754. break;
  755.      
  756. case WEATHER_FORECAST_TYPE:
  757. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  758. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"TW BGLKJ001S00");
  759. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "TW BGLKJ001S00", strlen("TW BGLKJ001S00"));
  760. break;
  761. case HANDPHONE_PAPER_TYPE:
  762. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  763. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"TW BGLKJ001S00");
  764. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "QJA BGLKJ001S00", strlen("QJA BGLKJ001S00"));
  765. break;
  766. default :
  767.   break; 
  768.    }
  769.    
  770.         mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);   
  771. }
  772. void EntryThumbWorldOkFareHelpHandler(void)
  773. {
  774.        if(memcmp(gPLMN,"46000", 5) == 0)
  775.    {
  776. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  777.        }
  778.        else if(memcmp(gPLMN,"46001", 5) == 0)
  779.    {
  780. strcpy(g_msg_cntx.smsPhoneNumber, "935561");
  781.        }
  782.        else
  783.        {
  784.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  785.         return;
  786.        }
  787.    
  788.        switch(ThumbWorldtype)
  789.         {
  790.        case THUMB_WORLD_TYPE_1:
  791.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  792. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXJQNV BGLKJ001S00", strlen("ZFSYXJQNV BGLKJ001S00"));
  793. break;
  794.         case THUMB_WORLD_TYPE_2:
  795.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  796. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXKZYLQ BGLKJ001S00", strlen("ZFSYXKZYLQ BGLKJ001S00"));
  797. break;
  798.         case THUMB_WORLD_TYPE_3:
  799.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  800.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXZXQY BGLKJ001S00", strlen("ZFSYXZXQY BGLKJ001S00"));
  801.    break;
  802.         case THUMB_WORLD_TYPE_4:
  803.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  804.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSQJXW BGLKJ001S00", strlen("ZFSQJXW BGLKJ001S00"));
  805.    break;
  806.         case THUMB_WORLD_TYPE_5:
  807.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  808.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSTLJRJNH BGLKJ001S00", strlen("ZFSTLJRJNH BGLKJ001S00"));
  809.    break;
  810.         case THUMB_WORLD_TYPE_6:
  811.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  812.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYCXZYC BGLKJ001S00", strlen("ZFSYCXZYC BGLKJ001S00"));
  813.    break;
  814.         case THUMB_WORLD_TYPE_7:
  815.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  816.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSWEYYJS BGLKJ001S00", strlen("ZFSWEYYJS BGLKJ001S00"));
  817.    break;
  818.         case THUMB_WORLD_TYPE_8:
  819.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  820.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSXXNJJZW BGLKJ001S00", strlen("ZFSXXNJJZW BGLKJ001S00"));
  821.    break;
  822.         case THUMB_WORLD_TYPE_9:
  823.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  824.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXHLBT BGLKJ001S00", strlen("ZFSYXHLBT BGLKJ001S00"));
  825.    break;
  826.         case THUMB_WORLD_TYPE_10:
  827.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  828.    AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXDXYX BGLKJ001S00", strlen("ZFSYXDXYX BGLKJ001S00"));
  829.    break;
  830. case WEATHER_FORECAST_TYPE:
  831. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  832. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSTQ BGLKJ001S00", strlen("ZFSTQ BGLKJ001S00"));
  833. break;
  834. case HANDPHONE_PAPER_TYPE:
  835. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  836. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSQJXW BGLKJ001S00", strlen("ZFSQJXW BGLKJ001S00"));
  837. break;
  838. case CITY_FRIEND_TYPE:
  839. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  840. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXYWCS BGLKJ001S00", strlen("ZFSYXYWCS BGLKJ001S00"));
  841. break;
  842. default :
  843.   break; 
  844.    }
  845.    
  846.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);    
  847. }
  848. void EntryWonderfulOkSubscribeHandler(void)
  849. {
  850.     //   if(memcmp(gPLMN,"46000", 5) == 0)
  851.        // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335578");  
  852.        strcpy(g_msg_cntx.smsPhoneNumber, "335578");
  853.         switch(Wonderfultype)
  854.         {
  855.               case WONDERFUL_TYPE_1:
  856.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  857. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"M BGLKJ001M00");
  858. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "M BGLKJ001M00", strlen("M BGLKJ001M00"));
  859. break;
  860.        case WONDERFUL_TYPE_2:
  861.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  862. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"DJ BGLKJ001M00");
  863. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "DJ BGLKJ001M00", strlen("DJ BGLKJ001M00"));
  864. break;
  865.               case WONDERFUL_TYPE_3:
  866.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  867. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XQW BGLKJ001M00");
  868. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XQW BGLKJ001M00", strlen("XQW BGLKJ001M00"));
  869. break;
  870.               case WONDERFUL_TYPE_4:
  871.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  872. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"MX BGLKJ001M00");
  873. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "MX BGLKJ001M00", strlen("MX BGLKJ001M00"));
  874. break;
  875.               case WONDERFUL_TYPE_5:
  876.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  877. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"YM BGLKJ001M00");
  878. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "YM BGLKJ001M00", strlen("YM BGLKJ001M00"));
  879. break;
  880.               case WONDERFUL_TYPE_6:
  881.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  882. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XGKT BGLKJ001M00");
  883. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XGKT BGLKJ001M00", strlen("XGKT BGLKJ001M00"));
  884. break;
  885.               case WONDERFUL_TYPE_7:
  886.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  887. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"YLY BGLKJ001M00");
  888. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "YLY BGLKJ001M00", strlen("YLY BGLKJ001M00"));
  889. break;
  890.               case WONDERFUL_TYPE_8:
  891.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  892. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XW BGLKJ001M00");
  893. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XW BGLKJ001M00", strlen("XW BGLKJ001M00"));
  894. break;
  895.               case WONDERFUL_TYPE_9:
  896.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  897. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XQM BGLKJ001M00");
  898. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XQM BGLKJ001M00", strlen("XQM BGLKJ001M00"));
  899. break;
  900.               case WONDERFUL_TYPE_10:
  901.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  902. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"AMC BGLKJ001M00");
  903. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "AMC BGLKJ001M00", strlen("AMC BGLKJ001M00"));
  904. break;
  905. // more....
  906.               case WONDERFUL_MORE_TYPE_1:
  907.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  908. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"DYY BGLKJ001M00");
  909. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "DYY BGLKJ001M00", strlen("DYY BGLKJ001M00"));
  910. break;
  911.               case WONDERFUL_MORE_TYPE_2:
  912.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  913. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"GAME BGLKJ001M00");
  914. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "GAME BGLKJ001M00", strlen("GAME BGLKJ001M00"));
  915. break;
  916.               case WONDERFUL_MORE_TYPE_3:
  917.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  918. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"BG BGLKJ001M00");
  919. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "BG BGLKJ001M00", strlen("BG BGLKJ001M00"));
  920. break;
  921.               case WONDERFUL_MORE_TYPE_4:
  922.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  923. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"CL BGLKJ001M00");
  924. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CL BGLKJ001M00", strlen("CL BGLKJ001M00"));
  925. break;
  926. case WONDERFUL_MORE_TYPE_5:
  927.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  928. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XWF BGLKJ001M00");
  929. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XWF BGLKJ001M00", strlen("XWF BGLKJ001M00"));
  930. break;
  931. case WONDERFUL_MORE_TYPE_6:
  932.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  933. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"GUI BGLKJ001M00");
  934. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "GUI BGLKJ001M00", strlen("GUI BGLKJ001M00"));
  935. break;
  936. case WONDERFUL_MORE_TYPE_7:
  937.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  938. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"EAT BGLKJ001M00");
  939. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "EAT BGLKJ001M00", strlen("EAT BGLKJ001M00"));
  940. break;
  941. case WONDERFUL_MORE_TYPE_8:
  942.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  943. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"RS BGLKJ001M00");
  944. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "RS BGLKJ001M00", strlen("RS BGLKJ001M00"));
  945. break;
  946. case WONDERFUL_MORE_TYPE_9:
  947.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  948. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"CSC BGLKJ001M00");
  949. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CSC BGLKJ001M00", strlen("CSC BGLKJ001M00"));
  950. break;
  951. case WONDERFUL_MORE_TYPE_10:
  952.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  953. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"LXJ BGLKJ001M00");
  954. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "LXJ BGLKJ001M00", strlen("LXJ BGLKJ001M00"));
  955. break;
  956. // melody...
  957.        case PIC_MELODY_DWD_TYPE_1:
  958. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  959. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"LS BGLKJ001M00");
  960. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "LS BGLKJ001M00", strlen("LS BGLKJ001M00"));
  961. break;
  962. case PIC_MELODY_DWD_TYPE_2:
  963. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  964. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"DT BGLKJ001M00");
  965. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "DT BGLKJ001M00", strlen("DT BGLKJ001M00"));
  966. break;
  967. case PIC_MELODY_DWD_TYPE_4:
  968. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  969. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"HX BGLKJ001M00");
  970. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "HX BGLKJ001M00", strlen("HX BGLKJ001M00"));
  971. break;
  972. case PIC_MELODY_DWD_TYPE_7:
  973. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  974. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"SD BGLKJ001M00");
  975. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "SD BGLKJ001M00", strlen("SD BGLKJ001M00"));
  976. break;
  977. case PIC_MELODY_DWD_TYPE_8:
  978. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  979. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"CFZ BGLKJ001M00");
  980. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CFZ BGLKJ001M00", strlen("CFZ BGLKJ001M00"));
  981. break;
  982. case PIC_MELODY_DWD_TYPE_10:
  983. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  984. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"CFS BGLKJ001M00");
  985. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CFS BGLKJ001M00", strlen("CFS BGLKJ001M00"));
  986. break;
  987. // fashion live
  988. case FASHION_LIVE_TYPE_1:
  989. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  990. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "XW BGLKJ001M00", strlen("XW BGLKJ001M00"));
  991. break;
  992. case FASHION_LIVE_TYPE_2:
  993. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  994. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "BG BGLKJ001M00", strlen("BG BGLKJ001M00"));
  995. break;
  996. case FASHION_LIVE_TYPE_3:
  997. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  998. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "NEWM BGLKJ001M00", strlen("NEWM BGLKJ001M00"));
  999. break;
  1000. case FASHION_LIVE_TYPE_4:
  1001. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1002. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "YLY BGLKJ001M00", strlen("YLY BGLKJ001M00"));
  1003. break;
  1004. case FASHION_LIVE_TYPE_5:
  1005. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1006. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CL BGLKJ001M00", strlen("CL BGLKJ001M00"));
  1007. break;
  1008. case FASHION_LIVE_TYPE_6:
  1009. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1010. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "CSS BGLKJ001M00", strlen("CSS BGLKJ001M00"));
  1011. break;
  1012. case FASHION_LIVE_TYPE_7:
  1013. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1014. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "GUI BGLKJ001M00", strlen("GUI BGLKJ001M00"));
  1015. break;
  1016. case FASHION_LIVE_TYPE_8:
  1017. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1018. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "EAT BGLKJ001M00", strlen("EAT BGLKJ001M00"));
  1019. break;
  1020. default :
  1021.   break; 
  1022.    }
  1023.    
  1024.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1025. }
  1026. void EntryWonderfulOkOrderHandler(void)
  1027. {
  1028.     //   if(memcmp(gPLMN,"46000", 5) == 0)
  1029.        // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335578");  
  1030.        strcpy(g_msg_cntx.smsPhoneNumber, "335578");
  1031.         switch(Wonderfultype)
  1032.         {
  1033.               case WONDERFUL_TYPE_1:
  1034.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1035. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OM BGLKJ001M00");
  1036. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OM BGLKJ001M00", strlen("OM BGLKJ001M00"));
  1037. break;
  1038.        case WONDERFUL_TYPE_2:
  1039.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1040. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ODJ BGLKJ001M00");
  1041. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ODJ BGLKJ001M00", strlen("ODJ BGLKJ001M00"));
  1042. break;
  1043.               case WONDERFUL_TYPE_3:
  1044.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1045. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXQW BGLKJ001M00");
  1046. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXQW BGLKJ001M00", strlen("OXQW BGLKJ001M00"));
  1047. break;
  1048.               case WONDERFUL_TYPE_4:
  1049.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1050. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OMX BGLKJ001M00");
  1051. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OMX BGLKJ001M00", strlen("OMX BGLKJ001M00"));
  1052. break;
  1053.               case WONDERFUL_TYPE_5:
  1054.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1055. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OYM BGLKJ001M00");
  1056. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OYM BGLKJ001M00", strlen("OYM BGLKJ001M00"));
  1057. break;
  1058.               case WONDERFUL_TYPE_6:
  1059.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1060. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXGKT BGLKJ001M00");
  1061. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXGKT BGLKJ001M00", strlen("OXGKT BGLKJ001M00"));
  1062. break;
  1063.               case WONDERFUL_TYPE_7:
  1064.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1065. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OYLY BGLKJ001M00");
  1066. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OYLY BGLKJ001M00", strlen("OYLY BGLKJ001M00"));
  1067. break;
  1068.               case WONDERFUL_TYPE_8:
  1069.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1070. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXW BGLKJ001M00");
  1071. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXW BGLKJ001M00", strlen("OXW BGLKJ001M00"));
  1072. break;
  1073.               case WONDERFUL_TYPE_9:
  1074.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1075. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXQM BGLKJ001M00");
  1076. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXQM BGLKJ001M00", strlen("OXQM BGLKJ001M00"));
  1077. break;
  1078.               case WONDERFUL_TYPE_10:
  1079.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1080. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OAMC BGLKJ001M00");
  1081. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OAMC BGLKJ001M00", strlen("OAMC BGLKJ001M00"));
  1082. break;
  1083. // more .....
  1084.               case WONDERFUL_MORE_TYPE_1:
  1085.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1086. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ODYY BGLKJ001M00");
  1087. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ODYY BGLKJ001M00", strlen("ODYY BGLKJ001M00"));
  1088. break;
  1089.               case WONDERFUL_MORE_TYPE_2:
  1090.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1091. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OGAME BGLKJ001M00");
  1092. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OGAME BGLKJ001M00", strlen("OGAME BGLKJ001M00"));
  1093. break;
  1094.               case WONDERFUL_MORE_TYPE_3:
  1095.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1096. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OBG BGLKJ001M00");
  1097. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OBG BGLKJ001M00", strlen("OBG BGLKJ001M00"));
  1098. break;
  1099.               case WONDERFUL_MORE_TYPE_4:
  1100.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1101. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OCL BGLKJ001M00");
  1102. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OCL BGLKJ001M00", strlen("OCL BGLKJ001M00"));
  1103. break;
  1104. case WONDERFUL_MORE_TYPE_5:
  1105.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1106. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXWF BGLKJ001M00");
  1107. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXWF BGLKJ001M00", strlen("OXWF BGLKJ001M00"));
  1108. break;
  1109. case WONDERFUL_MORE_TYPE_6:
  1110.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1111. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OGUI BGLKJ001M00");
  1112. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OGUI BGLKJ001M00", strlen("OGUI BGLKJ001M00"));
  1113. break;
  1114. case WONDERFUL_MORE_TYPE_7:
  1115.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1116. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OEAT BGLKJ001M00");
  1117. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OEAT BGLKJ001M00", strlen("OEAT BGLKJ001M00"));
  1118. break;
  1119. case WONDERFUL_MORE_TYPE_8:
  1120.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1121. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ORS BGLKJ001M00");
  1122. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ORS BGLKJ001M00", strlen("ORS BGLKJ001M00"));
  1123. break;
  1124. case WONDERFUL_MORE_TYPE_10:
  1125.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1126. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OLXJ BGLKJ001M00");
  1127. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OLXJ BGLKJ001M00", strlen("OLXJ BGLKJ001M00"));
  1128. break;
  1129. // melody download...
  1130. case PIC_MELODY_DWD_TYPE_1:
  1131. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1132. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OLS BGLKJ001M00");
  1133. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OLS BGLKJ001M00", strlen("OLS BGLKJ001M00"));
  1134. break;
  1135. case PIC_MELODY_DWD_TYPE_2:
  1136. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1137. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ODT BGLKJ001M00");
  1138. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ODT BGLKJ001M00", strlen("ODT BGLKJ001M00"));
  1139. break;
  1140. case PIC_MELODY_DWD_TYPE_3:
  1141. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1142. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"39DS0063 BGLKJ001M00");
  1143. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "39DS0063 BGLKJ001M00", strlen("39DS0063 BGLKJ001M00"));
  1144. break;
  1145. case PIC_MELODY_DWD_TYPE_4:
  1146. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1147. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OHX BGLKJ001M00");
  1148. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OHX BGLKJ001M00", strlen("OHX BGLKJ001M00"));
  1149. break;
  1150. case PIC_MELODY_DWD_TYPE_5:
  1151. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1152. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"39DS0011 BGLKJ001M00");
  1153. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "39DS0011 BGLKJ001M00", strlen("39DS0011 BGLKJ001M00"));
  1154. break;
  1155. case PIC_MELODY_DWD_TYPE_6:
  1156. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1157. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"39DS0053 BGLKJ001M00");
  1158. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "39DS0053 BGLKJ001M00", strlen("39DS0053 BGLKJ001M00"));
  1159. break;
  1160. case PIC_MELODY_DWD_TYPE_7:
  1161. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1162. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OSD BGLKJ001M00");
  1163. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OSD BGLKJ001M00", strlen("OSD BGLKJ001M00"));
  1164. break;
  1165. case PIC_MELODY_DWD_TYPE_8:
  1166. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1167. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OCFZ BGLKJ001M00");
  1168. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OCFZ BGLKJ001M00", strlen("OCFZ BGLKJ001M00"));
  1169. break;
  1170. case PIC_MELODY_DWD_TYPE_9:
  1171. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1172. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"39DS0041 BGLKJ001M00");
  1173. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "39DS0041 BGLKJ001M00", strlen("39DS0041 BGLKJ001M00"));
  1174. break;
  1175. case PIC_MELODY_DWD_TYPE_10:
  1176. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1177. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OCFS BGLKJ001M00");
  1178. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OCFS BGLKJ001M00", strlen("OCFS BGLKJ001M00"));
  1179. break;
  1180. // fashion live
  1181. case FASHION_LIVE_TYPE_1:
  1182. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1183. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXW BGLKJ001M00", strlen("OXW BGLKJ001M00"));
  1184. break;
  1185. case FASHION_LIVE_TYPE_2:
  1186. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1187. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OBG BGLKJ001M00", strlen("OBG BGLKJ001M00"));
  1188. break;
  1189. case FASHION_LIVE_TYPE_3:
  1190. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1191. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ONEWM BGLKJ001M00", strlen("ONEWM BGLKJ001M00"));
  1192. break;
  1193. case FASHION_LIVE_TYPE_4:
  1194. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1195. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OYLY BGLKJ001M00", strlen("OYLY BGLKJ001M00"));
  1196. break;
  1197. case FASHION_LIVE_TYPE_5:
  1198. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1199. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OCL BGLKJ001M00", strlen("OCL BGLKJ001M00"));
  1200. break;
  1201. case FASHION_LIVE_TYPE_6:
  1202. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1203. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OXQM BGLKJ001M00", strlen("OXQM BGLKJ001M00"));
  1204. break;
  1205. case FASHION_LIVE_TYPE_7:
  1206. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1207. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OGUI BGLKJ001M00", strlen("OGUI BGLKJ001M00"));
  1208. break;
  1209. case FASHION_LIVE_TYPE_8:
  1210. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1211. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "OEAT BGLKJ001M00", strlen("OEAT BGLKJ001M00"));
  1212. break;
  1213. default :
  1214.   break; 
  1215.    }
  1216.    
  1217.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1218. }
  1219. void EntryWonderfulOkFareHelpHandler(void)
  1220. {
  1221.     //   if(memcmp(gPLMN,"46000", 5) == 0)
  1222.       //  UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335578");  
  1223.       strcpy(g_msg_cntx.smsPhoneNumber, "335578");
  1224.         switch(Wonderfultype)
  1225.         {
  1226.               case WONDERFUL_TYPE_1:
  1227.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1228. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFM BGLKJ001M00");
  1229. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFM BGLKJ001M00", strlen("ZFM BGLKJ001M00"));
  1230. break;
  1231.        case WONDERFUL_TYPE_2:
  1232.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1233. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFDJ BGLKJ001M00");
  1234. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFDJ BGLKJ001M00", strlen("ZFDJ BGLKJ001M00"));
  1235. break;
  1236.               case WONDERFUL_TYPE_3:
  1237.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1238. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXQW BGLKJ001M00");
  1239. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXQW BGLKJ001M00", strlen("ZFXQW BGLKJ001M00"));
  1240. break;
  1241.               case WONDERFUL_TYPE_4:
  1242.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1243. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFMX BGLKJ001M00");
  1244. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFMX BGLKJ001M00", strlen("ZFMX BGLKJ001M00"));
  1245. break;
  1246.               case WONDERFUL_TYPE_5:
  1247.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1248. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFYM BGLKJ001M00");
  1249. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFYM BGLKJ001M00", strlen("ZFYM BGLKJ001M00"));
  1250. break;
  1251.               case WONDERFUL_TYPE_6:
  1252.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1253. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXGKT BGLKJ001M00");
  1254. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXGKT BGLKJ001M00", strlen("ZFXGKT BGLKJ001M00"));
  1255. break;
  1256.               case WONDERFUL_TYPE_7:
  1257.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1258. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFYLY BGLKJ001M00");
  1259. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFYLY BGLKJ001M00", strlen("ZFYLY BGLKJ001M00"));
  1260. break;
  1261.               case WONDERFUL_TYPE_8:
  1262.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1263. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXW BGLKJ001M00");
  1264. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXW BGLKJ001M00", strlen("ZFXW BGLKJ001M00"));
  1265. break;
  1266.               case WONDERFUL_TYPE_9:
  1267.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1268. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXQM BGLKJ001M00");
  1269. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXQM BGLKJ001M00", strlen("ZFXQM BGLKJ001M00"));
  1270. break;
  1271.               case WONDERFUL_TYPE_10:
  1272.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1273. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFAMC BGLKJ001M00");
  1274. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFAMC BGLKJ001M00", strlen("ZFAMC BGLKJ001M00"));
  1275. break;
  1276.               case WONDERFUL_MORE_TYPE_1:
  1277.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1278. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFDYY BGLKJ001M00");
  1279. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFDYY BGLKJ001M00", strlen("ZFDYY BGLKJ001M00"));
  1280. break;
  1281.               case WONDERFUL_MORE_TYPE_2:
  1282.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1283. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFGAME BGLKJ001M00");
  1284. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFGAME BGLKJ001M00", strlen("ZFGAME BGLKJ001M00"));
  1285. break;
  1286.               case WONDERFUL_MORE_TYPE_3:
  1287.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1288. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFBG BGLKJ001M00");
  1289. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFBG BGLKJ001M00", strlen("ZFBG BGLKJ001M00"));
  1290. break;
  1291.               case WONDERFUL_MORE_TYPE_4:
  1292.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1293. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFCL BGLKJ001M00");
  1294. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCL BGLKJ001M00", strlen("ZFCL BGLKJ001M00"));
  1295. break;
  1296. case WONDERFUL_MORE_TYPE_5:
  1297.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1298. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXWF BGLKJ001M00");
  1299. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXWF BGLKJ001M00", strlen("ZFXWF BGLKJ001M00"));
  1300. break;
  1301. case WONDERFUL_MORE_TYPE_6:
  1302.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1303. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFGUI BGLKJ001M00");
  1304. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFGUI BGLKJ001M00", strlen("ZFGUI BGLKJ001M00"));
  1305. break;
  1306. case WONDERFUL_MORE_TYPE_7:
  1307.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1308. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFEAT BGLKJ001M00");
  1309. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFEAT BGLKJ001M00", strlen("ZFEAT BGLKJ001M00"));
  1310. break;
  1311. case WONDERFUL_MORE_TYPE_8:
  1312.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1313. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFRS BGLKJ001M00");
  1314. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFRS BGLKJ001M00", strlen("ZFRS BGLKJ001M00"));
  1315. break;
  1316. case WONDERFUL_MORE_TYPE_9:
  1317.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1318. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFCSC BGLKJ001M00");
  1319. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCSC BGLKJ001M00", strlen("ZFCSC BGLKJ001M00"));
  1320. break;
  1321. case WONDERFUL_MORE_TYPE_10:
  1322.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1323. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFLXJ BGLKJ001M00");
  1324. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFLXJ BGLKJ001M00", strlen("ZFLXJ BGLKJ001M00"));
  1325. break;
  1326. // melody 
  1327. case PIC_MELODY_DWD_TYPE_1:
  1328. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1329. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFLS BGLKJ001M00");
  1330. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFLS BGLKJ001M00", strlen("ZFLS BGLKJ001M00"));
  1331. break;
  1332. case PIC_MELODY_DWD_TYPE_2:
  1333. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1334. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFDT BGLKJ001M00");
  1335. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFDT BGLKJ001M00", strlen("ZFDT BGLKJ001M00"));
  1336. break;
  1337. case PIC_MELODY_DWD_TYPE_3:
  1338. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1339. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZF39DS0063 BGLKJ001M00");
  1340. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZF39DS0063 BGLKJ001M00", strlen("ZF39DS0063 BGLKJ001M00"));
  1341. break;
  1342. case PIC_MELODY_DWD_TYPE_4:
  1343. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1344. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFHX BGLKJ001M00");
  1345. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFHX BGLKJ001M00", strlen("ZFHX BGLKJ001M00"));
  1346. break;
  1347. case PIC_MELODY_DWD_TYPE_5:
  1348. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1349. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZF39DS0011 BGLKJ001M00");
  1350. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZF39DS0011 BGLKJ001M00", strlen("ZF39DS0011 BGLKJ001M00"));
  1351. break;
  1352. case PIC_MELODY_DWD_TYPE_6:
  1353. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1354. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZF39DS0053 BGLKJ001M00");
  1355. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZF39DS0053 BGLKJ001M00", strlen("ZF39DS0053 BGLKJ001M00"));
  1356. break;
  1357. case PIC_MELODY_DWD_TYPE_7:
  1358. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1359. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFSD BGLKJ001M00");
  1360. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSD BGLKJ001M00", strlen("ZFSD BGLKJ001M00"));
  1361. break;
  1362. case PIC_MELODY_DWD_TYPE_8:
  1363. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1364. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFCFZ BGLKJ001M00");
  1365. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCFZ BGLKJ001M00", strlen("ZFCFZ BGLKJ001M00"));
  1366. break;
  1367. case PIC_MELODY_DWD_TYPE_9:
  1368. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1369. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZF39DS0041 BGLKJ001M00");
  1370. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZF39DS0041 BGLKJ001M00", strlen("ZF39DS0041 BGLKJ001M00"));
  1371. break;
  1372. case PIC_MELODY_DWD_TYPE_10:
  1373. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1374. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFCFS BGLKJ001M00");
  1375. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCFS BGLKJ001M00", strlen("ZFCFS BGLKJ001M00"));
  1376. break;
  1377. // fashion live
  1378. case FASHION_LIVE_TYPE_1:
  1379. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1380. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFXW BGLKJ001M00", strlen("ZFXW BGLKJ001M00"));
  1381. break;
  1382. case FASHION_LIVE_TYPE_2:
  1383. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1384. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFBG BGLKJ001M00", strlen("ZFBG BGLKJ001M00"));
  1385. break;
  1386. case FASHION_LIVE_TYPE_3:
  1387. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1388. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFNEWM  BGLKJ001M00", strlen("ZFNEWM  BGLKJ001M00"));
  1389. break;
  1390. case FASHION_LIVE_TYPE_4:
  1391. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1392. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFYLY BGLKJ001M00", strlen("ZFYLY BGLKJ001M00"));
  1393. break;
  1394. case FASHION_LIVE_TYPE_5:
  1395. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1396. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCL BGLKJ001M00", strlen("ZFCL BGLKJ001M00"));
  1397. break;
  1398. case FASHION_LIVE_TYPE_6:
  1399. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1400. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFCSS BGLKJ001M00", strlen("ZFCSS BGLKJ001M00"));
  1401. break;
  1402. case FASHION_LIVE_TYPE_7:
  1403. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1404. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFGUI BGLKJ001M00", strlen("ZFGUI BGLKJ001M00"));
  1405. break;
  1406. case FASHION_LIVE_TYPE_8:
  1407. memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1408. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFEAT BGLKJ001M00", strlen("ZFEAT BGLKJ001M00"));
  1409. break;
  1410. default :
  1411.   break; 
  1412.    }
  1413.    
  1414.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1415. }
  1416. void EntrySecretRoomOkSubscribeHandler(void)
  1417. {
  1418.        if(memcmp(gPLMN,"46000", 5) == 0)
  1419.    {
  1420.    // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335561");  
  1421. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  1422.        }
  1423.        else if(memcmp(gPLMN,"46001", 5) == 0)
  1424.        {
  1425. strcpy(g_msg_cntx.smsPhoneNumber, "935561");
  1426.       // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"935561");
  1427.        }
  1428.        else
  1429.    {
  1430.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  1431.         return;
  1432.    }
  1433.         switch(SecretRoomtype)
  1434.         {
  1435.         case SECRETROOM_TYPE_1:
  1436.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1437.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"M BGLKJ001M00");
  1438. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "JE BGLKJ001S00", strlen("JE BGLKJ001S00"));
  1439.    break;
  1440.        case SECRETROOM_TYPE_2:
  1441.    memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1442. //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"DJ BGLKJ001M00");
  1443. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "PM BGLKJ001S00", strlen("PM BGLKJ001S00"));
  1444. break;
  1445.         case SECRETROOM_TYPE_3:
  1446.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1447.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XQW BGLKJ001M00");
  1448. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "SG BGLKJ001S00", strlen("SG BGLKJ001S00"));
  1449.    break;
  1450.         case SECRETROOM_TYPE_4:
  1451.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1452.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"MX BGLKJ001M00");
  1453. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "Y BGLKJ001S00", strlen("Y BGLKJ001S00"));
  1454.    break;
  1455.         case SECRETROOM_TYPE_5:
  1456.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1457.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"YM BGLKJ001M00");
  1458. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "AQ BGLKJ001S00", strlen("AQ BGLKJ001S00"));
  1459.    break;
  1460.         case SECRETROOM_TYPE_6:
  1461.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1462.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XGKT BGLKJ001M00");
  1463. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "TL BGLKJ001S00", strlen("TL BGLKJ001S00"));
  1464.    break;
  1465.         case SECRETROOM_TYPE_7:
  1466.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1467.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"YLY BGLKJ001M00");
  1468. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "MQ BGLKJ001S00", strlen("MQ BGLKJ001S00"));
  1469.    break;
  1470.         case SECRETROOM_TYPE_8:
  1471.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1472.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XW BGLKJ001M00");
  1473. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "YDLY BGLKJ001S00", strlen("YDLY BGLKJ001S00"));
  1474.    break;
  1475.         case SECRETROOM_TYPE_9:
  1476.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1477.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"XQM BGLKJ001M00");
  1478. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "AI BGLKJ001S00", strlen("AI BGLKJ001S00"));
  1479.    break;
  1480.         case SECRETROOM_TYPE_10:
  1481.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1482.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"AMC BGLKJ001M00");
  1483. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "PK BGLKJ001S00", strlen("PK BGLKJ001S00"));
  1484.    break;
  1485. default :
  1486.   break; 
  1487.    }
  1488.    
  1489.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1490. }
  1491. void EntrySecretRoomOkOrderHandler(void)
  1492. {
  1493.        if(memcmp(gPLMN,"46000", 5) == 0)
  1494.    {
  1495.    // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335561");  
  1496. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  1497.        }
  1498.        else if(memcmp(gPLMN,"46001", 5) == 0)
  1499.        {
  1500. strcpy(g_msg_cntx.smsPhoneNumber, "935561");
  1501.       // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"935561");
  1502.        }
  1503.        else
  1504.    {
  1505.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  1506.         return;
  1507.    }
  1508.         switch(SecretRoomtype)
  1509.         {
  1510.         case SECRETROOM_TYPE_1:
  1511.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1512.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OM BGLKJ001M00");
  1513. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "JPA BGLKJ001S00", strlen("JPA BGLKJ001S00"));
  1514.    break;
  1515.         case SECRETROOM_TYPE_2:
  1516.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1517.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ODJ BGLKJ001M00");
  1518. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "PMA BGLKJ001S00", strlen("PMA BGLKJ001S00"));
  1519.   break;
  1520.         case SECRETROOM_TYPE_3:
  1521.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1522.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OXQW BGLKJ001M00");
  1523. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "SGA BGLKJ001S00", strlen("SGA BGLKJ001S00"));
  1524.    break;
  1525.         case SECRETROOM_TYPE_5:
  1526.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1527.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"OMX BGLKJ001M00");
  1528. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "AQA BGLKJ001S00", strlen("AQA BGLKJ001S00"));
  1529.    break;
  1530. default :
  1531.   break; 
  1532.    }
  1533.    
  1534.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1535. }
  1536. void EntrySecretRoomOkFareHelpHandler(void)
  1537. {
  1538.        if(memcmp(gPLMN,"46000", 5) == 0)
  1539.    {
  1540.    // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"335561");  
  1541. strcpy(g_msg_cntx.smsPhoneNumber, "335561");
  1542.        }
  1543.        else if(memcmp(gPLMN,"46001", 5) == 0)
  1544.        {
  1545. strcpy(g_msg_cntx.smsPhoneNumber, "935561");
  1546.       // UnicodeToAnsii((S8*)g_msg_cntx.smsPhoneNumber, (S8*)L"935561");
  1547.        }
  1548.        else
  1549.    {
  1550.         DisplayPopup((PU8)GetString(STR_NO_FDL),IMG_GLOBAL_QUESTION,1, MESSAGES_POPUP_TIME_OUT, (U8)ERROR_TONE);
  1551.         return;
  1552.    }
  1553.         switch(SecretRoomtype)
  1554.         {
  1555.         case SECRETROOM_TYPE_1:
  1556.       memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1557.    //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFM BGLKJ001M00");
  1558. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSXXSFXH BGLKJ001S00", strlen("ZFSXXSFXH BGLKJ001S00"));
  1559.    break;
  1560.         case SECRETROOM_TYPE_2:
  1561.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1562.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFDJ BGLKJ001M00");
  1563. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSXQAR BGLKJ001S00", strlen("ZFSXQAR BGLKJ001S00"));
  1564.   break;
  1565.        case SECRETROOM_TYPE_3:
  1566.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1567.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXQW BGLKJ001M00");
  1568. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSSHXFSG BGLKJ001S00", strlen("ZFSSHXFSG BGLKJ001S00"));
  1569.   break;
  1570.        case SECRETROOM_TYPE_4:
  1571.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1572.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFMX BGLKJ001M00");
  1573. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXYWCS BGLKJ001S00", strlen("ZFSYXYWCS BGLKJ001S00"));
  1574.   break;
  1575.        case SECRETROOM_TYPE_5:
  1576.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1577.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFYM BGLKJ001M00");
  1578. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSSHBYJQ BGLKJ001S00", strlen("ZFSSHBYJQ BGLKJ001S00"));
  1579.   break;
  1580.        case SECRETROOM_TYPE_6:
  1581.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1582.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXGKT BGLKJ001M00");
  1583. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSTLSSDD BGLKJ001S00", strlen("ZFSTLSSDD BGLKJ001S00"));
  1584.   break;
  1585.        case SECRETROOM_TYPE_7:
  1586.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1587.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFYLY BGLKJ001M00");
  1588. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXLABD BGLKJ001S00", strlen("ZFSYXLABD BGLKJ001S00"));
  1589.   break;
  1590.        case SECRETROOM_TYPE_8:
  1591.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1592.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXW BGLKJ001M00");
  1593. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYDLY BGLKJ001S00", strlen("ZFSYDLY BGLKJ001S00"));
  1594.   break;
  1595.        case SECRETROOM_TYPE_9:
  1596.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1597.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFXQM BGLKJ001M00");
  1598. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXCSKAL BGLKJ001S00", strlen("ZFSYXCSKAL BGLKJ001S00"));
  1599.   break;
  1600.        case SECRETROOM_TYPE_10:
  1601.      memset(g_msg_cntx.dfmsg,0,sizeof(g_msg_cntx.dfmsg));
  1602.   //pfnUnicodeStrcpy((S8*)g_msg_cntx.dfmsg,(S8*)L"ZFAMC BGLKJ001M00");
  1603. AnsiiNToUnicodeString(g_msg_cntx.dfmsg, "ZFSYXFHNLSL BGLKJ001S00", strlen("ZFSYXFHNLSL BGLKJ001S00"));
  1604.   break;
  1605. default :
  1606.   break; 
  1607.    }
  1608.    
  1609.             mmi_msg_send_msg_req((U8*)g_msg_cntx.smsPhoneNumber, MMI_FRM_SMS_INVALID_INDEX,1);  
  1610. }
  1611. #endif
  1612. //KP Jerry add for third sevice on 2007-03-26 end
  1613. /****************************************************************
  1614.             generic functions
  1615. ****************************************************************/
  1616. /*****************************************************************************
  1617.  * FUNCTION
  1618.  *  mmi_msg_set_msg_icon
  1619.  * DESCRIPTION
  1620.  *  Set msg icon for unread/full message.
  1621.  * PARAMETERS
  1622.  *  blink       [IN]        
  1623.  *  unblink     [IN]        
  1624.  *  a(?)        [IN]        Blink
  1625.  *  b(?)        [IN]        Unblink
  1626.  * RETURNS
  1627.  *  void
  1628.  *****************************************************************************/
  1629. void mmi_msg_set_msg_icon(U8 blink, U8 unblink)
  1630. {
  1631.     /*----------------------------------------------------------------*/
  1632.     /* Local Variables                                                */
  1633.     /*----------------------------------------------------------------*/
  1634.     U16 i = 0;
  1635.     U16 totalinbox = mmi_frm_sms_get_sms_list_size(MMI_FRM_SMS_APP_INBOX);
  1636.     /*----------------------------------------------------------------*/
  1637.     /* Code Body                                                      */
  1638.     /*----------------------------------------------------------------*/
  1639.     PRINT_INFORMATION_2((MMI_TRACE_G6_SMS, "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon -------*n"));
  1640.     if (blink == TRUE)
  1641.     {
  1642.         PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1643.                              "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon blink==TRUE -------*n"));
  1644.         HideStatusIcon(STATUS_ICON_INCOMING_SMS);
  1645.         HideStatusIcon(STATUS_ICON_SUBLCD_SMS);
  1646.         BlinkStatusIcon(STATUS_ICON_INCOMING_SMS);
  1647.         BlinkStatusIcon(STATUS_ICON_SUBLCD_SMS);
  1648.         UpdateStatusIcons();
  1649.         return;
  1650.     }
  1651.     if (unblink == TRUE)
  1652.     {
  1653.         PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1654.                              "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon unblink==TRUE -------*n"));
  1655.         HideStatusIcon(STATUS_ICON_INCOMING_SMS);
  1656.         HideStatusIcon(STATUS_ICON_SUBLCD_SMS);
  1657.     }
  1658.     if (g_msg_cntx.msg_full_ind == FALSE)
  1659.     {
  1660.         PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1661.                              "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon g_msg_cntx.msg_full_ind==FALSE -------*n"));
  1662.         if (totalinbox != MMI_FRM_SMS_INVALID_INDEX)
  1663.         {
  1664.             PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1665.                                  "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon totalinbox: %d -------*n",
  1666.                                  totalinbox));
  1667.             while (i < totalinbox)
  1668.             {
  1669.                 if ((mmi_frm_sms_get_status(MMI_FRM_SMS_APP_INBOX, i) & 0x0f) == MMI_FRM_SMS_APP_UNREAD)
  1670.                 {
  1671.                     PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1672.                                          "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon UNREAD found -------*n"));
  1673.                     ShowStatusIcon(STATUS_ICON_INCOMING_SMS);
  1674.                     ShowStatusIcon(STATUS_ICON_SUBLCD_SMS);
  1675.                     UpdateStatusIcons();
  1676.                     return;
  1677.                 }
  1678.                 i++;
  1679.             }
  1680.         }
  1681.         PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
  1682.                              "*-------[SmsMoMtGuiInterface.c] mmi_msg_set_msg_icon NO UNREAD found -------*n"));
  1683.         HideStatusIcon(STATUS_ICON_INCOMING_SMS);
  1684.         HideStatusIcon(STATUS_ICON_SUBLCD_SMS);
  1685.     }
  1686.     UpdateStatusIcons();
  1687. }
  1688. /*****************************************************************************
  1689.  * FUNCTION
  1690.  *  mmi_msg_set_funcptr
  1691.  * DESCRIPTION
  1692.  *  Set function pointer for later usage
  1693.  * PARAMETERS
  1694.  *  funcptr     [IN]        Function pointer for later usage
  1695.  * RETURNS
  1696.  *  void
  1697.  *****************************************************************************/
  1698. void mmi_msg_set_funcptr(FuncPtr funcptr)
  1699. {
  1700.     /*----------------------------------------------------------------*/
  1701.     /* Local Variables                                                */
  1702.     /*----------------------------------------------------------------*/
  1703.     /*----------------------------------------------------------------*/
  1704.     /* Code Body                                                      */
  1705.     /*----------------------------------------------------------------*/
  1706.     msg_common_funcPtr = funcptr;
  1707. }
  1708. /*****************************************************************************
  1709.  * FUNCTION
  1710.  *  mmi_msg_exec_funcptr
  1711.  * DESCRIPTION
  1712.  *  Execute function pointer set earlier
  1713.  * PARAMETERS
  1714.  *  void
  1715.  * RETURNS
  1716.  *  void
  1717.  *****************************************************************************/
  1718. void mmi_msg_exec_funcptr(void)
  1719. {
  1720.     /*----------------------------------------------------------------*/
  1721.     /* Local Variables                                                */
  1722.     /*----------------------------------------------------------------*/
  1723.     /*----------------------------------------------------------------*/
  1724.     /* Code Body                                                      */
  1725.     /*----------------------------------------------------------------*/
  1726.     if (msg_common_funcPtr != NULL)
  1727.     {
  1728.         (*msg_common_funcPtr) ();
  1729.     }
  1730.     msg_common_funcPtr = NULL;
  1731. }
  1732. /*****************************************************************************
  1733.  * FUNCTION
  1734.  *  mmi_msg_set_msg_waiting_icon
  1735.  * DESCRIPTION
  1736.  *  Set msg icon for waiting vm/email/fax
  1737.  * PARAMETERS
  1738.  *  line        [IN]        
  1739.  *  type        [IN]        
  1740.  *  set         [IN]        
  1741.  *  a(?)        [IN]        Line
  1742.  *  c(?)        [IN]        Set/unset
  1743.  *  b(?)        [IN]        Type
  1744.  * RETURNS
  1745.  *  void
  1746.  *****************************************************************************/
  1747. void mmi_msg_set_msg_waiting_icon(U8 line, U8 type, U8 set)
  1748. {
  1749.     /*----------------------------------------------------------------*/
  1750.     /* Local Variables                                                */
  1751.     /*----------------------------------------------------------------*/
  1752.     U8 i = 0;
  1753.     U8 otherline = (line == 0 ? 1 : 0);
  1754.     U16 icon[] = 
  1755.     {
  1756.         STATUS_ICON_UNREAD_VOICE_L1,
  1757.         STATUS_ICON_UNREAD_VOICE_L2,
  1758.         STATUS_ICON_UNREAD_VOICE_L1L2,
  1759.         STATUS_ICON_UNREAD_FAX_L1,
  1760.         STATUS_ICON_UNREAD_FAX_L2,
  1761.         STATUS_ICON_UNREAD_FAX_L1L2,
  1762.         STATUS_ICON_UNREAD_EMAIL_L1,
  1763.         STATUS_ICON_UNREAD_EMAIL_L2,
  1764.         STATUS_ICON_UNREAD_EMAIL_L1L2,
  1765.     };
  1766.     /*----------------------------------------------------------------*/
  1767.     /* Code Body                                                      */
  1768.     /*----------------------------------------------------------------*/
  1769.     for (i = 0; i < (MAX_WAITING_LINE_NUM + 1); i++)
  1770.     {
  1771.         IdleResetStatusIcon(icon[(type * (MAX_WAITING_LINE_NUM + 1)) + i]);
  1772.     }
  1773.     if ((set > 0) && (g_msg_cntx.msg_waiting_info[otherline].number[type]))
  1774.     {
  1775.         IdleSetStatusIcon(icon[(type * (MAX_WAITING_LINE_NUM + 1)) + MAX_WAITING_LINE_NUM]);
  1776.     }
  1777.     else if (set > 0)
  1778.     {
  1779.         IdleSetStatusIcon(icon[(type * (MAX_WAITING_LINE_NUM + 1)) + line]);
  1780.     }
  1781.     else if (g_msg_cntx.msg_waiting_info[otherline].number[type])
  1782.     {
  1783.         IdleSetStatusIcon(icon[(type * (MAX_WAITING_LINE_NUM + 1)) + otherline]);
  1784.     }
  1785. }
  1786. /*****************************************************************************
  1787.  * FUNCTION
  1788.  *  mmi_msg_exit_generic
  1789.  * DESCRIPTION
  1790.  *  Exit generic function for MSG app.
  1791.  * PARAMETERS
  1792.  *  void
  1793.  * RETURNS
  1794.  *  void
  1795.  *****************************************************************************/
  1796. void mmi_msg_exit_generic(void)
  1797. {
  1798.     /*----------------------------------------------------------------*/
  1799.     /* Local Variables                                                */
  1800.     /*----------------------------------------------------------------*/
  1801.     /*----------------------------------------------------------------*/
  1802.     /* Code Body                                                      */
  1803.     /*----------------------------------------------------------------*/
  1804.     g_msg_cntx.MessagesScrnIdDelUptoHistoryNodes = GetMessagesCurrScrnID();
  1805.     SetMessagesCurrScrnID(0);   /* messagesCurrScrnID */
  1806.     /* MTK Leo add, mini_tab_bar */
  1807. #ifdef __MMI_WGUI_MINI_TAB_BAR__
  1808.     wgui_disable_mini_tab_bar();
  1809. #endif 
  1810.     /* MTK Leo end */
  1811. }
  1812. /*****************************************************************************
  1813.  * FUNCTION
  1814.  *  mmi_msg_highlight_generic
  1815.  * DESCRIPTION
  1816.  *  Highlight generic function for MSG app
  1817.  * PARAMETERS
  1818.  *  lskstr      [IN]        
  1819.  *  lskimg      [IN]        
  1820.  *  rskstr      [IN]        
  1821.  *  rskimg      [IN]        
  1822.  *  lskfunc     [IN]        
  1823.  *  rskfunc     [IN]        
  1824.  *  a(?)        [IN]        Left soft key string
  1825.  *  d(?)        [IN]        Right soft key image
  1826.  *  f(?)        [IN]        Right soft key function
  1827.  *  e(?)        [IN]        Left soft key function
  1828.  *  c(?)        [IN]        Right soft key string
  1829.  *  b(?)        [IN]        Left soft key image
  1830.  * RETURNS
  1831.  *  void
  1832.  *****************************************************************************/
  1833. void mmi_msg_highlight_generic(U16 lskstr, U16 lskimg, U16 rskstr, U16 rskimg, FuncPtr lskfunc, FuncPtr rskfunc)
  1834. {
  1835.     /*----------------------------------------------------------------*/
  1836.     /* Local Variables                                                */
  1837.     /*----------------------------------------------------------------*/
  1838.     /*----------------------------------------------------------------*/
  1839.     /* Code Body                                                      */
  1840.     /*----------------------------------------------------------------*/
  1841.     ChangeLeftSoftkey(lskstr, lskimg);
  1842.     ChangeRightSoftkey(rskstr, rskimg);
  1843.     SetLeftSoftkeyFunction(lskfunc, KEY_EVENT_UP);
  1844.     SetKeyHandler(lskfunc, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1845.     SetRightSoftkeyFunction(rskfunc, KEY_EVENT_UP);
  1846.     SetKeyHandler(rskfunc, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1847. }
  1848. /*****************************************************************************
  1849.  * FUNCTION
  1850.  *  mmi_msg_set_confirm_screen
  1851.  * DESCRIPTION
  1852.  *  Set string and function for MSG confirmation screen
  1853.  * PARAMETERS
  1854.  *  id          [IN]        
  1855.  *  lskfunc     [IN]        
  1856.  *  rskfunc     [IN]        
  1857.  *  a(?)        [IN]        String ID
  1858.  *  c(?)        [IN]        Right soft key function
  1859.  *  b(?)        [IN]        Left soft key function
  1860.  * RETURNS
  1861.  *  void
  1862.  *****************************************************************************/
  1863. void mmi_msg_set_confirm_screen(U16 id, FuncPtr lskfunc, FuncPtr rskfunc)
  1864. {
  1865.     /*----------------------------------------------------------------*/
  1866.     /* Local Variables                                                */
  1867.     /*----------------------------------------------------------------*/
  1868.     /*----------------------------------------------------------------*/
  1869.     /* Code Body                                                      */
  1870.     /*----------------------------------------------------------------*/
  1871.     msg_confirm_strID = id;
  1872.     msg_confirm_lskFuncPtr = lskfunc;
  1873.     msg_confirm_rskFuncPtr = rskfunc;
  1874. }
  1875. /*****************************************************************************
  1876.  * FUNCTION
  1877.  *  mmi_msg_entry_confirm_generic
  1878.  * DESCRIPTION
  1879.  *  Entry MSG generic confirmation screen
  1880.  * PARAMETERS
  1881.  *  void
  1882.  * RETURNS
  1883.  *  void
  1884.  *****************************************************************************/
  1885. void mmi_msg_entry_confirm_generic(void)
  1886. {
  1887.     /*----------------------------------------------------------------*/
  1888.     /* Local Variables                                                */
  1889.     /*----------------------------------------------------------------*/
  1890.     /*----------------------------------------------------------------*/
  1891.     /* Code Body                                                      */
  1892.     /*----------------------------------------------------------------*/
  1893.     DisplayConfirm(
  1894.         STR_GLOBAL_YES,
  1895.         IMG_GLOBAL_YES,
  1896.         STR_GLOBAL_NO,
  1897.         IMG_GLOBAL_NO,
  1898.         get_string(msg_confirm_strID),
  1899.         IMG_GLOBAL_QUESTION,
  1900.         WARNING_TONE);
  1901.     SetLeftSoftkeyFunction(msg_confirm_lskFuncPtr, KEY_EVENT_UP);
  1902.     SetRightSoftkeyFunction(msg_confirm_rskFuncPtr, KEY_EVENT_UP);
  1903. }
  1904. /*****************************************************************************
  1905.  * FUNCTION
  1906.  *  mmi_msg_exit_confirm_generic
  1907.  * DESCRIPTION
  1908.  *  Exit MSG generic confirmation screen
  1909.  * PARAMETERS
  1910.  *  void
  1911.  * RETURNS
  1912.  *  void
  1913.  *****************************************************************************/
  1914. void mmi_msg_exit_confirm_generic(void)
  1915. {
  1916.     /*----------------------------------------------------------------*/
  1917.     /* Local Variables                                                */
  1918.     /*----------------------------------------------------------------*/
  1919.     /*----------------------------------------------------------------*/
  1920.     /* Code Body                                                      */
  1921.     /*----------------------------------------------------------------*/
  1922.     stopRequestedTone(WARNING_TONE);
  1923.     SetMessagesCurrScrnID(0);   /* messagesCurrScrnID */
  1924. }
  1925. /*****************************************************************************
  1926.  * FUNCTION
  1927.  *  mmi_msg_set_processing_screen
  1928.  * DESCRIPTION
  1929.  *  Set string and image for MSG processing screen
  1930.  * PARAMETERS
  1931.  *  captionStrId            [IN]        
  1932.  *  bodyStrId               [IN]        
  1933.  *  animationImageId        [IN]        
  1934.  *  rskStrId                [IN]        
  1935.  * RETURNS
  1936.  *  void
  1937.  *****************************************************************************/
  1938. void mmi_msg_set_processing_screen(U16 captionStrId, U16 bodyStrId, U16 animationImageId, U16 rskStrId)
  1939. {
  1940.     /*----------------------------------------------------------------*/
  1941.     /* Local Variables                                                */
  1942.     /*----------------------------------------------------------------*/
  1943.     /*----------------------------------------------------------------*/
  1944.     /* Code Body                                                      */
  1945.     /*----------------------------------------------------------------*/
  1946.     processCaptionStrId = captionStrId;
  1947.     processBodyStrId = bodyStrId;
  1948.     processAnimationImageId = animationImageId;
  1949.     processRSKStrId = rskStrId;
  1950. }
  1951. /*****************************************************************************
  1952.  * FUNCTION
  1953.  *  mmi_msg_end_key_from_processing
  1954.  * DESCRIPTION
  1955.  *  Reset display list type before go to idle.
  1956.  * PARAMETERS
  1957.  *  void
  1958.  * RETURNS
  1959.  *  void
  1960.  *****************************************************************************/
  1961. void mmi_msg_end_key_from_processing(void)
  1962. {
  1963.     /*----------------------------------------------------------------*/
  1964.     /* Local Variables                                                */
  1965.     /*----------------------------------------------------------------*/
  1966.     /*----------------------------------------------------------------*/
  1967.     /* Code Body                                                      */
  1968.     /*----------------------------------------------------------------*/
  1969.     if (!isInCall())
  1970.     {
  1971.         g_msg_cntx.toDisplayMessageList = TO_DISPLAY_MESSAGE_LIST_NONE;
  1972.     }
  1973.     ExecCurrEndKeyDownHandler();
  1974. }
  1975. /*****************************************************************************
  1976.  * FUNCTION
  1977.  *  mmi_msg_go_back_from_processing
  1978.  * DESCRIPTION
  1979.  *  Reset display list type before go back screen.
  1980.  * PARAMETERS
  1981.  *  void
  1982.  * RETURNS
  1983.  *  void
  1984.  *****************************************************************************/
  1985. void mmi_msg_go_back_from_processing(void)
  1986. {
  1987.     /*----------------------------------------------------------------*/
  1988.     /* Local Variables                                                */
  1989.     /*----------------------------------------------------------------*/
  1990.     /*----------------------------------------------------------------*/
  1991.     /* Code Body                                                      */
  1992.     /*----------------------------------------------------------------*/
  1993.     g_msg_cntx.toDisplayMessageList = TO_DISPLAY_MESSAGE_LIST_NONE;
  1994.     GoBackHistory();
  1995. }
  1996. /*****************************************************************************
  1997.  * FUNCTION
  1998.  *  mmi_msg_call_handle_from_processing
  1999.  * DESCRIPTION
  2000.  *  Reset current screen before enter call screen.
  2001.  * PARAMETERS
  2002.  *  void
  2003.  * RETURNS
  2004.  *  void
  2005.  *****************************************************************************/
  2006. void mmi_msg_call_handle_from_processing(void)
  2007. {
  2008.     /*----------------------------------------------------------------*/
  2009.     /* Local Variables                                                */
  2010.     /*----------------------------------------------------------------*/
  2011.     /*----------------------------------------------------------------*/
  2012.     /* Code Body                                                      */
  2013.     /*----------------------------------------------------------------*/
  2014.     SetMessagesCurrScrnID(0);
  2015. }
  2016. /*****************************************************************************
  2017.  * FUNCTION
  2018.  *  mmi_msg_entry_processing_generic
  2019.  * DESCRIPTION
  2020.  *  Entry MSG generic processing screen
  2021.  * PARAMETERS
  2022.  *  void
  2023.  * RETURNS
  2024.  *  void
  2025.  *****************************************************************************/
  2026. void mmi_msg_entry_processing_generic(void)
  2027. {
  2028.     /*----------------------------------------------------------------*/
  2029.     /* Local Variables                                                */
  2030.     /*----------------------------------------------------------------*/
  2031.     /*----------------------------------------------------------------*/
  2032.     /* Code Body                                                      */
  2033.     /*----------------------------------------------------------------*/
  2034.     EntryNewScreen(SCR_ID_MSG_PROCESSING, mmi_msg_exit_processing_generic, mmi_msg_entry_processing_generic, NULL);
  2035.     PRINT_INFORMATION_2((MMI_TRACE_G6_SMS, "*[SmsMoMtGuiInterface.c] mmi_msg_entry_processing_generic *n"));
  2036.     SetMessagesCurrScrnID(SCR_ID_MSG_PROCESSING);   /* may be temp func... */
  2037.     GetCurrEndKeyDownHandler();
  2038.     /* PMT HIMANSHU START 20050920 */
  2039. #ifdef __MMI_MAINLCD_240X320__
  2040.     /* passing 0xffff for Title string and Title icon for the disbling the status bar and title display. */
  2041.     ShowCategory8Screen(0xffff, 0xffff, 0, 0, processRSKStrId, 0, processBodyStrId, processAnimationImageId, NULL);
  2042. #else /* __MMI_MAINLCD_240X320__ */ 
  2043.     ShowCategory8Screen(
  2044.         processCaptionStrId,
  2045.         IMG_SMS_ENTRY_SCRN_CAPTION,
  2046.         0,
  2047.         0,
  2048.         processRSKStrId,
  2049.         0,
  2050.         processBodyStrId,
  2051.         processAnimationImageId,
  2052.         NULL);
  2053. #endif /* __MMI_MAINLCD_240X320__ */ 
  2054.     /* PMT HIMANSHU END 20050920 */
  2055.     if (processRSKStrId == 0)
  2056.     {
  2057.         ClearAllKeyHandler();
  2058.         ClearKeyHandler(KEY_END, KEY_EVENT_UP);
  2059.         ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
  2060.         ClearKeyHandler(KEY_END, KEY_LONG_PRESS);
  2061.         ClearKeyHandler(KEY_END, KEY_REPEAT);
  2062.         if (isInCall())
  2063.         {
  2064.             SetKeyHandler(HangupAllCalls, KEY_END, KEY_EVENT_DOWN);
  2065.         }
  2066.         StartTimer(MESSAGES_INPROGRESS_TIMER_ID, MESSAGES_INPROGRESS_TIME_OUT, mmi_msg_time_out_processing_generic);
  2067.     }
  2068.     else
  2069.     {
  2070.         SetKeyHandler(mmi_msg_go_back_from_processing, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  2071.         SetRightSoftkeyFunction(mmi_msg_go_back_from_processing, KEY_EVENT_UP);
  2072.         SetKeyHandler(mmi_msg_end_key_from_processing, KEY_END, KEY_EVENT_DOWN);
  2073.     }
  2074. }
  2075. /*****************************************************************************
  2076.  * FUNCTION
  2077.  *  mmi_msg_exit_processing_generic
  2078.  * DESCRIPTION
  2079.  *  Exit MSG generic processing screen
  2080.  * PARAMETERS
  2081.  *  void
  2082.  * RETURNS
  2083.  *  void
  2084.  *****************************************************************************/
  2085. void mmi_msg_exit_processing_generic(void)
  2086. {
  2087.     /*----------------------------------------------------------------*/
  2088.     /* Local Variables                                                */
  2089.     /*----------------------------------------------------------------*/
  2090.     /*----------------------------------------------------------------*/
  2091.     /* Code Body                                                      */
  2092.     /*----------------------------------------------------------------*/
  2093.     g_msg_cntx.MessagesScrnIdDelUptoHistoryNodes = GetMessagesCurrScrnID();
  2094.     SetMessagesCurrScrnID(0);   /* NOTE!!!!! do not set to zero for incoming call reason */
  2095.     StopTimer(MESSAGES_INPROGRESS_TIMER_ID);
  2096. }
  2097. /*****************************************************************************
  2098.  * FUNCTION
  2099.  *  mmi_msg_time_out_processing_generic
  2100.  * DESCRIPTION
  2101.  *  Time out call back of processing screen
  2102.  * PARAMETERS
  2103.  *  void
  2104.  * RETURNS
  2105.  *  void
  2106.  *****************************************************************************/
  2107. void mmi_msg_time_out_processing_generic(void)
  2108. {
  2109.     /*----------------------------------------------------------------*/
  2110.     /* Local Variables                                                */
  2111.     /*----------------------------------------------------------------*/
  2112.     /*----------------------------------------------------------------*/
  2113.     /* Code Body                                                      */
  2114.     /*----------------------------------------------------------------*/
  2115.     StopTimer(MESSAGES_INPROGRESS_TIMER_ID);
  2116.     if (GetMessagesCurrScrnID() == SCR_ID_MSG_PROCESSING)
  2117.     {
  2118.         DisplayPopup(
  2119.             (PU8) GetString(STR_GLOBAL_UNFINISHED),
  2120.             IMG_GLOBAL_UNFINISHED,
  2121.             1,
  2122.             MESSAGES_POPUP_TIME_OUT,
  2123.             (U8) ERROR_TONE);
  2124.     }
  2125.     DeleteMessagesHistoryNodes();
  2126.     DeleteScreenIfPresent(SCR_ID_MSG_PROCESSING);
  2127. }
  2128. /*****************************************************************************
  2129.  * FUNCTION
  2130.  *  mmi_msg_set_popup_generic
  2131.  * DESCRIPTION
  2132.  *  Set popup screen.
  2133.  * PARAMETERS
  2134.  *  strID       [IN]        
  2135.  *  imgID       [IN]        
  2136.  *  toneID      [IN]        
  2137.  *  a(?)        [IN]        String ID
  2138.  *  c(?)        [IN]        Tone ID
  2139.  *  b(?)        [IN]        Image ID
  2140.  * RETURNS
  2141.  *  void
  2142.  *****************************************************************************/
  2143. void mmi_msg_set_popup_generic(U16 strID, U16 imgID, U8 toneID)
  2144. {
  2145.     /*----------------------------------------------------------------*/
  2146.     /* Local Variables                                                */
  2147.     /*----------------------------------------------------------------*/
  2148.     /*----------------------------------------------------------------*/
  2149.     /* Code Body                                                      */
  2150.     /*----------------------------------------------------------------*/
  2151.     msg_popup_strID = strID;
  2152.     msg_popup_imgID = imgID;
  2153.     msg_popup_tonID = toneID;
  2154. }
  2155. /*****************************************************************************
  2156.  * FUNCTION
  2157.  *  mmi_msg_display_popup_generic
  2158.  * DESCRIPTION
  2159.  *  Display popup screen.
  2160.  * PARAMETERS
  2161.  *  void
  2162.  * RETURNS
  2163.  *  void
  2164.  *****************************************************************************/
  2165. void mmi_msg_display_popup_generic(void)
  2166. {
  2167.     /*----------------------------------------------------------------*/
  2168.     /* Local Variables                                                */
  2169.     /*----------------------------------------------------------------*/
  2170.     /*----------------------------------------------------------------*/
  2171.     /* Code Body                                                      */
  2172.     /*----------------------------------------------------------------*/
  2173.     DisplayPopup((PU8) GetString(msg_popup_strID), msg_popup_imgID, 1, MESSAGES_POPUP_TIME_OUT, (U8) msg_popup_tonID);
  2174.     DeleteMessagesHistoryNodes();
  2175.     AlmEnableSPOF();
  2176. }
  2177. /*****************************************************************************
  2178.  * FUNCTION
  2179.  *  mmi_msg_entry_new_msg_popup
  2180.  * DESCRIPTION
  2181.  *  Entry new message popup.
  2182.  * PARAMETERS
  2183.  *  type        [IN]        
  2184.  *  a(?)        [IN]        New message type
  2185.  * RETURNS
  2186.  *  void
  2187.  *****************************************************************************/
  2188. void mmi_msg_entry_new_msg_popup(U8 type)
  2189. {
  2190.     /*----------------------------------------------------------------*/
  2191.     /* Local Variables                                                */
  2192.     /*----------------------------------------------------------------*/
  2193.     U16 indstr = STR_RECEIVED_SMS;
  2194.     MMI_ALERT_TYPE alertType;
  2195.     /*----------------------------------------------------------------*/
  2196.     /* Code Body                                                      */
  2197.     /*----------------------------------------------------------------*/
  2198.     alertType = GetMtCallAlertTypeEnum();
  2199.     EntryNewScreen(SCR_POPUP_SCREEN, mmi_msg_exit_new_msg_popup, NULL, NULL);
  2200.     switch (type)
  2201.     {
  2202.         case MSG_NEW_VOICEMAIL:
  2203.             indstr = STR_VOICEMAIL_IND;
  2204.             break;
  2205.         case MSG_NEW_FAX:
  2206.             indstr = STR_FAX_IND;
  2207.             break;
  2208.         case MSG_NEW_EMAIL:
  2209.             indstr = STR_EMAIL_IND;
  2210.             break;
  2211.         case MSG_NEW_MSG_NORMAL:
  2212.             indstr = STR_RECEIVED_SMS;
  2213.             break;
  2214.     #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
  2215.         case MSG_NEW_JMMS_MMS:
  2216.             indstr = STR_ID_JMMS_NEW_MMS;
  2217.             break;
  2218.         case MSG_NEW_JMMS_JAVA_MMS:
  2219.             indstr = STR_ID_JMMS_NEW_JAVA_MMS;
  2220.             break;
  2221.     #endif /* (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT)) */ 
  2222.     #if (defined (JATAAYU_SUPPORT) && defined(WAP_SUPPORT))
  2223.         case MSG_NEW_PUSH:
  2224.             indstr = STR_ID_BRW_SERVICE_MESSAGE_RCVD;
  2225.             break;
  2226.         case MSG_NEW_PROV_SETTING:
  2227.             indstr = g_prov_newsetting_stringID ; /*STR_ID_PROV_NEW_SETTINGS*/
  2228.             break;
  2229.     #endif /* (defined (JATAAYU_SUPPORT) && defined(WAP_SUPPORT)) */ 
  2230.         case MSG_NEW_MSG_CLASS0:
  2231.             indstr = STR_CLASS0_MESSAGE_CAPTION;
  2232.             break;
  2233.         case MSG_NEW_DELIVERY_REPORT:
  2234.             indstr = STR_DELIVERY_REPORT_MENUENTRY;
  2235.             break;
  2236.     #if defined(__MMI_SMART_MESSAGE_MT__) || (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__))
  2237.         case MSG_NEW_MSG_PICTURE:
  2238.             indstr = STR_ID_NSM_NEW_PICTURE_MESSAGE;
  2239.             break;
  2240.         case MSG_NEW_MSG_RINGTONE:
  2241.             indstr = STR_ID_NSM_NEW_RINGTONE_MESSAGE;
  2242.             break;
  2243.     #endif /* defined(__MMI_SMART_MESSAGE_MT__) || (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)) */ 
  2244.         default:
  2245.             indstr = STR_RECEIVED_SMS;
  2246.             break;
  2247.     }
  2248.     GetCurrEndKeyDownHandler();
  2249.     ShowCategory65Screen((PU8) GetString(indstr), IMG_NEW_MESSAGE_NOTIFICATION_MSG, NULL);
  2250.     SetGroupKeyHandler(NULL, (PU16) PresentAllKeys, (U8) TOTAL_KEYS, KEY_EVENT_DOWN);
  2251.     SetGroupKeyHandler(GoBackHistory, (PU16) PresentAllKeys, (U8) TOTAL_KEYS, KEY_EVENT_UP);
  2252.     ClearKeyHandler(KEY_END, KEY_EVENT_UP);
  2253.     SetKeyHandler(ExecCurrEndKeyDownHandler, KEY_END, KEY_EVENT_DOWN);
  2254.     msg_popup_tonID = 0;
  2255.     if (alertType == MMI_VIBRATION_AND_RING || alertType == MMI_VIBRATION_THEN_RING || alertType == MMI_RING)
  2256.     {
  2257.         if (!isInCall())
  2258.         {
  2259.             msg_popup_tonID = (U8) MESSAGE_TONE;
  2260.         }
  2261.         else
  2262.         {
  2263.             msg_popup_tonID = (U8) SMS_IN_CALL_TONE;
  2264.         }
  2265.     }
  2266.     if ((alertType == MMI_VIBRATION_ONLY) || (alertType == MMI_VIBRATION_AND_RING)
  2267.         || (alertType == MMI_VIBRATION_THEN_RING))
  2268.     {
  2269.         if (!AlmIsTonePlaying())
  2270.         {
  2271.             PlaySmsVibratorOnce();
  2272.         }
  2273.     }
  2274.     if (msg_popup_tonID)
  2275.     {
  2276.         if ((msg_popup_tonID == (U8) MESSAGE_TONE) && !(mdi_audio_is_background_play_suspended()))
  2277.         {
  2278.             mdi_audio_suspend_background_play();
  2279.             backgroundaudioresume = TRUE;
  2280.         }
  2281.         playRequestedTone(msg_popup_tonID);
  2282.     }
  2283. }
  2284. /*****************************************************************************
  2285.  * FUNCTION
  2286.  *  mmi_msg_exit_new_msg_popup
  2287.  * DESCRIPTION
  2288.  *  Exit new message popup.
  2289.  * PARAMETERS
  2290.  *  void
  2291.  * RETURNS
  2292.  *  void
  2293.  *****************************************************************************/
  2294. void mmi_msg_exit_new_msg_popup(void)
  2295. {
  2296.     /*----------------------------------------------------------------*/
  2297.     /* Local Variables                                                */
  2298.     /*----------------------------------------------------------------*/
  2299.     /*----------------------------------------------------------------*/
  2300.     /* Code Body                                                      */
  2301.     /*----------------------------------------------------------------*/
  2302.     if (msg_popup_tonID)
  2303.     {
  2304.         stopRequestedTone(msg_popup_tonID);
  2305.         if (backgroundaudioresume)
  2306.         {
  2307.             mdi_audio_resume_background_play();
  2308.             backgroundaudioresume = FALSE;
  2309.         }
  2310.     }
  2311. }
  2312. /*****************************************************************************
  2313. * FUNCTION
  2314. *  mmi_msg_entry_sending
  2315. * DESCRIPTION
  2316. *   Entry sending screen.
  2317. *
  2318. * PARAMETERS
  2319. *  none
  2320. * RETURNS
  2321. *  none
  2322. * GLOBALS AFFECTED
  2323. *   none
  2324. *****************************************************************************/
  2325. /*
  2326.  * void mmi_msg_entry_sending (void)
  2327.  * {
  2328.  * EntryNewScreen(SCR_ID_MSG_SENDING, mmi_msg_exit_generic, mmi_msg_entry_sending, NULL);
  2329.  * PRINT_INFORMATION_2 ((MMI_TRACE_G6_SMS, "*[SmsMoMtGuiInterface.c] mmi_msg_entry_sending *n"));
  2330.  * 
  2331.  * SetMessagesCurrScrnID (SCR_ID_MSG_SENDING);  // may be temp func...
  2332.  * 
  2333.  * ShowCategory8Screen (STR_SENDING_SMS, 0, 0,0, STR_GLOBAL_ABORT, IMG_SMS_COMMON_NOIMAGE, 
  2334.  * STR_SENDIING_SMS_BODY, IMG_NEW_SMS_SEND, NULL);
  2335.  * 
  2336.  * ClearInputEventHandler(MMI_DEVICE_ALL);
  2337.  * ClearKeyHandler(KEY_END, KEY_EVENT_UP);
  2338.  * ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
  2339.  * ClearKeyHandler(KEY_END, KEY_LONG_PRESS);
  2340.  * ClearKeyHandler(KEY_END, KEY_REPEAT);
  2341.  * SetKeyHandler(mmi_msg_abort_msg, KEY_END, KEY_EVENT_DOWN);  
  2342.  * SetRightSoftkeyFunction (mmi_msg_abort_msg, KEY_EVENT_UP);
  2343.  * }
  2344.  */
  2345. /*****************************************************************************
  2346.  * FUNCTION
  2347.  *  mmi_msg_set_msg_num_hint
  2348.  * DESCRIPTION
  2349.  *  Set message number hint
  2350.  * PARAMETERS
  2351.  *  totalInbox          [IN]        
  2352.  *  totalOutbox         [IN]        
  2353.  *  totalDraftbox       [IN]        
  2354.  *  a(?)                [IN]        Total inbox
  2355.  *  c(?)                [IN]        Total draftbox
  2356.  *  b(?)                [IN]        Total outbox
  2357.  * RETURNS
  2358.  *  void
  2359.  *****************************************************************************/
  2360. void mmi_msg_set_msg_num_hint(U16 totalInbox, U16 totalOutbox, U16 totalDraftbox)
  2361. {
  2362.     /*----------------------------------------------------------------*/
  2363.     /* Local Variables                                                */
  2364.     /*----------------------------------------------------------------*/
  2365.     S8 LocalData1[10];
  2366.     S8 LocalData2[10];
  2367.     S8 LocalData3[10];
  2368.     S8 LocalData1_unicode[10 * 2];
  2369.     S8 LocalData2_unicode[10 * 2];
  2370.     S8 LocalData3_unicode[10 * 2];
  2371.     /*----------------------------------------------------------------*/
  2372.     /* Code Body                                                      */
  2373.     /*----------------------------------------------------------------*/
  2374.     sprintf(LocalData1, "%d ", totalInbox);
  2375.     sprintf(LocalData2, "%d ", totalOutbox);
  2376.     sprintf(LocalData3, "%d ", totalDraftbox);
  2377.     AnsiiToUnicodeString(LocalData1_unicode, LocalData1);
  2378.     AnsiiToUnicodeString(LocalData2_unicode, LocalData2);
  2379.     AnsiiToUnicodeString(LocalData3_unicode, LocalData3);
  2380.     pfnUnicodeStrcpy((PS8) TotalInboxOutboxStatus.totalInboxStr, LocalData1_unicode);
  2381.     pfnUnicodeStrncat(
  2382.         (PS8) TotalInboxOutboxStatus.totalInboxStr,
  2383.         GetString(STR_SMS_COUNT_POPUP_SUFFIX),
  2384.         MAX_SUBMENU_CHARACTERS);
  2385.     pfnUnicodeStrcpy((PS8) TotalInboxOutboxStatus.totalOutboxStr, LocalData2_unicode);
  2386.     pfnUnicodeStrncat(
  2387.         (PS8) TotalInboxOutboxStatus.totalOutboxStr,
  2388.         GetString(STR_SMS_COUNT_POPUP_SUFFIX),
  2389.         MAX_SUBMENU_CHARACTERS);
  2390. #ifdef __MMI_MESSAGES_DRAFT_BOX__
  2391.     pfnUnicodeStrcpy((PS8) TotalInboxOutboxStatus.totalDraftboxStr, LocalData3_unicode);
  2392.     pfnUnicodeStrncat(
  2393.         (PS8) TotalInboxOutboxStatus.totalDraftboxStr,
  2394.         GetString(STR_SMS_COUNT_POPUP_SUFFIX),
  2395.         MAX_SUBMENU_CHARACTERS);
  2396. #endif /* __MMI_MESSAGES_DRAFT_BOX__ */ 
  2397. }
  2398. /*****************************************************************************
  2399.  * FUNCTION
  2400.  *  mmi_msg_inline_generic_custom_function
  2401.  * DESCRIPTION
  2402.  *  Set LSK handle for inline full screen edit
  2403.  * PARAMETERS
  2404.  *  void
  2405.  * RETURNS
  2406.  *  void
  2407.  *****************************************************************************/
  2408. void mmi_msg_inline_generic_custom_function(void)
  2409. {
  2410.     /*----------------------------------------------------------------*/
  2411.     /* Local Variables                                                */
  2412.     /*----------------------------------------------------------------*/
  2413.     /*----------------------------------------------------------------*/
  2414.     /* Code Body                                                      */
  2415.     /*----------------------------------------------------------------*/
  2416.     SetInputMethodAndDoneCaptionIcon(IMG_SMS_ENTRY_SCRN_CAPTION);
  2417.     ChangeLeftSoftkey(STR_GLOBAL_OPTIONS, IMG_GLOBAL_OPTIONS);
  2418.     SetLeftSoftkeyFunction(EntryScrForInputMethodAndDone, KEY_EVENT_UP);
  2419. }
  2420. /*****************************************************************************
  2421.  * FUNCTION
  2422.  *  mmi_msg_highlight_inline_generic_done
  2423.  * DESCRIPTION
  2424.  *  Highlight inline done handler
  2425.  * PARAMETERS
  2426.  *  void
  2427.  * RETURNS
  2428.  *  void
  2429.  *****************************************************************************/
  2430. void mmi_msg_highlight_inline_generic_done(void)
  2431. {
  2432.     /*----------------------------------------------------------------*/
  2433.     /* Local Variables                                                */
  2434.     /*----------------------------------------------------------------*/
  2435.     /*----------------------------------------------------------------*/
  2436.     /* Code Body                                                      */
  2437.     /*----------------------------------------------------------------*/
  2438.     mmi_msg_highlight_generic(
  2439.         STR_GLOBAL_OK,
  2440.         IMG_GLOBAL_OK,
  2441.         STR_GLOBAL_BACK,
  2442.         IMG_GLOBAL_BACK,
  2443.         ConfirmInlineFullScreenEdit,
  2444.         GoBackHistory);
  2445.     ClearKeyHandler(KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  2446. }
  2447. /*****************************************************************************
  2448.  * FUNCTION
  2449.  *  GetFirstSemiOctetTarget
  2450.  * DESCRIPTION
  2451.  *  Get first semi octet
  2452.  * PARAMETERS
  2453.  *  ch          [IN]        
  2454.  *  a(?)        [IN]        Input character
  2455.  * RETURNS
  2456.  *  first semi octet of input
  2457.  *****************************************************************************/
  2458. U8 GetFirstSemiOctetTarget(U8 ch)
  2459. {
  2460.     /*----------------------------------------------------------------*/
  2461.     /* Local Variables                                                */
  2462.     /*----------------------------------------------------------------*/
  2463.     /*----------------------------------------------------------------*/
  2464.     /* Code Body                                                      */
  2465.     /*----------------------------------------------------------------*/
  2466.     return (ch & 0xf0) >> 4;
  2467. }
  2468. /*****************************************************************************
  2469.  * FUNCTION
  2470.  *  GetSecondSemiOctetTarget
  2471.  * DESCRIPTION
  2472.  *  Get second semi octet
  2473.  * PARAMETERS
  2474.  *  ch          [IN]        
  2475.  *  a(?)        [IN]        Input character
  2476.  * RETURNS
  2477.  *  second semi octet of input
  2478.  *****************************************************************************/
  2479. U8 GetSecondSemiOctetTarget(U8 ch)
  2480. {
  2481.     /*----------------------------------------------------------------*/
  2482.     /* Local Variables                                                */
  2483.     /*----------------------------------------------------------------*/
  2484.     /*----------------------------------------------------------------*/
  2485.     /* Code Body                                                      */
  2486.     /*----------------------------------------------------------------*/
  2487.     return (ch & 0x0f);
  2488. }
  2489. /*****************************************************************************
  2490.  * FUNCTION
  2491.  *  mmi_msg_init_msg_data
  2492.  * DESCRIPTION
  2493.  *  Init message data
  2494.  * PARAMETERS
  2495.  *  void
  2496.  * RETURNS
  2497.  *  void
  2498.  *****************************************************************************/
  2499. #ifndef MMI_ON_HARDWARE_P
  2500. extern void InitSMSSetting(void);
  2501. #endif 
  2502. void mmi_msg_init_msg_data(void)
  2503. {
  2504.     /*----------------------------------------------------------------*/
  2505.     /* Local Variables                                                */
  2506.     /*----------------------------------------------------------------*/
  2507.     U8 i = 0;
  2508. #ifndef MMI_ON_HARDWARE_P
  2509.     /* U8 index=0; */
  2510. #endif 
  2511.     /*----------------------------------------------------------------*/
  2512.     /* Code Body                                                      */
  2513.     /*----------------------------------------------------------------*/
  2514.     memset(&TotalInboxOutboxStatus, 0, sizeof(msg_in_out_struct));
  2515.     memset(&activeProfile, 0, sizeof(msg_active_profile_struct));
  2516. #ifdef MMI_ON_HARDWARE_P
  2517.     g_msg_cntx.msg_init = FALSE;    /* init to be false */
  2518. #else 
  2519.     g_msg_cntx.msg_init = TRUE;     /* init to be false */
  2520. #endif 
  2521.     g_msg_cntx.number_from_phb = 0; /* init to be 0 */
  2522.     g_msg_cntx.msg_ind_index = SMSAL_INVALID_INDEX;
  2523.     g_msg_cntx.msg_ind_in_idle = FALSE;
  2524.     g_msg_cntx.msg_ind_after_call = FALSE;
  2525.     g_msg_cntx.msg_class0_ind = FALSE;
  2526.     g_msg_cntx.msg_full_ind = FALSE;
  2527.     g_msg_cntx.msg_exceed_ind = FALSE;
  2528.     g_msg_cntx.msg_deliver_ind = FALSE;
  2529.     g_msg_cntx.msg_waiting_ind = FALSE;
  2530. #ifdef __MMI_UNIFIED_MESSAGE__
  2531.     g_msg_cntx.is_background_process = KAL_FALSE;
  2532. #endif 
  2533.     g_msg_cntx.toDisplayMessageList = TO_DISPLAY_MESSAGE_LIST_NONE;
  2534.     g_msg_cntx.sendSaveStatus = SEND_SAVE_NIL;
  2535.     g_msg_cntx.sendMessageCase = SEND_CASE_SEND_ONLY;
  2536.     g_msg_cntx.PhbSmsInterfaceState = MMI_PHB_SMS_INTERFACE_NONE;
  2537.     g_msg_cntx.msg_status = MSG_STATUS_IDLE;
  2538.     g_msg_cntx.msg_class0_p = NULL;
  2539.     /* g_msg_cntx.msg_class0_p->data=NULL; */
  2540.     for (i = 0; i < MAX_STATUS_REPORT_NUM; i++)
  2541.     {
  2542.         g_msg_cntx.msg_deliver_report[i] = NULL;
  2543.     }
  2544.     memset(g_msg_cntx.smsPhoneNumber, 0, (MAX_DIGITS + 1) * ENCODING_LENGTH);
  2545. //KP Jerry add for third sevice on 2007-03-26 start
  2546. #ifdef __KONG_NET_SP__  
  2547.  memset(g_msg_cntx.dfmsg,0,50);   
  2548. #endif
  2549. //KP Jerry add for third sevice on 2007-03-26 end
  2550.     memset(&g_msg_cntx.msg_waiting_info, 0, MAX_WAITING_LINE_NUM * sizeof(msg_waiting_ind_struct));
  2551. #if defined(__MMI_MESSAGES_SEND_BY_GROUP__) || defined(__MMI_MESSAGES_SEND_TO_MANY__)
  2552.     memset(&(g_msg_cntx.msg_send_info), 0, sizeof(msg_send_many_struct));
  2553. #endif 
  2554. #ifdef __MMI_MESSAGES_TEMPLATE__
  2555.     for (i = 0; i < NUM_TEMPLATES; i++)
  2556.     {
  2557.         g_msg_cntx.templates[i] = NULL;
  2558.     }
  2559.     memset(g_msg_cntx.scratchTemplRec, 0, NVRAM_SMS_TEMPL_RECORD_SIZE + ENCODING_LENGTH);
  2560. #endif /* __MMI_MESSAGES_TEMPLATE__ */ 
  2561. #ifdef __MMI_MESSAGES_USE_URL__
  2562.     memset(g_msg_cntx.URLlist, 0x00, sizeof(g_msg_cntx.URLlist));
  2563.     g_msg_cntx.URLCount = 0;
  2564. #endif /* __MMI_MESSAGES_USE_URL__ */ 
  2565. #ifndef MMI_ON_HARDWARE_P
  2566.     InitSMSSetting();
  2567. #endif 
  2568. }
  2569. /*****************************************************************************
  2570.  * FUNCTION
  2571.  *  mmi_msg_deinit_msg_data
  2572.  * DESCRIPTION
  2573.  *  Deinit message data
  2574.  * PARAMETERS
  2575.  *  void
  2576.  * RETURNS
  2577.  *  void
  2578.  *****************************************************************************/
  2579. void mmi_msg_deinit_msg_data(void)
  2580. {
  2581.     /*----------------------------------------------------------------*/
  2582.     /* Local Variables                                                */
  2583.     /*----------------------------------------------------------------*/
  2584.     U8 i = 0;
  2585.     /*----------------------------------------------------------------*/
  2586.     /* Code Body                                                      */
  2587.     /*----------------------------------------------------------------*/
  2588.     if (g_msg_cntx.msg_class0_p != NULL)
  2589.     {
  2590.         OslMfree(g_msg_cntx.msg_class0_p);
  2591.         g_msg_cntx.msg_class0_p = NULL;
  2592.     }
  2593.     for (i = 0; i < MAX_STATUS_REPORT_NUM; i++)
  2594.     {
  2595.         if (g_msg_cntx.msg_deliver_report[i] != NULL)
  2596.         {
  2597.             OslMfree(g_msg_cntx.msg_deliver_report[i]);
  2598.         }
  2599.         g_msg_cntx.msg_deliver_report[i] = NULL;
  2600.     }
  2601. }
  2602. /*****************************************************************************
  2603.  * FUNCTION
  2604.  *  mmi_msg_go_back_from_write_msg
  2605.  * DESCRIPTION
  2606.  *  Enable schedule power off before go back screen
  2607.  * PARAMETERS
  2608.  *  void
  2609.  * RETURNS
  2610.  *  void
  2611.  *****************************************************************************/
  2612. void mmi_msg_go_back_from_write_msg(void)
  2613. {
  2614.     /*----------------------------------------------------------------*/
  2615.     /* Local Variables                                                */
  2616.     /*----------------------------------------------------------------*/
  2617.     /*----------------------------------------------------------------*/
  2618.     /* Code Body                                                      */
  2619.     /*----------------------------------------------------------------*/
  2620.     AlmEnableSPOF();
  2621.     GoBackHistory();
  2622. }
  2623. #if (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__))
  2624. /*****************************************************************************
  2625.  * FUNCTION
  2626.  *  mmi_nsm2_exit_write_msg
  2627.  * DESCRIPTION
  2628.  *  Exit write message
  2629.  * PARAMETERS
  2630.  *  void
  2631.  * RETURNS
  2632.  *  void
  2633.  *****************************************************************************/
  2634. void mmi_nsm2_exit_write_msg(void)
  2635. {
  2636.     /*----------------------------------------------------------------*/
  2637.     /* Local Variables                                                */
  2638.     /*----------------------------------------------------------------*/
  2639.     /*----------------------------------------------------------------*/
  2640.     /* Code Body                                                      */
  2641.     /*----------------------------------------------------------------*/
  2642.     mmi_nsm2_add_text_in_pEMS(&g_nsm_msg_context);
  2643.     mmi_msg_exit_generic();
  2644. }
  2645. /*****************************************************************************
  2646.  * FUNCTION
  2647.  *  mmi_nsm2_add_text_in_pEMS
  2648.  * DESCRIPTION
  2649.  *  Save textbuffer in pEMS
  2650.  * PARAMETERS
  2651.  *  nsm_msg_context     [?]     
  2652.  * RETURNS
  2653.  *  void
  2654.  *****************************************************************************/
  2655. void mmi_nsm2_add_text_in_pEMS(nsm_msg_struct *nsm_msg_context)
  2656. {
  2657.     /*----------------------------------------------------------------*/
  2658.     /* Local Variables                                                */
  2659.     /*----------------------------------------------------------------*/
  2660.     EMSData *pEMS;
  2661.     U8 dcs = SMSAL_DEFAULT_DCS;
  2662.     /*----------------------------------------------------------------*/
  2663.     /* Code Body                                                      */
  2664.     /*----------------------------------------------------------------*/
  2665.     pEMS = GetEMSDataForEdit(0, 1);
  2666.     if (nsm_msg_context->UCS2_count)    /* JP : 20050625 for trackre issue 429 */
  2667.     {
  2668.         dcs = SMSAL_UCS2_DCS;
  2669.     }
  2670.     EMSSetDCS(pEMS, dcs);   /* Set DCS before AddString : for Issue 429 */
  2671.     AddString(
  2672.         pEMS,
  2673.         (U8*) nsm_msg_context->textbuffer,
  2674.         (U16) pfnUnicodeStrlen((S8*) nsm_msg_context->textbuffer),
  2675.         NULL);
  2676. }
  2677. /*****************************************************************************
  2678.  * FUNCTION
  2679.  *  mmi_msg_entry_write_msg
  2680.  * DESCRIPTION
  2681.  *  Entry write message.
  2682.  * PARAMETERS
  2683.  *  void
  2684.  * RETURNS
  2685.  *  void
  2686.  *****************************************************************************/
  2687. void mmi_msg_entry_write_msg(void)
  2688. {
  2689.     /*----------------------------------------------------------------*/
  2690.     /* Local Variables                                                */
  2691.     /*----------------------------------------------------------------*/
  2692.     U8 *guiBuffer = NULL;
  2693.     EMSData *pEMS;
  2694.     /*----------------------------------------------------------------*/
  2695.     /* Code Body                                                      */
  2696.     /*----------------------------------------------------------------*/
  2697.     /* disallow re-entering SMS application when there is a pending SMS job running in the background */
  2698.     if (mmi_frm_sms_check_action_pending())
  2699.     {
  2700.         DisplayPopup(
  2701.             (PU8) GetString(STR_SMS_MSG_NOT_READY_YET),
  2702.             IMG_GLOBAL_UNFINISHED,
  2703.             1,
  2704.             MESSAGES_POPUP_TIME_OUT,
  2705.             (U8) ERROR_TONE);
  2706.         return;
  2707.     }
  2708.     EntryNewScreen(SCR_ID_MSG_WRITE, mmi_nsm2_exit_write_msg, mmi_msg_entry_write_msg, NULL);
  2709.     PRINT_INFORMATION_2((MMI_TRACE_G6_SMS, "*[SmsMoMtGuiInterface.c] mmi_msg_entry_write_msg*n"));
  2710.     AlmDisableSPOF();
  2711.     guiBuffer = GetCurrGuiBuffer(SCR_ID_MSG_WRITE);
  2712.     SetMessagesCurrScrnID(SCR_ID_MSG_WRITE);
  2713.     GetEMSDataForEdit(&pEMS, 0);
  2714.     SetMessagesCurrScrnID(SCR_ID_MSG_WRITE);
  2715.     /* Check previously picture present and set height and header fptr */
  2716.     if (g_nsm_msg_context.is_picmsg == TRUE)
  2717.     {
  2718.         g_nsm_msg_context.pic_height = MAX_NSM_PIC_HEIGHT;
  2719.         g_nsm_msg_context.header_fptr = mmi_nsm2_category275_draw_header;
  2720.     }
  2721.     else
  2722.     {
  2723.         g_nsm_msg_context.pic_height = 0;
  2724.         g_nsm_msg_context.header_fptr = NULL;
  2725.     }
  2726.     memset(g_nsm_msg_context.textbuffer, '', sizeof(g_nsm_msg_context.textbuffer));
  2727.     if ((*pEMS).textLength > 0)
  2728.     {
  2729.         pfnUnicodeStrncpy(
  2730.             (S8*) g_nsm_msg_context.textbuffer,
  2731.             (S8*) (*pEMS).textBuffer,
  2732.             (U32) (((*pEMS).textLength) / 2));
  2733.     }
  2734.     ShowCategoryNSM275Screen(
  2735.         STR_WMESSAGE_MENUENTRY,
  2736.         STR_GLOBAL_OPTIONS,
  2737.         IMG_SMS_COMMON_NOIMAGE,
  2738.         STR_GLOBAL_BACK,
  2739.         IMG_SMS_COMMON_NOIMAGE,
  2740.         INPUT_TYPE_ALPHANUMERIC_LOWERCASE | INPUT_TYPE_USE_ENCODING_BASED_LENGTH,
  2741.         g_nsm_msg_context.textbuffer,
  2742.         (g_nsm_msg_context.remaining_length + 1),
  2743.         4,
  2744.         mmi_nsm2_category275_draw_tile,
  2745.         (U16) g_nsm_msg_context.pic_height,
  2746.         g_nsm_msg_context.header_fptr,
  2747.         0,
  2748.         NULL,
  2749.         guiBuffer);
  2750.     SetKeyHandler(mmi_msg_entry_send_option, KEY_SEND, KEY_EVENT_UP);
  2751.     SetLeftSoftkeyFunction(mmi_msg_entry_option_write, KEY_EVENT_UP);
  2752.     SetCategory275RightSoftkeyFunction(mmi_msg_go_back_from_write_msg, KEY_EVENT_UP);
  2753. }
  2754. #else /* (defined(__MMI_SMART_MESSAGE_MO__) && !defined(__MMI_MESSAGES_EMS__)) */ 
  2755. /*****************************************************************************
  2756.  * FUNCTION
  2757.  *  mmi_msg_entry_write_msg
  2758.  * DESCRIPTION
  2759.  *  Entry write message.
  2760.  * PARAMETERS
  2761.  *  void
  2762.  * RETURNS
  2763.  *  void
  2764.  *****************************************************************************/
  2765. void mmi_msg_entry_write_msg(void)
  2766. {
  2767.     /*----------------------------------------------------------------*/
  2768.     /* Local Variables                                                */
  2769.     /*----------------------------------------------------------------*/
  2770.     U8 *guiBuffer = NULL;
  2771.     EMSData *pEMS;
  2772.     /*----------------------------------------------------------------*/
  2773.     /* Code Body                                                      */