00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "CAnswerIncomingCall.h"
00017
00025 CAnswerIncomingCall* CAnswerIncomingCall::NewL(MExecAsync* aController)
00026 {
00027 CAnswerIncomingCall* self = new(ELeave) CAnswerIncomingCall(aController);
00028 CleanupStack::PushL(self);
00029 self->ConstructL();
00030 CleanupStack::Pop(self);
00031 return self;
00032 }
00033
00038 CAnswerIncomingCall::~CAnswerIncomingCall()
00039 {
00040 Cancel();
00041 }
00042
00046 void CAnswerIncomingCall::DoStartRequestL()
00047 {
00048 _LIT( KNotifyPanic, "CAnswerIncomingCall Get Method" );
00049 __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyPanic, 1 ));
00050 iRequestNotify = EFalse;
00051
00052
00053 iTelephony->AnswerIncomingCall(iStatus, iCallId);
00054 SetActive();
00055 }
00056
00063 CAnswerIncomingCall::CAnswerIncomingCall(MExecAsync* aController)
00064 : CISVAPIAsync(aController, KAnswerIncomingCall),
00065 iCallStatusV1Pckg( iCallStatusV1 )
00066 {
00067
00068 }
00069
00073 void CAnswerIncomingCall::ConstructL()
00074 {
00075 iRequestNotify = EFalse;
00076 }
00077
00082 void CAnswerIncomingCall::RunL()
00083 {
00084 if(iStatus != KErrNone)
00085 {
00086 iConsole->Printf(KError);
00087
00088
00089 iConsole->Printf(_L("%d\n"), iStatus.Int());
00090 }
00091 else
00092 {
00093
00094 iConsole->Printf(_L("Call Answered ....\n"));
00095 ExampleComplete();
00096 }
00097 }
00098
00102 void CAnswerIncomingCall::DoCancel()
00103 {
00104
00105 iTelephony->CancelAsync(CTelephony::EAnswerIncomingCallCancel);
00106 }
00107