JMMSMainMMSUI.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:212k
源码类别:
MTK
开发平台:
C/C++
- //PMT VIKAS START 20060325
- ///MMS Size
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SIZE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_jmms_save_size_of_mms(&size, MMS_SIZE_RETRIVE);
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- size_kb++;
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_kb, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_bytes, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- /* PMT VIKAS END 20060325 */
- ShowCategory78Screen(
- /* MAUI_00018481 Start */
- STR_ID_JMMS_OPTIONS_PROPERTIES,
- /* MAUI_0001848 End */
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- NULL,
- NULL,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- NULL,
- (U8*) subMenuData,
- pfnUnicodeStrlen((S8*) subMenuData),
- gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_sent_msg_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_sent_msg_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_sent_msg_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*End :Added by dilip on 10th sept to show Template properties screen*/
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_sent_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_sent_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_jmms_free_new_mms_sent_header();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_sent_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_sent_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_jmms_free_new_mms_sent_header();
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_show_notification_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_show_notification_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer; /* Buffer holding history data */
- S8 temp[14];
- U8 dttemp[40];
- MYTIME time1, time;
- FLOAT timezone;
- S32 expiry_secs = 0, expiry_hrs = 0, expiry_mins = 0, expiry_days = 0;
- S32 size = 0, size_kb = 0, size_bytes = 0;
- #ifdef __MMI_UNIFIED_MESSAGE__
- U16 left_softkey_property = NULL;
- U16 left_softkey_icon_property = NULL;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- timezone = mmi_dt_get_tz();
- EntryNewScreen(SCR_ID_JMMS_NOTIFICATION_PROPERTIES, NULL, mmi_jmms_show_notification_properties, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_NOTIFICATION_PROPERTIES);
- pfnUnicodeStrcpy((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_FROM));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->pFrom == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->pFrom);
- }
- /* /Subject */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SUBJECT));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->pSubject == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat(
- (S8*) subMenuData,
- (S8*) ((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->pSubject);
- }
- /* Expiry Time */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_EXPIRE_TIME));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- expiry_secs = (S32) (((MESSAGE_NOTIFICATION*) (g_jmms_context->notification_p))->uiExpiryTime);
- expiry_hrs = (S32) (expiry_secs / 3600);
- if (expiry_hrs > 24) /* /> 1 day */
- {
- expiry_days = expiry_hrs / 24;
- expiry_hrs = expiry_hrs % 24;
- /* /expiry days */
- memset(temp, 0x00, 14);
- gui_itoa((S32) expiry_days, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DAYS));
- if (expiry_hrs > 0)
- {
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* /expiry hrs */
- memset(temp, 0x00, 14);
- gui_itoa((S32) expiry_hrs, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_HRS));
- }
- }
- else
- {
- /* /expiry hrs */
- memset(temp, 0x00, 14);
- gui_itoa((S32) expiry_hrs, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_HRS));
- /* /expiry mins */
- expiry_mins = (S32) ((expiry_secs % 3600) / 60);
- if (expiry_mins > 0)
- {
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 14);
- gui_itoa((S32) expiry_mins, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_MINS));
- }
- }
- /* /Size of MMS */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SIZE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- size = (S32) (((MESSAGE_NOTIFICATION*) (g_jmms_context->notification_p))->uiMessageSize);
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- size_kb++;
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_kb, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_bytes, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- /* /Priority */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_PRIORITY));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* MAUI_00017989 Start */
- /* MAUI_00018625 Start */
- switch (((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->eMsgPriority)
- /* MAUI_00018625 End */
- /* MAUI_00017989 End */
- {
- case E_MSG_PRIORITY_LOW:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_LOW));
- break;
- case E_MSG_PRIORITY_NORMAL:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_NORMAL));
- break;
- case E_MSG_PRIORITY_HIGH:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_HIGH));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* //message class */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_MSG_CLASS));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- switch (((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->eMsgClass)
- {
- case E_MSG_PERSONAL_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_PERSONEL_MSG_CLASS));
- break;
- case E_MSG_ADVERTISEMENT_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_ADVERTISMENT));
- break;
- case E_MSG_INFORMATION_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_INFORMATIONAL_MSG_CLASS));
- break;
- case E_MSG_AUTO_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_AUTO_MSG_CLASS));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* /Recieve Date */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DATE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_dt_utc_sec_2_mytime(
- (U32) ((MESSAGE_NOTIFICATION*) g_jmms_context->notification_p)->uiReceivedTime,
- &time1,
- MMI_TRUE);
- mmi_dt_utc_to_rtc(timezone, time1, time);
- /* PMT RAJ KUMAR GUPTA on Sep 05, 2006 */
- /* Date */
- memset(dttemp, 0x00, 40);
- date_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* Time */
- memset(dttemp, 0x00, 40);
- time_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- /* END of changes - RAJ KUMAR GUPTA */
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id == SCR_ID_JMMS_INBOX_OPTIONS)
- {
- left_softkey_property = NULL;
- left_softkey_icon_property = NULL;
- }
- else
- {
- left_softkey_property = STR_GLOBAL_OPTIONS;
- left_softkey_icon_property = IMG_GLOBAL_OPTIONS;
- }
- #endif
- /* MAUI_00018481 Start */
- ShowCategory78Screen(STR_ID_JMMS_OPTIONS_PROPERTIES, GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- /* MAUI_00018481 End */
- #ifdef __MMI_UNIFIED_MESSAGE__
- left_softkey_property, left_softkey_icon_property,
- #else
- NULL, NULL,
- #endif
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK, NULL, (U8*) subMenuData, pfnUnicodeStrlen((S8*) subMenuData), gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_noification_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_noification_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id != SCR_ID_JMMS_INBOX_OPTIONS)
- {
- SetKeyHandler(mmi_jmms_pre_entry_inbox_options_scren, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_inbox_options_scren, KEY_EVENT_UP);
- }
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_notification_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_noification_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_noification_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_notification_header();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_notification_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_notification_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_notification_header();
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_java_mms_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_java_mms_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer; /* Buffer holding history data */
- S8 temp[14];
- U8 dttemp[40];
- MYTIME time1, time;
- FLOAT timezone;
- /* PMT VIKAS START 20060325 */
- S32 size = 0, size_kb = 0, size_bytes = 0;
- /* PMT VIKAS END 20060325 */
- S8 *app_id = NULL, *reply_to_app_id = NULL;
- MM1_HDR_PARAM *pContentTypeParams = NULL;
- U32 len = 0;
- #ifdef __MMI_UNIFIED_MESSAGE__
- U16 left_softkey_property = NULL;
- U16 left_softkey_icon_property = NULL;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- timezone = mmi_dt_get_tz();
- EntryNewScreen(SCR_ID_JMMS_RETRIEVED_MMS_PROPERTIES, NULL, mmi_jmms_entry_java_mms_properties, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_RETRIEVED_MMS_PROPERTIES);
- /* From */
- pfnUnicodeStrcpy((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_FROM));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pFrom == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pFrom);
- }
- /* /TO */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_TO));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pTo == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pTo);
- }
- /* /CC */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_CC));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pCc == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pCc);
- }
- /* /Subject */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SUBJECT));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pSubject == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->pSubject);
- }
- /* /Priority */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_PRIORITY));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* MAUI_00017989 Start */
- /* MAUI_00018625 Start */
- switch (((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->eMsgPriority )
- /* MAUI_00018625 End */
- /* MAUI_00017989 End */
- {
- case E_MSG_PRIORITY_LOW:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_LOW));
- break;
- case E_MSG_PRIORITY_NORMAL:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_NORMAL));
- break;
- case E_MSG_PRIORITY_HIGH:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_HIGH));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- jdi_MsgGetContentTypeParams(g_jmms_context->msg_handle, &pContentTypeParams);
- while (pContentTypeParams != NULL)
- {
- if (mmi_jmms_jsr_get_application_string_from_content_type(pContentTypeParams->pszName, JSR_APPLICATION_ID) != NULL)
- {
- len = strlen((S8*) (pContentTypeParams->pszValue));
- app_id = (S8*) jdd_MemAlloc(sizeof(S8), len * ENCODING_LENGTH + ENCODING_LENGTH);
- if (app_id == NULL)
- {
- return;
- }
- AnsiiToUnicodeString((PS8) app_id, (PS8) (pContentTypeParams->pszValue));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_APPLICATION_ID));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) app_id);
- }
- else if (mmi_jmms_jsr_get_application_string_from_content_type(pContentTypeParams->pszName, JSR_REPLY_TO_APPLICATION_ID) != NULL)
- {
- len = strlen((S8*) (pContentTypeParams->pszValue));
- reply_to_app_id = (S8*) jdd_MemAlloc(sizeof(S8), len * ENCODING_LENGTH + ENCODING_LENGTH);
- if (reply_to_app_id == NULL)
- {
- return;
- }
- AnsiiToUnicodeString((PS8) reply_to_app_id, (PS8) (pContentTypeParams->pszValue));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_REPLY_TO_APPLICATION_ID));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) reply_to_app_id);
- }
- pContentTypeParams = pContentTypeParams->pNext;
- }
- if (app_id != NULL)
- {
- jdd_MemFree(app_id);
- }
- if (reply_to_app_id != NULL)
- {
- jdd_MemFree(reply_to_app_id);
- }
- /* /Recieved Date */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DATE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_dt_utc_sec_2_mytime((U32) ((MESSAGE_RETRIEVAL*) g_jmms_context->MsgHeader_type_p)->uiDate, &time1, MMI_TRUE);
- mmi_dt_utc_to_rtc(timezone, time1, time);
- /* PMT RAJ KUMAR GUPTA on Sep 05, 2006 */
- /* Date */
- memset(dttemp, 0x00, 40);
- date_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* Time */
- memset(dttemp, 0x00, 40);
- time_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- /* END of Changes - RAJ KUMAR GUPTA */
- //PMT VIKAS START 20060325
- ///MMS Size
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SIZE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_jmms_save_size_of_mms(&size, MMS_SIZE_RETRIVE);
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- size_kb++;
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_kb, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_bytes, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- /* PMT VIKAS END 20060325 */
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id == SCR_ID_JMMS_INBOX_OPTIONS)
- {
- left_softkey_property = NULL;
- left_softkey_icon_property = NULL;
- }
- else
- {
- left_softkey_property = STR_GLOBAL_OPTIONS;
- left_softkey_icon_property = IMG_GLOBAL_OPTIONS;
- }
- #endif
- /* MAUI_00018481 Start */
- ShowCategory78Screen(STR_ID_JMMS_OPTIONS_PROPERTIES, GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- /* MAUI_00018481 End */
- #ifdef __MMI_UNIFIED_MESSAGE__
- left_softkey_property, left_softkey_icon_property,
- #else
- NULL, NULL,
- #endif
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK, NULL, (U8*) subMenuData, pfnUnicodeStrlen((S8*) subMenuData), gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_java_msg_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_java_msg_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id != SCR_ID_JMMS_INBOX_OPTIONS)
- {
- SetKeyHandler(mmi_jmms_pre_entry_inbox_options_scren, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_inbox_options_scren, KEY_EVENT_UP);
- }
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_java_msg_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_java_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_java_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_deinit_mms_context(g_jmms_context);
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_java_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_java_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_deinit_mms_context(g_jmms_context);
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_show_retrieved_mms_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_show_retrieved_mms_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer = NULL; /* Buffer holding history data */
- S8 temp[14];
- U8 dttemp[40];
- MYTIME time1, time;
- FLOAT timezone;
- /* PMT VIKAS START 20060325 */
- S32 size = 0, size_kb = 0, size_bytes = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* PMT VIKAS END 20060325 */
- timezone = mmi_dt_get_tz();
- EntryNewScreen(SCR_ID_JMMS_RETRIEVED_MMS_PROPERTIES, NULL, mmi_jmms_show_retrieved_mms_properties, NULL);
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_RETRIEVED_MMS_PROPERTIES);
- /* From */
- pfnUnicodeStrcpy((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_FROM));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pFrom == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pFrom);
- }
- /* /TO */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_TO));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pTo == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pTo);
- }
- /* /CC */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_CC));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pCc == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pCc);
- }
- /* /Subject */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SUBJECT));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pSubject == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) ((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->pSubject);
- }
- /* /Priority */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_PRIORITY));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* MAUI_00017989 Start */
- /* MAUI_00018625 Start */
- switch (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->eMsgPriority )
- /* MAUI_00018625 End */
- /* MAUI_00017989 End */
- {
- case E_MSG_PRIORITY_LOW:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_LOW));
- break;
- case E_MSG_PRIORITY_NORMAL:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_NORMAL));
- break;
- case E_MSG_PRIORITY_HIGH:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_HIGH));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* //message class */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_MSG_CLASS));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- switch (((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->eMsgClass)
- {
- case E_MSG_PERSONAL_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_PERSONEL_MSG_CLASS));
- break;
- case E_MSG_ADVERTISEMENT_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_SETTINGS_ADVERTISMENT));
- break;
- case E_MSG_INFORMATION_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_INFORMATIONAL_MSG_CLASS));
- break;
- case E_MSG_AUTO_CLASS:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_AUTO_MSG_CLASS));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* /Recieved Date */
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DATE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_dt_utc_sec_2_mytime((U32) ((MESSAGE_RETRIEVAL*) g_jmms_context->retrieval_p)->uiDate, &time1, MMI_TRUE);
- mmi_dt_utc_to_rtc(timezone, time1, time);
- /* PMT RAJ KUMAR GUPTA on Sep 05, 2006 */
- /* Date */
- memset(dttemp, 0x00, 40);
- date_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* Time */
- memset(dttemp, 0x00, 40);
- time_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- /* END of Changes - RAJ KUMAR GUPTA */
- //PMT VIKAS START 20060325
- ///MMS Size
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_SIZE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_jmms_save_size_of_mms(&size, MMS_SIZE_RETRIVE);
- size_kb = size / 1024;
- size_bytes = size % 1024;
- if (size_kb >= 1)
- {
- size_kb++;
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_kb, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_KB));
- }
- else
- {
- memset(temp, 0x00, 14);
- gui_itoa((S32) size_bytes, (UI_string_type) temp, 10);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) " ");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_BYTES));
- }
- /* PMT VIKAS END 20060325 */
- ShowCategory78Screen(
- /* MAUI_00018481 Start */
- STR_ID_JMMS_OPTIONS_PROPERTIES,
- /* MAUI_00018481 End */
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- NULL,
- NULL,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- NULL,
- (U8*) subMenuData,
- pfnUnicodeStrlen((S8*) subMenuData),
- gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_recive_msg_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_recive_msg_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_recive_msg_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_recive_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_recive_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_jmms_free_recieved_msg_header();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_recive_msg_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_recive_msg_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_jmms_free_recieved_msg_header();
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_view_delivery_report
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_view_delivery_report(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer; /* Buffer holding history data */
- S8 temp[14];
- U8 dttemp[40];
- MYTIME time1, time;
- FLOAT timezone;
- #ifdef __MMI_UNIFIED_MESSAGE__
- U16 left_softkey_property = NULL;
- U16 left_softkey_icon_property = NULL;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- timezone = mmi_dt_get_tz();
- EntryNewScreen(SCR_ID_JMMS_NEW_MMS, NULL, mmi_jmms_entry_view_delivery_report, NULL);
- #ifdef __MMI_UNIFIED_MESSAGE__
- DeleteScreenIfPresent(SCR_ID_JMMS_NEW_MMS);
- #endif
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_NEW_MMS);
- /* STATUS */
- pfnUnicodeStrcpy((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_STATUS));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- switch (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->eDeliveryStatus)
- {
- case E_MSG_EXPIRED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_EXPIRED));
- break;
- case E_MSG_RETRIEVED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_RETRIEVED));
- break;
- case E_MSG_REJECTED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_REJECTED));
- break;
- case E_MSG_DEFERRED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_DEFFERED));
- break;
- case E_MSG_UNRECOGNIZED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_UNRECOGNISED));
- break;
- case E_MSG_INDETERMINATE:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_INDETERMINATE));
- break;
- case E_MSG_FORWARDED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_FORWARDED));
- break;
- case E_MSG_UNREACHABLE:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DELIVERY_STATUS_UNREACHABLE));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* TO */
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_TO));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->pTo == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->pTo));
- }
- /* /message id */
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_MESSAGE_ID));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->pMessageID == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- S32 len = 0;
- S8 *msg_id = NULL;
- len = strlen((S8*) ((DELIVERY_REPORT*) g_jmms_context->delivery_p)->pMessageID);
- msg_id = (S8*) jdd_MemAlloc(sizeof(S8), len * ENCODING_LENGTH + ENCODING_LENGTH);
- if (msg_id == NULL)
- {
- return;
- }
- /* len=pfnUnicodeStrlen((S8*)subMenuData); */
- AnsiiToUnicodeString((PS8) (msg_id), (PS8) (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->pMessageID));
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) (msg_id));
- if (msg_id != NULL)
- {
- jdd_MemFree(msg_id);
- msg_id = NULL;
- }
- }
- /* /Date */
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DATE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_dt_utc_sec_2_mytime((U32) (((DELIVERY_REPORT*) g_jmms_context->delivery_p)->uiDate), &time1, MMI_TRUE);
- mmi_dt_utc_to_rtc(timezone, time1, time);
- /* PMT RAJ KUMAR GUPTA on Sep 05, 2006 */
- /* Date */
- memset(dttemp, 0x00, 40);
- date_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* Time */
- memset(dttemp, 0x00, 40);
- time_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- /* END of Changes - RAJ KUMAR GUPTA */
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id == SCR_ID_JMMS_INBOX_OPTIONS)
- {
- left_softkey_property = NULL;
- left_softkey_icon_property = NULL;
- }
- else
- {
- left_softkey_property = STR_GLOBAL_OPTIONS;
- left_softkey_icon_property = IMG_GLOBAL_OPTIONS;
- }
- #endif
- ShowCategory78Screen(STR_ID_JMMS_DELIVERY_REPORT, GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- #ifdef __MMI_UNIFIED_MESSAGE__
- left_softkey_property, left_softkey_icon_property,
- #else
- NULL, NULL,
- #endif
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK, NULL, (U8*) subMenuData, pfnUnicodeStrlen((S8*) subMenuData), gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_delivery_report_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_delivery_report_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id != SCR_ID_JMMS_INBOX_OPTIONS)
- {
- SetKeyHandler(mmi_jmms_pre_entry_inbox_options_scren, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_inbox_options_scren, KEY_EVENT_UP);
- }
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_delivery_report_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_delivery_report_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_delivery_report_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_delivery_report_header();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_delivery_report_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_delivery_report_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_delivery_report_header();
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_view_read_report
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_view_read_report(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- PU8 gui_buffer; /* Buffer holding history data */
- S8 temp[14];
- U8 dttemp[40];
- MYTIME time1, time;
- FLOAT timezone;
- #ifdef __MMI_UNIFIED_MESSAGE__
- U16 left_softkey_property = NULL;
- U16 left_softkey_icon_property = NULL;
- #endif
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- timezone = mmi_dt_get_tz();
- EntryNewScreen(SCR_ID_JMMS_NEW_MMS, NULL, mmi_jmms_entry_view_read_report, NULL);
- #ifdef __MMI_UNIFIED_MESSAGE__
- DeleteScreenIfPresent(SCR_ID_JMMS_NEW_MMS);
- #endif
- gui_buffer = GetCurrGuiBuffer(SCR_ID_JMMS_NEW_MMS);
- /* STATUS */
- pfnUnicodeStrcpy((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_STATUS));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- switch (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->eReadStatus)
- {
- case E_STATUS_READ:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_READ_REPORT_READ));
- break;
- case E_STATUS_DELETED:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_READ_REPORT_DELETED));
- break;
- default:
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_UNKNOWN));
- break;
- }
- /* FROM */
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_FROM));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pFrom == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pFrom));
- }
- /* TO */
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_TO));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pTo == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pTo));
- }
- /* message id */
- memset(temp, 0x00, 4);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_MESSAGE_ID));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- if (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pMessageID == NULL)
- {
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_GLOBAL_EMPTY_LIST));
- }
- else
- {
- S32 len = 0;
- S8 *msg_id = NULL;
- len = strlen((S8*) ((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pMessageID);
- msg_id = (S8*) jdd_MemAlloc(sizeof(S8), len * ENCODING_LENGTH + ENCODING_LENGTH);
- if (msg_id == NULL)
- {
- return;
- }
- /* len=pfnUnicodeStrlen((S8*)subMenuData); */
- AnsiiToUnicodeString(
- (PS8) (msg_id),
- (PS8) (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->pMessageID));
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) (msg_id));
- if (msg_id != NULL)
- {
- jdd_MemFree(msg_id);
- msg_id = NULL;
- }
- }
- /* /Date */
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "nn");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) GetString(STR_ID_JMMS_DATE));
- memset(temp, 0x00, 14);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n----n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- mmi_dt_utc_sec_2_mytime(
- (U32) (((READ_REPORT_RESPONSE*) g_jmms_context->read_report_p)->uiReceivedTime),
- &time1,
- MMI_TRUE);
- mmi_dt_utc_to_rtc(timezone, time1, time);
- /* PMT RAJ KUMAR GUPTA on Sep 05, 2006 */
- /* Date */
- memset(dttemp, 0x00, 40);
- date_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- memset(temp, 0x00, 6);
- AnsiiToUnicodeString((PS8) temp, (PS8) "n");
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) temp);
- /* Time */
- memset(dttemp, 0x00, 40);
- time_string(&time, (UI_string_type)dttemp, DT_IDLE_SCREEN);
- pfnUnicodeStrcat((S8*) subMenuData, (S8*) dttemp);
- /* END of Changes - RAJ KUMAR GUPTA */
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id == SCR_ID_JMMS_INBOX_OPTIONS)
- {
- left_softkey_property = NULL;
- left_softkey_icon_property = NULL;
- }
- else
- {
- left_softkey_property = STR_GLOBAL_OPTIONS;
- left_softkey_icon_property = IMG_GLOBAL_OPTIONS;
- }
- #endif
- ShowCategory78Screen(STR_ID_SETTINGS_READ_REPORT, GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- #ifdef __MMI_UNIFIED_MESSAGE__
- left_softkey_property, left_softkey_icon_property,
- #else
- NULL, NULL,
- #endif
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK, NULL, (U8*) subMenuData, pfnUnicodeStrlen((S8*) subMenuData), gui_buffer);
- SetRightSoftkeyFunction(mm_jmms_back_from_read_report_properties, KEY_EVENT_UP);
- SetKeyHandler(mm_jmms_back_from_read_report_properties, KEY_LEFT_ARROW, KEY_EVENT_DOWN);
- #ifdef __MMI_UNIFIED_MESSAGE__
- if(g_jmms_context->last_scr_id != SCR_ID_JMMS_INBOX_OPTIONS)
- {
- SetKeyHandler(mmi_jmms_pre_entry_inbox_options_scren, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
- SetLeftSoftkeyFunction(mmi_jmms_pre_entry_inbox_options_scren, KEY_EVENT_UP);
- }
- #endif /* __MMI_UNIFIED_MESSAGE__ */
- if (isInCall() == FALSE)
- SetKeyHandler(mm_jmms_end_from_read_report_properties, KEY_END, KEY_EVENT_DOWN);
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_back_from_read_report_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_back_from_read_report_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_report_report_header();
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mm_jmms_end_from_read_report_properties
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mm_jmms_end_from_read_report_properties(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->last_scr_id = 0;
- #endif
- mmi_jmms_free_report_report_header();
- DisplayIdleScreen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_wap_not_ready
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_wap_not_ready(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_WAP_NOT_READY, mmi_jmms_exit_wap_not_ready, NULL, NULL);
- StartTimer(JMMS_WAP_NOT_READY_TIMER, 2000, mmi_jmms_wait_and_go_back);
- ShowCategory66Screen(
- STR_MMS_MENUENTRY,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- 0,
- 0,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (U8*) GetString(STR_ID_JMMS_PLEASE_WAIT),
- IMG_ID_JMMS_PLEASE_WAIT,
- NULL);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_exit_wap_not_ready
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_exit_wap_not_ready(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JMMS_WAP_NOT_READY_TIMER);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_wait_and_go_back
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_wait_and_go_back(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JMMS_WAP_NOT_READY_TIMER);
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_error_handler
- * DESCRIPTION
- *
- * PARAMETERS
- * error_code [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_error_handler(JC_RETCODE error_code)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_UNIFIED_MESSAGE__
- g_jmms_context->edit_error_code=error_code;
- #endif
- switch (error_code)
- {
- /* Compose Module Related Errors */
- case JC_ERR_MSG_INVALID_HANDLE:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_MESSAGE_HANDLE),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_INVALID_PAGE_INDEX:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_PAGE_INDEX),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_MORE_THAN_MAX_PAGE:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_TOO_MANY_SLIDES),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_INVALID_MEDIA_INDEX:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_MEDIA_ID),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_MEDIA_RESTRICTED:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_RESTRICTED_MODE_MEDIA),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_MAX_REACHED:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_MAX_MSG_REACHED),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_UNSUPPORTED:
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNSUPPORTED_FORMAT),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_MMS_UNSUPPORTED_TYPE:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_MEDIA_TYPE),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_INVALID_MEDIA_INFO:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_MEDIA_INFO),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_MMS_CONTENT_RESTRICTED:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_MMS_ERR_RESTRICTED_CONTENT_CLASS),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- /* SMIL-VIEW Module Related Errors */
- case JC_ERR_MSG_PRESENTATION_NOT_SET:
- case JC_ERR_PRESENTATION_NOT_SET:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_PRESENTATION_NOT_SET),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_SMIL_REGION_NOT_SET:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_SMIL_REGION_NOT_SET),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_SMIL_INVALID_ROOTLAYOUT:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_SMIL_INVALID_ROOTLAYOUT),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_VIEW_INVALID_RENDERING_RECT:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_RENDERING_RECT),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_VIEW_CORRUPTED_CONTENT:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_CORRUPTED_CONTENT),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- /* Store Module Related Errors */
- case JC_ERR_STORE_INVALID_HANDLE:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_STORE_INVALID_HANDLE),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_STORE_INVALID_FOLDER_NAME:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_FOLDER_NAME),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_STORE_FOLDER_ALREADY_EXIST:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_FOLDER_ALREADY_EXIST),
- IMG_GLOBAL_WARNING,
- 1,
- JMMS_POPUP_TIME,
- WARNING_TONE);
- break;
- case JC_ERR_STORE_ACTIVE_FOLDER_NOT_SET:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_ACTIVE_FOLDER_NOT_SET),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_STORE_FOLDER_NOT_FOUND:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_FOLDER_NOT_FOUND),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_STORE_INVALID_MSG_INDEX:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_MSG_INDEX),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_STORE_FILE_CORRUPTED:
- case JC_ERR_FILE_READ:
- case JC_ERR_NOT_SUPPORTED:
- DisplayPopup((PU8) GetString(STR_ID_JMMS_FILE_CORRUPTED), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- break;
- case JC_ERR_MEMORY_ALLOCATION:
- DisplayPopup((PU8) GetString(STR_ID_JMMS_OUT_OF_MEMORY), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- break;
- case JC_ERR_NULL_POINTER:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_INVALID_POINTER),
- IMG_GLOBAL_ERROR,
- 1,
- JMMS_POPUP_TIME,
- ERROR_TONE);
- break;
- case JC_ERR_MSG_DRM_FORWARD_RESTRICTED:
- DisplayPopup(
- (PU8) GetString(STR_ID_JMMS_FORWARD_LOCK_DRM),
- IMG_GLOBAL_WARNING,
- 1,
- JMMS_POPUP_TIME,
- WARNING_TONE);
- break;
- default:
- /* DisplayPopup((PU8)GetString(STR_GLOBAL_ERROR),IMG_GLOBAL_ERROR, 1,JMMS_POPUP_TIME,ERROR_TONE); */
- {
- U8 error_str[20];
- S8 temp[10] = {0, };
- memset(error_str, 0x00, 20);
- sprintf((S8*) temp, "%d", error_code);
- AnsiiToUnicodeString((PS8) (error_str), (PS8) temp);
- DisplayPopup((PU8) (error_str), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
- break;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_parse_continue_start_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * hMsg [IN]
- * err_cb [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_parse_continue_stop_timer(void)
- {
- StopTimer(JMMS_ASYNC_PARSE_TIMER);
- g_jmms_context->async_parse_context.callback=NULL;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_parse_continue_start_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * hMsg [IN]
- * err_cb [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_parse_continue_start_timer(MSG_HANDLE hMsg, error_callback err_cb, abort_callback abort_cb)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_jmms_context->async_parse_context.is_re_entrant=1;
- if(g_jmms_context->async_parse_context.callback !=NULL && g_jmms_context->async_parse_context.callback!=err_cb)
- {
- g_jmms_context->async_parse_context.callback=NULL;
- if(GetActiveScreenId() == SCR_ID_JMMS_PARSING_PROGRESS)
- {
- mmi_jmms_entry_parse_result_fail();
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_PROGRESS);
- }
- else if(GetActiveScreenId() == SCR_ID_JMMS_PARSING_SUCCESS_SCREEN)
- {
- mmi_jmms_entry_parse_result_fail();
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_SUCCESS_SCREEN);
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_SUCCESS_SCREEN);
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_FAIL_SCREEN);
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_PROGRESS);
- }
- if(g_jmms_context->async_parse_context.abort_cb)
- g_jmms_context->async_parse_context.abort_cb();
- }
- g_jmms_context->async_parse_context.msgHandle = hMsg;
- g_jmms_context->async_parse_context.callback = err_cb;
- g_jmms_context->async_parse_context.abort_cb = abort_cb;
- StartTimer(JMMS_ASYNC_PARSE_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_parse_continue_callback);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_parse_call_error_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_parse_call_error_callback(JC_RETCODE eRet)
- {
- if (g_jmms_context->async_parse_context.callback != NULL)
- {
- g_jmms_context->async_parse_context.is_re_entrant=0;
- g_jmms_context->async_parse_context.callback(eRet);
- if(!g_jmms_context->async_parse_context.is_re_entrant)
- g_jmms_context->async_parse_context.callback=NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_parse_continue_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_parse_continue_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JMMS_ASYNC_PARSE_TIMER);
- eRet = mmi_jmms_jdi_msg_parse_continue(g_jmms_context->async_parse_context.msgHandle);
- if (eRet == JC_ERR_MMS_PARSE_PENDING)
- {
- StartTimer(JMMS_ASYNC_PARSE_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_parse_continue_callback);
- }
- else
- {
- if (GetActiveScreenId() != SCR_ID_JMMS_PARSING_PROGRESS &&
- IsScreenPresent(SCR_ID_JMMS_PARSING_PROGRESS) == MMI_TRUE)
- {
- historyNode *saved_history;
- if (eRet != JC_OK)
- {
- HistoryReplace(
- SCR_ID_JMMS_PARSING_PROGRESS,
- SCR_ID_JMMS_PARSING_FAIL_SCREEN,
- mmi_jmms_entry_parse_result_fail);
- GetHistoryPointer(SCR_ID_JMMS_PARSING_FAIL_SCREEN,&saved_history);
- if(saved_history->isSmallScreen==1)
- {
- saved_history->isSmallScreen=0;
- }
- }
- else
- {
- HistoryReplace(
- SCR_ID_JMMS_PARSING_PROGRESS,
- SCR_ID_JMMS_PARSING_SUCCESS_SCREEN,
- mmi_jmms_entry_parse_result_pass);
- GetHistoryPointer(SCR_ID_JMMS_PARSING_SUCCESS_SCREEN,&saved_history);
- if(saved_history->isSmallScreen==1)
- {
- saved_history->isSmallScreen=0;
- }
- }
- return;
- }
- mmi_jmms_parse_call_error_callback(eRet);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_parse_result_fail
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_parse_result_fail(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_JMMS_PARSING_FAIL_SCREEN, NULL, mmi_jmms_entry_parse_result_fail, NULL);
- ShowCategory2Screen(
- STR_MMS_MENUENTRY,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- 0,
- 0,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- STR_ID_MMS_PARSING_FAIL,
- NULL);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- mmi_jmms_parse_call_error_callback(JC_ERR_GENERAL_FAILURE);
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_FAIL_SCREEN);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_parse_result_pass
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_parse_result_pass(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(g_jmms_context->msg_handle==NULL)
- {
- mmi_jmms_entry_parse_result_fail();
- return;
- }
- EntryNewScreen(SCR_ID_JMMS_PARSING_SUCCESS_SCREEN, NULL, mmi_jmms_entry_parse_result_pass, NULL);
- ShowCategory2Screen(
- STR_MMS_MENUENTRY,
- GetRootTitleIcon(MAIN_MENU_MESSAGES_MENUID),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- STR_ID_MMS_PARSING_SUCCESS,
- NULL);
- SetLeftSoftkeyFunction(mmi_jmms_entry_parse_result_pass_lsk, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_entry_parse_result_pass_lsk
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_entry_parse_result_pass_lsk(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->async_parse_context.callback != NULL)
- {
- mmi_jmms_parse_call_error_callback(JC_OK);
- DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_SUCCESS_SCREEN);
- }
- else
- {
- GoBackHistory();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_send_continue_start_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * hMsg [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_send_continue_start_timer(MSG_HANDLE hMsg)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_jmms_context->async_send_context.msgHandle = hMsg;
- StartTimer(JMMS_ASYNC_SEND_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_send_continue_callback);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_send_continue_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_send_continue_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JMMS_ASYNC_SEND_TIMER);
- eRet = mmi_jmms_jdi_msg_encapsulate_continue(g_jmms_context->async_send_context.msgHandle);
- if (eRet == JC_ERR_MMS_ENCODE_PENDING)
- {
- StartTimer(JMMS_ASYNC_SEND_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_send_continue_callback);
- }
- else
- {
- mmi_jmms_decrement_send_callback_node(eRet);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_clean_send_callback_list
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_clean_send_callback_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *nextHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->async_send_context.callback_list != NULL)
- {
- while (g_jmms_context->async_send_context.callback_list->next != NULL)
- {
- nextHead = g_jmms_context->async_send_context.callback_list->next;
- jdd_MemFree(g_jmms_context->async_send_context.callback_list);
- g_jmms_context->async_send_context.callback_list = nextHead;
- }
- jdd_MemFree(g_jmms_context->async_send_context.callback_list);
- g_jmms_context->async_send_context.callback_list = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_add_send_callback_node
- * DESCRIPTION
- *
- * PARAMETERS
- * new_err_cb [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_add_send_callback_node(error_callback new_err_cb)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *newHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- newHead = (jmms_async_callback_list*) jdd_MemAlloc(sizeof(jmms_async_callback_list), 1);
- newHead->err_cb = new_err_cb;
- if (g_jmms_context->async_send_context.callback_list != NULL)
- {
- newHead->next = g_jmms_context->async_send_context.callback_list;
- }
- else
- {
- newHead->next = NULL;
- }
- g_jmms_context->async_send_context.callback_list = newHead;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_decrement_send_callback_node
- * DESCRIPTION
- *
- * PARAMETERS
- * eRet [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_decrement_send_callback_node(JC_RETCODE eRet)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *oldHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->async_send_context.callback_list != NULL)
- {
- oldHead = g_jmms_context->async_send_context.callback_list;
- if (oldHead->next != NULL)
- {
- g_jmms_context->async_send_context.callback_list = oldHead->next;
- }
- else
- {
- g_jmms_context->async_send_context.callback_list = NULL;
- }
- oldHead->err_cb(eRet);
- if (oldHead != NULL)
- {
- jdd_MemFree(oldHead);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_save_continue_start_timer
- * DESCRIPTION
- *
- * PARAMETERS
- * hMsg [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_save_continue_start_timer(MSG_HANDLE hMsg)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_jmms_context->async_save_context.msgHandle = hMsg;
- StartTimer(JMMS_ASYNC_SAVE_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_save_continue_callback);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_save_continue_callback
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_save_continue_callback(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JMMS_ASYNC_SAVE_TIMER);
- eRet = mmi_jmms_jdi_msg_encapsulate_continue(g_jmms_context->async_save_context.msgHandle);
- if (eRet == JC_ERR_MMS_ENCODE_PENDING)
- {
- StartTimer(JMMS_ASYNC_SAVE_TIMER, JMMS_ASYNC_EVENT_TIME, mmi_jmms_save_continue_callback);
- }
- else
- {
- mmi_jmms_decrement_save_callback_node(eRet);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_clean_save_callback_list
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_clean_save_callback_list(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *nextHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->async_save_context.callback_list != NULL)
- {
- while (g_jmms_context->async_save_context.callback_list->next != NULL)
- {
- nextHead = g_jmms_context->async_save_context.callback_list->next;
- jdd_MemFree(g_jmms_context->async_save_context.callback_list);
- g_jmms_context->async_save_context.callback_list = nextHead;
- }
- jdd_MemFree(g_jmms_context->async_save_context.callback_list);
- g_jmms_context->async_save_context.callback_list = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_add_save_callback_node
- * DESCRIPTION
- *
- * PARAMETERS
- * new_err_cb [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_add_save_callback_node(error_callback new_err_cb)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *newHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- newHead = (jmms_async_callback_list*) jdd_MemAlloc(sizeof(jmms_async_callback_list), 1);
- newHead->err_cb = new_err_cb;
- if (g_jmms_context->async_save_context.callback_list != NULL)
- {
- newHead->next = g_jmms_context->async_save_context.callback_list;
- }
- else
- {
- newHead->next = NULL;
- }
- g_jmms_context->async_save_context.callback_list = newHead;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_decrement_save_callback_node
- * DESCRIPTION
- *
- * PARAMETERS
- * eRet [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_decrement_save_callback_node(JC_RETCODE eRet)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- jmms_async_callback_list *oldHead;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (g_jmms_context->async_save_context.callback_list != NULL)
- {
- oldHead = g_jmms_context->async_save_context.callback_list;
- if (oldHead->next != NULL)
- {
- g_jmms_context->async_save_context.callback_list = oldHead->next;
- }
- else
- {
- g_jmms_context->async_save_context.callback_list = NULL;
- }
- oldHead->err_cb(eRet);
- if (oldHead != NULL)
- {
- jdd_MemFree(oldHead);
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_is_message_to_fwd
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- MMI_BOOL mmi_jmms_is_message_to_fwd(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_jmms_context->message_to_fw;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_set_fw_flag_of_message
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_set_fw_flag_of_message(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_jmms_context->message_to_fw = MMI_TRUE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_reset_fw_flag_of_message
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_reset_fw_flag_of_message(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_jmms_context->message_to_fw = MMI_FALSE;
- }
- #ifdef __USB_IN_NORMAL_MODE__
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_handle_usb_enter_req
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_handle_usb_enter_req(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- MYQUEUE Message;
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* sandeep start inorder to fix PMT_*/
- if(g_jmms_context->msg_handle)
- {
- jmms_communication_state_node *comm_node = mmi_jmms_get_comm_state(g_jmms_context, g_jmms_context->uiReferenceID);
- if(comm_node->mms_communication_state == E_TYPE_NEW_MMS)
- {
- eRet = mmi_jmms_send_and_store_mms("Outbox", g_jmms_context->msg_handle, comm_node);
- }
- }
- /* sandeep */
- /* Himanshu Fix PMTSW00006579 START */
- mmi_jmms_delete_compose_temp_files();
- /* Himanshu Fix PMTSW00006579 END */
- mmi_jmms_usb_create_mms_system_folder();
- Message.oslSrcId = MOD_WAP;
- Message.oslDestId = MOD_MMI;
- Message.oslMsgId = MSG_ID_MMS_ENTER_USB_MODE_RSP;
- Message.oslDataPtr = NULL;
- Message.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&Message);
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "mmi_jmms_handle_usb_enter_req"));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_handle_usb_exit_req
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_handle_usb_exit_req(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- MYQUEUE Message;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(g_jmms_context) /* The usb exit can come before the MMS has been initialized. */
- {
- jdd_FSCreateWapMmsSysFolders();
- if(mmi_jmms_sys_folders_exist()!=JC_OK)
- {
- mmi_jmms_usb_delete_mms_system_folder();
- mmi_jmms_deinit_shutdown();
- g_jmms_context->init_done = JMMS_READY_WITHOUT_STORE;
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "mmi_jmms_handle_usb_exit_req: %d",g_jmms_context->init_done ));
- }
- else
- {
- mmi_jmms_cached_pending_mms();
- mmi_jmms_usb_delete_mms_system_folder();
- mmi_jmms_store_jdi_sync_files(g_jmms_context->hStoreHandle);
- }
- }
- Message.oslSrcId = MOD_WAP;
- Message.oslDestId = MOD_MMI;
- Message.oslMsgId = MSG_ID_MMS_EXIT_USB_MODE_RSP;
- Message.oslDataPtr = NULL;
- Message.oslPeerBuffPtr = NULL;
- OslMsgSendExtQueue(&Message);
- mmi_jmms_update_status_icon_indicator();
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "mmi_jmms_handle_usb_exit_req"));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_check_usb_mode
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_jmms_check_usb_mode(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (mmi_usb_is_in_mass_storage_mode() && jdd_FSIsMMSStorageExported())
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s, return value = 1", "mmi_jmms_check_usb_mode"));
- return 1;
- }
- else
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s, return value = 0", "mmi_jmms_check_usb_mode"));
- return 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mms_delete_uncached_file_from_folder_file
- * DESCRIPTION
- * Deletes the file from folder if it can not be moved.
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mms_delete_uncached_file_from_folder_file(JC_CHAR *new_mms_path_src_ucs2)
- {
- int fhandle = -1;
- JC_UINT32 uiExtraBytes;
- U8 total_num_msgs = 0;
- JC_RETCODE eRet = JC_OK;
- jmms_folder_msgs_list *node = NULL;
- fhandle = FS_Open(new_mms_path_src_ucs2, FS_READ_ONLY);
- if(fhandle<0)
- return;
- mmi_jmms_set_active_folder(MMI_JMMS_INBOX);
- mmi_jmms_jdi_get_extrabytes(g_jmms_context->hStoreHandle,fhandle,&uiExtraBytes);
- uiExtraBytes &= 0x00FFFFFF;
- FS_Close(fhandle);
- mmi_jmms_delete_message_as_per_id(uiExtraBytes);
- if(FS_Delete(new_mms_path_src_ucs2)!= FS_NO_ERROR)
- {
- ASSERT(0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_cached_pending_mms
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_cached_pending_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_INT8 mms_path_ascii[FMGR_MAX_PATH_LEN +1];
- JC_CHAR mms_path_src_ucs2[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- JC_RETCODE eRet = JC_OK;
- JC_RETCODE eRet1 = JC_OK;
- U8 file_index = 0;
- U16 file_name[(FMGR_MAX_FILE_LEN + 1) * ENCODING_LENGTH];
- JC_INT32 drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 1, FS_NO_ALT_DRIVE);
- JC_UINT32 file_size = 0;
- JDD_FILE_TYPE_enum file_type;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "mmi_jmms_cached_pending_mms"));
- sprintf(mms_path_ascii, "%c:\@wap\mms_sys\@mms", drive_letter);
- AnsiiToUnicodeString((S8*) mms_path_src_ucs2, (S8*) mms_path_ascii);
- if (g_jmms_context->jmms_fs_handle == NULL)
- {
- if (jdd_FSInitialize(&g_jmms_context->jmms_fs_handle) != JC_OK)
- {
- return;
- }
- }
- while (eRet == JC_OK)
- {
- JC_CHAR mms_path_dst_ucs2[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- JC_CHAR new_mms_path_src_ucs2[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- eRet = jdd_FSReadDir(g_jmms_context->jmms_fs_handle,mms_path_src_ucs2, file_index, file_name, FMGR_MAX_FILE_LEN, &file_type, &file_size);
- if(eRet == JC_OK)
- {
- if(file_type == JDD_FILE_TYPE_FOLDER)
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "found folder"));
- file_index++;
- }
- else
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "found file"));
- pfnUnicodeStrcpy((S8*)new_mms_path_src_ucs2,(S8*)mms_path_src_ucs2);
- AnsiiToUnicodeString((S8*) mms_path_dst_ucs2, "\");
- pfnUnicodeStrcat((S8*)new_mms_path_src_ucs2, (S8*)mms_path_dst_ucs2);
- pfnUnicodeStrcat((S8*)new_mms_path_src_ucs2, (S8*)file_name);
- UnicodeToAnsii((S8*)mms_path_ascii, (S8*)new_mms_path_src_ucs2);
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "source path: %s", mms_path_ascii));
- #ifdef MMS_IN_LARGE_STORAGE
- drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 2, FS_DRIVE_V_NORMAL | FS_DRIVE_I_SYSTEM);
- #endif
- sprintf(mms_path_ascii, "%c:\@mms\", drive_letter);
- AnsiiToUnicodeString((S8*) mms_path_dst_ucs2, (S8*) mms_path_ascii);
- pfnUnicodeStrcat((S8*)mms_path_dst_ucs2, (S8*)file_name);
- UnicodeToAnsii((S8*)mms_path_ascii, (S8*)mms_path_dst_ucs2);
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "Destination path: %s", mms_path_ascii));
- eRet1 = jdd_FSMove(NULL, new_mms_path_src_ucs2, NULL, mms_path_dst_ucs2);
- if(eRet1 != JC_OK)
- {
- mms_delete_uncached_file_from_folder_file(new_mms_path_src_ucs2);
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "ERROR in caching mms files at file index: %d, ret code: %d", file_index, eRet));
- }
- else
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "DELETED FILE in caching mms files at file index: %d", file_index));
- }
- }
- }
- }
- if (g_jmms_context->jmms_fs_handle != NULL)
- {
- jdd_FSDeinitialize(g_jmms_context->jmms_fs_handle);
- g_jmms_context->jmms_fs_handle = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_usb_create_mms_system_folder
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_usb_create_mms_system_folder(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JDD_FILE fh;
- JC_INT8 folder_path_ascii[FMGR_MAX_PATH_LEN + 1];
- JC_CHAR folder_path_ucs2[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- JC_INT32 drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 1, FS_NO_ALT_DRIVE);
- JDD_FSHANDLE fs_handle = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "mmi_jmms_usb_create_mms_system_folder"));
- if (fs_handle == NULL)
- {
- if (jdd_FSInitialize(&fs_handle) != JC_OK)
- {
- return;
- }
- }
- sprintf(folder_path_ascii, "%c:\@wap\mms_sys\@mms", drive_letter);
- AnsiiToUnicodeString((S8*) folder_path_ucs2, (S8*) folder_path_ascii);
- fh = jdd_FSOpen(fs_handle, (U16*) folder_path_ucs2, E_OPEN_READ_MODE);
- if (fh == NULL) /* Folder Does Not Exist */
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "Creating @wap\mms_sys\@mms folder as it does not exists."));
- jdd_FSMakeDir(fs_handle, (U16*) folder_path_ucs2);
- drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 1, FS_NO_ALT_DRIVE);
- sprintf(folder_path_ascii, "%c:\@wap\mms_sys\@mms\temp", drive_letter);
- AnsiiToUnicodeString((S8*) folder_path_ucs2, (S8*) folder_path_ascii);
- jdd_FSMakeDir(fs_handle, (U16*) folder_path_ucs2);
- }
- else
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "Folder @wap\mms_sys\@mms already exists."));
- jdd_FSClose(fh);
- mmi_jmms_cached_pending_mms();
- }
- if (fs_handle != NULL)
- {
- jdd_FSDeinitialize(fs_handle);
- fs_handle = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jmms_usb_delete_mms_system_folder
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * eRet(?) [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_jmms_usb_delete_mms_system_folder(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_INT8 mms_path_ascii[FMGR_MAX_PATH_LEN];
- JC_CHAR mms_path_src_ucs2[(FMGR_MAX_PATH_LEN + 1) * ENCODING_LENGTH];
- JC_INT32 drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 1, FS_NO_ALT_DRIVE);
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "mmi_jmms_usb_delete_mms_system_folder"));
- if (g_jmms_context->jmms_fs_handle == NULL)
- {
- if (jdd_FSInitialize(&g_jmms_context->jmms_fs_handle) != JC_OK)
- {
- return;
- }
- }
- drive_letter = FS_GetDrive(FS_DRIVE_I_SYSTEM, 1, FS_NO_ALT_DRIVE);
- sprintf(mms_path_ascii, "%c:\@wap\mms_sys\@mms\temp", drive_letter);
- AnsiiToUnicodeString((S8*) mms_path_src_ucs2, (S8*) mms_path_ascii);
- jdd_FSDelDir(g_jmms_context->jmms_fs_handle, (U16*) mms_path_src_ucs2);
- sprintf(mms_path_ascii, "%c:\@wap\mms_sys\@mms", drive_letter);
- AnsiiToUnicodeString((S8*) mms_path_src_ucs2, (S8*) mms_path_ascii);
- jdd_FSDelDir(g_jmms_context->jmms_fs_handle, (U16*) mms_path_src_ucs2);
- if (g_jmms_context->jmms_fs_handle != NULL)
- {
- jdd_FSDeinitialize(g_jmms_context->jmms_fs_handle);
- g_jmms_context->jmms_fs_handle = NULL;
- }
- }
- #endif /* __USB_IN_NORMAL_MODE__ */ /* #ifdef __USB_IN_NORMAL_MODE__ */
- #endif /* (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT)) */
- #endif /* _MMI_JMMSSECONDARYMMI_C */