JMMSWriteMMSUI.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:183k
源码类别:
MTK
开发平台:
C/C++
- /*****************************************************************************
- * Copyright Statement:
- * --------------------
- * This software is protected by Copyright and the information contained
- * herein is confidential. The software may not be copied and the information
- * contained herein may not be used or disclosed except with the written
- * permission of MediaTek Inc. (C) 2002
- *
- *****************************************************************************/
- /*****************************************************************************
- *
- * Filename:
- * ---------
- * jmms_write_mms_ui.C
- *
- * Project:
- * --------
- * MAUI
- *
- * Description:
- * ------------
- * This file contains the write mms ui and addresses addition,edit,deletion logics
- *
- * Author:
- * -------
- * -------
- *
- *============================================================================
- * HISTORY
- * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *------------------------------------------------------------------------------
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- * removed!
- * removed!
- * removed!
- *
- *------------------------------------------------------------------------------
- * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
- *============================================================================
- ****************************************************************************/
- /*****************************************************************************
- * Include
- *****************************************************************************/
- #include "MMI_features.h"
- #if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))
- #include "PixtelDataTypes.h"
- #include "Unicodexdcl.h"
- #include "HistoryGprot.h"
- #include "GlobalDefs.h"
- #include "SettingProfile.h"
- #include "DebugInitDef.h"
- #include "CommonScreens.h"
- #include "EventsGprot.h"
- #include "wgui_inputs.h"
- #include "wgui_categories.h"
- #include "wgui_categories_inputs.h"
- #include "MainMenuDef.h"
- #include "JMMSConfig.h"
- #include "JMMSMessageSettings.h"
- #include "JMMSCoreAPI.h"
- #include "JMMSDrafts.h"
- #include "JMMSExdcl.h"
- #include "JMMSCompose.h"
- #include "JMMSGprot.h"
- #include "JMMSInbox.h"
- #include "JMMSJSRHandler.h"
- #include "JMMSMainMMS.h"
- #include "JMMSMessageSettingsUtils.h"
- #include "JMMSOutbox.h"
- #include "JMMSProtocols.h"
- #include "JMMSPushHandling.h"
- #include "JMMSResEnum.h"
- #include "JMMSSent.h"
- #include "JMMSStoreHandling.h"
- #include "JMMSStructs.h"
- #include "JMMSTemplates.h"
- #include "JMMSUseDetails.h"
- #include "JMMSView.h"
- #include "JMMSWriteMMS.h"
- #include "ddlbase.h"
- #include "jcerror.h"
- #include "jcevent.h"
- #include "jcutils.h"
- #include "jdi_MMSErr.h"
- #include "MessagingDataTypes.h"
- #include "jdd_memapi.h"
- #include "MessagesResourceData.h"
- #include "PhoneBookDef.h"
- #include "PhoneBookGprot.h"
- #include "miscutils.h"
- #include "TimerEvents.h"
- #include "MMI_features_camera.h"
- #include "CameraResDefs.h"
- #ifdef __MMI_UNIFIED_MESSAGE__
- #include "JMMSUMHandling.h"
- #include "UnifiedMessageDef.h"
- #include "UnifiedMessageProt.h"
- #include "FileManagerDef.h"
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- #include "wapadp.h" // compiler warning removal
- /*****************************************************************************
- * Define
- *****************************************************************************/
- /*****************************************************************************
- * Typedef
- *****************************************************************************/
- /*****************************************************************************
- * Local Variable
- *****************************************************************************/
- /*****************************************************************************
- * Local Function
- *****************************************************************************/
- static pBOOL mmi_jmms_get_item_data(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask);
- /*****************************************************************************
- * Global Variable
- *****************************************************************************/
- static U16 g_address_option_index;
- static U16 g_address_list_right_soft_key = STR_GLOBAL_BACK;
- static U8 g_hilite_address_item;
- /*****************************************************************************
- * Global Function
- *****************************************************************************/
- extern void set_leading_zero(U8 u8type);
- extern void EntryPhbFromMMSNumber(void);
- extern void EntryPhbFromMMSEmail(void);
- extern JC_RETCODE IsMMSRestrictedMode(MESSAGING_HANDLER *pMessagingHandle, EContentClass eContentClass); // COMPILER WARNING REMOVAL
- extern MMI_BOOL is_add_media_as_drm;
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_write_message
- * DESCRIPTION
- * This function is the highlight handler of write message
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_write_message(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_entry_write_message, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_entry_write_message, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_entry_write_message, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_write_message_init
- * DESCRIPTION
- * This function init the hilight handlers of write mms menu items.
- * This is called at boot up time
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_write_message_init(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* options Highlight handlers */
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_ADD_NUMBER, mmi_jmms_highlight_write_mms_add_number);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_ADD_EMAIL, mmi_jmms_highlight_write_mms_add_email);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_EDIT, mmi_jmms_highlight_write_mms_edit);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DELETE, mmi_jmms_highlight_write_mms_delete);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DELETE_ALL, mmi_jmms_highlight_write_mms_delete_all);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SEND_ONLY, mmi_jmms_highlight_write_mms_done_send_only);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SAVE_AND_SEND, mmi_jmms_highlight_write_mms_done_save_and_send);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SAVE_TO_DRAFTS, mmi_jmms_highlight_write_mms_done_save_to_drafts);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SEND_OPTIONS, mmi_jmms_highlight_write_mms_done_send_options);
- SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_EXIT, mmi_jmms_highlight_write_mms_done_exit);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_write_message
- * DESCRIPTION
- * This function is pre entry function for writing a new MMS
- * new MMS
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_write_message(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(g_jmms_context->init_done == JMMS_READY_WITHOUT_STORE)
- {
- DisplayPopup((U8*) GetString(STR_ID_JMMS_MEMORY_FULL), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "JMMS: Store is not ready"));
- return;
- }
- g_jmms_context->g_use_local_send_setings = 0;
- g_jmms_context->store_context->current_folder_name = E_JMMS_WRITE_MMS;
- mmi_jmms_init_msg_context_struct(); /* this will different for different ways to come here */
- /* MAUI_00227929 Start */
- mmi_jmms_fill_mms_sending_settings(); // sanjeev added for newly added setting structure.
- /* MAUI_00227929 End */
- /* deepali */
- if (g_jmms_context->compose_context == NULL)
- {
- g_jmms_context->compose_context =
- (jmms_compose_context_struct*) jdd_MemAlloc(sizeof(jmms_compose_context_struct), 1);
- if (g_jmms_context->compose_context == NULL)
- {
- DisplayPopup((PU8) GetString(STR_ID_JMMS_OUT_OF_MEMORY), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- return;
- }
- }
- if (JMMS_COMP_OK == mmi_jmms_compose_new_mms())
- {
- mmi_jmms_entry_write_message_screen();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_init_msg_context_struct
- * DESCRIPTION
- * This function is for initlizing the global context structure for writing a
- * new MMS
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_init_msg_context_struct(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->msg_handle != NULL)
- {
- mmi_jmms_deinit_mms_context(g_jmms_context);
- }
- else
- {
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->message_to_fw == MMI_TRUE)
- {
- mmi_jmms_deinit_mms_context(g_jmms_context);
- }
- else
- {
- #endif
- mmi_jmms_free_addresses_list();
- mmi_jmms_free_mms_pdu_memory(g_jmms_context);
- #ifdef __MMI_UNIFIED_MESSAGE__
- }
- #endif
- }
- g_jmms_context->nCurr_scr_hilited_index = 0;
- g_jmms_context->nCurr_focused_med_type = 0;
- g_jmms_context->num_attachments = 0;
- g_jmms_context->nSent_retry_counter = 0;
- memset(g_jmms_context->subject_input_buffer, 0x00, (MAX_SUBJECT_LENGTH + 1) * ENCODING_LENGTH);
- g_jmms_context->g_write_mms_right_soft_key = STR_GLOBAL_BACK;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_write_message_screen_in_history
- * DESCRIPTION
- * Entry fn for Write MMS
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_write_message_screen_in_history(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history hist;
- historyNode *saved_history;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- memset(&hist, 0, sizeof(history));
- hist.scrnID = SCR_ID_JMMS_WRITE_MMS_HISTORY;
- hist.entryFuncPtr = mmi_jmms_entry_write_message_screen;
- AddHistory(hist);
- /* This is a workaround to make sure that if small screen is the current screen on MMI.
- Its state is not changed and SCR_ID_JMMS_WRITE_MMS_HISTORY is not saved as small screen */
- GetHistoryPointer(SCR_ID_JMMS_WRITE_MMS_HISTORY, &saved_history);
- if (saved_history->isSmallScreen == 1)
- {
- saved_history->isSmallScreen = 0;
- set_small_screen();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_write_message_screen
- * DESCRIPTION
- * Entry fn for Write MMS
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_write_message_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U8 *inputBuffer; /* added for inline edit history */
- U16 inputBufferSize; /* added for inline edit history */
- U16 image_list[WRITE_MMS_INLINE_TOTAL] = {0};
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- mmi_jmms_jdi_deinitview(g_jmms_context->msg_handle);
- #endif
- if (g_jmms_context->compose_context == NULL)
- {
- g_jmms_context->compose_context =
- (jmms_compose_context_struct*) jdd_MemAlloc(sizeof(jmms_compose_context_struct), 1);
- if (g_jmms_context->compose_context == NULL)
- {
- DisplayPopup((PU8) GetString(STR_ID_JMMS_OUT_OF_MEMORY), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- return;
- }
- }
- EntryNewScreen(SCR_ID_JMMS_WRITE_MMS, mmi_jmms_exit_write_message, NULL, NULL);
- set_leading_zero(FALSE);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_JMMS_WRITE_MMS);
- InitializeCategory57Screen();
- mmi_jmms_write_mms_fill_inline_struct();
- RegisterHighlightHandler(mmi_jmms_write_mms_highlight_hdlr);
- inputBuffer = GetCurrNInputBuffer(SCR_ID_JMMS_WRITE_MMS, &inputBufferSize); /* added for inline edit history */
- if (inputBuffer) /* added for inline edit history */
- {
- SetCategory57Data(wgui_inline_items, WRITE_MMS_INLINE_TOTAL, inputBuffer); /* sets the data */
- }
- image_list[E_WRITE_MMS_TO] = IMG_ID_WRITE_MMS_TO;
- image_list[E_WRITE_MMS_CC] = IMG_ID_WRITE_MMS_CC;
- image_list[E_WRITE_MMS_BCC] = IMG_ID_WRITE_MMS_BCC;
- image_list[E_WRITE_MMS_SUBJECT] = IMG_ID_WRITE_MMS_SUBJECT;
- image_list[E_WRITE_MMS_ATTACHMENT_CAPTION] = IMG_ID_WRITE_MMS_ATTACHMENT;
- image_list[E_WRITE_MMS_EDIT_CONTENT_CAPTION] = IMG_ID_WRITE_MMS_EDIT_CONTENT;
- ShowCategory57Screen(
- NULL,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- NULL,
- NULL,
- (g_jmms_context->g_write_mms_right_soft_key),
- NULL,
- WRITE_MMS_INLINE_TOTAL,
- image_list,
- wgui_inline_items,
- 0,
- guiBuffer);
- SetCategory57RightSoftkeyFunctions(mmi_jmms_done_write_mms, GoBackHistory);
- // SetKeyHandler(mmi_jmms_free_addresses_list_on_end, KEY_END, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_free_addresses_list_on_end
- * DESCRIPTION
- * This fn will free the addresses list and retrun back to idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- /*void mmi_jmms_free_addresses_list_on_end(void)
- {
- mmi_jmms_free_addresses_list();
- DisplayIdleScreen();
- }
- */
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_free_addresses_list
- * DESCRIPTION
- * This fn will free the addresses(To,Cc,Bcc) list
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_free_addresses_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_address_list *address_node;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->to_address_p != NULL)
- {
- address_node = g_jmms_context->to_address_p;
- while (address_node != NULL)
- {
- g_jmms_context->to_address_p = address_node->next;
- jdd_MemFree(address_node->address);
- jdd_MemFree(address_node);
- address_node = g_jmms_context->to_address_p;
- }
- }
- g_jmms_context->num_to_addresses = 0;
- g_jmms_context->to_address_p = NULL;
- address_node = g_jmms_context->cc_address_p;
- if (g_jmms_context->cc_address_p != NULL)
- {
- address_node = g_jmms_context->cc_address_p;
- while (address_node != NULL)
- {
- g_jmms_context->cc_address_p = address_node->next;
- jdd_MemFree(address_node->address);
- jdd_MemFree(address_node);
- address_node = g_jmms_context->cc_address_p;
- }
- }
- g_jmms_context->num_cc_addresses = 0;
- g_jmms_context->cc_address_p = NULL;
- address_node = g_jmms_context->bcc_address_p;
- if (g_jmms_context->bcc_address_p != NULL)
- {
- address_node = g_jmms_context->bcc_address_p;
- while (address_node != NULL)
- {
- g_jmms_context->bcc_address_p = address_node->next;
- jdd_MemFree(address_node->address);
- jdd_MemFree(address_node);
- address_node = g_jmms_context->bcc_address_p;
- }
- }
- g_jmms_context->num_bcc_addresses = 0;
- g_jmms_context->bcc_address_p = NULL;
- g_jmms_context->num_total_addresses = 0;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_write_mms_fill_inline_struct
- * DESCRIPTION
- * Fills the inline structure for write mms screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_write_mms_fill_inline_struct(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S8 *to_caption = NULL;
- S8 *cc_caption = NULL;
- S8 *bcc_caption = NULL;
- S8 *attachment_caption = g_jmms_context->g_jmms_files_caption_buff;
- S8 *slides_caption = g_jmms_context->g_jmms_slide_caption_buff;
- S32 len = 0, temp_len = 0;
- U8 no_attachments;
- /* PMT VIKAS START 20050325 */
- S8 str[20];
- S8 tempstr[20 * ENCODING_LENGTH] = {0x00};
- U8 page_count;
- U32 mms_size;
- U32 size_kb;
- U32 size_bytes;
- float32 size_mb =0, size_gb = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS END 20050325 */
- /* TO */
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_TO], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- if (g_jmms_context->num_to_addresses == 0)
- {
- to_caption = GetString(STR_ID_WRITE_MMS_TO_BLANK_CAPTION);
- }
- else if (g_jmms_context->num_to_addresses == 1)
- {
- to_caption = g_jmms_context->to_address_p->address;
- }
- else
- {
- to_caption = g_jmms_context->g_jmms_to_caption_buff;
- memset(to_caption, 0x00, (MAX_RECIPIENTS_CAPTION_LENGTH + 1) * ENCODING_LENGTH);
- sprintf(str, "%d ", g_jmms_context->num_to_addresses);
- AnsiiToUnicodeString((PS8) to_caption, (PS8) str);
- len = pfnUnicodeStrlen((PS8) to_caption);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_RECIPIENTS));
- if (len > MAX_RECIPIENTS_CAPTION_LENGTH)
- {
- len = MAX_RECIPIENTS_CAPTION_LENGTH - temp_len;
- pfnUnicodeStrncat((S8*) to_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS), len);
- }
- else
- {
- pfnUnicodeStrcat((S8*) to_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS));
- }
- }
- SetInlineItemDisplayOnly(&wgui_inline_items[E_WRITE_MMS_TO], (U8*) (to_caption));
- /* CC */
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_CC], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- if (g_jmms_context->num_cc_addresses == 0)
- {
- cc_caption = GetString(STR_ID_WRITE_MMS_CC_BLANK_CAPTION);
- }
- else if (g_jmms_context->num_cc_addresses == 1)
- {
- cc_caption = g_jmms_context->cc_address_p->address;
- }
- else
- {
- cc_caption = g_jmms_context->g_jmms_cc_caption_buff;
- memset(cc_caption, 0x00, (MAX_RECIPIENTS_CAPTION_LENGTH + 1) * ENCODING_LENGTH);
- sprintf(str, "%d ", g_jmms_context->num_cc_addresses);
- AnsiiToUnicodeString((PS8) cc_caption, (PS8) str);
- len = pfnUnicodeStrlen((PS8) cc_caption);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_RECIPIENTS));
- if (len > MAX_RECIPIENTS_CAPTION_LENGTH)
- {
- len = MAX_RECIPIENTS_CAPTION_LENGTH - temp_len;
- pfnUnicodeStrncat((S8*) cc_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS), len);
- }
- else
- {
- pfnUnicodeStrcat((S8*) cc_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS));
- }
- }
- SetInlineItemDisplayOnly(&wgui_inline_items[E_WRITE_MMS_CC], (U8*) cc_caption);
- /* BCC */
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_BCC], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- if (g_jmms_context->num_bcc_addresses == 0)
- {
- bcc_caption = GetString(STR_ID_WRITE_MMS_BCC_BLANK_CAPTION);
- }
- else if (g_jmms_context->num_bcc_addresses == 1)
- {
- bcc_caption = g_jmms_context->bcc_address_p->address;
- }
- else
- {
- bcc_caption = g_jmms_context->g_jmms_bcc_caption_buff;
- memset(bcc_caption, 0x00, (MAX_RECIPIENTS_CAPTION_LENGTH + 1) * ENCODING_LENGTH);
- sprintf(str, "%d ", g_jmms_context->num_bcc_addresses);
- AnsiiToUnicodeString((PS8) bcc_caption, (PS8) str);
- len = pfnUnicodeStrlen((PS8) bcc_caption);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_RECIPIENTS));
- if (len > MAX_RECIPIENTS_CAPTION_LENGTH)
- {
- len = MAX_RECIPIENTS_CAPTION_LENGTH - temp_len;
- pfnUnicodeStrncat((S8*) bcc_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS), len);
- }
- else
- {
- pfnUnicodeStrcat((S8*) bcc_caption, (const S8*)GetString(STR_ID_JMMS_RECIPIENTS));
- }
- }
- SetInlineItemDisplayOnly(&wgui_inline_items[E_WRITE_MMS_BCC], (U8*) bcc_caption);
- /* Subject */
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_SUBJECT], KEY_LSK, KEY_EVENT_UP);
- SetInlineItemFullScreenEdit(
- &wgui_inline_items[E_WRITE_MMS_SUBJECT],
- STR_ID_WRITE_MMS_SUBJECT,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- (PU8) g_jmms_context->subject_input_buffer,
- MAX_SUBJECT_LENGTH + 1,
- INPUT_TYPE_ALPHANUMERIC_SENTENCECASE);
- SetInlineFullScreenEditCustomFunction(
- &wgui_inline_items[E_WRITE_MMS_SUBJECT],
- mmi_jmms_write_mms_subject_custom_func);
- /* Attachments */
- SetInlineItemActivation(
- &wgui_inline_items[E_WRITE_MMS_ATTACHMENT_CAPTION],
- INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT,
- 0);
- SetInlineItemCaption(&wgui_inline_items[E_WRITE_MMS_ATTACHMENT_CAPTION], (U8*) GetString(STR_ID_JMMS_ATTACHMENT));
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_ATTACHMENT], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- memset(attachment_caption, 0x00, (MAX_FILES_CAPTION_LENGTH + 1) * ENCODING_LENGTH);
- mmi_jmms_jdi_get_media_count(g_jmms_context->msg_handle, 0, &(no_attachments), E_TRUE);
- g_jmms_context->num_attachments = no_attachments;
- sprintf(str, "%d ", g_jmms_context->num_attachments);
- AnsiiToUnicodeString((PS8) attachment_caption, (PS8) str);
- len = pfnUnicodeStrlen((PS8) attachment_caption);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_FILES));
- if (len > MAX_FILES_CAPTION_LENGTH)
- {
- len = MAX_FILES_CAPTION_LENGTH - temp_len;
- pfnUnicodeStrncat((S8*) attachment_caption, (const S8*)GetString(STR_ID_JMMS_FILES), len);
- }
- else
- {
- pfnUnicodeStrcat((S8*) attachment_caption, (const S8*)GetString(STR_ID_JMMS_FILES));
- }
- SetInlineItemDisplayOnly(&wgui_inline_items[E_WRITE_MMS_ATTACHMENT], (U8*) attachment_caption);
- /* Edit Content */
- SetInlineItemActivation(
- &wgui_inline_items[E_WRITE_MMS_EDIT_CONTENT_CAPTION],
- INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT,
- 0);
- SetInlineItemCaption(
- &wgui_inline_items[E_WRITE_MMS_EDIT_CONTENT_CAPTION],
- (U8*) GetString(STR_ID_WRITE_MMS_EDIT_CONTENT));
- SetInlineItemActivation(&wgui_inline_items[E_WRITE_MMS_EDIT_CONTENT], INLINE_ITEM_ACTIVATE_WITHOUT_KEY_EVENT, 0);
- mmi_jmms_jdi_get_total_pages(g_jmms_context->msg_handle, &page_count);
- memset(slides_caption, 0x00, (MAX_SLIDES_CAPTION_LENGTH + 1) * ENCODING_LENGTH);
- sprintf(str, "%d ", page_count);
- AnsiiToUnicodeString((PS8) slides_caption, (PS8) str);
- len = pfnUnicodeStrlen((PS8) slides_caption);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_SLIDES));
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat(
- (S8*) slides_caption,
- (const S8*)GetString(STR_ID_JMMS_SLIDES),
- MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (const S8*)GetString(STR_ID_JMMS_SLIDES));
- }
- //PMT VIKAS START 20050325
- //To add slide size
- mmi_jmms_jdi_get_size(g_jmms_context->msg_handle, 0, &mms_size);
- size_kb = mms_size / 1024;
- size_bytes = mms_size % 1024;
- size_mb = (float32)size_kb/1024 ;
- size_gb = size_mb/1024;
- if (size_gb > 1.0 && size_mb > 1024)
- {
- sprintf(str, " (%0.02f ", size_gb);
- AnsiiToUnicodeString((PS8) tempstr, (PS8) str);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) tempstr);
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat((S8*) slides_caption, (S8*) tempstr, MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) tempstr);
- }
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_GB));
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat(
- (S8*) slides_caption,
- (S8*) GetString(STR_ID_JMMS_GB),
- MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) GetString(STR_ID_JMMS_GB));
- }
- }
- else if (size_mb > 1.0 && size_kb > 1024)
- {
- sprintf(str, " (%0.02f ", size_mb);
- AnsiiToUnicodeString((PS8) tempstr, (PS8) str);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) tempstr);
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat((S8*) slides_caption, (S8*) tempstr, MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) tempstr);
- }
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_MB));
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat(
- (S8*) slides_caption,
- (S8*) GetString(STR_ID_JMMS_MB),
- MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) GetString(STR_ID_JMMS_MB));
- }
- }
- else if (size_kb >= 1)
- {
- size_kb++;
- sprintf(str, " (%d ", size_kb);
- AnsiiToUnicodeString((PS8) tempstr, (PS8) str);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) tempstr);
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat((S8*) slides_caption, (S8*) tempstr, MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) tempstr);
- }
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_KB));
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat(
- (S8*) slides_caption,
- (S8*) GetString(STR_ID_JMMS_KB),
- MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) GetString(STR_ID_JMMS_KB));
- }
- }
- else
- {
- sprintf(str, " (%d ", mms_size);
- AnsiiToUnicodeString((PS8) tempstr, (PS8) str);
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) tempstr);
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat((S8*) slides_caption, (S8*) tempstr, MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) tempstr);
- }
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) GetString(STR_ID_JMMS_KB));
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat(
- (S8*) slides_caption,
- (S8*) GetString(STR_ID_JMMS_WRITE_MMS_BYTES),
- MAX_SLIDES_CAPTION_LENGTH - temp_len);
- goto END;
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) GetString(STR_ID_JMMS_WRITE_MMS_BYTES));
- }
- }
- memset(tempstr, 0, 20 * ENCODING_LENGTH);
- AnsiiToUnicodeString((PS8) tempstr, ")");
- temp_len = len;
- len = len + pfnUnicodeStrlen((PS8) tempstr);
- if (len > MAX_SLIDES_CAPTION_LENGTH)
- {
- pfnUnicodeStrncat((S8*) slides_caption, (S8*) tempstr, MAX_SLIDES_CAPTION_LENGTH - temp_len);
- }
- else
- {
- pfnUnicodeStrcat((S8*) slides_caption, (S8*) tempstr);
- }
- /* PMT VIKAS END 20050325 */
- END:
- SetInlineItemDisplayOnly(&wgui_inline_items[E_WRITE_MMS_EDIT_CONTENT], (U8*) slides_caption);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_write_mms_subject_custom_func
- * DESCRIPTION
- * Custom fn for subject editor
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_write_mms_subject_custom_func(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- ChangeLeftSoftkey(STR_GLOBAL_OPTIONS, IMG_GLOBAL_OPTIONS);
- SetLeftSoftkeyFunction(EntryScrForInputMethodAndDone, KEY_EVENT_UP);
- SetInputMethodAndDoneCaptionIcon(GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID));
- // SetKeyHandler(mmi_jmms_free_addresses_list_on_end, KEY_END, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_write_mms_highlight_hdlr
- * DESCRIPTION
- * Highlight handler of write mms screen items
- * PARAMETERS
- * index [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_write_mms_highlight_hdlr(S32 index)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- is_add_media_as_drm = MMI_FALSE;
- if (index == E_WRITE_MMS_ATTACHMENT)
- {
- if (mmi_jmms_is_message_to_fwd() == MMI_TRUE)
- {
- ChangeLeftSoftkey(NULL, NULL);
- }
- else
- {
- ChangeLeftSoftkey(STR_GLOBAL_OPTIONS, IMG_GLOBAL_OPTIONS);
- SetLeftSoftkeyFunction(mmi_jmms_entry_attachment_options, KEY_EVENT_UP);
- }
- ChangeTitleString((U8*) GetString(STR_ID_JMMS_ATTACHMENT));
- draw_title();
- if (g_jmms_context->g_write_mms_right_soft_key == STR_GLOBAL_DONE)
- {
- SetRightSoftkeyFunction(mmi_jmms_done_write_mms, KEY_EVENT_UP);
- ChangeRightSoftkey(STR_GLOBAL_DONE, NULL);
- }
- }
- else
- {
- if (mmi_jmms_is_message_to_fwd() == MMI_TRUE && index == E_WRITE_MMS_EDIT_CONTENT)
- {
- ChangeLeftSoftkey(NULL, NULL);
- }
- else
- ChangeLeftSoftkey(STR_GLOBAL_EDIT, NULL);
- if (index == E_WRITE_MMS_TO)
- {
- g_jmms_context->address_list_flag = E_TO_ADDRESSES;
- SetLeftSoftkeyFunction(mmi_jmms_entry_address_option, KEY_EVENT_UP);
- ChangeTitleString((U8*) GetString(STR_ID_WRITE_MMS_TO));
- draw_title();
- }
- if (index == E_WRITE_MMS_CC)
- {
- g_jmms_context->address_list_flag = E_CC_ADDRESSES;
- SetLeftSoftkeyFunction(mmi_jmms_entry_address_option, KEY_EVENT_UP);
- ChangeTitleString((U8*) GetString(STR_ID_WRITE_MMS_CC));
- draw_title();
- }
- if (index == E_WRITE_MMS_BCC)
- {
- g_jmms_context->address_list_flag = E_BCC_ADDRESSES;
- SetLeftSoftkeyFunction(mmi_jmms_entry_address_option, KEY_EVENT_UP);
- ChangeTitleString((U8*) GetString(STR_ID_WRITE_MMS_BCC));
- draw_title();
- }
- if (index == E_WRITE_MMS_EDIT_CONTENT)
- {
- if (mmi_jmms_is_message_to_fwd() != MMI_TRUE)
- {
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_edit_content_screen, KEY_EVENT_UP);
- }
- else
- {
- ChangeLeftSoftkey(NULL, NULL);
- }
- ChangeTitleString((U8*) GetString(STR_ID_WRITE_MMS_EDIT_CONTENT));
- draw_title();
- }
- if (index == E_WRITE_MMS_SUBJECT)
- {
- ChangeTitleString((U8*) GetString(STR_ID_WRITE_MMS_SUBJECT));
- draw_title();
- if (g_jmms_context->g_write_mms_right_soft_key == STR_GLOBAL_DONE)
- {
- SetRightSoftkeyFunction(mmi_jmms_done_write_mms, KEY_EVENT_UP);
- ChangeRightSoftkey(STR_GLOBAL_DONE, NULL);
- }
- }
- if (index == E_WRITE_MMS_CC || index == E_WRITE_MMS_TO || index == E_WRITE_MMS_BCC ||
- index == E_WRITE_MMS_EDIT_CONTENT)
- {
- if (g_jmms_context->g_write_mms_right_soft_key == STR_GLOBAL_DONE)
- {
- SetRightSoftkeyFunction(mmi_jmms_done_write_mms, KEY_EVENT_UP);
- ChangeRightSoftkey(STR_GLOBAL_DONE, NULL);
- }
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_exit_write_message
- * DESCRIPTION
- * Exit fn of write mms
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_exit_write_message(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- history history_buff;
- U16 inputBufferSize; /* added for inline edit history */
- S16 nhistory = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- set_leading_zero(TRUE);
- CloseCategory57Screen();
- history_buff.scrnID = SCR_ID_JMMS_WRITE_MMS;
- history_buff.entryFuncPtr = mmi_jmms_entry_write_message_screen;
- pfnUnicodeStrcpy((S8*) history_buff.inputBuffer, (S8*) & nhistory);
- GetCategory57History(history_buff.guiBuffer);
- inputBufferSize = (U16) GetCategory57DataSize(); /* added for inline edit history */
- GetCategory57Data((U8*) history_buff.inputBuffer); /* added for inline edit history */
- AddNHistory(history_buff, inputBufferSize);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_address_option
- * DESCRIPTION
- * pre entry fn for addresses options
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_address_option(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->address_list_flag == E_TO_ADDRESSES)
- {
- if (g_jmms_context->num_to_addresses == 0)
- {
- mmi_jmms_entry_addresses_option_screen();
- }
- else
- {
- g_hilite_address_item = 0;
- g_address_list_right_soft_key = STR_GLOBAL_BACK;
- mmi_jmms_entry_addresses_list_screen();
- }
- }
- else if (g_jmms_context->address_list_flag == E_CC_ADDRESSES)
- {
- if (g_jmms_context->num_cc_addresses == 0)
- {
- mmi_jmms_entry_addresses_option_screen();
- }
- else
- {
- g_hilite_address_item = 0;
- g_address_list_right_soft_key = STR_GLOBAL_BACK;
- mmi_jmms_entry_addresses_list_screen();
- }
- }
- else if (g_jmms_context->address_list_flag == E_BCC_ADDRESSES)
- {
- if (g_jmms_context->num_bcc_addresses == 0)
- {
- mmi_jmms_entry_addresses_option_screen();
- }
- else
- {
- g_hilite_address_item = 0;
- g_address_list_right_soft_key = STR_GLOBAL_BACK;
- mmi_jmms_entry_addresses_list_screen();
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_addresses_option_screen
- * DESCRIPTION
- * Entry fn for addresses option screeen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_addresses_option_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 guiBuffer; /* Buffer holding history data */
- U16 nStrItemList[MAX_SUB_MENUS];
- U16 nNumofItem;
- U8 temp_num_items;
- U16 titleid;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->address_list_flag == E_TO_ADDRESSES)
- {
- temp_num_items = g_jmms_context->num_to_addresses;
- titleid = STR_ID_WRITE_MMS_TO;
- }
- else if (g_jmms_context->address_list_flag == E_CC_ADDRESSES)
- {
- temp_num_items = g_jmms_context->num_cc_addresses;
- titleid = STR_ID_WRITE_MMS_CC;
- }
- else if (g_jmms_context->address_list_flag == E_BCC_ADDRESSES)
- {
- temp_num_items = g_jmms_context->num_bcc_addresses;
- titleid = STR_ID_WRITE_MMS_BCC;
- }
- else
- {
- return;
- }
- EntryNewScreen(SCR_ID_WRITE_MMS_ADDRESSES_OPTION, NULL, mmi_jmms_entry_addresses_option_screen, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_WRITE_MMS_ADDRESSES_OPTION);
- SetParentHandler(MENU_ID_JMMS_WRITE_MMS_ADDRESSES_OPTIONS);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- if (temp_num_items == 0)
- {
- mmi_frm_hide_menu_item(MENU_ID_JMMS_WRITE_MMS_EDIT);
- }
- else
- {
- mmi_frm_unhide_menu_item(MENU_ID_JMMS_WRITE_MMS_EDIT);
- }
- if (temp_num_items == 0)
- {
- mmi_frm_hide_menu_item(MENU_ID_JMMS_WRITE_MMS_DELETE);
- }
- else
- {
- mmi_frm_unhide_menu_item(MENU_ID_JMMS_WRITE_MMS_DELETE);
- }
- if (temp_num_items <= 1)
- {
- mmi_frm_hide_menu_item(MENU_ID_JMMS_WRITE_MMS_DELETE_ALL);
- }
- else
- {
- mmi_frm_unhide_menu_item(MENU_ID_JMMS_WRITE_MMS_DELETE_ALL);
- }
- nNumofItem = GetNumOfChild_Ext(MENU_ID_JMMS_WRITE_MMS_ADDRESSES_OPTIONS);
- GetSequenceStringIds_Ext(MENU_ID_JMMS_WRITE_MMS_ADDRESSES_OPTIONS, nStrItemList);
- ShowCategory52Screen(
- titleid,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- nNumofItem,
- nStrItemList,
- (U16*) gIndexIconsImageList,
- NULL,
- 0,
- 0,
- guiBuffer);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- // SetKeyHandler(mmi_jmms_free_addresses_list_on_end, KEY_END, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_highlight_write_mms_add_number
- * DESCRIPTION
- * highligh handler of Add Number menu item
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_highlight_write_mms_add_number(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_address_option_index = E_ADD_NUMBER;
- ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
- SetLeftSoftkeyFunction(mmi_jmms_entry_write_message_add_number, KEY_EVENT_UP);
- SetKeyHandler(mmi_jmms_entry_write_message_add_number, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetKeyHandler(mmi_jmms_entry_write_message_add_number, KEY_WAP, KEY_EVENT_DOWN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_write_message_add_number
- * DESCRIPTION
- * Pre Entry fn for add number option
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_write_message_add_number(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->num_total_addresses >= 20)
- {
- DisplayPopup((U8*) GetString(STR_ID_MAX_ADDRESS_LIMIT), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- }
- else
- {
- memset(g_jmms_context->g_jmms_add_number_buffer, 0x00, (MAX_POSSIBLE_NUMBER_LENGHT_SENT + 1) * ENCODING_LENGTH);
- mmi_jmms_entry_write_message_add_number_screen();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_write_message_add_number_screen
- * DESCRIPTION
- * Entry fn for add number editor screeen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_write_message_add_number_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer;
- U16 left_softkey;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_WRITE_MMS_ADD_NUMBER_EDITOR, NULL, mmi_jmms_entry_write_message_add_number_screen, NULL);
- SetParentHandler(MENU_ID_JMMS_WRITE_MMS_ADD_NUMBER);
- RegisterHighlightHandler(ExecuteCurrHiliteHandler);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_JMMS_WRITE_MMS_ADD_NUMBER_EDITOR);
- if (pfnUnicodeStrncmp
- ((S8*) (g_jmms_context->g_jmms_add_number_buffer), "