equal
deleted
inserted
replaced
18 |
18 |
19 #ifndef C_CNETWORKINFO_H |
19 #ifndef C_CNETWORKINFO_H |
20 #define C_CNETWORKINFO_H |
20 #define C_CNETWORKINFO_H |
21 |
21 |
22 #include <etel3rdparty.h> |
22 #include <etel3rdparty.h> |
|
23 #include <etel.h> |
|
24 #include <etelmm.h> |
23 |
25 |
24 /** |
26 /** |
25 * An observer interface, which is used for getting current network cell id. |
27 * An observer interface, which is used for getting current network cell id. |
26 * |
28 * |
27 * @since S60 3.1 |
29 * @since S60 3.1 |
32 /** |
34 /** |
33 * This method is used for setting the network cell id to the |
35 * This method is used for setting the network cell id to the |
34 * location trail. |
36 * location trail. |
35 */ |
37 */ |
36 virtual void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, const TInt aError ) = 0; |
38 virtual void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, const TInt aError ) = 0; |
|
39 |
|
40 /** |
|
41 * Get mobile phone object for network info object |
|
42 * @return mobile phone object |
|
43 */ |
|
44 virtual RMobilePhone& GetMobilePhone4NwInfo() = 0; |
37 }; |
45 }; |
38 |
46 |
39 /** |
47 /** |
40 * |
48 * |
41 * @since S60 3.1 |
49 * @since S60 3.1 |
53 * C++ destructor. |
61 * C++ destructor. |
54 * @since S60 3.1 |
62 * @since S60 3.1 |
55 */ |
63 */ |
56 IMPORT_C virtual ~CNetworkInfo(); |
64 IMPORT_C virtual ~CNetworkInfo(); |
57 |
65 |
|
66 /** |
|
67 * Listen to n/w info change |
|
68 * @since S60 9.2 |
|
69 */ |
|
70 IMPORT_C void StartNwInfoChangeNotifier(); |
|
71 |
|
72 /** |
|
73 * Stop n/w info change listener |
|
74 * @since S60 9.2 |
|
75 */ |
|
76 IMPORT_C void StopNwInfoChangeNotifier(); |
|
77 |
|
78 /** |
|
79 * Map etel to ctelephony |
|
80 * @since S60 9.2 |
|
81 */ |
|
82 IMPORT_C static void MapNetworkInfo(CTelephony::TNetworkInfoV1* aISVNetworkInfo, |
|
83 RMobilePhone::TMobilePhoneNetworkInfoV2* aMMNetworkInfo, |
|
84 RMobilePhone::TMobilePhoneLocationAreaV1* aMMArea); |
|
85 |
|
86 /* |
|
87 * Get registrer network country code |
|
88 * |
|
89 * @return current register n/w info |
|
90 */ |
|
91 RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw(); |
|
92 |
58 protected: |
93 protected: |
59 /** |
94 /** |
60 * Run error implementation in case of RunL leaving. |
95 * Run error implementation in case of RunL leaving. |
61 * @since S60 3.1 |
96 * @since S60 3.1 |
62 */ |
97 */ |
83 * From CActive. |
118 * From CActive. |
84 */ |
119 */ |
85 void RunL(); |
120 void RunL(); |
86 |
121 |
87 private: |
122 private: |
|
123 typedef enum |
|
124 { |
|
125 ENetworkInfoNoOptState = 0x00, |
|
126 ENetworkInfoOptGetState, |
|
127 ENetworkInfoOptNotifyState |
|
128 }TNetworkInfoOptState; |
|
129 |
88 /** |
130 /** |
89 * An observer interface to set current cell id to the location trail. |
131 * An observer interface to set current cell id to the location trail. |
90 * Not own. |
132 * Not own. |
91 */ |
133 */ |
92 MNetworkInfoObserver* iTrail; |
134 MNetworkInfoObserver* iTrail; |
93 |
135 |
94 /** |
136 /** |
95 * Flag to indicate that we retrieve network info for the first time. |
137 * phone object to retrieve modem parameters |
96 */ |
138 */ |
97 TBool iFirstTime; |
139 RMobilePhone& iMobilePhone; |
98 |
140 |
99 /** |
141 /** |
100 * Interface to phone's telephony system to get Cell Id. |
142 * Maintain the operation state. |
101 * Own. |
143 */ |
102 */ |
144 TNetworkInfoOptState iState; |
103 CTelephony* iTelephony; |
145 |
104 |
146 /* |
|
147 * Retained this object just to give backward compatibility |
|
148 */ |
105 CTelephony::TNetworkInfoV1 iNetworkInfoV1; |
149 CTelephony::TNetworkInfoV1 iNetworkInfoV1; |
106 CTelephony::TNetworkInfoV1Pckg iNetworkInfoV1Pckg; |
150 |
|
151 RMobilePhone::TMobilePhoneNetworkInfoV2 iMMNetworkInfo; |
|
152 RMobilePhone::TMobilePhoneNetworkInfoV2Pckg iMMNetworkInfoPckg; |
|
153 RMobilePhone::TMobilePhoneLocationAreaV1 iMMArea; |
107 }; |
154 }; |
108 |
155 |
109 #endif // C_CNETWORKINFO_H |
156 #endif // C_CNETWORKINFO_H |
110 |
157 |
111 // End of file. |
158 // End of file. |