×
Namespaces

Variants
Actions

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

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

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

Contents

设备, 软件 版本

S60 3rd Edition

S60 3rd Edition, FP1


详细描述

现在我们可以通过Phone Client Extension API(其为S60第三版扩展插件包的一部分)来控制手机麦克风无声或取消无声。

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)以设置无声或取消无声。


需要功能: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 the microphone. This should be done inside an active object
 
// (a class derived from CActive)
 
iPhCommandHandler->MuteMicrophone( iStatus, ETrue );
 
SetActive();


内部链接

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

This page was last modified on 15 December 2011, at 12:59.
64 page views in the last 30 days.
×