×
Namespaces

Variants
Actions
Revision as of 13:13, 15 December 2011 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

如何在S60第三版设备上处理铃声静音

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
huwell 在 03 Aug 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

Contents

设备, 软件 版本

S60 3rd Edition,

S60 3rd Edition, FP1


详细描述

当有来电时,我们可以通过S60第三版API扩展插件包中的Phone Client Extension API来进行静音处理。


第三方电话API(CTelephony)可以用来监测来电事件:

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

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


解决方案

下列代码演示了如何加载PhoneClientExt DLL,并且如何构造使用一个command handler(CPhCltCommandHandler)来静音铃声

Required capability: WriteDeviceData
 
/*** Header file ***/
 
#include <RPhCltServer.h> // link against PhoneClient.lib
 
#include <PhCltExt.h> // link against PhoneClientExt.lib
 
...
 
 
 
RPhCltServer iPhoneClientServer;
 
RLibrary iLibrary;
 
CPhCltCommandHandler* iPhCommandHandler;
 
 
 
/*** Source file ***/
 
_LIT(KPhoneCltExDllName, "PhoneClientExt.dll");
 
User::LeaveIfError( iPhoneClientServer.Connect() );
 
User::LeaveIfError( iLibrary.Load(KPhoneCltExDllName) );
 
TInt res = iLibrary.Lookup(1)();
 
CPhCltExtFactory* phCltExtFactory = reinterpret_cast<CPhCltExtFactory*>( res );
 
iPhCommandHandler = phCltExtFactory->CPhCltCommandHandlerLD();
 
User::LeaveIfError( iPhCommandHandler->Open(iPhoneClientServer) );
 
// Mute an ongoing ringing tone. This should be done inside an active object
 
// (a class derived from CActive)
 
iPhCommandHandler->MuteRingingTone( iStatus );
 
SetActive();


内部链接

如何在S60第三版设备上设置麦克风无声或取消无声

This page was last modified on 15 December 2011, at 13:13.
28 page views in the last 30 days.