|
1 /* |
|
2 * Copyright (c) 2006, 2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of Timer class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "LbtAppCellInfo.h" |
|
21 |
|
22 //_LIT(KLbtTraceDir,"epos"); |
|
23 // _LIT(KLbtTraceFile,"TriggerFireInfo.log"); |
|
24 |
|
25 |
|
26 CLbtAppCgiRequestor* CLbtAppCgiRequestor::NewL(RFileLogger &aLog) |
|
27 { |
|
28 CLbtAppCgiRequestor* self = new (ELeave) CLbtAppCgiRequestor(aLog); |
|
29 |
|
30 self->ConstructL(); |
|
31 |
|
32 return self; |
|
33 } |
|
34 CLbtAppCgiRequestor::~CLbtAppCgiRequestor() |
|
35 { |
|
36 // RFileLogger::WriteFormat(KLbtTraceDir, KLbtTraceFile, EFileLoggingModeAppend,_L( "~CLbtAppCgiRequestor before Cancel")); |
|
37 Cancel(); |
|
38 // RFileLogger::WriteFormat(KLbtTraceDir, KLbtTraceFile, EFileLoggingModeAppend,_L( "~CLbtAppCgiRequestor After Cancel")); |
|
39 delete iTelephony; |
|
40 // RFileLogger::WriteFormat(KLbtTraceDir, KLbtTraceFile, EFileLoggingModeAppend,_L( "~CLbtAppCgiRequestor After ITelephony delete")); |
|
41 } |
|
42 void CLbtAppCgiRequestor::Start(CActiveSchedulerWait* aWait ) |
|
43 { |
|
44 //iStatus = KRequestPending; |
|
45 iWait=aWait; |
|
46 if(!IsActive()) |
|
47 SetActive(); |
|
48 |
|
49 //Make Async call |
|
50 iTelephony->GetCurrentNetworkInfo(iStatus, iNwInfoPckg); |
|
51 |
|
52 |
|
53 } |
|
54 |
|
55 CTelephony::TNetworkInfoV1Pckg CLbtAppCgiRequestor::CurrentCGI() |
|
56 { |
|
57 return iNwInfoPckg; |
|
58 |
|
59 } |
|
60 void CLbtAppCgiRequestor::DoCancel() |
|
61 { |
|
62 //Cancel Async call |
|
63 // RFileLogger::WriteFormat(KLbtTraceDir, KLbtTraceFile, EFileLoggingModeAppend,_L( "DoCancel before CancelAsync")); |
|
64 iTelephony->CancelAsync(CTelephony::ECurrentNetworkInfoChangeCancel); |
|
65 // RFileLogger::WriteFormat(KLbtTraceDir, KLbtTraceFile, EFileLoggingModeAppend,_L( "DoCancel After CancelAsync")); |
|
66 |
|
67 } |
|
68 CLbtAppCgiRequestor::CLbtAppCgiRequestor(RFileLogger &aLog) |
|
69 : CActive( EPriorityStandard ), |
|
70 iNwInfoPckg(iNwInfo), |
|
71 iLog(aLog) |
|
72 |
|
73 { |
|
74 CActiveScheduler::Add( this ); |
|
75 } |
|
76 void CLbtAppCgiRequestor::ConstructL() |
|
77 { |
|
78 //Construct Async Object |
|
79 iTelephony = CTelephony::NewL(); |
|
80 |
|
81 } |
|
82 |
|
83 void CLbtAppCgiRequestor::RunL() |
|
84 { |
|
85 |
|
86 if(iWait->IsStarted()) |
|
87 { |
|
88 iWait->AsyncStop(); |
|
89 } |
|
90 //iLog.Write(_L("CLbtAppCgiRequestor::RunL")); |
|
91 /* iObs->HandleCIDChangeL(iNwInfo); |
|
92 Start();*/ |
|
93 } |
|
94 |
|
95 |