00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "CCallWaitingStatus.h"
00018
00026 CCallWaitingStatus* CCallWaitingStatus::NewL(MExecAsync* aController)
00027 {
00028 CCallWaitingStatus* self = new(ELeave) CCallWaitingStatus(aController);
00029 CleanupStack::PushL(self);
00030 self->ConstructL();
00031 CleanupStack::Pop(self);
00032 return self;
00033 }
00034
00039 CCallWaitingStatus::~CCallWaitingStatus()
00040 {
00041 Cancel();
00042 }
00043
00048 void CCallWaitingStatus::DoStartRequestL()
00049 {
00050 _LIT( KNotifyPanic, "CCallWaitingStatus Get Method" );
00051 __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyPanic, 1 ));
00052 iRequestNotify = EFalse;
00053
00054
00055 iTelephony->GetCallWaitingStatus(iStatus, iCallWaitingStatusV1Pckg);
00056 SetActive();
00057 }
00058
00065 CCallWaitingStatus::CCallWaitingStatus(MExecAsync* aController)
00066 : CISVAPIAsync(aController, KCallWaitingStatus),
00067 iCallWaitingStatusV1Pckg(iCallWaitingStatusV1)
00068 {
00069
00070 }
00071
00075 void CCallWaitingStatus::ConstructL()
00076 {
00077
00078 }
00079
00083 void CCallWaitingStatus::RunL()
00084 {
00085 if(iStatus != KErrNone)
00086 {
00087 iConsole->Printf(KError);
00088
00089
00090 iConsole->Printf(_L("%d\n"), iStatus.Int());
00091 }
00092 else
00093 {
00094
00095 iConsole->Printf(KCallWaitingStatusMsg);
00096 switch(iCallWaitingStatusV1.iCallWaiting)
00097 {
00098 case CTelephony::EStatusActive:
00099 ExampleComplete();
00100 break;
00101 case CTelephony::ENotActive:
00102 case CTelephony::ENotProvisioned:
00103 case CTelephony::ENotAvailable:
00104 case CTelephony::EUnknown:
00105 ExampleNotify();
00106 break;
00107 }
00108 }
00109 }
00110
00114 void CCallWaitingStatus::DoCancel()
00115 {
00116
00117 iTelephony->CancelAsync(CTelephony::EGetCallWaitingStatusCancel);
00118 }
00119