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. Thanks for all your past and future contributions.

使用AIW Dial Data Consumer API拨打电话

From Wiki
Jump to: navigation, search
Article Metadata

设备:: N8

平台: S60 3rd Edition, FP2,S60 5th Edition, Symbian^3

关键词: AIW Dial Data Consumer API
flycarl 在 Martch 11, 2011 创建
最后由 hamishwillee 在 05 Jul 2012 编辑

Note.pngNote: :本API不在公有 SDK中. 我们可以在 SDK API Plug-in中找到这个API。 本文代码来自Archived:AIW Dial Data Consumer Symbian API增加了能在symbian^3平台编译通过的例子。

AIW Dial Data Consumer API (class CAiwDialData)第一次在 S60 3rd Edition, Feature Pack 2 SDK API Plug-in Pack 中引入。 这个API可以用来代替TAiwDialDataV1, TAiwDialDataV1Pckg, TAiwVariant, TAiwGenericParam.

使用CAiwDialData 可以简化打电话拨号时 需要传递给AIW框架的参数。 代码中设置字符串, 使用 字母p 可后接分机号 例如_LIT(phoneNumber, "+8600022p33"); 表示拨打+860002电话 并拨分机号33,


Header file




Dialing a voice call with CAiwDialData

 CAiwServiceHandler* serviceHandler = CAiwServiceHandler::NewLC();
RCriteriaArray interest;
CleanupClosePushL( interest );
CAiwCriteriaItem* criteria =
CAiwCriteriaItem::NewLC(KAiwCmdCall, KAiwCmdCall,_L8("*"));
TUid base;
base.iUid = KAiwClassBase;
criteria->SetServiceClass( base );
User::LeaveIfError( interest.Append( criteria ) );
// Attach to AIW interest
serviceHandler->AttachL( interest );
//Create CAiwDialData instance
CAiwDialData* dialData = CAiwDialData::NewLC();
dialData->SetCallType( CAiwDialData::EAIWVoice );
//Define call parameters
_LIT(phoneNumber, "10086p1");
dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle );
CAiwGenericParamList& paramList = serviceHandler->InParamListL();
// Fill in the parameter list
dialData->FillInParamListL( paramList );
// Execute call command
serviceHandler->ExecuteServiceCmdL( KAiwCmdCall, paramList,
serviceHandler->OutParamListL() );
CleanupStack::PopAndDestroy( 3 ); // dialData, criteria, interest

Example project

This page was last modified on 5 July 2012, at 08:37.
59 page views in the last 30 days.