WEB开发网
开发学院手机开发Symbian 开发 Symbian (Create IAP)创建接入点的方法 阅读

Symbian (Create IAP)创建接入点的方法

 2010-02-06 01:29:00 来源:WEB开发网   
核心提示:_L("http://mmsc.monternet.com"));// 使添加操作生效 TRAP(error,commsView->PutRecordChanges()); CleanupStack::PopAndDestroy(commsView);// 在WAP_IP_BEARER表中添
_L("http://mmsc.monternet.com"));
// 使添加操作生效    
TRAP(error,commsView->PutRecordChanges());   
CleanupStack::PopAndDestroy(commsView);

// 在WAP_IP_BEARER表中添加记录    
TUint32 wapIPId;
commsView = commsDb->OpenTableLC(TPtrC(WAP_IP_BEARER));
TRAP(error,commsView->InsertRecord(wapIPId));

// 属性记录设置    
commsView->WriteUintL(TPtrC(WAP_ACCESS_POINT_ID), wapId);
commsView->WriteTextL(TPtrC(WAP_GATEWAY_ADDRESS), _L("0.0.0.0"));
commsView->WriteUintL(TPtrC(WAP_WSP_OPTION),EWapWspOptionConnectionOriented);
commsView->WriteBoolL(TPtrC(WAP_SECURITY), EFalse);
commsView->WriteUintL(TPtrC(WAP_IAP), iapId);
commsView->WriteUintL(TPtrC(WAP_PROXY_PORT), 0);
commsView->WriteTextL(TPtrC(WAP_PROXY_LOGIN_NAME), _L(""));
commsView->WriteTextL(TPtrC(WAP_PROXY_LOGIN_PASS), _L(""));
// 添加完成  
TRAP(error,commsView->PutRecordChanges(EFalse, EFalse));

//不要忘记了设置代理网关(中国特色)

TUint32 proxiesId;
CCommsDbTableView* view7 = commsDb->OpenTableLC(TPtrC(PROXIES));
User::LeaveIfError(view7->InsertRecord(proxiesId));
view7->WriteUintL(TPtrC(PROXY_ISP), GPRSId);
view7->WriteTextL(TPtrC(PROXY_SERVICE_TYPE), TPtrC(OUTGOING_GPRS));
view7->WriteBoolL(TPtrC(PROXY_USE_PROXY_SERVER), ETrue);
view7->WriteLongTextL(TPtrC(PROXY_SERVER_NAME), _L("10.0.0.172"));
view7->WriteTextL(TPtrC(PROXY_PROTOCOL_NAME), _L("http"));
view7->WriteUintL(TPtrC(PROXY_PORT_NUMBER), 80);
error = view7->PutRecordChanges(EFalse, EFalse);   
CleanupStack::PopAndDestroy(view7);


以上代码在N73,N95,N78测试通过

上一页  1 2 3 4 

Tags:Symbian Create IAP

编辑录入:coldstar [复制链接] [打 印]
赞助商链接