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

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 phoneitelephony->NotifyChange(iStatus,CTelephony:

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

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();

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

Tags:Symbian 来电 拦截

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