如何在S60第三版设备上设置铃声静音
文章信息
- 设备, 软件 版本:
S60 3rd Edition,
S60 3rd Edition, FP1
- 详细描述:
当有来电时,我们可以通过Phone Client Extension API来将铃声设为静音,这是S60第三版中扩展插件的一部分功能。 3rd party Telephony 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();


could you tell me that how to get "PhoneClientExt.dll"? the package that i have downloaded didnt include the "PhoneClientExt.dll"