在symbian第五版中在browser control中使用自己的接入点进行网络访问
2010-06-03 17:23
555 查看
KIS000738 - Setting access point ID for Browser Control Interface has no effect in S60 3rd Edition, Feature Pack 1
From Forum Nokia Wiki
Knowledge Base Home
ID | KIS000738 | Creation date | August 31, 2007, updated January 9, 2008 |
Platform | S60 3rd Edition, Feature Pack 1 | Devices | |
Category | Symbian C++ | Subcategory | Nokia Web Browser |
Keywords (APIs, classes, methods, functions): |
Overview
Setting the access point ID for Browser Control Interface (CBrCtlInterface) does not have any effect in S60 3rd Edition, Feature Pack 1 devices.Description
In S60 3rd Edition, the access point to be used for the Browser Control Interface can be set withiBrCtlInterface->SetBrowserSettingL( TBrCtlDefs::ESettingsApId, apId );
After this, the access point with the specified ID (apId) will be used for the network connection automatically, without prompting the AP selection dialog.
In S60 3rd Edition, Feature Pack 1, a different Browser engine is used for Browser Control Interface. Calling the above function with a valid access point has no effect, and the access point selection dialog is shown every time when opening a URL using this API.
Solution
MBrCtlSpecialLoadObserver class has a virtual NetworkConnectionNeededL() member function that is called every time when a network connection is needed. A new class must be inherited from MBrCtlSpecialLoadObserver and this class has to implement its own network connection in the NetworkConnectionNeededL() function. The object of this user-implemented class can be passed as a parameter to CreateBrowserControlL() which creates the browser controller.CMySpecialLoadObserver member variables
RSocketServ iSocketServer; RConnection iConnection; TBool iFirstTime; //Initial value should be ETrue
void CMySpecialLoadObserver::NetworkConnectionNeededL( TInt* aConnectionPtr, TInt* aSockSvrHandle, TBool* aNewConn, TApBearerType* aBearerType ) { *aBearerType = EApBearerTypeAllBearers; if(iFirstTime) { //New connection is established only once User::LeaveIfError(iSocketServer.Connect(KESockDefaultMessageSlots)); User::LeaveIfError(iConnection.Open(iSocketServer, KConnectionTypeDefault)); TCommDbConnPref prefs; prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt); prefs.SetDirection(ECommDbConnectionDirectionOutgoing); prefs.SetIapId(2); //preferred IAP User::LeaveIfError(iConnection.Start(prefs)); *aNewConn = ETrue; iFirstTime = EFalse; } else { *aNewConn = EFalse; } *aConnectionPtr = reinterpret_cast<TInt>(&iConnection); *aSockSvrHandle = iSocketServer.Handle(); return; }
Retrieved from "http://wiki.forum.nokia.com/index.php/KIS000738_-_Setting_access_point_ID_for_Browser_Control_Interface_has_no_effect_in_S60_3rd_Edition,_Feature_Pack_1"
http://wiki.forum.nokia.com/index.php/KIS000738_-_Setting_access_point_ID_for_Browser_Control_Interface_has_no_effect_in_S60_3rd_Edition,_Feature_Pack_1
相关文章推荐
- Apache2.4使用require指令进行访问控制--允许或限制IP访问/通过User-Agent禁止不友好网络爬虫 从Apache2.2升级到Apache2.4后,发现原来用来限制部分I
- 使用WinSock2 SPI进行网络控制访问内容
- 使用HC(HttpClient)/UC(HttpURLConnection)进行网络访问的基本步骤:
- “在使用Samba进行建立Wisamba无法访问,你可能没有权限使用网络”的一种问题原因及解决
- 使用AsyncTask异步加载类进行访问网络数据json的理解和用法
- Apache2.4使用require指令进行访问控制--允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- iOS开发遇到的坑之三--使用asi框架在xcode下正常运行,但是打包时却不能进行网络访问
- Apache2.4使用require指令进行访问控制–允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- 已禁用对分布式事务管理器(MSDTC)的网络访问。请使用组件服务管理工具启用 DTC 以便在 MSDTC 安全配置中进行网络访问。
- 修改XP默认只能使用guest帐户进行网络访问的办法
- 使用HttpURLConnection和使用OkHttp来进行网络访问
- Windows 8下 GNS3模拟ASA,接入物理网络并使用ASDM进行管理
- 修改XP默认只能使用guest帐户进行网络访问的办法
- 关于android4.0中访问网络不能在主线程中进行以及Handler的使用
- 已禁用对分布式事务管理器(MSDTC)的网络访问。请使用组件服务管理工具启用 DTC 以便在 MSDTC 安全配置中进行网络访问。 与基础事务管理器的通信失败。 .net 代码里 写事务代码
- cocos2d-x 3.7 C++接入GameCenter 使用socket 进行网络数据请求
- Apache2.4使用require指令进行访问控制--允许或限制IP访问/通过User-Agent禁止不友好网络爬虫
- 封装项目整体架构,访问网络数据,展示列表数据,根据图片数量的不同来多条目加载,使用Universal-Image-Loader进行图片加载
- Android之使用HttpURLConnection进行网络访问
- 关于android4.0中访问网络不能在主线程中进行以及Handler的使用