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

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) 2002
  8. *
  9. *****************************************************************************/
  10. /*****************************************************************************
  11.  *
  12.  * Filename:
  13.  * ---------
  14.  *  jmms_use_details_ui.C
  15.  *
  16.  * Project:
  17.  * --------
  18.  *  MAUI
  19.  *
  20.  * Description:
  21.  * ------------
  22.  *  This file contains the ui for use details option in all the folders
  23.  *
  24.  * Author:
  25.  * -------
  26.  * -------
  27.  *
  28.  *============================================================================
  29.  *             HISTORY
  30.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  31.  *------------------------------------------------------------------------------
  32.  * removed!
  33.  *
  34.  * removed!
  35.  * removed!
  36.  * removed!
  37.  *
  38.  * removed!
  39.  * removed!
  40.  * removed!
  41.  *
  42.  * removed!
  43.  * removed!
  44.  * removed!
  45.  *
  46.  * removed!
  47.  * removed!
  48.  * removed!
  49.  *
  50.  * removed!
  51.  * removed!
  52.  * removed!
  53.  *
  54.  * removed!
  55.  * removed!
  56.  * removed!
  57.  *
  58.  * removed!
  59.  * removed!
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  *------------------------------------------------------------------------------
  71.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
  72.  *============================================================================
  73.  ****************************************************************************/
  74. #ifndef _MMI_JMMSUSEDETAILSSECMMI_C
  75. #define _MMI_JMMSUSEDETAILSSECMMI_C
  76. /***************************************************************************** 
  77. * Include
  78. *****************************************************************************/
  79. #include "MMI_features.h"
  80. #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
  81. #include "PixtelDataTypes.h"
  82. #include "Unicodexdcl.h"
  83. #include "HistoryGprot.h"
  84. #include "GlobalDefs.h"
  85. #include "SettingProfile.h"
  86. #include "DebugInitDef.h"
  87. #include "CommonScreens.h"
  88. #include "EventsGprot.h"
  89. #include "wgui_inputs.h"
  90. #include "wgui_categories.h"
  91. #include "wgui_categories_inputs.h"
  92. #include "JMMSStoreHandling.h"
  93. #include "MainMenuDef.h"
  94. #include "PhonebookGprot.h"
  95. #include <ddl.h>
  96. #include <jcal.h>
  97. #include <jcalnet.h>
  98. #include "jdi_wspdatatype.h"
  99. #include "jdi_transport.h"
  100. #include <jdi_communicator.h>
  101. #include <MessagingDatatypes.h>
  102. #include <MessagingAPI.h>
  103. #include "CallManagementGprot.h"
  104. #include "JMMSConfig.h"
  105. #include "JMMSMessageSettings.h"
  106. #include "JMMSCoreAPI.h"
  107. #include "JMMSDrafts.h"
  108. #include "JMMSExdcl.h"
  109. #include "JMMSCompose.h"
  110. #include "JMMSGprot.h"
  111. #include "JMMSInbox.h"
  112. #include "JMMSJSRHandler.h"
  113. #include "JMMSMainMMS.h"
  114. #include "JMMSMessageSettingsUtils.h"
  115. #include "JMMSOutbox.h"
  116. #include "JMMSProtocols.h"
  117. #include "JMMSPushHandling.h"
  118. #include "JMMSResEnum.h"
  119. #include "JMMSSent.h"
  120. #include "JMMSStoreHandling.h"
  121. #include "JMMSStructs.h"
  122. #include "JMMSTemplates.h"
  123. #include "JMMSUseDetails.h"
  124. #include "JMMSView.h"
  125. #include "JMMSWriteMMS.h"
  126. //KP Jerry add on 2007-4-12 start
  127. #ifdef __MMI_MESSAGES_SENDMSG_QUICKLY__
  128. #include "MessagesResourceData.h"
  129. #endif
  130. //KP Jerry add on 2007-4-12 end
  131. /***************************************************************************** 
  132. * Define
  133. *****************************************************************************/
  134. /***************************************************************************** 
  135. * Typedef 
  136. *****************************************************************************/
  137. /***************************************************************************** 
  138. * Local Variable
  139. *****************************************************************************/
  140. /***************************************************************************** 
  141. * Local Function
  142. *****************************************************************************/
  143. /***************************************************************************** 
  144. * Global Variable
  145. *****************************************************************************/
  146. jmms_use_details_struct g_jmms_use_details;
  147. /***************************************************************************** 
  148. * Global Function
  149. *****************************************************************************/
  150. /*****************************************************************************
  151.  * FUNCTION
  152.  *  mmi_jmms_pre_entry_use_details_screen
  153.  * DESCRIPTION
  154.  *  Entry fn for use details screen
  155.  * PARAMETERS
  156.  *  folder_name     [IN]        
  157.  * RETURNS
  158.  *  void
  159.  *****************************************************************************/
  160. void mmi_jmms_pre_entry_use_details_screen(S8 *folder_name)
  161. {
  162.     /*----------------------------------------------------------------*/
  163.     /* Local Variables                                                */
  164.     /*----------------------------------------------------------------*/
  165.     U8 number = 0;
  166.     RETRIEVE_FILTERS StoreRetFilter = {0, };
  167.     MESSAGE_LIST *pMessageList = NULL;
  168.     MESSAGE_LIST *pTempMessageList = NULL;
  169.     JC_CHAR *from_addresses = NULL, *to_addresses = NULL, *cc_addresses = NULL, *bcc_addresses = NULL;
  170.     JC_RETCODE eRet = JC_OK;
  171.     /*----------------------------------------------------------------*/
  172.     /* Code Body                                                      */
  173.     /*----------------------------------------------------------------*/
  174. number = g_jmms_context->store_context->nMsgs_in_Current_folder;
  175.     StoreRetFilter.uiStartIndex = number - g_jmms_context->nCurr_scr_hilited_index;
  176.     StoreRetFilter.eRetrieve = E_RETRIEVE_BY_INDEX;
  177.     StoreRetFilter.uiNumMessage = 1;
  178.     eRet = mmi_jmms_get_messages_list(folder_name, &pTempMessageList, &StoreRetFilter);
  179.     pMessageList = pTempMessageList;
  180.     if (eRet != JC_OK || pMessageList == NULL)
  181.     {
  182.         mmi_jmms_error_handler(eRet);
  183.         return;
  184.     }
  185.     if (g_jmms_context->store_context->current_folder_name == E_JMMS_INBOX)
  186.     {
  187.         switch (pMessageList->pMessageHeaders->eMsgType)
  188.         {
  189.             case E_MSG_TYPE_NOTIFICATION:
  190.             {
  191.                 MESSAGE_NOTIFICATION *notification_p;
  192.                 notification_p = (MESSAGE_NOTIFICATION*) (pMessageList->pMessageHeaders->pHeaders);
  193.                 from_addresses = notification_p->pFrom;
  194.                 to_addresses = NULL;
  195.                 cc_addresses = NULL;
  196.                 bcc_addresses = NULL;
  197.                 break;
  198.             }
  199.             case E_MSG_TYPE_RECEIVE:
  200.             {
  201.                 MESSAGE_RETRIEVAL *retrieval_p;
  202.                 retrieval_p = (MESSAGE_RETRIEVAL*) (pMessageList->pMessageHeaders->pHeaders);
  203.                 from_addresses = retrieval_p->pFrom;
  204.                 to_addresses = retrieval_p->pTo;
  205.                 cc_addresses = retrieval_p->pCc;
  206.                 bcc_addresses = NULL;
  207.                 break;
  208.             }
  209.             case E_MSG_TYPE_DELIVERY_REPORT:
  210.             {
  211.                 DELIVERY_REPORT *delievery_report_p;
  212.                 delievery_report_p = (DELIVERY_REPORT*) (pMessageList->pMessageHeaders->pHeaders);
  213.                 from_addresses = NULL;
  214.                 to_addresses = delievery_report_p->pTo;
  215.                 cc_addresses = NULL;
  216.                 bcc_addresses = NULL;
  217.                 break;
  218.             }
  219.             case E_MSG_TYPE_READ_REPORT_RESPONSE:
  220.             {
  221.                 READ_REPORT_RESPONSE *read_report_p;
  222.                 read_report_p = (READ_REPORT_RESPONSE*) (pMessageList->pMessageHeaders->pHeaders);
  223.                 from_addresses = read_report_p->pFrom;
  224.                 to_addresses = read_report_p->pTo;
  225.                 cc_addresses = NULL;
  226.                 bcc_addresses = NULL;
  227.                 break;
  228.             }
  229.             default:
  230.                 return;
  231.         }
  232.     }
  233.     else
  234.     {
  235.         switch (pMessageList->pMessageHeaders->eMsgType)
  236.         {
  237.             case E_MSG_TYPE_SEND:
  238.             {
  239.                 MESSAGE_SEND *send_p;
  240.                 send_p = (MESSAGE_SEND*) (pMessageList->pMessageHeaders->pHeaders);
  241.                 from_addresses = send_p->pFrom;
  242.                 to_addresses = send_p->pTo;
  243.                 cc_addresses = send_p->pCc;
  244.                 bcc_addresses = send_p->pBcc;
  245.                 break;
  246.             }
  247.             default:
  248.                 return;
  249.         }
  250.     }
  251.     mmi_jmms_free_use_details_adrresses_list();
  252.     mmi_jmms_create_use_details_addresses_list(from_addresses, to_addresses, cc_addresses, bcc_addresses);
  253.     /* HIMANSHU Put this condition in Unified Messaging only */
  254. #ifdef __MMI_UNIFIED_MESSAGE__
  255.     if (g_jmms_use_details.addresses_list == NULL)
  256.     {
  257.         DisplayPopup(
  258.             (U8*) GetString(STR_ID_JMMS_USE_DETAILS_NO_NUMBER),
  259.             IMG_GLOBAL_EMPTY,
  260.             1,
  261.             JMMS_POPUP_TIME,
  262.             EMPTY_LIST_TONE);
  263.         return;
  264.     }
  265. #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  266. #ifdef __MMI_UNIFIED_MESSAGE__
  267.     mmi_jmms_use_details_number();  /* sachin */
  268. #else 
  269.     mmi_jmms_entry_use_details_screen();
  270. #endif 
  271. }
  272. /*****************************************************************************
  273.  * FUNCTION
  274.  *  mmi_jmms_entry_use_details_screen
  275.  * DESCRIPTION
  276.  *  
  277.  * PARAMETERS
  278.  *  void
  279.  * RETURNS
  280.  *  void
  281.  *****************************************************************************/
  282. #ifndef __MMI_UNIFIED_MESSAGE__
  283. void mmi_jmms_entry_use_details_screen(void)
  284. {
  285.     /*----------------------------------------------------------------*/
  286.     /* Local Variables                                                */
  287.     /*----------------------------------------------------------------*/
  288.     PU8 gui_buffer;                     /* Buffer holding history data */
  289.     U16 str_item_list[MAX_SUB_MENUS];   /* Stores the strings id of submenus returned */
  290.     U16 num_item;                       /* Stores no of children in the submenu */
  291.     U16 scrid;
  292.     U16 menuid;
  293.     /*----------------------------------------------------------------*/
  294.     /* Code Body                                                      */
  295.     /*----------------------------------------------------------------*/
  296.     if (g_jmms_context->store_context->current_folder_name == E_JMMS_INBOX)
  297.     {
  298.         scrid = SCR_ID_JMMS_INBOX_OPTIONS_USE_DETAILS;
  299.         menuid = MENU_ID_JMMS_INBOX_OPTIONS_USE_DETAILS;
  300.     }
  301.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_OUTBOX)
  302.     {
  303.         scrid = SCR_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS;
  304.         menuid = MENU_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS;
  305.     }
  306.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_SENT)
  307.     {
  308.         scrid = SCR_ID_JMMS_SENT_OPTIONS_USE_DETAILS;
  309.         menuid = MENU_ID_JMMS_SENT_OPTIONS_USE_DETAILS;
  310.     }
  311.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_DRAFTS)
  312.     {
  313.         scrid = SCR_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS;
  314.         menuid = MENU_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS;
  315.     }
  316.     else
  317.     {
  318.         return;
  319.     }
  320.     EntryNewScreen(scrid, NULL, mmi_jmms_entry_use_details_screen, NULL);
  321.     gui_buffer = GetCurrGuiBuffer(scrid);
  322.     num_item = GetNumOfChild(menuid);
  323.     GetSequenceStringIds_Ext(menuid, str_item_list);
  324.     SetParentHandler(menuid);
  325.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  326.     ShowCategory52Screen(
  327.         STR_GLOBAL_OPTIONS,
  328.         GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
  329.         STR_GLOBAL_OK,
  330.         IMG_GLOBAL_OK,
  331.         STR_GLOBAL_BACK,
  332.         IMG_GLOBAL_BACK,
  333.         num_item,
  334.         str_item_list,
  335.         (U16*) gIndexIconsImageList,
  336.         (U8 **) NULL,
  337.         0,
  338.         0,
  339.         gui_buffer);
  340.     SetRightSoftkeyFunction(mmi_jmms_back_from_use_details_main_screen, KEY_EVENT_UP);
  341.     SetKeyHandler(mmi_jmms_back_from_use_details_main_screen, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  342. }
  343. /*****************************************************************************
  344.  * FUNCTION
  345.  *  mmi_jmms_back_from_use_details_main_screen
  346.  * DESCRIPTION
  347.  *  
  348.  * PARAMETERS
  349.  *  void
  350.  * RETURNS
  351.  *  void
  352.  *****************************************************************************/
  353. void mmi_jmms_back_from_use_details_main_screen(void)
  354. {
  355.     /*----------------------------------------------------------------*/
  356.     /* Local Variables                                                */
  357.     /*----------------------------------------------------------------*/
  358.     /*----------------------------------------------------------------*/
  359.     /* Code Body                                                      */
  360.     /*----------------------------------------------------------------*/
  361.     mmi_jmms_free_use_details_adrresses_list();
  362.     GoBackHistory();
  363. }
  364. #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  365. /*****************************************************************************
  366.  * FUNCTION
  367.  *  mmi_jmms_create_use_details_addresses_list
  368.  * DESCRIPTION
  369.  *  
  370.  * PARAMETERS
  371.  *  from        [IN]        
  372.  *  to          [IN]        
  373.  *  cc          [IN]        
  374.  *  bcc         [IN]        
  375.  * RETURNS
  376.  *  void
  377.  *****************************************************************************/
  378. void mmi_jmms_create_use_details_addresses_list(JC_CHAR *from, JC_CHAR *to, JC_CHAR *cc, JC_CHAR *bcc)
  379. {
  380.     /*----------------------------------------------------------------*/
  381.     /* Local Variables                                                */
  382.     /*----------------------------------------------------------------*/
  383.     mms_addresses_list *node = NULL;
  384.     S32 len_to_copy = 0;
  385.     S8 *str = NULL;
  386.     S32 len = 0;
  387.     S32 start_index = 0;
  388.     /*----------------------------------------------------------------*/
  389.     /* Code Body                                                      */
  390.     /*----------------------------------------------------------------*/
  391.     /* MAUI_00018175 Start */
  392.     if (g_jmms_context->view_context != NULL &&
  393.         g_jmms_context->view_context->focus_object_type == E_MSG_FOCUS_PHONE_NUMBER)
  394.         /* MAUI_00018175 End */
  395.     {
  396.         ACTIVE_MEDIA_INFO activeMediaInfo;
  397.         mmi_jmms_jdi_get_active_media_info(g_jmms_context->msg_handle, &activeMediaInfo);
  398.         node = (mms_addresses_list*) jdd_MemAlloc(sizeof(mms_addresses_list), 1);
  399.         if (node == NULL)
  400.         {
  401.             DisplayPopup(
  402.                 (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  403.                 IMG_GLOBAL_ERROR,
  404.                 1,
  405.                 JMMS_POPUP_TIME,
  406.                 (U8) ERROR_TONE);
  407.             mmi_jmms_free_use_details_adrresses_list();
  408.             return;
  409.         }
  410.         node->is_email = MMI_FALSE;
  411.         len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
  412.         node->address = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
  413.         if (node->address == NULL)
  414.         {
  415.             DisplayPopup(
  416.                 (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  417.                 IMG_GLOBAL_ERROR,
  418.                 1,
  419.                 JMMS_POPUP_TIME,
  420.                 (U8) ERROR_TONE);
  421.             /* HIMANSHU Memory Leak Fix Start */
  422.             if (node != NULL)
  423.             {
  424.                 jdd_MemFree(node);
  425.                 node = NULL;
  426.             }
  427.             /* HIMANSHU Memory Leak Fix End */
  428.             mmi_jmms_free_use_details_adrresses_list();
  429.             return;
  430.         }
  431.         pfnUnicodeStrncpy((S8*) node->address, (S8*) activeMediaInfo.LinkInfo.pLinkText, len_to_copy);
  432.         /* HIMANSHU Memory Leak Fix Start */
  433.         if (g_jmms_use_details.addresses_list != NULL)
  434.         {
  435.             mmi_jmms_free_use_details_adrresses_list();
  436.         }
  437.         g_jmms_use_details.addresses_list = node;
  438.         /* HIMANSHU Memory Leak Fix End */
  439.     }
  440.     if (from != NULL)
  441.     {
  442.         str = (S8*) (from);
  443.         len = 0;
  444.         start_index = 0;
  445.         node = NULL;
  446.         while (pfnUnicodeStrcmp(str, "") != 0)
  447.         {
  448.             node = (mms_addresses_list*) jdd_MemAlloc(sizeof(mms_addresses_list), 1);
  449.             if (node == NULL)
  450.             {
  451.                 DisplayPopup(
  452.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  453.                     IMG_GLOBAL_ERROR,
  454.                     1,
  455.                     JMMS_POPUP_TIME,
  456.                     (U8) ERROR_TONE);
  457.                 mmi_jmms_free_use_details_adrresses_list();
  458.                 return;
  459.             }
  460.             node->is_email = MMI_FALSE;
  461.             while (((*str) != ';') && ((*str) != ''))
  462.             {
  463.                 if ((*str) == '@')
  464.                 {
  465.                     node->is_email = MMI_TRUE;
  466.                 }
  467.                 len++;
  468.                 str = str + ENCODING_LENGTH;
  469.             }
  470.             if (node->is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
  471.             {
  472.                 len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
  473.             }
  474.             else if (node->is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
  475.             {
  476.                 len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
  477.             }
  478.             else
  479.             {
  480.                 len_to_copy = len;
  481.             }
  482.             node->address = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
  483.             if (node->address == NULL)
  484.             {
  485.                 DisplayPopup(
  486.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  487.                     IMG_GLOBAL_ERROR,
  488.                     1,
  489.                     JMMS_POPUP_TIME,
  490.                     (U8) ERROR_TONE);
  491.                 /* HIMANSHU Memory Leak Fix Start */
  492.                 if (node != NULL)
  493.                 {
  494.                     jdd_MemFree(node);
  495.                     node = NULL;
  496.                 }
  497.                 /* HIMANSHU Memory Leak Fix End */
  498.                 mmi_jmms_free_use_details_adrresses_list();
  499.                 return;
  500.             }
  501.             pfnUnicodeStrncpy((S8*) node->address, (S8*) (from + start_index), len_to_copy);
  502.             if (g_jmms_use_details.addresses_list == NULL)
  503.             {
  504.                 g_jmms_use_details.addresses_list = node;
  505.             }
  506.             else
  507.             {
  508.                 mms_addresses_list *temp, *temp1;
  509.                 MMI_BOOL is_duplicate = MMI_FALSE;
  510.                 temp = g_jmms_use_details.addresses_list;
  511.                 while (temp != NULL)
  512.                 {
  513.                     if (pfnUnicodeStrcmp((S8*) (node->address), (S8*) (temp->address)) == 0)
  514.                     {
  515.                         is_duplicate = MMI_TRUE;
  516.                         break;
  517.                     }
  518.                     temp1 = temp;
  519.                     temp = temp->next;
  520.                 }
  521.                 /* HIMANSHU Memory Leak Fix Start */
  522.                 if (is_duplicate == MMI_FALSE)
  523.                 {
  524.                     temp1->next = node;
  525.                 }
  526.                 else
  527.                 {
  528.                     if (node != NULL)
  529.                     {
  530.                         if (node->address != NULL)
  531.                         {
  532.                             jdd_MemFree(node->address);
  533.                             node->address = NULL;
  534.                         }
  535.                         jdd_MemFree(node);
  536.                         node = NULL;
  537.                     }
  538.                 }
  539.                 /* HIMANSHU Memory Leak Fix End */
  540.             }
  541.             start_index = start_index + len + 1;
  542.             len = 0;
  543.             node = NULL;
  544.             if ((*str) != '')
  545.             {
  546.                 str = str + ENCODING_LENGTH;
  547.             }
  548.         }
  549.     }
  550.     if (to != NULL)
  551.     {
  552.         str = (S8*) (to);
  553.         len = 0;
  554.         start_index = 0;
  555.         node = NULL;
  556.         while (pfnUnicodeStrcmp(str, "") != 0)
  557.         {
  558.             node = (mms_addresses_list*) jdd_MemAlloc(sizeof(mms_addresses_list), 1);
  559.             if (node == NULL)
  560.             {
  561.                 DisplayPopup(
  562.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  563.                     IMG_GLOBAL_ERROR,
  564.                     1,
  565.                     JMMS_POPUP_TIME,
  566.                     (U8) ERROR_TONE);
  567.                 mmi_jmms_free_use_details_adrresses_list();
  568.                 return;
  569.             }
  570.             node->is_email = MMI_FALSE;
  571.             while (((*str) != ';') && ((*str) != ''))
  572.             {
  573.                 if ((*str) == '@')
  574.                 {
  575.                     node->is_email = MMI_TRUE;
  576.                 }
  577.                 len++;
  578.                 str = str + ENCODING_LENGTH;
  579.             }
  580.             if (node->is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
  581.             {
  582.                 len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
  583.             }
  584.             else if (node->is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
  585.             {
  586.                 len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
  587.             }
  588.             else
  589.             {
  590.                 len_to_copy = len;
  591.             }
  592.             node->address = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
  593.             if (node->address == NULL)
  594.             {
  595.                 DisplayPopup(
  596.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  597.                     IMG_GLOBAL_ERROR,
  598.                     1,
  599.                     JMMS_POPUP_TIME,
  600.                     (U8) ERROR_TONE);
  601.                 /* HIMANSHU Memory Leak Fix Start */
  602.                 if (node != NULL)
  603.                 {
  604.                     jdd_MemFree(node);
  605.                     node = NULL;
  606.                 }
  607.                 /* HIMANSHU Memory Leak Fix End */
  608.                 mmi_jmms_free_use_details_adrresses_list();
  609.                 return;
  610.             }
  611.             pfnUnicodeStrncpy((S8*) node->address, (S8*) (to + start_index), len_to_copy);
  612.             if (g_jmms_use_details.addresses_list == NULL)
  613.             {
  614.                 g_jmms_use_details.addresses_list = node;
  615.             }
  616.             else
  617.             {
  618.                 mms_addresses_list *temp, *temp1;
  619.                 MMI_BOOL is_duplicate = MMI_FALSE;
  620.                 temp = g_jmms_use_details.addresses_list;
  621.                 while (temp != NULL)
  622.                 {
  623.                     if (pfnUnicodeStrcmp((S8*) (node->address), (S8*) (temp->address)) == 0)
  624.                     {
  625.                         is_duplicate = MMI_TRUE;
  626.                         break;
  627.                     }
  628.                     temp1 = temp;
  629.                     temp = temp->next;
  630.                 }
  631.                 /* HIMANSHU Memory Leak Fix Start */
  632.                 if (is_duplicate == MMI_FALSE)
  633.                 {
  634.                     temp1->next = node;
  635.                 }
  636.                 else
  637.                 {
  638.                     if (node != NULL)
  639.                     {
  640.                         if (node->address != NULL)
  641.                         {
  642.                             jdd_MemFree(node->address);
  643.                             node->address = NULL;
  644.                         }
  645.                         jdd_MemFree(node);
  646.                         node = NULL;
  647.                     }
  648.                 }
  649.                 /* HIMANSHU Memory Leak Fix End */
  650.             }
  651.             start_index = start_index + len + 1;
  652.             len = 0;
  653.             node = NULL;
  654.             if ((*str) != '')
  655.             {
  656.                 str = str + ENCODING_LENGTH;
  657.             }
  658.         }
  659.     }
  660.     if (cc != NULL)
  661.     {
  662.         str = (S8*) (cc);
  663.         len = 0;
  664.         start_index = 0;
  665.         node = NULL;
  666.         while (pfnUnicodeStrcmp(str, "") != 0)
  667.         {
  668.             node = (mms_addresses_list*) jdd_MemAlloc(sizeof(mms_addresses_list), 1);
  669.             if (node == NULL)
  670.             {
  671.                 DisplayPopup(
  672.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  673.                     IMG_GLOBAL_ERROR,
  674.                     1,
  675.                     JMMS_POPUP_TIME,
  676.                     (U8) ERROR_TONE);
  677.                 mmi_jmms_free_use_details_adrresses_list();
  678.                 return;
  679.             }
  680.             node->is_email = MMI_FALSE;
  681.             while (((*str) != ';') && ((*str) != ''))
  682.             {
  683.                 if ((*str) == '@')
  684.                 {
  685.                     node->is_email = MMI_TRUE;
  686.                 }
  687.                 len++;
  688.                 str = str + ENCODING_LENGTH;
  689.             }
  690.             if (node->is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
  691.             {
  692.                 len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
  693.             }
  694.             else if (node->is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
  695.             {
  696.                 len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
  697.             }
  698.             else
  699.             {
  700.                 len_to_copy = len;
  701.             }
  702.             node->address = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
  703.             if (node->address == NULL)
  704.             {
  705.                 DisplayPopup(
  706.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  707.                     IMG_GLOBAL_ERROR,
  708.                     1,
  709.                     JMMS_POPUP_TIME,
  710.                     (U8) ERROR_TONE);
  711.                 /* HIMANSHU Memory Leak Fix Start */
  712.                 if (node != NULL)
  713.                 {
  714.                     jdd_MemFree(node);
  715.                     node = NULL;
  716.                 }
  717.                 /* HIMANSHU Memory Leak Fix End */
  718.                 mmi_jmms_free_use_details_adrresses_list();
  719.                 return;
  720.             }
  721.             pfnUnicodeStrncpy((S8*) node->address, (S8*) (cc + start_index), len_to_copy);
  722.             if (g_jmms_use_details.addresses_list == NULL)
  723.             {
  724.                 g_jmms_use_details.addresses_list = node;
  725.             }
  726.             else
  727.             {
  728.                 mms_addresses_list *temp, *temp1;
  729.                 MMI_BOOL is_duplicate = MMI_FALSE;
  730.                 temp = g_jmms_use_details.addresses_list;
  731.                 while (temp != NULL)
  732.                 {
  733.                     if (pfnUnicodeStrcmp((S8*) (node->address), (S8*) (temp->address)) == 0)
  734.                     {
  735.                         is_duplicate = MMI_TRUE;
  736.                         break;
  737.                     }
  738.                     temp1 = temp;
  739.                     temp = temp->next;
  740.                 }
  741.                 /* HIMANSHU Memory Leak Fix Start */
  742.                 if (is_duplicate == MMI_FALSE)
  743.                 {
  744.                     temp1->next = node;
  745.                 }
  746.                 else
  747.                 {
  748.                     if (node != NULL)
  749.                     {
  750.                         if (node->address != NULL)
  751.                         {
  752.                             jdd_MemFree(node->address);
  753.                             node->address = NULL;
  754.                         }
  755.                         jdd_MemFree(node);
  756.                         node = NULL;
  757.                     }
  758.                 }
  759.                 /* HIMANSHU Memory Leak Fix End */
  760.             }
  761.             start_index = start_index + len + 1;
  762.             len = 0;
  763.             node = NULL;
  764.             if ((*str) != '')
  765.             {
  766.                 str = str + ENCODING_LENGTH;
  767.             }
  768.         }
  769.     }
  770.     if (bcc != NULL)
  771.     {
  772.         str = (S8*) (bcc);
  773.         len = 0;
  774.         start_index = 0;
  775.         node = NULL;
  776.         while (pfnUnicodeStrcmp(str, "") != 0)
  777.         {
  778.             node = (mms_addresses_list*) jdd_MemAlloc(sizeof(mms_addresses_list), 1);
  779.             if (node == NULL)
  780.             {
  781.                 DisplayPopup(
  782.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  783.                     IMG_GLOBAL_ERROR,
  784.                     1,
  785.                     JMMS_POPUP_TIME,
  786.                     (U8) ERROR_TONE);
  787.                 mmi_jmms_free_use_details_adrresses_list();
  788.                 return;
  789.             }
  790.             node->is_email = MMI_FALSE;
  791.             while (((*str) != ';') && ((*str) != ''))
  792.             {
  793.                 if ((*str) == '@')
  794.                 {
  795.                     node->is_email = MMI_TRUE;
  796.                 }
  797.                 len++;
  798.                 str = str + ENCODING_LENGTH;
  799.             }
  800.             if (node->is_email == MMI_FALSE && len > (MAX_POSSIBLE_NUMBER_LENGHT_SENT))
  801.             {
  802.                 len_to_copy = MAX_POSSIBLE_NUMBER_LENGHT_SENT;
  803.             }
  804.             else if (node->is_email == MMI_TRUE && len > (MAX_POSSIBLE_EMAIL_LENGHT_SENT))
  805.             {
  806.                 len_to_copy = MAX_POSSIBLE_EMAIL_LENGHT_SENT;
  807.             }
  808.             else
  809.             {
  810.                 len_to_copy = len;
  811.             }
  812.             node->address = (S8*) jdd_MemAlloc(sizeof(S8), (len_to_copy + 1) * ENCODING_LENGTH);
  813.             if (node->address == NULL)
  814.             {
  815.                 DisplayPopup(
  816.                     (U8*) GetString(STR_ID_JMMS_OUT_OF_MEMORY),
  817.                     IMG_GLOBAL_ERROR,
  818.                     1,
  819.                     JMMS_POPUP_TIME,
  820.                     (U8) ERROR_TONE);
  821.                 /* HIMANSHU Memory Leak Fix Start */
  822.                 if (node != NULL)
  823.                 {
  824.                     jdd_MemFree(node);
  825.                     node = NULL;
  826.                 }
  827.                 /* HIMANSHU Memory Leak Fix End */
  828.                 mmi_jmms_free_use_details_adrresses_list();
  829.                 return;
  830.             }
  831.             pfnUnicodeStrncpy((S8*) node->address, (S8*) (bcc + start_index), len_to_copy);
  832.             if (g_jmms_use_details.addresses_list == NULL)
  833.             {
  834.                 g_jmms_use_details.addresses_list = node;
  835.             }
  836.             else
  837.             {
  838.                 mms_addresses_list *temp, *temp1;
  839.                 MMI_BOOL is_duplicate = MMI_FALSE;
  840.                 temp = g_jmms_use_details.addresses_list;
  841.                 while (temp != NULL)
  842.                 {
  843.                     if (pfnUnicodeStrcmp((S8*) (node->address), (S8*) (temp->address)) == 0)
  844.                     {
  845.                         is_duplicate = MMI_TRUE;
  846.                         break;
  847.                     }
  848.                     temp1 = temp;
  849.                     temp = temp->next;
  850.                 }
  851.                 /* HIMANSHU Memory Leak Fix Start */
  852.                 if (is_duplicate == MMI_FALSE)
  853.                 {
  854.                     temp1->next = node;
  855.                 }
  856.                 else
  857.                 {
  858.                     if (node != NULL)
  859.                     {
  860.                         if (node->address != NULL)
  861.                         {
  862.                             jdd_MemFree(node->address);
  863.                             node->address = NULL;
  864.                         }
  865.                         jdd_MemFree(node);
  866.                         node = NULL;
  867.                     }
  868.                 }
  869.                 /* HIMANSHU Memory Leak Fix End */
  870.             }
  871.             start_index = start_index + len + 1;
  872.             len = 0;
  873.             node = NULL;
  874.             if ((*str) != '')
  875.             {
  876.                 str = str + ENCODING_LENGTH;
  877.             }
  878.         }
  879.     }
  880. }
  881. /*****************************************************************************
  882.  * FUNCTION
  883.  *  mmi_jmms_free_use_details_adrresses_list
  884.  * DESCRIPTION
  885.  *  
  886.  * PARAMETERS
  887.  *  void
  888.  * RETURNS
  889.  *  void
  890.  *****************************************************************************/
  891. void mmi_jmms_free_use_details_adrresses_list(void)
  892. {
  893.     /*----------------------------------------------------------------*/
  894.     /* Local Variables                                                */
  895.     /*----------------------------------------------------------------*/
  896.     mms_addresses_list *temp, *node;
  897.     /*----------------------------------------------------------------*/
  898.     /* Code Body                                                      */
  899.     /*----------------------------------------------------------------*/
  900.     temp = g_jmms_use_details.addresses_list;
  901.     while (temp != NULL)
  902.     {
  903.         node = temp->next;
  904.         if (temp->address != NULL)
  905.         {
  906.             jdd_MemFree(temp->address);
  907.             temp->address = NULL;
  908.         }
  909.         jdd_MemFree(temp);
  910.         temp = NULL;
  911.         temp = node;
  912.     }
  913.     g_jmms_use_details.addresses_list = NULL;
  914. }
  915. #ifndef __MMI_UNIFIED_MESSAGE__
  916. /*****************************************************************************
  917.  * FUNCTION
  918.  *  mmi_jmms_highlight_options_use_details_number
  919.  * DESCRIPTION
  920.  *  Highlight hdlr of use details use number option
  921.  * PARAMETERS
  922.  *  void
  923.  * RETURNS
  924.  *  void
  925.  *****************************************************************************/
  926. void mmi_jmms_highlight_options_use_details_number(void)
  927. {
  928.     /*----------------------------------------------------------------*/
  929.     /* Local Variables                                                */
  930.     /*----------------------------------------------------------------*/
  931.     /*----------------------------------------------------------------*/
  932.     /* Code Body                                                      */
  933.     /*----------------------------------------------------------------*/
  934.     g_jmms_use_details.number_email_flag = E_USE_NUMBER;
  935.     ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  936.     SetLeftSoftkeyFunction(mmi_jmms_use_details_number, KEY_EVENT_UP);
  937.     SetKeyHandler(mmi_jmms_use_details_number, KEY_SEND, KEY_EVENT_DOWN);
  938.     SetKeyHandler(mmi_jmms_use_details_number, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  939.     SetKeyHandler(mmi_jmms_use_details_number, KEY_WAP, KEY_EVENT_DOWN);
  940. }
  941. #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  942. /*****************************************************************************
  943.  * FUNCTION
  944.  *  mmi_jmms_use_details_number
  945.  * DESCRIPTION
  946.  *  Pre entry fn for number list screen. It checks whether some number is present
  947.  *  or not in To,Cc,From fields of selected message
  948.  * PARAMETERS
  949.  *  void
  950.  * RETURNS
  951.  *  void
  952.  *****************************************************************************/
  953. void mmi_jmms_use_details_number(void)
  954. {
  955.     /*----------------------------------------------------------------*/
  956.     /* Local Variables                                                */
  957.     /*----------------------------------------------------------------*/
  958.     MMI_BOOL bIsNumberPresent = MMI_FALSE;
  959.     mms_addresses_list *node;
  960.     /*----------------------------------------------------------------*/
  961.     /* Code Body                                                      */
  962.     /*----------------------------------------------------------------*/
  963.     node = g_jmms_use_details.addresses_list;
  964.     while (node != NULL)
  965.     {
  966.         if (node->is_email == MMI_FALSE)
  967.         {
  968.             bIsNumberPresent = MMI_TRUE;
  969.             break;
  970.         }
  971.         node = node->next;
  972.     }
  973.     if (bIsNumberPresent == MMI_FALSE)
  974.     {
  975.         DisplayPopup(
  976.             (U8*) GetString(STR_ID_JMMS_USE_DETAILS_NO_NUMBER),
  977.             IMG_GLOBAL_EMPTY,
  978.             1,
  979.             JMMS_POPUP_TIME,
  980.             EMPTY_LIST_TONE);
  981.     }
  982.     else
  983.     {
  984.         mmi_jmms_entry_use_details_addresses_list();
  985.     }
  986. }
  987. #ifndef __MMI_UNIFIED_MESSAGE__
  988. /*****************************************************************************
  989.  * FUNCTION
  990.  *  mmi_jmms_highlight_options_use_details_email
  991.  * DESCRIPTION
  992.  *  Highlight hdlr of use details use email option
  993.  * PARAMETERS
  994.  *  void
  995.  * RETURNS
  996.  *  void
  997.  *****************************************************************************/
  998. void mmi_jmms_highlight_options_use_details_email(void)
  999. {
  1000.     /*----------------------------------------------------------------*/
  1001.     /* Local Variables                                                */
  1002.     /*----------------------------------------------------------------*/
  1003.     /*----------------------------------------------------------------*/
  1004.     /* Code Body                                                      */
  1005.     /*----------------------------------------------------------------*/
  1006.     g_jmms_use_details.number_email_flag = E_USE_EMAIL;
  1007.     ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1008.     SetLeftSoftkeyFunction(mmi_jmms_use_details_email, KEY_EVENT_UP);
  1009.     SetKeyHandler(mmi_jmms_use_details_email, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1010.     SetKeyHandler(mmi_jmms_use_details_email, KEY_WAP, KEY_EVENT_DOWN);
  1011. }
  1012. /*****************************************************************************
  1013.  * FUNCTION
  1014.  *  mmi_jmms_use_details_email
  1015.  * DESCRIPTION
  1016.  *  Pre entry fn for email list screen. It checks whether some email is present
  1017.  *  or not in To,Cc,From fields of selected message
  1018.  * PARAMETERS
  1019.  *  void
  1020.  * RETURNS
  1021.  *  void
  1022.  *****************************************************************************/
  1023. void mmi_jmms_use_details_email(void)
  1024. {
  1025.     /*----------------------------------------------------------------*/
  1026.     /* Local Variables                                                */
  1027.     /*----------------------------------------------------------------*/
  1028.     MMI_BOOL bIsEmailPresent = MMI_FALSE;
  1029.     mms_addresses_list *node;
  1030.     /*----------------------------------------------------------------*/
  1031.     /* Code Body                                                      */
  1032.     /*----------------------------------------------------------------*/
  1033.     node = g_jmms_use_details.addresses_list;
  1034.     while (node != NULL)
  1035.     {
  1036.         if (node->is_email == MMI_TRUE)
  1037.         {
  1038.             bIsEmailPresent = MMI_TRUE;
  1039.             break;
  1040.         }
  1041.         node = node->next;
  1042.     }
  1043.     if (bIsEmailPresent == MMI_FALSE)
  1044.     {
  1045.         DisplayPopup(
  1046.             (U8*) GetString(STR_ID_JMMS_USE_DETAILS_NO_EMAIL_ID),
  1047.             IMG_GLOBAL_EMPTY,
  1048.             1,
  1049.             JMMS_POPUP_TIME,
  1050.             EMPTY_LIST_TONE);
  1051.     }
  1052.     else
  1053.     {
  1054.         mmi_jmms_entry_use_details_addresses_list();
  1055.     }
  1056. }
  1057. #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1058. /*****************************************************************************
  1059.  * FUNCTION
  1060.  *  mmi_jmms_entry_use_details_addresses_list
  1061.  * DESCRIPTION
  1062.  *  Entry fn for numbers (or emails) list screen
  1063.  * PARAMETERS
  1064.  *  void
  1065.  * RETURNS
  1066.  *  void
  1067.  *****************************************************************************/
  1068. void mmi_jmms_entry_use_details_addresses_list(void)
  1069. {
  1070.     /*----------------------------------------------------------------*/
  1071.     /* Local Variables                                                */
  1072.     /*----------------------------------------------------------------*/
  1073.     PU8 gui_buffer; /* Buffer holding history data */
  1074.     U16 strid;
  1075.     S8 *str_item_list[MAX_POSSIBLE_ADDRESSES];
  1076.     U16 num_item = 0;
  1077.     U16 scrid;
  1078.     U16 menuid;
  1079.     mms_addresses_list *node;
  1080.     /*----------------------------------------------------------------*/
  1081.     /* Code Body                                                      */
  1082.     /*----------------------------------------------------------------*/
  1083.     if (g_jmms_context->store_context->current_folder_name == E_JMMS_INBOX)
  1084.     {
  1085.         scrid = SCR_ID_JMMS_INBOX_OPTIONS_USE_DETAILS_ADDRESSES;
  1086.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1087.         {
  1088.             menuid = MENU_ID_JMMS_INBOX_OPTIONS_USE_DETAILS_NUMBER;
  1089.         }
  1090.     #ifndef __MMI_UNIFIED_MESSAGE__
  1091.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1092.         {
  1093.             menuid = MENU_ID_JMMS_INBOX_OPTIONS_USE_DETAILS_EMAIL;
  1094.         }
  1095.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1096.         else
  1097.         {
  1098.             return;
  1099.         }
  1100.     }
  1101.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_OUTBOX)
  1102.     {
  1103.         scrid = SCR_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS_ADDRESSES;
  1104.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1105.         {
  1106.             menuid = MENU_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS_NUMBER;
  1107.         }
  1108.     #ifndef __MMI_UNIFIED_MESSAGE__
  1109.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1110.         {
  1111.             menuid = MENU_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS_EMAIL;
  1112.         }
  1113.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1114.         else
  1115.         {
  1116.             return;
  1117.         }
  1118.     }
  1119.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_SENT)
  1120.     {
  1121.         scrid = SCR_ID_JMMS_SENT_OPTIONS_USE_DETAILS_ADDRESSES;
  1122.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1123.         {
  1124.             menuid = MENU_ID_JMMS_SENT_OPTIONS_USE_DETAILS_NUMBER;
  1125.         }
  1126.     #ifndef __MMI_UNIFIED_MESSAGE__
  1127.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1128.         {
  1129.             menuid = MENU_ID_JMMS_SENT_OPTIONS_USE_DETAILS_EMAIL;
  1130.         }
  1131.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1132.         else
  1133.         {
  1134.             return;
  1135.         }
  1136.     }
  1137.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_DRAFTS)
  1138.     {
  1139.         scrid = SCR_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS_ADDRESSES;
  1140.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1141.         {
  1142.             menuid = MENU_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS_NUMBER;
  1143.         }
  1144.     #ifndef __MMI_UNIFIED_MESSAGE__
  1145.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1146.         {
  1147.             menuid = MENU_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS_EMAIL;
  1148.         }
  1149.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1150.         else
  1151.         {
  1152.             return;
  1153.         }
  1154.     }
  1155.     else
  1156.     {
  1157.         return;
  1158.     }
  1159.     EntryNewScreen(scrid, NULL, mmi_jmms_entry_use_details_addresses_list, NULL);
  1160.     gui_buffer = GetCurrGuiBuffer(scrid);
  1161.     if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1162.     {
  1163.         strid = STR_ID_JMMS_OPTIONS_USE_DETAILS_NUMBER_LIST;
  1164.         node = g_jmms_use_details.addresses_list;
  1165.         while (node != NULL)
  1166.         {
  1167.             if (node->is_email == MMI_FALSE)
  1168.             {
  1169.                 str_item_list[num_item++] = node->address;
  1170.             }
  1171.             node = node->next;
  1172.         }
  1173.     }
  1174. #ifndef __MMI_UNIFIED_MESSAGE__
  1175.     else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1176.     {
  1177.         strid = STR_ID_JMMS_OPTIONS_USE_DETAILS_EMAIL_LIST;
  1178.         node = g_jmms_use_details.addresses_list;
  1179.         while (node != NULL)
  1180.         {
  1181.             if (node->is_email == MMI_TRUE)
  1182.             {
  1183.                 str_item_list[num_item++] = node->address;
  1184.             }
  1185.             node = node->next;
  1186.         }
  1187.     }
  1188. #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1189.     else
  1190.     {
  1191.         return;
  1192.     }
  1193.     SetParentHandler(menuid);
  1194.     RegisterHighlightHandler(mmi_jmms_use_details_list_highlight_hdlr);
  1195.     ShowCategory53Screen(
  1196.         strid,
  1197.         GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
  1198.         STR_GLOBAL_OPTIONS,
  1199.         IMG_GLOBAL_OPTIONS,
  1200.         STR_GLOBAL_BACK,
  1201.         IMG_GLOBAL_BACK,
  1202.         num_item,
  1203.         (U8 **) str_item_list,
  1204.         (U16*) gIndexIconsImageList,
  1205.         NULL,
  1206.         0,
  1207.         0,
  1208.         gui_buffer);
  1209.     SetLeftSoftkeyFunction(mmi_jmms_entry_use_details_addresses_options, KEY_EVENT_UP);
  1210.     SetKeyHandler(mmi_jmms_entry_use_details_addresses_options, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1211.     SetKeyHandler(mmi_jmms_entry_use_details_addresses_options, KEY_WAP, KEY_EVENT_DOWN);
  1212.     /* MAUI_00018175 Start */
  1213.     if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1214.     {
  1215.         SetKeyHandler(mmi_jmms_use_details_call, KEY_SEND, KEY_EVENT_DOWN);
  1216.     }
  1217.     /* MAUI_00018175 End */
  1218.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1219.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1220. }
  1221. /*****************************************************************************
  1222.  * FUNCTION
  1223.  *  mmi_jmms_use_details_list_highlight_hdlr
  1224.  * DESCRIPTION
  1225.  *  Highlight hdlr of address in address list screen
  1226.  * PARAMETERS
  1227.  *  index       [IN]        
  1228.  * RETURNS
  1229.  *  void
  1230.  *****************************************************************************/
  1231. void mmi_jmms_use_details_list_highlight_hdlr(S32 index)
  1232. {
  1233.     /*----------------------------------------------------------------*/
  1234.     /* Local Variables                                                */
  1235.     /*----------------------------------------------------------------*/
  1236.     /*----------------------------------------------------------------*/
  1237.     /* Code Body                                                      */
  1238.     /*----------------------------------------------------------------*/
  1239.     g_jmms_use_details.hilite_address_index = index;
  1240. }
  1241. /*****************************************************************************
  1242.  * FUNCTION
  1243.  *  mmi_jmms_entry_use_details_addresses_options
  1244.  * DESCRIPTION
  1245.  *  Entry fn for options for use number (or use email) addresses list screen
  1246.  * PARAMETERS
  1247.  *  void
  1248.  * RETURNS
  1249.  *  void
  1250.  *****************************************************************************/
  1251. void mmi_jmms_entry_use_details_addresses_options(void)
  1252. {
  1253.     /*----------------------------------------------------------------*/
  1254.     /* Local Variables                                                */
  1255.     /*----------------------------------------------------------------*/
  1256.     PU8 gui_buffer;                     /* Buffer holding history data */
  1257.     U16 str_item_list[MAX_SUB_MENUS];   /* Stores the strings id of submenus returned */
  1258.     U16 num_item;                       /* Stores no of children in the submenu */
  1259.     U16 scrid;
  1260.     U16 menuid;
  1261.     /*----------------------------------------------------------------*/
  1262.     /* Code Body                                                      */
  1263.     /*----------------------------------------------------------------*/
  1264.     if (g_jmms_context->store_context->current_folder_name == E_JMMS_INBOX)
  1265.     {
  1266.         scrid = SCR_ID_JMMS_INBOX_OPTIONS_USE_DETAILS_ADDRESSES_OPTIONS;
  1267.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1268.         {
  1269.             menuid = MENU_ID_JMMS_INBOX_USE_DETAILS_ADDRESSES_OPTIONS1;
  1270.         }
  1271.     #ifndef __MMI_UNIFIED_MESSAGE__
  1272.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1273.         {
  1274.             menuid = MENU_ID_JMMS_INBOX_USE_DETAILS_ADDRESSES_OPTIONS2;
  1275.         }
  1276.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1277.         else
  1278.         {
  1279.             return;
  1280.         }
  1281.     }
  1282.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_OUTBOX)
  1283.     {
  1284.         scrid = SCR_ID_JMMS_OUTBOX_OPTIONS_USE_DETAILS_ADDRESSES_OPTIONS;
  1285.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1286.         {
  1287.             menuid = MENU_ID_JMMS_OUTBOX_USE_DETAILS_ADDRESSES_OPTIONS1;
  1288.         }
  1289.     #ifndef __MMI_UNIFIED_MESSAGE__
  1290.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1291.         {
  1292.             menuid = MENU_ID_JMMS_OUTBOX_USE_DETAILS_ADDRESSES_OPTIONS2;
  1293.         }
  1294.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1295.         else
  1296.         {
  1297.             return;
  1298.         }
  1299.     }
  1300.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_SENT)
  1301.     {
  1302.         scrid = SCR_ID_JMMS_SENT_OPTIONS_USE_DETAILS_ADDRESSES_OPTIONS;
  1303.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1304.         {
  1305.             menuid = MENU_ID_JMMS_SENT_USE_DETAILS_ADDRESSES_OPTIONS1;
  1306.         }
  1307.     #ifndef __MMI_UNIFIED_MESSAGE__
  1308.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1309.         {
  1310.             menuid = MENU_ID_JMMS_SENT_USE_DETAILS_ADDRESSES_OPTIONS2;
  1311.         }
  1312.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1313.         else
  1314.         {
  1315.             return;
  1316.         }
  1317.     }
  1318.     else if (g_jmms_context->store_context->current_folder_name == E_JMMS_DRAFTS)
  1319.     {
  1320.         scrid = SCR_ID_JMMS_DRAFTS_OPTIONS_USE_DETAILS_ADDRESSES_OPTIONS;
  1321.         if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1322.         {
  1323.             menuid = MENU_ID_JMMS_DRAFTS_USE_DETAILS_ADDRESSES_OPTIONS1;
  1324.         }
  1325.     #ifndef __MMI_UNIFIED_MESSAGE__
  1326.         else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1327.         {
  1328.             menuid = MENU_ID_JMMS_DRAFTS_USE_DETAILS_ADDRESSES_OPTIONS2;
  1329.         }
  1330.     #endif /* __MMI_UNIFIED_MESSAGE__ */ 
  1331.         else
  1332.         {
  1333.             return;
  1334.         }
  1335.     }
  1336.     else
  1337.     {
  1338.         return;
  1339.     }
  1340.     EntryNewScreen(scrid, NULL, mmi_jmms_entry_use_details_addresses_options, NULL);
  1341.     gui_buffer = GetCurrGuiBuffer(scrid);
  1342.     num_item = GetNumOfChild(menuid);
  1343.     GetSequenceStringIds_Ext(menuid, str_item_list);
  1344.     SetParentHandler(menuid);
  1345.     RegisterHighlightHandler(ExecuteCurrHiliteHandler);
  1346.     ShowCategory52Screen(
  1347.         STR_GLOBAL_OPTIONS,
  1348.         GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
  1349.         STR_GLOBAL_OK,
  1350.         IMG_GLOBAL_OK,
  1351.         STR_GLOBAL_BACK,
  1352.         IMG_GLOBAL_BACK,
  1353.         num_item,
  1354.         str_item_list,
  1355.         (U16*) gIndexIconsImageList,
  1356.         (U8 **) NULL,
  1357.         0,
  1358.         0,
  1359.         gui_buffer);
  1360.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1361.     SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
  1362. }
  1363. /*****************************************************************************
  1364.  * FUNCTION
  1365.  *  mmi_jmms_highlight_options_use_details_add_to_contact
  1366.  * DESCRIPTION
  1367.  *  Highlight handler of Add to Contact option
  1368.  * PARAMETERS
  1369.  *  void
  1370.  * RETURNS
  1371.  *  void
  1372.  *****************************************************************************/
  1373. void mmi_jmms_highlight_options_use_details_add_to_contact(void)
  1374. {
  1375.     /*----------------------------------------------------------------*/
  1376.     /* Local Variables                                                */
  1377.     /*----------------------------------------------------------------*/
  1378.     /*----------------------------------------------------------------*/
  1379.     /* Code Body                                                      */
  1380.     /*----------------------------------------------------------------*/
  1381.     ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1382.     SetLeftSoftkeyFunction(mmi_jmms_use_details_add_to_contact, KEY_EVENT_UP);
  1383.     SetKeyHandler(mmi_jmms_use_details_add_to_contact, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1384.     SetKeyHandler(mmi_jmms_use_details_add_to_contact, KEY_WAP, KEY_EVENT_DOWN);
  1385. }
  1386. /*****************************************************************************
  1387.  * FUNCTION
  1388.  *  mmi_jmms_use_details_add_to_contact
  1389.  * DESCRIPTION
  1390.  *  Add the selected address to contacts
  1391.  * PARAMETERS
  1392.  *  void
  1393.  * RETURNS
  1394.  *  void
  1395.  *****************************************************************************/
  1396. void mmi_jmms_use_details_add_to_contact(void)
  1397. {
  1398.     /*----------------------------------------------------------------*/
  1399.     /* Local Variables                                                */
  1400.     /*----------------------------------------------------------------*/
  1401.     mms_addresses_list *node;
  1402.     U8 count = 0;
  1403.     /*----------------------------------------------------------------*/
  1404.     /* Code Body                                                      */
  1405.     /*----------------------------------------------------------------*/
  1406.     if (g_jmms_use_details.number_email_flag == E_USE_NUMBER)
  1407.     {
  1408.         node = g_jmms_use_details.addresses_list;
  1409.         while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1410.         {
  1411.             if (node->is_email == MMI_FALSE)
  1412.             {
  1413.                 count++;
  1414.             }
  1415.             node = node->next;
  1416.         }
  1417.         if (node == NULL)
  1418.         {
  1419.             return;
  1420.         }
  1421.         SaveNumberFromIdleScrn((S8*) (node->address), 0);
  1422.     }
  1423.     else if (g_jmms_use_details.number_email_flag == E_USE_EMAIL)
  1424.     {
  1425.         node = g_jmms_use_details.addresses_list;
  1426.         while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_FALSE)
  1427.         {
  1428.             if (node->is_email == MMI_TRUE)
  1429.             {
  1430.                 count++;
  1431.             }
  1432.             node = node->next;
  1433.         }
  1434.         if (node == NULL)
  1435.         {
  1436.             return;
  1437.         }
  1438.         mmi_phb_email_save_entry_to_phb_from_jmms((S8*) (node->address));
  1439.     }
  1440. }
  1441. /*****************************************************************************
  1442.  * FUNCTION
  1443.  *  mmi_jmms_highlight_options_use_details_call
  1444.  * DESCRIPTION
  1445.  *  Highlight hdlr of call option
  1446.  * PARAMETERS
  1447.  *  void
  1448.  * RETURNS
  1449.  *  void
  1450.  *****************************************************************************/
  1451. void mmi_jmms_highlight_options_use_details_call(void)
  1452. {
  1453.     /*----------------------------------------------------------------*/
  1454.     /* Local Variables                                                */
  1455.     /*----------------------------------------------------------------*/
  1456.     /*----------------------------------------------------------------*/
  1457.     /* Code Body                                                      */
  1458.     /*----------------------------------------------------------------*/
  1459.     ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1460.     SetLeftSoftkeyFunction(mmi_jmms_pre_use_details_call, KEY_EVENT_UP); /*Amit added prompt screen */
  1461.     SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1462.     SetKeyHandler(mmi_jmms_pre_use_details_call, KEY_WAP, KEY_EVENT_DOWN);
  1463. }
  1464. /*****************************************************************************
  1465.  * FUNCTION
  1466.  *  mmi_jmms_pre_use_details_call
  1467.  * DESCRIPTION
  1468.  *  Dial confirmation screen
  1469.  * PARAMETERS
  1470.  *  void
  1471.  * RETURNS
  1472.  *  void
  1473.  *****************************************************************************/
  1474. void mmi_jmms_pre_use_details_call(void)
  1475. {
  1476. /*----------------------------------------------------------------*/
  1477. /* Local Variables                                                */
  1478. /*----------------------------------------------------------------*/
  1479. mms_addresses_list *node;
  1480.     U8 count = 0;
  1481. // U32 len = 0; // COMPILER WARNING REMOVAL
  1482. S8 tempstr[(MAX_POSSIBLE_NUMBER_LENGHT_SENT+5)*ENCODING_LENGTH];
  1483.     /*----------------------------------------------------------------*/
  1484.     /* Code Body                                                      */
  1485.     /*----------------------------------------------------------------*/
  1486.     node = g_jmms_use_details.addresses_list;
  1487.     
  1488. while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1489.     {
  1490.         if (node->is_email == MMI_FALSE)
  1491.         {
  1492.             count++;
  1493. }
  1494.         node = node->next;
  1495.     }
  1496.     if (node == NULL)
  1497.     {
  1498. DisplayPopup((PU8) GetString(STR_GLOBAL_ERROR), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
  1499.         return;
  1500. }
  1501. memset(tempstr, 0, sizeof(tempstr));
  1502. pfnUnicodeStrcpy(tempstr, (S8*)get_string(STR_GLOBAL_DIAL));
  1503. pfnUnicodeStrcat(tempstr, " ");
  1504. pfnUnicodeStrcat(tempstr, node->address);
  1505.     DisplayConfirm(
  1506.         STR_GLOBAL_YES,
  1507.         IMG_GLOBAL_YES,
  1508.         STR_GLOBAL_NO,
  1509.         IMG_GLOBAL_NO,
  1510.         (UI_string_type)tempstr,
  1511.         IMG_GLOBAL_QUESTION,
  1512.         0);
  1513.     SetLeftSoftkeyFunction(mmi_jmms_use_details_call, KEY_EVENT_UP);
  1514.     SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
  1515. }/* Amit end*/
  1516. /*****************************************************************************
  1517.  * FUNCTION
  1518.  *  mmi_jmms_use_details_call
  1519.  * DESCRIPTION
  1520.  *  Calls the selected number
  1521.  * PARAMETERS
  1522.  *  void
  1523.  * RETURNS
  1524.  *  void
  1525.  *****************************************************************************/
  1526. void mmi_jmms_use_details_call(void)
  1527. {
  1528.     /*----------------------------------------------------------------*/
  1529.     /* Local Variables                                                */
  1530.     /*----------------------------------------------------------------*/
  1531.     mms_addresses_list *node;
  1532.     U8 count = 0;
  1533.     /*----------------------------------------------------------------*/
  1534.     /* Code Body                                                      */
  1535.     /*----------------------------------------------------------------*/
  1536.     node = g_jmms_use_details.addresses_list;
  1537.     while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1538.     {
  1539.         if (node->is_email == MMI_FALSE)
  1540.         {
  1541.             count++;
  1542.         }
  1543.         node = node->next;
  1544.     }
  1545.     if (node == NULL)
  1546.     {
  1547.         return;
  1548.     }
  1549.     MakeCall((S8*) (node->address));
  1550. }
  1551. //KP Jerry add on 2007-4-12 start
  1552. #ifdef __MMI_MESSAGES_SENDMSG_QUICKLY__
  1553.   
  1554. void Mmi_SendMsg_MmsWr_Init(S8* pDialNum)
  1555.   {
  1556. if(g_jmms_context->init_done == JMMS_READY_WITHOUT_STORE)
  1557. {
  1558. DisplayPopup((U8*) GetString(STR_ID_JMMS_MEMORY_FULL), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
  1559. return;
  1560. }
  1561. g_jmms_context->g_use_local_send_setings = 0;
  1562. g_jmms_context->store_context->current_folder_name = E_JMMS_WRITE_MMS;
  1563. mmi_jmms_init_msg_context_struct(); /* this will different for different ways to come here */
  1564. mmi_jmms_fill_mms_sending_settings(); // sanjeev added for newly added setting structure.
  1565. if (g_jmms_context->compose_context == NULL)
  1566. {
  1567. g_jmms_context->compose_context =
  1568. (jmms_compose_context_struct*) jdd_MemAlloc(sizeof(jmms_compose_context_struct), 1);
  1569. if (g_jmms_context->compose_context == NULL)
  1570. {
  1571. DisplayPopup((PU8) GetString(STR_ID_JMMS_OUT_OF_MEMORY), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
  1572. return;
  1573. }
  1574. }
  1575. if (JMMS_COMP_OK == mmi_jmms_compose_new_mms())
  1576. {
  1577. mmi_jmms_free_addresses_list();
  1578. Set_Jmms_SoftKey_Done();
  1579. g_jmms_context->address_list_flag = E_TO_ADDRESSES;
  1580. g_jmms_context->num_to_addresses = 0;
  1581. mmi_jmms_add_address_in_addresse_list(pDialNum);
  1582. mmi_jmms_entry_write_message_screen();
  1583. }
  1584. }
  1585. void mmi_jmms_pre_use_details_dialIP(void)
  1586. {
  1587. mms_addresses_list *node;
  1588. U8 count = 0;
  1589. S8 tempstr[(MAX_POSSIBLE_NUMBER_LENGHT_SENT+5)*ENCODING_LENGTH];
  1590. node = g_jmms_use_details.addresses_list;
  1591. while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1592. {
  1593. if (node->is_email == MMI_FALSE)
  1594.    {
  1595.          count++;
  1596. }
  1597. node = node->next;
  1598. }
  1599. Mmi_Option_DialIP_Entry(node->address);
  1600. }
  1601. void mmi_jmms_pre_use_details_sendsms(void)
  1602. {
  1603. mms_addresses_list *node;
  1604. U8 count = 0;
  1605. MSG_GETCURNUMSTATE Numstate;
  1606. S8 tempstr[(MAX_POSSIBLE_NUMBER_LENGHT_SENT+5)*ENCODING_LENGTH];
  1607. node = g_jmms_use_details.addresses_list;
  1608. while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1609. {
  1610. if (node->is_email == MMI_FALSE)
  1611.    {
  1612.          count++;
  1613. }
  1614. node = node->next;
  1615. }
  1616. Numstate = Set_CurNum_To_SendNum_UtoA(node->address);
  1617. if(Numstate == NULL)
  1618. {
  1619. DisplayPopup((PU8) GetString(STR_SMS_NUM_CANNOT_BE_EMPTY), IMG_GLOBAL_UNFINISHED, 1, PHB_NOTIFY_TIMEOUT, ERROR_TONE);
  1620. }
  1621. else if(Numstate == CURNUM_OVERLONG)
  1622. {
  1623. DisplayPopup((PU8) GetString(STR_SMS_NUM_LEN_EXCEEDED), IMG_GLOBAL_UNFINISHED, 1, PHB_NOTIFY_TIMEOUT, ERROR_TONE);
  1624. }
  1625. else
  1626. {
  1627. Mmi_SendMsg_SmsWr_Entry();
  1628. }
  1629. }
  1630. void mmi_jmms_pre_use_details_sendmms(void)
  1631. {
  1632. mms_addresses_list *node;
  1633. MSG_GETCURNUMSTATE Numstate;
  1634. U8 count = 0;
  1635. S8 tempstr[(MAX_POSSIBLE_NUMBER_LENGHT_SENT+5)*ENCODING_LENGTH];
  1636. node = g_jmms_use_details.addresses_list;
  1637. while (count != g_jmms_use_details.hilite_address_index || node->is_email == MMI_TRUE)
  1638. {
  1639. if (node->is_email == MMI_FALSE)
  1640.    {
  1641.          count++;
  1642. }
  1643. node = node->next;
  1644. }
  1645. Numstate = Set_CurNum_To_SendNum_UtoA(node->address);
  1646. if(Numstate == NULL)
  1647. {
  1648. DisplayPopup((PU8) GetString(STR_SMS_NUM_CANNOT_BE_EMPTY), IMG_GLOBAL_UNFINISHED, 1, PHB_NOTIFY_TIMEOUT, ERROR_TONE);
  1649. }
  1650. else if(Numstate == CURNUM_OVERLONG)
  1651. {
  1652. DisplayPopup((PU8) GetString(STR_SMS_NUM_LEN_EXCEEDED), IMG_GLOBAL_UNFINISHED, 1, PHB_NOTIFY_TIMEOUT, ERROR_TONE);
  1653. }
  1654. else
  1655. {
  1656. Mmi_SendMsg_MmsWr_Entry(node->address);
  1657. }
  1658. }
  1659. void mmi_jmms_highlight_options_use_details_dialIP(void)
  1660. {
  1661. /*
  1662.     mmi_msg_highlight_generic(
  1663. STR_GLOBAL_OK,
  1664. IMG_GLOBAL_OK,
  1665. STR_GLOBAL_BACK,
  1666. IMG_GLOBAL_BACK,
  1667. mmi_jmms_pre_use_details_dialIP,
  1668. GoBackHistory);
  1669. */
  1670. ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1671. SetLeftSoftkeyFunction(mmi_jmms_pre_use_details_dialIP, KEY_EVENT_UP);
  1672. //SetKeyHandler(mmi_jmms_use_details_add_to_contact, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1673. SetKeyHandler(mmi_jmms_pre_use_details_dialIP, KEY_ENTER, KEY_EVENT_DOWN);
  1674. }
  1675. void mmi_jmms_highlight_options_use_details_sendsms(void)
  1676. {
  1677. /*
  1678.     mmi_msg_highlight_generic(
  1679. STR_GLOBAL_OK,
  1680. IMG_GLOBAL_OK,
  1681. STR_GLOBAL_BACK,
  1682. IMG_GLOBAL_BACK,
  1683. mmi_jmms_pre_use_details_sendsms,
  1684. GoBackHistory);
  1685. */
  1686. ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1687. SetLeftSoftkeyFunction(mmi_jmms_pre_use_details_sendsms, KEY_EVENT_UP);
  1688. //SetKeyHandler(mmi_jmms_use_details_add_to_contact, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1689. SetKeyHandler(mmi_jmms_pre_use_details_sendsms, KEY_ENTER, KEY_EVENT_DOWN);
  1690. }
  1691. void mmi_jmms_highlight_options_use_details_sendmms(void)
  1692. {
  1693. /*
  1694.     mmi_msg_highlight_generic(
  1695. STR_GLOBAL_OK,
  1696. IMG_GLOBAL_OK,
  1697. STR_GLOBAL_BACK,
  1698. IMG_GLOBAL_BACK,
  1699. mmi_jmms_pre_use_details_sendmms,
  1700. GoBackHistory);
  1701. */
  1702. ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
  1703. SetLeftSoftkeyFunction(mmi_jmms_pre_use_details_sendmms, KEY_EVENT_UP);
  1704. //SetKeyHandler(mmi_jmms_use_details_add_to_contact, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
  1705. SetKeyHandler(mmi_jmms_pre_use_details_sendmms, KEY_ENTER, KEY_EVENT_DOWN);
  1706. }
  1707. #endif
  1708. //KP Jerry add on 2007-4-12 end
  1709. #endif /* (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT)) */ 
  1710. #endif /* _MMI_JMMSUSEDETAILSSECMMI_C */