WEB开发网
开发学院手机开发Symbian 开发 Symbian 来电拦截的实现 阅读

Symbian 来电拦截的实现

 2010-03-07 19:59:00 来源:WEB开发网   
核心提示:void CTelDial::SetReceiveNumber(const TDes& aSetReceiveNumber){iNumberReceiveSet.Copy(aSetReceiveNumber);}void CTelDial::SetDetectNumber(const TDes& aSetDetectN

void CTelDial::SetReceiveNumber(const TDes& aSetReceiveNumber)

{

iNumberReceiveSet.Copy(aSetReceiveNumber);

}

void CTelDial::SetDetectNumber(const TDes& aSetDetectNumber)

{

iNumberDetectSet.Copy(aSetDetectNumber);

}

//----------------------------------------------------

//CTelDial::OpenLoudSpeaker()

//open the loudspeaker

//----------------------------------------------------

void CTelDial::OpenLoudSpeaker()

{

TInt value;

TInt theerr = RProperty::Get(KTelephonyAudioOutput, KTelephonyAudioOutputPreference, value);

switch(value)

{

case EPSPrivate:

{

theerr = RProperty::Set(KTelephonyAudioOutput,KTelephonyAudioOutputPreference,EPSPublic);

break;

}

default:

break;

};

}

void CTelDial::SetCallVolumn(const TInt aspeakvol)

{

//To create a CRepository object for accessing Phone Volume repository:

//and it must be created while the phone is processing

irepository = CRepository::NewL(KCRUidCallHandling);

//turn the speaker's volumn to max

TBuf<10> lBufErr;

TInt lErr = irepository->Set(KTelephonyIncallLoudspeakerVolume, aspeakvol);

lBufErr.AppendNum(lErr);

if (KErrNone != lErr)

{

return;

}

}

void CTelDial::SimulateRedKey()

{

ws.Connect();

ev1.Set(TRawEvent::EKeyDown, EStdKeyNo);

ws.SimulateRawEvent(ev1);

User::After(100000);

ev1.Set(TRawEvent::EKeyUp, EStdKeyNo);

ws.SimulateRawEvent(ev1);

ws.Flush();

}

void CTelDial::SimulateRightKey()

{

上一页  2 3 4 5 6 7 8  下一页

Tags:Symbian 来电 拦截

编辑录入:coldstar [复制链接] [打 印]
赞助商链接