00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "CCallWaitingStatus.h"
00018
00025 CCallWaitingStatus* CCallWaitingStatus::NewL(MExecAsync* aController)
00026 {
00027 CCallWaitingStatus* self = new(ELeave) CCallWaitingStatus(aController);
00028 CleanupStack::PushL(self);
00029 self->ConstructL();
00030 CleanupStack::Pop(self);
00031 return self;
00032 }
00033
00038 CCallWaitingStatus::~CCallWaitingStatus()
00039 {
00040 Cancel();
00041 }
00042
00047 void CCallWaitingStatus::DoStartRequestL()
00048 {
00049 _LIT( KNotifyPanic, "CCallWaitingStatus Get Method" );
00050 __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyPanic, 1 ));
00051 iRequestNotify = EFalse;
00052
00053
00054 iTelephony->GetCallWaitingStatus(iStatus, iCallWaitingStatusV1Pckg);
00055 SetActive();
00056 }
00057
00064 CCallWaitingStatus::CCallWaitingStatus(MExecAsync* aController)
00065 : CISVAPIAsync(aController, KCallWaitingStatus),
00066 iCallWaitingStatusV1Pckg(iCallWaitingStatusV1)
00067 {
00068
00069 }
00070
00074 void CCallWaitingStatus::ConstructL()
00075 {
00076
00077 }
00078
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 iConsole->Printf(_L("Call Waiting Provisioned\n"));
00100 ExampleNotify();
00101 break;
00102 case CTelephony::ENotActive:
00103 case CTelephony::ENotProvisioned:
00104 case CTelephony::ENotAvailable:
00105 case CTelephony::EUnknown:
00106 iConsole->Printf(_L("Call Waiting Not Provisioned\n"));
00107 ExampleComplete();
00108 break;
00109 }
00110 }
00111 }
00112
00116 void CCallWaitingStatus::DoCancel()
00117 {
00118
00119 iTelephony->CancelAsync(CTelephony::EGetCallWaitingStatusCancel);
00120 }