UnifiedComposerMain.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:491k
源码类别:
MTK
开发平台:
C/C++
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send , write new */
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break; /* send , write new */
- /* send , edit */
- case MMI_UC_STATE_EDIT_EXISTED_MSG:
- case MMI_UC_STATE_SEND:
- {
- UmMsgBoxType msg_box = mmi_um_get_current_msg_box_type();
- MMI_ASSERT(msg_box);
- if (g_uc_p->send_info.action == MMI_UC_STATE_SEND)
- {
- MMI_ASSERT(msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT);
- }
- switch (action)
- {
- /* send , edit */
- case MMI_UC_ACTION_SEND:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- switch (result)
- {
- case MMI_FRM_SMS_OK:
- {
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SENT_ID),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_SENDING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_SENDING);
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_DELETE,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- case MMI_FRM_SMS_ABORT:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD ||
- g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- AlmEnableSPOF();
- }
- else
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- case MMI_FRM_SMS_NOTREADY:
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_MSG_NOT_READY_YET),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_NUMINVALID:
- {
- DisplayPopup(
- (PU8) GetString(STR_ID_PHB_NUM_INVALID),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_SENDING);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_RETURN:
- case MMI_FRM_SMS_END:
- break;
- default:
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- }
- }
- /* send , edit*/
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- switch (result)
- {
- case MMA_RESULT_OK:
- {
- if (g_uc_p->send_info.abort != MMI_UC_ABORT_NONE)
- {
- PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
- "*[UnifiedComposerMain.c] mmi_uc_action_fsm race condition for send_mms_rsp and cancel_mms_req *n"));
- g_uc_p->send_info.send_result = MMA_RESULT_FAIL_USER_CANCEL;
- mmi_uc_action_fsm(MMI_UC_ACTION_SEND, MMA_RESULT_FAIL_USER_CANCEL);
- return;
- }
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- /* Avoid user to send abort after sending rsp is received. */
- if (GetExitScrnID() == SCR_ID_UC_SENDING)
- {
- ClearInputEventHandler(MMI_DEVICE_ALL);
- ClearKeyHandler(KEY_END, KEY_EVENT_UP);
- ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
- ClearKeyHandler(KEY_END, KEY_LONG_PRESS);
- ClearKeyHandler(KEY_END, KEY_REPEAT);
- }
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_MMS_PREFER);
- }
- else
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_DELETE,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- case MMA_RESULT_FAIL_USER_CANCEL:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_MMS_PREFER);
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- else
- {
- /* save msg from SMS to MMS. Save new one and then delete original one */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- default:
- {
- if (g_uc_p->send_info.abort != MMI_UC_ABORT_NONE)
- {
- PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
- "*[UnifiedComposerMain.c] mmi_uc_action_fsm race condition for send_mms_rsp and cancel_mms_req *n"));
- g_uc_p->send_info.send_result = MMA_RESULT_FAIL_USER_CANCEL;
- mmi_uc_action_fsm(MMI_UC_ACTION_SEND, MMA_RESULT_FAIL_USER_CANCEL);
- return;
- }
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- else
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* save msg from SMS to MMS. Save new one and then delete original one */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send , edit */
- case MMI_UC_ACTION_SAVE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_ABORT)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (result == MMI_FRM_SMS_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (result == MMA_RESULT_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- return;
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_reset_msg();
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (result == MMA_RESULT_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- return;
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send , edit */
- case MMI_UC_ACTION_DELETE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SENT_ID),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.send_result == MMI_FRM_SMS_ABORT)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- return;
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- return;
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_OK)
- {
- /* Original msg is deleted first in unsent and draft box cases */
- if (g_uc_p->send_info.new_msg_id)
- {
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_MMS_PREFER);
- return;
- }
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- if (IsScreenPresent(SCR_ID_UC_PROCESSING))
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else if (IsScreenPresent(SCR_ID_UC_SENDING))
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_SENDING);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (IsScreenPresent(SCR_ID_UC_PROCESSING))
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- else if (IsScreenPresent(SCR_ID_UC_SENDING))
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_SENDING);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- /* Deletion may fail in USB normal mode. */
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD ||
- g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_reset_msg();
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send , write new */
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break; /* send , edit existed */
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break;
- case MMI_UC_ACTION_SEND_AND_SAVE:
- {
- UmMsgBoxType msg_box = mmi_um_get_current_msg_box_type();
- switch (g_uc_p->main.state)
- {
- /* send and save, write new */
- case MMI_UC_STATE_WRITE_NEW_MSG:
- case MMI_UC_STATE_FORWARD:
- case MMI_UC_STATE_REPLY:
- case MMI_UC_STATE_REPLY_ALL:
- {
- switch (action)
- {
- /* send and save, write new */
- case MMI_UC_ACTION_SEND:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- switch (result)
- {
- case MMI_FRM_SMS_OK:
- {
- mmi_uc_addr_struct* addr = NULL;
- if (msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, 0);
- mmi_uc_save_sms_after_send(SMSAL_STO_SENT, addr->addr);
- }
- break;
- case MMI_FRM_SMS_ABORT:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- case MMI_FRM_SMS_NOTREADY:
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_MSG_NOT_READY_YET),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_NUMINVALID:
- {
- DisplayPopup(
- (PU8) GetString(STR_ID_PHB_NUM_INVALID),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_RETURN:
- case MMI_FRM_SMS_END:
- break;
- default:
- {
- mmi_uc_addr_struct* addr = NULL;
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- break;
- }
- }
- /* send and save, write new */
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- switch (result)
- {
- case MMA_RESULT_OK:
- {
- if (g_uc_p->send_info.abort != MMI_UC_ABORT_NONE)
- {
- PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
- "*[UnifiedComposerMain.c] mmi_uc_action_fsm race condition for send_mms_rsp and cancel_mms_req *n"));
- g_uc_p->send_info.send_result = MMA_RESULT_FAIL_USER_CANCEL;
- mmi_uc_action_fsm(MMI_UC_ACTION_SEND, MMA_RESULT_FAIL_USER_CANCEL);
- return;
- }
- if (msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(
- STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_SENT);
- }
- break;
- case MMA_RESULT_FAIL_USER_CANCEL:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_MMS_PREFER);
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- default:
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- break;
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send and save, write new */
- case MMI_UC_ACTION_SAVE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_ABORT)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_OK)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_SUCCESS),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- else
- {
- if (result == MMI_FRM_SMS_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- mmi_uc_reset_msg();
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_OK)
- {
- if (result == MMA_RESULT_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_SUCCESS),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- else
- {
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- }
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- case MMI_UC_ACTION_DELETE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- MMI_ASSERT(0);
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Deletion may fail in USB normal mode. */
- if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD ||
- g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send and save, write new */
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break; /* send and save, write new */
- case MMI_UC_STATE_EDIT_EXISTED_MSG:
- case MMI_UC_STATE_SEND:
- {
- MMI_ASSERT(msg_box);
- if (g_uc_p->send_info.action == MMI_UC_STATE_SEND)
- {
- MMI_ASSERT(msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT);
- }
- switch (action)
- {
- /* send and save, edit */
- case MMI_UC_ACTION_SEND:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- switch (result)
- {
- case MMI_FRM_SMS_OK:
- {
- if (msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, 0);
- mmi_uc_save_sms_after_send(SMSAL_STO_SENT, addr->addr);
- }
- else
- {
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- case MMI_FRM_SMS_ABORT:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD ||
- g_uc_p->main.state == MMI_UC_STATE_SEND )
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- AlmEnableSPOF();
- }
- else
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- case MMI_FRM_SMS_NOTREADY:
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_MSG_NOT_READY_YET),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_NUMINVALID:
- {
- DisplayPopup(
- (PU8) GetString(STR_ID_PHB_NUM_INVALID),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_SENDING);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- break;
- case MMI_FRM_SMS_RETURN:
- case MMI_FRM_SMS_END:
- break;
- default:
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- }
- }
- /* send and save , edit*/
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- switch (result)
- {
- case MMA_RESULT_OK:
- {
- if (g_uc_p->send_info.abort != MMI_UC_ABORT_NONE)
- {
- PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
- "*[UnifiedComposerMain.c] mmi_uc_action_fsm race condition for send_mms_rsp and cancel_mms_req *n"));
- g_uc_p->send_info.send_result = MMA_RESULT_FAIL_USER_CANCEL;
- mmi_uc_action_fsm(MMI_UC_ACTION_SEND, MMA_RESULT_FAIL_USER_CANCEL);
- return;
- }
- if (msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_SENT);
- }
- else
- {
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- }
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- case MMA_RESULT_FAIL_USER_CANCEL:
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_MMS_PREFER);
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- else
- {
- /* save msg from SMS to MMS. Save new one and then delete original one */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /*mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );*/
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- default:
- {
- /* UC Screens may be deleted by other Apps, ex. USB normal mode.*/
- /* Do not display processing screen in such cases. */
- if (IsScreenPresent(SCR_ID_UC_OPT_DONE))
- {
- mmi_uc_set_processing_screen(STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- }
- DeleteScreenIfPresent(SCR_ID_UC_SENDING);
- if (msg_box == UM_MSG_BOX_TYPE_INBOX ||
- msg_box == UM_MSG_BOX_TYPE_SENT)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- else
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT)
- {
- mmi_um_set_highlight_msg(0);
- }
- /* save msg from SMS to MMS. Save new one and then delete original one */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /*mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );*/
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- break;
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send and save, edit */
- case MMI_UC_ACTION_SAVE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_ABORT)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_OK)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_SUCCESS),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- else
- {
- if (result == MMI_FRM_SMS_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if (result == MMA_RESULT_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- return;
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_reset_msg();
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_OK)
- {
- if (result == MMA_RESULT_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_SUCCESS),
- IMG_SEND_SUCCESS_PIC_MSG,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_SUCCESS_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- }
- else
- {
- if (result == MMA_RESULT_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- return;
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- }
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- }
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- case MMI_UC_ACTION_DELETE:
- {
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMI_FRM_SMS_OK)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, 0);
- mmi_uc_save_sms_after_send(SMSAL_STO_SENT, addr->addr);
- }
- else if (g_uc_p->send_info.send_result == MMI_FRM_SMS_ABORT)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- return;
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_uc_addr_struct* addr = NULL;
- addr = mmi_uc_get_addr(MMI_UC_ADDRESS_GROUP_TYPE_TO, g_uc_p->send_info.curr_send_number);
- mmi_uc_save_sms_after_send(SMSAL_STO_UNSENT, addr->addr);
- return;
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Do nothing. */
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_SUCCESS),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_UC_SEND_FAIL_SAVE_FAIL),
- IMG_SEND_FAIL_PIC_MSG,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_delete_sms_frm_screen();
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- }
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (g_uc_p->send_info.send_result == MMA_RESULT_OK)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_SENT);
- }
- else if (g_uc_p->send_info.send_result == MMA_RESULT_FAIL_USER_CANCEL)
- {
- if (g_uc_p->send_info.abort == MMI_UC_ABORT_NORMAL)
- {
- MMI_ASSERT(result == MMA_RESULT_OK);
- DisplayPopup(
- (PU8) GetString(STR_UC_ABORTED_ID),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- if (g_uc_p->main.state == MMI_UC_STATE_FORWARD ||
- g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE_OPT, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT, SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else if (g_uc_p->send_info.abort == MMI_UC_ABORT_BY_END_KEY)
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_reset_msg();
- if (GetExitScrnID() == SCR_ID_UC_PROCESSING)
- {
- GoBackHistory();
- }
- else
- {
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- }
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else /* send fail*/
- {
- if ((g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER && result == MMI_FRM_SMS_OK) ||
- (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER && result == MMA_RESULT_OK))
- {
- if (msg_box == UM_MSG_BOX_TYPE_UNSENT ||
- msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* Do nothing. */
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_OUTBOX);
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- mmi_uc_display_mma_send_result_popup(g_uc_p->send_info.send_result);
- if (g_uc_p->main.state == MMI_UC_STATE_SEND)
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_OPT_DONE, SCR_ID_UC_PROCESSING);
- }
- else
- {
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- }
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* send , write new */
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break;
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break;
- case MMI_UC_ACTION_SAVE:
- {
- UmMsgBoxType msg_box = mmi_um_get_current_msg_box_type();
- /* save */
- switch (g_uc_p->main.state)
- {
- /* save, write new */
- case MMI_UC_STATE_WRITE_NEW_MSG:
- case MMI_UC_STATE_REPLY:
- case MMI_UC_STATE_REPLY_ALL:
- {
- /* save, write new */
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* save, write new, sms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_FAILURE_MEM_FULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- }
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- /* save, write new */
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* save, write new, mms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- if (result == MMA_RESULT_OK)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_FAILURE_MEM_FULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- }
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- /* save, edit existed */
- case MMI_UC_STATE_EDIT_EXISTED_MSG:
- {
- /* save, edit */
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* save, edit, sms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_DRAFT ||
- (msg_box == UM_MSG_BOX_TYPE_UNSENT && g_uc_p->msg.to_num > 0))
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- mmi_uc_delete_existed_mms();
- return;
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_FAILURE_MEM_FULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- }
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else if (action == MMI_UC_ACTION_DELETE)
- {
- if (msg_box == UM_MSG_BOX_TYPE_DRAFT ||
- (msg_box == UM_MSG_BOX_TYPE_UNSENT && g_uc_p->msg.to_num > 0))
- {
- /* save msg from SMS to SMS. Delete original one and then save new one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- if (result == MMI_FRM_SMS_OK)
- {
- mmi_uc_save_sms_req();
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- }
- /* save msg from MMS to SMS. Save new one and then delete original one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* Deletion may fail in USB normal mode. */
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- mmi_uc_delete_sms_frm_screen();
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- /* save, edit */
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* save, edit, mms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- if (result == MMA_RESULT_OK)
- {
- if (msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. Save new one and then delete original one. */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- mmi_frm_sms_delete_sms(
- mmi_uc_delete_sms_callback,
- MOD_MMI,
- MMI_FRM_SMS_DRAFTS,
- g_uc_p->send_info.existed_msg_id );
- return;
- }
- /* save msg from MMS to MMS. Delete original one and then save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- }
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_SMS_FAILURE_MEM_FULL),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- }
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- else if (action == MMI_UC_ACTION_DELETE)
- {
- if (msg_box == UM_MSG_BOX_TYPE_DRAFT)
- {
- /* save msg from SMS to MMS. save new one and then delete original one . */
- if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- MMI_ASSERT(result == MMI_FRM_SMS_OK);
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_DONE),
- IMG_GLOBAL_ACTIVATED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) SUCCESS_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- /* save msg from MMS to MMS. delete original one and then Save new one. */
- else if (g_uc_p->send_info.existed_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- if (result == MMA_RESULT_OK)
- {
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_DRAFT);
- }
- else
- {
- DisplayPopup(
- (PU8) GetString(STR_GLOBAL_UNFINISHED),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MESSAGES_POPUP_TIME_OUT,
- (U8) WARNING_TONE);
- mmi_uc_delete_between_screens(SCR_ID_UC_EDITOR, SCR_ID_UC_PROCESSING);
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break; /* save */
- case MMI_UC_ACTION_SAVE_IN_BACKGROUND:
- {
- /* save in background*/
- switch (g_uc_p->main.state)
- {
- /* save in background, write new */
- case MMI_UC_STATE_WRITE_NEW_MSG:
- case MMI_UC_STATE_REPLY:
- case MMI_UC_STATE_REPLY_ALL:
- case MMI_UC_STATE_EDIT_EXISTED_MSG:
- {
- /* save in background, write new */
- if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_SMS_PREFER)
- {
- /* save, write new, sms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- mmi_uc_reset_msg();
- /* The ems buffer would be reset in SMS framework. */
- //mmi_uc_clear_msg_bearer(MMI_UC_MSG_TYPE_SMS_PREFER);
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- /* save in background, write new */
- else if (g_uc_p->msg_type.curr_msg_type == MMI_UC_MSG_TYPE_MMS_PREFER)
- {
- /* save in background, write new, mms */
- if (action == MMI_UC_ACTION_SAVE)
- {
- mmi_uc_reset_msg();
- AlmEnableSPOF();
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- else
- {
- MMI_ASSERT(0);
- }
- }
- break;
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- break; /* save in background */
- case MMI_UC_ACTION_IDLE:
- {
- PRINT_INFORMATION_2((MMI_TRACE_G6_SMS,
- "*[UnifiedComposerMain.c] mmi_uc_action_fsm IDLE DO Nothing *n"));
- }
- break;
- default:
- {
- MMI_ASSERT(0);
- }
- break;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_create_mms
- * DESCRIPTION
- * Create MMS xml file
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_create_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 result;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_uc_set_processing_screen(STR_UC_CREATING_ID, STR_UC_PLEASE_WAIT_ID, IMG_GLOBAL_PROGRESS, 0);
- mmi_uc_entry_processing_generic();
- result = mmi_uc_create_mms_xml_description_file();
- if (result == FS_NO_ERROR)
- {
- mmi_uc_create_mms_req();
- }
- else
- {
- if (result == FS_DISK_FULL)
- {
- DisplayPopup(
- (PU8)GetString(STR_UC_STORAGE_FULL_DELETE_FILE_ID),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- else
- {
- DisplayPopup(
- (PU8)GetString(GetFileSystemErrorString(result)),
- IMG_GLOBAL_UNFINISHED,
- 1,
- MMI_UC_POPUP_TIME_OUT,
- (U8) ERROR_TONE);
- }
- DeleteScreenIfPresent(SCR_ID_UC_PROCESSING);
- /* reset state */
- g_uc_p->send_info.action = MMI_UC_ACTION_IDLE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_send_mms
- * DESCRIPTION
- * Send MMS msg
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_send_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_uc_p->send_info.percent = 0;
- mmi_uc_entry_sending_mms();
- mmi_uc_send_mms_req(FALSE, 0);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_send_and_save_mms
- * DESCRIPTION
- * Send MMS msg
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_send_and_save_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_uc_p->send_info.percent = 0;
- mmi_uc_entry_sending_mms();
- mmi_uc_send_mms_req(TRUE, 0);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_save_mms
- * DESCRIPTION
- * Send SMS msg
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_save_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_uc_set_processing_screen(
- STR_GLOBAL_SAVING,
- STR_UC_PLEASE_WAIT_ID,
- IMG_GLOBAL_PROGRESS,
- 0);
- mmi_uc_entry_processing_generic();
- mmi_uc_save_mms_req(g_uc_p->send_info.new_msg_id, MMA_FOLDER_DRAFT);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_entry_sending_mms
- * DESCRIPTION
- * Entry function of sending MMS msg
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_entry_sending_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_UC_SENDING, NULL, mmi_uc_entry_sending_mms, NULL);
- ShowCategory402Screen(
- (U8 *) GetString(STR_UC_SENDING_MMS_ID),
- 0,
- 0,
- 0,
- STR_GLOBAL_ABORT,
- IMG_GLOBAL_BACK,
- (U8 *) GetString(STR_UC_PLEASE_WAIT_ID),
- g_uc_p->send_info.percent,
- NULL);
- GetCurrEndKeyDownHandler();
- ClearInputEventHandler(MMI_DEVICE_ALL);
- ClearKeyHandler(KEY_END, KEY_EVENT_UP);
- ClearKeyHandler(KEY_END, KEY_EVENT_DOWN);
- ClearKeyHandler(KEY_END, KEY_LONG_PRESS);
- ClearKeyHandler(KEY_END, KEY_REPEAT);
- SetKeyHandler(mmi_uc_abort_send_mms_by_end_key, KEY_END, KEY_EVENT_DOWN);
- SetRightSoftkeyFunction(mmi_uc_abort_send_mms, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_update_sending_mms_percent
- * DESCRIPTION
- * Update percent of sending MMS msg
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_update_sending_mms_percent(U16 percent)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetExitScrnID() == SCR_ID_UC_SENDING)
- {
- if(percent != g_uc_p->send_info.percent)
- {
- g_uc_p->send_info.percent = percent;
- UpdateCategory402Value((U16)percent, NULL);
- }
- }
- else
- {
- g_uc_p->send_info.percent = percent;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_uc_abort_send_mms
- * DESCRIPTION
- * Abort sending MMS by RSK
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_uc_abort_send_mms(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_uc_p->send_info.abort = MMI_UC_ABORT_NORMAL;