Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

向用户隐藏不必要的接入点

From Wiki
Jump to: navigation, search
Article Metadata

测试基于
设备:: Nokia N96

兼容于
平台: S60 3rd Edition FP2
S60 3rd Edition FP2

文章
翻译:
huwei319
最后由 hamishwillee 在 15 Jun 2012 编辑
  • 详细描述

再一些S60第三版FP2手机上,又一个隐藏的接入点叫做“IPDC”,它只能再收看移动电视时使用,因此无需呈现给最终用户。根据处理访问连接点的方法,这个连接点可能会显示在连接点列表中。这个问题会在使用Access Point Engine (APEngine) API时出现。


  • 解决方案

这些程序在S60第三版FP2中使用Connection Method Manager (CMManager)组件。如果使用CMManager,那么IPDC访问点就可以隐藏了。


APEngine在S60第三版FP2中不提倡使用了。但是为了兼容性,我们仍然无法最终放弃它,注意下列方法:

在Nokia N96中通信数据库如下:

Access Point Name    IAP ID    WAP ID
Easy WLAN 1 1
IPDC 2 -
internet 3 2
mms 4 3
wap 5 4

APEngine返回程序WAP ID,如果程序需要一个IAP ID,那么可以通过CApUtils::IapIdFromWapIdL()来转换wap id和iap id,当只直接使用通信数据库(不适用CMManger或APEngine)时,我们可以通过WAP_ACCESS_POINT直接获得WAP ID,然后将这个ID映射为正确的IAP ID:

// commDb is a pointer to CCommsDatabase
CCommsDbTableView* wapTable = commDb->OpenViewMatchingUintLC(
TPtrC(WAP_ACCESS_POINT),
TPtrC(COMMDB_ID), wapID );
 
User::LeaveIfError( wapTable->GotoFirstRecord() );
 
TBuf<64> wapBearer;
wapTable->ReadTextL(TPtrC(WAP_CURRENT_BEARER), wapBearer);
 
if ( wapBearer != TPtrC(WAP_IP_BEARER) )
{
User::Leave( KErrInvalidBearerType );
}
 
CCommsDbTableView* bearerTable = commDb->OpenViewMatchingUintLC(
TPtrC(wapBearer),
TPtrC(WAP_ACCESS_POINT_ID),
wapID );
 
User::LeaveIfError( bearerTable->GotoFirstRecord() );
bearerTable->ReadUintL(TPtrC(WAP_IAP), iapID );
CleanupStack::PopAndDestroy(2); // bearerTable, wapTable
This page was last modified on 15 June 2012, at 02:14.
123 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×