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

📄 jmmswritemmsui.c

📁 MTK_MMI的部分源代码,从code中大致了解到MMI的执行流程
💻 C
📖 第 1 页 / 共 5 页
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2002
*
*****************************************************************************/

/*****************************************************************************
 *
 * Filename:
 * ---------
 *  jmms_write_mms_ui.C
 *
 * Project:
 * --------
 *  MAUI
 *
 * Description:
 * ------------
 *  This file contains the write mms ui and addresses addition,edit,deletion logics
 *
 * Author:
 * -------
 * -------
 *
 *============================================================================
 *             HISTORY
 * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *------------------------------------------------------------------------------
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 * removed!
 * removed!
 * removed!
 *
 *------------------------------------------------------------------------------
 * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
 *============================================================================
 ****************************************************************************/

/***************************************************************************** 
* Include
*****************************************************************************/

#include "MMI_features.h"
#if (defined (JATAAYU_SUPPORT) && defined(MMS_SUPPORT))

#include "PixtelDataTypes.h"
#include "Unicodexdcl.h"
#include "HistoryGprot.h"
#include "GlobalDefs.h"
#include "SettingProfile.h"
#include "DebugInitDef.h"
#include "CommonScreens.h"
#include "EventsGprot.h"
#include "wgui_inputs.h"
#include "wgui_categories.h"
#include "wgui_categories_inputs.h"

#include "MainMenuDef.h"
#include "JMMSConfig.h"
#include "JMMSMessageSettings.h"
#include "JMMSCoreAPI.h"
#include "JMMSDrafts.h"
#include "JMMSExdcl.h"
#include "JMMSCompose.h"
#include "JMMSGprot.h"
#include "JMMSInbox.h"
#include "JMMSJSRHandler.h"
#include "JMMSMainMMS.h"
#include "JMMSMessageSettingsUtils.h"
#include "JMMSOutbox.h"
#include "JMMSProtocols.h"
#include "JMMSPushHandling.h"
#include "JMMSResEnum.h"
#include "JMMSSent.h"
#include "JMMSStoreHandling.h"
#include "JMMSStructs.h"
#include "JMMSTemplates.h"
#include "JMMSUseDetails.h"
#include "JMMSView.h"
#include "JMMSWriteMMS.h"

#include "ddlbase.h"
#include "jcerror.h"
#include "jcevent.h"
#include "jcutils.h"
#include "jdi_MMSErr.h"
#include "MessagingDataTypes.h"
#include "jdd_memapi.h"
#include "MessagesResourceData.h"
#include "PhoneBookDef.h"
#include "PhoneBookGprot.h"
#include "miscutils.h"
#include "TimerEvents.h"
#include "MMI_features_camera.h"
#include "CameraResDefs.h"


#ifdef __MMI_UNIFIED_MESSAGE__
#include "JMMSUMHandling.h"
#include "UnifiedMessageDef.h"
#include "UnifiedMessageProt.h"
#include "FileManagerDef.h"
#endif /* __MMI_UNIFIED_MESSAGE__ */ 
#include "wapadp.h"  // compiler warning removal


/***************************************************************************** 
* Define
*****************************************************************************/

/***************************************************************************** 
* Typedef 
*****************************************************************************/

/***************************************************************************** 
* Local Variable
*****************************************************************************/

/***************************************************************************** 
* Local Function
*****************************************************************************/
static pBOOL mmi_jmms_get_item_data(S32 item_index, UI_string_type str_buff, PU8 *img_buff_p, U8 str_img_mask);

/***************************************************************************** 
* Global Variable
*****************************************************************************/

static U16 g_address_option_index;
static U16 g_address_list_right_soft_key = STR_GLOBAL_BACK;
static U8 g_hilite_address_item;

/***************************************************************************** 
* Global Function
*****************************************************************************/
extern void set_leading_zero(U8 u8type);
extern void EntryPhbFromMMSNumber(void);
extern void EntryPhbFromMMSEmail(void);
extern JC_RETCODE	IsMMSRestrictedMode(MESSAGING_HANDLER *pMessagingHandle, EContentClass eContentClass);  // COMPILER WARNING REMOVAL
extern MMI_BOOL is_add_media_as_drm;
/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_highlight_write_message
 * DESCRIPTION
 *  This function is the highlight handler of write message
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_highlight_write_message(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

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

}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_write_message_init
 * DESCRIPTION
 *  This function init the hilight handlers of write mms menu items.
 *  This is called at boot up time
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_write_message_init(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    /* options Highlight handlers */
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_ADD_NUMBER, mmi_jmms_highlight_write_mms_add_number);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_ADD_EMAIL, mmi_jmms_highlight_write_mms_add_email);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_EDIT, mmi_jmms_highlight_write_mms_edit);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DELETE, mmi_jmms_highlight_write_mms_delete);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DELETE_ALL, mmi_jmms_highlight_write_mms_delete_all);

    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SEND_ONLY, mmi_jmms_highlight_write_mms_done_send_only);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SAVE_AND_SEND, mmi_jmms_highlight_write_mms_done_save_and_send);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SAVE_TO_DRAFTS, mmi_jmms_highlight_write_mms_done_save_to_drafts);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_SEND_OPTIONS, mmi_jmms_highlight_write_mms_done_send_options);
    SetHiliteHandler(MENU_ID_JMMS_WRITE_MMS_DONE_EXIT, mmi_jmms_highlight_write_mms_done_exit);

}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_entry_write_message
 * DESCRIPTION
 *  This function is pre entry function for writing a new MMS
 *  new MMS
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_entry_write_message(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
	if(g_jmms_context->init_done == JMMS_READY_WITHOUT_STORE)
	{
        DisplayPopup((U8*) GetString(STR_ID_JMMS_MEMORY_FULL), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, (U8) ERROR_TONE);
		PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "JMMS: Store is not ready"));
        return;
	}
    g_jmms_context->g_use_local_send_setings = 0;
    g_jmms_context->store_context->current_folder_name = E_JMMS_WRITE_MMS;

    mmi_jmms_init_msg_context_struct(); /* this will different for different ways to come here */
/* MAUI_00227929 Start */
	mmi_jmms_fill_mms_sending_settings();			// sanjeev added for newly added setting structure.
/* MAUI_00227929 End */
    /* deepali */
    if (g_jmms_context->compose_context == NULL)
    {
        g_jmms_context->compose_context =
            (jmms_compose_context_struct*) jdd_MemAlloc(sizeof(jmms_compose_context_struct), 1);
        if (g_jmms_context->compose_context == NULL)
        {
            DisplayPopup((PU8) GetString(STR_ID_JMMS_OUT_OF_MEMORY), IMG_GLOBAL_ERROR, 1, JMMS_POPUP_TIME, ERROR_TONE);
            return;
        }
    }

    if (JMMS_COMP_OK == mmi_jmms_compose_new_mms())
    {
        mmi_jmms_entry_write_message_screen();
    }
}


/*****************************************************************************
 * FUNCTION
 *  mmi_jmms_init_msg_context_struct
 * DESCRIPTION
 *  This function is for initlizing the global context structure for writing a
 *  new MMS
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void mmi_jmms_init_msg_context_struct(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (g_jmms_context->msg_handle != NULL)
    {

⌨️ 快捷键说明

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