S60 3rd下实现Video Call 与 VoIP Call

去年8月份做的一个3rd MR下的项目,需要Video Call与VoIP Call功能,当时项目组计划请Nokia的人来实现,最后的情况也不得而知。今日在Nokia的文档库里偶然看到实现方法,简直有些若狂。该文档的创建日期为"July 4, 2007",差不多晚了一年。

实现方法摘录如下:

It is possible to initiate video and Internet telephony (VoIP) calls with the AIW Service Handler API, included in the Extensions plug-in package for S60 3rd Edition SDKs.

Video call

The following example code demonstrates how to initiate a video call.

    MakeAiwCallL( _L("+3581234567"), _L("Firstname Lastname"), EAiwVideo);

    // EAiwForcedVideo doesn't show dialogs

    // MakeAiwCallL( _L("+3581234567"), _L("Firstname Lastname"), EAiwForcedVideo);  

    void MakeAiwCallL( const TDesC& aNumber, const TDesC& aName, TAiwCallType aCallType )

        {

        // Create AIW service handler

        CAiwServiceHandler* serviceHandler = CAiwServiceHandler::NewLC();    

        // Create AIW interest

        RCriteriaArray interest;

        CleanupClosePushL( interest );

        CAiwCriteriaItem* criteria =

            CAiwCriteriaItem::NewLC( KAiwCmdCall, KAiwCmdCall, _L8( "*" ) );            

        const TUid KUidAiwBase = { KAiwClassBase };

        criteria->SetServiceClass( KUidAiwBase );    

        User::LeaveIfError( interest.Append( criteria ) );    

        // Attach to AIW interest

        serviceHandler->AttachL( interest );    

        // Create AIW param package

        TAiwDialDataV1 data;

        TAiwDialDataV1Pckg dataPckg( data );

        iNameBuffer = aName.Left( iNameBuffer.MaxLength() );

        data.SetName( iNameBuffer );

        iTelNumber = aNumber.Left( iTelNumber.MaxLength() );

        data.SetTelephoneNumber( iTelNumber );

        data.SetCallType( aCallType );

        data.SetWindowGroup( CCoeEnv::Static()->RootWin().Identifier() );            

        CAiwGenericParamList& paramList = serviceHandler->InParamListL();    

        TPtrC8 ptr;

        ptr.Set( dataPckg );

        TAiwVariant variant( ptr );   

        TAiwGenericParam param( EGenericParamCallDialDataV1, variant );

        paramList.AppendL( param );    

        // Execute AIW command

        serviceHandler->ExecuteServiceCmdL( KAiwCmdCall,

                                            paramList,

                                            serviceHandler->OutParamListL() );    

        // destroy criteria, interest, and serviceHandler

        CleanupStack::PopAndDestroy( 3 );

        }        

VoIP call

Using the above function, it is possible to initiate a VoIP call as follows:

    MakeAiwCallL( _L("user@sip.server.com"),

                  _L("Firstname Lastname"),

                  EAiwVoIPCall );

See also:

Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, Maintenance Release

Extensions plug-in package for S60 3rd Edition SDK for Symbian OS, for C++, supporting Feature Pack 1

原文链接:  http://forum.nokia.com/document/Forum_Nokia_Technical_Library/contents/FNTL/Creating_video_and_VoIP_calls.htm

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值