static void i51EntryI51Check(void) { // author : Miki // since : 2011.12.2 // (C) PKIG Tech. Co., Ltd. #if( I51_MTK_VS == VS_11B_1224 ) if( GetActiveScreenId() != SCR_ID_ALERT_0 ) #else if( GetActiveScreenId() != SCR_CONFIRM_SCREEN ) #endif { gui_cancel_timer( i51EntryI51Check ); } else if( i51KernelGetInitStatus() == i51_KERNEL_INIT_SUCCEED ) { gui_cancel_timer(i51EntryI51Check); if(l_EntyMenuFnPtr) l_EntyMenuFnPtr(); } else { if(i51KernelGetInitStatus() == i51_KERNEL_INIT_FAILED && l_BootWaited ) i51KernelInit(0); gui_start_timer( 1000, i51EntryI51Check ); } }
/***************************************************************************** * FUNCTION * mmi_java_terminate_dialog_yes_hdlr * DESCRIPTION * Handler Function: revoked when select "YES" in "TERMINATE" dialog * PARAMETERS * void * RETURNS * void *****************************************************************************/ static void mmi_java_terminate_dialog_yes_hdlr(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if (mmi_java_highlight_index == 0) /* pause */ { jvm_enter_pause_mode(); DeleteScreenIfPresent(SCR_JAVA_APP_MIDS_OPTION); DeleteScreenIfPresent(SCR_JAVA_APP_OPTION_SELECT); DeleteScreenIfPresent(SCR_JAVA); } else /* terminate */ { jvm_pause_state_exit(); mmi_java_entry_terminating(MMI_FALSE); } if(GetActiveScreenId() == SCR_JAVA_TERMINATE_DIALOG) { GoBackHistory(); } else { DeleteScreenIfPresent(SCR_JAVA_TERMINATE_DIALOG); } }
iBOOL i51CurrScreenIsI51(void) { #if( I51_MTK_VS >= VS_11B_1212 ) MMI_ID ParentScreen,Currentscreen; mmi_frm_get_active_scrn_id(&ParentScreen,&Currentscreen); return Currentscreen == I51_SCREEN_ID ; #else return GetActiveScreenId() == I51_SCREEN_ID ; #endif }
/***************************************************************************** * FUNCTION * mmi_brw_pre_entry_recent_page_list * DESCRIPTION * This func is used for sorting the recent pages by most visited order * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_brw_pre_entry_recent_page_list(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ U32 index; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if(g_brw_cntx.sorting_method == WAP_BAM_RECENT_PAGE_SORT_OPTION_HOST) { mmi_brw_recent_pages_create_host_list(); if(GetActiveScreenId() == SCR_ID_BRW_BUSY_SCREEN) { mmi_brw_entry_recent_page_host_list(); mmi_brw_delete_busy_screen(); } else { HistoryReplace(SCR_ID_BRW_BUSY_SCREEN, SCR_ID_BRW_RECENT_PAGES_HOST, mmi_brw_entry_recent_page_host_list); } } else { for(index=0; index<g_brw_cntx.dynamic_list_count; index++) { g_brw_cntx.recent_page_list[index].actual_index = index; } g_brw_cntx.recent_page_count = g_brw_cntx.dynamic_list_count; if(GetActiveScreenId() == SCR_ID_BRW_BUSY_SCREEN) { mmi_brw_entry_recent_page_list(); mmi_brw_delete_busy_screen(); } else { HistoryReplace(SCR_ID_BRW_BUSY_SCREEN, SCR_ID_BRW_RECENT_PAGES, mmi_brw_entry_recent_page_list); } } }
/*************************************************************************** * All Local Function Definitions ***************************************************************************/ void jWap_endDispHandler (ST_BE_END_PAGE_INFO* pstCallbackInfo) { mmi_trace (1, "JDD_LOG: jWap_endDispHandler rCode [%X], eStatus [%d], rPageStatusCode [%X], bRequestPending [%d]", -pstCallbackInfo->rCode, pstCallbackInfo->eStatus, -pstCallbackInfo->rPageStatusCode, pstCallbackInfo->bRequestPending) ; /* See whether Authorization Info is set */ if (g_pstJWapAppInfo->pstFetchReq) { DisplayPopupCallBack((PU8)GetString(STR_ID_WAP_AUTHORIZATION), IMG_GLOBAL_INFO, 1, \ 3000, 1, jWap_showAuthUserNameScreen); //Last argument is tone id. 1 = ERROR tone } else if (!pstCallbackInfo->stNavg.bBackNavigation && GetActiveScreenId() == SCR_ID_WAP_HOMEPAGE_SCREEN) { /* This is the first page. Remove LSK */ ClearKeyHandler (KEY_RSK, KEY_EVENT_DOWN) ; ChangeRightSoftkey (0, 0) ; ChangeLeftSoftkey (STR_GLOBAL_OPTIONS, 0) ; SetLeftSoftkeyFunction (jWap_options_handler, KEY_EVENT_UP) ; ChangeTitleIcon (IMG_ID_JATAAYU_WAP_END_ANIMATION_GIF) ; draw_title () ; } else if(GetActiveScreenId() == SCR_ID_WAP_HOMEPAGE_SCREEN) { /* There are more than 1 page. Set to "Back" */ ChangeRightSoftkey (STR_GLOBAL_BACK, 0) ; SetRightSoftkeyFunction (jWap_back, KEY_EVENT_UP); ChangeLeftSoftkey (STR_GLOBAL_OPTIONS, 0) ; SetLeftSoftkeyFunction (jWap_options_handler, KEY_EVENT_UP) ; ChangeTitleIcon (IMG_ID_JATAAYU_WAP_END_ANIMATION_GIF) ; draw_title () ; } }
INT jWap_beginDispHandler () { /* Disable LSK when fetching is in progress */ if(GetActiveScreenId() == SCR_ID_WAP_HOMEPAGE_SCREEN) { ClearKeyHandler (KEY_LSK, KEY_EVENT_DOWN) ; ChangeLeftSoftkey (0, 0) ; /* Set RSK to cancel */ ChangeRightSoftkey (STR_GLOBAL_CANCEL, KEY_EVENT_UP) ; SetRightSoftkeyFunction (jWap_priMmi_cancel_handler, KEY_EVENT_UP) ; ChangeTitleIcon (IMG_ID_JATAAYU_WAP_ANIMATION_GIF) ; draw_title(); } return (JC_OK) ; }
static void i51CheckPlatQuit(void) { // author : Miki // since : 2011.8.30 // (C) PKIG Tech. Co., Ltd. #if( I51_MTK_VS >= VS_11B_1212 ) MMI_ID ParentScreen,Currentscreen; mmi_frm_get_active_scrn_id(&ParentScreen,&Currentscreen); if (Currentscreen != I51_SCREEN_ID ) { if(!mmi_frm_group_is_present(I51_GROUP_ID))//!mmi_frm_scrn_is_present(I51_GROUP_ID,I51_SCREEN_ID,MMI_FRM_NODE_EXCLUDE_ACTIVE_SCRN_FLAG) )//!IsScreenPresent (I51_SCREEN_ID) )//2??úàúê·?á???D { if(l_InI51) { i51AdeOsLog( 0, "PORT : i51CheckPlatQuit , check find NoneScreen's i51"); i51KernelExit( i51_KERNEL_EXIT_DAP ); } } else { gui_start_timer( 100, i51CheckPlatQuit ); } } #else if ( GetActiveScreenId() != I51_SCREEN_ID )//不是当前屏幕 { if( !IsScreenPresent (I51_SCREEN_ID) )//不在历史屏幕中 { if(l_InI51) { i51AdeOsLog( 0, "PORT : i51CheckPlatQuit , check find NoneScreen's i51"); i51KernelExit( i51_KERNEL_EXIT_DAP ); } } else { gui_start_timer( 100, i51CheckPlatQuit ); } } #endif }
/***************************************************************************** * FUNCTION * mmi_java_is_in_voice_call * DESCRIPTION * this function use to detect taht current have voice call or not * PARAMETERS * void * RETURNS * MMI_TRUE or MMI_FALSE *****************************************************************************/ BOOL mmi_java_is_in_voice_call(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ if( AlmIsTonePlaying()) { return MMI_TRUE; } if ( isInCall() == MMI_TRUE ) { /* wap call connecting => true wap call connected => false other call connecting/connected => true */ if( GetWapCallPresent() ) { return MMI_FALSE; } else { return MMI_TRUE; } } else { if (GetActiveScreenId()==GetCmMarkerScrnID() || IsScreenPresent(GetCmMarkerScrnID())) { /* special case here, sometimes CM change state too early but still have call marker in the history */ return MMI_TRUE; } return MMI_FALSE; } }
/***************************************************************************** * FUNCTION * mmi_java_force_terminate_dialog_no_hdlr * DESCRIPTION * Handle Function: revoked when select "NO" in "FORCE TERMINATE" dialog * PARAMETERS * void * RETURNS * void *****************************************************************************/ static void mmi_java_cb_terminate_dialog_no_hdlr(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_java_terminate_cb(MMI_FALSE); if( GetActiveScreenId() == SCR_JAVA_TERMINATE_DIALOG2) { GoBackHistory(); } else { DeleteScreenIfPresent(SCR_JAVA_TERMINATE_DIALOG2); } }
/***************************************************************************** * FUNCTION * mmi_java_force_terminate_dialog_yes_hdlr * DESCRIPTION * Handle Function: revoked when select "YES" in "FORCE TERMINATE" dialog * PARAMETERS * void * RETURNS * void *****************************************************************************/ static void mmi_java_force_terminate_dialog_yes_hdlr(void) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ jvm_pause_state_exit(); mmi_java_entry_terminating(MMI_FALSE); if(GetActiveScreenId() == SCR_JAVA_FORCE_TERMINATE_DIALOG) { GoBackHistory(); } else { DeleteScreenIfPresent(SCR_JAVA_FORCE_TERMINATE_DIALOG); } }
iBOOL i51PortReleaseFrontEnd () { // author : Jelo // since : 2011.10.19 // (C) PKIG Tech. Co., Ltd. #if( I51_MTK_VS >= VS_11B_1212 ) MMI_ID ParentScreen,Currentscreen; #endif i51AdeOsLog(i51_LOG_SC, "PORT : i51PortReleaseFrontEnd , Release Front-End S"); l_InI51 = iFALSE; #if( I51_MTK_VS >= VS_11B_1212 ) mmi_frm_get_active_scrn_id(&ParentScreen,&Currentscreen); if( Currentscreen == I51_SCREEN_ID ) { GoBackHistory(); } if( mmi_frm_group_is_present(I51_GROUP_ID)) { mmi_frm_group_close(I51_GROUP_ID); } #else if( GetActiveScreenId() == I51_SCREEN_ID ) GoBackHistory(); if( IsScreenPresent (I51_SCREEN_ID) )//在历史屏幕中 DeleteScreenIfPresent (I51_SCREEN_ID); #endif i51ExitDo(); i51AdeOsLog(i51_LOG_SC, "PORT : i51PortReleaseFrontEnd , Release Front-End E"); return iTRUE ; }
/***************************************************************************** * FUNCTION * ShowCategory626Screen * DESCRIPTION * Displays the category626 screen (Tab List menu with description ) * PARAMETERS * title [IN] Title for the screen * title_icon [IN] Icon displayed with the title * left_softkey [IN] Left softkey label * left_softkey_icon [IN] Left softkey icon * right_softkey [IN] Right softkey label * right_softkey_icon [IN] Right softkey icon * number_of_items [IN] Number of items in the menu * list_of_items [IN] Array of items * list_of_icons [IN] Array of icons * list_of_descriptions [IN] Array of Pop up description strings * flags [IN] Flags (see explanation below) * highlighted_item [IN] Default item to be highlighted (if there is no history) * n_tabs [IN] * highlighted_tab [IN] * tab_items [IN] * history_buffer [IN] History buffer * RETURNS * void *****************************************************************************/ void ShowCategory626Screen( U8 *title, U16 title_icon, U16 left_softkey, U16 left_softkey_icon, U16 right_softkey, U16 right_softkey_icon, S32 number_of_items, U8 **list_of_items, U16 *list_of_icons, U8 **list_of_descriptions, S32 flags, S32 highlighted_item, S8 highlighted_tab, U8 *history_buffer) { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ dm_data_struct dm_data; S32 i; U8 h_flag; S32 shortcut_width; S8 n_tabs; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ gdi_layer_lock_frame_buffer(); /* Show Tab bars */ mmi_frm_get_tab_bar_items(MMI_tab_bar_items, &n_tabs); cat626_tab_num = n_tabs; if (n_tabs) { wgui_create_horizontal_tab_bar(TRUE, (UI_string_type)title, n_tabs, highlighted_tab, MMI_FALSE); } /* Softkeys */ set_left_softkey_label((UI_string_type)GetString(left_softkey)); set_left_softkey_icon((PU8)GetImage(left_softkey_icon)); set_right_softkey_label((UI_string_type)GetString(right_softkey)); set_right_softkey_icon((PU8)GetImage(right_softkey_icon)); SetupCategoryKeyHandlers(); /* Show List */ create_fixed_icontext_menuitems(); associate_fixed_icontext_list(); MMI_current_menu_type = LIST_MENU; register_fixed_list_keys(); if (n_tabs) { resize_fixed_list(MMI_CONTENT_WIDTH_WITH_H_TAB, MMI_CONTENT_HEIGHT_WITH_H_TAB); move_fixed_list(MMI_CONTENT_X_WITH_H_TAB, MMI_CONTENT_Y_WITH_H_TAB); } else { MMI_title_string = (UI_string_type)title; MMI_title_icon = (PU8)GetImage(title_icon); resize_fixed_list(MMI_content_width, MMI_content_height); move_fixed_list(MMI_content_x, MMI_content_y); } register_fixed_list_highlight_handler(standard_list_highlight_handler); if (list_of_descriptions == NULL) { for (i = 0; i < number_of_items; i++) { add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i])); wgui_pop_up_description_strings[i].text_strings[0] = NULL; } } else { for (i = 0; i < number_of_items; i++) { add_fixed_icontext_item((UI_string_type) list_of_items[i], wgui_get_list_menu_icon(i, list_of_icons[i])); wgui_pop_up_description_strings[i].text_strings[0] = (UI_string_type) list_of_descriptions[i]; } } h_flag = set_list_menu_category_history(MMI_CATEGORY626_ID, history_buffer); #ifdef __MMI_UI_HINTS_IN_MENUITEM__ if (list_of_descriptions != NULL) { S32 hints = 0; for (i = 0; i < number_of_items; i++) { if (wgui_pop_up_description_strings[i].text_strings[0]) { hints = 1; break; } } if (hints) { if (is_set_force_icon_on_highlight_only_in_menuitem()) { wgui_show_icon_only_highlight_in_icontext_menuitem(); } if (is_set_force_all_hints_in_menuitem()) { wgui_enable_hints_in_icontext_menuitem(); } else if (is_set_force_hints_on_highlight_in_menuitem()) { wgui_enable_hint_highlight_in_icontext_menuitem(); } else { wgui_enable_hint_highlight_in_icontext_menuitem(); } set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item); #ifdef __MMI_UI_LIST_HIGHLIGHT_EFFECTS__ gui_block_list_effect(); #endif } } #endif /* __MMI_UI_HINTS_IN_MENUITEM__ */ if (h_flag) { fixed_list_goto_item_no_redraw(MMI_fixed_list_menu.highlighted_item); } else { fixed_list_goto_item_no_redraw(highlighted_item); } MMI_title_string = (UI_string_type) title; MMI_title_icon = (PU8) get_image(title_icon); set_pop_up_descriptions(1, number_of_items, MMI_fixed_list_menu.highlighted_item); /* Setup (hidden) menu shortcut. */ MMI_menu_shortcut_number = highlighted_item + 1; register_fixed_list_shortcut_handler(); shortcut_width = set_menu_item_count(number_of_items) + 7; if (n_tabs) { resize_menu_shortcut_handler(shortcut_width, MMI_HORIZONTAL_TAB_BAR_HINT_AREA_HEIGHT); move_menu_shortcut_handler( MMI_HORIZONTAL_TAB_BAR_X + MMI_HORIZONTAL_TAB_BAR_WIDTH - MMI_menu_shortcut_box.width, MMI_HORIZONTAL_TAB_BAR_Y + MMI_HORIZONTAL_TAB_BAR_TAB_AREA_HEIGHT); register_hide_menu_shortcut(wgui_show_horizontal_tab_bar_hint_area); } else { resize_menu_shortcut_handler(shortcut_width, MMI_title_height); move_menu_shortcut_handler(MMI_title_x + MMI_title_width - MMI_menu_shortcut_box.width, MMI_title_y); register_hide_menu_shortcut(gui_redraw_menu_shortcut); } gdi_layer_unlock_frame_buffer(); ExitCategoryFunction = ExitCategory626Screen; dm_setup_category_functions(dm_redraw_category_screen, dm_get_category_history, dm_get_category_history_size); dm_data.s32ScrId = (S32) GetActiveScreenId(); dm_data.s32CatId = MMI_CATEGORY626_ID; dm_data.s32flags = 0; dm_setup_data(&dm_data); dm_redraw_category_screen(); }
/***************************************************************************** * FUNCTION * mmi_brw_new_push_msg_ind_on_idlescreen * DESCRIPTION * Entry Function to display screen for push message arrived indication * on idle-screen. * PARAMETERS * void * RETURNS * void *****************************************************************************/ void mmi_brw_new_push_msg_ind_on_idlescreen(void) /* added by puneet */ { /*----------------------------------------------------------------*/ /* Local Variables */ /*----------------------------------------------------------------*/ S8 buf[4] = {0}; S8 pOutBuffer[8] = {0}; S8 message_string[40] = {0}; U32 brw_total_msg_count = 0; U32 brw_unread_msg_count = 0; /*----------------------------------------------------------------*/ /* Code Body */ /*----------------------------------------------------------------*/ mmi_brw_get_push_statistics(&brw_total_msg_count, &brw_unread_msg_count); if (SCR_ID_BRW_NEW_PUSH_MESSAGE_IND == GetActiveScreenId()) { DeleteNHistory(1); } if (0 == brw_unread_msg_count) { DisplayIdleScreen(); return; } if (brw_unread_msg_count < 10) { sprintf(buf, "%01d", brw_unread_msg_count); } else { sprintf(buf, "%02d", brw_unread_msg_count); } mmi_asc_to_ucs2(pOutBuffer, buf); mmi_ucs2cpy((S8*) message_string, pOutBuffer); mmi_ucs2cat((S8*) message_string, " "); mmi_ucs2cat((S8*) message_string, GetString(STR_ID_BRW_SERVICE_MESSAGE_RCVD)); EntryNewScreen(SCR_ID_BRW_NEW_PUSH_MESSAGE_IND, NULL, mmi_brw_new_push_msg_ind_on_idlescreen, NULL); ShowStatusIcon(STATUS_ICON_WAP); if (0 == g_keylock_context.gKeyPadLockFlag) { /* * ShowCategory154Screen( * 0, * 0, * STR_ID_BRW_READ, * IMG_GLOBAL_YES, * STR_GLOBAL_BACK, * IMG_GLOBAL_BACK, * (PU8) message_string, * 0, * IMG_NEW_MESSAGE_NOTIFICATION_MSG, * NULL); */ /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */ ShowCategory66Screen( 0, 0, STR_ID_BRW_READ, IMG_GLOBAL_YES, STR_GLOBAL_BACK, IMG_GLOBAL_BACK, (PU8) message_string, IMG_NEW_MESSAGE_NOTIFICATION_MSG, NULL); g_mmi_brw_cntx.push_msg_rcvd_flag = MMI_FALSE; if (1 == brw_unread_msg_count) { SetLeftSoftkeyFunction(mmi_brw_read_arrived_push_message, KEY_EVENT_UP); } else { SetLeftSoftkeyFunction(mmi_brw_entry_service_inbox, KEY_EVENT_UP); } SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP); } else /* Keypad is locked */ { extern void EntryScrAfterPessingRSK(void); #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) extern void EntryScrKeyPadLockOnPessingAnyKey(void); #endif /* * ShowCategory154Screen( * 0, * 0, * g_keylock_context.KeyLockLSKStringID, * g_keylock_context.KeyLockLSKIconID, * g_keylock_context.KeyLockRSKStringID, * g_keylock_context.KeyLockRSKIconID, * (PU8) message_string, * 0, * IMG_NEW_MESSAGE_NOTIFICATION_MSG, * NULL); */ /* Modified by vikas lal - 29032007 Category 154 will be replaced(By Category 66) here for text wraping */ ShowCategory66Screen( 0, 0, g_keylock_context.KeyLockLSKStringID, g_keylock_context.KeyLockLSKIconID, g_keylock_context.KeyLockRSKStringID, g_keylock_context.KeyLockRSKIconID, (PU8) message_string, IMG_NEW_MESSAGE_NOTIFICATION_MSG, NULL); #if defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) SetGroupKeyHandler( EntryScrKeyPadLockOnPessingAnyKey, (PU16) PresentAllKeys, (U8) TOTAL_KEYS, (U16) KEY_EVENT_DOWN); #endif /* defined(__MMI_KEYPAD_LOCK_PROMPT_TEXT__) */ #ifdef __MMI_TOUCH_SCREEN__ #ifdef __MMI_KEYPAD_LOCK_PROMPT_TEXT__ #ifdef __MMI_KEYPAD_LOCK_PATTERN_1__ SetRightSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN); #endif #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ SetLeftSoftkeyFunction(EntryScrKeyPadLockOnPessingAnyKey, KEY_EVENT_DOWN); #endif #else /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */ ClearKeyHandler(KEY_LSK, KEY_EVENT_DOWN); ClearKeyHandler(KEY_LSK, KEY_EVENT_UP); ClearKeyHandler(KEY_RSK, KEY_EVENT_DOWN); ClearKeyHandler(KEY_RSK, KEY_EVENT_UP); #endif /* __MMI_KEYPAD_LOCK_PROMPT_TEXT__ */ SetKeyHandler(EntryScrAfterPessingRSK, KEY_SEND, KEY_EVENT_DOWN); #else /* __MMI_TOUCH_SCREEN__ */ #ifdef __MMI_KEYPAD_LOCK_PATTERN_1__ SetRightSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN); #endif #ifdef __MMI_KEYPAD_LOCK_PATTERN_2__ SetLeftSoftkeyFunction(EntryScrAfterPessingRSK, KEY_EVENT_DOWN); #endif #endif /* __MMI_TOUCH_SCREEN__ */ ClearKeyHandler(KEY_END, KEY_EVENT_DOWN); #ifdef __MMI_TOUCH_SCREEN__ mmi_idle_pen_block(); #endif } }
/*! \brief Receive external signals. * \param srcModule Source module calling SMA. * \param signal The signal to handle * \param p Buffer containing signal data *****************************************************************************/ void smaReceiveExtSignal(MSF_UINT8 srcModule, MSF_UINT16 signal, void* p) { SmaResult result = SMA_RESULT_OK; /* default value */ SmaPlayerInfo *playerInfo = getPlayerInfo(); msf_pipe_notify_t *pn; /* Check if the package handler consumes this signal */ if (smaPhHandleSignal(signal, p)) { MSF_SIGNAL_DESTRUCT(MSF_MODID_SMA, signal, p); return; } switch (signal) { case MSF_SIG_MODULE_TERMINATE: MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_64DF14BF763210DD0A80CAC97376D79A, "SMA: received " "signal MSF_SIG_MODULE_TERMINATE\n")); /* terminate the smil service */ TERMINATE_SMIL_PLAYER(SMA_RESULT_OK, SMA_TERM_SLS); break; case MSF_SIG_MODULE_STATUS: { /* received module status */ msf_module_status_t *str = (msf_module_status_t*)p; MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_1EF6140BB17115F56C0DA84954D37D63, "SMA: received " "signal MSF_SIG_MODULE_STATUS\n")); /* handle the received module status */ if ( !handleModuleStatus(str->status, str->modId)) { /* SMA Should terminate */ TERMINATE_SMIL_PLAYER(SMA_RESULT_OK, SMA_TERM_DIE); } else { if (!smaIsInitialized()) { initializeSma(); } setSlsIsRunnig( TRUE); } /* if */ break; } case MSF_SIG_FILE_NOTIFY: if (!smaIsRunning()) { /* sma is not currently initialized and running, skip this signal */ break; } /* if */ (void)SMA_SIGNAL_SENDTO_IU(SMA_FSM_ASYNC, SMA_SIG_ASYNC_NOTIFY, ((msf_file_notify_t *)p)->eventType, (MSF_UINT32)((msf_file_notify_t *)p)->fileHandle); break; case MSF_SIG_PIPE_NOTIFY: pn = (msf_pipe_notify_t *)p; (void)SMA_SIGNAL_SENDTO_UU(SMA_FSM_PIPE, SMA_SIG_PIPE_NOTIFY, (MSF_UINT32)pn->handle, pn->eventType); break; case SMA_SIG_PLAY_SMIL_REQ: { SmaPlaySmilReq *message = (SmaPlaySmilReq *)p; MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_1598B625D5F178196E24C2351EC3C290, "SMA: received " "signal SMA_SIG_PLAY_SMIL\n")); if ( smaIsRunning()) { sendResult(srcModule, SMA_RESULT_BUSY); } else { if (!smaIsInitialized()) { initializeSma(); } setSmaIsRunning(TRUE); setSlsIsRunnig(TRUE); playerInfo->msgId = message->msgId; playerInfo->sourceModule = srcModule; playerInfo->fileType = message->fileType; #ifdef __UNIFIED_MSG_SUPPORT__ { MmsMsgHandle m_handle; /* MmsMessage */ MmsTransactionHandle t_handle; MmsGetHeader header; if (MMSlib_transactionOpen(MSF_MODID_SMA, &t_handle) != MMS_RESULT_OK) { EXIT_SMIL_PLAYER(SMA_RESULT_ERROR); break; } else if (MMSlib_messageOpen(MSF_MODID_SMA, playerInfo->msgId, fldrGetFileSuffix(playerInfo->msgId), &m_handle) != MMS_RESULT_OK) { (void)MMSlib_transactionClose(MSF_MODID_SMA, &t_handle); EXIT_SMIL_PLAYER(SMA_RESULT_ERROR); break; } if(MMSlib_getMessageHeader(MSF_MODID_SMA, &header, &m_handle, &t_handle) != MMS_RESULT_OK) { (void)MMSlib_messageClose(MSF_MODID_SMA, &m_handle); (void)MMSlib_transactionClose(MSF_MODID_SMA, &t_handle); EXIT_SMIL_PLAYER(SMA_RESULT_ERROR); break; } (void)MMSlib_messageClose(MSF_MODID_SMA, &m_handle); (void)MMSlib_transactionClose(MSF_MODID_SMA, &t_handle); playerInfo->folder = fldrGetFolderId(playerInfo->msgId); playerInfo->recipientNo = smaAddressCount(header.to) + smaAddressCount(header.cc) + smaAddressCount(header.bcc); playerInfo->forwardLock = header.forwardLock; } #endif result = createGUI(); if (result == SMA_RESULT_OK) { /* now open the smil message */ if (SLS_RESULT_OK != SLSif_openSmil( MSF_MODID_SMA, playerInfo->msgId, playerInfo->fileType)) { MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_E652292EA5F3061C01A3EA1C9DC63C89, "SMA: SLS_openSmil failed\n")); result = SMA_RESULT_ERROR; EXIT_SMIL_PLAYER(result); } /* if */ } /* if */ } /* if */ break; } #ifdef __UNIFIED_COMPOSER_SUPPORT__ case MMA_SIG_START_UC_RSP: { mma_uc_start_rsp_struct *rsp = (mma_uc_start_rsp_struct *)p; MSF_LOG_MSG_ARGS((MSF_LOG_DETAIL_LOW, MSF_MODID_SMA, SASIG_65F4D4BF2E010DF6413C558633FCD04A, "SMA: received signal MMA_SIG_START_UC_RSP (%d, %d)\n", rsp->result, rsp->mode)); switch(rsp->result) { case MMA_RESULT_OK: EXIT_SMIL_PLAYER(SMA_RESULT_OK); HDIa_widgetExtDeleteWidgetScreenIfPresent(); #ifdef __UNIFIED_MESSAGE_LIST_OPTION_SUPPORT__ meaDeleteMhNavMenu(); /* not good but the only timing to do it here */ #endif #if defined(SMA_CFG_USER_TEMPLATE_SUPPORT) && defined(__UNIFIED_MSG_SUPPORT__) meaDeleteMhInst(); meaDeleteTemplatesFolderList(); #endif break; case MMA_RESULT_FAIL_IN_CALL: break; default: switch(rsp->mode) { case MMA_MODE_EDIT: HDIa_widgetExtShowPopup(MSF_MODID_SMA, SMA_GET_STR_ID(MEA_STR_ID_FAILED_TO_EDIT), MsfError, 0); break; case MMA_MODE_SEND: HDIa_widgetExtShowPopup(MSF_MODID_SMA, SMA_GET_STR_ID(MEA_STR_ID_FAILED_TO_SEND), MsfError, 0); break; case MMA_MODE_REPLY: case MMA_MODE_REPLY_ALL: HDIa_widgetExtShowPopup(MSF_MODID_SMA, SMA_GET_STR_ID(MEA_STR_ID_FAILED_TO_REPLY), MsfError, 0); break; case MMA_MODE_FORWARD: HDIa_widgetExtShowPopup(MSF_MODID_SMA, SMA_GET_STR_ID(MEA_STR_ID_FAILED_FORWARD), MsfError, 0); break; default: break; } break; } break; } #endif case MSF_SIG_WIDGET_ACTION: case MSF_SIG_WIDGET_NOTIFY: case MSF_SIG_WIDGET_USEREVT: { if (!smaIsRunning()) { /* sma is not currently initialized and running, skip this signal */ break; } /* if */ smaWidgetSignalHandler(signal, p); break; } case MSF_SIG_TIMER_EXPIRED: { msf_timer_expired_t *timer = (msf_timer_expired_t *)p; MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_6B6EC80873332B8FD117D82099D10579, "SMA: received " "signal MSF_SIG_TIMER_EXPIRED\n")); if (!smaIsRunning()) { /* sma is not currently initialized and running, skip this signal */ break; } /* if */ if (timer->timerID == SMA_SLIDE_TIMER_ID) { #ifdef WAP_SUPPORT MSF_BOOL stillHaveTime = displayCountDown(TRUE); if (GetActiveScreenId() != WAP_SCREEN_WIDGET) /* Interrupt happen*/ { result = stopSmil(getPlayerInfo()); break; } if (!stillHaveTime) { #endif /* WAP_SUPPORT */ #ifdef __UNIFIED_MESSAGE_MMS_MANUAL_PLAY__ SmaPlayerInfo * playerinfo = getPlayerInfo(); if ( !playerinfo->isAutoplay ) { result = stopSmil(playerinfo); } else { #endif /* Slide timer expired, show next slide */ result = displayNextSlide( getPlayerInfo()); if ( SMA_RESULT_OK != result) { /* unable to show next slide */ EXIT_SMIL_PLAYER(result); } /* if */ #ifdef __UNIFIED_MESSAGE_MMS_MANUAL_PLAY__ } #endif #ifdef WAP_SUPPORT } #endif /* WAP_SUPPORT */ } else if (timer->timerID == SMA_DIALOG_TIMER_ID && playerInfo->isPlaying) { /* Dialog timer expired, kill dialog screen */ widgetDeleteScreen(); } else if (timer->timerID == SMA_ACTION_IMAGE_TIMER_ID) { #ifndef WAP_SUPPORT /* Action Image timer expired, remove the action icon */ deleteStatusIconHandle(); #endif /* ~WAP_SUPPORT */ } /* if */ #if defined(SMA_GET_TEXT_TOTAL_HEIGHT) && defined(WIDGET_SLIDING_SMIL_VBAR) else if (timer->timerID == SMA_GET_TOTAL_TEXT_HEIGHT_TIMER_ID) { MSF_LOG_MSG_NOARG(( MSF_LOG_DETAIL_MEDIUM, MSF_MODID_SMA, SASIG_7206E2A049C3E38DEC709F5940C2CA47, "[TEXT HEIGHT] MEA_MOB_TEXT_HEIGHT_TIMER_ID\n")); (void)SMA_SIGNAL_SENDTO(SMA_FSM_SLIDE, SMA_SIG_GET_TOTAL_TEXT_HEIGHT_CONTINUE); } #endif break; } case MSF_SIG_MODULE_EXECUTE_COMMAND: { MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_24BC4A055B5792912076DD916105F069, "SMA: received " "signal MSF_SIG_MODULE_START\n")); /* starting SMIL Service */ MSF_MODULE_START(MSF_MODID_SMA, MSF_MODID_SLS, NULL, NULL, NULL); break; } case SLS_OPEN_SMIL_RSP: { /* Got some smile information */ SlsOpenSmilRsp *openSmilRsp = (SlsOpenSmilRsp *)p; MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_05237E33B3EDF7DA1B38D25576C9DEF3, "SMA: received " " signal SLS_OPEN_SMIL_RSP\n")); result = handleOpenSmilRsp( playerInfo, openSmilRsp); if ( result != SMA_RESULT_OK) { EXIT_SMIL_PLAYER(result); } /* if */ if ((result = createSlideForm()) != SMA_RESULT_OK) { EXIT_SMIL_PLAYER(result); } /* if */ break; } case SLS_GET_SLIDE_INFO_RSP: { /* Got some Slide information */ SlsGetSlideInfoRsp *rsp = (SlsGetSlideInfoRsp *)p; SmaSlideInfo *slide; if (!smaIsRunning()) { /* sma is not currently initialized and running, skip this signal */ break; } /* if */ slide = getSlideInfo( playerInfo->currentSlide, playerInfo); if ( rsp == NULL || slide == NULL || rsp->result != SLS_RESULT_OK) { MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_340FFD36EF830115392AF09C76385E40, "SMA: SLS " "failed to get slide info in SLS_GET_SLIDE_INFO_RSP\n")); EXIT_SMIL_PLAYER(SMA_RESULT_ERROR); } else { /* set slide data */ if ( SMA_RESULT_OK != handleGetSlideInfoRsp( &rsp->slideInfo, slide)) { /* error parsing slide information */ MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_13CC547BB252E76B64D8207F572BABB5, "SMA: \ failed to get parse info in SLS_GET_SLIDE_INFO_RSP\n")); EXIT_SMIL_PLAYER(SMA_RESULT_ERROR); } else { /* done with current slide */ if ( playerInfo->currentSlide < playerInfo->noOfSlides-1) { /* there is more slides */ /* allocate memory for next slide */ slide->next = SMA_ALLOC( sizeof( SmaSlideInfo)); memset( slide->next, 0x00, sizeof( SmaSlideInfo)); playerInfo->currentSlide++; /* get slide info for next slide */ if (SLSif_getSlideInfo( MSF_MODID_SMA, playerInfo->currentSlide) != SLS_RESULT_OK) { MSF_LOG_MSG_OFF((MSF_LOG_DETAIL_HIGH, MSF_MODID_SMA, SASIG_458B4FADEEB3814E0D63C4010CC1F807, "SMA: SLS_getSlideInfo failed\n")); result = SMA_RESULT_ERROR; } /* if */ } else { #if SLS_ALWAYS_VIEW_MAX_NBR_OF_SLIDES//==1 if(playerInfo->result == SLS_RESULT_TO_MANY_SLIDES) { handleSmaErr(SMA_RESULT_TO_MANY_SLIDES); } #endif /* no more slides - start playing */ (void)SLSif_closeSmil( MSF_MODID_SMA); playerInfo->currentSlide = 0; #ifdef __UNIFIED_MESSAGE_MMS_MANUAL_PLAY__ if ( playerInfo->isAutoplay ) result = playSmil( playerInfo); else { #ifdef __UNIFIED_MESSAGE_MANUAL_PLAY_SLIDE__ playerInfo->isPlaying = TRUE; updateSlideFormActions(playerInfo->isPlaying); #endif result = displayCurrentSlide( playerInfo); } #else result = playSmil( playerInfo); #endif #ifdef __UNIFIED_COMPOSER_SUPPORT__ if(MMA_IS_UNIFIED_COMPOSER_ACTIVE() == TRUE) /* SMA notify UC that it took over the screen */ { void *sig; sig = MSF_SIGNAL_CREATE (SMA_SIG_PLAY_SMIL_IND, MSF_MODID_SMA, playerInfo->sourceModule, 0); MSF_SIGNAL_SEND (sig); } #endif } /* if */ } /* if */ } break; }