JBrowserStartup.c
资源名称:mmi.rar [点击查看]
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:223k
源码类别:
MTK
开发平台:
C/C++
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_brw_page_cntx.brw_PageStatusCodeStack[1] = E_BROWSER_FETCH_BEGIN;
- mmi_brw_show_animated_title();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_page_fetch_terminated
- * DESCRIPTION
- * It handle the page fetch terminated status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_page_fetch_terminated(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN)
- {
- mmi_brw_show_normal_title();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_page_rendering_begin
- * DESCRIPTION
- * It handle the page rendering begin status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_page_rendering_begin(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_brw_page_cntx.brw_PageStatusCodeStack[2] = E_BROWSER_RENDERING_BEGIN;
- // if(mmi_brw_is_animated_title() == MMI_FALSE)
- // {
- mmi_brw_show_animated_title();
- // }
- g_brw_page_cntx.brw_pageRenderStatus = 1;
- /* Added By Shantanu -20060810 */
- /* We will reset the manual refresh flag so that the user can enter the fullscreen editor
- when rendering is started.We will check this flag while entering the editor screen */
- mmi_jdd_ui_set_jdd_flag(JDD_MANUAL_REFRESH_FLAG, E_FALSE);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_page_rendering_terminated
- * DESCRIPTION
- * It handle the page rendering terminated status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_page_rendering_terminated(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_page_refresh_begin
- * DESCRIPTION
- * It handle the page refresh begin status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_page_refresh_begin(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #ifdef __MMI_JDD_UI_DRAW_IMAGE_ON_TIMER_EVENT__
- MMI_JDD_UI_WINDOW_INFO_STRUCT *jdd_window_info_struct_p = NULL;
- JC_UINT32 uiWindowID = 0;
- #endif /* __MMI_JDD_UI_DRAW_IMAGE_ON_TIMER_EVENT__ */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!(g_brw_page_cntx.brw_PageFetchStatus||g_brw_page_cntx.brw_isRefreshDisplay))
- {
- g_brw_LskLabel = 0;
- g_brw_RskLabel = STR_GLOBAL_CANCEL;
- g_brw_LskFunPtr = NULL;
- g_brw_RskFunPtr = NULL;
- g_brw_page_cntx.brw_PageRefreshDispStatus = 1;
- #ifdef __MMI_JDD_UI_DRAW_IMAGE_ON_TIMER_EVENT__
- uiWindowID = mmi_jdd_ui_get_appWindowID(E_TASK_BROWSER_CORE);
- jdd_window_info_struct_p = (MMI_JDD_UI_WINDOW_INFO_STRUCT*) uiWindowID;
- if (jdd_window_info_struct_p != NULL)
- {
- mmi_jdd_ui_flush_image_display_queue(uiWindowID);
- }
- #endif /* __MMI_JDD_UI_DRAW_IMAGE_ON_TIMER_EVENT__ */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_page_refresh_terminated
- * DESCRIPTION
- * It handle the page refresh terminated status
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_page_refresh_terminated(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (!(g_brw_page_cntx.brw_PageFetchStatus||g_brw_page_cntx.brw_isRefreshDisplay))
- {
- g_brw_LskLabel = STR_GLOBAL_OPTIONS;
- g_brw_LskFunPtr = mmi_brw_rendered_page_options;
- g_brw_RskLabel = 0;
- g_brw_RskFunPtr = NULL;
- if (E_TRUE == mmi_brw_is_back())
- {
- g_brw_RskLabel = STR_GLOBAL_BACK;
- g_brw_RskFunPtr = mmi_brw_goto_prev_page;
- }
- g_brw_page_cntx.brw_PageRefreshDispStatus = 0;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_pageupdate_callback
- * DESCRIPTION
- * It handle the when there is no page status update from core
- * PARAMETERS
- * pAppArg [?]
- * bIsScriptAbort [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_pageupdate_callback(void *pAppArg, JC_BOOLEAN bIsScriptAbort)
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "mmi_brw_pageupdate_callback() called"));
- if(g_brw_page_cntx.brw_PageFetchStatus)
- {
- return;/*If page status callback has alredy been called then return*/
- }
- if(bIsScriptAbort)
- {
- if (GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN)
- {
- mmi_brw_show_normal_title();
- }
- if (E_TRUE == mmi_brw_is_back())
- {
- g_brw_LskLabel = STR_GLOBAL_OPTIONS;
- g_brw_RskLabel = STR_GLOBAL_BACK;
- g_brw_LskFunPtr = mmi_brw_rendered_page_options;
- g_brw_RskFunPtr = mmi_brw_goto_prev_page;
- }
- else
- {
- g_brw_LskLabel = STR_GLOBAL_OPTIONS;
- g_brw_RskLabel = 0;
- g_brw_LskFunPtr = mmi_brw_rendered_page_options;
- g_brw_RskFunPtr = NULL;
- }
- g_brw_page_cntx.brw_PageFetchStatus = 0;
- jdi_BrowserResumeMarqueeTimer(pBrowserCtxt);
- memset(g_brw_page_cntx.brw_PageStatusCodeStack, -1, sizeof(g_brw_page_cntx.brw_PageStatusCodeStack));
- jdi_BrowserHistorySave(pBrowserCtxt);
- }
- if (GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN)
- {
- right_softkey_up();
- left_softkey_up();
- mmi_brw_clear_key_handler(KEY_LSK);
- mmi_brw_clear_key_handler(KEY_RSK);
- ChangeRightSoftkey(g_brw_RskLabel, 0);
- ChangeLeftSoftkey(g_brw_LskLabel, 0);
- SetLeftSoftkeyFunction((FuncPtr) g_brw_LskFunPtr, KEY_EVENT_UP);
- SetRightSoftkeyFunction((FuncPtr) g_brw_RskFunPtr, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_page_status_callback
- * DESCRIPTION
- * Rendering status callback
- * PARAMETERS
- * pAppArg [?]
- * eBrowserStatusCode [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_page_status_callback(void *pAppArg, E_BROWSER_STATUS_CODE eBrowserStatusCode)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(!((GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN) || IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN)))
- {
- if(eBrowserStatusCode == E_BROWSER_PAGE_REQUEST_TERMINATED)
- {
- g_brw_page_cntx.brw_cancel_flag = 0;
- g_brw_page_cntx.brw_pageRenderStatus = 0;
- g_brw_page_cntx.brw_PageFetchStatus = 0;
- memset(g_brw_page_cntx.brw_PageStatusCodeStack, -1, sizeof(g_brw_page_cntx.brw_PageStatusCodeStack));
- jdi_BrowserHistorySave(pBrowserCtxt);
- }
- return;
- }
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s(%d)", "Page status calbk called with status",
- eBrowserStatusCode));
- if (eBrowserStatusCode == E_BROWSER_PAGE_REQUEST_BEGIN)
- {
- mmi_brw_handle_page_request_begin();
- }
- else if (eBrowserStatusCode == E_BROWSER_PAGE_REQUEST_TERMINATED)
- {
- mmi_brw_handle_page_request_terminated();
- }
- else if (eBrowserStatusCode == E_BROWSER_FETCH_BEGIN)
- {
- mmi_brw_handle_page_fetch_begin();
- }
- else if (eBrowserStatusCode == E_BROWSER_FETCH_TERMINATED)
- {
- mmi_brw_handle_page_fetch_terminated();
- }
- else if (eBrowserStatusCode == E_BROWSER_RENDERING_BEGIN)
- {
- mmi_brw_handle_page_rendering_begin();
- }
- else if (eBrowserStatusCode == E_BROWSER_RENDERING_TERMINATED)
- {
- mmi_brw_handle_page_rendering_terminated();
- }
- else if (eBrowserStatusCode == E_BROWSER_PAGE_REFRESH_BEGIN)
- {
- mmi_brw_handle_page_refresh_begin();
- }
- else if (eBrowserStatusCode == E_BROWSER_PAGE_REFRESH_TERMINATED)
- {
- mmi_brw_handle_page_refresh_terminated();
- }
- else
- {
- /* assert should fail */
- }
- if (GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN)
- {
- right_softkey_up();
- left_softkey_up();
- mmi_brw_clear_key_handler(KEY_LSK);
- mmi_brw_clear_key_handler(KEY_RSK);
- ChangeRightSoftkey(g_brw_RskLabel, 0);
- ChangeLeftSoftkey(g_brw_LskLabel, 0);
- SetLeftSoftkeyFunction((FuncPtr) g_brw_LskFunPtr, KEY_EVENT_UP);
- SetRightSoftkeyFunction((FuncPtr) g_brw_RskFunPtr, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_rendering_status_callback
- * DESCRIPTION
- * Rendering status callback
- * PARAMETERS
- * pAppArg [?]
- * eRenderStatus [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_rendering_status_callback(void *pAppArg, ERenderingStatus eRenderStatus)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /*
- * S32 iwidth =0;
- * S32 iheight =0;
- * nvram_wap_profile_content_struct *activated_wap_profile;
- * if(E_FALSE == mmi_brw_is_browser_window_active())
- * {
- * return;
- * }
- *
- * if( eRenderStatus == E_RENDERING_STARTED )
- * {
- * activated_wap_profile = mmi_ph_get_activated_wap_profile();
- *
- */ /* Free the DO list for the last rendered page */
- /* mmi_brw_free_do_list(); */
- /*
- * if(mmi_ph_check_data_account_type(activated_wap_profile->data_account) == PH_DATA_ACCOUNT_CSD)
- * {
- * MMI_title_icon = (PU8)get_image(IMG_ID_BRW_CONNECTION_STATUS_CSD);
- * }
- * else if(mmi_ph_check_data_account_type(activated_wap_profile->data_account) == PH_DATA_ACCOUNT_GPRS)
- * {
- * MMI_title_icon = (PU8)get_image(IMG_ID_BRW_CONNECTION_STATUS_GPRS);
- * }
- * else
- * {
- * // Error
- * }
- *
- * if(MMI_title_icon!=NULL)
- * {
- * gui_measure_image(MMI_title_icon,&iwidth,&iheight);
- * }
- *
- * draw_title();
- *
- * _MMI_animated_icon_x = MMI_title_x+1;
- * _MMI_animated_icon_y = MMI_title_y+((MMI_title_height>>1)-(iheight>>1));
- *
- * if(mmi_ph_check_data_account_type(activated_wap_profile->data_account) == PH_DATA_ACCOUNT_CSD)
- * {
- * _MMI_animated_icon = (PU8)get_image(IMG_ID_BRW_CONNECTION_STATUS_CSD);
- * }
- * else if(mmi_ph_check_data_account_type(activated_wap_profile->data_account) == PH_DATA_ACCOUNT_GPRS)
- * {
- * _MMI_animated_icon = (PU8)get_image(IMG_ID_BRW_CONNECTION_STATUS_GPRS);
- * }
- * else
- * {
- * // Error
- * }
- *
- * //PMT VIKAS START 20060515
- * // wgui_show_transparent_animation();
- * gdi_image_draw_animation_file(_MMI_animated_icon_x, _MMI_animated_icon_y, (PS8)_MMI_animated_icon, &g_brw_icon_handle);
- * //PMT VIKAS END 20060515
- *
- * ChangeLeftSoftkey(0,0);
- * ChangeRightSoftkey(STR_GLOBAL_CANCEL,0);
- * SetRightSoftkeyFunction(mmi_brw_stop_fetch,KEY_EVENT_UP);
- * }
- * else if(eRenderStatus == E_RENDERING_TERMINATED)
- * {
- * //PMT VIKAS START 20060515
- * // All animation should not stop at this stage.
- * // gui_hide_animations();
- * gdi_image_stop_animation(g_brw_icon_handle);
- * //PMT VIKAS END 20060515
- * MMI_title_icon = (PU8)get_image(GetRootTitleIcon(SERVICES_WAP_MENU_ID));
- * if(mmi_brw_is_browser_window_active())//temp added by tk
- * {
- * draw_title();
- * }
- *
- * if(E_TRUE == mmi_brw_is_back())
- * {
- * ChangeRightSoftkey(STR_GLOBAL_BACK,0);
- * SetRightSoftkeyFunction(mmi_brw_goto_prev_page,KEY_EVENT_UP);
- *
- * ChangeLeftSoftkey(STR_GLOBAL_OPTIONS,0);
- * SetLeftSoftkeyFunction(mmi_brw_rendered_page_options,KEY_EVENT_UP);
- * }
- * else
- * {
- * if(cancel_flag)
- * {
- * GoBackHistory();
- * }
- * else
- * {
- * ChangeRightSoftkey(0,0);
- *
- * ChangeLeftSoftkey(STR_GLOBAL_OPTIONS,0);
- * SetLeftSoftkeyFunction(mmi_brw_rendered_page_options,KEY_EVENT_UP);
- * }
- * }
- *
- * jdi_BrowserHistorySave(pBrowserCtxt);
- * cancel_flag = 0;
- * }
- * else
- * {
- */ /* assert should fail */
- /* } */
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_goto_prev_page
- * DESCRIPTION
- * Fetch the previous page from history
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_goto_prev_page(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE iRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* Free the DO List for last rendered page */
- mmi_brw_free_do_list();
- iRet = jdi_BrowserBack(pBrowserCtxt);
- if (JC_OK != iRet)
- {
- /* Error */
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_exit_brw_page
- * DESCRIPTION
- * Exit from browser screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_exit_brw_page(void)
- {
- mmi_brw_entry_exit_menu();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_stop_fetch
- * DESCRIPTION
- * Fetch stop event
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_stop_fetch(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE iRet = JC_OK;
- JC_EVENT_DATA eventData = {0, };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* send browser start up event */
- eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- /* eventData.pEventInfo = NULL ; */
- eventData.uiEventInfoSize = 0;
- eventData.iEventType = E_BRW_STOP_FETCH_EVENT;
- iRet = jdd_QueueSend(&eventData);
- g_brw_page_cntx.brw_cancel_flag = 1;
- /* This variable was set when we try to fetch a page through EnterAddress Option
- screen. Reset this flag to 0 when page fetch was cancelled as depending on this
- core will set the title in EnterAddress Title history. */
- g_brw_add_hist_flag = 0;
- if (JC_OK != iRet)
- {
- return;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_show_authentication_callback
- * DESCRIPTION
- * Show authentication handler callback.
- * PARAMETERS
- * pAppArg [?]
- * pmURL [?]
- * RETURNS
- * void
- *****************************************************************************/
- JC_RETCODE mmi_brw_show_authentication_callback(void *pAppArg, JC_AUTH_INDICATION *pAuthIndication)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (E_FALSE == mmi_brw_is_browser_window_active())
- {
- return JC_OK;
- }
- if(pAuthIndication->pcHeaders == NULL)
- {
- jdd_MMINotificationMessage(JC_ERR_AUTH_METHOD_INVALID, E_NOTIFICATION_ERR, NULL, NULL);
- return JC_ERR_USER_CANCELLED;
- }
- /* Himanshu: Clear the username and password buffer while entering authentication screen */
- memset(g_brw_cntx.brw_auth_username, 0, sizeof(g_brw_cntx.brw_auth_username));
- memset(g_brw_cntx.brw_auth_password, 0, sizeof(g_brw_cntx.brw_auth_password));
- mmi_brw_entry_auth_handler();
- return JC_OK;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_do_tag_callback
- * DESCRIPTION
- * Do tag_ handler callback
- * PARAMETERS
- * pAppArg [?]
- * pDoList [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_do_tag_callback(void *pAppArg, JC_DO_LIST *pDoList)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_DO_LIST *pTempDoList;
- S32 count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (E_FALSE == mmi_brw_is_browser_window_active())
- {
- return;
- }
- /* Free the DO List for last rendered page */
- mmi_brw_free_do_list();
- if (NULL != pDoList)
- {
- mmi_brw_copy_linked_list(pDoList, &pTempDoList);
- if (NULL == pTempDoList)
- {
- jdd_MMINotificationMessage((JC_INT32) JC_ERR_MEMORY_ALLOCATION, E_NOTIFICATION_ERR, NULL, NULL);
- return;
- }
- g_brw_cntx.do_element_count = mmi_brw_get_do_element_count(pTempDoList);
- }
- if (g_brw_cntx.do_element_count != 0)
- {
- g_brw_cntx.DoElementList = (JC_DO_LIST **) jdd_MemAlloc(g_brw_cntx.do_element_count, sizeof(JC_DO_LIST*));
- if (NULL == g_brw_cntx.DoElementList)
- {
- mmi_brw_free_duplicate_do_list(&pTempDoList);
- jdd_MMINotificationMessage((JC_INT32) JC_ERR_MEMORY_ALLOCATION, E_NOTIFICATION_ERR, NULL, NULL);
- return;
- }
- while (NULL != pTempDoList)
- {
- g_brw_cntx.DoElementList[count] = pTempDoList;
- pTempDoList = pTempDoList->pNext;
- count++;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_get_do_element_count
- * DESCRIPTION
- * Function to get the number of do elements on the page
- * PARAMETERS
- * pTempDoList [?]
- * RETURNS
- * void
- *****************************************************************************/
- U16 mmi_brw_get_do_element_count(JC_DO_LIST *pTempDoList)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U16 Count = 0;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (NULL != pTempDoList)
- {
- Count++;
- pTempDoList = pTempDoList->pNext;
- }
- return (Count);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_free_duplicate_do_list
- * DESCRIPTION
- * Free the memory assign to the duplecate link list.
- * PARAMETERS
- * pTempDoList [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_free_duplicate_do_list(JC_DO_LIST **pTempDoList)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_DO_LIST *temp_p = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- while (NULL != *pTempDoList)
- {
- if (NULL != (*pTempDoList)->pDoLabel)
- {
- jdd_MemFree((*pTempDoList)->pDoLabel);
- (*pTempDoList)->pDoLabel = NULL;
- }
- if (NULL != (*pTempDoList)->pDoType)
- {
- jdd_MemFree((*pTempDoList)->pDoType);
- (*pTempDoList)->pDoType = NULL;
- }
- temp_p = *pTempDoList;
- *pTempDoList = (*pTempDoList)->pNext;
- jdd_MemFree(temp_p);
- temp_p = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_copy_linked_list
- * DESCRIPTION
- * Function to make a copy of the linked list
- * PARAMETERS
- * pDoList [?]
- * pTempDoList [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_copy_linked_list(JC_DO_LIST *pDoList, JC_DO_LIST **pTempDoList)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_DO_LIST *temp_p = NULL;
- JC_DO_LIST *temp_do_node_p = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- *pTempDoList = NULL;
- while (NULL != pDoList)
- {
- temp_do_node_p = (JC_DO_LIST*) jdd_MemAlloc(1, sizeof(JC_DO_LIST));
- if (NULL == temp_do_node_p)
- {
- mmi_brw_free_duplicate_do_list(pTempDoList);
- return;
- }
- temp_do_node_p->pDoElement = pDoList->pDoElement;
- temp_do_node_p->pDoLabel = (JC_CHAR*) jdi_UtilsTcsDup(pDoList->pDoLabel);
- if (NULL == temp_do_node_p->pDoLabel)
- {
- mmi_brw_free_duplicate_do_list(pTempDoList);
- return;
- }
- temp_do_node_p->pDoType = (JC_CHAR*) jdi_UtilsTcsDup(pDoList->pDoType);
- if (NULL == temp_do_node_p->pDoType)
- {
- mmi_brw_free_duplicate_do_list(pTempDoList);
- return;
- }
- if (NULL == *pTempDoList)
- {
- *pTempDoList = temp_do_node_p;
- temp_p = *pTempDoList;
- }
- else
- {
- temp_p->pNext = temp_do_node_p;
- temp_p = temp_p->pNext;
- }
- pDoList = pDoList->pNext;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_confirm_callback
- * DESCRIPTION
- * set confirm callback
- * PARAMETERS
- * pAppArg [?]
- * pmMsg [?]
- * pmSoft1 [?]
- * pmSoft2 [?]
- * cbConfirm [IN]
- * pCBArg [?]
- * peStatus [?]
- * RETURNS
- * void
- *****************************************************************************/
- JC_RETCODE mmi_brw_set_confirm_callback(
- void *pAppArg,
- JC_CHAR *pmMsg,
- JC_CHAR *pmSoft1,
- JC_CHAR *pmSoft2,
- BROWSER_CONFIRM_CB cbConfirm,
- void *pCBArg,
- JC_BOOLEAN *peStatus)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_INT32 iStrLen = 0;
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (E_FALSE == mmi_brw_is_browser_window_active())
- {
- return eRet;
- }
- if ((NULL != pmMsg) && ((iStrLen = jc_tcslen(pmMsg)) > 0))
- {
- g_pmMsg = pmMsg;
- }
- else
- {
- *peStatus = E_FALSE;
- return JC_ERR_INVALID_PARAMETER;
- }
- gCallBackConfirm = cbConfirm;
- pArg = pCBArg;
- DisplayConfirm(0, 0, 0, 0, (UI_string_type) g_pmMsg, IMG_GLOBAL_QUESTION, 0);
- if (!pmSoft1) /* added by pawan 31-07-06 for default confirm soft keys */
- {
- pmSoft1 = (U16*) GetString(STR_GLOBAL_OK);
- }
- if (!pmSoft2)
- {
- pmSoft2 = (U16*) GetString(STR_GLOBAL_CANCEL);
- }
- ChangeLeftSoftkeyByString((UI_string_type) pmSoft1, NULL);
- ChangeRightSoftkeyByString((UI_string_type) pmSoft2, NULL);
- SetLeftSoftkeyFunction(mmi_brw_confirm_msg_LSK_hdlr, KEY_EVENT_UP);
- SetRightSoftkeyFunction(mmi_brw_confirm_msg_RSK_hdlr, KEY_EVENT_UP);
- g_brw_page_cntx.brw_PageFetchStatus = 0;
- eRet = JC_ERR_WAIT_USER_ACTION;
- return eRet;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_confirm_msg_LSK_hdlr
- * DESCRIPTION
- * LSK handler for confirm screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_confirm_msg_LSK_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GoBackHistory();
- gCallBackConfirm(pArg, E_TRUE);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_confirm_msg_RSK_hdlr
- * DESCRIPTION
- * RSK handler for confirm screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_confirm_msg_RSK_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GoBackHistory();
- gCallBackConfirm(pArg, E_FALSE);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_alert_callback
- * DESCRIPTION
- * Set alert callback
- * PARAMETERS
- * pAppArg [?]
- * pmMsg [?]
- * cbAlert [IN]
- * pCBArg [?]
- * RETURNS
- * void
- *****************************************************************************/
- JC_RETCODE mmi_brw_set_alert_callback(void *pAppArg, JC_CHAR *pmMsg, BROWSER_ALERT_CB cbAlert, void *pCBArg)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_INT32 iStrLen = 0;
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (E_FALSE == mmi_brw_is_browser_window_active())
- {
- return eRet;
- }
- if ((NULL != pmMsg) && ((iStrLen = jc_tcslen(pmMsg)) > 0))
- {
- g_pmMsg = pmMsg;
- }
- else
- {
- return JC_ERR_INVALID_PARAMETER;
- }
- gCallBackAlert = cbAlert;
- pArg = pCBArg;
- mmi_brw_entry_alert_callback_screen();
- g_brw_page_cntx.brw_PageFetchStatus = 0;
- eRet = JC_ERR_WAIT_USER_ACTION;
- return eRet;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_entry_alert_callback_screen
- * DESCRIPTION
- * Entry function for alert callback.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_entry_alert_callback_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_BRW_WAP_ALERT_SCREEN, NULL, mmi_brw_entry_alert_callback_screen, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_WAP_ALERT_SCREEN);
- ShowCategory165Screen(
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- (UI_string_type) g_pmMsg,
- IMG_GLOBAL_QUESTION,
- guiBuffer);
- SetLeftSoftkeyFunction(mmi_brw_alert_msg_LSK_hdlr, KEY_EVENT_UP);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_alert_msg_LSK_hdlr
- * DESCRIPTION
- * LSK handler for alert callback
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_alert_msg_LSK_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- GoBackHistory();
- gCallBackAlert(pArg);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_prompt_callback
- * DESCRIPTION
- * Prompt callback handler
- * PARAMETERS
- * pAppArg [?]
- * pmMsg [?]
- * pmDefaultValue [?]
- * cbPrompt [IN]
- * pCBArg [?]
- * ppmMsg [IN]
- * peStatus [?]
- * RETURNS
- * void
- *****************************************************************************/
- /* PROMPT CALLBACK */
- JC_RETCODE mmi_brw_set_prompt_callback(
- void *pAppArg,
- JC_CHAR *pmMsg,
- JC_CHAR *pmDefaultValue,
- BROWSER_PROMPT_CB cbPrompt,
- void *pCBArg,
- JC_CHAR **ppmMsg,
- JC_BOOLEAN *peStatus)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_INT32 iStrLen = 0;
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (E_FALSE == mmi_brw_is_browser_window_active())
- {
- return eRet;
- }
- if ((NULL != pmMsg) && ((iStrLen = jc_tcslen(pmMsg)) > 0) && (NULL != ppmMsg))
- {
- g_pmMsg = pmMsg;
- if (pmDefaultValue)
- {
- g_pmDefaultValue = (JC_CHAR *)jdd_MemAlloc(pfnUnicodeStrlen((S8*) pmDefaultValue)+1, sizeof(JC_CHAR));
- if(NULL != g_pmDefaultValue)
- {
- pfnUnicodeStrcpy((S8*) g_pmDefaultValue, (S8*) pmDefaultValue);
- }
- }
- else
- {
- g_pmDefaultValue = NULL;
- }
- }
- else
- {
- *peStatus = E_FALSE;
- return JC_ERR_INVALID_PARAMETER;
- }
- gCallBackPrompt = cbPrompt;
- pArg = pCBArg;
- mmi_brw_entry_prompt_callback_screen();
- eRet = JC_ERR_WAIT_USER_ACTION;
- return eRet;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_entry_prompt_callback_screen
- * DESCRIPTION
- * Entry function for prompt callback.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_entry_prompt_callback_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U32 msgLen = 0;
- U8 *guiBuffer = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_BRW_WAP_PROMPT_INPUT_SCREEN, NULL, mmi_brw_entry_prompt_callback_screen, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_WAP_PROMPT_INPUT_SCREEN);
- msgLen = pfnUnicodeStrlen((S8*) g_pmMsg);
- /* added by pawan 31-07-06 for dialoge input box */
- ShowCategory74Screen(
- STR_ID_BRW_PROMPT_MESSAGE,
- GetRootTitleIcon(SERVICES_WAP_MENU_ID),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- (PU8) g_pmMsg,
- msgLen,
- guiBuffer);
- SetLeftSoftkeyFunction(mmi_brw_pre_entry_prompt_callback_editor_screen, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_pre_entry_prompt_callback_editor_screen
- * DESCRIPTION
- * Pre entry screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_pre_entry_prompt_callback_editor_screen(void)
- {
- g_brw_cntx.prompt_buffer = jdd_MemAlloc((MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD + 1) * ENCODING_LENGTH, 1);
- if (NULL != g_brw_cntx.prompt_buffer)
- {
- memset(g_brw_cntx.prompt_buffer, 0, (MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD + 1) * ENCODING_LENGTH);
- if (g_pmDefaultValue != NULL)
- {
- pfnUnicodeStrncpy((S8*) g_brw_cntx.prompt_buffer, (S8*) g_pmDefaultValue,MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD);
- }
- if(g_pmDefaultValue)
- {
- jdd_MemFree(g_pmDefaultValue);
- g_pmDefaultValue = NULL;
- }
- }
- mmi_brw_entry_prompt_callback_editor_screen();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_entry_prompt_callback_editor_screen
- * DESCRIPTION
- * LSK handler for prompt callback.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_entry_prompt_callback_editor_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- U8 *guiBuffer = NULL;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_BRW_WAP_PROMPT_EDITOR_SCREEN, NULL, mmi_brw_entry_prompt_callback_editor_screen, NULL);
- guiBuffer = GetCurrGuiBuffer(SCR_ID_BRW_WAP_PROMPT_EDITOR_SCREEN);
- /* g_brw_cntx.prompt_buffer = jdd_MemAlloc((MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD + 1) * ENCODING_LENGTH, 1);
- if (NULL != g_brw_cntx.prompt_buffer)
- {
- memset(g_brw_cntx.prompt_buffer, 0, (MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD + 1) * ENCODING_LENGTH);
- if (g_pmDefaultValue != NULL)
- {
- pfnUnicodeStrcpy((S8*) g_brw_cntx.prompt_buffer, (S8*) g_pmDefaultValue);
- }
- if(g_pmDefaultValue)
- {
- jdd_MemFree(g_pmDefaultValue);
- g_pmDefaultValue = NULL;
- }
- }
- */
- ShowCategory5Screen(
- STR_GLOBAL_EDIT,
- GetRootTitleIcon(SERVICES_WAP_MENU_ID),
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- STR_GLOBAL_CANCEL,
- 0,
- INPUT_TYPE_ALPHANUMERIC_SENTENCECASE,
- (PU8) g_brw_cntx.prompt_buffer,
- MMI_JDD_UI_MAX_INPUT_LEN_FOR_ENABLED_INPUT_METHOD,
- guiBuffer);
- SetCategory5RightSoftkeyFunction(mmi_brw_prompt_msg_RSK_hdlr, KEY_EVENT_UP); //pawan 28/10/2006
- SetLeftSoftkeyFunction(mmi_brw_prompt_msg_LSK_hdlr, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_prompt_msg_RSK_hdlr
- * DESCRIPTION
- * LSK handler for prompt callback.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_prompt_msg_RSK_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DeleteScreenIfPresent(SCR_ID_BRW_WAP_PROMPT_INPUT_SCREEN);
- GoBackHistory();
- gCallBackPrompt(pArg, g_pmDefaultValue, E_FALSE);
- if (g_brw_cntx.prompt_buffer != NULL)
- {
- jdd_MemFree(g_brw_cntx.prompt_buffer);
- g_brw_cntx.prompt_buffer = NULL;
- }
- if(g_pmDefaultValue)
- {
- jdd_MemFree(g_pmDefaultValue);
- g_pmDefaultValue = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_prompt_msg_LSK_hdlr
- * DESCRIPTION
- * LSK handler for prompt callback.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_prompt_msg_LSK_hdlr(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- DeleteScreenIfPresent(SCR_ID_BRW_WAP_PROMPT_INPUT_SCREEN);
- GoBackHistory();
- gCallBackPrompt(pArg, g_brw_cntx.prompt_buffer, E_TRUE);
- if (g_brw_cntx.prompt_buffer != NULL)
- {
- jdd_MemFree(g_brw_cntx.prompt_buffer);
- g_brw_cntx.prompt_buffer = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_page_info_callback
- * DESCRIPTION
- * Set page info callback.
- * PARAMETERS
- * pAppArg [?]
- * pPageInfo [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_set_page_info_callback(void *pAppArg, JC_PAGE_INFO *pPageInfo)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_progress_status_callback
- * DESCRIPTION
- * Progress status callback.
- * PARAMETERS
- * pAppArg [?]
- * pProgressInd [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_progress_status_callback(void *pAppArg, COMM_PROGRESS_IND *pProgressInd)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_focus_callback
- * DESCRIPTION
- * Callback for handling current focused control information.
- * PARAMETERS
- * pAppArg [?]
- * eFocusType [IN]
- * bIsSelectable [IN]
- * uiCtrlID [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_focus_callback(void *pAppArg, EControlType eFocusType, JC_BOOLEAN bIsSelectable, JC_UINT32 uiCtrlID)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_data_conn_status_app_callback
- * DESCRIPTION
- * This function is used to get the status of data connection.
- * PARAMETERS
- * data_accoiunt_id [?]
- * eStatus [?]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_data_conn_status_app_callback(JC_UINT32 data_accoiunt_id, JC_UINT32 eStatus)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (data_accoiunt_id < custom_get_csd_profile_num())
- {
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s(%d)", "Dataconn calbk called with status",
- eStatus));
- switch(eStatus)
- {
- case JDD_DATACONN_ACTIVATING:
- g_brw_cntx.dataConnectionState = BRW_DATACONN_ACTIVATING;
- break;
- case JDD_DATACONN_ACTIVATED:
- g_brw_cntx.dataConnectionState = BRW_DATACONN_ACTIVATED;
- break;
- case JDD_DATACONN_DEACTIVATING:
- g_brw_cntx.dataConnectionState = BRW_DATACONN_DEACTIVATING;
- break;
- case JDD_DATACONN_DEACTIVATED:
- g_CSDcall_aborted_status = GetDropRequestFlag();
- g_brw_cntx.dataConnectionState = BRW_DATACONN_DEACTIVATED;
- /*If data connection is deactivated for
- E_BRW_DATACONN_AUTO_DISC_TIMEOUT_EVENT or by application then deinit will not be performed*/
- if(!(g_BrwCsdCallDisconnect || g_brw_cntx.isDataConnectionDeactivate))
- {
- mmi_brw_deinit_event();
- }
- g_BrwCsdCallDisconnect = FALSE;
- g_brw_cntx.isDataConnectionDeactivate = E_FALSE;
- break;
- case JDD_DATACONN_AUTO_DISC_TIMEOUT:
- mmi_brw_dataconn_auto_disc_timeout_event();
- break;
- default:
- break;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_jdd_browser_ui_events_hdlr
- * DESCRIPTION
- * EVENT HANDLER FOR BROWSER UI.
- * PARAMETERS
- * pEventData [?]
- * RETURNS
- * void
- *****************************************************************************/
- extern BOOL g_option_refresh_page;
- void mmi_jdd_browser_ui_events_hdlr(JC_EVENT_DATA *pEventData)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE iRet = JC_OK;
- JC_MMI_EVENT *pmmiEventData = NULL;
- JC_MMI_EVENT mmiEventData;
- EJCScrollDirection eScrollDirection;
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif /* 0 */
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if ((E_TASK_BROWSER_CORE == pEventData->srcTaskInfo.iTaskID)
- || (E_TASK_BROWSER_UI == pEventData->srcTaskInfo.iTaskID))
- {
- switch (pEventData->iEventType)
- {
- /* Handle secondary specific events */
- case E_BRW_STARTUP_EVENT:
- {
- #ifdef JBROWSER_USE_ASM
- /* Register the browser application with ASM. */
- applib_mem_ap_register(APPLIB_MEM_AP_ID_JATAAYU_WAP, STR_ID_BRW_JBROWSER, NULL,
- mmi_stop_wap_application);
- #endif
- /* PIXTEL_JATAAYU : Initialize the Browser State machine */
- iRet = jdi_BrowserInitContext(&pBrowserCtxt, pBrowserCtxt);
- if (JC_OK != iRet)
- {
- ASSERT(0);
- }
- iRet = jdi_BrowserInitCommPush(pBrowserCtxt);
- if (JC_OK != iRet)
- {
- ASSERT(0);
- }
- #ifdef BROWSER_PUSH_ENABLE
- if(g_brw_cntx.isServiceMsgSetting)
- {
- mmi_brw_enable_push_Message(E_TRUE);
- }
- else
- {
- mmi_brw_enable_push_Message(E_FALSE);
- }
- mmi_brw_initialize_push_message_list();
- jdi_BrowserRegisterPushHandler(pBrowserCtxt, mmi_brw_push_callback);
- jdi_BrowserRegisterPushPPGValidateHandler(pBrowserCtxt, mmi_brw_push_PPG_validate_callback);
- jdi_BrowserRegisterPushInboxHandler(pBrowserCtxt, mmi_brw_push_inbox_max_size_callback);
- jdi_BrowserRegisterPushInboxFullHandler(pBrowserCtxt, mmi_brw_push_inbox_full_callback);
- /* Added by Vivek 3 july, 2006 */
- jdi_BrowserRegisterPushUpdateHandler(pBrowserCtxt, mmi_brw_push_with_delete_action);
- #endif /* BROWSER_PUSH_ENABLE */
- g_brw_cntx.isBrowserReady = TRUE;
- g_brw_cntx.isBrowserInitInProgress = FALSE;
- /* Added By vivek to resolve the push status icon problem on
- rebooting the phone */
- mmi_brw_unread_push_message_indication();
- #ifdef __MMI_UNIFIED_MESSAGE__
- mmi_um_brw_push_ready_ind();
- #endif
- jdd_DataConnSetStatusAppCB(mmi_brw_data_conn_status_app_callback);
- g_brw_cntx.dataConnectionState = BRW_DATACONN_DEACTIVATED;
- }
- break;
- case E_BRW_START_FETCH_EVENT:
- {
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserOpen(pBrowserCtxt);
- jdi_BrowserSetMagnification(pBrowserCtxt, 100);
- if (!g_brw_cntx.isConnectionActive)
- {
- mmi_brw_set_transport_and_data_profile();
- g_brw_cntx.isConnectionActive = MMI_TRUE;
- }
- iRet = jdi_BrowserFetchRequest(pBrowserCtxt, &fetchUrlInfo);
- if (JC_OK != iRet)
- {
- jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
- return;
- }
- g_brw_cntx.page_fetch_event = BRW_START_FETCH_EVENT; /* added by tk */
- }
- break;
- case E_BRW_KEY_LEFT_EVENT:
- eScrollDirection = E_JC_SCROLL_LEFT;
- jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
- break;
- case E_BRW_KEY_RIGHT_EVENT:
- eScrollDirection = E_JC_SCROLL_RIGHT;
- jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
- break;
- case E_BRW_KEY_UP_EVENT:
- eScrollDirection = E_JC_SCROLL_UP;
- jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
- break;
- case E_BRW_KEY_DOWN_EVENT:
- eScrollDirection = E_JC_SCROLL_DOWN;
- jdi_BrowserHandleScroll(pBrowserCtxt, eScrollDirection);
- break;
- case E_BRW_REFRESH_EVENT:
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserRefreshDisplay(pBrowserCtxt);
- break;
- case E_BRW_STOP_FETCH_EVENT:
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserFetchStop(pBrowserCtxt);
- /* jdi_BrowserRefreshDisplay(pBrowserCtxt) ;//commented by tk */
- break;
- case E_BRW_ACTION_EVENT:
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jc_memset(&mmiEventData, 0, sizeof(JC_MMI_EVENT));
- pmmiEventData = (JC_MMI_EVENT*) pEventData->pEventInfo;
- mmiEventData = *pmmiEventData;
- iRet = jdi_BrowserHandlePrimaryMMI(pBrowserCtxt, &mmiEventData);
- if (JC_OK != iRet)
- {
- jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
- }
- jdd_QueueFree(pEventData);
- g_brw_cntx.page_fetch_event = BRW_ACTION_EVENT;
- break;
- case E_BRW_SAT_GOTO_URL_EVENT:
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserOpen(pBrowserCtxt);
- jdi_BrowserSetMagnification(pBrowserCtxt, 100);
- iRet = jdi_BrowserFetchRequest(pBrowserCtxt, &fetchUrlInfo);
- if (JC_OK != iRet)
- {
- jdd_MMINotificationMessage((JC_INT32) iRet, E_NOTIFICATION_ERR, NULL, NULL);
- return;
- }
- g_brw_cntx.page_fetch_event = BRW_START_FETCH_EVENT; /* added by tk */
- break;
- #ifdef __DRM_SUPPORT__
- case E_BRW_PARSE_DRM_EVENT:
- jBrowser_parse_drm_content();
- break;
- #endif /* __DRM_SUPPORT__ */
- case E_BRW_DEINIT_EVENT:
- if(g_EndKey_pressed && (!g_brw_page_cntx.brw_PageFetchStatus))
- {
- DisplayIdleScreen();
- }
- else if(!g_EndKey_pressed)
- {
- mmi_brw_deinit_all();
- mmi_brw_delete_brw_screen();
- }
- break;
- case E_BRW_DATACONN_AUTO_DISC_TIMEOUT_EVENT:
- g_BrwCsdCallDisconnect = TRUE;
- jdi_BrowserDisconnect(pBrowserCtxt);
- mmi_brw_show_long_idle_disconnected_notification();
- break;
- case E_BRW_ENDKEY_EVENT:
- mmi_brw_goto_idle_screen();
- break;
- default:
- break;
- }
- }
- }
- #ifdef JBROWSER_USE_ASM
- /*****************************************************************************
- * FUNCTION
- * mmi_stop_wap_application
- * DESCRIPTION
- * This function will be invoked when ASM requests WAP application memmory to free memory.
- * This function will only be invoked in MMI context.
- * PARAMETERS
- * owner [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_stop_wap_application(void)
- {
- /* De-initialize the application */
- mmi_brw_wap_deinit();
- /* Free the application memmory */
- applib_mem_ap_free(wap_heap_space);
- /* Notify MMI about application being stopped */
- applib_mem_ap_notify_stop_finished(APPLIB_MEM_AP_ID_JATAAYU_WAP, KAL_TRUE);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_wap_enter_req_handler
- * DESCRIPTION
- * Responsible for launch of application screen. If it fals to allocate memory. it can
- * invoke mmi_frm_appmem_propmt_to_release_mem to enter out of memmory screen.
- * PARAMETERS
- * owner [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_wap_enter_req_handler(void)
- {
- JC_RETCODE iRet;
- wap_heap_space = applib_mem_ap_alloc(APPLIB_MEM_AP_ID_JATAAYU_WAP, 500*1024);
- if (wap_heap_space)
- {
- iRet = jdd_MemInitBrowserASMPool(wap_heap_space, 500*1024);
- }
- else
- {
- mmi_frm_appmem_prompt_to_release_mem(
- APPLIB_MEM_AP_ID_JATAAYU_WAP,
- NULL,
- 500*1024,
- mmi_wap_request_ASM_success_callback);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_wap_request_ASM_success_callback
- * DESCRIPTION
- * This function will get called when user stops other applications and releases
- * enough memory. This function will again try to allocate ASM memory to browser.
- * PARAMETERS
- * owner [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_wap_request_ASM_success_callback(void)
- {
- wap_heap_space = applib_mem_ap_alloc(APPLIB_MEM_AP_ID_JATAAYU_WAP, 500*1024);
- ASSERT(wap_heap_space);
- }
- #endif /* ifdef JBROWSER_USE_ASM */
- /*****************************************************************************
- * FUNCTION
- * mmi_JBrowserInitApp
- * DESCRIPTION
- * Initialize the browser application if not already initialized
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_HANDLE *pvDRMArg;
- void mmi_JBrowserInitApp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* If the layout is not Initialized then Initialize it */
- if (g_brw_cntx.isLayoutInitialized == E_FALSE)
- {
- #ifdef JBROWSER_USE_ASM
- /* Allocate browser ASM pool. */
- mmi_wap_enter_req_handler();
- #endif
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserInitLayoutHistory(pBrowserCtxt);
- jdi_BrowserInitCacheCookie(pBrowserCtxt);
- jdi_BrowserSetMagnification(pBrowserCtxt, 100);
- jdi_BrowserRegisterShowAuthHandler(pBrowserCtxt, mmi_brw_show_authentication_callback);
- /* Presently not in use */
- //jdi_BrowserRegisterShowProgressHandler (pBrowserCtxt, mmi_brw_show_progress_bar_callback) ;
- //jdi_BrowserRegisterPageStatusHandler (pBrowserCtxt, mmi_brw_rendering_status_callback) ;
- //ADDED BY TK to register a callback for page fetching
- jdi_BrowserRegisterBrowserStatusIndicator(pBrowserCtxt, mmi_brw_page_status_callback);
- jdi_BrowserRegisterPageUpdateIndicator(pBrowserCtxt, mmi_brw_pageupdate_callback); //pawan
- jdi_BrowserRegisterEmptyNavListInd(pBrowserCtxt, mmi_brw_empty_navlist_callback);
- /* Presently not in use */
- /* jdi_BrowserRegisterPageRenderingStatusHandler (pBrowserCtxt, mmi_brw_page_rendering_status_callback) ; */
- jdi_BrowserRegisterDoTagHandler(pBrowserCtxt, mmi_brw_do_tag_callback);
- jdi_BrowserEnableCache(pBrowserCtxt, E_TRUE);
- jdi_BrowserEnableCookie(pBrowserCtxt, E_TRUE);
- jdi_BrowserEnableFourWayNavigation(pBrowserCtxt, E_TRUE);
- jdi_BrowserEnableOfflineBrowsing(pBrowserCtxt, E_FALSE);
- jdi_BrowserEnableCircularScrolling(pBrowserCtxt, E_TRUE);
- /* Below modified by Shantanu - 20060606 */
- jdi_BrowserSetImageAsSelectable(pBrowserCtxt, g_brw_cntx.image_selection);
- jdi_BrowserSetAlertCB(pBrowserCtxt, mmi_brw_set_alert_callback, NULL);
- jdi_BrowserSetConfirmCB(pBrowserCtxt, mmi_brw_set_confirm_callback, NULL);
- jdi_BrowserSetPromptCB(pBrowserCtxt, mmi_brw_set_prompt_callback, NULL);
- jdi_BrowserRegisterPageInfoHandler(pBrowserCtxt, mmi_brw_set_page_info_callback);
- jdi_BrowserRegisterProgressStatusHandler(pBrowserCtxt, mmi_brw_progress_status_callback);
- jdi_BrowserRegisterFocusHandler(pBrowserCtxt, mmi_brw_focus_callback);
- jdi_BrowserRegisterMimeHandler(pBrowserCtxt, mmi_brw_mime_callback_hdlr);
- jdi_BrowserRegisterMimeContentHandler (pBrowserCtxt, mmi_brw_mime_content_callback_hdlr);
- jdi_BrowserSetBgImageDisplay(pBrowserCtxt, E_FALSE);
- #ifdef __DRM_SUPPORT__
- jdi_BrowserRegisterDRMCB(
- pBrowserCtxt,
- jBrowser_drm_indication_handler,
- jBrowser_drm_rights_update_handler,
- NULL,
- pvDRMArg);
- #endif /* __DRM_SUPPORT__ */
- jdi_BrowserRegisterMultimediaHandler(pBrowserCtxt, mmi_brw_multimedia_callback_hdlr);
- /* Added by Sandeep to set if images should be shown on the rendered page or not */
- jdi_BrowserGraphicsEnable(pBrowserCtxt, g_brw_cntx.show_images);
- /* added by sandeep to get the timeout value */
- /* We have to set this flag to prevent multiple initialization */
- g_brw_cntx.isLayoutInitialized = E_TRUE;
- //Tk start 18/01/2007
- #ifdef JBROWSER_USE_ASM
- /* Create a new Communication handle */
- mmi_brw_communication_init();
- #endif
- //Tk end 18/01/2007
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_communication_init
- * DESCRIPTION
- * Create a new browser communication handle and initialize it.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_communication_init(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- JC_TASK_INFO appTaskInfo = {0, };
- JC_TASK_INFO transportTaskInfo = {0, };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION_2((MMI_TRACE_INFO, "%s", "mmi_brw_communication_init"));
- appTaskInfo.iTaskID = (JC_INT32) E_TASK_BROWSER_CORE;
- appTaskInfo.iAppID = (JC_INT32) E_TASK_BROWSER_CORE;
- transportTaskInfo.iTaskID = (JC_INT32) E_TASK_TRANSPORT;
- transportTaskInfo.iAppID = (JC_INT32) E_TASK_TRANSPORT;
- eRet = jdi_CommunicationInitialize(&appTaskInfo, &transportTaskInfo, &g_brw_cntx, &g_brw_cntx.hCommHandle);
- if (JC_OK != eRet)
- {
- //goto error;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_JBrowserDeInitApp
- * DESCRIPTION
- * Deinitialize the browser application(on exit from browser)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_JBrowserDeInitApp(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("Inside mmi_JBrowserDeInitApp"));
- //Tk start 18/01/2007
- #ifdef JBROWSER_USE_ASM
- /* DeInitialize the communicator */
- jdi_CommunicationStopAllReq(g_brw_cntx.hCommHandle);
- /*Added by TK to deinitialize the communication layer of browser*/
- jdi_BrowserCommunicationDeinitialize(pBrowserCtxt ,g_brw_cntx.hCommHandle );
- #endif
- //Tk end 18/01/2007
- jdi_BrowserDeInitCacheCookie(pBrowserCtxt);
- jdi_BrowserDeInitLayoutHistory(pBrowserCtxt);
- /* Added by Sandeep for checking data connection active or not */
- /* If the data profile is chnaged by the user then we have to set this flag as false so that
- when a new page is fetched then we have to set the profile again */
- g_brw_cntx.isConnectionActive = MMI_FALSE;
- /* Added by Sandeep to check if any page is rendered or not This is used when notification
- comes on a link fetched from the page which is opened for the first time. THe rendered page
- should be restored. */
- g_brw_cntx.isRenderedFlag = E_FALSE;
- /* Added by Sandeep : to reset the layoutInitialized flag */
- g_brw_cntx.isLayoutInitialized = E_FALSE;
- #ifdef JATAAYU_IMAGE_CACHING_ENABLE
- /* DeInitialize the memory pool container used for buffered images. */
- deinit_image_pool();
- #endif /* JATAAYU_IMAGE_CACHING_ENABLE */ /* ifdef JATAAYU_IMAGE_CACHING_ENABLE */
- PRINT_INFORMATION(("Exit mmi_JBrowserDeInitApp"));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_DeInitJBrowserCtxt
- * DESCRIPTION
- * Deinitialize the browser Context (at shutdown)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_DeInitJBrowserCtxt(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if (pBrowserCtxt != NULL)
- {
- /* PIXTEL_JATAAYU
- jdi_BrowserDeInitialize(pBrowserCtxt); */
- jdi_BrowserDeInitContext(pBrowserCtxt);
- pBrowserCtxt = NULL;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * JBrowserRefreshPage
- * DESCRIPTION
- * Refresh the current rendered page.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void JBrowserRefreshPage(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- jdi_BrowserOpen(pBrowserCtxt);
- jdi_BrowserSetMagnification(pBrowserCtxt, 100);
- g_brw_page_cntx.brw_PageRefreshStatus = 1;
- /* Added By Shantanu -20060810 */
- /* We will set this flag when the user selects "Refresh" from rendered page
- option menu.This flag will restrict the user to enter the full screen editor
- while the page is being refreshed */
- mmi_jdd_ui_set_jdd_flag(JDD_MANUAL_REFRESH_FLAG, E_TRUE);
- #ifdef DOWNLOAD_CLIENT_ENABLE
- if (InitDownloadClient(pBrowserCtxt) != JC_OK)
- {
- }
- #endif /* DOWNLOAD_CLIENT_ENABLE */
- jdd_MemSetActiveModuleID(E_TASK_BROWSER_CORE);
- jdi_BrowserRefreshPage(pBrowserCtxt);
- }
- /* Function Below added by Shantanu for Accesskey Support - 20060412 */
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_fill_accesskey_info_and_send_event_to_queue
- * DESCRIPTION
- * Function to fill accesskey info and sent it to the queue
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_fill_accesskey_info_and_send_event_to_queue(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- MMI_JDD_UI_WINDOW_INFO_STRUCT *jdd_window_info_struct_p = NULL;
- JC_UINT32 uiWindowID = 0;
- JC_EVENT_DATA eventData = {0, };
- JC_MMI_EVENT controlEventData = {0, };
- JC_RETCODE iRet = JC_OK;
- U16 keyCode, keyType;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.iEventType = E_BRW_ACTION_EVENT;
- uiWindowID = mmi_jdd_ui_get_appWindowID(E_TASK_BROWSER_CORE);
- jdd_window_info_struct_p = (MMI_JDD_UI_WINDOW_INFO_STRUCT*) uiWindowID;
- if (jdd_window_info_struct_p != NULL)
- {
- /* for getting the last key press event */
- GetkeyInfo(&keyCode, &keyType);
- switch (keyCode)
- {
- case KEY_0:
- case KEY_1:
- case KEY_2:
- case KEY_3:
- case KEY_4:
- case KEY_5:
- case KEY_6:
- case KEY_7:
- case KEY_8:
- case KEY_9:
- controlEventData.eventData.accessKeyEvent.uiAccessKeyIndex = keyCode;
- break;
- case KEY_STAR:
- controlEventData.eventData.accessKeyEvent.uiAccessKeyIndex = STAR_ACCESS_KEY;
- break;
- case KEY_POUND:
- controlEventData.eventData.accessKeyEvent.uiAccessKeyIndex = HASH_ACCESS_KEY;
- break;
- #ifdef BROWSER_SENDKEY_AS_ACCESSKEY
- case KEY_SEND:
- controlEventData.eventData.accessKeyEvent.uiAccessKeyIndex = SEND_ACCESS_KEY;
- break;
- #endif /* BROWSER_SENDKEY_AS_ACCESSKEY */
- default:
- /* All the accesskeys are handled above.
- If it gives an assert then we should handle the new key */
- ASSERT(0);
- }
- controlEventData.eEventType = JC_MMI_ACCESSKEY_EVENT;
- eventData.uiEventInfoSize = sizeof(JC_MMI_EVENT);
- iRet = jdd_QueueAlloc(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- jc_memcpy(eventData.pEventInfo, &controlEventData, sizeof(JC_MMI_EVENT));
- iRet = jdd_QueueSend(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_fill_control_info_and_send_event_to_queue
- * DESCRIPTION
- * Function to fill control info and sent it to the queue
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_fill_control_info_and_send_event_to_queue(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- MMI_JDD_UI_WINDOW_INFO_STRUCT *jdd_window_info_struct_p = NULL;
- JC_UINT32 uiWindowID = 0;
- JC_EVENT_DATA eventData = {0, };
- JC_MMI_EVENT controlEventData = {0, };
- JC_RETCODE iRet = JC_OK;
- JDD_CONTROL_INFO *control_info;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.iEventType = E_BRW_ACTION_EVENT;
- uiWindowID = mmi_jdd_ui_get_appWindowID(E_TASK_BROWSER_CORE);
- jdd_window_info_struct_p = (MMI_JDD_UI_WINDOW_INFO_STRUCT*) uiWindowID;
- if (jdd_window_info_struct_p != NULL)
- {
- controlEventData.uiControlID = (JC_UINT32) jdd_window_info_struct_p->currFocussedControlID;
- controlEventData.uiWindowID = jdd_window_info_struct_p->uiWindowID;
- control_info = (JDD_CONTROL_INFO*) jdd_window_info_struct_p->currFocussedControlID;
- if (control_info == NULL)
- {
- return;
- }
- switch (control_info->uiControlType)
- {
- case E_TEXT_BOX:
- {
- controlEventData.eEventType = JC_MMI_LINK_EVENT;
- }
- break;
- case E_INPUT_BOX:
- {
- controlEventData.eEventType = JC_MMI_INPUT_EVENT;
- }
- break;
- case E_BUTTON:
- {
- controlEventData.eEventType = JC_MMI_BUTTON_EVENT;
- }
- break;
- case E_CHECK_BOX:
- {
- controlEventData.eEventType = JC_MMI_CHECK_EVENT;
- }
- break;
- case E_RADIO_BOX:
- {
- controlEventData.eEventType = JC_MMI_RADIO_EVENT;
- }
- break;
- case E_LIST_BOX:
- {
- controlEventData.eEventType = JC_MMI_LIST_EVENT;
- }
- break;
- case E_COMBO_BOX:
- {
- controlEventData.eEventType = JC_MMI_COMBO_EVENT;
- }
- break;
- case E_PICTOGRAM:
- case E_IMAGE_TEXT:
- case E_IMAGE:
- case E_OBJECT:
- {
- controlEventData.eEventType = JC_MMI_IMAGE_EVENT;
- }
- break;
- default:
- {
- return;
- }
- break;
- }
- eventData.uiEventInfoSize = sizeof(JC_MMI_EVENT);
- iRet = jdd_QueueAlloc(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- jc_memcpy(eventData.pEventInfo, &controlEventData, sizeof(JC_MMI_EVENT));
- iRet = jdd_QueueSend(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- g_brw_cntx.isRenderedFlag = E_TRUE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * JBrowserSATGotoURLEvent
- * DESCRIPTION
- * Goto event from sat(fetch a url from sat application)
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void JBrowserSATGotoURLEvent(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE iRet = JC_OK;
- JC_EVENT_DATA eventData = {0, };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- jc_memset(&eventData, 0, sizeof(JC_EVENT_DATA));
- eventData.pEventInfo = NULL;
- eventData.uiEventInfoSize = 0;
- eventData.iEventType = E_BRW_SAT_GOTO_URL_EVENT;
- eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- iRet = jdd_QueueSend(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * jbrowser_is_ready
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U8 jbrowser_is_ready(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_brw_cntx.isBrowserReady;
- }
- /*****************************************************************************
- * FUNCTION
- * jbrowser_is_init
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U8 jbrowser_is_init(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_brw_cntx.isBrowserInitInProgress;
- }
- /*****************************************************************************
- * FUNCTION
- * jbrowser_is_open
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U8 jbrowser_is_open(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /*return g_brw_cntx.isLayoutInitialized;*/
- return FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * jbrowser_shutdown
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- void jbrowser_shutdown(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- mmi_brw_wap_deinit();
- /* Free the DO List for last rendered page */
- mmi_brw_free_do_list();
- #ifdef __SATC3__
- if (g_brw_cntx.isSATURL == E_TRUE)
- {
- brw_send_termination_to_mmi(SAT_BROWSER_USER_TERMINATION);
- }
- #endif /* __SATC3__ */
- /* Go to services menu if entered from wap otherwise go to last screen before rendered page */
- if (IsScreenPresent(SERVICES_MAIN_MENU_SCREEN_ID))
- {
- GoBackToHistory(SERVICES_MAIN_MENU_SCREEN_ID);
- }
- else if (!IsScreenPresent(SERVICES_MAIN_MENU_SCREEN_ID) && IsScreenPresent(SCR_ID_BRW_INTERNET_SERVICES))
- {
- DisplayIdleScreen();
- }
- else
- {
- GoBackHistory();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_entry_wap_not_ready
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_entry_wap_not_ready(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- EntryNewScreen(SCR_ID_BRW_WAP_NOT_READY, mmi_brw_exit_wap_not_ready, NULL, NULL);
- StartTimer(JBROWSER_WAP_NOT_READY_TIMER, 2000, mmi_wap_wait_and_go_back);
- ShowCategory66Screen(
- STR_ID_BRW_INTERNET_SERVICES,
- GetRootTitleIcon(SERVICES_WAP_MENU_ID),
- 0,
- 0,
- STR_GLOBAL_BACK,
- IMG_GLOBAL_BACK,
- (U8*) GetString(STR_ID_BRW_PLEASE_WAIT),
- IMG_ID_BRW_SAT_WAIT,
- NULL);
- SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_exit_wap_not_ready
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_exit_wap_not_ready(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JBROWSER_WAP_NOT_READY_TIMER);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_wap_wait_and_go_back
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_wap_wait_and_go_back(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- StopTimer(JBROWSER_WAP_NOT_READY_TIMER);
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_is_cancel_flag_set
- * DESCRIPTION
- * Function to check if cancel lag is set
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_BOOLEAN mmi_brw_is_cancel_flag_set(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return (g_brw_page_cntx.brw_cancel_flag);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_is_back
- * DESCRIPTION
- * Function to check if there is any page behid the current rendered page i.e in history.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_BOOLEAN mmi_brw_is_back(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return jdi_BrowserIsBack(pBrowserCtxt);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_connection_active_flag
- * DESCRIPTION
- * Function to check if connection is already there or not
- * PARAMETERS
- * flag [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_set_connection_active_flag(JC_BOOLEAN flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_brw_cntx.isConnectionActive = flag;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_data_connection_deactive_flag
- * DESCRIPTION
- * Function to set data conn deactivate flag only if data connection is in
- activated or activating state in case of CSD only and it is reset in data conn callbk.
- * PARAMETERS
- * flag [IN]
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_set_data_connection_deactive_flag(JC_BOOLEAN flag)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(g_brw_cntx.dataConnectionState == BRW_DATACONN_ACTIVATING || g_brw_cntx.dataConnectionState == BRW_DATACONN_ACTIVATED)
- {
- if(mmi_brw_check_csd_data_account())
- {
- g_brw_cntx.isDataConnectionDeactivate = flag;
- }
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_is_rendered_flag
- * DESCRIPTION
- * Function to check if any page is rendered or not
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_BOOLEAN mmi_brw_is_rendered_flag(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- //return g_brw_cntx.isRenderedFlag;
- return (g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_delete_brw_screen
- * DESCRIPTION
- * Function to delete the browser screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_delete_brw_screen(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* if there is already rendered page then it remains on the render page if we press abort on calling screen in case of csd bearer */
- if (IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN) && !mmi_brw_check_browser_scr_pre_delte_condition() &&
- !(g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus))
- {
- DeleteScreenIfPresent(SCR_ID_BRW_JBROWSER_MAIN);
- }
- else if((GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN) &&
- !(g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus))
- {
- GoBackHistory();
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_is_browser_window_active
- * DESCRIPTION
- * Function to check if the browser window is present.
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_BOOLEAN mmi_brw_is_browser_window_active(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- #if 0
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- /* under construction !*/
- #endif
- if (GetActiveScreenId() == SCR_ID_BRW_JBROWSER_MAIN)
- {
- return E_TRUE;
- }
- return E_FALSE;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_set_transport_and_data_profile
- * DESCRIPTION
- * Function to set the profile and data connection
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_set_transport_and_data_profile(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- COMM_PROFILE profile;
- JC_RETCODE iRet = JC_OK;
- GENERIC_DATA_CONN pDataConn;
- nvram_wap_profile_content_struct *activated_wap_profile;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- activated_wap_profile = mmi_ph_get_activated_wap_profile();
- jc_memset(&profile, 0, sizeof(COMM_PROFILE));
- sprintf(
- (PS8) profile.szHostName,
- "%d.%d.%d.%d",
- activated_wap_profile->proxy_ip[0],
- activated_wap_profile->proxy_ip[1],
- activated_wap_profile->proxy_ip[2],
- activated_wap_profile->proxy_ip[3]);
- profile.uiPortNumber = (JC_UINT32) activated_wap_profile->proxy_port;
- switch (activated_wap_profile->conn_type)
- {
- case PH_CONN_TYPE_CONNECTION_OREINTED:
- profile.eConnMode = E_COMM_WSP_CONNECTION_ORIENTED;
- profile.uiPortNumber = (JC_UINT32) 9201;
- break;
- /* added by tk */
- #if defined (WAP_SEC_SUPPORT) && defined (JATAAYU_SUPPORT)
- case PH_CONN_TYPE_CONNECTION_OREINTED_SECURE:
- profile.eConnMode = E_COMM_WSP_CONNECTION_ORIENTED_SECURE;
- profile.uiPortNumber = (JC_UINT32) 9203;
- break;
- #endif /* defined (WAP_SEC_SUPPORT) && defined (JATAAYU_SUPPORT) */
- /* end */
- case PH_CONN_TYPE_HTTP:
- if (strcmp((PS8) profile.szHostName, (PS8) "0.0.0.0") == 0)
- {
- profile.eConnMode = E_COMM_WPHTTP_DIRECT;
- }
- else
- {
- profile.eConnMode = E_COMM_WPHTTP_PROXY;
- if(profile.uiPortNumber == 0)
- {
- profile.uiPortNumber = 80;
- }
- }
- break;
- }
- mmi_brw_set_timeout_value();
- iRet = jdi_BrowserSetTransportProfile(pBrowserCtxt, &profile);
- if (JC_OK != iRet)
- {
- ASSERT(0);
- }
- /* Set Data connection profile */
- memset(&pDataConn, 0, sizeof(GENERIC_DATA_CONN));
- pDataConn.account_id = activated_wap_profile->data_account;
- iRet = jdi_BrowserSetDataConnectionProfile(pBrowserCtxt, (const GENERIC_DATA_CONN*)&pDataConn);
- if (JC_OK != iRet)
- {
- ASSERT(0);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * jbrowser_wap_screen_id
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- *
- *****************************************************************************/
- U16 jbrowser_wap_screen_id(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- S32 i, total_screens;
- U16 check_screens[]=
- {
- SCR_ID_JMMS_WRITE_MMS,
- SCR_ID_JMMS_PREVIEW,
- SCR_ID_JMMS_PROGRESS,
- SCR_ID_JMMS_INBOX_OPTIONS,
- SCR_ID_JMMS_OUTBOX_OPTIONS,
- SCR_ID_JMMS_DRAFTS_OPTIONS,
- SCR_ID_JMMS_SENT_OPTIONS,
- SCR_ID_JMMS_MESSAGE_SETTINGS,
- SCR_ID_JMMS_TEMPLATES
- };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- total_screens=sizeof(check_screens)/sizeof(U16);
- for(i=0;i<total_screens;i++)
- {
- if(IsScreenPresent((U16)check_screens[i]))
- return check_screens[i];
- }
- return SCR_ID_BRW_JBROWSER_MAIN;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_deinit_all
- * DESCRIPTION
- *
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_deinit_all(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- PRINT_INFORMATION(("Inside mmi_brw_deinit_all, Deinit All"));
- // jdi_BrowserDisconnect(pBrowserCtxt);
- /* If browser launch from wap menu then return */
- if (!g_brw_cntx.page_fetchReqSrc)
- {
- /* This variable was set when we try to fetch a page through EnterAddress Option
- screen. Reset this flag to 0 when second page fetch from render page's Eneter Adress throws error. */
- g_brw_add_hist_flag = 0;
- g_brw_notificationFlag = 0;
- g_BrwCsdCallDisconnect = FALSE;
- jdi_BrowserDisconnect(pBrowserCtxt);
- return;
- }
- mmi_brw_wap_deinit();
- #if defined (JATAAYU_SUPPORT) && (defined (WAP_SUPPORT) || (defined (MMS_SUPPORT)))
- mmi_ph_deinit_profiles();
- mmi_prov_deinit();
- #endif /* defined (JATAAYU_SUPPORT) && (defined (WAP_SUPPORT) || (defined (MMS_SUPPORT))) */
- PRINT_INFORMATION(("Exit mmi_brw_deinit_all, Deinit Completed"));
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_check_csd_data_account
- * DESCRIPTION
- * Returns the rendering status of cyrrent page
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- BOOL mmi_brw_check_csd_data_account(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- nvram_wap_profile_content_struct *activated_wap_profile;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- activated_wap_profile = mmi_ph_get_activated_wap_profile();
- if (mmi_ph_check_data_account_type(activated_wap_profile->data_account) == PH_DATA_ACCOUNT_CSD)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_get_ren_page_status
- * DESCRIPTION
- * Returns the rendering status of cyrrent page
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_brw_get_ren_page_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_brw_page_cntx.brw_pageRenderStatus;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_get_ren_page_status
- * DESCRIPTION
- * Returns the rendering status of current page
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- U8 mmi_brw_get_ren_page_refersh_display_status(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return g_brw_page_cntx.brw_PageRefreshDispStatus;
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_check_browser_scr_pre_delte_condition
- * DESCRIPTION
- * It checks whether we can delete the brw scr or not
- * PARAMETERS
- * void
- * RETURNS
- * JC_BOOLEAN
- *****************************************************************************/
- JC_BOOLEAN mmi_brw_check_browser_scr_pre_delte_condition(void)
- {
- if((IsScreenPresent(SCR_ID_BRW_WAP_ALERT_SCREEN)) ||
- (IsScreenPresent(SCR_ID_BRW_WAP_PROMPT_INPUT_SCREEN)) ||
- (IsScreenPresent(SCR_ID_BRW_AUTHENTICATION)) ||
- //(IsScreenPresent() == SCR_ID_BRW_JBROWSER_MAIN) ||
- mmi_jdd_ui_is_entry_notification_screen_present())
- {
- return E_TRUE;
- }
- else
- {
- return E_FALSE;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_show_long_idle_disconnected_notification
- * DESCRIPTION
- * Shows long idle disconnected notification
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_show_long_idle_disconnected_notification(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(GetTotalCallCount() > 1)/*voice call as well as data call*/
- {
- EntryNewScreen(SCR_ID_BRW_LONG_IDLE_DISCONNECTED, NULL, NULL, NULL);
- ShowCategory151Screen(
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- (PU8)GetString(STR_ID_LONG_IDLE_DISCONNECTED),
- (PU8)GetImage(IMG_GLOBAL_INFO),
- 0);
- /*Delete browser screen*/
- if((IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN)) &&
- !(mmi_brw_check_browser_scr_pre_delte_condition()) &&
- !(g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus || mmi_brw_is_back()))
- {
- DeleteScreenIfPresent(SCR_ID_BRW_JBROWSER_MAIN);
- }
- }
- else
- {
- EntryNewScreen(SCR_ID_BRW_LONG_IDLE_DISCONNECTED, NULL, mmi_brw_show_long_idle_disconnected_notification, NULL);
- ShowCategory151Screen(
- 0,
- 0,
- STR_GLOBAL_OK,
- IMG_GLOBAL_OK,
- 0,
- 0,
- (PU8)GetString(STR_ID_LONG_IDLE_DISCONNECTED),
- (PU8)GetImage(IMG_GLOBAL_INFO),
- 0);
- SetLeftSoftkeyFunction(mmi_brw_handle_long_idle_disconnected_notification, KEY_EVENT_UP);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_long_idle_disconnected_notification
- * DESCRIPTION
- * Handle key event for long idle disconnected notification
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_long_idle_disconnected_notification(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- /* if((GetCurrScrnId() == SCR_ID_BRW_JBROWSER_MAIN) &&
- !(g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus || mmi_brw_is_back()))
- {
- DeleteScreenIfPresent(SCR_ID_BRW_JBROWSER_MAIN);
- }
- */
- if((IsScreenPresent(SCR_ID_BRW_JBROWSER_MAIN)) &&
- !(mmi_brw_check_browser_scr_pre_delte_condition()) &&
- !(g_brw_page_cntx.brw_Pre_PageRenderStatus || g_brw_page_cntx.brw_pageRenderStatus || mmi_brw_is_back()))
- {
- DeleteScreenIfPresent(SCR_ID_BRW_JBROWSER_MAIN);
- }
- GoBackHistory();
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_get_focussed_ctrl_title
- * DESCRIPTION
- * Returns the current focussed control's title
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- JC_CHAR* mmi_brw_get_focussed_ctrl_title(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- return jdi_BrowserGetFocusedCtrlTitle(pBrowserCtxt);
- }
- #ifdef __MMI_TOUCH_SCREEN__
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_stylus_event
- * DESCRIPTION
- * This function is called from JDD level to intimate browser core with the pen event
- * PARAMETERS
- * x [IN] This specify the x - coordinate realtive to browser window
- * y [IN] This specify the y - coordinate realtive to browser window
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_stylus_event(JC_INT32 x,JC_INT32 y,EStylusEvent event)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(pBrowserCtxt == NULL)
- {
- return;
- }
- eRet = jdi_BrowserHandleStylusEvent(pBrowserCtxt,x,y,event);
- if(eRet != JC_OK)
- {
- jdd_MMINotificationMessage((JC_INT32) eRet, E_NOTIFICATION_ERR, NULL, NULL);
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_handle_stylus_scroll_event
- * DESCRIPTION
- * This function is called from JDD level to intimate browser core with the pen scroll event
- * PARAMETERS
- * iPos [IN] This specify the scrollbar position
- * eScrollType [IN] This specify the type of scrollbar Horizontal/Vertical
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_handle_stylus_scroll_event(JC_INT32 iPos,EScrollBarType eScrollType)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE eRet = JC_OK;
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(pBrowserCtxt == NULL)
- {
- return;
- }
- eRet = jdi_BrowserHandleStylusScroll(pBrowserCtxt,iPos,eScrollType);
- if(eRet != JC_OK)
- {
- jdd_MMINotificationMessage((JC_INT32) eRet, E_NOTIFICATION_ERR, NULL, NULL);
- }
- }
- #endif /* __MMI_TOUCH_SCREEN__ */
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_suspend_layout_marquee_timer
- * DESCRIPTION
- * This function is called from JDD level to intimate browser core for suspending
- * Layout Marquee Timer
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_suspend_layout_marquee_timer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(pBrowserCtxt == NULL)
- {
- return;
- }
- jdi_BrowserSuspendMarqueeTimer(pBrowserCtxt);
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_goto_idle_screen_event
- * DESCRIPTION
- * Function for displaying the idle screen
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_goto_idle_screen_event(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- JC_RETCODE iRet = JC_OK;
- JC_EVENT_DATA eventData = {0, };
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- g_EndKey_pressed = TRUE;/*Indicate that end key has been pressed*/
- eventData.pEventInfo = NULL;
- eventData.uiEventInfoSize = 0;
- eventData.iEventType = E_BRW_ENDKEY_EVENT;
- eventData.destTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.destTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iAppID = E_TASK_BROWSER_UI;
- eventData.srcTaskInfo.iTaskID = E_TASK_BROWSER_UI;
- iRet = jdd_QueueSend(&eventData);
- if (JC_OK != iRet)
- {
- return;
- }
- }
- /*****************************************************************************
- * FUNCTION
- * mmi_brw_resume_layout_marquee_timer
- * DESCRIPTION
- * This function is called from JDD level to intimate browser core for resuming
- * Layout Marquee Timer
- * PARAMETERS
- * void
- * RETURNS
- * void
- *****************************************************************************/
- void mmi_brw_resume_layout_marquee_timer(void)
- {
- /*----------------------------------------------------------------*/
- /* Local Variables */
- /*----------------------------------------------------------------*/
- /*----------------------------------------------------------------*/
- /* Code Body */
- /*----------------------------------------------------------------*/
- if(pBrowserCtxt == NULL)
- {
- return;
- }
- jdi_BrowserResumeMarqueeTimer(pBrowserCtxt);
- }
- #endif /* defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT) */ // #if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
- #endif /* _MMI_JBROWSERSTARTUP_C */ // #define _MMI_JBROWSERSTARTUP_C