123456789101112131415161718192021222324252627282930313233343536 |
- #include "ccallanswerer.h"
- #include <w32std.h>
- #include <QDebug>
- CCallAnswerer::CCallAnswerer(MAnswerObserver& aObserver, CTelephony* aTelephony)
- : CActive(EPriorityStandard)
- ,iObserver(aObserver)
- ,iTelephony(aTelephony)
- {
- CActiveScheduler::Add( this );
- }
- CCallAnswerer::~CCallAnswerer() {
- Cancel();
- }
- void CCallAnswerer::Answer() {
- iTelephony->AnswerIncomingCall(iStatus, iCallId);
- SetActive();
- }
- void CCallAnswerer::RunL()
- {
- if(iStatus==KErrNone){
- qDebug() << "[CCallAnswerer::RunL()] chiamata risposta correttamente";
- iObserver.CallAnsweredL( iStatus.Int() );
- } else {
- qDebug() << "[CCallAnswerer::RunL()] errore: "<< QString::number(iStatus.Int());
- }
- }
- void CCallAnswerer::DoCancel()
- {
- iTelephony->CancelAsync(CTelephony::EAnswerIncomingCallCancel);
- }
|