Symbian 来电拦截的实现
2010-03-07 19:59:00 来源:WEB开发网//----------------------------------------------------
void CTelDial::StartObserve()
{
Cancel();
//if the status of line changes, it means some one is calling this phone
itelephony->NotifyChange(iStatus,
CTelephony::EVoiceLineStatusChange,
iLineStatusPckg);
SetActive();//invoke the asynchronous function
}
//----------------------------------------------------
//CTelDial::SetVibraAndRing()
//turn off the vibra and ring
//----------------------------------------------------
void CTelDial::SetVibraAndRing()
{
MProEngEngine* iEngine = ProEngFactory::NewEngineL();
MProEngProfile* iProfile = iEngine->ActiveProfileLC();
MProEngToneSettings& iToneSetting = iProfile->ToneSettings();
//if vibra is on, turn off it
ivibratype = iToneSetting.VibratingAlert();
if (ivibratype)
{
iToneSetting.SetVibratingAlert(EFalse);
}
//turn off the ring
iRingingType = iToneSetting.RingingType();
if (EProfileRingingTypeSilent != iRingingType)
{
iToneSetting.SetRingingType(EProfileRingingTypeSilent);
}
iProfile->CommitChangeL();
iProfile->Release();
iEngine->Release();
}
//----------------------------------------------------
//CTelDial::RecoverVibraAndRing()
//recover the vibra and ring
//----------------------------------------------------
void CTelDial::RecoverVibraAndRing()
{
MProEngEngine* iEngine = ProEngFactory::NewEngineL();
MProEngProfile* iProfile = iEngine->ActiveProfileLC();
MProEngToneSettings& iToneSetting = iProfile->ToneSettings();
更多精彩
赞助商链接