急救,谁有2版的symbian来电监控的代码,发一个给我,谢谢
急救,谁有2版的symbian来电监控的代码,发一个给我,谢谢,liinnn@163.com,有etelmm.lib,etelmm.h的也发给我,谢谢
[解决办法]
CCallWatcher::CCallWatcher(RLine &aLine):
CActive(EPriorityNormal),iLine(aLine),iState(EWaiting)
{
}
void CCallWatcher::ConstructL(){
CActiveScheduler::Add(this);
Monitor();
}
CCallWatcher::~CCallWatcher(){
Cancel();
}
void CCallWatcher::RunL()
{
if(iStatus.Int() != KErrNone)return;
switch(iState){
case EWaiting:
{
CEikonEnv::Static()->RootWin().SetOrdinalPosition(0, 1000);
iCall.OpenExistingCall(iLine, iCallName);
RMobileCall::TMobileCallInfoV1 callInfo;
RMobileCall::TMobileCallInfoV1Pckg callInfoPckg(callInfo);
iCall.GetMobileCallInfo(callInfoPckg);
iNumber=callInfo.iRemoteParty.iRemoteNumber.iTelNumber;
iState = ERinging;
}
break;
case ERinging:
break;
case EWatching:
break;
}
}
void CCallWatcher::Monitor(){
iLine.NotifyIncomingCall(iStatus, iCallName);
SetActive();
}
[解决办法]
有一个AnsPhone例子,看过否?
http://discussion.forum.nokia.com/forum/showthread.php?t=62118