📄 jmmsoutboxui.c
字号:
/*****************************************************************************
* FUNCTION
* mmi_jmms_highlight_outbox_options_delete
* DESCRIPTION
* Highlight hdlr of Outbox option delete
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_highlight_outbox_options_delete(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(mmi_jmms_outbox_pre_delete, KEY_EVENT_UP);
SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(mmi_jmms_outbox_pre_delete, KEY_WAP, KEY_EVENT_DOWN);
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_highlight_outbox_options_delete_all
* DESCRIPTION
* Highlight hdlr of Outbox option delete all
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_highlight_outbox_options_delete_all(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(mmi_jmms_outbox_delete_all, KEY_EVENT_UP);
SetKeyHandler(NULL, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(mmi_jmms_outbox_delete_all, KEY_WAP, KEY_EVENT_DOWN);
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_highlight_outbox_options_use_details
* DESCRIPTION
* Highlight hdlr of Outbox option use details
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
#ifndef __MMI_UNIFIED_MESSAGE__
void mmi_jmms_highlight_outbox_options_use_details(void)
#else
void mmi_jmms_highlight_outbox_options_use_number(void)
#endif
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(mmi_jmms_outbox_use_details, KEY_EVENT_UP);
SetKeyHandler(mmi_jmms_outbox_use_details, KEY_SEND, KEY_EVENT_UP);
SetKeyHandler(mmi_jmms_outbox_use_details, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(mmi_jmms_outbox_use_details, KEY_WAP, KEY_EVENT_DOWN);
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_highlight_outbox_options_properties
* DESCRIPTION
* Highlight hdlr of Outbox option properties
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_highlight_outbox_options_properties(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
SetLeftSoftkeyFunction(mmi_jmms_outbox_properties, KEY_EVENT_UP);
SetKeyHandler(mmi_jmms_outbox_properties, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
SetKeyHandler(mmi_jmms_outbox_properties, KEY_WAP, KEY_EVENT_DOWN);
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_outbox_view
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_outbox_view(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
JC_RETCODE eRet = JC_OK;
CONTENT_DATA Content = {0, };
U8 msg_index = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
msg_index = g_jmms_context->store_context->nMsgs_in_Current_folder - g_jmms_context->nCurr_scr_hilited_index;
Content.bIsStream = E_TRUE;
eRet = mmi_jmms_get_message("Outbox", &Content, (msg_index));
if (eRet != JC_OK)
{
goto END;
}
#ifdef __MMI_UNIFIED_MESSAGE__
mmi_jmms_deinit_view();
#endif
eRet = mmi_jmms_pre_entry_mms_view(&Content);
if (eRet == JC_ERR_MMS_PARSE_PENDING)
{
return;
}
END:
if (eRet != JC_OK && g_jmms_context->msg_handle != NULL)
{
eRet = mmi_jmms_jdi_msg_deinit(g_jmms_context->msg_handle);
g_jmms_context->msg_handle = NULL;
}
if (eRet != JC_OK)
{
DisplayPopup((U8*) GetString(STR_GLOBAL_ERROR), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
}
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_outbox_resend
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_outbox_resend(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/* CONTENT_DATA Content = {0, }; */
JC_RETCODE eRet = JC_OK;
#ifndef __MMI_UNIFIED_MESSAGE__
JC_INT32 index = 0;
#else
jmms_folder_msgs_list *msgs_list_node = NULL;
#endif
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
#ifndef __MMI_UNIFIED_MESSAGE__
mmi_jmms_deinit_mms_context(g_jmms_context);
if (g_jmms_context->pParseContent == NULL)
{
g_jmms_context->pParseContent = (CONTENT_DATA*) jdd_MemAlloc(sizeof(CONTENT_DATA), 1);
}
g_jmms_context->pParseContent->bIsStream = E_TRUE;
index =
(JC_INT32) (g_jmms_context->store_context->nMsgs_in_Current_folder - g_jmms_context->nCurr_scr_hilited_index);
eRet = mmi_jmms_get_message("Outbox", g_jmms_context->pParseContent, index);
if (eRet != JC_OK)
{
mmi_jmms_error_handler(eRet);
goto END;
}
g_jmms_context->last_scr_id = GetActiveScreenId();
mmi_jmms_parsing_progressing_screen();
eRet = mmi_jmms_jdi_parse_msg_buffer(&g_jmms_context->msg_handle, g_jmms_context->pParseContent, E_TYPE_MMS, E_TRUE);
/* */
if (eRet == JC_ERR_MMS_PARSE_PENDING)
{
mmi_jmms_parse_continue_start_timer(g_jmms_context->msg_handle, mmi_jmms_outbox_resend_parse_async_callback, mmi_jmms_only_abort_parsing_progress);
return;
}
#else
g_jmms_context->last_scr_id = SCR_ID_UM_UNSENT;
msgs_list_node = g_jmms_context->store_context->messages_list;
while ( msgs_list_node != NULL && msgs_list_node->msg_index != g_jmms_context->nCurr_scr_hilited_index)
{
msgs_list_node = msgs_list_node->next;
}
g_jmms_context->num_attachments= msgs_list_node->attachment_status;
if(g_jmms_context->num_attachments==E_JMMS_ATTACHMENT_NOT_PRESENT)
g_jmms_context->num_attachments=0;
mmi_jmms_jdi_deinitview(g_jmms_context->msg_handle);
#endif
mmi_jmms_outbox_resend_parse_async_callback(eRet);
return;
/* */
#ifndef __MMI_UNIFIED_MESSAGE__
END:
if (g_jmms_context->pParseContent != NULL)
{
if (g_jmms_context->pParseContent->pFileName != NULL)
{
jdd_MemFree(g_jmms_context->pParseContent->pFileName);
g_jmms_context->pParseContent->pFileName = NULL;
}
jdd_MemFree(g_jmms_context->pParseContent);
g_jmms_context->pParseContent = NULL;
}
if (eRet != JC_OK)
{
if (g_jmms_context->msg_handle != NULL)
{
mmi_jmms_jdi_msg_deinit(g_jmms_context->msg_handle);
g_jmms_context->msg_handle = NULL;
}
}
#endif
return;
}
/*****************************************************************************
* FUNCTION
* mmi_jmms_outbox_resend_parse_async_callback
* DESCRIPTION
*
* PARAMETERS
* eRet [IN]
* RETURNS
* void
*****************************************************************************/
void mmi_jmms_outbox_resend_parse_async_callback(JC_RETCODE eRet)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
MESSAGE_HEADERS *pMsgHeaders = NULL;
MESSAGE_SEND *send_p;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
if (JC_OK != eRet)
{
if (GetActiveScreenId() == SCR_ID_JMMS_PARSING_PROGRESS)
{
mmi_jmms_error_handler(eRet);
}
goto END;
}
///Todo: check tehse APIs should not be rquired because
///MMS in outbox folder will be from write MMS and this information
///should already be there in MMS
eRet = mmi_jmms_jdi_set_content_class(g_jmms_context->msg_handle, MMS_SUPPORTED_CONTENT_CLASS);
if (eRet != JC_OK)
{
mmi_jmms_error_handler(eRet);
goto END;
}
eRet = mmi_jmms_jdi_set_creation_mode(g_jmms_context->msg_handle, mmi_jmms_compose_settings_creation_mode());
if (eRet != JC_OK)
{
mmi_jmms_error_handler(eRet);
goto END;
}
eRet = mmi_jmms_jdi_set_msg_type(g_jmms_context->msg_handle, E_TYPE_MMS);
if (eRet != JC_OK)
{
mmi_jmms_error_handler(eRet);
goto END;
}
eRet = mmi_jmms_jdi_set_presentation_type(g_jmms_context->msg_handle, E_PRESENTATION_SMIL);
if (eRet != JC_OK)
{
mmi_jmms_error_handler(eRet);
goto END;
}
eRet = mmi_jmms_jdi_get_msg_headers(g_jmms_context->msg_handle, &pMsgHeaders);
if (eRet != JC_OK || pMsgHeaders == NULL)
{
eRet = JC_ERR_STORE_FILE_CORRUPTED;
mmi_jmms_error_handler(eRet);
goto END;
}
send_p = (MESSAGE_SEND*) (pMsgHeaders->pHeaders);
g_jmms_context->version = (S8*) (send_p->pVersion);
g_jmms_context->progress_screen_title = STR_ID_PROGRESS_SENDING;
#ifdef __MMI_UNIFIED_MESSAGE__
g_jmms_context->save_mms = MMI_FALSE;
#else
//sandeep to Fix PMTSW00006445
// g_jmms_context->save_mms = MMI_TRUE;
#endif
memset(g_jmms_context->g_jmms_progress_str, 0x00, MAX_PROGRESS_SCREEN_HINT_LEN * ENCODING_LENGTH);
mmi_jmms_entry_communication_progress_screen();
/******************************************************************************
This part of the function is modified to make the MMS send process asynch.
Modified By : Raj Kumar Gupta
Date of Modification : 09 June 2006
*****************************************************************************/
/* Register the function that to be execute after the completion of the
encapsulation */
mmi_jmms_add_send_callback_node(mmi_jmms_outbox_resend_send_async_callback);
eRet = mmi_jmms_send_mms(g_jmms_context->msg_handle, E_TYPE_NEW_MMS, E_TRUE, 1, E_TRUE);
DeleteScreenIfPresent(SCR_ID_JMMS_PARSING_PROGRESS);
return;
END:
#ifndef __MMI_UNIFIED_MESSAGE__
if (g_jmms_context->pParseContent != NULL)
{
if (g_jmms_context->pParseContent->pFileName != NULL)
{
jdd_MemFree(g_jmms_context->pParseContent->pFileName);
g_jmms_context->pParseContent->pFileName = NULL;
}
jdd_MemFree(g_jmms_context->pParseContent);
g_jmms_context->pParseContent = NULL;
}
if (eRet != JC_OK)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -