MTK 网页访问 baidu 快捷函数
时间:10-02
整理:3721RD
点击:
#include "browser_struct.h"
void MMI_bra_goto_url (char *url)
{
#if defined(MMI_ON_HARDWARE_P)
ilm_struct *ilm_ptr = NULL;
wap_browser_startup_req_struct *param_ptr;
if(url == NULL)
return;
param_ptr = (wap_browser_startup_req_struct*)construct_local_para(sizeof(wap_browser_startup_req_struct), TD_CTRL);
param_ptr->type = 2;
strcpy ((char*)param_ptr->url, (char*)url);
ilm_ptr = allocate_ilm(MOD_MMI);
ilm_ptr->local_para_ptr = (local_para_struct *)param_ptr;
ilm_ptr->msg_id = MSG_ID_WAP_BROWSER_STARTUP_REQ;
ilm_ptr->peer_buff_ptr = NULL;
SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr);
#endif
}
void entry_baidu_homepage(void)
{
mmi_bra_goto_url(( char*)"http://wap.baidu.com");
}
void MMI_bra_goto_url (char *url)
{
#if defined(MMI_ON_HARDWARE_P)
ilm_struct *ilm_ptr = NULL;
wap_browser_startup_req_struct *param_ptr;
if(url == NULL)
return;
param_ptr = (wap_browser_startup_req_struct*)construct_local_para(sizeof(wap_browser_startup_req_struct), TD_CTRL);
param_ptr->type = 2;
strcpy ((char*)param_ptr->url, (char*)url);
ilm_ptr = allocate_ilm(MOD_MMI);
ilm_ptr->local_para_ptr = (local_para_struct *)param_ptr;
ilm_ptr->msg_id = MSG_ID_WAP_BROWSER_STARTUP_REQ;
ilm_ptr->peer_buff_ptr = NULL;
SEND_ILM(MOD_MMI, MOD_WAP, WAP_MMI_SAP, ilm_ptr);
#endif
}
void entry_baidu_homepage(void)
{
mmi_bra_goto_url(( char*)"http://wap.baidu.com");
}
嗯,谢谢小编分享