⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jmmssentui.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
	    mmi_jmms_jdi_get_current_page_index(g_jmms_context->msg_handle, &curr_page);
	g_jmms_context->edit_error_code=JC_OK;
#endif
#ifdef __DRM_SUPPORT__
    if (mmi_jmms_is_drm_fwd_lock_media_in_mms(g_jmms_context->msg_handle, E_TRUE) == E_TRUE)
    {
       return;
    }
#endif    
    g_jmms_context->g_use_local_send_setings = 1;  // sanjeev    5/1/07
    mmi_jmms_edit_message(MMI_JMMS_SENT);
#ifdef __MMI_UNIFIED_MESSAGE__	
	if(g_jmms_context->edit_error_code!=JC_OK && curr_page>1 && g_jmms_context->msg_handle)
	{
		gui_lock_double_buffer();
		mmi_jmms_jdi_view_event(g_jmms_context->msg_handle, E_VIEW_SET_ACTIVE_SLIDE, &curr_page);
		gui_unlock_double_buffer();
	}
#endif

}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_highlight_sent_options_save_object
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_highlight_sent_options_save_object(void)
{

    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
    SetLeftSoftkeyFunction(mmi_jmms_entry_save_object, KEY_EVENT_UP);
    SetKeyHandler(mmi_jmms_entry_save_object, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
    SetKeyHandler(mmi_jmms_entry_save_object, KEY_WAP, KEY_EVENT_DOWN);
}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_highlight_sent_options_forward
 * DESCRIPTION
 *  highlight hdlr of view menu item in Inbox options
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_highlight_sent_options_forward(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ChangeLeftSoftkey(STR_GLOBAL_OK, IMG_GLOBAL_OK);
    SetLeftSoftkeyFunction(mmi_jmms_sent_forward, KEY_EVENT_UP);
    SetKeyHandler(mmi_jmms_sent_forward, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
    SetKeyHandler(mmi_jmms_sent_forward, KEY_WAP, KEY_EVENT_DOWN);
}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_sent_forward
 * DESCRIPTION
 *  
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
extern void mmi_jmms_sent_forward_async_callback(JC_RETCODE eRet);

void mmi_jmms_sent_forward(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    U8 number = 0;
    JC_RETCODE eRet = JC_OK;
    ECreationMode create_mode;

    /* CONTENT_DATA Content = {0, }; */
#ifndef __MMI_UNIFIED_MESSAGE__			
      MSG_HANDLE hTempMsg = NULL;
	  S32 len = 0;
#else
	  U8 curr_page = 0;
#endif

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    number = g_jmms_context->store_context->nMsgs_in_Current_folder;
#ifndef __MMI_UNIFIED_MESSAGE__
    eRet = jdi_MsgInit(&hTempMsg, NULL);
    if (JC_OK != eRet)
    {
        mmi_jmms_error_handler(eRet);
        goto END;
    }

    if (g_jmms_context->pParseContent != NULL)
    {
        jdd_MemFree(g_jmms_context->pParseContent);
        g_jmms_context->pParseContent = NULL;
    }

    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;
    eRet = mmi_jmms_get_message(
            "Sent",
            g_jmms_context->pParseContent,
            (number - g_jmms_context->nCurr_scr_hilited_index));

    if (eRet != JC_OK)
    {
        mmi_jmms_error_handler(eRet);
        goto END;
    }

    if (g_jmms_context->msg_handle != NULL)
    {
        eRet = mmi_jmms_jdi_msg_deinit(g_jmms_context->msg_handle);
        g_jmms_context->msg_handle = NULL;
    }

    mmi_jmms_parsing_progressing_screen();

    eRet = mmi_jmms_jdi_msg_forward(hTempMsg, g_jmms_context->pParseContent, &(g_jmms_context->msg_handle));
    if (hTempMsg != NULL)
    {
        mmi_jmms_jdi_msg_deinit(hTempMsg);
        hTempMsg = NULL;
    }

    if (eRet == JC_ERR_MMS_PARSE_PENDING)
    {
        mmi_jmms_parse_continue_start_timer(g_jmms_context->msg_handle, mmi_jmms_sent_forward_async_callback, mmi_jmms_only_abort_parsing_progress);
        return;
    }
#else
    create_mode = mmi_jmms_compose_settings_creation_mode();

    if(IsMMSRestrictedMode(g_jmms_context->msg_handle, MMS_SUPPORTED_CONTENT_CLASS) != JC_OK)
    {
        if(create_mode == E_CREATION_MODE_RESTRICTED)
        {
            DisplayPopup(
                (PU8) GetString(STR_ID_JMMS_MMS_ERR_RESTRICTED_CONTENT_CLASS),
                IMG_GLOBAL_ERROR,
                1,
                JMMS_POPUP_TIME,
                ERROR_TONE);
            return;
        }
        else if(create_mode == E_CREATION_MODE_WARNING)
        {
            g_jmms_context->is_add_media_warning = 1;
        }
		if(g_jmms_context->msg_handle)
		{
			mmi_jmms_jdi_get_current_page_index(g_jmms_context->msg_handle, &curr_page);
		}
	}
		g_jmms_context->edit_error_code=JC_OK;
		eRet= mmi_jmms_jdi_preforwardheader(&g_jmms_context->msg_handle);	// Forward parsing
		if(eRet != JC_OK)
		{
			mmi_jmms_error_handler(eRet);
			if(curr_page>1 && g_jmms_context->msg_handle)
			{
				gui_lock_double_buffer();
				mmi_jmms_restore_view_callbacks();
				mmi_jmms_jdi_view_event(g_jmms_context->msg_handle, E_VIEW_SET_ACTIVE_SLIDE, &curr_page);
				gui_unlock_double_buffer();
			}
			goto END;
		}

#endif 
    
    mmi_jmms_sent_forward_async_callback(eRet);
#ifdef __MMI_UNIFIED_MESSAGE__	
	if(g_jmms_context->edit_error_code!=JC_OK && curr_page>1 && g_jmms_context->msg_handle)
	{
		gui_lock_double_buffer();
		mmi_jmms_restore_view_callbacks();
		mmi_jmms_jdi_view_event(g_jmms_context->msg_handle, E_VIEW_SET_ACTIVE_SLIDE, &curr_page);
		gui_unlock_double_buffer();
	}
#endif
    return;  
END:
    // TODO:: need to check whether this is to do or not
#ifndef __MMI_UNIFIED_MESSAGE__

    if (g_jmms_context->pParseContent != NULL)
    {
        if (g_jmms_context->pParseContent->pFileName != NULL)
        {
            jdd_MemFree(g_jmms_context->pParseContent->pFileName);
        }
        jdd_MemFree(g_jmms_context->pParseContent);
        g_jmms_context->pParseContent = NULL;
    }
    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;
    }
#endif 

    g_jmms_context->is_add_media_warning = 0;
    DeleteScreenIfPresent(SCR_ID_JMMS_PROGRESS);    /* sachin to ask */
}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_sent_forward_async_callback
 * DESCRIPTION
 *  
 * PARAMETERS
 *  eRet        [IN]        
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_sent_forward_async_callback(JC_RETCODE eRet)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MESSAGE_HEADERS *pMsgHeaders = NULL;
    MESSAGE_SEND *send_p = NULL;
    S32 len = 0;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (eRet != JC_OK)
    {
        mmi_jmms_error_handler(eRet);
        goto END;
    }
    if (mmi_jmms_is_corrupted_video_media_in_mms(g_jmms_context->msg_handle) == E_TRUE)
    {
        eRet =-1;
        goto END;
    }
    eRet = mmi_jmms_jdi_msg_register_callback(g_jmms_context->msg_handle, E_CB_ERROR_IND, (void*)mmi_jmms_error_ind_cb);
    if (eRet != JC_OK)
    {
        mmi_jmms_error_handler(eRet);
        goto END;
    }

    eRet = mmi_jmms_jdi_set_content_class(g_jmms_context->msg_handle, E_MMS_CONTENT_CLASS_VIDEO_BASIC);
    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_set_max_pages(g_jmms_context->msg_handle, (U8) mmi_jmms_compose_settings_max_no_pages());
    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;
    }

    if (pMsgHeaders->eMsgType != E_MSG_TYPE_SEND)
    {
        DisplayPopup((U8*) GetString(STR_GLOBAL_ERROR), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
        goto END;
    }

    send_p = (MESSAGE_SEND*) (pMsgHeaders->pHeaders);

    mmi_jmms_free_addresses_list();

    /* /Make the subject buffer */
    memset(g_jmms_context->subject_input_buffer, 0x00, (MAX_SUBJECT_LENGTH + 1) * ENCODING_LENGTH);
    if (send_p->pSubject != NULL)
    {

        len = (pfnUnicodeStrlen((S8*) (send_p->pSubject))) * ENCODING_LENGTH;

        if (len > (MAX_SUBJECT_LENGTH * ENCODING_LENGTH))
        {
            memcpy(g_jmms_context->subject_input_buffer, send_p->pSubject, (MAX_SUBJECT_LENGTH * ENCODING_LENGTH));
        }
        else
        {
            memcpy(g_jmms_context->subject_input_buffer, send_p->pSubject, len);
        }

    }

    g_jmms_context->g_write_mms_right_soft_key = STR_GLOBAL_DONE;

    /* PMT VIKAS START 20060405 */
    mmi_jmms_set_fw_flag_of_message();
    /* PMT VIKAS END 20060405 */
//    g_jmms_context->g_use_local_send_setings = 0;
/* MAUI_00227929 Start */
		g_jmms_context->g_use_local_send_setings = 1;
		mmi_jmms_fill_mms_sending_settings();        
/* MAUI_00227929 End */

    if (g_jmms_context->is_add_media_warning == 0)
    {
        mmi_jmms_entry_write_message_screen();
    }
    else
    {
        DisplayPopupCallBack(
            (PU8) GetString(STR_ID_JMMS_MMS_ERR_WARNING_CONTENT_CLASS),
            IMG_GLOBAL_WARNING,
            1,
            JMMS_POPUP_TIME,
            WARNING_TONE,
            mmi_jmms_entry_write_message_screen);
    }

  END:

    // TODO:: need to check whether this is to do or not
#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_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -