|
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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef IRNWINFOOBSERVER_H |
|
20 #define IRNWINFOOBSERVER_H |
|
21 |
|
22 #include <etel3rdparty.h> |
|
23 |
|
24 class CIRUi; |
|
25 |
|
26 class CIRNwInfoObserver : public CActive |
|
27 { |
|
28 public: // Constructors and destructor |
|
29 |
|
30 /** |
|
31 * Function : NewL |
|
32 * Symbian OS two-phased constructor |
|
33 * @param instance of ui |
|
34 */ |
|
35 static CIRNwInfoObserver* NewL(CIRUi* aUi); |
|
36 |
|
37 /** |
|
38 * Function : NewLC |
|
39 * Symbian OS two-phased constructor |
|
40 * @param instance of ui |
|
41 */ |
|
42 static CIRNwInfoObserver* NewLC(CIRUi* aUi); |
|
43 |
|
44 /** |
|
45 * Function : ~CIRNwInfoObserver |
|
46 * Destructor. |
|
47 */ |
|
48 ~CIRNwInfoObserver(); |
|
49 |
|
50 public: |
|
51 /** |
|
52 * Function : IRStartNwMonitor |
|
53 * starts network monitoring |
|
54 */ |
|
55 void IRStartNwMonitor(); |
|
56 |
|
57 private: |
|
58 /** |
|
59 * Function : ConstructL |
|
60 * Function does all the initializations |
|
61 * Two phase constructor |
|
62 * @param CIRUi instance |
|
63 */ |
|
64 void ConstructL(CIRUi* aUi); |
|
65 |
|
66 /** |
|
67 * Function : CIRNwInfoObserver |
|
68 * By default, prohibit copy constructor |
|
69 */ |
|
70 CIRNwInfoObserver(); |
|
71 |
|
72 /** |
|
73 * Function : IssueRequest |
|
74 * Issue Subsequent network monitoring request |
|
75 */ |
|
76 void IssueRequest(); |
|
77 |
|
78 /** |
|
79 * Function : DoCancel |
|
80 * From CActive. Cancels the active object from observing System |
|
81 * Agent events. . |
|
82 */ |
|
83 void DoCancel(); |
|
84 |
|
85 /** |
|
86 * Function : RunL |
|
87 * From CActive. Gets called by active object when a System Agent |
|
88 * event occurs. |
|
89 */ |
|
90 void RunL(); |
|
91 |
|
92 /** |
|
93 * Function : RunError |
|
94 * Function which handles RunL error |
|
95 * @param Error value |
|
96 */ |
|
97 TInt RunError(TInt aError); |
|
98 |
|
99 private: |
|
100 |
|
101 CIRUi* iUi; |
|
102 CTelephony* iNwInfoObserver; |
|
103 |
|
104 TBool iFirstTime; |
|
105 TBool iCurrentNetwork; |
|
106 TBool iHomeNetworkType; |
|
107 |
|
108 TBuf<10> iCurrentNetworkMCC; |
|
109 TBuf<10> iCurrentNetworkMNC; |
|
110 TBuf<10> iHomeNetworkMCC; |
|
111 TBuf<10> iHomeNetworkMNC; |
|
112 |
|
113 //Current Network |
|
114 CTelephony::TNetworkInfoV1 iCurrentNetworkInfo; |
|
115 CTelephony::TNetworkInfoV1Pckg iCurrentNetworkInfoV1Pckg; |
|
116 |
|
117 //Home Operator |
|
118 CTelephony::TNetworkRegistrationV1 iHomeOperatorInfo; |
|
119 CTelephony::TNetworkRegistrationV1Pckg iHomeOperatorInfoPckg; |
|
120 }; |
|
121 |
|
122 #endif // IRNWINFOOBSERVER_H |
|
123 |