00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "COperatorName.h"
00018
00026 COperatorName* COperatorName::NewL(MExecAsync* aController)
00027 {
00028 COperatorName* self = new(ELeave) COperatorName(aController);
00029 CleanupStack::PushL(self);
00030 self->ConstructL();
00031 CleanupStack::Pop(self);
00032 return self;
00033 }
00034
00039 COperatorName::~COperatorName()
00040 {
00041 Cancel();
00042 }
00043
00048 void COperatorName::DoStartRequestL()
00049 {
00050 _LIT(KDummyAnswerPanic, "COperatorName Get Method");
00051 __ASSERT_ALWAYS(!IsActive(), User::Panic(KDummyAnswerPanic, 1));
00052 iRequestNotify = EFalse;
00053
00054
00055 iTelephony->GetOperatorName(iStatus, iOperatorNameV1Pckg);
00056 SetActive();
00057 }
00058
00065 COperatorName::COperatorName(MExecAsync* aController)
00066 : CISVAPIAsync(aController, KOperatorName),
00067 iOperatorNameV1Pckg(iOperatorNameV1)
00068 {
00069
00070 }
00071
00075 void COperatorName::ConstructL()
00076 {
00077
00078 }
00079
00084 void COperatorName::RunL()
00085 {
00086 if(iStatus != KErrNone)
00087 {
00088 iConsole->Printf(KError);
00089
00090
00091 iConsole->Printf(_L("%d\n"), iStatus.Int());
00092 }
00093 else
00094 {
00095
00096 iConsole->Printf(KOperatorNameMsg);
00097 iConsole->Printf(iOperatorNameV1.iOperatorName);
00098 iConsole->Printf(KNewLine);
00099 ExampleComplete();
00100 }
00101 }
00102
00106 void COperatorName::DoCancel()
00107 {
00108
00109 iTelephony->CancelAsync(CTelephony::EGetOperatorNameCancel);
00110 }
00111