http://discussion.forum.nokia.com/forum/showthread.php?s=&threadid=51531&highlight=%2Aanswer+call%2A
TBool CAnswerActive::HangUpTheCall(void)
{
Cancel();
TBool Ret = EFalse;
TName callName;
RLine::TLineInfo lineInfo;
TRequestStatus status;
RCall::TStatus callStatus;
iLine.GetStatus(callStatus);
if(callStatus == RCall::EStatusRinging)
{
iLine.GetInfo(lineInfo);
callName.Copy(lineInfo.iNameOfCallForAnswering);
iCall.OpenExistingCall(iLine, callName);
iCall.AnswerIncomingCall(status);
User::WaitForRequest(status);
iCall.HangUp();
iCall.Close();
Ret = ETrue;
}
return Ret;
}
--------------------------------
use iCall.OpenExistingCall(iLine, callName) to create the incoming call not call.OpenNewCall(...
博客给出了Symbian系统中CAnswerActive类的HangUpTheCall函数代码,用于挂断来电。代码中通过获取线路状态,在来电响铃时打开现有呼叫、应答并挂断。还提到使用iCall.OpenExistingCall创建来电,而非call.OpenNewCall。
1651

被折叠的 条评论
为什么被折叠?



