00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "CCallForwardingStatus.h"
00032
00040 CCallForwardingStatus* CCallForwardingStatus::NewL(MExecAsync* aController)
00041 {
00042 CCallForwardingStatus* self = new(ELeave) CCallForwardingStatus(aController);
00043 CleanupStack::PushL(self);
00044 self->ConstructL();
00045 CleanupStack::Pop(self);
00046 return self;
00047 }
00048
00052 CCallForwardingStatus::~CCallForwardingStatus()
00053 {
00054 Cancel();
00055 }
00056
00060 void CCallForwardingStatus::ConstructL()
00061 {
00062 iSecondCondition = EFalse;
00063 }
00064
00068 void CCallForwardingStatus::DoStartRequestL()
00069 {
00070 _LIT( KNotifyPanic, "CCallForwardingStatus Get Method" );
00071 __ASSERT_ALWAYS( !IsActive(), User::Panic( KNotifyPanic, 1 ));
00072 iRequestNotify = EFalse;
00073 if (iSecondCondition)
00074 {
00075 iSecondCondition = EFalse;
00076 CTelephony::TCallForwardingCondition condition2 = CTelephony::ECallForwardingUnconditional;
00077
00078
00079 iTelephony->GetCallForwardingStatus(iStatus,
00080 condition2,
00081 iCallForwardingStatus2V1Pckg);
00082 }
00083 else
00084 {
00085 iSecondCondition = ETrue;
00086 CTelephony::TCallForwardingCondition condition1 = CTelephony::ECallForwardingNoReply;
00087
00088
00089 iTelephony->GetCallForwardingStatus(iStatus,
00090 condition1,
00091 iCallForwardingStatus1V1Pckg);
00092 }
00093 SetActive();
00094 }
00095
00102 CCallForwardingStatus::CCallForwardingStatus(MExecAsync* aController)
00103 : CISVAPIAsync(aController, KCallForwardingStatus),
00104 iCallForwardingStatus1V1Pckg(iCallForwardingStatus1V1),
00105 iCallForwardingStatus2V1Pckg(iCallForwardingStatus2V1)
00106 {
00107
00108 }
00109
00114 void CCallForwardingStatus::RunL()
00115 {
00116 if(iStatus != KErrNone)
00117 {
00118 iConsole->Printf(KError);
00119
00120
00121 iConsole->Printf(_L("%d\n"), iStatus.Int());
00122 }
00123 else
00124 {
00125 if (!iSecondCondition)
00126 {
00127 iConsole->Printf(KCallForwardingStatusMsg);
00128 switch(iCallForwardingStatus1V1.iCallForwarding)
00129 {
00130 case CTelephony::EStatusActive:
00131
00132
00133
00134 iConsole->Printf(_L("Call Forwarding impinges on incoming calls!\n"));
00135 iConsole->Printf(_L("Recify this to remove this delay\n"));
00136 User::After(5000000);
00137 case CTelephony::ENotActive:
00138 case CTelephony::ENotProvisioned:
00139 case CTelephony::ENotAvailable:
00140 case CTelephony::EUnknown:
00141 break;
00142 }
00143 switch(iCallForwardingStatus2V1.iCallForwarding)
00144 {
00145 case CTelephony::EStatusActive:
00146
00147
00148
00149 iConsole->Printf(_L("Call Forwarding impinges on incoming calls!\n"));
00150 iConsole->Printf(_L("Recify this to remove this delay\n"));
00151 User::After(5000000);
00152 case CTelephony::ENotActive:
00153 case CTelephony::ENotProvisioned:
00154 case CTelephony::ENotAvailable:
00155 case CTelephony::EUnknown:
00156 ExampleComplete();
00157 break;
00158 }
00159 }
00160 else
00161 {
00162 ExampleNotify();
00163 }
00164 }
00165 }
00166
00170 void CCallForwardingStatus::DoCancel()
00171 {
00172
00173 iTelephony->CancelAsync(CTelephony::EGetCallForwardingStatusCancel);
00174 }